packaging: remove old options to find hidden files
[platform/upstream/findutils.git] / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69 for GNU findutils 4.5.14.
4 #
5 # Report bugs to <bug-findutils@gnu.org>.
6 #
7 #
8 # Copyright (C) 1992-1996, 1998-2012 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 as_nl='
37 '
38 export as_nl
39 # Printing a long string crashes Solaris 7 /usr/bin/printf.
40 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43 # Prefer a ksh shell builtin over an external printf program on Solaris,
44 # but without wasting forks for bash or zsh.
45 if test -z "$BASH_VERSION$ZSH_VERSION" \
46     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47   as_echo='print -r --'
48   as_echo_n='print -rn --'
49 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50   as_echo='printf %s\n'
51   as_echo_n='printf %s'
52 else
53   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55     as_echo_n='/usr/ucb/echo -n'
56   else
57     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58     as_echo_n_body='eval
59       arg=$1;
60       case $arg in #(
61       *"$as_nl"*)
62         expr "X$arg" : "X\\(.*\\)$as_nl";
63         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64       esac;
65       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66     '
67     export as_echo_n_body
68     as_echo_n='sh -c $as_echo_n_body as_echo'
69   fi
70   export as_echo_body
71   as_echo='sh -c $as_echo_body as_echo'
72 fi
73
74 # The user is always right.
75 if test "${PATH_SEPARATOR+set}" != set; then
76   PATH_SEPARATOR=:
77   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79       PATH_SEPARATOR=';'
80   }
81 fi
82
83
84 # IFS
85 # We need space, tab and new line, in precisely that order.  Quoting is
86 # there to prevent editors from complaining about space-tab.
87 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
88 # splitting by setting IFS to empty value.)
89 IFS=" ""        $as_nl"
90
91 # Find who we are.  Look in the path if we contain no directory separator.
92 as_myself=
93 case $0 in #((
94   *[\\/]* ) as_myself=$0 ;;
95   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
96 for as_dir in $PATH
97 do
98   IFS=$as_save_IFS
99   test -z "$as_dir" && as_dir=.
100     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101   done
102 IFS=$as_save_IFS
103
104      ;;
105 esac
106 # We did not find ourselves, most probably we were run as `sh COMMAND'
107 # in which case we are not to be found in the path.
108 if test "x$as_myself" = x; then
109   as_myself=$0
110 fi
111 if test ! -f "$as_myself"; then
112   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113   exit 1
114 fi
115
116 # Unset variables that we do not need and which cause bugs (e.g. in
117 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
118 # suppresses any "Segmentation fault" message there.  '((' could
119 # trigger a bug in pdksh 5.2.14.
120 for as_var in BASH_ENV ENV MAIL MAILPATH
121 do eval test x\${$as_var+set} = xset \
122   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
123 done
124 PS1='$ '
125 PS2='> '
126 PS4='+ '
127
128 # NLS nuisances.
129 LC_ALL=C
130 export LC_ALL
131 LANGUAGE=C
132 export LANGUAGE
133
134 # CDPATH.
135 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136
137 # Use a proper internal environment variable to ensure we don't fall
138   # into an infinite loop, continuously re-executing ourselves.
139   if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140     _as_can_reexec=no; export _as_can_reexec;
141     # We cannot yet assume a decent shell, so we have to provide a
142 # neutralization value for shells without unset; and this also
143 # works around shells that cannot unset nonexistent variables.
144 # Preserve -v and -x to the replacement shell.
145 BASH_ENV=/dev/null
146 ENV=/dev/null
147 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148 case $- in # ((((
149   *v*x* | *x*v* ) as_opts=-vx ;;
150   *v* ) as_opts=-v ;;
151   *x* ) as_opts=-x ;;
152   * ) as_opts= ;;
153 esac
154 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155 # Admittedly, this is quite paranoid, since all the known shells bail
156 # out after a failed `exec'.
157 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158 as_fn_exit 255
159   fi
160   # We don't want this to propagate to other subprocesses.
161           { _as_can_reexec=; unset _as_can_reexec;}
162 if test "x$CONFIG_SHELL" = x; then
163   as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164   emulate sh
165   NULLCMD=:
166   # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167   # is contrary to our usage.  Disable this feature.
168   alias -g '\${1+\"\$@\"}'='\"\$@\"'
169   setopt NO_GLOB_SUBST
170 else
171   case \`(set -o) 2>/dev/null\` in #(
172   *posix*) :
173     set -o posix ;; #(
174   *) :
175      ;;
176 esac
177 fi
178 "
179   as_required="as_fn_return () { (exit \$1); }
180 as_fn_success () { as_fn_return 0; }
181 as_fn_failure () { as_fn_return 1; }
182 as_fn_ret_success () { return 0; }
183 as_fn_ret_failure () { return 1; }
184
185 exitcode=0
186 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191
192 else
193   exitcode=1; echo positional parameters were not saved.
194 fi
195 test x\$exitcode = x0 || exit 1
196 test -x / || exit 1"
197   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200   test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201 test \$(( 1 + 1 )) = 2 || exit 1"
202   if (eval "$as_required") 2>/dev/null; then :
203   as_have_required=yes
204 else
205   as_have_required=no
206 fi
207   if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
208
209 else
210   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
211 as_found=false
212 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
213 do
214   IFS=$as_save_IFS
215   test -z "$as_dir" && as_dir=.
216   as_found=:
217   case $as_dir in #(
218          /*)
219            for as_base in sh bash ksh sh5; do
220              # Try only shells that exist, to save several forks.
221              as_shell=$as_dir/$as_base
222              if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
223                     { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
224   CONFIG_SHELL=$as_shell as_have_required=yes
225                    if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
226   break 2
227 fi
228 fi
229            done;;
230        esac
231   as_found=false
232 done
233 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
234               { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
235   CONFIG_SHELL=$SHELL as_have_required=yes
236 fi; }
237 IFS=$as_save_IFS
238
239
240       if test "x$CONFIG_SHELL" != x; then :
241   export CONFIG_SHELL
242              # We cannot yet assume a decent shell, so we have to provide a
243 # neutralization value for shells without unset; and this also
244 # works around shells that cannot unset nonexistent variables.
245 # Preserve -v and -x to the replacement shell.
246 BASH_ENV=/dev/null
247 ENV=/dev/null
248 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
249 case $- in # ((((
250   *v*x* | *x*v* ) as_opts=-vx ;;
251   *v* ) as_opts=-v ;;
252   *x* ) as_opts=-x ;;
253   * ) as_opts= ;;
254 esac
255 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
256 # Admittedly, this is quite paranoid, since all the known shells bail
257 # out after a failed `exec'.
258 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
259 exit 255
260 fi
261
262     if test x$as_have_required = xno; then :
263   $as_echo "$0: This script requires a shell more modern than all"
264   $as_echo "$0: the shells that I found on your system."
265   if test x${ZSH_VERSION+set} = xset ; then
266     $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
267     $as_echo "$0: be upgraded to zsh 4.3.4 or later."
268   else
269     $as_echo "$0: Please tell bug-autoconf@gnu.org and
270 $0: bug-findutils@gnu.org about your system, including any
271 $0: error possibly output before this message. Then install
272 $0: a modern shell, or manually run the script under such a
273 $0: shell if you do have one."
274   fi
275   exit 1
276 fi
277 fi
278 fi
279 SHELL=${CONFIG_SHELL-/bin/sh}
280 export SHELL
281 # Unset more variables known to interfere with behavior of common tools.
282 CLICOLOR_FORCE= GREP_OPTIONS=
283 unset CLICOLOR_FORCE GREP_OPTIONS
284
285 ## --------------------- ##
286 ## M4sh Shell Functions. ##
287 ## --------------------- ##
288 # as_fn_unset VAR
289 # ---------------
290 # Portably unset VAR.
291 as_fn_unset ()
292 {
293   { eval $1=; unset $1;}
294 }
295 as_unset=as_fn_unset
296
297 # as_fn_set_status STATUS
298 # -----------------------
299 # Set $? to STATUS, without forking.
300 as_fn_set_status ()
301 {
302   return $1
303 } # as_fn_set_status
304
305 # as_fn_exit STATUS
306 # -----------------
307 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
308 as_fn_exit ()
309 {
310   set +e
311   as_fn_set_status $1
312   exit $1
313 } # as_fn_exit
314
315 # as_fn_mkdir_p
316 # -------------
317 # Create "$as_dir" as a directory, including parents if necessary.
318 as_fn_mkdir_p ()
319 {
320
321   case $as_dir in #(
322   -*) as_dir=./$as_dir;;
323   esac
324   test -d "$as_dir" || eval $as_mkdir_p || {
325     as_dirs=
326     while :; do
327       case $as_dir in #(
328       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
329       *) as_qdir=$as_dir;;
330       esac
331       as_dirs="'$as_qdir' $as_dirs"
332       as_dir=`$as_dirname -- "$as_dir" ||
333 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
334          X"$as_dir" : 'X\(//\)[^/]' \| \
335          X"$as_dir" : 'X\(//\)$' \| \
336          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
337 $as_echo X"$as_dir" |
338     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
339             s//\1/
340             q
341           }
342           /^X\(\/\/\)[^/].*/{
343             s//\1/
344             q
345           }
346           /^X\(\/\/\)$/{
347             s//\1/
348             q
349           }
350           /^X\(\/\).*/{
351             s//\1/
352             q
353           }
354           s/.*/./; q'`
355       test -d "$as_dir" && break
356     done
357     test -z "$as_dirs" || eval "mkdir $as_dirs"
358   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
359
360
361 } # as_fn_mkdir_p
362
363 # as_fn_executable_p FILE
364 # -----------------------
365 # Test if FILE is an executable regular file.
366 as_fn_executable_p ()
367 {
368   test -f "$1" && test -x "$1"
369 } # as_fn_executable_p
370 # as_fn_append VAR VALUE
371 # ----------------------
372 # Append the text in VALUE to the end of the definition contained in VAR. Take
373 # advantage of any shell optimizations that allow amortized linear growth over
374 # repeated appends, instead of the typical quadratic growth present in naive
375 # implementations.
376 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
377   eval 'as_fn_append ()
378   {
379     eval $1+=\$2
380   }'
381 else
382   as_fn_append ()
383   {
384     eval $1=\$$1\$2
385   }
386 fi # as_fn_append
387
388 # as_fn_arith ARG...
389 # ------------------
390 # Perform arithmetic evaluation on the ARGs, and store the result in the
391 # global $as_val. Take advantage of shells that can avoid forks. The arguments
392 # must be portable across $(()) and expr.
393 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
394   eval 'as_fn_arith ()
395   {
396     as_val=$(( $* ))
397   }'
398 else
399   as_fn_arith ()
400   {
401     as_val=`expr "$@" || test $? -eq 1`
402   }
403 fi # as_fn_arith
404
405
406 # as_fn_error STATUS ERROR [LINENO LOG_FD]
407 # ----------------------------------------
408 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
409 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
410 # script with STATUS, using 1 if that was 0.
411 as_fn_error ()
412 {
413   as_status=$1; test $as_status -eq 0 && as_status=1
414   if test "$4"; then
415     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
416     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
417   fi
418   $as_echo "$as_me: error: $2" >&2
419   as_fn_exit $as_status
420 } # as_fn_error
421
422 if expr a : '\(a\)' >/dev/null 2>&1 &&
423    test "X`expr 00001 : '.*\(...\)'`" = X001; then
424   as_expr=expr
425 else
426   as_expr=false
427 fi
428
429 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
430   as_basename=basename
431 else
432   as_basename=false
433 fi
434
435 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
436   as_dirname=dirname
437 else
438   as_dirname=false
439 fi
440
441 as_me=`$as_basename -- "$0" ||
442 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
443          X"$0" : 'X\(//\)$' \| \
444          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
445 $as_echo X/"$0" |
446     sed '/^.*\/\([^/][^/]*\)\/*$/{
447             s//\1/
448             q
449           }
450           /^X\/\(\/\/\)$/{
451             s//\1/
452             q
453           }
454           /^X\/\(\/\).*/{
455             s//\1/
456             q
457           }
458           s/.*/./; q'`
459
460 # Avoid depending upon Character Ranges.
461 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
462 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
463 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
464 as_cr_digits='0123456789'
465 as_cr_alnum=$as_cr_Letters$as_cr_digits
466
467
468   as_lineno_1=$LINENO as_lineno_1a=$LINENO
469   as_lineno_2=$LINENO as_lineno_2a=$LINENO
470   eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
471   test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
472   # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
473   sed -n '
474     p
475     /[$]LINENO/=
476   ' <$as_myself |
477     sed '
478       s/[$]LINENO.*/&-/
479       t lineno
480       b
481       :lineno
482       N
483       :loop
484       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
485       t loop
486       s/-\n.*//
487     ' >$as_me.lineno &&
488   chmod +x "$as_me.lineno" ||
489     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
490
491   # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
492   # already done that, so ensure we don't try to do so again and fall
493   # in an infinite loop.  This has already happened in practice.
494   _as_can_reexec=no; export _as_can_reexec
495   # Don't try to exec as it changes $[0], causing all sort of problems
496   # (the dirname of $[0] is not the place where we might find the
497   # original and so on.  Autoconf is especially sensitive to this).
498   . "./$as_me.lineno"
499   # Exit status is that of the last command.
500   exit
501 }
502
503 ECHO_C= ECHO_N= ECHO_T=
504 case `echo -n x` in #(((((
505 -n*)
506   case `echo 'xy\c'` in
507   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
508   xy)  ECHO_C='\c';;
509   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
510        ECHO_T=' ';;
511   esac;;
512 *)
513   ECHO_N='-n';;
514 esac
515
516 rm -f conf$$ conf$$.exe conf$$.file
517 if test -d conf$$.dir; then
518   rm -f conf$$.dir/conf$$.file
519 else
520   rm -f conf$$.dir
521   mkdir conf$$.dir 2>/dev/null
522 fi
523 if (echo >conf$$.file) 2>/dev/null; then
524   if ln -s conf$$.file conf$$ 2>/dev/null; then
525     as_ln_s='ln -s'
526     # ... but there are two gotchas:
527     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
528     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
529     # In both cases, we have to default to `cp -pR'.
530     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
531       as_ln_s='cp -pR'
532   elif ln conf$$.file conf$$ 2>/dev/null; then
533     as_ln_s=ln
534   else
535     as_ln_s='cp -pR'
536   fi
537 else
538   as_ln_s='cp -pR'
539 fi
540 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
541 rmdir conf$$.dir 2>/dev/null
542
543 if mkdir -p . 2>/dev/null; then
544   as_mkdir_p='mkdir -p "$as_dir"'
545 else
546   test -d ./-p && rmdir ./-p
547   as_mkdir_p=false
548 fi
549
550 as_test_x='test -x'
551 as_executable_p=as_fn_executable_p
552
553 # Sed expression to map a string onto a valid CPP name.
554 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
555
556 # Sed expression to map a string onto a valid variable name.
557 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
558
559
560 test -n "$DJDIR" || exec 7<&0 </dev/null
561 exec 6>&1
562
563 # Name of the host.
564 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
565 # so uname gets run too.
566 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
567
568 #
569 # Initializations.
570 #
571 ac_default_prefix=/usr/local
572 ac_clean_files=
573 ac_config_libobj_dir=.
574 LIBOBJS=
575 cross_compiling=no
576 subdirs=
577 MFLAGS=
578 MAKEFLAGS=
579
580 # Identity of this package.
581 PACKAGE_NAME='GNU findutils'
582 PACKAGE_TARNAME='findutils'
583 PACKAGE_VERSION='4.5.14'
584 PACKAGE_STRING='GNU findutils 4.5.14'
585 PACKAGE_BUGREPORT='bug-findutils@gnu.org'
586 PACKAGE_URL='http://www.gnu.org/software/findutils/'
587
588 ac_unique_file="find/pred.c"
589 # Factoring default headers for most tests.
590 ac_includes_default="\
591 #include <stdio.h>
592 #ifdef HAVE_SYS_TYPES_H
593 # include <sys/types.h>
594 #endif
595 #ifdef HAVE_SYS_STAT_H
596 # include <sys/stat.h>
597 #endif
598 #ifdef STDC_HEADERS
599 # include <stdlib.h>
600 # include <stddef.h>
601 #else
602 # ifdef HAVE_STDLIB_H
603 #  include <stdlib.h>
604 # endif
605 #endif
606 #ifdef HAVE_STRING_H
607 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
608 #  include <memory.h>
609 # endif
610 # include <string.h>
611 #endif
612 #ifdef HAVE_STRINGS_H
613 # include <strings.h>
614 #endif
615 #ifdef HAVE_INTTYPES_H
616 # include <inttypes.h>
617 #endif
618 #ifdef HAVE_STDINT_H
619 # include <stdint.h>
620 #endif
621 #ifdef HAVE_UNISTD_H
622 # include <unistd.h>
623 #endif"
624
625 gl_use_threads_default=
626 gl_func_list=
627 gl_header_list=
628 gl_fnmatch_required=POSIX
629 gl_getopt_required=POSIX
630 gl_getopt_required=POSIX
631 gl_modf_required=plain
632 gl_trunc_required=plain
633 gl_trunc_required=plain
634 gt_needs=
635 ac_subst_vars='gltests_LTLIBOBJS
636 gltests_LIBOBJS
637 gl_LTLIBOBJS
638 gl_LIBOBJS
639 CONFIG_INCLUDE
640 am__EXEEXT_FALSE
641 am__EXEEXT_TRUE
642 LTLIBOBJS
643 HAVE_FAKETIME_FALSE
644 HAVE_FAKETIME_TRUE
645 FAKETIME
646 HAVE_PYTHON_FALSE
647 HAVE_PYTHON_TRUE
648 pkgpyexecdir
649 pyexecdir
650 pkgpythondir
651 pythondir
652 PYTHON_PLATFORM
653 PYTHON_EXEC_PREFIX
654 PYTHON_PREFIX
655 PYTHON_VERSION
656 PYTHON
657 POSUB
658 INTLLIBS
659 LTLIBICONV
660 LIBICONV
661 XGETTEXT_EXTRA_OPTIONS
662 MSGMERGE
663 XGETTEXT_015
664 XGETTEXT
665 GMSGFMT_015
666 MSGFMT_015
667 GMSGFMT
668 MSGFMT
669 GETTEXT_MACRO_VERSION
670 USE_NLS
671 HAVE_ATTRIBUTE_NORETURN
672 SORT_SUPPORTS_Z
673 SORT
674 FINDLIBOBJS
675 LIBOBJS
676 FINDLIBS
677 CROSS_COMPILING_FALSE
678 CROSS_COMPILING_TRUE
679 MKINSTALLDIRS
680 WARN_CFLAGS
681 LIBTESTS_LIBDEPS
682 LIBGNULIB_LTLIBDEPS
683 LIBGNULIB_LIBDEPS
684 YIELD_LIB
685 abs_aux_dir
686 NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H
687 NEXT_SYS_IOCTL_H
688 HAVE_SYS_IOCTL_H
689 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
690 NEXT_SIGNAL_H
691 REPLACE_RAISE
692 REPLACE_PTHREAD_SIGMASK
693 HAVE_SIGHANDLER_T
694 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
695 HAVE_STRUCT_SIGACTION_SA_SIGACTION
696 HAVE_SIGACTION
697 HAVE_SIGINFO_T
698 HAVE_SIGSET_T
699 HAVE_RAISE
700 HAVE_PTHREAD_SIGMASK
701 HAVE_POSIX_SIGNALBLOCKING
702 GNULIB_SIGACTION
703 GNULIB_SIGPROCMASK
704 GNULIB_SIGNAL_H_SIGPIPE
705 GNULIB_RAISE
706 GNULIB_PTHREAD_SIGMASK
707 GL_GENERATE_NETINET_IN_H_FALSE
708 GL_GENERATE_NETINET_IN_H_TRUE
709 NETINET_IN_H
710 HAVE_NETINET_IN_H
711 NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H
712 NEXT_NETINET_IN_H
713 LIB_NANOSLEEP
714 LIB_SELECT
715 HAVE_SYS_SELECT_H
716 NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H
717 NEXT_SYS_SELECT_H
718 REPLACE_SELECT
719 REPLACE_PSELECT
720 HAVE_PSELECT
721 GNULIB_SELECT
722 GNULIB_PSELECT
723 INTL_MACOSX_LIBS
724 INET_PTON_LIB
725 LOCALE_TR_UTF8
726 NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H
727 NEXT_ARPA_INET_H
728 HAVE_ARPA_INET_H
729 REPLACE_INET_PTON
730 REPLACE_INET_NTOP
731 HAVE_DECL_INET_PTON
732 HAVE_DECL_INET_NTOP
733 GNULIB_INET_PTON
734 GNULIB_INET_NTOP
735 gltests_WITNESS
736 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
737 NEXT_WCHAR_H
738 HAVE_FEATURES_H
739 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE
740 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE
741 LIBUNISTRING_UNIWIDTH_H
742 LIBUNISTRING_UNITYPES_H
743 HAVE_UNISTD_H
744 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
745 NEXT_UNISTD_H
746 PTHREAD_H_DEFINES_STRUCT_TIMESPEC
747 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
748 TIME_H_DEFINES_STRUCT_TIMESPEC
749 NEXT_AS_FIRST_DIRECTIVE_TIME_H
750 NEXT_TIME_H
751 NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H
752 NEXT_SYS_WAIT_H
753 GNULIB_WAITPID
754 HAVE_SYS_UTSNAME_H
755 NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H
756 NEXT_SYS_UTSNAME_H
757 HAVE_STRUCT_UTSNAME
758 HAVE_UNAME
759 GNULIB_UNAME
760 HAVE_SYS_UIO_H
761 NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H
762 NEXT_SYS_UIO_H
763 HAVE_WS2TCPIP_H
764 HAVE_SYS_SOCKET_H
765 NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H
766 NEXT_SYS_SOCKET_H
767 HAVE_ACCEPT4
768 HAVE_SA_FAMILY_T
769 HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY
770 HAVE_STRUCT_SOCKADDR_STORAGE
771 GNULIB_ACCEPT4
772 GNULIB_SHUTDOWN
773 GNULIB_SETSOCKOPT
774 GNULIB_SENDTO
775 GNULIB_RECVFROM
776 GNULIB_SEND
777 GNULIB_RECV
778 GNULIB_LISTEN
779 GNULIB_GETSOCKOPT
780 GNULIB_GETSOCKNAME
781 GNULIB_GETPEERNAME
782 GNULIB_BIND
783 GNULIB_ACCEPT
784 GNULIB_CONNECT
785 GNULIB_SOCKET
786 HAVE_STRINGS_H
787 NEXT_AS_FIRST_DIRECTIVE_STRINGS_H
788 NEXT_STRINGS_H
789 NEXT_AS_FIRST_DIRECTIVE_STRING_H
790 NEXT_STRING_H
791 HAVE_DECL_STRNCASECMP
792 HAVE_STRCASECMP
793 HAVE_FFS
794 GNULIB_FFS
795 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
796 NEXT_STDLIB_H
797 NEXT_AS_FIRST_DIRECTIVE_STDIO_H
798 NEXT_STDIO_H
799 GL_GENERATE_STDARG_H_FALSE
800 GL_GENERATE_STDARG_H_TRUE
801 STDARG_H
802 NEXT_AS_FIRST_DIRECTIVE_STDARG_H
803 NEXT_STDARG_H
804 GL_GENERATE_STDALIGN_H_FALSE
805 GL_GENERATE_STDALIGN_H_TRUE
806 STDALIGN_H
807 LIBSOCKET
808 GL_GENERATE_SELINUX_CONTEXT_H_FALSE
809 GL_GENERATE_SELINUX_CONTEXT_H_TRUE
810 SELINUX_CONTEXT_H
811 NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H
812 NEXT_SELINUX_SELINUX_H
813 LIB_SELINUX
814 YFLAGS
815 YACC
816 HAVE__BOOL
817 GL_GENERATE_STDBOOL_H_FALSE
818 GL_GENERATE_STDBOOL_H_TRUE
819 STDBOOL_H
820 TRUNC_LIBM
821 MODF_LIBM
822 REPLACE_LOCALTIME
823 REPLACE_GMTIME
824 REPLACE_TIMEGM
825 REPLACE_NANOSLEEP
826 REPLACE_MKTIME
827 REPLACE_LOCALTIME_R
828 HAVE_TIMEGM
829 HAVE_STRPTIME
830 HAVE_NANOSLEEP
831 HAVE_DECL_LOCALTIME_R
832 GNULIB_TIME_R
833 GNULIB_TIMEGM
834 GNULIB_STRPTIME
835 GNULIB_NANOSLEEP
836 GNULIB_MKTIME
837 UNDEFINE_STRTOK_R
838 REPLACE_STRTOK_R
839 REPLACE_STRSIGNAL
840 REPLACE_STRNLEN
841 REPLACE_STRNDUP
842 REPLACE_STRNCAT
843 REPLACE_STRERROR_R
844 REPLACE_STRERROR
845 REPLACE_STRCHRNUL
846 REPLACE_STRCASESTR
847 REPLACE_STRSTR
848 REPLACE_STRDUP
849 REPLACE_STPNCPY
850 REPLACE_MEMMEM
851 REPLACE_MEMCHR
852 HAVE_STRVERSCMP
853 HAVE_DECL_STRSIGNAL
854 HAVE_DECL_STRERROR_R
855 HAVE_DECL_STRTOK_R
856 HAVE_STRCASESTR
857 HAVE_STRSEP
858 HAVE_STRPBRK
859 HAVE_DECL_STRNLEN
860 HAVE_DECL_STRNDUP
861 HAVE_DECL_STRDUP
862 HAVE_STRCHRNUL
863 HAVE_STPNCPY
864 HAVE_STPCPY
865 HAVE_RAWMEMCHR
866 HAVE_DECL_MEMRCHR
867 HAVE_MEMPCPY
868 HAVE_DECL_MEMMEM
869 HAVE_MEMCHR
870 HAVE_FFSLL
871 HAVE_FFSL
872 HAVE_MBSLEN
873 GNULIB_STRVERSCMP
874 GNULIB_STRSIGNAL
875 GNULIB_STRERROR_R
876 GNULIB_STRERROR
877 GNULIB_MBSTOK_R
878 GNULIB_MBSSEP
879 GNULIB_MBSSPN
880 GNULIB_MBSPBRK
881 GNULIB_MBSCSPN
882 GNULIB_MBSCASESTR
883 GNULIB_MBSPCASECMP
884 GNULIB_MBSNCASECMP
885 GNULIB_MBSCASECMP
886 GNULIB_MBSSTR
887 GNULIB_MBSRCHR
888 GNULIB_MBSCHR
889 GNULIB_MBSNLEN
890 GNULIB_MBSLEN
891 GNULIB_STRTOK_R
892 GNULIB_STRCASESTR
893 GNULIB_STRSTR
894 GNULIB_STRSEP
895 GNULIB_STRPBRK
896 GNULIB_STRNLEN
897 GNULIB_STRNDUP
898 GNULIB_STRNCAT
899 GNULIB_STRDUP
900 GNULIB_STRCHRNUL
901 GNULIB_STPNCPY
902 GNULIB_STPCPY
903 GNULIB_RAWMEMCHR
904 GNULIB_MEMRCHR
905 GNULIB_MEMPCPY
906 GNULIB_MEMMEM
907 GNULIB_MEMCHR
908 GNULIB_FFSLL
909 GNULIB_FFSL
910 LOCALE_FR_UTF8
911 LOCALE_ZH_CN
912 LOCALE_JA
913 NEXT_AS_FIRST_DIRECTIVE_MATH_H
914 NEXT_MATH_H
915 SED
916 LTLIBMULTITHREAD
917 LIBMULTITHREAD
918 LTLIBTHREAD
919 LIBTHREAD
920 LIBPTH_PREFIX
921 LTLIBPTH
922 LIBPTH
923 NEXT_AS_FIRST_DIRECTIVE_LOCALE_H
924 NEXT_LOCALE_H
925 HAVE_XLOCALE_H
926 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
927 NEXT_STDDEF_H
928 GL_GENERATE_STDDEF_H_FALSE
929 GL_GENERATE_STDDEF_H_TRUE
930 STDDEF_H
931 HAVE_WCHAR_T
932 REPLACE_NULL
933 REPLACE_STRUCT_LCONV
934 REPLACE_DUPLOCALE
935 REPLACE_SETLOCALE
936 REPLACE_LOCALECONV
937 HAVE_DUPLOCALE
938 GNULIB_DUPLOCALE
939 GNULIB_SETLOCALE
940 GNULIB_LOCALECONV
941 LOCALCHARSET_TESTS_ENVIRONMENT
942 GLIBC21
943 HAVE_LANGINFO_YESEXPR
944 HAVE_LANGINFO_ERA
945 HAVE_LANGINFO_T_FMT_AMPM
946 HAVE_LANGINFO_CODESET
947 HAVE_LANGINFO_H
948 NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H
949 NEXT_LANGINFO_H
950 REPLACE_NL_LANGINFO
951 HAVE_NL_LANGINFO
952 GNULIB_NL_LANGINFO
953 REPLACE_TOWLOWER
954 REPLACE_ISWCNTRL
955 HAVE_WCTYPE_H
956 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H
957 NEXT_WCTYPE_H
958 HAVE_WINT_T
959 HAVE_ISWCNTRL
960 REPLACE_ISWBLANK
961 HAVE_WCTRANS_T
962 HAVE_WCTYPE_T
963 HAVE_ISWBLANK
964 GNULIB_TOWCTRANS
965 GNULIB_WCTRANS
966 GNULIB_ISWCTYPE
967 GNULIB_WCTYPE
968 GNULIB_ISWBLANK
969 ISINF_LIBM
970 ISFINITE_LIBM
971 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
972 REPLACE_TRUNCL
973 REPLACE_TRUNCF
974 REPLACE_TRUNC
975 REPLACE_SQRTL
976 REPLACE_SIGNBIT_USING_GCC
977 REPLACE_SIGNBIT
978 REPLACE_ROUNDL
979 REPLACE_ROUNDF
980 REPLACE_ROUND
981 REPLACE_REMAINDERL
982 REPLACE_REMAINDERF
983 REPLACE_REMAINDER
984 REPLACE_NAN
985 REPLACE_MODFL
986 REPLACE_MODFF
987 REPLACE_MODF
988 REPLACE_LOGBL
989 REPLACE_LOGBF
990 REPLACE_LOGB
991 REPLACE_LOG2L
992 REPLACE_LOG2F
993 REPLACE_LOG2
994 REPLACE_LOG1PL
995 REPLACE_LOG1PF
996 REPLACE_LOG1P
997 REPLACE_LOG10L
998 REPLACE_LOG10F
999 REPLACE_LOG10
1000 REPLACE_LOGL
1001 REPLACE_LOGF
1002 REPLACE_LOG
1003 REPLACE_LDEXPL
1004 REPLACE_ISNAN
1005 REPLACE_ISINF
1006 REPLACE_ISFINITE
1007 REPLACE_ILOGBF
1008 REPLACE_ILOGB
1009 REPLACE_HYPOTL
1010 REPLACE_HYPOTF
1011 REPLACE_HYPOT
1012 REPLACE_HUGE_VAL
1013 REPLACE_FREXPL
1014 REPLACE_FREXP
1015 REPLACE_FREXPF
1016 REPLACE_FMODL
1017 REPLACE_FMODF
1018 REPLACE_FMOD
1019 REPLACE_FMAL
1020 REPLACE_FMAF
1021 REPLACE_FMA
1022 REPLACE_FLOORL
1023 REPLACE_FLOORF
1024 REPLACE_FLOOR
1025 REPLACE_FABSL
1026 REPLACE_EXP2L
1027 REPLACE_EXP2
1028 REPLACE_EXPM1F
1029 REPLACE_EXPM1
1030 REPLACE_CEILL
1031 REPLACE_CEILF
1032 REPLACE_CEIL
1033 REPLACE_CBRTL
1034 REPLACE_CBRTF
1035 HAVE_DECL_TRUNCL
1036 HAVE_DECL_TRUNCF
1037 HAVE_DECL_TRUNC
1038 HAVE_DECL_TANL
1039 HAVE_DECL_SQRTL
1040 HAVE_DECL_SINL
1041 HAVE_DECL_ROUNDL
1042 HAVE_DECL_ROUNDF
1043 HAVE_DECL_ROUND
1044 HAVE_DECL_RINTF
1045 HAVE_DECL_REMAINDERL
1046 HAVE_DECL_REMAINDER
1047 HAVE_DECL_LOGB
1048 HAVE_DECL_LOG2L
1049 HAVE_DECL_LOG2F
1050 HAVE_DECL_LOG2
1051 HAVE_DECL_LOG10L
1052 HAVE_DECL_LOGL
1053 HAVE_DECL_LDEXPL
1054 HAVE_DECL_FREXPL
1055 HAVE_DECL_FLOORL
1056 HAVE_DECL_FLOORF
1057 HAVE_DECL_EXPM1L
1058 HAVE_DECL_EXP2L
1059 HAVE_DECL_EXP2F
1060 HAVE_DECL_EXP2
1061 HAVE_DECL_EXPL
1062 HAVE_DECL_COSL
1063 HAVE_DECL_COPYSIGNF
1064 HAVE_DECL_CEILL
1065 HAVE_DECL_CEILF
1066 HAVE_DECL_CBRTL
1067 HAVE_DECL_CBRTF
1068 HAVE_DECL_ATANL
1069 HAVE_DECL_ASINL
1070 HAVE_DECL_ACOSL
1071 HAVE_TANHF
1072 HAVE_TANL
1073 HAVE_TANF
1074 HAVE_SQRTL
1075 HAVE_SQRTF
1076 HAVE_SINHF
1077 HAVE_SINL
1078 HAVE_SINF
1079 HAVE_RINTL
1080 HAVE_RINT
1081 HAVE_REMAINDERF
1082 HAVE_REMAINDER
1083 HAVE_POWF
1084 HAVE_MODFL
1085 HAVE_MODFF
1086 HAVE_LOGBL
1087 HAVE_LOGBF
1088 HAVE_LOG1PL
1089 HAVE_LOG1PF
1090 HAVE_LOG1P
1091 HAVE_LOG10L
1092 HAVE_LOG10F
1093 HAVE_LOGL
1094 HAVE_LOGF
1095 HAVE_LDEXPF
1096 HAVE_ISNANL
1097 HAVE_ISNAND
1098 HAVE_ISNANF
1099 HAVE_ILOGBL
1100 HAVE_ILOGBF
1101 HAVE_ILOGB
1102 HAVE_HYPOTL
1103 HAVE_HYPOTF
1104 HAVE_FREXPF
1105 HAVE_FMODL
1106 HAVE_FMODF
1107 HAVE_FMAL
1108 HAVE_FMAF
1109 HAVE_FMA
1110 HAVE_FABSL
1111 HAVE_FABSF
1112 HAVE_EXPM1F
1113 HAVE_EXPM1
1114 HAVE_EXPL
1115 HAVE_EXPF
1116 HAVE_COSHF
1117 HAVE_COSL
1118 HAVE_COSF
1119 HAVE_COPYSIGNL
1120 HAVE_COPYSIGN
1121 HAVE_CBRTL
1122 HAVE_CBRTF
1123 HAVE_CBRT
1124 HAVE_ATAN2F
1125 HAVE_ATANL
1126 HAVE_ATANF
1127 HAVE_ASINL
1128 HAVE_ASINF
1129 HAVE_ACOSL
1130 HAVE_ACOSF
1131 GNULIB_TRUNCL
1132 GNULIB_TRUNCF
1133 GNULIB_TRUNC
1134 GNULIB_TANHF
1135 GNULIB_TANL
1136 GNULIB_TANF
1137 GNULIB_SQRTL
1138 GNULIB_SQRTF
1139 GNULIB_SINHF
1140 GNULIB_SINL
1141 GNULIB_SINF
1142 GNULIB_SIGNBIT
1143 GNULIB_ROUNDL
1144 GNULIB_ROUNDF
1145 GNULIB_ROUND
1146 GNULIB_RINTL
1147 GNULIB_RINTF
1148 GNULIB_RINT
1149 GNULIB_REMAINDERL
1150 GNULIB_REMAINDERF
1151 GNULIB_REMAINDER
1152 GNULIB_POWF
1153 GNULIB_MODFL
1154 GNULIB_MODFF
1155 GNULIB_MODF
1156 GNULIB_LOGBL
1157 GNULIB_LOGBF
1158 GNULIB_LOGB
1159 GNULIB_LOG2L
1160 GNULIB_LOG2F
1161 GNULIB_LOG2
1162 GNULIB_LOG1PL
1163 GNULIB_LOG1PF
1164 GNULIB_LOG1P
1165 GNULIB_LOG10L
1166 GNULIB_LOG10F
1167 GNULIB_LOG10
1168 GNULIB_LOGL
1169 GNULIB_LOGF
1170 GNULIB_LOG
1171 GNULIB_LDEXPL
1172 GNULIB_LDEXPF
1173 GNULIB_ISNANL
1174 GNULIB_ISNAND
1175 GNULIB_ISNANF
1176 GNULIB_ISNAN
1177 GNULIB_ISINF
1178 GNULIB_ISFINITE
1179 GNULIB_ILOGBL
1180 GNULIB_ILOGBF
1181 GNULIB_ILOGB
1182 GNULIB_HYPOTL
1183 GNULIB_HYPOTF
1184 GNULIB_HYPOT
1185 GNULIB_FREXPL
1186 GNULIB_FREXP
1187 GNULIB_FREXPF
1188 GNULIB_FMODL
1189 GNULIB_FMODF
1190 GNULIB_FMOD
1191 GNULIB_FMAL
1192 GNULIB_FMAF
1193 GNULIB_FMA
1194 GNULIB_FLOORL
1195 GNULIB_FLOORF
1196 GNULIB_FLOOR
1197 GNULIB_FABSL
1198 GNULIB_FABSF
1199 GNULIB_EXPM1L
1200 GNULIB_EXPM1F
1201 GNULIB_EXPM1
1202 GNULIB_EXP2L
1203 GNULIB_EXP2F
1204 GNULIB_EXP2
1205 GNULIB_EXPL
1206 GNULIB_EXPF
1207 GNULIB_COSHF
1208 GNULIB_COSL
1209 GNULIB_COSF
1210 GNULIB_COPYSIGNL
1211 GNULIB_COPYSIGNF
1212 GNULIB_COPYSIGN
1213 GNULIB_CEILL
1214 GNULIB_CEILF
1215 GNULIB_CEIL
1216 GNULIB_CBRTL
1217 GNULIB_CBRTF
1218 GNULIB_CBRT
1219 GNULIB_ATAN2F
1220 GNULIB_ATANL
1221 GNULIB_ATANF
1222 GNULIB_ASINL
1223 GNULIB_ASINF
1224 GNULIB_ACOSL
1225 GNULIB_ACOSF
1226 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
1227 NEXT_INTTYPES_H
1228 UINT64_MAX_EQ_ULONG_MAX
1229 UINT32_MAX_LT_UINTMAX_MAX
1230 PRIPTR_PREFIX
1231 PRI_MACROS_BROKEN
1232 INT64_MAX_EQ_LONG_MAX
1233 INT32_MAX_LT_INTMAX_MAX
1234 REPLACE_STRTOUMAX
1235 REPLACE_STRTOIMAX
1236 HAVE_DECL_STRTOUMAX
1237 HAVE_DECL_STRTOIMAX
1238 HAVE_DECL_IMAXDIV
1239 HAVE_DECL_IMAXABS
1240 GNULIB_STRTOUMAX
1241 GNULIB_STRTOIMAX
1242 GNULIB_IMAXDIV
1243 GNULIB_IMAXABS
1244 GL_GENERATE_STDINT_H_FALSE
1245 GL_GENERATE_STDINT_H_TRUE
1246 STDINT_H
1247 WINT_T_SUFFIX
1248 WCHAR_T_SUFFIX
1249 SIG_ATOMIC_T_SUFFIX
1250 SIZE_T_SUFFIX
1251 PTRDIFF_T_SUFFIX
1252 HAVE_SIGNED_WINT_T
1253 HAVE_SIGNED_WCHAR_T
1254 HAVE_SIGNED_SIG_ATOMIC_T
1255 BITSIZEOF_WINT_T
1256 BITSIZEOF_WCHAR_T
1257 BITSIZEOF_SIG_ATOMIC_T
1258 BITSIZEOF_SIZE_T
1259 BITSIZEOF_PTRDIFF_T
1260 APPLE_UNIVERSAL_BUILD
1261 HAVE_SYS_BITYPES_H
1262 HAVE_SYS_INTTYPES_H
1263 HAVE_STDINT_H
1264 NEXT_AS_FIRST_DIRECTIVE_STDINT_H
1265 NEXT_STDINT_H
1266 HAVE_SYS_TYPES_H
1267 HAVE_INTTYPES_H
1268 HAVE_WCHAR_H
1269 HAVE_UNSIGNED_LONG_LONG_INT
1270 HAVE_LONG_LONG_INT
1271 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
1272 NEXT_SYS_TIME_H
1273 REPLACE_STRUCT_TIMEVAL
1274 REPLACE_GETTIMEOFDAY
1275 HAVE_SYS_TIME_H
1276 HAVE_STRUCT_TIMEVAL
1277 HAVE_GETTIMEOFDAY
1278 GNULIB_GETTIMEOFDAY
1279 LTLIBINTL
1280 LIBINTL
1281 GNULIB_GL_UNISTD_H_GETOPT
1282 GETOPT_H
1283 HAVE_GETOPT_H
1284 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H
1285 NEXT_GETOPT_H
1286 GETHOSTNAME_LIB
1287 WINDOWS_64_BIT_ST_SIZE
1288 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
1289 NEXT_SYS_STAT_H
1290 REPLACE_UTIMENSAT
1291 REPLACE_STAT
1292 REPLACE_MKNOD
1293 REPLACE_MKFIFO
1294 REPLACE_MKDIR
1295 REPLACE_LSTAT
1296 REPLACE_FUTIMENS
1297 REPLACE_FSTATAT
1298 REPLACE_FSTAT
1299 HAVE_UTIMENSAT
1300 HAVE_MKNODAT
1301 HAVE_MKNOD
1302 HAVE_MKFIFOAT
1303 HAVE_MKFIFO
1304 HAVE_MKDIRAT
1305 HAVE_LSTAT
1306 HAVE_LCHMOD
1307 HAVE_FUTIMENS
1308 HAVE_FSTATAT
1309 HAVE_FCHMODAT
1310 GNULIB_UTIMENSAT
1311 GNULIB_STAT
1312 GNULIB_MKNODAT
1313 GNULIB_MKNOD
1314 GNULIB_MKFIFOAT
1315 GNULIB_MKFIFO
1316 GNULIB_MKDIRAT
1317 GNULIB_LSTAT
1318 GNULIB_LCHMOD
1319 GNULIB_FUTIMENS
1320 GNULIB_FSTATAT
1321 GNULIB_FSTAT
1322 GNULIB_FCHMODAT
1323 WINDOWS_64_BIT_OFF_T
1324 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H
1325 NEXT_SYS_TYPES_H
1326 GL_GENERATE_FNMATCH_H_FALSE
1327 GL_GENERATE_FNMATCH_H_TRUE
1328 FNMATCH_H
1329 REPLACE_ITOLD
1330 GL_GENERATE_FLOAT_H_FALSE
1331 GL_GENERATE_FLOAT_H_TRUE
1332 FLOAT_H
1333 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H
1334 NEXT_FLOAT_H
1335 REPLACE_VSPRINTF
1336 REPLACE_VSNPRINTF
1337 REPLACE_VPRINTF
1338 REPLACE_VFPRINTF
1339 REPLACE_VDPRINTF
1340 REPLACE_VASPRINTF
1341 REPLACE_TMPFILE
1342 REPLACE_STDIO_WRITE_FUNCS
1343 REPLACE_STDIO_READ_FUNCS
1344 REPLACE_SPRINTF
1345 REPLACE_SNPRINTF
1346 REPLACE_RENAMEAT
1347 REPLACE_RENAME
1348 REPLACE_REMOVE
1349 REPLACE_PRINTF
1350 REPLACE_POPEN
1351 REPLACE_PERROR
1352 REPLACE_OBSTACK_PRINTF
1353 REPLACE_GETLINE
1354 REPLACE_GETDELIM
1355 REPLACE_FTELLO
1356 REPLACE_FTELL
1357 REPLACE_FSEEKO
1358 REPLACE_FSEEK
1359 REPLACE_FREOPEN
1360 REPLACE_FPURGE
1361 REPLACE_FPRINTF
1362 REPLACE_FOPEN
1363 REPLACE_FFLUSH
1364 REPLACE_FDOPEN
1365 REPLACE_FCLOSE
1366 REPLACE_DPRINTF
1367 HAVE_VDPRINTF
1368 HAVE_VASPRINTF
1369 HAVE_RENAMEAT
1370 HAVE_POPEN
1371 HAVE_PCLOSE
1372 HAVE_FTELLO
1373 HAVE_FSEEKO
1374 HAVE_DPRINTF
1375 HAVE_DECL_VSNPRINTF
1376 HAVE_DECL_SNPRINTF
1377 HAVE_DECL_OBSTACK_PRINTF
1378 HAVE_DECL_GETLINE
1379 HAVE_DECL_GETDELIM
1380 HAVE_DECL_FTELLO
1381 HAVE_DECL_FSEEKO
1382 HAVE_DECL_FPURGE
1383 GNULIB_VSPRINTF_POSIX
1384 GNULIB_VSNPRINTF
1385 GNULIB_VPRINTF_POSIX
1386 GNULIB_VPRINTF
1387 GNULIB_VFPRINTF_POSIX
1388 GNULIB_VFPRINTF
1389 GNULIB_VDPRINTF
1390 GNULIB_VSCANF
1391 GNULIB_VFSCANF
1392 GNULIB_VASPRINTF
1393 GNULIB_TMPFILE
1394 GNULIB_STDIO_H_SIGPIPE
1395 GNULIB_STDIO_H_NONBLOCKING
1396 GNULIB_SPRINTF_POSIX
1397 GNULIB_SNPRINTF
1398 GNULIB_SCANF
1399 GNULIB_RENAMEAT
1400 GNULIB_RENAME
1401 GNULIB_REMOVE
1402 GNULIB_PUTS
1403 GNULIB_PUTCHAR
1404 GNULIB_PUTC
1405 GNULIB_PRINTF_POSIX
1406 GNULIB_PRINTF
1407 GNULIB_POPEN
1408 GNULIB_PERROR
1409 GNULIB_PCLOSE
1410 GNULIB_OBSTACK_PRINTF_POSIX
1411 GNULIB_OBSTACK_PRINTF
1412 GNULIB_GETLINE
1413 GNULIB_GETDELIM
1414 GNULIB_GETCHAR
1415 GNULIB_GETC
1416 GNULIB_FWRITE
1417 GNULIB_FTELLO
1418 GNULIB_FTELL
1419 GNULIB_FSEEKO
1420 GNULIB_FSEEK
1421 GNULIB_FSCANF
1422 GNULIB_FREOPEN
1423 GNULIB_FREAD
1424 GNULIB_FPUTS
1425 GNULIB_FPUTC
1426 GNULIB_FPURGE
1427 GNULIB_FPRINTF_POSIX
1428 GNULIB_FPRINTF
1429 GNULIB_FOPEN
1430 GNULIB_FGETS
1431 GNULIB_FGETC
1432 GNULIB_FFLUSH
1433 GNULIB_FDOPEN
1434 GNULIB_FCLOSE
1435 GNULIB_DPRINTF
1436 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
1437 NEXT_FCNTL_H
1438 REPLACE_OPENAT
1439 REPLACE_OPEN
1440 REPLACE_FCNTL
1441 HAVE_OPENAT
1442 HAVE_FCNTL
1443 GNULIB_OPENAT
1444 GNULIB_OPEN
1445 GNULIB_NONBLOCKING
1446 GNULIB_FCNTL
1447 LIB_EACCESS
1448 EOVERFLOW_VALUE
1449 EOVERFLOW_HIDDEN
1450 ENOLINK_VALUE
1451 ENOLINK_HIDDEN
1452 EMULTIHOP_VALUE
1453 EMULTIHOP_HIDDEN
1454 GL_GENERATE_ERRNO_H_FALSE
1455 GL_GENERATE_ERRNO_H_TRUE
1456 ERRNO_H
1457 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
1458 NEXT_ERRNO_H
1459 HAVE_DIRENT_H
1460 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H
1461 NEXT_DIRENT_H
1462 NEXT_AS_FIRST_DIRECTIVE_CTYPE_H
1463 NEXT_CTYPE_H
1464 PRAGMA_COLUMNS
1465 PRAGMA_SYSTEM_HEADER
1466 INCLUDE_NEXT_AS_FIRST_DIRECTIVE
1467 INCLUDE_NEXT
1468 HAVE_ISBLANK
1469 GNULIB_ISBLANK
1470 pkglibexecdir
1471 runstatedir
1472 lispdir
1473 REPLACE_FDOPENDIR
1474 REPLACE_DIRFD
1475 REPLACE_CLOSEDIR
1476 REPLACE_OPENDIR
1477 HAVE_ALPHASORT
1478 HAVE_SCANDIR
1479 HAVE_FDOPENDIR
1480 HAVE_DECL_FDOPENDIR
1481 HAVE_DECL_DIRFD
1482 HAVE_CLOSEDIR
1483 HAVE_REWINDDIR
1484 HAVE_READDIR
1485 HAVE_OPENDIR
1486 GNULIB_ALPHASORT
1487 GNULIB_SCANDIR
1488 GNULIB_FDOPENDIR
1489 GNULIB_DIRFD
1490 GNULIB_CLOSEDIR
1491 GNULIB_REWINDDIR
1492 GNULIB_READDIR
1493 GNULIB_OPENDIR
1494 HAVE_WINSOCK2_H
1495 REPLACE_IOCTL
1496 SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1497 SYS_IOCTL_H_HAVE_WINSOCK2_H
1498 GNULIB_IOCTL
1499 HAVE_MSVC_INVALID_PARAMETER_HANDLER
1500 LIB_CLOCK_GETTIME
1501 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1502 UNISTD_H_HAVE_WINSOCK2_H
1503 REPLACE_WRITE
1504 REPLACE_USLEEP
1505 REPLACE_UNLINKAT
1506 REPLACE_UNLINK
1507 REPLACE_TTYNAME_R
1508 REPLACE_SYMLINK
1509 REPLACE_SLEEP
1510 REPLACE_RMDIR
1511 REPLACE_READLINK
1512 REPLACE_READ
1513 REPLACE_PWRITE
1514 REPLACE_PREAD
1515 REPLACE_LSEEK
1516 REPLACE_LINKAT
1517 REPLACE_LINK
1518 REPLACE_LCHOWN
1519 REPLACE_ISATTY
1520 REPLACE_GETPAGESIZE
1521 REPLACE_GETGROUPS
1522 REPLACE_GETLOGIN_R
1523 REPLACE_GETDTABLESIZE
1524 REPLACE_GETDOMAINNAME
1525 REPLACE_GETCWD
1526 REPLACE_FTRUNCATE
1527 REPLACE_FCHOWNAT
1528 REPLACE_DUP2
1529 REPLACE_DUP
1530 REPLACE_CLOSE
1531 REPLACE_CHOWN
1532 HAVE_SYS_PARAM_H
1533 HAVE_OS_H
1534 HAVE_DECL_TTYNAME_R
1535 HAVE_DECL_SETHOSTNAME
1536 HAVE_DECL_GETUSERSHELL
1537 HAVE_DECL_GETPAGESIZE
1538 HAVE_DECL_GETLOGIN_R
1539 HAVE_DECL_GETDOMAINNAME
1540 HAVE_DECL_FDATASYNC
1541 HAVE_DECL_FCHDIR
1542 HAVE_DECL_ENVIRON
1543 HAVE_USLEEP
1544 HAVE_UNLINKAT
1545 HAVE_SYMLINKAT
1546 HAVE_SYMLINK
1547 HAVE_SLEEP
1548 HAVE_SETHOSTNAME
1549 HAVE_READLINKAT
1550 HAVE_READLINK
1551 HAVE_PWRITE
1552 HAVE_PREAD
1553 HAVE_PIPE2
1554 HAVE_PIPE
1555 HAVE_LINKAT
1556 HAVE_LINK
1557 HAVE_LCHOWN
1558 HAVE_GROUP_MEMBER
1559 HAVE_GETPAGESIZE
1560 HAVE_GETLOGIN
1561 HAVE_GETHOSTNAME
1562 HAVE_GETGROUPS
1563 HAVE_GETDTABLESIZE
1564 HAVE_FTRUNCATE
1565 HAVE_FSYNC
1566 HAVE_FDATASYNC
1567 HAVE_FCHOWNAT
1568 HAVE_FCHDIR
1569 HAVE_FACCESSAT
1570 HAVE_EUIDACCESS
1571 HAVE_DUP3
1572 HAVE_DUP2
1573 HAVE_CHOWN
1574 GNULIB_WRITE
1575 GNULIB_USLEEP
1576 GNULIB_UNLINKAT
1577 GNULIB_UNLINK
1578 GNULIB_UNISTD_H_SIGPIPE
1579 GNULIB_UNISTD_H_NONBLOCKING
1580 GNULIB_TTYNAME_R
1581 GNULIB_SYMLINKAT
1582 GNULIB_SYMLINK
1583 GNULIB_SLEEP
1584 GNULIB_SETHOSTNAME
1585 GNULIB_RMDIR
1586 GNULIB_READLINKAT
1587 GNULIB_READLINK
1588 GNULIB_READ
1589 GNULIB_PWRITE
1590 GNULIB_PREAD
1591 GNULIB_PIPE2
1592 GNULIB_PIPE
1593 GNULIB_LSEEK
1594 GNULIB_LINKAT
1595 GNULIB_LINK
1596 GNULIB_LCHOWN
1597 GNULIB_ISATTY
1598 GNULIB_GROUP_MEMBER
1599 GNULIB_GETUSERSHELL
1600 GNULIB_GETPAGESIZE
1601 GNULIB_GETLOGIN_R
1602 GNULIB_GETLOGIN
1603 GNULIB_GETHOSTNAME
1604 GNULIB_GETGROUPS
1605 GNULIB_GETDTABLESIZE
1606 GNULIB_GETDOMAINNAME
1607 GNULIB_GETCWD
1608 GNULIB_FTRUNCATE
1609 GNULIB_FSYNC
1610 GNULIB_FDATASYNC
1611 GNULIB_FCHOWNAT
1612 GNULIB_FCHDIR
1613 GNULIB_FACCESSAT
1614 GNULIB_EUIDACCESS
1615 GNULIB_ENVIRON
1616 GNULIB_DUP3
1617 GNULIB_DUP2
1618 GNULIB_DUP
1619 GNULIB_CLOSE
1620 GNULIB_CHOWN
1621 GNULIB_CHDIR
1622 REPLACE_WCTOMB
1623 REPLACE_UNSETENV
1624 REPLACE_STRTOD
1625 REPLACE_SETENV
1626 REPLACE_REALPATH
1627 REPLACE_REALLOC
1628 REPLACE_RANDOM_R
1629 REPLACE_PUTENV
1630 REPLACE_PTSNAME_R
1631 REPLACE_PTSNAME
1632 REPLACE_MKSTEMP
1633 REPLACE_MBTOWC
1634 REPLACE_MALLOC
1635 REPLACE_CANONICALIZE_FILE_NAME
1636 REPLACE_CALLOC
1637 HAVE_DECL_UNSETENV
1638 HAVE_UNLOCKPT
1639 HAVE_SYS_LOADAVG_H
1640 HAVE_STRUCT_RANDOM_DATA
1641 HAVE_STRTOULL
1642 HAVE_STRTOLL
1643 HAVE_STRTOD
1644 HAVE_DECL_SETENV
1645 HAVE_SETENV
1646 HAVE_SECURE_GETENV
1647 HAVE_RPMATCH
1648 HAVE_REALPATH
1649 HAVE_RANDOM_R
1650 HAVE_RANDOM_H
1651 HAVE_RANDOM
1652 HAVE_PTSNAME_R
1653 HAVE_PTSNAME
1654 HAVE_POSIX_OPENPT
1655 HAVE_MKSTEMPS
1656 HAVE_MKSTEMP
1657 HAVE_MKOSTEMPS
1658 HAVE_MKOSTEMP
1659 HAVE_MKDTEMP
1660 HAVE_GRANTPT
1661 HAVE_GETSUBOPT
1662 HAVE_DECL_GETLOADAVG
1663 HAVE_CANONICALIZE_FILE_NAME
1664 HAVE_ATOLL
1665 HAVE__EXIT
1666 GNULIB_WCTOMB
1667 GNULIB_UNSETENV
1668 GNULIB_UNLOCKPT
1669 GNULIB_SYSTEM_POSIX
1670 GNULIB_STRTOULL
1671 GNULIB_STRTOLL
1672 GNULIB_STRTOD
1673 GNULIB_SETENV
1674 GNULIB_SECURE_GETENV
1675 GNULIB_RPMATCH
1676 GNULIB_REALPATH
1677 GNULIB_REALLOC_POSIX
1678 GNULIB_RANDOM_R
1679 GNULIB_RANDOM
1680 GNULIB_PUTENV
1681 GNULIB_PTSNAME_R
1682 GNULIB_PTSNAME
1683 GNULIB_POSIX_OPENPT
1684 GNULIB_MKSTEMPS
1685 GNULIB_MKSTEMP
1686 GNULIB_MKOSTEMPS
1687 GNULIB_MKOSTEMP
1688 GNULIB_MKDTEMP
1689 GNULIB_MBTOWC
1690 GNULIB_MALLOC_POSIX
1691 GNULIB_GRANTPT
1692 GNULIB_GETSUBOPT
1693 GNULIB_GETLOADAVG
1694 GNULIB_CANONICALIZE_FILE_NAME
1695 GNULIB_CALLOC_POSIX
1696 GNULIB_ATOLL
1697 GNULIB__EXIT
1698 GL_GENERATE_BYTESWAP_H_FALSE
1699 GL_GENERATE_BYTESWAP_H_TRUE
1700 BYTESWAP_H
1701 LOCALE_FR
1702 REPLACE_WCSWIDTH
1703 REPLACE_WCWIDTH
1704 REPLACE_WCSNRTOMBS
1705 REPLACE_WCSRTOMBS
1706 REPLACE_WCRTOMB
1707 REPLACE_MBSNRTOWCS
1708 REPLACE_MBSRTOWCS
1709 REPLACE_MBRLEN
1710 REPLACE_MBRTOWC
1711 REPLACE_MBSINIT
1712 REPLACE_WCTOB
1713 REPLACE_BTOWC
1714 REPLACE_MBSTATE_T
1715 HAVE_DECL_WCWIDTH
1716 HAVE_DECL_WCTOB
1717 HAVE_WCSWIDTH
1718 HAVE_WCSTOK
1719 HAVE_WCSSTR
1720 HAVE_WCSPBRK
1721 HAVE_WCSSPN
1722 HAVE_WCSCSPN
1723 HAVE_WCSRCHR
1724 HAVE_WCSCHR
1725 HAVE_WCSDUP
1726 HAVE_WCSXFRM
1727 HAVE_WCSCOLL
1728 HAVE_WCSNCASECMP
1729 HAVE_WCSCASECMP
1730 HAVE_WCSNCMP
1731 HAVE_WCSCMP
1732 HAVE_WCSNCAT
1733 HAVE_WCSCAT
1734 HAVE_WCPNCPY
1735 HAVE_WCSNCPY
1736 HAVE_WCPCPY
1737 HAVE_WCSCPY
1738 HAVE_WCSNLEN
1739 HAVE_WCSLEN
1740 HAVE_WMEMSET
1741 HAVE_WMEMMOVE
1742 HAVE_WMEMCPY
1743 HAVE_WMEMCMP
1744 HAVE_WMEMCHR
1745 HAVE_WCSNRTOMBS
1746 HAVE_WCSRTOMBS
1747 HAVE_WCRTOMB
1748 HAVE_MBSNRTOWCS
1749 HAVE_MBSRTOWCS
1750 HAVE_MBRLEN
1751 HAVE_MBRTOWC
1752 HAVE_MBSINIT
1753 HAVE_BTOWC
1754 GNULIB_WCSWIDTH
1755 GNULIB_WCSTOK
1756 GNULIB_WCSSTR
1757 GNULIB_WCSPBRK
1758 GNULIB_WCSSPN
1759 GNULIB_WCSCSPN
1760 GNULIB_WCSRCHR
1761 GNULIB_WCSCHR
1762 GNULIB_WCSDUP
1763 GNULIB_WCSXFRM
1764 GNULIB_WCSCOLL
1765 GNULIB_WCSNCASECMP
1766 GNULIB_WCSCASECMP
1767 GNULIB_WCSNCMP
1768 GNULIB_WCSCMP
1769 GNULIB_WCSNCAT
1770 GNULIB_WCSCAT
1771 GNULIB_WCPNCPY
1772 GNULIB_WCSNCPY
1773 GNULIB_WCPCPY
1774 GNULIB_WCSCPY
1775 GNULIB_WCSNLEN
1776 GNULIB_WCSLEN
1777 GNULIB_WMEMSET
1778 GNULIB_WMEMMOVE
1779 GNULIB_WMEMCPY
1780 GNULIB_WMEMCMP
1781 GNULIB_WMEMCHR
1782 GNULIB_WCWIDTH
1783 GNULIB_WCSNRTOMBS
1784 GNULIB_WCSRTOMBS
1785 GNULIB_WCRTOMB
1786 GNULIB_MBSNRTOWCS
1787 GNULIB_MBSRTOWCS
1788 GNULIB_MBRLEN
1789 GNULIB_MBRTOWC
1790 GNULIB_MBSINIT
1791 GNULIB_WCTOB
1792 GNULIB_BTOWC
1793 GL_GENERATE_ALLOCA_H_FALSE
1794 GL_GENERATE_ALLOCA_H_TRUE
1795 ALLOCA_H
1796 ALLOCA
1797 GL_COND_LIBTOOL_FALSE
1798 GL_COND_LIBTOOL_TRUE
1799 ac_ct_RANLIB
1800 ac_ct_AR
1801 RANLIB
1802 ARFLAGS
1803 AR
1804 EGREP
1805 GREP
1806 CPP
1807 am__fastdepCC_FALSE
1808 am__fastdepCC_TRUE
1809 CCDEPMODE
1810 am__nodep
1811 AMDEPBACKSLASH
1812 AMDEP_FALSE
1813 AMDEP_TRUE
1814 am__quote
1815 am__include
1816 DEPDIR
1817 OBJEXT
1818 EXEEXT
1819 ac_ct_CC
1820 CPPFLAGS
1821 LDFLAGS
1822 CFLAGS
1823 CC
1824 DEFAULT_ARG_SIZE
1825 WITH_FTS_FALSE
1826 WITH_FTS_TRUE
1827 AUXDIR
1828 host_os
1829 host_vendor
1830 host_cpu
1831 host
1832 build_os
1833 build_vendor
1834 build_cpu
1835 build
1836 am__untar
1837 am__tar
1838 AMTAR
1839 am__leading_dot
1840 SET_MAKE
1841 AWK
1842 mkdir_p
1843 MKDIR_P
1844 INSTALL_STRIP_PROGRAM
1845 STRIP
1846 install_sh
1847 MAKEINFO
1848 AUTOHEADER
1849 AUTOMAKE
1850 AUTOCONF
1851 ACLOCAL
1852 VERSION
1853 PACKAGE
1854 CYGPATH_W
1855 am__isrc
1856 INSTALL_DATA
1857 INSTALL_SCRIPT
1858 INSTALL_PROGRAM
1859 target_alias
1860 host_alias
1861 build_alias
1862 LIBS
1863 ECHO_T
1864 ECHO_N
1865 ECHO_C
1866 DEFS
1867 mandir
1868 localedir
1869 libdir
1870 psdir
1871 pdfdir
1872 dvidir
1873 htmldir
1874 infodir
1875 docdir
1876 oldincludedir
1877 includedir
1878 localstatedir
1879 sharedstatedir
1880 sysconfdir
1881 datadir
1882 datarootdir
1883 libexecdir
1884 sbindir
1885 bindir
1886 program_transform_name
1887 prefix
1888 exec_prefix
1889 PACKAGE_URL
1890 PACKAGE_BUGREPORT
1891 PACKAGE_STRING
1892 PACKAGE_VERSION
1893 PACKAGE_TARNAME
1894 PACKAGE_NAME
1895 PATH_SEPARATOR
1896 SHELL'
1897 ac_subst_files=''
1898 ac_user_opts='
1899 enable_option_checking
1900 with_fts
1901 enable_id_cache
1902 enable_debug
1903 enable_leaf_optimisation
1904 enable_d_type_optimization
1905 enable_d_type_optimisation
1906 enable_dependency_tracking
1907 enable_largefile
1908 enable_threads
1909 enable_assert
1910 with_gnu_ld
1911 enable_rpath
1912 with_libpth_prefix
1913 with_included_regex
1914 with_selinux
1915 with_packager
1916 with_packager_version
1917 with_packager_bug_reports
1918 enable_compiler_warnings
1919 enable_nls
1920 with_libiconv_prefix
1921 with_libintl_prefix
1922 '
1923       ac_precious_vars='build_alias
1924 host_alias
1925 target_alias
1926 DEFAULT_ARG_SIZE
1927 CC
1928 CFLAGS
1929 LDFLAGS
1930 LIBS
1931 CPPFLAGS
1932 CPP
1933 YACC
1934 YFLAGS
1935 PYTHON'
1936
1937
1938 # Initialize some variables set by options.
1939 ac_init_help=
1940 ac_init_version=false
1941 ac_unrecognized_opts=
1942 ac_unrecognized_sep=
1943 # The variables have the same names as the options, with
1944 # dashes changed to underlines.
1945 cache_file=/dev/null
1946 exec_prefix=NONE
1947 no_create=
1948 no_recursion=
1949 prefix=NONE
1950 program_prefix=NONE
1951 program_suffix=NONE
1952 program_transform_name=s,x,x,
1953 silent=
1954 site=
1955 srcdir=
1956 verbose=
1957 x_includes=NONE
1958 x_libraries=NONE
1959
1960 # Installation directory options.
1961 # These are left unexpanded so users can "make install exec_prefix=/foo"
1962 # and all the variables that are supposed to be based on exec_prefix
1963 # by default will actually change.
1964 # Use braces instead of parens because sh, perl, etc. also accept them.
1965 # (The list follows the same order as the GNU Coding Standards.)
1966 bindir='${exec_prefix}/bin'
1967 sbindir='${exec_prefix}/sbin'
1968 libexecdir='${exec_prefix}/libexec'
1969 datarootdir='${prefix}/share'
1970 datadir='${datarootdir}'
1971 sysconfdir='${prefix}/etc'
1972 sharedstatedir='${prefix}/com'
1973 localstatedir='${prefix}/var'
1974 includedir='${prefix}/include'
1975 oldincludedir='/usr/include'
1976 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1977 infodir='${datarootdir}/info'
1978 htmldir='${docdir}'
1979 dvidir='${docdir}'
1980 pdfdir='${docdir}'
1981 psdir='${docdir}'
1982 libdir='${exec_prefix}/lib'
1983 localedir='${datarootdir}/locale'
1984 mandir='${datarootdir}/man'
1985
1986 ac_prev=
1987 ac_dashdash=
1988 for ac_option
1989 do
1990   # If the previous option needs an argument, assign it.
1991   if test -n "$ac_prev"; then
1992     eval $ac_prev=\$ac_option
1993     ac_prev=
1994     continue
1995   fi
1996
1997   case $ac_option in
1998   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1999   *=)   ac_optarg= ;;
2000   *)    ac_optarg=yes ;;
2001   esac
2002
2003   # Accept the important Cygnus configure options, so we can diagnose typos.
2004
2005   case $ac_dashdash$ac_option in
2006   --)
2007     ac_dashdash=yes ;;
2008
2009   -bindir | --bindir | --bindi | --bind | --bin | --bi)
2010     ac_prev=bindir ;;
2011   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
2012     bindir=$ac_optarg ;;
2013
2014   -build | --build | --buil | --bui | --bu)
2015     ac_prev=build_alias ;;
2016   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
2017     build_alias=$ac_optarg ;;
2018
2019   -cache-file | --cache-file | --cache-fil | --cache-fi \
2020   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
2021     ac_prev=cache_file ;;
2022   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
2023   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
2024     cache_file=$ac_optarg ;;
2025
2026   --config-cache | -C)
2027     cache_file=config.cache ;;
2028
2029   -datadir | --datadir | --datadi | --datad)
2030     ac_prev=datadir ;;
2031   -datadir=* | --datadir=* | --datadi=* | --datad=*)
2032     datadir=$ac_optarg ;;
2033
2034   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
2035   | --dataroo | --dataro | --datar)
2036     ac_prev=datarootdir ;;
2037   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
2038   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
2039     datarootdir=$ac_optarg ;;
2040
2041   -disable-* | --disable-*)
2042     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
2043     # Reject names that are not valid shell variable names.
2044     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2045       as_fn_error $? "invalid feature name: $ac_useropt"
2046     ac_useropt_orig=$ac_useropt
2047     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2048     case $ac_user_opts in
2049       *"
2050 "enable_$ac_useropt"
2051 "*) ;;
2052       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
2053          ac_unrecognized_sep=', ';;
2054     esac
2055     eval enable_$ac_useropt=no ;;
2056
2057   -docdir | --docdir | --docdi | --doc | --do)
2058     ac_prev=docdir ;;
2059   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
2060     docdir=$ac_optarg ;;
2061
2062   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
2063     ac_prev=dvidir ;;
2064   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
2065     dvidir=$ac_optarg ;;
2066
2067   -enable-* | --enable-*)
2068     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
2069     # Reject names that are not valid shell variable names.
2070     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2071       as_fn_error $? "invalid feature name: $ac_useropt"
2072     ac_useropt_orig=$ac_useropt
2073     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2074     case $ac_user_opts in
2075       *"
2076 "enable_$ac_useropt"
2077 "*) ;;
2078       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
2079          ac_unrecognized_sep=', ';;
2080     esac
2081     eval enable_$ac_useropt=\$ac_optarg ;;
2082
2083   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
2084   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
2085   | --exec | --exe | --ex)
2086     ac_prev=exec_prefix ;;
2087   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
2088   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
2089   | --exec=* | --exe=* | --ex=*)
2090     exec_prefix=$ac_optarg ;;
2091
2092   -gas | --gas | --ga | --g)
2093     # Obsolete; use --with-gas.
2094     with_gas=yes ;;
2095
2096   -help | --help | --hel | --he | -h)
2097     ac_init_help=long ;;
2098   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
2099     ac_init_help=recursive ;;
2100   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
2101     ac_init_help=short ;;
2102
2103   -host | --host | --hos | --ho)
2104     ac_prev=host_alias ;;
2105   -host=* | --host=* | --hos=* | --ho=*)
2106     host_alias=$ac_optarg ;;
2107
2108   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
2109     ac_prev=htmldir ;;
2110   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
2111   | --ht=*)
2112     htmldir=$ac_optarg ;;
2113
2114   -includedir | --includedir | --includedi | --included | --include \
2115   | --includ | --inclu | --incl | --inc)
2116     ac_prev=includedir ;;
2117   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
2118   | --includ=* | --inclu=* | --incl=* | --inc=*)
2119     includedir=$ac_optarg ;;
2120
2121   -infodir | --infodir | --infodi | --infod | --info | --inf)
2122     ac_prev=infodir ;;
2123   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
2124     infodir=$ac_optarg ;;
2125
2126   -libdir | --libdir | --libdi | --libd)
2127     ac_prev=libdir ;;
2128   -libdir=* | --libdir=* | --libdi=* | --libd=*)
2129     libdir=$ac_optarg ;;
2130
2131   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
2132   | --libexe | --libex | --libe)
2133     ac_prev=libexecdir ;;
2134   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
2135   | --libexe=* | --libex=* | --libe=*)
2136     libexecdir=$ac_optarg ;;
2137
2138   -localedir | --localedir | --localedi | --localed | --locale)
2139     ac_prev=localedir ;;
2140   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
2141     localedir=$ac_optarg ;;
2142
2143   -localstatedir | --localstatedir | --localstatedi | --localstated \
2144   | --localstate | --localstat | --localsta | --localst | --locals)
2145     ac_prev=localstatedir ;;
2146   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
2147   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
2148     localstatedir=$ac_optarg ;;
2149
2150   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
2151     ac_prev=mandir ;;
2152   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
2153     mandir=$ac_optarg ;;
2154
2155   -nfp | --nfp | --nf)
2156     # Obsolete; use --without-fp.
2157     with_fp=no ;;
2158
2159   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
2160   | --no-cr | --no-c | -n)
2161     no_create=yes ;;
2162
2163   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
2164   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
2165     no_recursion=yes ;;
2166
2167   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
2168   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
2169   | --oldin | --oldi | --old | --ol | --o)
2170     ac_prev=oldincludedir ;;
2171   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
2172   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
2173   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
2174     oldincludedir=$ac_optarg ;;
2175
2176   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
2177     ac_prev=prefix ;;
2178   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
2179     prefix=$ac_optarg ;;
2180
2181   -program-prefix | --program-prefix | --program-prefi | --program-pref \
2182   | --program-pre | --program-pr | --program-p)
2183     ac_prev=program_prefix ;;
2184   -program-prefix=* | --program-prefix=* | --program-prefi=* \
2185   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
2186     program_prefix=$ac_optarg ;;
2187
2188   -program-suffix | --program-suffix | --program-suffi | --program-suff \
2189   | --program-suf | --program-su | --program-s)
2190     ac_prev=program_suffix ;;
2191   -program-suffix=* | --program-suffix=* | --program-suffi=* \
2192   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
2193     program_suffix=$ac_optarg ;;
2194
2195   -program-transform-name | --program-transform-name \
2196   | --program-transform-nam | --program-transform-na \
2197   | --program-transform-n | --program-transform- \
2198   | --program-transform | --program-transfor \
2199   | --program-transfo | --program-transf \
2200   | --program-trans | --program-tran \
2201   | --progr-tra | --program-tr | --program-t)
2202     ac_prev=program_transform_name ;;
2203   -program-transform-name=* | --program-transform-name=* \
2204   | --program-transform-nam=* | --program-transform-na=* \
2205   | --program-transform-n=* | --program-transform-=* \
2206   | --program-transform=* | --program-transfor=* \
2207   | --program-transfo=* | --program-transf=* \
2208   | --program-trans=* | --program-tran=* \
2209   | --progr-tra=* | --program-tr=* | --program-t=*)
2210     program_transform_name=$ac_optarg ;;
2211
2212   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
2213     ac_prev=pdfdir ;;
2214   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
2215     pdfdir=$ac_optarg ;;
2216
2217   -psdir | --psdir | --psdi | --psd | --ps)
2218     ac_prev=psdir ;;
2219   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
2220     psdir=$ac_optarg ;;
2221
2222   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2223   | -silent | --silent | --silen | --sile | --sil)
2224     silent=yes ;;
2225
2226   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
2227     ac_prev=sbindir ;;
2228   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
2229   | --sbi=* | --sb=*)
2230     sbindir=$ac_optarg ;;
2231
2232   -sharedstatedir | --sharedstatedir | --sharedstatedi \
2233   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
2234   | --sharedst | --shareds | --shared | --share | --shar \
2235   | --sha | --sh)
2236     ac_prev=sharedstatedir ;;
2237   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
2238   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
2239   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
2240   | --sha=* | --sh=*)
2241     sharedstatedir=$ac_optarg ;;
2242
2243   -site | --site | --sit)
2244     ac_prev=site ;;
2245   -site=* | --site=* | --sit=*)
2246     site=$ac_optarg ;;
2247
2248   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
2249     ac_prev=srcdir ;;
2250   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
2251     srcdir=$ac_optarg ;;
2252
2253   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
2254   | --syscon | --sysco | --sysc | --sys | --sy)
2255     ac_prev=sysconfdir ;;
2256   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
2257   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
2258     sysconfdir=$ac_optarg ;;
2259
2260   -target | --target | --targe | --targ | --tar | --ta | --t)
2261     ac_prev=target_alias ;;
2262   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
2263     target_alias=$ac_optarg ;;
2264
2265   -v | -verbose | --verbose | --verbos | --verbo | --verb)
2266     verbose=yes ;;
2267
2268   -version | --version | --versio | --versi | --vers | -V)
2269     ac_init_version=: ;;
2270
2271   -with-* | --with-*)
2272     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
2273     # Reject names that are not valid shell variable names.
2274     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2275       as_fn_error $? "invalid package name: $ac_useropt"
2276     ac_useropt_orig=$ac_useropt
2277     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2278     case $ac_user_opts in
2279       *"
2280 "with_$ac_useropt"
2281 "*) ;;
2282       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
2283          ac_unrecognized_sep=', ';;
2284     esac
2285     eval with_$ac_useropt=\$ac_optarg ;;
2286
2287   -without-* | --without-*)
2288     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
2289     # Reject names that are not valid shell variable names.
2290     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2291       as_fn_error $? "invalid package name: $ac_useropt"
2292     ac_useropt_orig=$ac_useropt
2293     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2294     case $ac_user_opts in
2295       *"
2296 "with_$ac_useropt"
2297 "*) ;;
2298       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
2299          ac_unrecognized_sep=', ';;
2300     esac
2301     eval with_$ac_useropt=no ;;
2302
2303   --x)
2304     # Obsolete; use --with-x.
2305     with_x=yes ;;
2306
2307   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
2308   | --x-incl | --x-inc | --x-in | --x-i)
2309     ac_prev=x_includes ;;
2310   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
2311   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
2312     x_includes=$ac_optarg ;;
2313
2314   -x-libraries | --x-libraries | --x-librarie | --x-librari \
2315   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
2316     ac_prev=x_libraries ;;
2317   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
2318   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
2319     x_libraries=$ac_optarg ;;
2320
2321   -*) as_fn_error $? "unrecognized option: \`$ac_option'
2322 Try \`$0 --help' for more information"
2323     ;;
2324
2325   *=*)
2326     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
2327     # Reject names that are not valid shell variable names.
2328     case $ac_envvar in #(
2329       '' | [0-9]* | *[!_$as_cr_alnum]* )
2330       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
2331     esac
2332     eval $ac_envvar=\$ac_optarg
2333     export $ac_envvar ;;
2334
2335   *)
2336     # FIXME: should be removed in autoconf 3.0.
2337     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
2338     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
2339       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
2340     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
2341     ;;
2342
2343   esac
2344 done
2345
2346 if test -n "$ac_prev"; then
2347   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
2348   as_fn_error $? "missing argument to $ac_option"
2349 fi
2350
2351 if test -n "$ac_unrecognized_opts"; then
2352   case $enable_option_checking in
2353     no) ;;
2354     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
2355     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
2356   esac
2357 fi
2358
2359 # Check all directory arguments for consistency.
2360 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
2361                 datadir sysconfdir sharedstatedir localstatedir includedir \
2362                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
2363                 libdir localedir mandir
2364 do
2365   eval ac_val=\$$ac_var
2366   # Remove trailing slashes.
2367   case $ac_val in
2368     */ )
2369       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
2370       eval $ac_var=\$ac_val;;
2371   esac
2372   # Be sure to have absolute directory names.
2373   case $ac_val in
2374     [\\/$]* | ?:[\\/]* )  continue;;
2375     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
2376   esac
2377   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
2378 done
2379
2380 # There might be people who depend on the old broken behavior: `$host'
2381 # used to hold the argument of --host etc.
2382 # FIXME: To remove some day.
2383 build=$build_alias
2384 host=$host_alias
2385 target=$target_alias
2386
2387 # FIXME: To remove some day.
2388 if test "x$host_alias" != x; then
2389   if test "x$build_alias" = x; then
2390     cross_compiling=maybe
2391   elif test "x$build_alias" != "x$host_alias"; then
2392     cross_compiling=yes
2393   fi
2394 fi
2395
2396 ac_tool_prefix=
2397 test -n "$host_alias" && ac_tool_prefix=$host_alias-
2398
2399 test "$silent" = yes && exec 6>/dev/null
2400
2401
2402 ac_pwd=`pwd` && test -n "$ac_pwd" &&
2403 ac_ls_di=`ls -di .` &&
2404 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
2405   as_fn_error $? "working directory cannot be determined"
2406 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
2407   as_fn_error $? "pwd does not report name of working directory"
2408
2409
2410 # Find the source files, if location was not specified.
2411 if test -z "$srcdir"; then
2412   ac_srcdir_defaulted=yes
2413   # Try the directory containing this script, then the parent directory.
2414   ac_confdir=`$as_dirname -- "$as_myself" ||
2415 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
2416          X"$as_myself" : 'X\(//\)[^/]' \| \
2417          X"$as_myself" : 'X\(//\)$' \| \
2418          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
2419 $as_echo X"$as_myself" |
2420     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
2421             s//\1/
2422             q
2423           }
2424           /^X\(\/\/\)[^/].*/{
2425             s//\1/
2426             q
2427           }
2428           /^X\(\/\/\)$/{
2429             s//\1/
2430             q
2431           }
2432           /^X\(\/\).*/{
2433             s//\1/
2434             q
2435           }
2436           s/.*/./; q'`
2437   srcdir=$ac_confdir
2438   if test ! -r "$srcdir/$ac_unique_file"; then
2439     srcdir=..
2440   fi
2441 else
2442   ac_srcdir_defaulted=no
2443 fi
2444 if test ! -r "$srcdir/$ac_unique_file"; then
2445   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
2446   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
2447 fi
2448 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
2449 ac_abs_confdir=`(
2450         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
2451         pwd)`
2452 # When building in place, set srcdir=.
2453 if test "$ac_abs_confdir" = "$ac_pwd"; then
2454   srcdir=.
2455 fi
2456 # Remove unnecessary trailing slashes from srcdir.
2457 # Double slashes in file names in object file debugging info
2458 # mess up M-x gdb in Emacs.
2459 case $srcdir in
2460 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
2461 esac
2462 for ac_var in $ac_precious_vars; do
2463   eval ac_env_${ac_var}_set=\${${ac_var}+set}
2464   eval ac_env_${ac_var}_value=\$${ac_var}
2465   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
2466   eval ac_cv_env_${ac_var}_value=\$${ac_var}
2467 done
2468
2469 #
2470 # Report the --help message.
2471 #
2472 if test "$ac_init_help" = "long"; then
2473   # Omit some internal or obsolete options to make the list less imposing.
2474   # This message is too long to be a string in the A/UX 3.1 sh.
2475   cat <<_ACEOF
2476 \`configure' configures GNU findutils 4.5.14 to adapt to many kinds of systems.
2477
2478 Usage: $0 [OPTION]... [VAR=VALUE]...
2479
2480 To assign environment variables (e.g., CC, CFLAGS...), specify them as
2481 VAR=VALUE.  See below for descriptions of some of the useful variables.
2482
2483 Defaults for the options are specified in brackets.
2484
2485 Configuration:
2486   -h, --help              display this help and exit
2487       --help=short        display options specific to this package
2488       --help=recursive    display the short help of all the included packages
2489   -V, --version           display version information and exit
2490   -q, --quiet, --silent   do not print \`checking ...' messages
2491       --cache-file=FILE   cache test results in FILE [disabled]
2492   -C, --config-cache      alias for \`--cache-file=config.cache'
2493   -n, --no-create         do not create output files
2494       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
2495
2496 Installation directories:
2497   --prefix=PREFIX         install architecture-independent files in PREFIX
2498                           [$ac_default_prefix]
2499   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
2500                           [PREFIX]
2501
2502 By default, \`make install' will install all the files in
2503 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
2504 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
2505 for instance \`--prefix=\$HOME'.
2506
2507 For better control, use the options below.
2508
2509 Fine tuning of the installation directories:
2510   --bindir=DIR            user executables [EPREFIX/bin]
2511   --sbindir=DIR           system admin executables [EPREFIX/sbin]
2512   --libexecdir=DIR        program executables [EPREFIX/libexec]
2513   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
2514   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
2515   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
2516   --libdir=DIR            object code libraries [EPREFIX/lib]
2517   --includedir=DIR        C header files [PREFIX/include]
2518   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
2519   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
2520   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
2521   --infodir=DIR           info documentation [DATAROOTDIR/info]
2522   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
2523   --mandir=DIR            man documentation [DATAROOTDIR/man]
2524   --docdir=DIR            documentation root [DATAROOTDIR/doc/findutils]
2525   --htmldir=DIR           html documentation [DOCDIR]
2526   --dvidir=DIR            dvi documentation [DOCDIR]
2527   --pdfdir=DIR            pdf documentation [DOCDIR]
2528   --psdir=DIR             ps documentation [DOCDIR]
2529 _ACEOF
2530
2531   cat <<\_ACEOF
2532
2533 Program names:
2534   --program-prefix=PREFIX            prepend PREFIX to installed program names
2535   --program-suffix=SUFFIX            append SUFFIX to installed program names
2536   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
2537
2538 System types:
2539   --build=BUILD     configure for building on BUILD [guessed]
2540   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
2541 _ACEOF
2542 fi
2543
2544 if test -n "$ac_init_help"; then
2545   case $ac_init_help in
2546      short | recursive ) echo "Configuration of GNU findutils 4.5.14:";;
2547    esac
2548   cat <<\_ACEOF
2549
2550 Optional Features:
2551   --disable-option-checking  ignore unrecognized --enable/--with options
2552   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
2553   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
2554   --enable-id-cache       cache all UIDs & GIDs; avoid if using NIS or Hesiod
2555   --enable-debug          Enable debugging output which is likely to be
2556                           interesting to people debugging findutils
2557   --enable-leaf-optimisation
2558                           Enable an optimisation which saves lstat calls to
2559                           identify subdirectories on filesystems having
2560                           traditional Unix semantics
2561   --enable-d_type-optimization
2562                           Make use of the file type data returned in struct
2563                           dirent.d_type by readdir()
2564   --enable-d_type-optimisation
2565                           Synonym for --enable-d_type-optimization
2566   --disable-dependency-tracking  speeds up one-time build
2567   --enable-dependency-tracking   do not reject slow dependency extractors
2568   --disable-largefile     omit support for large files
2569   --enable-threads={posix|solaris|pth|windows}
2570                           specify multithreading API
2571   --disable-threads       build without multithread safety
2572   --disable-assert        turn off assertions
2573   --disable-rpath         do not hardcode runtime library paths
2574   --enable-compiler-warnings
2575                           Enable many compiler warnings
2576   --disable-nls           do not use Native Language Support
2577
2578 Optional Packages:
2579   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2580   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2581   --without-fts           Use an older mechanism for searching the filesystem, instead of using fts()
2582   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
2583   --with-libpth-prefix[=DIR]  search for libpth in DIR/include and DIR/lib
2584   --without-libpth-prefix     don't search for libpth in includedir and libdir
2585   --without-included-regex
2586                           don't compile regex; this is the default on systems
2587                           with recent-enough versions of the GNU C Library
2588                           (use with caution on other systems).
2589   --without-selinux       do not use SELinux, even on systems with SELinux
2590   --with-packager         String identifying the packager of this software
2591   --with-packager-version Packager-specific version information
2592   --with-packager-bug-reports
2593                           Packager info for bug reports (URL/e-mail/...)
2594   --with-libiconv-prefix[=DIR]  search for libiconv in DIR/include and DIR/lib
2595   --without-libiconv-prefix     don't search for libiconv in includedir and libdir
2596   --with-libintl-prefix[=DIR]  search for libintl in DIR/include and DIR/lib
2597   --without-libintl-prefix     don't search for libintl in includedir and libdir
2598
2599 Some influential environment variables:
2600   DEFAULT_ARG_SIZE
2601               Default size of arguments to child processes of find and xargs,
2602               128k if unspecified
2603   CC          C compiler command
2604   CFLAGS      C compiler flags
2605   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2606               nonstandard directory <lib dir>
2607   LIBS        libraries to pass to the linker, e.g. -l<library>
2608   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2609               you have headers in a nonstandard directory <include dir>
2610   CPP         C preprocessor
2611   YACC        The "Yet Another C Compiler" implementation to use. Defaults to
2612               'bison -y'. Values other than 'bison -y' will most likely break
2613               on most systems.
2614   YFLAGS      YFLAGS contains the list arguments that will be passed by
2615               default to Bison. This script will default YFLAGS to the empty
2616               string to avoid a default value of '-d' given by some make
2617               applications.
2618   PYTHON      the Python interpreter
2619
2620 Use these variables to override the choices made by `configure' or to help
2621 it to find libraries and programs with nonstandard names/locations.
2622
2623 Report bugs to <bug-findutils@gnu.org>.
2624 GNU findutils home page: <http://www.gnu.org/software/findutils/>.
2625 General help using GNU software: <http://www.gnu.org/gethelp/>.
2626 _ACEOF
2627 ac_status=$?
2628 fi
2629
2630 if test "$ac_init_help" = "recursive"; then
2631   # If there are subdirs, report their specific --help.
2632   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2633     test -d "$ac_dir" ||
2634       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2635       continue
2636     ac_builddir=.
2637
2638 case "$ac_dir" in
2639 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2640 *)
2641   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2642   # A ".." for each directory in $ac_dir_suffix.
2643   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2644   case $ac_top_builddir_sub in
2645   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2646   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2647   esac ;;
2648 esac
2649 ac_abs_top_builddir=$ac_pwd
2650 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2651 # for backward compatibility:
2652 ac_top_builddir=$ac_top_build_prefix
2653
2654 case $srcdir in
2655   .)  # We are building in place.
2656     ac_srcdir=.
2657     ac_top_srcdir=$ac_top_builddir_sub
2658     ac_abs_top_srcdir=$ac_pwd ;;
2659   [\\/]* | ?:[\\/]* )  # Absolute name.
2660     ac_srcdir=$srcdir$ac_dir_suffix;
2661     ac_top_srcdir=$srcdir
2662     ac_abs_top_srcdir=$srcdir ;;
2663   *) # Relative name.
2664     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2665     ac_top_srcdir=$ac_top_build_prefix$srcdir
2666     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2667 esac
2668 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2669
2670     cd "$ac_dir" || { ac_status=$?; continue; }
2671     # Check for guested configure.
2672     if test -f "$ac_srcdir/configure.gnu"; then
2673       echo &&
2674       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2675     elif test -f "$ac_srcdir/configure"; then
2676       echo &&
2677       $SHELL "$ac_srcdir/configure" --help=recursive
2678     else
2679       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2680     fi || ac_status=$?
2681     cd "$ac_pwd" || { ac_status=$?; break; }
2682   done
2683 fi
2684
2685 test -n "$ac_init_help" && exit $ac_status
2686 if $ac_init_version; then
2687   cat <<\_ACEOF
2688 GNU findutils configure 4.5.14
2689 generated by GNU Autoconf 2.69
2690
2691 Copyright (C) 2012 Free Software Foundation, Inc.
2692 This configure script is free software; the Free Software Foundation
2693 gives unlimited permission to copy, distribute and modify it.
2694 _ACEOF
2695   exit
2696 fi
2697
2698 ## ------------------------ ##
2699 ## Autoconf initialization. ##
2700 ## ------------------------ ##
2701
2702 # ac_fn_c_try_compile LINENO
2703 # --------------------------
2704 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2705 ac_fn_c_try_compile ()
2706 {
2707   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2708   rm -f conftest.$ac_objext
2709   if { { ac_try="$ac_compile"
2710 case "(($ac_try" in
2711   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2712   *) ac_try_echo=$ac_try;;
2713 esac
2714 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2715 $as_echo "$ac_try_echo"; } >&5
2716   (eval "$ac_compile") 2>conftest.err
2717   ac_status=$?
2718   if test -s conftest.err; then
2719     grep -v '^ *+' conftest.err >conftest.er1
2720     cat conftest.er1 >&5
2721     mv -f conftest.er1 conftest.err
2722   fi
2723   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2724   test $ac_status = 0; } && {
2725          test -z "$ac_c_werror_flag" ||
2726          test ! -s conftest.err
2727        } && test -s conftest.$ac_objext; then :
2728   ac_retval=0
2729 else
2730   $as_echo "$as_me: failed program was:" >&5
2731 sed 's/^/| /' conftest.$ac_ext >&5
2732
2733         ac_retval=1
2734 fi
2735   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2736   as_fn_set_status $ac_retval
2737
2738 } # ac_fn_c_try_compile
2739
2740 # ac_fn_c_try_cpp LINENO
2741 # ----------------------
2742 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2743 ac_fn_c_try_cpp ()
2744 {
2745   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2746   if { { ac_try="$ac_cpp conftest.$ac_ext"
2747 case "(($ac_try" in
2748   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2749   *) ac_try_echo=$ac_try;;
2750 esac
2751 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2752 $as_echo "$ac_try_echo"; } >&5
2753   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2754   ac_status=$?
2755   if test -s conftest.err; then
2756     grep -v '^ *+' conftest.err >conftest.er1
2757     cat conftest.er1 >&5
2758     mv -f conftest.er1 conftest.err
2759   fi
2760   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2761   test $ac_status = 0; } > conftest.i && {
2762          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2763          test ! -s conftest.err
2764        }; then :
2765   ac_retval=0
2766 else
2767   $as_echo "$as_me: failed program was:" >&5
2768 sed 's/^/| /' conftest.$ac_ext >&5
2769
2770     ac_retval=1
2771 fi
2772   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2773   as_fn_set_status $ac_retval
2774
2775 } # ac_fn_c_try_cpp
2776
2777 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
2778 # -------------------------------------------------------
2779 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2780 # the include files in INCLUDES and setting the cache variable VAR
2781 # accordingly.
2782 ac_fn_c_check_header_mongrel ()
2783 {
2784   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2785   if eval \${$3+:} false; then :
2786   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2787 $as_echo_n "checking for $2... " >&6; }
2788 if eval \${$3+:} false; then :
2789   $as_echo_n "(cached) " >&6
2790 fi
2791 eval ac_res=\$$3
2792                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2793 $as_echo "$ac_res" >&6; }
2794 else
2795   # Is the header compilable?
2796 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2797 $as_echo_n "checking $2 usability... " >&6; }
2798 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2799 /* end confdefs.h.  */
2800 $4
2801 #include <$2>
2802 _ACEOF
2803 if ac_fn_c_try_compile "$LINENO"; then :
2804   ac_header_compiler=yes
2805 else
2806   ac_header_compiler=no
2807 fi
2808 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2810 $as_echo "$ac_header_compiler" >&6; }
2811
2812 # Is the header present?
2813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2814 $as_echo_n "checking $2 presence... " >&6; }
2815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2816 /* end confdefs.h.  */
2817 #include <$2>
2818 _ACEOF
2819 if ac_fn_c_try_cpp "$LINENO"; then :
2820   ac_header_preproc=yes
2821 else
2822   ac_header_preproc=no
2823 fi
2824 rm -f conftest.err conftest.i conftest.$ac_ext
2825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2826 $as_echo "$ac_header_preproc" >&6; }
2827
2828 # So?  What about this header?
2829 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2830   yes:no: )
2831     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2832 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2833     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2834 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2835     ;;
2836   no:yes:* )
2837     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2838 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2839     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2840 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2841     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2842 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2843     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2844 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2845     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2846 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2847 ( $as_echo "## ------------------------------------ ##
2848 ## Report this to bug-findutils@gnu.org ##
2849 ## ------------------------------------ ##"
2850      ) | sed "s/^/$as_me: WARNING:     /" >&2
2851     ;;
2852 esac
2853   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2854 $as_echo_n "checking for $2... " >&6; }
2855 if eval \${$3+:} false; then :
2856   $as_echo_n "(cached) " >&6
2857 else
2858   eval "$3=\$ac_header_compiler"
2859 fi
2860 eval ac_res=\$$3
2861                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2862 $as_echo "$ac_res" >&6; }
2863 fi
2864   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2865
2866 } # ac_fn_c_check_header_mongrel
2867
2868 # ac_fn_c_try_run LINENO
2869 # ----------------------
2870 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2871 # that executables *can* be run.
2872 ac_fn_c_try_run ()
2873 {
2874   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2875   if { { ac_try="$ac_link"
2876 case "(($ac_try" in
2877   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2878   *) ac_try_echo=$ac_try;;
2879 esac
2880 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2881 $as_echo "$ac_try_echo"; } >&5
2882   (eval "$ac_link") 2>&5
2883   ac_status=$?
2884   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2885   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2886   { { case "(($ac_try" in
2887   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2888   *) ac_try_echo=$ac_try;;
2889 esac
2890 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2891 $as_echo "$ac_try_echo"; } >&5
2892   (eval "$ac_try") 2>&5
2893   ac_status=$?
2894   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2895   test $ac_status = 0; }; }; then :
2896   ac_retval=0
2897 else
2898   $as_echo "$as_me: program exited with status $ac_status" >&5
2899        $as_echo "$as_me: failed program was:" >&5
2900 sed 's/^/| /' conftest.$ac_ext >&5
2901
2902        ac_retval=$ac_status
2903 fi
2904   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2905   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2906   as_fn_set_status $ac_retval
2907
2908 } # ac_fn_c_try_run
2909
2910 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2911 # -------------------------------------------------------
2912 # Tests whether HEADER exists and can be compiled using the include files in
2913 # INCLUDES, setting the cache variable VAR accordingly.
2914 ac_fn_c_check_header_compile ()
2915 {
2916   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2917   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2918 $as_echo_n "checking for $2... " >&6; }
2919 if eval \${$3+:} false; then :
2920   $as_echo_n "(cached) " >&6
2921 else
2922   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2923 /* end confdefs.h.  */
2924 $4
2925 #include <$2>
2926 _ACEOF
2927 if ac_fn_c_try_compile "$LINENO"; then :
2928   eval "$3=yes"
2929 else
2930   eval "$3=no"
2931 fi
2932 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2933 fi
2934 eval ac_res=\$$3
2935                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2936 $as_echo "$ac_res" >&6; }
2937   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2938
2939 } # ac_fn_c_check_header_compile
2940
2941 # ac_fn_c_try_link LINENO
2942 # -----------------------
2943 # Try to link conftest.$ac_ext, and return whether this succeeded.
2944 ac_fn_c_try_link ()
2945 {
2946   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2947   rm -f conftest.$ac_objext conftest$ac_exeext
2948   if { { ac_try="$ac_link"
2949 case "(($ac_try" in
2950   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2951   *) ac_try_echo=$ac_try;;
2952 esac
2953 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2954 $as_echo "$ac_try_echo"; } >&5
2955   (eval "$ac_link") 2>conftest.err
2956   ac_status=$?
2957   if test -s conftest.err; then
2958     grep -v '^ *+' conftest.err >conftest.er1
2959     cat conftest.er1 >&5
2960     mv -f conftest.er1 conftest.err
2961   fi
2962   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2963   test $ac_status = 0; } && {
2964          test -z "$ac_c_werror_flag" ||
2965          test ! -s conftest.err
2966        } && test -s conftest$ac_exeext && {
2967          test "$cross_compiling" = yes ||
2968          test -x conftest$ac_exeext
2969        }; then :
2970   ac_retval=0
2971 else
2972   $as_echo "$as_me: failed program was:" >&5
2973 sed 's/^/| /' conftest.$ac_ext >&5
2974
2975         ac_retval=1
2976 fi
2977   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2978   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2979   # interfere with the next link command; also delete a directory that is
2980   # left behind by Apple's compiler.  We do this before executing the actions.
2981   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2982   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2983   as_fn_set_status $ac_retval
2984
2985 } # ac_fn_c_try_link
2986
2987 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2988 # -------------------------------------------
2989 # Tests whether TYPE exists after having included INCLUDES, setting cache
2990 # variable VAR accordingly.
2991 ac_fn_c_check_type ()
2992 {
2993   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2994   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2995 $as_echo_n "checking for $2... " >&6; }
2996 if eval \${$3+:} false; then :
2997   $as_echo_n "(cached) " >&6
2998 else
2999   eval "$3=no"
3000   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3001 /* end confdefs.h.  */
3002 $4
3003 int
3004 main ()
3005 {
3006 if (sizeof ($2))
3007          return 0;
3008   ;
3009   return 0;
3010 }
3011 _ACEOF
3012 if ac_fn_c_try_compile "$LINENO"; then :
3013   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3014 /* end confdefs.h.  */
3015 $4
3016 int
3017 main ()
3018 {
3019 if (sizeof (($2)))
3020             return 0;
3021   ;
3022   return 0;
3023 }
3024 _ACEOF
3025 if ac_fn_c_try_compile "$LINENO"; then :
3026
3027 else
3028   eval "$3=yes"
3029 fi
3030 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3031 fi
3032 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3033 fi
3034 eval ac_res=\$$3
3035                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3036 $as_echo "$ac_res" >&6; }
3037   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3038
3039 } # ac_fn_c_check_type
3040
3041 # ac_fn_c_check_func LINENO FUNC VAR
3042 # ----------------------------------
3043 # Tests whether FUNC exists, setting the cache variable VAR accordingly
3044 ac_fn_c_check_func ()
3045 {
3046   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3047   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3048 $as_echo_n "checking for $2... " >&6; }
3049 if eval \${$3+:} false; then :
3050   $as_echo_n "(cached) " >&6
3051 else
3052   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3053 /* end confdefs.h.  */
3054 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
3055    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
3056 #define $2 innocuous_$2
3057
3058 /* System header to define __stub macros and hopefully few prototypes,
3059     which can conflict with char $2 (); below.
3060     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3061     <limits.h> exists even on freestanding compilers.  */
3062
3063 #ifdef __STDC__
3064 # include <limits.h>
3065 #else
3066 # include <assert.h>
3067 #endif
3068
3069 #undef $2
3070
3071 /* Override any GCC internal prototype to avoid an error.
3072    Use char because int might match the return type of a GCC
3073    builtin and then its argument prototype would still apply.  */
3074 #ifdef __cplusplus
3075 extern "C"
3076 #endif
3077 char $2 ();
3078 /* The GNU C library defines this for functions which it implements
3079     to always fail with ENOSYS.  Some functions are actually named
3080     something starting with __ and the normal name is an alias.  */
3081 #if defined __stub_$2 || defined __stub___$2
3082 choke me
3083 #endif
3084
3085 int
3086 main ()
3087 {
3088 return $2 ();
3089   ;
3090   return 0;
3091 }
3092 _ACEOF
3093 if ac_fn_c_try_link "$LINENO"; then :
3094   eval "$3=yes"
3095 else
3096   eval "$3=no"
3097 fi
3098 rm -f core conftest.err conftest.$ac_objext \
3099     conftest$ac_exeext conftest.$ac_ext
3100 fi
3101 eval ac_res=\$$3
3102                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3103 $as_echo "$ac_res" >&6; }
3104   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3105
3106 } # ac_fn_c_check_func
3107
3108 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
3109 # ---------------------------------------------
3110 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
3111 # accordingly.
3112 ac_fn_c_check_decl ()
3113 {
3114   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3115   as_decl_name=`echo $2|sed 's/ *(.*//'`
3116   as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
3117   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
3118 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
3119 if eval \${$3+:} false; then :
3120   $as_echo_n "(cached) " >&6
3121 else
3122   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3123 /* end confdefs.h.  */
3124 $4
3125 int
3126 main ()
3127 {
3128 #ifndef $as_decl_name
3129 #ifdef __cplusplus
3130   (void) $as_decl_use;
3131 #else
3132   (void) $as_decl_name;
3133 #endif
3134 #endif
3135
3136   ;
3137   return 0;
3138 }
3139 _ACEOF
3140 if ac_fn_c_try_compile "$LINENO"; then :
3141   eval "$3=yes"
3142 else
3143   eval "$3=no"
3144 fi
3145 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3146 fi
3147 eval ac_res=\$$3
3148                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3149 $as_echo "$ac_res" >&6; }
3150   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3151
3152 } # ac_fn_c_check_decl
3153
3154 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
3155 # --------------------------------------------
3156 # Tries to find the compile-time value of EXPR in a program that includes
3157 # INCLUDES, setting VAR accordingly. Returns whether the value could be
3158 # computed
3159 ac_fn_c_compute_int ()
3160 {
3161   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3162   if test "$cross_compiling" = yes; then
3163     # Depending upon the size, compute the lo and hi bounds.
3164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3165 /* end confdefs.h.  */
3166 $4
3167 int
3168 main ()
3169 {
3170 static int test_array [1 - 2 * !(($2) >= 0)];
3171 test_array [0] = 0;
3172 return test_array [0];
3173
3174   ;
3175   return 0;
3176 }
3177 _ACEOF
3178 if ac_fn_c_try_compile "$LINENO"; then :
3179   ac_lo=0 ac_mid=0
3180   while :; do
3181     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3182 /* end confdefs.h.  */
3183 $4
3184 int
3185 main ()
3186 {
3187 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
3188 test_array [0] = 0;
3189 return test_array [0];
3190
3191   ;
3192   return 0;
3193 }
3194 _ACEOF
3195 if ac_fn_c_try_compile "$LINENO"; then :
3196   ac_hi=$ac_mid; break
3197 else
3198   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
3199                         if test $ac_lo -le $ac_mid; then
3200                           ac_lo= ac_hi=
3201                           break
3202                         fi
3203                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
3204 fi
3205 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3206   done
3207 else
3208   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3209 /* end confdefs.h.  */
3210 $4
3211 int
3212 main ()
3213 {
3214 static int test_array [1 - 2 * !(($2) < 0)];
3215 test_array [0] = 0;
3216 return test_array [0];
3217
3218   ;
3219   return 0;
3220 }
3221 _ACEOF
3222 if ac_fn_c_try_compile "$LINENO"; then :
3223   ac_hi=-1 ac_mid=-1
3224   while :; do
3225     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3226 /* end confdefs.h.  */
3227 $4
3228 int
3229 main ()
3230 {
3231 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
3232 test_array [0] = 0;
3233 return test_array [0];
3234
3235   ;
3236   return 0;
3237 }
3238 _ACEOF
3239 if ac_fn_c_try_compile "$LINENO"; then :
3240   ac_lo=$ac_mid; break
3241 else
3242   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
3243                         if test $ac_mid -le $ac_hi; then
3244                           ac_lo= ac_hi=
3245                           break
3246                         fi
3247                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
3248 fi
3249 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3250   done
3251 else
3252   ac_lo= ac_hi=
3253 fi
3254 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3255 fi
3256 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3257 # Binary search between lo and hi bounds.
3258 while test "x$ac_lo" != "x$ac_hi"; do
3259   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
3260   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3261 /* end confdefs.h.  */
3262 $4
3263 int
3264 main ()
3265 {
3266 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
3267 test_array [0] = 0;
3268 return test_array [0];
3269
3270   ;
3271   return 0;
3272 }
3273 _ACEOF
3274 if ac_fn_c_try_compile "$LINENO"; then :
3275   ac_hi=$ac_mid
3276 else
3277   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
3278 fi
3279 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3280 done
3281 case $ac_lo in #((
3282 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
3283 '') ac_retval=1 ;;
3284 esac
3285   else
3286     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3287 /* end confdefs.h.  */
3288 $4
3289 static long int longval () { return $2; }
3290 static unsigned long int ulongval () { return $2; }
3291 #include <stdio.h>
3292 #include <stdlib.h>
3293 int
3294 main ()
3295 {
3296
3297   FILE *f = fopen ("conftest.val", "w");
3298   if (! f)
3299     return 1;
3300   if (($2) < 0)
3301     {
3302       long int i = longval ();
3303       if (i != ($2))
3304         return 1;
3305       fprintf (f, "%ld", i);
3306     }
3307   else
3308     {
3309       unsigned long int i = ulongval ();
3310       if (i != ($2))
3311         return 1;
3312       fprintf (f, "%lu", i);
3313     }
3314   /* Do not output a trailing newline, as this causes \r\n confusion
3315      on some platforms.  */
3316   return ferror (f) || fclose (f) != 0;
3317
3318   ;
3319   return 0;
3320 }
3321 _ACEOF
3322 if ac_fn_c_try_run "$LINENO"; then :
3323   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
3324 else
3325   ac_retval=1
3326 fi
3327 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3328   conftest.$ac_objext conftest.beam conftest.$ac_ext
3329 rm -f conftest.val
3330
3331   fi
3332   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3333   as_fn_set_status $ac_retval
3334
3335 } # ac_fn_c_compute_int
3336
3337 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
3338 # ----------------------------------------------------
3339 # Tries to find if the field MEMBER exists in type AGGR, after including
3340 # INCLUDES, setting cache variable VAR accordingly.
3341 ac_fn_c_check_member ()
3342 {
3343   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3344   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
3345 $as_echo_n "checking for $2.$3... " >&6; }
3346 if eval \${$4+:} false; then :
3347   $as_echo_n "(cached) " >&6
3348 else
3349   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3350 /* end confdefs.h.  */
3351 $5
3352 int
3353 main ()
3354 {
3355 static $2 ac_aggr;
3356 if (ac_aggr.$3)
3357 return 0;
3358   ;
3359   return 0;
3360 }
3361 _ACEOF
3362 if ac_fn_c_try_compile "$LINENO"; then :
3363   eval "$4=yes"
3364 else
3365   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3366 /* end confdefs.h.  */
3367 $5
3368 int
3369 main ()
3370 {
3371 static $2 ac_aggr;
3372 if (sizeof ac_aggr.$3)
3373 return 0;
3374   ;
3375   return 0;
3376 }
3377 _ACEOF
3378 if ac_fn_c_try_compile "$LINENO"; then :
3379   eval "$4=yes"
3380 else
3381   eval "$4=no"
3382 fi
3383 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3384 fi
3385 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3386 fi
3387 eval ac_res=\$$4
3388                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3389 $as_echo "$ac_res" >&6; }
3390   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3391
3392 } # ac_fn_c_check_member
3393 cat >config.log <<_ACEOF
3394 This file contains any messages produced by compilers while
3395 running configure, to aid debugging if configure makes a mistake.
3396
3397 It was created by GNU findutils $as_me 4.5.14, which was
3398 generated by GNU Autoconf 2.69.  Invocation command line was
3399
3400   $ $0 $@
3401
3402 _ACEOF
3403 exec 5>>config.log
3404 {
3405 cat <<_ASUNAME
3406 ## --------- ##
3407 ## Platform. ##
3408 ## --------- ##
3409
3410 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3411 uname -m = `(uname -m) 2>/dev/null || echo unknown`
3412 uname -r = `(uname -r) 2>/dev/null || echo unknown`
3413 uname -s = `(uname -s) 2>/dev/null || echo unknown`
3414 uname -v = `(uname -v) 2>/dev/null || echo unknown`
3415
3416 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3417 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3418
3419 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3420 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3421 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3422 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3423 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3424 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3425 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3426
3427 _ASUNAME
3428
3429 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3430 for as_dir in $PATH
3431 do
3432   IFS=$as_save_IFS
3433   test -z "$as_dir" && as_dir=.
3434     $as_echo "PATH: $as_dir"
3435   done
3436 IFS=$as_save_IFS
3437
3438 } >&5
3439
3440 cat >&5 <<_ACEOF
3441
3442
3443 ## ----------- ##
3444 ## Core tests. ##
3445 ## ----------- ##
3446
3447 _ACEOF
3448
3449
3450 # Keep a trace of the command line.
3451 # Strip out --no-create and --no-recursion so they do not pile up.
3452 # Strip out --silent because we don't want to record it for future runs.
3453 # Also quote any args containing shell meta-characters.
3454 # Make two passes to allow for proper duplicate-argument suppression.
3455 ac_configure_args=
3456 ac_configure_args0=
3457 ac_configure_args1=
3458 ac_must_keep_next=false
3459 for ac_pass in 1 2
3460 do
3461   for ac_arg
3462   do
3463     case $ac_arg in
3464     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3465     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3466     | -silent | --silent | --silen | --sile | --sil)
3467       continue ;;
3468     *\'*)
3469       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3470     esac
3471     case $ac_pass in
3472     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3473     2)
3474       as_fn_append ac_configure_args1 " '$ac_arg'"
3475       if test $ac_must_keep_next = true; then
3476         ac_must_keep_next=false # Got value, back to normal.
3477       else
3478         case $ac_arg in
3479           *=* | --config-cache | -C | -disable-* | --disable-* \
3480           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3481           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3482           | -with-* | --with-* | -without-* | --without-* | --x)
3483             case "$ac_configure_args0 " in
3484               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3485             esac
3486             ;;
3487           -* ) ac_must_keep_next=true ;;
3488         esac
3489       fi
3490       as_fn_append ac_configure_args " '$ac_arg'"
3491       ;;
3492     esac
3493   done
3494 done
3495 { ac_configure_args0=; unset ac_configure_args0;}
3496 { ac_configure_args1=; unset ac_configure_args1;}
3497
3498 # When interrupted or exit'd, cleanup temporary files, and complete
3499 # config.log.  We remove comments because anyway the quotes in there
3500 # would cause problems or look ugly.
3501 # WARNING: Use '\'' to represent an apostrophe within the trap.
3502 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3503 trap 'exit_status=$?
3504   # Save into config.log some information that might help in debugging.
3505   {
3506     echo
3507
3508     $as_echo "## ---------------- ##
3509 ## Cache variables. ##
3510 ## ---------------- ##"
3511     echo
3512     # The following way of writing the cache mishandles newlines in values,
3513 (
3514   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3515     eval ac_val=\$$ac_var
3516     case $ac_val in #(
3517     *${as_nl}*)
3518       case $ac_var in #(
3519       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3520 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3521       esac
3522       case $ac_var in #(
3523       _ | IFS | as_nl) ;; #(
3524       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3525       *) { eval $ac_var=; unset $ac_var;} ;;
3526       esac ;;
3527     esac
3528   done
3529   (set) 2>&1 |
3530     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3531     *${as_nl}ac_space=\ *)
3532       sed -n \
3533         "s/'\''/'\''\\\\'\'''\''/g;
3534           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3535       ;; #(
3536     *)
3537       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3538       ;;
3539     esac |
3540     sort
3541 )
3542     echo
3543
3544     $as_echo "## ----------------- ##
3545 ## Output variables. ##
3546 ## ----------------- ##"
3547     echo
3548     for ac_var in $ac_subst_vars
3549     do
3550       eval ac_val=\$$ac_var
3551       case $ac_val in
3552       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3553       esac
3554       $as_echo "$ac_var='\''$ac_val'\''"
3555     done | sort
3556     echo
3557
3558     if test -n "$ac_subst_files"; then
3559       $as_echo "## ------------------- ##
3560 ## File substitutions. ##
3561 ## ------------------- ##"
3562       echo
3563       for ac_var in $ac_subst_files
3564       do
3565         eval ac_val=\$$ac_var
3566         case $ac_val in
3567         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3568         esac
3569         $as_echo "$ac_var='\''$ac_val'\''"
3570       done | sort
3571       echo
3572     fi
3573
3574     if test -s confdefs.h; then
3575       $as_echo "## ----------- ##
3576 ## confdefs.h. ##
3577 ## ----------- ##"
3578       echo
3579       cat confdefs.h
3580       echo
3581     fi
3582     test "$ac_signal" != 0 &&
3583       $as_echo "$as_me: caught signal $ac_signal"
3584     $as_echo "$as_me: exit $exit_status"
3585   } >&5
3586   rm -f core *.core core.conftest.* &&
3587     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3588     exit $exit_status
3589 ' 0
3590 for ac_signal in 1 2 13 15; do
3591   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3592 done
3593 ac_signal=0
3594
3595 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3596 rm -f -r conftest* confdefs.h
3597
3598 $as_echo "/* confdefs.h */" > confdefs.h
3599
3600 # Predefined preprocessor variables.
3601
3602 cat >>confdefs.h <<_ACEOF
3603 #define PACKAGE_NAME "$PACKAGE_NAME"
3604 _ACEOF
3605
3606 cat >>confdefs.h <<_ACEOF
3607 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3608 _ACEOF
3609
3610 cat >>confdefs.h <<_ACEOF
3611 #define PACKAGE_VERSION "$PACKAGE_VERSION"
3612 _ACEOF
3613
3614 cat >>confdefs.h <<_ACEOF
3615 #define PACKAGE_STRING "$PACKAGE_STRING"
3616 _ACEOF
3617
3618 cat >>confdefs.h <<_ACEOF
3619 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3620 _ACEOF
3621
3622 cat >>confdefs.h <<_ACEOF
3623 #define PACKAGE_URL "$PACKAGE_URL"
3624 _ACEOF
3625
3626
3627 # Let the site file select an alternate cache file if it wants to.
3628 # Prefer an explicitly selected file to automatically selected ones.
3629 ac_site_file1=NONE
3630 ac_site_file2=NONE
3631 if test -n "$CONFIG_SITE"; then
3632   # We do not want a PATH search for config.site.
3633   case $CONFIG_SITE in #((
3634     -*)  ac_site_file1=./$CONFIG_SITE;;
3635     */*) ac_site_file1=$CONFIG_SITE;;
3636     *)   ac_site_file1=./$CONFIG_SITE;;
3637   esac
3638 elif test "x$prefix" != xNONE; then
3639   ac_site_file1=$prefix/share/config.site
3640   ac_site_file2=$prefix/etc/config.site
3641 else
3642   ac_site_file1=$ac_default_prefix/share/config.site
3643   ac_site_file2=$ac_default_prefix/etc/config.site
3644 fi
3645 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3646 do
3647   test "x$ac_site_file" = xNONE && continue
3648   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3649     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3650 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
3651     sed 's/^/| /' "$ac_site_file" >&5
3652     . "$ac_site_file" \
3653       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3654 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3655 as_fn_error $? "failed to load site script $ac_site_file
3656 See \`config.log' for more details" "$LINENO" 5; }
3657   fi
3658 done
3659
3660 if test -r "$cache_file"; then
3661   # Some versions of bash will fail to source /dev/null (special files
3662   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3663   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3664     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3665 $as_echo "$as_me: loading cache $cache_file" >&6;}
3666     case $cache_file in
3667       [\\/]* | ?:[\\/]* ) . "$cache_file";;
3668       *)                      . "./$cache_file";;
3669     esac
3670   fi
3671 else
3672   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3673 $as_echo "$as_me: creating cache $cache_file" >&6;}
3674   >$cache_file
3675 fi
3676
3677 gl_func_list="$gl_func_list btowc"
3678 gl_func_list="$gl_func_list canonicalize_file_name"
3679 gl_func_list="$gl_func_list realpath"
3680 gl_func_list="$gl_func_list readlinkat"
3681 gl_header_list="$gl_header_list unistd.h"
3682 gl_header_list="$gl_header_list sys/param.h"
3683 gl_func_list="$gl_func_list _set_invalid_parameter_handler"
3684 gl_header_list="$gl_header_list sys/socket.h"
3685 gl_func_list="$gl_func_list fchdir"
3686 gl_header_list="$gl_header_list dirent.h"
3687 gl_func_list="$gl_func_list fdopendir"
3688 gl_func_list="$gl_func_list faccessat"
3689 gl_func_list="$gl_func_list fcntl"
3690 gl_func_list="$gl_func_list symlink"
3691 gl_func_list="$gl_func_list mempcpy"
3692 gl_func_list="$gl_func_list isblank"
3693 gl_func_list="$gl_func_list iswctype"
3694 gl_func_list="$gl_func_list mbsrtowcs"
3695 gl_func_list="$gl_func_list wmemchr"
3696 gl_func_list="$gl_func_list wmemcpy"
3697 gl_func_list="$gl_func_list wmempcpy"
3698 gl_header_list="$gl_header_list wctype.h"
3699 gl_fnmatch_required=GNU
3700 gl_header_list="$gl_header_list stdio_ext.h"
3701 gl_func_list="$gl_func_list fpurge"
3702 gl_func_list="$gl_func_list __fpurge"
3703 gl_func_list="$gl_func_list __freadahead"
3704 gl_func_list="$gl_func_list __freading"
3705 gl_header_list="$gl_header_list sys/stat.h"
3706 gl_func_list="$gl_func_list fstatat"
3707 gl_func_list="$gl_func_list openat"
3708 gl_func_list="$gl_func_list fstatfs"
3709 gl_header_list="$gl_header_list sys/vfs.h"
3710 gl_func_list="$gl_func_list getdelim"
3711 gl_func_list="$gl_func_list getdtablesize"
3712 gl_header_list="$gl_header_list netdb.h"
3713 gl_getopt_required=GNU
3714 gl_header_list="$gl_header_list getopt.h"
3715 gl_func_list="$gl_func_list gettimeofday"
3716 gl_func_list="$gl_func_list nanotime"
3717 gl_header_list="$gl_header_list sys/time.h"
3718 gl_header_list="$gl_header_list wchar.h"
3719 gl_header_list="$gl_header_list stdint.h"
3720 gl_header_list="$gl_header_list inttypes.h"
3721 gl_func_list="$gl_func_list iswcntrl"
3722 gl_func_list="$gl_func_list iswblank"
3723 gl_header_list="$gl_header_list langinfo.h"
3724 gl_header_list="$gl_header_list xlocale.h"
3725 gl_func_list="$gl_func_list lstat"
3726 gl_header_list="$gl_header_list math.h"
3727 gl_func_list="$gl_func_list mbsinit"
3728 gl_func_list="$gl_func_list mbrtowc"
3729 gl_func_list="$gl_func_list mbslen"
3730 gl_header_list="$gl_header_list sys/mman.h"
3731 gl_func_list="$gl_func_list mprotect"
3732 gl_header_list="$gl_header_list sys/statvfs.h"
3733 gl_func_list="$gl_func_list nl_langinfo"
3734 gl_func_list="$gl_func_list strerror_r"
3735 gl_func_list="$gl_func_list __xpg_strerror_r"
3736 gl_func_list="$gl_func_list readlink"
3737 gl_header_list="$gl_header_list malloc.h"
3738 gl_func_list="$gl_func_list pathconf"
3739 gl_header_list="$gl_header_list selinux/selinux.h"
3740 gl_func_list="$gl_func_list setenv"
3741 gl_func_list="$gl_func_list snprintf"
3742 gl_func_list="$gl_func_list strdup"
3743 gl_func_list="$gl_func_list catgets"
3744 gl_func_list="$gl_func_list tzset"
3745 gl_header_list="$gl_header_list strings.h"
3746 gl_func_list="$gl_func_list strndup"
3747 gl_func_list="$gl_func_list strtoumax"
3748 gl_header_list="$gl_header_list sys/uio.h"
3749 gl_header_list="$gl_header_list sys/utsname.h"
3750 gl_header_list="$gl_header_list sys/wait.h"
3751 gl_func_list="$gl_func_list localtime_r"
3752 gl_func_list="$gl_func_list pipe"
3753 gl_func_list="$gl_func_list unlinkat"
3754 gl_func_list="$gl_func_list vasnprintf"
3755 gl_header_list="$gl_header_list features.h"
3756 gl_func_list="$gl_func_list wcrtomb"
3757 gl_func_list="$gl_func_list wcwidth"
3758 gl_header_list="$gl_header_list arpa/inet.h"
3759 gl_func_list="$gl_func_list ftruncate"
3760 gl_header_list="$gl_header_list netinet/in.h"
3761 gl_func_list="$gl_func_list newlocale"
3762 gl_header_list="$gl_header_list sys/select.h"
3763 gl_header_list="$gl_header_list priv.h"
3764 gl_func_list="$gl_func_list sigaction"
3765 gl_func_list="$gl_func_list sigaltstack"
3766 gl_func_list="$gl_func_list siginterrupt"
3767 gl_func_list="$gl_func_list sleep"
3768 gl_func_list="$gl_func_list symlinkat"
3769 gl_header_list="$gl_header_list sys/ioctl.h"
3770 gl_func_list="$gl_func_list shutdown"
3771 gl_func_list="$gl_func_list wctob"
3772 gt_needs="$gt_needs "
3773 # Check that the precious variables saved in the cache have kept the same
3774 # value.
3775 ac_cache_corrupted=false
3776 for ac_var in $ac_precious_vars; do
3777   eval ac_old_set=\$ac_cv_env_${ac_var}_set
3778   eval ac_new_set=\$ac_env_${ac_var}_set
3779   eval ac_old_val=\$ac_cv_env_${ac_var}_value
3780   eval ac_new_val=\$ac_env_${ac_var}_value
3781   case $ac_old_set,$ac_new_set in
3782     set,)
3783       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3784 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3785       ac_cache_corrupted=: ;;
3786     ,set)
3787       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3788 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3789       ac_cache_corrupted=: ;;
3790     ,);;
3791     *)
3792       if test "x$ac_old_val" != "x$ac_new_val"; then
3793         # differences in whitespace do not lead to failure.
3794         ac_old_val_w=`echo x $ac_old_val`
3795         ac_new_val_w=`echo x $ac_new_val`
3796         if test "$ac_old_val_w" != "$ac_new_val_w"; then
3797           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3798 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3799           ac_cache_corrupted=:
3800         else
3801           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3802 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3803           eval $ac_var=\$ac_old_val
3804         fi
3805         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3806 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3807         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3808 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3809       fi;;
3810   esac
3811   # Pass precious variables to config.status.
3812   if test "$ac_new_set" = set; then
3813     case $ac_new_val in
3814     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3815     *) ac_arg=$ac_var=$ac_new_val ;;
3816     esac
3817     case " $ac_configure_args " in
3818       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3819       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3820     esac
3821   fi
3822 done
3823 if $ac_cache_corrupted; then
3824   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3825 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3826   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3827 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3828   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3829 fi
3830 ## -------------------- ##
3831 ## Main body of script. ##
3832 ## -------------------- ##
3833
3834 ac_ext=c
3835 ac_cpp='$CPP $CPPFLAGS'
3836 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3837 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3838 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3839
3840
3841 ac_aux_dir=
3842 for ac_dir in build-aux "$srcdir"/build-aux; do
3843   if test -f "$ac_dir/install-sh"; then
3844     ac_aux_dir=$ac_dir
3845     ac_install_sh="$ac_aux_dir/install-sh -c"
3846     break
3847   elif test -f "$ac_dir/install.sh"; then
3848     ac_aux_dir=$ac_dir
3849     ac_install_sh="$ac_aux_dir/install.sh -c"
3850     break
3851   elif test -f "$ac_dir/shtool"; then
3852     ac_aux_dir=$ac_dir
3853     ac_install_sh="$ac_aux_dir/shtool install -c"
3854     break
3855   fi
3856 done
3857 if test -z "$ac_aux_dir"; then
3858   as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
3859 fi
3860
3861 # These three variables are undocumented and unsupported,
3862 # and are intended to be withdrawn in a future Autoconf release.
3863 # They can cause serious problems if a builder's source tree is in a directory
3864 # whose full name contains unusual characters.
3865 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3866 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3867 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3868
3869
3870 am__api_version='1.11'
3871
3872 # Find a good install program.  We prefer a C program (faster),
3873 # so one script is as good as another.  But avoid the broken or
3874 # incompatible versions:
3875 # SysV /etc/install, /usr/sbin/install
3876 # SunOS /usr/etc/install
3877 # IRIX /sbin/install
3878 # AIX /bin/install
3879 # AmigaOS /C/install, which installs bootblocks on floppy discs
3880 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3881 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3882 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3883 # OS/2's system install, which has a completely different semantic
3884 # ./install, which can be erroneously created by make from ./install.sh.
3885 # Reject install programs that cannot install multiple files.
3886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
3887 $as_echo_n "checking for a BSD-compatible install... " >&6; }
3888 if test -z "$INSTALL"; then
3889 if ${ac_cv_path_install+:} false; then :
3890   $as_echo_n "(cached) " >&6
3891 else
3892   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3893 for as_dir in $PATH
3894 do
3895   IFS=$as_save_IFS
3896   test -z "$as_dir" && as_dir=.
3897     # Account for people who put trailing slashes in PATH elements.
3898 case $as_dir/ in #((
3899   ./ | .// | /[cC]/* | \
3900   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3901   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
3902   /usr/ucb/* ) ;;
3903   *)
3904     # OSF1 and SCO ODT 3.0 have their own names for install.
3905     # Don't use installbsd from OSF since it installs stuff as root
3906     # by default.
3907     for ac_prog in ginstall scoinst install; do
3908       for ac_exec_ext in '' $ac_executable_extensions; do
3909         if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3910           if test $ac_prog = install &&
3911             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3912             # AIX install.  It has an incompatible calling convention.
3913             :
3914           elif test $ac_prog = install &&
3915             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3916             # program-specific install script used by HP pwplus--don't use.
3917             :
3918           else
3919             rm -rf conftest.one conftest.two conftest.dir
3920             echo one > conftest.one
3921             echo two > conftest.two
3922             mkdir conftest.dir
3923             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
3924               test -s conftest.one && test -s conftest.two &&
3925               test -s conftest.dir/conftest.one &&
3926               test -s conftest.dir/conftest.two
3927             then
3928               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3929               break 3
3930             fi
3931           fi
3932         fi
3933       done
3934     done
3935     ;;
3936 esac
3937
3938   done
3939 IFS=$as_save_IFS
3940
3941 rm -rf conftest.one conftest.two conftest.dir
3942
3943 fi
3944   if test "${ac_cv_path_install+set}" = set; then
3945     INSTALL=$ac_cv_path_install
3946   else
3947     # As a last resort, use the slow shell script.  Don't cache a
3948     # value for INSTALL within a source directory, because that will
3949     # break other packages using the cache if that directory is
3950     # removed, or if the value is a relative name.
3951     INSTALL=$ac_install_sh
3952   fi
3953 fi
3954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
3955 $as_echo "$INSTALL" >&6; }
3956
3957 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3958 # It thinks the first close brace ends the variable substitution.
3959 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3960
3961 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3962
3963 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3964
3965 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
3966 $as_echo_n "checking whether build environment is sane... " >&6; }
3967 # Just in case
3968 sleep 1
3969 echo timestamp > conftest.file
3970 # Reject unsafe characters in $srcdir or the absolute working directory
3971 # name.  Accept space and tab only in the latter.
3972 am_lf='
3973 '
3974 case `pwd` in
3975   *[\\\"\#\$\&\'\`$am_lf]*)
3976     as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
3977 esac
3978 case $srcdir in
3979   *[\\\"\#\$\&\'\`$am_lf\ \     ]*)
3980     as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
3981 esac
3982
3983 # Do `set' in a subshell so we don't clobber the current shell's
3984 # arguments.  Must try -L first in case configure is actually a
3985 # symlink; some systems play weird games with the mod time of symlinks
3986 # (eg FreeBSD returns the mod time of the symlink's containing
3987 # directory).
3988 if (
3989    set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
3990    if test "$*" = "X"; then
3991       # -L didn't work.
3992       set X `ls -t "$srcdir/configure" conftest.file`
3993    fi
3994    rm -f conftest.file
3995    if test "$*" != "X $srcdir/configure conftest.file" \
3996       && test "$*" != "X conftest.file $srcdir/configure"; then
3997
3998       # If neither matched, then we have a broken ls.  This can happen
3999       # if, for instance, CONFIG_SHELL is bash and it inherits a
4000       # broken ls alias from the environment.  This has actually
4001       # happened.  Such a system could not be considered "sane".
4002       as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
4003 alias in your environment" "$LINENO" 5
4004    fi
4005
4006    test "$2" = conftest.file
4007    )
4008 then
4009    # Ok.
4010    :
4011 else
4012    as_fn_error $? "newly created file is older than distributed files!
4013 Check your system clock" "$LINENO" 5
4014 fi
4015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4016 $as_echo "yes" >&6; }
4017 test "$program_prefix" != NONE &&
4018   program_transform_name="s&^&$program_prefix&;$program_transform_name"
4019 # Use a double $ so make ignores it.
4020 test "$program_suffix" != NONE &&
4021   program_transform_name="s&\$&$program_suffix&;$program_transform_name"
4022 # Double any \ or $.
4023 # By default was `s,x,x', remove it if useless.
4024 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
4025 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
4026
4027 # expand $ac_aux_dir to an absolute path
4028 am_aux_dir=`cd $ac_aux_dir && pwd`
4029
4030 if test x"${MISSING+set}" != xset; then
4031   case $am_aux_dir in
4032   *\ * | *\     *)
4033     MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
4034   *)
4035     MISSING="\${SHELL} $am_aux_dir/missing" ;;
4036   esac
4037 fi
4038 # Use eval to expand $SHELL
4039 if eval "$MISSING --run true"; then
4040   am_missing_run="$MISSING --run "
4041 else
4042   am_missing_run=
4043   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
4044 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
4045 fi
4046
4047 if test x"${install_sh}" != xset; then
4048   case $am_aux_dir in
4049   *\ * | *\     *)
4050     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
4051   *)
4052     install_sh="\${SHELL} $am_aux_dir/install-sh"
4053   esac
4054 fi
4055
4056 # Installed binaries are usually stripped using `strip' when the user
4057 # run `make install-strip'.  However `strip' might not be the right
4058 # tool to use in cross-compilation environments, therefore Automake
4059 # will honor the `STRIP' environment variable to overrule this program.
4060 if test "$cross_compiling" != no; then
4061   if test -n "$ac_tool_prefix"; then
4062   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4063 set dummy ${ac_tool_prefix}strip; ac_word=$2
4064 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4065 $as_echo_n "checking for $ac_word... " >&6; }
4066 if ${ac_cv_prog_STRIP+:} false; then :
4067   $as_echo_n "(cached) " >&6
4068 else
4069   if test -n "$STRIP"; then
4070   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4071 else
4072 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4073 for as_dir in $PATH
4074 do
4075   IFS=$as_save_IFS
4076   test -z "$as_dir" && as_dir=.
4077     for ac_exec_ext in '' $ac_executable_extensions; do
4078   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4079     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4080     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4081     break 2
4082   fi
4083 done
4084   done
4085 IFS=$as_save_IFS
4086
4087 fi
4088 fi
4089 STRIP=$ac_cv_prog_STRIP
4090 if test -n "$STRIP"; then
4091   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4092 $as_echo "$STRIP" >&6; }
4093 else
4094   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4095 $as_echo "no" >&6; }
4096 fi
4097
4098
4099 fi
4100 if test -z "$ac_cv_prog_STRIP"; then
4101   ac_ct_STRIP=$STRIP
4102   # Extract the first word of "strip", so it can be a program name with args.
4103 set dummy strip; ac_word=$2
4104 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4105 $as_echo_n "checking for $ac_word... " >&6; }
4106 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
4107   $as_echo_n "(cached) " >&6
4108 else
4109   if test -n "$ac_ct_STRIP"; then
4110   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4111 else
4112 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4113 for as_dir in $PATH
4114 do
4115   IFS=$as_save_IFS
4116   test -z "$as_dir" && as_dir=.
4117     for ac_exec_ext in '' $ac_executable_extensions; do
4118   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4119     ac_cv_prog_ac_ct_STRIP="strip"
4120     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4121     break 2
4122   fi
4123 done
4124   done
4125 IFS=$as_save_IFS
4126
4127 fi
4128 fi
4129 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4130 if test -n "$ac_ct_STRIP"; then
4131   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
4132 $as_echo "$ac_ct_STRIP" >&6; }
4133 else
4134   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4135 $as_echo "no" >&6; }
4136 fi
4137
4138   if test "x$ac_ct_STRIP" = x; then
4139     STRIP=":"
4140   else
4141     case $cross_compiling:$ac_tool_warned in
4142 yes:)
4143 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4144 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4145 ac_tool_warned=yes ;;
4146 esac
4147     STRIP=$ac_ct_STRIP
4148   fi
4149 else
4150   STRIP="$ac_cv_prog_STRIP"
4151 fi
4152
4153 fi
4154 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
4155
4156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
4157 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
4158 if test -z "$MKDIR_P"; then
4159   if ${ac_cv_path_mkdir+:} false; then :
4160   $as_echo_n "(cached) " >&6
4161 else
4162   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4163 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
4164 do
4165   IFS=$as_save_IFS
4166   test -z "$as_dir" && as_dir=.
4167     for ac_prog in mkdir gmkdir; do
4168          for ac_exec_ext in '' $ac_executable_extensions; do
4169            as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
4170            case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
4171              'mkdir (GNU coreutils) '* | \
4172              'mkdir (coreutils) '* | \
4173              'mkdir (fileutils) '4.1*)
4174                ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
4175                break 3;;
4176            esac
4177          done
4178        done
4179   done
4180 IFS=$as_save_IFS
4181
4182 fi
4183
4184   test -d ./--version && rmdir ./--version
4185   if test "${ac_cv_path_mkdir+set}" = set; then
4186     MKDIR_P="$ac_cv_path_mkdir -p"
4187   else
4188     # As a last resort, use the slow shell script.  Don't cache a
4189     # value for MKDIR_P within a source directory, because that will
4190     # break other packages using the cache if that directory is
4191     # removed, or if the value is a relative name.
4192     MKDIR_P="$ac_install_sh -d"
4193   fi
4194 fi
4195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
4196 $as_echo "$MKDIR_P" >&6; }
4197
4198 mkdir_p="$MKDIR_P"
4199 case $mkdir_p in
4200   [\\/$]* | ?:[\\/]*) ;;
4201   */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
4202 esac
4203
4204 for ac_prog in gawk mawk nawk awk
4205 do
4206   # Extract the first word of "$ac_prog", so it can be a program name with args.
4207 set dummy $ac_prog; ac_word=$2
4208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4209 $as_echo_n "checking for $ac_word... " >&6; }
4210 if ${ac_cv_prog_AWK+:} false; then :
4211   $as_echo_n "(cached) " >&6
4212 else
4213   if test -n "$AWK"; then
4214   ac_cv_prog_AWK="$AWK" # Let the user override the test.
4215 else
4216 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4217 for as_dir in $PATH
4218 do
4219   IFS=$as_save_IFS
4220   test -z "$as_dir" && as_dir=.
4221     for ac_exec_ext in '' $ac_executable_extensions; do
4222   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4223     ac_cv_prog_AWK="$ac_prog"
4224     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4225     break 2
4226   fi
4227 done
4228   done
4229 IFS=$as_save_IFS
4230
4231 fi
4232 fi
4233 AWK=$ac_cv_prog_AWK
4234 if test -n "$AWK"; then
4235   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
4236 $as_echo "$AWK" >&6; }
4237 else
4238   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4239 $as_echo "no" >&6; }
4240 fi
4241
4242
4243   test -n "$AWK" && break
4244 done
4245
4246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4247 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
4248 set x ${MAKE-make}
4249 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
4250 if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
4251   $as_echo_n "(cached) " >&6
4252 else
4253   cat >conftest.make <<\_ACEOF
4254 SHELL = /bin/sh
4255 all:
4256         @echo '@@@%%%=$(MAKE)=@@@%%%'
4257 _ACEOF
4258 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
4259 case `${MAKE-make} -f conftest.make 2>/dev/null` in
4260   *@@@%%%=?*=@@@%%%*)
4261     eval ac_cv_prog_make_${ac_make}_set=yes;;
4262   *)
4263     eval ac_cv_prog_make_${ac_make}_set=no;;
4264 esac
4265 rm -f conftest.make
4266 fi
4267 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
4268   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4269 $as_echo "yes" >&6; }
4270   SET_MAKE=
4271 else
4272   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4273 $as_echo "no" >&6; }
4274   SET_MAKE="MAKE=${MAKE-make}"
4275 fi
4276
4277 rm -rf .tst 2>/dev/null
4278 mkdir .tst 2>/dev/null
4279 if test -d .tst; then
4280   am__leading_dot=.
4281 else
4282   am__leading_dot=_
4283 fi
4284 rmdir .tst 2>/dev/null
4285
4286 if test "`cd $srcdir && pwd`" != "`pwd`"; then
4287   # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
4288   # is not polluted with repeated "-I."
4289   am__isrc=' -I$(srcdir)'
4290   # test to see if srcdir already configured
4291   if test -f $srcdir/config.status; then
4292     as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
4293   fi
4294 fi
4295
4296 # test whether we have cygpath
4297 if test -z "$CYGPATH_W"; then
4298   if (cygpath --version) >/dev/null 2>/dev/null; then
4299     CYGPATH_W='cygpath -w'
4300   else
4301     CYGPATH_W=echo
4302   fi
4303 fi
4304
4305
4306 # Define the identity of the package.
4307  PACKAGE='findutils'
4308  VERSION='4.5.14'
4309
4310
4311 cat >>confdefs.h <<_ACEOF
4312 #define PACKAGE "$PACKAGE"
4313 _ACEOF
4314
4315
4316 cat >>confdefs.h <<_ACEOF
4317 #define VERSION "$VERSION"
4318 _ACEOF
4319
4320 # Some tools Automake needs.
4321
4322 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
4323
4324
4325 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
4326
4327
4328 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
4329
4330
4331 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
4332
4333
4334 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
4335
4336 # We need awk for the "check" target.  The system "awk" is bad on
4337 # some platforms.
4338 # Always define AMTAR for backward compatibility.  Yes, it's still used
4339 # in the wild :-(  We should find a proper way to deprecate it ...
4340 AMTAR='$${TAR-tar}'
4341
4342 am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
4343
4344
4345
4346
4347
4348
4349
4350 ac_config_headers="$ac_config_headers config.h"
4351
4352 # Make sure we can run config.sub.
4353 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
4354   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
4355
4356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4357 $as_echo_n "checking build system type... " >&6; }
4358 if ${ac_cv_build+:} false; then :
4359   $as_echo_n "(cached) " >&6
4360 else
4361   ac_build_alias=$build_alias
4362 test "x$ac_build_alias" = x &&
4363   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4364 test "x$ac_build_alias" = x &&
4365   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
4366 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
4367   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
4368
4369 fi
4370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4371 $as_echo "$ac_cv_build" >&6; }
4372 case $ac_cv_build in
4373 *-*-*) ;;
4374 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
4375 esac
4376 build=$ac_cv_build
4377 ac_save_IFS=$IFS; IFS='-'
4378 set x $ac_cv_build
4379 shift
4380 build_cpu=$1
4381 build_vendor=$2
4382 shift; shift
4383 # Remember, the first character of IFS is used to create $*,
4384 # except with old shells:
4385 build_os=$*
4386 IFS=$ac_save_IFS
4387 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
4388
4389
4390 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4391 $as_echo_n "checking host system type... " >&6; }
4392 if ${ac_cv_host+:} false; then :
4393   $as_echo_n "(cached) " >&6
4394 else
4395   if test "x$host_alias" = x; then
4396   ac_cv_host=$ac_cv_build
4397 else
4398   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
4399     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
4400 fi
4401
4402 fi
4403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4404 $as_echo "$ac_cv_host" >&6; }
4405 case $ac_cv_host in
4406 *-*-*) ;;
4407 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
4408 esac
4409 host=$ac_cv_host
4410 ac_save_IFS=$IFS; IFS='-'
4411 set x $ac_cv_host
4412 shift
4413 host_cpu=$1
4414 host_vendor=$2
4415 shift; shift
4416 # Remember, the first character of IFS is used to create $*,
4417 # except with old shells:
4418 host_os=$*
4419 IFS=$ac_save_IFS
4420 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
4421
4422
4423
4424
4425 ALL_LINGUAS="be bg cs ca da de el eo es et fi fr ga gl hr hu id it ja ko lg lt ms nl pl pt pt_BR ro ru rw sk sl sr sv tr uk vi zh_CN zh_TW"
4426
4427 AUXDIR=$ac_aux_dir
4428
4429
4430 # Check whether --with-fts was given.
4431 if test "${with_fts+set}" = set; then :
4432   withval=$with_fts; with_fts=$withval
4433 fi
4434
4435   case $with_fts in
4436         yes|no) ;;
4437         '')     with_fts=yes ;;
4438         *) as_fn_error $? "Invalid value for --with-fts: $with_fts" "$LINENO" 5
4439   esac
4440    if test x"${with_fts-no}" != xno; then
4441   WITH_FTS_TRUE=
4442   WITH_FTS_FALSE='#'
4443 else
4444   WITH_FTS_TRUE='#'
4445   WITH_FTS_FALSE=
4446 fi
4447
4448   if test x"${with_fts-no}" != xno ; then
4449
4450 $as_echo "#define WITH_FTS 1" >>confdefs.h
4451
4452   fi
4453
4454
4455 # Check whether --enable-id-cache was given.
4456 if test "${enable_id_cache+set}" = set; then :
4457   enableval=$enable_id_cache;
4458 $as_echo "#define CACHE_IDS 1" >>confdefs.h
4459
4460 fi
4461
4462
4463 # Check whether --enable-debug was given.
4464 if test "${enable_debug+set}" = set; then :
4465   enableval=$enable_debug; ac_cv_debug=$enableval
4466 else
4467   ac_cv_debug=no
4468 fi
4469
4470
4471 # Check whether --enable-leaf-optimisation was given.
4472 if test "${enable_leaf_optimisation+set}" = set; then :
4473   enableval=$enable_leaf_optimisation; ac_cv_leaf_optimisation=$enableval
4474 else
4475   ac_cv_leaf_optimisation=yes
4476 fi
4477
4478
4479 # Check whether --enable-d_type-optimization was given.
4480 if test "${enable_d_type_optimization+set}" = set; then :
4481   enableval=$enable_d_type_optimization; ac_cv_d_type=$enableval
4482 else
4483   ac_cv_d_type=yes
4484 fi
4485
4486
4487 # Check whether --enable-d_type-optimisation was given.
4488 if test "${enable_d_type_optimisation+set}" = set; then :
4489   enableval=$enable_d_type_optimisation; ac_cv_d_type=$enableval
4490 fi
4491
4492
4493
4494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether debug output should be produced" >&5
4495 $as_echo_n "checking whether debug output should be produced... " >&6; }
4496 if test x$ac_cv_debug = xno; then
4497    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4498 $as_echo "no" >&6; }
4499 else
4500    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4501 $as_echo "yes" >&6; }
4502
4503 $as_echo "#define DEBUG 1" >>confdefs.h
4504
4505
4506 $as_echo "#define DEBUG_STAT 1" >>confdefs.h
4507
4508 fi
4509
4510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for leaf optimisation" >&5
4511 $as_echo_n "checking for leaf optimisation... " >&6; }
4512 if test x$ac_cv_leaf_optimisation = xno; then
4513    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4514 $as_echo "no" >&6; }
4515 else
4516    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4517 $as_echo "yes" >&6; }
4518
4519 $as_echo "#define LEAF_OPTIMISATION 1" >>confdefs.h
4520
4521 fi
4522
4523
4524 if test -n "$DEFAULT_ARG_SIZE"; then
4525
4526 cat >>confdefs.h <<_ACEOF
4527 #define DEFAULT_ARG_SIZE $DEFAULT_ARG_SIZE
4528 _ACEOF
4529
4530 fi
4531
4532
4533
4534 ac_ext=c
4535 ac_cpp='$CPP $CPPFLAGS'
4536 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4537 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4538 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4539 if test -n "$ac_tool_prefix"; then
4540   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4541 set dummy ${ac_tool_prefix}gcc; ac_word=$2
4542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4543 $as_echo_n "checking for $ac_word... " >&6; }
4544 if ${ac_cv_prog_CC+:} false; then :
4545   $as_echo_n "(cached) " >&6
4546 else
4547   if test -n "$CC"; then
4548   ac_cv_prog_CC="$CC" # Let the user override the test.
4549 else
4550 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4551 for as_dir in $PATH
4552 do
4553   IFS=$as_save_IFS
4554   test -z "$as_dir" && as_dir=.
4555     for ac_exec_ext in '' $ac_executable_extensions; do
4556   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4557     ac_cv_prog_CC="${ac_tool_prefix}gcc"
4558     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4559     break 2
4560   fi
4561 done
4562   done
4563 IFS=$as_save_IFS
4564
4565 fi
4566 fi
4567 CC=$ac_cv_prog_CC
4568 if test -n "$CC"; then
4569   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4570 $as_echo "$CC" >&6; }
4571 else
4572   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4573 $as_echo "no" >&6; }
4574 fi
4575
4576
4577 fi
4578 if test -z "$ac_cv_prog_CC"; then
4579   ac_ct_CC=$CC
4580   # Extract the first word of "gcc", so it can be a program name with args.
4581 set dummy gcc; ac_word=$2
4582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4583 $as_echo_n "checking for $ac_word... " >&6; }
4584 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4585   $as_echo_n "(cached) " >&6
4586 else
4587   if test -n "$ac_ct_CC"; then
4588   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4589 else
4590 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4591 for as_dir in $PATH
4592 do
4593   IFS=$as_save_IFS
4594   test -z "$as_dir" && as_dir=.
4595     for ac_exec_ext in '' $ac_executable_extensions; do
4596   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4597     ac_cv_prog_ac_ct_CC="gcc"
4598     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4599     break 2
4600   fi
4601 done
4602   done
4603 IFS=$as_save_IFS
4604
4605 fi
4606 fi
4607 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4608 if test -n "$ac_ct_CC"; then
4609   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4610 $as_echo "$ac_ct_CC" >&6; }
4611 else
4612   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4613 $as_echo "no" >&6; }
4614 fi
4615
4616   if test "x$ac_ct_CC" = x; then
4617     CC=""
4618   else
4619     case $cross_compiling:$ac_tool_warned in
4620 yes:)
4621 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4622 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4623 ac_tool_warned=yes ;;
4624 esac
4625     CC=$ac_ct_CC
4626   fi
4627 else
4628   CC="$ac_cv_prog_CC"
4629 fi
4630
4631 if test -z "$CC"; then
4632           if test -n "$ac_tool_prefix"; then
4633     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4634 set dummy ${ac_tool_prefix}cc; ac_word=$2
4635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4636 $as_echo_n "checking for $ac_word... " >&6; }
4637 if ${ac_cv_prog_CC+:} false; then :
4638   $as_echo_n "(cached) " >&6
4639 else
4640   if test -n "$CC"; then
4641   ac_cv_prog_CC="$CC" # Let the user override the test.
4642 else
4643 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4644 for as_dir in $PATH
4645 do
4646   IFS=$as_save_IFS
4647   test -z "$as_dir" && as_dir=.
4648     for ac_exec_ext in '' $ac_executable_extensions; do
4649   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4650     ac_cv_prog_CC="${ac_tool_prefix}cc"
4651     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4652     break 2
4653   fi
4654 done
4655   done
4656 IFS=$as_save_IFS
4657
4658 fi
4659 fi
4660 CC=$ac_cv_prog_CC
4661 if test -n "$CC"; then
4662   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4663 $as_echo "$CC" >&6; }
4664 else
4665   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4666 $as_echo "no" >&6; }
4667 fi
4668
4669
4670   fi
4671 fi
4672 if test -z "$CC"; then
4673   # Extract the first word of "cc", so it can be a program name with args.
4674 set dummy cc; ac_word=$2
4675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4676 $as_echo_n "checking for $ac_word... " >&6; }
4677 if ${ac_cv_prog_CC+:} false; then :
4678   $as_echo_n "(cached) " >&6
4679 else
4680   if test -n "$CC"; then
4681   ac_cv_prog_CC="$CC" # Let the user override the test.
4682 else
4683   ac_prog_rejected=no
4684 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4685 for as_dir in $PATH
4686 do
4687   IFS=$as_save_IFS
4688   test -z "$as_dir" && as_dir=.
4689     for ac_exec_ext in '' $ac_executable_extensions; do
4690   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4691     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4692        ac_prog_rejected=yes
4693        continue
4694      fi
4695     ac_cv_prog_CC="cc"
4696     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4697     break 2
4698   fi
4699 done
4700   done
4701 IFS=$as_save_IFS
4702
4703 if test $ac_prog_rejected = yes; then
4704   # We found a bogon in the path, so make sure we never use it.
4705   set dummy $ac_cv_prog_CC
4706   shift
4707   if test $# != 0; then
4708     # We chose a different compiler from the bogus one.
4709     # However, it has the same basename, so the bogon will be chosen
4710     # first if we set CC to just the basename; use the full file name.
4711     shift
4712     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
4713   fi
4714 fi
4715 fi
4716 fi
4717 CC=$ac_cv_prog_CC
4718 if test -n "$CC"; then
4719   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4720 $as_echo "$CC" >&6; }
4721 else
4722   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4723 $as_echo "no" >&6; }
4724 fi
4725
4726
4727 fi
4728 if test -z "$CC"; then
4729   if test -n "$ac_tool_prefix"; then
4730   for ac_prog in cl.exe
4731   do
4732     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4733 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4735 $as_echo_n "checking for $ac_word... " >&6; }
4736 if ${ac_cv_prog_CC+:} false; then :
4737   $as_echo_n "(cached) " >&6
4738 else
4739   if test -n "$CC"; then
4740   ac_cv_prog_CC="$CC" # Let the user override the test.
4741 else
4742 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4743 for as_dir in $PATH
4744 do
4745   IFS=$as_save_IFS
4746   test -z "$as_dir" && as_dir=.
4747     for ac_exec_ext in '' $ac_executable_extensions; do
4748   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4749     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4750     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4751     break 2
4752   fi
4753 done
4754   done
4755 IFS=$as_save_IFS
4756
4757 fi
4758 fi
4759 CC=$ac_cv_prog_CC
4760 if test -n "$CC"; then
4761   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4762 $as_echo "$CC" >&6; }
4763 else
4764   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4765 $as_echo "no" >&6; }
4766 fi
4767
4768
4769     test -n "$CC" && break
4770   done
4771 fi
4772 if test -z "$CC"; then
4773   ac_ct_CC=$CC
4774   for ac_prog in cl.exe
4775 do
4776   # Extract the first word of "$ac_prog", so it can be a program name with args.
4777 set dummy $ac_prog; ac_word=$2
4778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4779 $as_echo_n "checking for $ac_word... " >&6; }
4780 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4781   $as_echo_n "(cached) " >&6
4782 else
4783   if test -n "$ac_ct_CC"; then
4784   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4785 else
4786 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4787 for as_dir in $PATH
4788 do
4789   IFS=$as_save_IFS
4790   test -z "$as_dir" && as_dir=.
4791     for ac_exec_ext in '' $ac_executable_extensions; do
4792   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4793     ac_cv_prog_ac_ct_CC="$ac_prog"
4794     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4795     break 2
4796   fi
4797 done
4798   done
4799 IFS=$as_save_IFS
4800
4801 fi
4802 fi
4803 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4804 if test -n "$ac_ct_CC"; then
4805   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4806 $as_echo "$ac_ct_CC" >&6; }
4807 else
4808   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4809 $as_echo "no" >&6; }
4810 fi
4811
4812
4813   test -n "$ac_ct_CC" && break
4814 done
4815
4816   if test "x$ac_ct_CC" = x; then
4817     CC=""
4818   else
4819     case $cross_compiling:$ac_tool_warned in
4820 yes:)
4821 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4822 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4823 ac_tool_warned=yes ;;
4824 esac
4825     CC=$ac_ct_CC
4826   fi
4827 fi
4828
4829 fi
4830
4831
4832 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4833 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4834 as_fn_error $? "no acceptable C compiler found in \$PATH
4835 See \`config.log' for more details" "$LINENO" 5; }
4836
4837 # Provide some information about the compiler.
4838 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4839 set X $ac_compile
4840 ac_compiler=$2
4841 for ac_option in --version -v -V -qversion; do
4842   { { ac_try="$ac_compiler $ac_option >&5"
4843 case "(($ac_try" in
4844   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4845   *) ac_try_echo=$ac_try;;
4846 esac
4847 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4848 $as_echo "$ac_try_echo"; } >&5
4849   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4850   ac_status=$?
4851   if test -s conftest.err; then
4852     sed '10a\
4853 ... rest of stderr output deleted ...
4854          10q' conftest.err >conftest.er1
4855     cat conftest.er1 >&5
4856   fi
4857   rm -f conftest.er1 conftest.err
4858   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4859   test $ac_status = 0; }
4860 done
4861
4862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4863 /* end confdefs.h.  */
4864
4865 int
4866 main ()
4867 {
4868
4869   ;
4870   return 0;
4871 }
4872 _ACEOF
4873 ac_clean_files_save=$ac_clean_files
4874 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
4875 # Try to create an executable without -o first, disregard a.out.
4876 # It will help us diagnose broken compilers, and finding out an intuition
4877 # of exeext.
4878 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4879 $as_echo_n "checking whether the C compiler works... " >&6; }
4880 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4881
4882 # The possible output files:
4883 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4884
4885 ac_rmfiles=
4886 for ac_file in $ac_files
4887 do
4888   case $ac_file in
4889     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4890     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4891   esac
4892 done
4893 rm -f $ac_rmfiles
4894
4895 if { { ac_try="$ac_link_default"
4896 case "(($ac_try" in
4897   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4898   *) ac_try_echo=$ac_try;;
4899 esac
4900 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4901 $as_echo "$ac_try_echo"; } >&5
4902   (eval "$ac_link_default") 2>&5
4903   ac_status=$?
4904   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4905   test $ac_status = 0; }; then :
4906   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4907 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4908 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
4909 # so that the user can short-circuit this test for compilers unknown to
4910 # Autoconf.
4911 for ac_file in $ac_files ''
4912 do
4913   test -f "$ac_file" || continue
4914   case $ac_file in
4915     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4916         ;;
4917     [ab].out )
4918         # We found the default executable, but exeext='' is most
4919         # certainly right.
4920         break;;
4921     *.* )
4922         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4923         then :; else
4924            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4925         fi
4926         # We set ac_cv_exeext here because the later test for it is not
4927         # safe: cross compilers may not add the suffix if given an `-o'
4928         # argument, so we may need to know it at that point already.
4929         # Even if this section looks crufty: it has the advantage of
4930         # actually working.
4931         break;;
4932     * )
4933         break;;
4934   esac
4935 done
4936 test "$ac_cv_exeext" = no && ac_cv_exeext=
4937
4938 else
4939   ac_file=''
4940 fi
4941 if test -z "$ac_file"; then :
4942   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4943 $as_echo "no" >&6; }
4944 $as_echo "$as_me: failed program was:" >&5
4945 sed 's/^/| /' conftest.$ac_ext >&5
4946
4947 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4948 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4949 as_fn_error 77 "C compiler cannot create executables
4950 See \`config.log' for more details" "$LINENO" 5; }
4951 else
4952   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4953 $as_echo "yes" >&6; }
4954 fi
4955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4956 $as_echo_n "checking for C compiler default output file name... " >&6; }
4957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4958 $as_echo "$ac_file" >&6; }
4959 ac_exeext=$ac_cv_exeext
4960
4961 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4962 ac_clean_files=$ac_clean_files_save
4963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4964 $as_echo_n "checking for suffix of executables... " >&6; }
4965 if { { ac_try="$ac_link"
4966 case "(($ac_try" in
4967   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4968   *) ac_try_echo=$ac_try;;
4969 esac
4970 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4971 $as_echo "$ac_try_echo"; } >&5
4972   (eval "$ac_link") 2>&5
4973   ac_status=$?
4974   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4975   test $ac_status = 0; }; then :
4976   # If both `conftest.exe' and `conftest' are `present' (well, observable)
4977 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
4978 # work properly (i.e., refer to `conftest.exe'), while it won't with
4979 # `rm'.
4980 for ac_file in conftest.exe conftest conftest.*; do
4981   test -f "$ac_file" || continue
4982   case $ac_file in
4983     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4984     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4985           break;;
4986     * ) break;;
4987   esac
4988 done
4989 else
4990   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4991 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4992 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4993 See \`config.log' for more details" "$LINENO" 5; }
4994 fi
4995 rm -f conftest conftest$ac_cv_exeext
4996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4997 $as_echo "$ac_cv_exeext" >&6; }
4998
4999 rm -f conftest.$ac_ext
5000 EXEEXT=$ac_cv_exeext
5001 ac_exeext=$EXEEXT
5002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5003 /* end confdefs.h.  */
5004 #include <stdio.h>
5005 int
5006 main ()
5007 {
5008 FILE *f = fopen ("conftest.out", "w");
5009  return ferror (f) || fclose (f) != 0;
5010
5011   ;
5012   return 0;
5013 }
5014 _ACEOF
5015 ac_clean_files="$ac_clean_files conftest.out"
5016 # Check that the compiler produces executables we can run.  If not, either
5017 # the compiler is broken, or we cross compile.
5018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
5019 $as_echo_n "checking whether we are cross compiling... " >&6; }
5020 if test "$cross_compiling" != yes; then
5021   { { ac_try="$ac_link"
5022 case "(($ac_try" in
5023   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5024   *) ac_try_echo=$ac_try;;
5025 esac
5026 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5027 $as_echo "$ac_try_echo"; } >&5
5028   (eval "$ac_link") 2>&5
5029   ac_status=$?
5030   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5031   test $ac_status = 0; }
5032   if { ac_try='./conftest$ac_cv_exeext'
5033   { { case "(($ac_try" in
5034   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5035   *) ac_try_echo=$ac_try;;
5036 esac
5037 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5038 $as_echo "$ac_try_echo"; } >&5
5039   (eval "$ac_try") 2>&5
5040   ac_status=$?
5041   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5042   test $ac_status = 0; }; }; then
5043     cross_compiling=no
5044   else
5045     if test "$cross_compiling" = maybe; then
5046         cross_compiling=yes
5047     else
5048         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5049 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5050 as_fn_error $? "cannot run C compiled programs.
5051 If you meant to cross compile, use \`--host'.
5052 See \`config.log' for more details" "$LINENO" 5; }
5053     fi
5054   fi
5055 fi
5056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
5057 $as_echo "$cross_compiling" >&6; }
5058
5059 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
5060 ac_clean_files=$ac_clean_files_save
5061 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
5062 $as_echo_n "checking for suffix of object files... " >&6; }
5063 if ${ac_cv_objext+:} false; then :
5064   $as_echo_n "(cached) " >&6
5065 else
5066   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5067 /* end confdefs.h.  */
5068
5069 int
5070 main ()
5071 {
5072
5073   ;
5074   return 0;
5075 }
5076 _ACEOF
5077 rm -f conftest.o conftest.obj
5078 if { { ac_try="$ac_compile"
5079 case "(($ac_try" in
5080   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5081   *) ac_try_echo=$ac_try;;
5082 esac
5083 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5084 $as_echo "$ac_try_echo"; } >&5
5085   (eval "$ac_compile") 2>&5
5086   ac_status=$?
5087   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5088   test $ac_status = 0; }; then :
5089   for ac_file in conftest.o conftest.obj conftest.*; do
5090   test -f "$ac_file" || continue;
5091   case $ac_file in
5092     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
5093     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
5094        break;;
5095   esac
5096 done
5097 else
5098   $as_echo "$as_me: failed program was:" >&5
5099 sed 's/^/| /' conftest.$ac_ext >&5
5100
5101 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5102 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5103 as_fn_error $? "cannot compute suffix of object files: cannot compile
5104 See \`config.log' for more details" "$LINENO" 5; }
5105 fi
5106 rm -f conftest.$ac_cv_objext conftest.$ac_ext
5107 fi
5108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
5109 $as_echo "$ac_cv_objext" >&6; }
5110 OBJEXT=$ac_cv_objext
5111 ac_objext=$OBJEXT
5112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
5113 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
5114 if ${ac_cv_c_compiler_gnu+:} false; then :
5115   $as_echo_n "(cached) " >&6
5116 else
5117   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5118 /* end confdefs.h.  */
5119
5120 int
5121 main ()
5122 {
5123 #ifndef __GNUC__
5124        choke me
5125 #endif
5126
5127   ;
5128   return 0;
5129 }
5130 _ACEOF
5131 if ac_fn_c_try_compile "$LINENO"; then :
5132   ac_compiler_gnu=yes
5133 else
5134   ac_compiler_gnu=no
5135 fi
5136 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5137 ac_cv_c_compiler_gnu=$ac_compiler_gnu
5138
5139 fi
5140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
5141 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
5142 if test $ac_compiler_gnu = yes; then
5143   GCC=yes
5144 else
5145   GCC=
5146 fi
5147 ac_test_CFLAGS=${CFLAGS+set}
5148 ac_save_CFLAGS=$CFLAGS
5149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
5150 $as_echo_n "checking whether $CC accepts -g... " >&6; }
5151 if ${ac_cv_prog_cc_g+:} false; then :
5152   $as_echo_n "(cached) " >&6
5153 else
5154   ac_save_c_werror_flag=$ac_c_werror_flag
5155    ac_c_werror_flag=yes
5156    ac_cv_prog_cc_g=no
5157    CFLAGS="-g"
5158    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5159 /* end confdefs.h.  */
5160
5161 int
5162 main ()
5163 {
5164
5165   ;
5166   return 0;
5167 }
5168 _ACEOF
5169 if ac_fn_c_try_compile "$LINENO"; then :
5170   ac_cv_prog_cc_g=yes
5171 else
5172   CFLAGS=""
5173       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5174 /* end confdefs.h.  */
5175
5176 int
5177 main ()
5178 {
5179
5180   ;
5181   return 0;
5182 }
5183 _ACEOF
5184 if ac_fn_c_try_compile "$LINENO"; then :
5185
5186 else
5187   ac_c_werror_flag=$ac_save_c_werror_flag
5188          CFLAGS="-g"
5189          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5190 /* end confdefs.h.  */
5191
5192 int
5193 main ()
5194 {
5195
5196   ;
5197   return 0;
5198 }
5199 _ACEOF
5200 if ac_fn_c_try_compile "$LINENO"; then :
5201   ac_cv_prog_cc_g=yes
5202 fi
5203 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5204 fi
5205 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5206 fi
5207 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5208    ac_c_werror_flag=$ac_save_c_werror_flag
5209 fi
5210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
5211 $as_echo "$ac_cv_prog_cc_g" >&6; }
5212 if test "$ac_test_CFLAGS" = set; then
5213   CFLAGS=$ac_save_CFLAGS
5214 elif test $ac_cv_prog_cc_g = yes; then
5215   if test "$GCC" = yes; then
5216     CFLAGS="-g -O2"
5217   else
5218     CFLAGS="-g"
5219   fi
5220 else
5221   if test "$GCC" = yes; then
5222     CFLAGS="-O2"
5223   else
5224     CFLAGS=
5225   fi
5226 fi
5227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
5228 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
5229 if ${ac_cv_prog_cc_c89+:} false; then :
5230   $as_echo_n "(cached) " >&6
5231 else
5232   ac_cv_prog_cc_c89=no
5233 ac_save_CC=$CC
5234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5235 /* end confdefs.h.  */
5236 #include <stdarg.h>
5237 #include <stdio.h>
5238 struct stat;
5239 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
5240 struct buf { int x; };
5241 FILE * (*rcsopen) (struct buf *, struct stat *, int);
5242 static char *e (p, i)
5243      char **p;
5244      int i;
5245 {
5246   return p[i];
5247 }
5248 static char *f (char * (*g) (char **, int), char **p, ...)
5249 {
5250   char *s;
5251   va_list v;
5252   va_start (v,p);
5253   s = g (p, va_arg (v,int));
5254   va_end (v);
5255   return s;
5256 }
5257
5258 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
5259    function prototypes and stuff, but not '\xHH' hex character constants.
5260    These don't provoke an error unfortunately, instead are silently treated
5261    as 'x'.  The following induces an error, until -std is added to get
5262    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
5263    array size at least.  It's necessary to write '\x00'==0 to get something
5264    that's true only with -std.  */
5265 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5266
5267 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5268    inside strings and character constants.  */
5269 #define FOO(x) 'x'
5270 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5271
5272 int test (int i, double x);
5273 struct s1 {int (*f) (int a);};
5274 struct s2 {int (*f) (double a);};
5275 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5276 int argc;
5277 char **argv;
5278 int
5279 main ()
5280 {
5281 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
5282   ;
5283   return 0;
5284 }
5285 _ACEOF
5286 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5287         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5288 do
5289   CC="$ac_save_CC $ac_arg"
5290   if ac_fn_c_try_compile "$LINENO"; then :
5291   ac_cv_prog_cc_c89=$ac_arg
5292 fi
5293 rm -f core conftest.err conftest.$ac_objext
5294   test "x$ac_cv_prog_cc_c89" != "xno" && break
5295 done
5296 rm -f conftest.$ac_ext
5297 CC=$ac_save_CC
5298
5299 fi
5300 # AC_CACHE_VAL
5301 case "x$ac_cv_prog_cc_c89" in
5302   x)
5303     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5304 $as_echo "none needed" >&6; } ;;
5305   xno)
5306     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5307 $as_echo "unsupported" >&6; } ;;
5308   *)
5309     CC="$CC $ac_cv_prog_cc_c89"
5310     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5311 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5312 esac
5313 if test "x$ac_cv_prog_cc_c89" != xno; then :
5314
5315 fi
5316
5317 ac_ext=c
5318 ac_cpp='$CPP $CPPFLAGS'
5319 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5320 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5321 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5322 DEPDIR="${am__leading_dot}deps"
5323
5324 ac_config_commands="$ac_config_commands depfiles"
5325
5326
5327 am_make=${MAKE-make}
5328 cat > confinc << 'END'
5329 am__doit:
5330         @echo this is the am__doit target
5331 .PHONY: am__doit
5332 END
5333 # If we don't find an include directive, just comment out the code.
5334 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
5335 $as_echo_n "checking for style of include used by $am_make... " >&6; }
5336 am__include="#"
5337 am__quote=
5338 _am_result=none
5339 # First try GNU make style include.
5340 echo "include confinc" > confmf
5341 # Ignore all kinds of additional output from `make'.
5342 case `$am_make -s -f confmf 2> /dev/null` in #(
5343 *the\ am__doit\ target*)
5344   am__include=include
5345   am__quote=
5346   _am_result=GNU
5347   ;;
5348 esac
5349 # Now try BSD make style include.
5350 if test "$am__include" = "#"; then
5351    echo '.include "confinc"' > confmf
5352    case `$am_make -s -f confmf 2> /dev/null` in #(
5353    *the\ am__doit\ target*)
5354      am__include=.include
5355      am__quote="\""
5356      _am_result=BSD
5357      ;;
5358    esac
5359 fi
5360
5361
5362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
5363 $as_echo "$_am_result" >&6; }
5364 rm -f confinc confmf
5365
5366 # Check whether --enable-dependency-tracking was given.
5367 if test "${enable_dependency_tracking+set}" = set; then :
5368   enableval=$enable_dependency_tracking;
5369 fi
5370
5371 if test "x$enable_dependency_tracking" != xno; then
5372   am_depcomp="$ac_aux_dir/depcomp"
5373   AMDEPBACKSLASH='\'
5374   am__nodep='_no'
5375 fi
5376  if test "x$enable_dependency_tracking" != xno; then
5377   AMDEP_TRUE=
5378   AMDEP_FALSE='#'
5379 else
5380   AMDEP_TRUE='#'
5381   AMDEP_FALSE=
5382 fi
5383
5384
5385
5386 depcc="$CC"   am_compiler_list=
5387
5388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
5389 $as_echo_n "checking dependency style of $depcc... " >&6; }
5390 if ${am_cv_CC_dependencies_compiler_type+:} false; then :
5391   $as_echo_n "(cached) " >&6
5392 else
5393   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
5394   # We make a subdir and do the tests there.  Otherwise we can end up
5395   # making bogus files that we don't know about and never remove.  For
5396   # instance it was reported that on HP-UX the gcc test will end up
5397   # making a dummy file named `D' -- because `-MD' means `put the output
5398   # in D'.
5399   rm -rf conftest.dir
5400   mkdir conftest.dir
5401   # Copy depcomp to subdir because otherwise we won't find it if we're
5402   # using a relative directory.
5403   cp "$am_depcomp" conftest.dir
5404   cd conftest.dir
5405   # We will build objects and dependencies in a subdirectory because
5406   # it helps to detect inapplicable dependency modes.  For instance
5407   # both Tru64's cc and ICC support -MD to output dependencies as a
5408   # side effect of compilation, but ICC will put the dependencies in
5409   # the current directory while Tru64 will put them in the object
5410   # directory.
5411   mkdir sub
5412
5413   am_cv_CC_dependencies_compiler_type=none
5414   if test "$am_compiler_list" = ""; then
5415      am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5416   fi
5417   am__universal=false
5418   case " $depcc " in #(
5419      *\ -arch\ *\ -arch\ *) am__universal=true ;;
5420      esac
5421
5422   for depmode in $am_compiler_list; do
5423     # Setup a source with many dependencies, because some compilers
5424     # like to wrap large dependency lists on column 80 (with \), and
5425     # we should not choose a depcomp mode which is confused by this.
5426     #
5427     # We need to recreate these files for each test, as the compiler may
5428     # overwrite some of them when testing with obscure command lines.
5429     # This happens at least with the AIX C compiler.
5430     : > sub/conftest.c
5431     for i in 1 2 3 4 5 6; do
5432       echo '#include "conftst'$i'.h"' >> sub/conftest.c
5433       # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
5434       # Solaris 8's {/usr,}/bin/sh.
5435       touch sub/conftst$i.h
5436     done
5437     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
5438
5439     # We check with `-c' and `-o' for the sake of the "dashmstdout"
5440     # mode.  It turns out that the SunPro C++ compiler does not properly
5441     # handle `-M -o', and we need to detect this.  Also, some Intel
5442     # versions had trouble with output in subdirs
5443     am__obj=sub/conftest.${OBJEXT-o}
5444     am__minus_obj="-o $am__obj"
5445     case $depmode in
5446     gcc)
5447       # This depmode causes a compiler race in universal mode.
5448       test "$am__universal" = false || continue
5449       ;;
5450     nosideeffect)
5451       # after this tag, mechanisms are not by side-effect, so they'll
5452       # only be used when explicitly requested
5453       if test "x$enable_dependency_tracking" = xyes; then
5454         continue
5455       else
5456         break
5457       fi
5458       ;;
5459     msvc7 | msvc7msys | msvisualcpp | msvcmsys)
5460       # This compiler won't grok `-c -o', but also, the minuso test has
5461       # not run yet.  These depmodes are late enough in the game, and
5462       # so weak that their functioning should not be impacted.
5463       am__obj=conftest.${OBJEXT-o}
5464       am__minus_obj=
5465       ;;
5466     none) break ;;
5467     esac
5468     if depmode=$depmode \
5469        source=sub/conftest.c object=$am__obj \
5470        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5471        $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
5472          >/dev/null 2>conftest.err &&
5473        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
5474        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
5475        grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
5476        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
5477       # icc doesn't choke on unknown options, it will just issue warnings
5478       # or remarks (even with -Werror).  So we grep stderr for any message
5479       # that says an option was ignored or not supported.
5480       # When given -MP, icc 7.0 and 7.1 complain thusly:
5481       #   icc: Command line warning: ignoring option '-M'; no argument required
5482       # The diagnosis changed in icc 8.0:
5483       #   icc: Command line remark: option '-MP' not supported
5484       if (grep 'ignoring option' conftest.err ||
5485           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
5486         am_cv_CC_dependencies_compiler_type=$depmode
5487         break
5488       fi
5489     fi
5490   done
5491
5492   cd ..
5493   rm -rf conftest.dir
5494 else
5495   am_cv_CC_dependencies_compiler_type=none
5496 fi
5497
5498 fi
5499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
5500 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
5501 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
5502
5503  if
5504   test "x$enable_dependency_tracking" != xno \
5505   && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
5506   am__fastdepCC_TRUE=
5507   am__fastdepCC_FALSE='#'
5508 else
5509   am__fastdepCC_TRUE='#'
5510   am__fastdepCC_FALSE=
5511 fi
5512
5513
5514 ac_ext=c
5515 ac_cpp='$CPP $CPPFLAGS'
5516 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5517 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5518 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5520 $as_echo_n "checking how to run the C preprocessor... " >&6; }
5521 # On Suns, sometimes $CPP names a directory.
5522 if test -n "$CPP" && test -d "$CPP"; then
5523   CPP=
5524 fi
5525 if test -z "$CPP"; then
5526   if ${ac_cv_prog_CPP+:} false; then :
5527   $as_echo_n "(cached) " >&6
5528 else
5529       # Double quotes because CPP needs to be expanded
5530     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5531     do
5532       ac_preproc_ok=false
5533 for ac_c_preproc_warn_flag in '' yes
5534 do
5535   # Use a header file that comes with gcc, so configuring glibc
5536   # with a fresh cross-compiler works.
5537   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5538   # <limits.h> exists even on freestanding compilers.
5539   # On the NeXT, cc -E runs the code through the compiler's parser,
5540   # not just through cpp. "Syntax error" is here to catch this case.
5541   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5542 /* end confdefs.h.  */
5543 #ifdef __STDC__
5544 # include <limits.h>
5545 #else
5546 # include <assert.h>
5547 #endif
5548                      Syntax error
5549 _ACEOF
5550 if ac_fn_c_try_cpp "$LINENO"; then :
5551
5552 else
5553   # Broken: fails on valid input.
5554 continue
5555 fi
5556 rm -f conftest.err conftest.i conftest.$ac_ext
5557
5558   # OK, works on sane cases.  Now check whether nonexistent headers
5559   # can be detected and how.
5560   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5561 /* end confdefs.h.  */
5562 #include <ac_nonexistent.h>
5563 _ACEOF
5564 if ac_fn_c_try_cpp "$LINENO"; then :
5565   # Broken: success on invalid input.
5566 continue
5567 else
5568   # Passes both tests.
5569 ac_preproc_ok=:
5570 break
5571 fi
5572 rm -f conftest.err conftest.i conftest.$ac_ext
5573
5574 done
5575 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5576 rm -f conftest.i conftest.err conftest.$ac_ext
5577 if $ac_preproc_ok; then :
5578   break
5579 fi
5580
5581     done
5582     ac_cv_prog_CPP=$CPP
5583
5584 fi
5585   CPP=$ac_cv_prog_CPP
5586 else
5587   ac_cv_prog_CPP=$CPP
5588 fi
5589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5590 $as_echo "$CPP" >&6; }
5591 ac_preproc_ok=false
5592 for ac_c_preproc_warn_flag in '' yes
5593 do
5594   # Use a header file that comes with gcc, so configuring glibc
5595   # with a fresh cross-compiler works.
5596   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5597   # <limits.h> exists even on freestanding compilers.
5598   # On the NeXT, cc -E runs the code through the compiler's parser,
5599   # not just through cpp. "Syntax error" is here to catch this case.
5600   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5601 /* end confdefs.h.  */
5602 #ifdef __STDC__
5603 # include <limits.h>
5604 #else
5605 # include <assert.h>
5606 #endif
5607                      Syntax error
5608 _ACEOF
5609 if ac_fn_c_try_cpp "$LINENO"; then :
5610
5611 else
5612   # Broken: fails on valid input.
5613 continue
5614 fi
5615 rm -f conftest.err conftest.i conftest.$ac_ext
5616
5617   # OK, works on sane cases.  Now check whether nonexistent headers
5618   # can be detected and how.
5619   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5620 /* end confdefs.h.  */
5621 #include <ac_nonexistent.h>
5622 _ACEOF
5623 if ac_fn_c_try_cpp "$LINENO"; then :
5624   # Broken: success on invalid input.
5625 continue
5626 else
5627   # Passes both tests.
5628 ac_preproc_ok=:
5629 break
5630 fi
5631 rm -f conftest.err conftest.i conftest.$ac_ext
5632
5633 done
5634 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5635 rm -f conftest.i conftest.err conftest.$ac_ext
5636 if $ac_preproc_ok; then :
5637
5638 else
5639   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5640 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5641 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
5642 See \`config.log' for more details" "$LINENO" 5; }
5643 fi
5644
5645 ac_ext=c
5646 ac_cpp='$CPP $CPPFLAGS'
5647 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5648 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5649 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5650
5651
5652
5653
5654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5655 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5656 if ${ac_cv_path_GREP+:} false; then :
5657   $as_echo_n "(cached) " >&6
5658 else
5659   if test -z "$GREP"; then
5660   ac_path_GREP_found=false
5661   # Loop through the user's path and test for each of PROGNAME-LIST
5662   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5663 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5664 do
5665   IFS=$as_save_IFS
5666   test -z "$as_dir" && as_dir=.
5667     for ac_prog in grep ggrep; do
5668     for ac_exec_ext in '' $ac_executable_extensions; do
5669       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5670       as_fn_executable_p "$ac_path_GREP" || continue
5671 # Check for GNU ac_path_GREP and select it if it is found.
5672   # Check for GNU $ac_path_GREP
5673 case `"$ac_path_GREP" --version 2>&1` in
5674 *GNU*)
5675   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5676 *)
5677   ac_count=0
5678   $as_echo_n 0123456789 >"conftest.in"
5679   while :
5680   do
5681     cat "conftest.in" "conftest.in" >"conftest.tmp"
5682     mv "conftest.tmp" "conftest.in"
5683     cp "conftest.in" "conftest.nl"
5684     $as_echo 'GREP' >> "conftest.nl"
5685     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5686     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5687     as_fn_arith $ac_count + 1 && ac_count=$as_val
5688     if test $ac_count -gt ${ac_path_GREP_max-0}; then
5689       # Best one so far, save it but keep looking for a better one
5690       ac_cv_path_GREP="$ac_path_GREP"
5691       ac_path_GREP_max=$ac_count
5692     fi
5693     # 10*(2^10) chars as input seems more than enough
5694     test $ac_count -gt 10 && break
5695   done
5696   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5697 esac
5698
5699       $ac_path_GREP_found && break 3
5700     done
5701   done
5702   done
5703 IFS=$as_save_IFS
5704   if test -z "$ac_cv_path_GREP"; then
5705     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5706   fi
5707 else
5708   ac_cv_path_GREP=$GREP
5709 fi
5710
5711 fi
5712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5713 $as_echo "$ac_cv_path_GREP" >&6; }
5714  GREP="$ac_cv_path_GREP"
5715
5716
5717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5718 $as_echo_n "checking for egrep... " >&6; }
5719 if ${ac_cv_path_EGREP+:} false; then :
5720   $as_echo_n "(cached) " >&6
5721 else
5722   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5723    then ac_cv_path_EGREP="$GREP -E"
5724    else
5725      if test -z "$EGREP"; then
5726   ac_path_EGREP_found=false
5727   # Loop through the user's path and test for each of PROGNAME-LIST
5728   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5729 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5730 do
5731   IFS=$as_save_IFS
5732   test -z "$as_dir" && as_dir=.
5733     for ac_prog in egrep; do
5734     for ac_exec_ext in '' $ac_executable_extensions; do
5735       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5736       as_fn_executable_p "$ac_path_EGREP" || continue
5737 # Check for GNU ac_path_EGREP and select it if it is found.
5738   # Check for GNU $ac_path_EGREP
5739 case `"$ac_path_EGREP" --version 2>&1` in
5740 *GNU*)
5741   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5742 *)
5743   ac_count=0
5744   $as_echo_n 0123456789 >"conftest.in"
5745   while :
5746   do
5747     cat "conftest.in" "conftest.in" >"conftest.tmp"
5748     mv "conftest.tmp" "conftest.in"
5749     cp "conftest.in" "conftest.nl"
5750     $as_echo 'EGREP' >> "conftest.nl"
5751     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5752     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5753     as_fn_arith $ac_count + 1 && ac_count=$as_val
5754     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5755       # Best one so far, save it but keep looking for a better one
5756       ac_cv_path_EGREP="$ac_path_EGREP"
5757       ac_path_EGREP_max=$ac_count
5758     fi
5759     # 10*(2^10) chars as input seems more than enough
5760     test $ac_count -gt 10 && break
5761   done
5762   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5763 esac
5764
5765       $ac_path_EGREP_found && break 3
5766     done
5767   done
5768   done
5769 IFS=$as_save_IFS
5770   if test -z "$ac_cv_path_EGREP"; then
5771     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5772   fi
5773 else
5774   ac_cv_path_EGREP=$EGREP
5775 fi
5776
5777    fi
5778 fi
5779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5780 $as_echo "$ac_cv_path_EGREP" >&6; }
5781  EGREP="$ac_cv_path_EGREP"
5782
5783
5784
5785
5786   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
5787 $as_echo_n "checking for Minix Amsterdam compiler... " >&6; }
5788 if ${gl_cv_c_amsterdam_compiler+:} false; then :
5789   $as_echo_n "(cached) " >&6
5790 else
5791
5792       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5793 /* end confdefs.h.  */
5794
5795 #ifdef __ACK__
5796 Amsterdam
5797 #endif
5798
5799 _ACEOF
5800 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5801   $EGREP "Amsterdam" >/dev/null 2>&1; then :
5802   gl_cv_c_amsterdam_compiler=yes
5803 else
5804   gl_cv_c_amsterdam_compiler=no
5805 fi
5806 rm -f conftest*
5807
5808
5809 fi
5810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
5811 $as_echo "$gl_cv_c_amsterdam_compiler" >&6; }
5812   if test -z "$AR"; then
5813     if test $gl_cv_c_amsterdam_compiler = yes; then
5814       AR='cc -c.a'
5815       if test -z "$ARFLAGS"; then
5816         ARFLAGS='-o'
5817       fi
5818     else
5819                   if test -n "$ac_tool_prefix"; then
5820   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
5821 set dummy ${ac_tool_prefix}ar; ac_word=$2
5822 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5823 $as_echo_n "checking for $ac_word... " >&6; }
5824 if ${ac_cv_prog_AR+:} false; then :
5825   $as_echo_n "(cached) " >&6
5826 else
5827   if test -n "$AR"; then
5828   ac_cv_prog_AR="$AR" # Let the user override the test.
5829 else
5830 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5831 for as_dir in $PATH
5832 do
5833   IFS=$as_save_IFS
5834   test -z "$as_dir" && as_dir=.
5835     for ac_exec_ext in '' $ac_executable_extensions; do
5836   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5837     ac_cv_prog_AR="${ac_tool_prefix}ar"
5838     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5839     break 2
5840   fi
5841 done
5842   done
5843 IFS=$as_save_IFS
5844
5845 fi
5846 fi
5847 AR=$ac_cv_prog_AR
5848 if test -n "$AR"; then
5849   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5850 $as_echo "$AR" >&6; }
5851 else
5852   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5853 $as_echo "no" >&6; }
5854 fi
5855
5856
5857 fi
5858 if test -z "$ac_cv_prog_AR"; then
5859   ac_ct_AR=$AR
5860   # Extract the first word of "ar", so it can be a program name with args.
5861 set dummy ar; ac_word=$2
5862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5863 $as_echo_n "checking for $ac_word... " >&6; }
5864 if ${ac_cv_prog_ac_ct_AR+:} false; then :
5865   $as_echo_n "(cached) " >&6
5866 else
5867   if test -n "$ac_ct_AR"; then
5868   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5869 else
5870 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5871 for as_dir in $PATH
5872 do
5873   IFS=$as_save_IFS
5874   test -z "$as_dir" && as_dir=.
5875     for ac_exec_ext in '' $ac_executable_extensions; do
5876   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5877     ac_cv_prog_ac_ct_AR="ar"
5878     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5879     break 2
5880   fi
5881 done
5882   done
5883 IFS=$as_save_IFS
5884
5885 fi
5886 fi
5887 ac_ct_AR=$ac_cv_prog_ac_ct_AR
5888 if test -n "$ac_ct_AR"; then
5889   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5890 $as_echo "$ac_ct_AR" >&6; }
5891 else
5892   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5893 $as_echo "no" >&6; }
5894 fi
5895
5896   if test "x$ac_ct_AR" = x; then
5897     AR="ar"
5898   else
5899     case $cross_compiling:$ac_tool_warned in
5900 yes:)
5901 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5902 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5903 ac_tool_warned=yes ;;
5904 esac
5905     AR=$ac_ct_AR
5906   fi
5907 else
5908   AR="$ac_cv_prog_AR"
5909 fi
5910
5911       if test -z "$ARFLAGS"; then
5912         ARFLAGS='cru'
5913       fi
5914     fi
5915   else
5916     if test -z "$ARFLAGS"; then
5917       ARFLAGS='cru'
5918     fi
5919   fi
5920
5921
5922   if test -z "$RANLIB"; then
5923     if test $gl_cv_c_amsterdam_compiler = yes; then
5924       RANLIB=':'
5925     else
5926             if test -n "$ac_tool_prefix"; then
5927   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5928 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
5929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5930 $as_echo_n "checking for $ac_word... " >&6; }
5931 if ${ac_cv_prog_RANLIB+:} false; then :
5932   $as_echo_n "(cached) " >&6
5933 else
5934   if test -n "$RANLIB"; then
5935   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5936 else
5937 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5938 for as_dir in $PATH
5939 do
5940   IFS=$as_save_IFS
5941   test -z "$as_dir" && as_dir=.
5942     for ac_exec_ext in '' $ac_executable_extensions; do
5943   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5944     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5945     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5946     break 2
5947   fi
5948 done
5949   done
5950 IFS=$as_save_IFS
5951
5952 fi
5953 fi
5954 RANLIB=$ac_cv_prog_RANLIB
5955 if test -n "$RANLIB"; then
5956   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5957 $as_echo "$RANLIB" >&6; }
5958 else
5959   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5960 $as_echo "no" >&6; }
5961 fi
5962
5963
5964 fi
5965 if test -z "$ac_cv_prog_RANLIB"; then
5966   ac_ct_RANLIB=$RANLIB
5967   # Extract the first word of "ranlib", so it can be a program name with args.
5968 set dummy ranlib; ac_word=$2
5969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5970 $as_echo_n "checking for $ac_word... " >&6; }
5971 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
5972   $as_echo_n "(cached) " >&6
5973 else
5974   if test -n "$ac_ct_RANLIB"; then
5975   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5976 else
5977 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5978 for as_dir in $PATH
5979 do
5980   IFS=$as_save_IFS
5981   test -z "$as_dir" && as_dir=.
5982     for ac_exec_ext in '' $ac_executable_extensions; do
5983   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5984     ac_cv_prog_ac_ct_RANLIB="ranlib"
5985     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5986     break 2
5987   fi
5988 done
5989   done
5990 IFS=$as_save_IFS
5991
5992 fi
5993 fi
5994 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5995 if test -n "$ac_ct_RANLIB"; then
5996   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5997 $as_echo "$ac_ct_RANLIB" >&6; }
5998 else
5999   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6000 $as_echo "no" >&6; }
6001 fi
6002
6003   if test "x$ac_ct_RANLIB" = x; then
6004     RANLIB=":"
6005   else
6006     case $cross_compiling:$ac_tool_warned in
6007 yes:)
6008 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6009 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6010 ac_tool_warned=yes ;;
6011 esac
6012     RANLIB=$ac_ct_RANLIB
6013   fi
6014 else
6015   RANLIB="$ac_cv_prog_RANLIB"
6016 fi
6017
6018     fi
6019   fi
6020
6021
6022 if test "x$CC" != xcc; then
6023   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5
6024 $as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
6025 else
6026   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5
6027 $as_echo_n "checking whether cc understands -c and -o together... " >&6; }
6028 fi
6029 set dummy $CC; ac_cc=`$as_echo "$2" |
6030                       sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
6031 if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then :
6032   $as_echo_n "(cached) " >&6
6033 else
6034   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6035 /* end confdefs.h.  */
6036
6037 int
6038 main ()
6039 {
6040
6041   ;
6042   return 0;
6043 }
6044 _ACEOF
6045 # Make sure it works both with $CC and with simple cc.
6046 # We do the test twice because some compilers refuse to overwrite an
6047 # existing .o file with -o, though they will create one.
6048 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
6049 rm -f conftest2.*
6050 if { { case "(($ac_try" in
6051   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6052   *) ac_try_echo=$ac_try;;
6053 esac
6054 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
6055 $as_echo "$ac_try_echo"; } >&5
6056   (eval "$ac_try") 2>&5
6057   ac_status=$?
6058   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6059   test $ac_status = 0; } &&
6060    test -f conftest2.$ac_objext && { { case "(($ac_try" in
6061   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6062   *) ac_try_echo=$ac_try;;
6063 esac
6064 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
6065 $as_echo "$ac_try_echo"; } >&5
6066   (eval "$ac_try") 2>&5
6067   ac_status=$?
6068   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6069   test $ac_status = 0; };
6070 then
6071   eval ac_cv_prog_cc_${ac_cc}_c_o=yes
6072   if test "x$CC" != xcc; then
6073     # Test first that cc exists at all.
6074     if { ac_try='cc -c conftest.$ac_ext >&5'
6075   { { case "(($ac_try" in
6076   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6077   *) ac_try_echo=$ac_try;;
6078 esac
6079 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
6080 $as_echo "$ac_try_echo"; } >&5
6081   (eval "$ac_try") 2>&5
6082   ac_status=$?
6083   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6084   test $ac_status = 0; }; }; then
6085       ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
6086       rm -f conftest2.*
6087       if { { case "(($ac_try" in
6088   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6089   *) ac_try_echo=$ac_try;;
6090 esac
6091 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
6092 $as_echo "$ac_try_echo"; } >&5
6093   (eval "$ac_try") 2>&5
6094   ac_status=$?
6095   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6096   test $ac_status = 0; } &&
6097          test -f conftest2.$ac_objext && { { case "(($ac_try" in
6098   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6099   *) ac_try_echo=$ac_try;;
6100 esac
6101 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
6102 $as_echo "$ac_try_echo"; } >&5
6103   (eval "$ac_try") 2>&5
6104   ac_status=$?
6105   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6106   test $ac_status = 0; };
6107       then
6108         # cc works too.
6109         :
6110       else
6111         # cc exists but doesn't like -o.
6112         eval ac_cv_prog_cc_${ac_cc}_c_o=no
6113       fi
6114     fi
6115   fi
6116 else
6117   eval ac_cv_prog_cc_${ac_cc}_c_o=no
6118 fi
6119 rm -f core conftest*
6120
6121 fi
6122 if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
6123   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6124 $as_echo "yes" >&6; }
6125 else
6126   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6127 $as_echo "no" >&6; }
6128
6129 $as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h
6130
6131 fi
6132
6133 # FIXME: we rely on the cache variable name because
6134 # there is no other way.
6135 set dummy $CC
6136 am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
6137 eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
6138 if test "$am_t" != yes; then
6139    # Losing compiler, so override with the script.
6140    # FIXME: It is wrong to rewrite CC.
6141    # But if we don't then we get into trouble of one sort or another.
6142    # A longer-term fix would be to have automake use am__CC in this case,
6143    # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
6144    CC="$am_aux_dir/compile $CC"
6145 fi
6146
6147
6148 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6149 $as_echo_n "checking for ANSI C header files... " >&6; }
6150 if ${ac_cv_header_stdc+:} false; then :
6151   $as_echo_n "(cached) " >&6
6152 else
6153   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6154 /* end confdefs.h.  */
6155 #include <stdlib.h>
6156 #include <stdarg.h>
6157 #include <string.h>
6158 #include <float.h>
6159
6160 int
6161 main ()
6162 {
6163
6164   ;
6165   return 0;
6166 }
6167 _ACEOF
6168 if ac_fn_c_try_compile "$LINENO"; then :
6169   ac_cv_header_stdc=yes
6170 else
6171   ac_cv_header_stdc=no
6172 fi
6173 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6174
6175 if test $ac_cv_header_stdc = yes; then
6176   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6177   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6178 /* end confdefs.h.  */
6179 #include <string.h>
6180
6181 _ACEOF
6182 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6183   $EGREP "memchr" >/dev/null 2>&1; then :
6184
6185 else
6186   ac_cv_header_stdc=no
6187 fi
6188 rm -f conftest*
6189
6190 fi
6191
6192 if test $ac_cv_header_stdc = yes; then
6193   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6194   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6195 /* end confdefs.h.  */
6196 #include <stdlib.h>
6197
6198 _ACEOF
6199 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6200   $EGREP "free" >/dev/null 2>&1; then :
6201
6202 else
6203   ac_cv_header_stdc=no
6204 fi
6205 rm -f conftest*
6206
6207 fi
6208
6209 if test $ac_cv_header_stdc = yes; then
6210   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6211   if test "$cross_compiling" = yes; then :
6212   :
6213 else
6214   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6215 /* end confdefs.h.  */
6216 #include <ctype.h>
6217 #include <stdlib.h>
6218 #if ((' ' & 0x0FF) == 0x020)
6219 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6220 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6221 #else
6222 # define ISLOWER(c) \
6223                    (('a' <= (c) && (c) <= 'i') \
6224                      || ('j' <= (c) && (c) <= 'r') \
6225                      || ('s' <= (c) && (c) <= 'z'))
6226 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6227 #endif
6228
6229 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6230 int
6231 main ()
6232 {
6233   int i;
6234   for (i = 0; i < 256; i++)
6235     if (XOR (islower (i), ISLOWER (i))
6236         || toupper (i) != TOUPPER (i))
6237       return 2;
6238   return 0;
6239 }
6240 _ACEOF
6241 if ac_fn_c_try_run "$LINENO"; then :
6242
6243 else
6244   ac_cv_header_stdc=no
6245 fi
6246 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6247   conftest.$ac_objext conftest.beam conftest.$ac_ext
6248 fi
6249
6250 fi
6251 fi
6252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6253 $as_echo "$ac_cv_header_stdc" >&6; }
6254 if test $ac_cv_header_stdc = yes; then
6255
6256 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
6257
6258 fi
6259
6260 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
6261 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
6262                   inttypes.h stdint.h unistd.h
6263 do :
6264   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6265 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
6266 "
6267 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6268   cat >>confdefs.h <<_ACEOF
6269 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6270 _ACEOF
6271
6272 fi
6273
6274 done
6275
6276
6277
6278   ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
6279 if test "x$ac_cv_header_minix_config_h" = xyes; then :
6280   MINIX=yes
6281 else
6282   MINIX=
6283 fi
6284
6285
6286   if test "$MINIX" = yes; then
6287
6288 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
6289
6290
6291 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
6292
6293
6294 $as_echo "#define _MINIX 1" >>confdefs.h
6295
6296
6297 $as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
6298
6299   fi
6300
6301
6302   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
6303 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
6304 if ${ac_cv_safe_to_define___extensions__+:} false; then :
6305   $as_echo_n "(cached) " >&6
6306 else
6307   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6308 /* end confdefs.h.  */
6309
6310 #         define __EXTENSIONS__ 1
6311           $ac_includes_default
6312 int
6313 main ()
6314 {
6315
6316   ;
6317   return 0;
6318 }
6319 _ACEOF
6320 if ac_fn_c_try_compile "$LINENO"; then :
6321   ac_cv_safe_to_define___extensions__=yes
6322 else
6323   ac_cv_safe_to_define___extensions__=no
6324 fi
6325 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6326 fi
6327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
6328 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
6329   test $ac_cv_safe_to_define___extensions__ = yes &&
6330     $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
6331
6332   $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
6333
6334   $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
6335
6336   $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
6337
6338   $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
6339
6340   $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
6341
6342   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
6343 $as_echo_n "checking whether _XOPEN_SOURCE should be defined... " >&6; }
6344 if ${ac_cv_should_define__xopen_source+:} false; then :
6345   $as_echo_n "(cached) " >&6
6346 else
6347   ac_cv_should_define__xopen_source=no
6348      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6349 /* end confdefs.h.  */
6350
6351           #include <wchar.h>
6352           mbstate_t x;
6353 int
6354 main ()
6355 {
6356
6357   ;
6358   return 0;
6359 }
6360 _ACEOF
6361 if ac_fn_c_try_compile "$LINENO"; then :
6362
6363 else
6364   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6365 /* end confdefs.h.  */
6366
6367              #define _XOPEN_SOURCE 500
6368              #include <wchar.h>
6369              mbstate_t x;
6370 int
6371 main ()
6372 {
6373
6374   ;
6375   return 0;
6376 }
6377 _ACEOF
6378 if ac_fn_c_try_compile "$LINENO"; then :
6379   ac_cv_should_define__xopen_source=yes
6380 fi
6381 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6382 fi
6383 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6384 fi
6385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
6386 $as_echo "$ac_cv_should_define__xopen_source" >&6; }
6387   test $ac_cv_should_define__xopen_source = yes &&
6388     $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
6389
6390
6391
6392
6393
6394
6395
6396
6397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
6398 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
6399 if ${ac_cv_sys_largefile_source+:} false; then :
6400   $as_echo_n "(cached) " >&6
6401 else
6402   while :; do
6403   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6404 /* end confdefs.h.  */
6405 #include <sys/types.h> /* for off_t */
6406      #include <stdio.h>
6407 int
6408 main ()
6409 {
6410 int (*fp) (FILE *, off_t, int) = fseeko;
6411      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
6412   ;
6413   return 0;
6414 }
6415 _ACEOF
6416 if ac_fn_c_try_link "$LINENO"; then :
6417   ac_cv_sys_largefile_source=no; break
6418 fi
6419 rm -f core conftest.err conftest.$ac_objext \
6420     conftest$ac_exeext conftest.$ac_ext
6421   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6422 /* end confdefs.h.  */
6423 #define _LARGEFILE_SOURCE 1
6424 #include <sys/types.h> /* for off_t */
6425      #include <stdio.h>
6426 int
6427 main ()
6428 {
6429 int (*fp) (FILE *, off_t, int) = fseeko;
6430      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
6431   ;
6432   return 0;
6433 }
6434 _ACEOF
6435 if ac_fn_c_try_link "$LINENO"; then :
6436   ac_cv_sys_largefile_source=1; break
6437 fi
6438 rm -f core conftest.err conftest.$ac_objext \
6439     conftest$ac_exeext conftest.$ac_ext
6440   ac_cv_sys_largefile_source=unknown
6441   break
6442 done
6443 fi
6444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
6445 $as_echo "$ac_cv_sys_largefile_source" >&6; }
6446 case $ac_cv_sys_largefile_source in #(
6447   no | unknown) ;;
6448   *)
6449 cat >>confdefs.h <<_ACEOF
6450 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
6451 _ACEOF
6452 ;;
6453 esac
6454 rm -rf conftest*
6455
6456 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
6457 # in glibc 2.1.3, but that breaks too many other things.
6458 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
6459 if test $ac_cv_sys_largefile_source != unknown; then
6460
6461 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
6462
6463 fi
6464
6465
6466
6467
6468   # IEEE behaviour is the default on all CPUs except Alpha and SH
6469   # (according to the test results of Bruno Haible's ieeefp/fenv_default.m4
6470   # and the GCC 4.1.2 manual).
6471   case "$host_cpu" in
6472     alpha*)
6473       # On Alpha systems, a compiler option provides the behaviour.
6474       # See the ieee(3) manual page, also available at
6475       # <http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/V51B_HTML/MAN/MAN3/0600____.HTM>
6476       if test -n "$GCC"; then
6477         # GCC has the option -mieee.
6478         # For full IEEE compliance (rarely needed), use option -mieee-with-inexact.
6479         CPPFLAGS="$CPPFLAGS -mieee"
6480       else
6481         # Compaq (ex-DEC) C has the option -ieee, equivalent to -ieee_with_no_inexact.
6482         # For full IEEE compliance (rarely needed), use option -ieee_with_inexact.
6483         CPPFLAGS="$CPPFLAGS -ieee"
6484       fi
6485       ;;
6486     sh*)
6487       if test -n "$GCC"; then
6488         # GCC has the option -mieee.
6489         CPPFLAGS="$CPPFLAGS -mieee"
6490       fi
6491       ;;
6492   esac
6493
6494 # Check whether --enable-largefile was given.
6495 if test "${enable_largefile+set}" = set; then :
6496   enableval=$enable_largefile;
6497 fi
6498
6499 if test "$enable_largefile" != no; then
6500
6501   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
6502 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
6503 if ${ac_cv_sys_largefile_CC+:} false; then :
6504   $as_echo_n "(cached) " >&6
6505 else
6506   ac_cv_sys_largefile_CC=no
6507      if test "$GCC" != yes; then
6508        ac_save_CC=$CC
6509        while :; do
6510          # IRIX 6.2 and later do not support large files by default,
6511          # so use the C compiler's -n32 option if that helps.
6512          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6513 /* end confdefs.h.  */
6514 #include <sys/types.h>
6515  /* Check that off_t can represent 2**63 - 1 correctly.
6516     We can't simply define LARGE_OFF_T to be 9223372036854775807,
6517     since some C++ compilers masquerading as C compilers
6518     incorrectly reject 9223372036854775807.  */
6519 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6520   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6521                        && LARGE_OFF_T % 2147483647 == 1)
6522                       ? 1 : -1];
6523 int
6524 main ()
6525 {
6526
6527   ;
6528   return 0;
6529 }
6530 _ACEOF
6531          if ac_fn_c_try_compile "$LINENO"; then :
6532   break
6533 fi
6534 rm -f core conftest.err conftest.$ac_objext
6535          CC="$CC -n32"
6536          if ac_fn_c_try_compile "$LINENO"; then :
6537   ac_cv_sys_largefile_CC=' -n32'; break
6538 fi
6539 rm -f core conftest.err conftest.$ac_objext
6540          break
6541        done
6542        CC=$ac_save_CC
6543        rm -f conftest.$ac_ext
6544     fi
6545 fi
6546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
6547 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
6548   if test "$ac_cv_sys_largefile_CC" != no; then
6549     CC=$CC$ac_cv_sys_largefile_CC
6550   fi
6551
6552   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
6553 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
6554 if ${ac_cv_sys_file_offset_bits+:} false; then :
6555   $as_echo_n "(cached) " >&6
6556 else
6557   while :; do
6558   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6559 /* end confdefs.h.  */
6560 #include <sys/types.h>
6561  /* Check that off_t can represent 2**63 - 1 correctly.
6562     We can't simply define LARGE_OFF_T to be 9223372036854775807,
6563     since some C++ compilers masquerading as C compilers
6564     incorrectly reject 9223372036854775807.  */
6565 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6566   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6567                        && LARGE_OFF_T % 2147483647 == 1)
6568                       ? 1 : -1];
6569 int
6570 main ()
6571 {
6572
6573   ;
6574   return 0;
6575 }
6576 _ACEOF
6577 if ac_fn_c_try_compile "$LINENO"; then :
6578   ac_cv_sys_file_offset_bits=no; break
6579 fi
6580 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6581   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6582 /* end confdefs.h.  */
6583 #define _FILE_OFFSET_BITS 64
6584 #include <sys/types.h>
6585  /* Check that off_t can represent 2**63 - 1 correctly.
6586     We can't simply define LARGE_OFF_T to be 9223372036854775807,
6587     since some C++ compilers masquerading as C compilers
6588     incorrectly reject 9223372036854775807.  */
6589 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6590   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6591                        && LARGE_OFF_T % 2147483647 == 1)
6592                       ? 1 : -1];
6593 int
6594 main ()
6595 {
6596
6597   ;
6598   return 0;
6599 }
6600 _ACEOF
6601 if ac_fn_c_try_compile "$LINENO"; then :
6602   ac_cv_sys_file_offset_bits=64; break
6603 fi
6604 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6605   ac_cv_sys_file_offset_bits=unknown
6606   break
6607 done
6608 fi
6609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
6610 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
6611 case $ac_cv_sys_file_offset_bits in #(
6612   no | unknown) ;;
6613   *)
6614 cat >>confdefs.h <<_ACEOF
6615 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
6616 _ACEOF
6617 ;;
6618 esac
6619 rm -rf conftest*
6620   if test $ac_cv_sys_file_offset_bits = unknown; then
6621     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
6622 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
6623 if ${ac_cv_sys_large_files+:} false; then :
6624   $as_echo_n "(cached) " >&6
6625 else
6626   while :; do
6627   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6628 /* end confdefs.h.  */
6629 #include <sys/types.h>
6630  /* Check that off_t can represent 2**63 - 1 correctly.
6631     We can't simply define LARGE_OFF_T to be 9223372036854775807,
6632     since some C++ compilers masquerading as C compilers
6633     incorrectly reject 9223372036854775807.  */
6634 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6635   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6636                        && LARGE_OFF_T % 2147483647 == 1)
6637                       ? 1 : -1];
6638 int
6639 main ()
6640 {
6641
6642   ;
6643   return 0;
6644 }
6645 _ACEOF
6646 if ac_fn_c_try_compile "$LINENO"; then :
6647   ac_cv_sys_large_files=no; break
6648 fi
6649 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6650   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6651 /* end confdefs.h.  */
6652 #define _LARGE_FILES 1
6653 #include <sys/types.h>
6654  /* Check that off_t can represent 2**63 - 1 correctly.
6655     We can't simply define LARGE_OFF_T to be 9223372036854775807,
6656     since some C++ compilers masquerading as C compilers
6657     incorrectly reject 9223372036854775807.  */
6658 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6659   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6660                        && LARGE_OFF_T % 2147483647 == 1)
6661                       ? 1 : -1];
6662 int
6663 main ()
6664 {
6665
6666   ;
6667   return 0;
6668 }
6669 _ACEOF
6670 if ac_fn_c_try_compile "$LINENO"; then :
6671   ac_cv_sys_large_files=1; break
6672 fi
6673 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6674   ac_cv_sys_large_files=unknown
6675   break
6676 done
6677 fi
6678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
6679 $as_echo "$ac_cv_sys_large_files" >&6; }
6680 case $ac_cv_sys_large_files in #(
6681   no | unknown) ;;
6682   *)
6683 cat >>confdefs.h <<_ACEOF
6684 #define _LARGE_FILES $ac_cv_sys_large_files
6685 _ACEOF
6686 ;;
6687 esac
6688 rm -rf conftest*
6689   fi
6690
6691
6692 $as_echo "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h
6693
6694 fi
6695
6696    case $ac_cv_prog_cc_stdc in #(
6697   no) :
6698     ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #(
6699   *) :
6700     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
6701 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
6702 if ${ac_cv_prog_cc_c99+:} false; then :
6703   $as_echo_n "(cached) " >&6
6704 else
6705   ac_cv_prog_cc_c99=no
6706 ac_save_CC=$CC
6707 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6708 /* end confdefs.h.  */
6709 #include <stdarg.h>
6710 #include <stdbool.h>
6711 #include <stdlib.h>
6712 #include <wchar.h>
6713 #include <stdio.h>
6714
6715 // Check varargs macros.  These examples are taken from C99 6.10.3.5.
6716 #define debug(...) fprintf (stderr, __VA_ARGS__)
6717 #define showlist(...) puts (#__VA_ARGS__)
6718 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
6719 static void
6720 test_varargs_macros (void)
6721 {
6722   int x = 1234;
6723   int y = 5678;
6724   debug ("Flag");
6725   debug ("X = %d\n", x);
6726   showlist (The first, second, and third items.);
6727   report (x>y, "x is %d but y is %d", x, y);
6728 }
6729
6730 // Check long long types.
6731 #define BIG64 18446744073709551615ull
6732 #define BIG32 4294967295ul
6733 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
6734 #if !BIG_OK
6735   your preprocessor is broken;
6736 #endif
6737 #if BIG_OK
6738 #else
6739   your preprocessor is broken;
6740 #endif
6741 static long long int bignum = -9223372036854775807LL;
6742 static unsigned long long int ubignum = BIG64;
6743
6744 struct incomplete_array
6745 {
6746   int datasize;
6747   double data[];
6748 };
6749
6750 struct named_init {
6751   int number;
6752   const wchar_t *name;
6753   double average;
6754 };
6755
6756 typedef const char *ccp;
6757
6758 static inline int
6759 test_restrict (ccp restrict text)
6760 {
6761   // See if C++-style comments work.
6762   // Iterate through items via the restricted pointer.
6763   // Also check for declarations in for loops.
6764   for (unsigned int i = 0; *(text+i) != '\0'; ++i)
6765     continue;
6766   return 0;
6767 }
6768
6769 // Check varargs and va_copy.
6770 static void
6771 test_varargs (const char *format, ...)
6772 {
6773   va_list args;
6774   va_start (args, format);
6775   va_list args_copy;
6776   va_copy (args_copy, args);
6777
6778   const char *str;
6779   int number;
6780   float fnumber;
6781
6782   while (*format)
6783     {
6784       switch (*format++)
6785         {
6786         case 's': // string
6787           str = va_arg (args_copy, const char *);
6788           break;
6789         case 'd': // int
6790           number = va_arg (args_copy, int);
6791           break;
6792         case 'f': // float
6793           fnumber = va_arg (args_copy, double);
6794           break;
6795         default:
6796           break;
6797         }
6798     }
6799   va_end (args_copy);
6800   va_end (args);
6801 }
6802
6803 int
6804 main ()
6805 {
6806
6807   // Check bool.
6808   _Bool success = false;
6809
6810   // Check restrict.
6811   if (test_restrict ("String literal") == 0)
6812     success = true;
6813   char *restrict newvar = "Another string";
6814
6815   // Check varargs.
6816   test_varargs ("s, d' f .", "string", 65, 34.234);
6817   test_varargs_macros ();
6818
6819   // Check flexible array members.
6820   struct incomplete_array *ia =
6821     malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
6822   ia->datasize = 10;
6823   for (int i = 0; i < ia->datasize; ++i)
6824     ia->data[i] = i * 1.234;
6825
6826   // Check named initializers.
6827   struct named_init ni = {
6828     .number = 34,
6829     .name = L"Test wide string",
6830     .average = 543.34343,
6831   };
6832
6833   ni.number = 58;
6834
6835   int dynamic_array[ni.number];
6836   dynamic_array[ni.number - 1] = 543;
6837
6838   // work around unused variable warnings
6839   return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
6840           || dynamic_array[ni.number - 1] != 543);
6841
6842   ;
6843   return 0;
6844 }
6845 _ACEOF
6846 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
6847 do
6848   CC="$ac_save_CC $ac_arg"
6849   if ac_fn_c_try_compile "$LINENO"; then :
6850   ac_cv_prog_cc_c99=$ac_arg
6851 fi
6852 rm -f core conftest.err conftest.$ac_objext
6853   test "x$ac_cv_prog_cc_c99" != "xno" && break
6854 done
6855 rm -f conftest.$ac_ext
6856 CC=$ac_save_CC
6857
6858 fi
6859 # AC_CACHE_VAL
6860 case "x$ac_cv_prog_cc_c99" in
6861   x)
6862     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6863 $as_echo "none needed" >&6; } ;;
6864   xno)
6865     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6866 $as_echo "unsupported" >&6; } ;;
6867   *)
6868     CC="$CC $ac_cv_prog_cc_c99"
6869     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
6870 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
6871 esac
6872 if test "x$ac_cv_prog_cc_c99" != xno; then :
6873   ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
6874 else
6875   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
6876 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
6877 if ${ac_cv_prog_cc_c89+:} false; then :
6878   $as_echo_n "(cached) " >&6
6879 else
6880   ac_cv_prog_cc_c89=no
6881 ac_save_CC=$CC
6882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6883 /* end confdefs.h.  */
6884 #include <stdarg.h>
6885 #include <stdio.h>
6886 struct stat;
6887 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
6888 struct buf { int x; };
6889 FILE * (*rcsopen) (struct buf *, struct stat *, int);
6890 static char *e (p, i)
6891      char **p;
6892      int i;
6893 {
6894   return p[i];
6895 }
6896 static char *f (char * (*g) (char **, int), char **p, ...)
6897 {
6898   char *s;
6899   va_list v;
6900   va_start (v,p);
6901   s = g (p, va_arg (v,int));
6902   va_end (v);
6903   return s;
6904 }
6905
6906 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
6907    function prototypes and stuff, but not '\xHH' hex character constants.
6908    These don't provoke an error unfortunately, instead are silently treated
6909    as 'x'.  The following induces an error, until -std is added to get
6910    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
6911    array size at least.  It's necessary to write '\x00'==0 to get something
6912    that's true only with -std.  */
6913 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
6914
6915 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
6916    inside strings and character constants.  */
6917 #define FOO(x) 'x'
6918 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
6919
6920 int test (int i, double x);
6921 struct s1 {int (*f) (int a);};
6922 struct s2 {int (*f) (double a);};
6923 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
6924 int argc;
6925 char **argv;
6926 int
6927 main ()
6928 {
6929 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
6930   ;
6931   return 0;
6932 }
6933 _ACEOF
6934 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
6935         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
6936 do
6937   CC="$ac_save_CC $ac_arg"
6938   if ac_fn_c_try_compile "$LINENO"; then :
6939   ac_cv_prog_cc_c89=$ac_arg
6940 fi
6941 rm -f core conftest.err conftest.$ac_objext
6942   test "x$ac_cv_prog_cc_c89" != "xno" && break
6943 done
6944 rm -f conftest.$ac_ext
6945 CC=$ac_save_CC
6946
6947 fi
6948 # AC_CACHE_VAL
6949 case "x$ac_cv_prog_cc_c89" in
6950   x)
6951     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6952 $as_echo "none needed" >&6; } ;;
6953   xno)
6954     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6955 $as_echo "unsupported" >&6; } ;;
6956   *)
6957     CC="$CC $ac_cv_prog_cc_c89"
6958     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
6959 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
6960 esac
6961 if test "x$ac_cv_prog_cc_c89" != xno; then :
6962   ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
6963 else
6964   ac_cv_prog_cc_stdc=no
6965 fi
6966
6967 fi
6968  ;;
6969 esac
6970   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5
6971 $as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; }
6972   if ${ac_cv_prog_cc_stdc+:} false; then :
6973   $as_echo_n "(cached) " >&6
6974 fi
6975
6976   case $ac_cv_prog_cc_stdc in #(
6977   no) :
6978     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6979 $as_echo "unsupported" >&6; } ;; #(
6980   '') :
6981     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6982 $as_echo "none needed" >&6; } ;; #(
6983   *) :
6984     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5
6985 $as_echo "$ac_cv_prog_cc_stdc" >&6; } ;;
6986 esac
6987
6988
6989
6990
6991
6992
6993   # Check whether --enable-threads was given.
6994 if test "${enable_threads+set}" = set; then :
6995   enableval=$enable_threads; gl_use_threads=$enableval
6996 else
6997   if test -n "$gl_use_threads_default"; then
6998        gl_use_threads="$gl_use_threads_default"
6999      else
7000        case "$host_os" in
7001                                                                osf*) gl_use_threads=no ;;
7002          cygwin*)
7003                case `uname -r` in
7004                  1.[0-5].*) gl_use_threads=no ;;
7005                  *)         gl_use_threads=yes ;;
7006                esac
7007                ;;
7008          *)    gl_use_threads=yes ;;
7009        esac
7010      fi
7011
7012 fi
7013
7014   if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
7015     # For using <pthread.h>:
7016     case "$host_os" in
7017       osf*)
7018         # On OSF/1, the compiler needs the flag -D_REENTRANT so that it
7019         # groks <pthread.h>. cc also understands the flag -pthread, but
7020         # we don't use it because 1. gcc-2.95 doesn't understand -pthread,
7021         # 2. putting a flag into CPPFLAGS that has an effect on the linker
7022         # causes the AC_LINK_IFELSE test below to succeed unexpectedly,
7023         # leading to wrong values of LIBTHREAD and LTLIBTHREAD.
7024         CPPFLAGS="$CPPFLAGS -D_REENTRANT"
7025         ;;
7026     esac
7027     # Some systems optimize for single-threaded programs by default, and
7028     # need special flags to disable these optimizations. For example, the
7029     # definition of 'errno' in <errno.h>.
7030     case "$host_os" in
7031       aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;;
7032       solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;;
7033     esac
7034   fi
7035
7036
7037
7038
7039   # Code from module absolute-header:
7040   # Code from module accept:
7041   # Code from module accept-tests:
7042   # Code from module alloca:
7043   # Code from module alloca-opt:
7044   # Code from module alloca-opt-tests:
7045   # Code from module allocator:
7046   # Code from module areadlink:
7047   # Code from module areadlink-tests:
7048   # Code from module areadlink-with-size:
7049   # Code from module areadlink-with-size-tests:
7050   # Code from module areadlinkat:
7051   # Code from module areadlinkat-tests:
7052   # Code from module argmatch:
7053   # Code from module argmatch-tests:
7054   # Code from module arpa_inet:
7055   # Code from module arpa_inet-tests:
7056   # Code from module assert:
7057   # Code from module at-internal:
7058   # Code from module binary-io:
7059   # Code from module binary-io-tests:
7060   # Code from module bind:
7061   # Code from module bind-tests:
7062   # Code from module bitrotate:
7063   # Code from module bitrotate-tests:
7064   # Code from module btowc:
7065   # Code from module btowc-tests:
7066   # Code from module byteswap:
7067   # Code from module byteswap-tests:
7068   # Code from module c-ctype:
7069   # Code from module c-ctype-tests:
7070   # Code from module c-strcase:
7071   # Code from module c-strcase-tests:
7072   # Code from module c-strcaseeq:
7073   # Code from module c-strcasestr:
7074   # Code from module c-strcasestr-tests:
7075   # Code from module c-strstr:
7076   # Code from module c-strstr-tests:
7077   # Code from module canonicalize:
7078   # Code from module canonicalize-tests:
7079   # Code from module careadlinkat:
7080   # Code from module chdir:
7081   # Code from module chdir-long:
7082   # Code from module chdir-tests:
7083   # Code from module clock-time:
7084   # Code from module cloexec:
7085   # Code from module cloexec-tests:
7086   # Code from module close:
7087   # Code from module close-stream:
7088   # Code from module close-tests:
7089   # Code from module closedir:
7090   # Code from module closein:
7091   # Code from module closein-tests:
7092   # Code from module closeout:
7093   # Code from module configmake:
7094   # Code from module connect:
7095   # Code from module connect-tests:
7096   # Code from module ctype:
7097   # Code from module ctype-tests:
7098   # Code from module cycle-check:
7099   # Code from module d-ino:
7100   # Code from module d-type:
7101   # Code from module dev-ino:
7102   # Code from module dirent:
7103   # Code from module dirent-safer:
7104   # Code from module dirent-safer-tests:
7105   # Code from module dirent-tests:
7106   # Code from module dirfd:
7107   # Code from module dirname:
7108   # Code from module dirname-lgpl:
7109   # Code from module dirname-tests:
7110   # Code from module dosname:
7111   # Code from module double-slash-root:
7112   # Code from module dup:
7113   # Code from module dup-tests:
7114   # Code from module dup2:
7115   # Code from module dup2-tests:
7116   # Code from module environ:
7117   # Code from module environ-tests:
7118   # Code from module errno:
7119   # Code from module errno-tests:
7120   # Code from module error:
7121   # Code from module euidaccess:
7122   # Code from module exitfail:
7123   # Code from module extensions:
7124
7125   # Code from module extern-inline:
7126   # Code from module faccessat:
7127   # Code from module faccessat-tests:
7128   # Code from module fchdir:
7129   # Code from module fchdir-tests:
7130   # Code from module fcntl:
7131   # Code from module fcntl-h:
7132   # Code from module fcntl-h-tests:
7133   # Code from module fcntl-safer:
7134   # Code from module fcntl-safer-tests:
7135   # Code from module fcntl-tests:
7136   # Code from module fd-hook:
7137   # Code from module fd-safer-flag:
7138   # Code from module fdl:
7139   # Code from module fdopen:
7140   # Code from module fdopen-tests:
7141   # Code from module fdopendir:
7142   # Code from module fdopendir-tests:
7143   # Code from module fflush:
7144
7145   # Code from module fflush-tests:
7146   # Code from module fgetc-tests:
7147   # Code from module file-set:
7148   # Code from module fileblocks:
7149   # Code from module filemode:
7150   # Code from module filename:
7151   # Code from module filenamecat-lgpl:
7152   # Code from module flexmember:
7153   # Code from module float:
7154   # Code from module float-tests:
7155   # Code from module fnmatch:
7156   # Code from module fnmatch-gnu:
7157   # Code from module fnmatch-tests:
7158   # Code from module fopen:
7159   # Code from module fopen-safer:
7160   # Code from module fopen-safer-tests:
7161   # Code from module fopen-tests:
7162   # Code from module fpending:
7163   # Code from module fpending-tests:
7164   # Code from module fpieee:
7165
7166   # Code from module fpucw:
7167   # Code from module fpurge:
7168   # Code from module fpurge-tests:
7169   # Code from module fputc-tests:
7170   # Code from module fread-tests:
7171   # Code from module freadahead:
7172   # Code from module freadahead-tests:
7173   # Code from module freading:
7174   # Code from module freading-tests:
7175   # Code from module fseek:
7176   # Code from module fseek-tests:
7177   # Code from module fseeko:
7178
7179   # Code from module fseeko-tests:
7180   # Code from module fstat:
7181   # Code from module fstat-tests:
7182   # Code from module fstatat:
7183   # Code from module fstatat-tests:
7184   # Code from module ftell:
7185   # Code from module ftell-tests:
7186   # Code from module ftello:
7187
7188   # Code from module ftello-tests:
7189   # Code from module ftruncate:
7190   # Code from module ftruncate-tests:
7191   # Code from module fts:
7192   # Code from module fwrite-tests:
7193   # Code from module getcwd:
7194   # Code from module getcwd-lgpl:
7195   # Code from module getcwd-lgpl-tests:
7196   # Code from module getcwd-tests:
7197   # Code from module getdelim:
7198   # Code from module getdelim-tests:
7199   # Code from module getdtablesize:
7200   # Code from module getdtablesize-tests:
7201   # Code from module getgroups:
7202   # Code from module getgroups-tests:
7203   # Code from module gethostname:
7204   # Code from module gethostname-tests:
7205   # Code from module getline:
7206   # Code from module getline-tests:
7207   # Code from module getopt-gnu:
7208   # Code from module getopt-posix:
7209   # Code from module getopt-posix-tests:
7210   # Code from module getpagesize:
7211   # Code from module gettext:
7212   # Code from module gettext-h:
7213   # Code from module gettime:
7214   # Code from module gettimeofday:
7215   # Code from module gettimeofday-tests:
7216   # Code from module gnumakefile:
7217   # Code from module gpl-3.0:
7218   # Code from module group-member:
7219   # Code from module hash:
7220   # Code from module hash-pjw:
7221   # Code from module hash-tests:
7222   # Code from module hash-triple:
7223   # Code from module havelib:
7224   # Code from module human:
7225   # Code from module i-ring:
7226   # Code from module i-ring-tests:
7227   # Code from module idcache:
7228   # Code from module ignore-value:
7229   # Code from module ignore-value-tests:
7230   # Code from module include_next:
7231   # Code from module inet_pton:
7232   # Code from module inet_pton-tests:
7233   # Code from module inline:
7234   # Code from module intprops:
7235   # Code from module intprops-tests:
7236   # Code from module inttostr:
7237   # Code from module inttostr-tests:
7238   # Code from module inttypes:
7239   # Code from module inttypes-incomplete:
7240   # Code from module inttypes-tests:
7241   # Code from module ioctl:
7242   # Code from module ioctl-tests:
7243   # Code from module isblank:
7244   # Code from module isblank-tests:
7245   # Code from module isfinite:
7246   # Code from module isfinite-tests:
7247   # Code from module isinf:
7248   # Code from module isinf-tests:
7249   # Code from module isnand-nolibm:
7250   # Code from module isnand-nolibm-tests:
7251   # Code from module isnanf-nolibm:
7252   # Code from module isnanf-nolibm-tests:
7253   # Code from module isnanl-nolibm:
7254   # Code from module isnanl-nolibm-tests:
7255   # Code from module iswblank:
7256   # Code from module iswblank-tests:
7257   # Code from module langinfo:
7258   # Code from module langinfo-tests:
7259   # Code from module largefile:
7260
7261   # Code from module listen:
7262   # Code from module listen-tests:
7263   # Code from module localcharset:
7264   # Code from module locale:
7265   # Code from module locale-tests:
7266   # Code from module localeconv:
7267   # Code from module localeconv-tests:
7268   # Code from module localename:
7269   # Code from module localename-tests:
7270   # Code from module lock:
7271   # Code from module lock-tests:
7272   # Code from module lseek:
7273   # Code from module lseek-tests:
7274   # Code from module lstat:
7275   # Code from module lstat-tests:
7276   # Code from module maintainer-makefile:
7277   # Code from module malloc:
7278   # Code from module malloc-gnu:
7279   # Code from module malloc-gnu-tests:
7280   # Code from module malloc-posix:
7281   # Code from module malloca:
7282   # Code from module malloca-tests:
7283   # Code from module manywarnings:
7284   # Code from module math:
7285   # Code from module math-tests:
7286   # Code from module mbchar:
7287   # Code from module mbrtowc:
7288   # Code from module mbrtowc-tests:
7289   # Code from module mbscasestr:
7290   # Code from module mbscasestr-tests:
7291   # Code from module mbsinit:
7292   # Code from module mbsinit-tests:
7293   # Code from module mbslen:
7294   # Code from module mbsrtowcs:
7295   # Code from module mbsrtowcs-tests:
7296   # Code from module mbsstr:
7297   # Code from module mbsstr-tests:
7298   # Code from module mbtowc:
7299   # Code from module mbuiter:
7300   # Code from module memchr:
7301   # Code from module memchr-tests:
7302   # Code from module mempcpy:
7303   # Code from module memrchr:
7304   # Code from module memrchr-tests:
7305   # Code from module mktime:
7306   # Code from module modechange:
7307   # Code from module modf:
7308   # Code from module modf-tests:
7309   # Code from module mountlist:
7310   # Code from module msvc-inval:
7311   # Code from module msvc-nothrow:
7312   # Code from module multiarch:
7313   # Code from module nanosleep:
7314   # Code from module nanosleep-tests:
7315   # Code from module netinet_in:
7316   # Code from module netinet_in-tests:
7317   # Code from module nl_langinfo:
7318   # Code from module nl_langinfo-tests:
7319   # Code from module nocrash:
7320   # Code from module open:
7321   # Code from module open-tests:
7322   # Code from module openat:
7323   # Code from module openat-die:
7324   # Code from module openat-h:
7325   # Code from module openat-safer:
7326   # Code from module openat-safer-tests:
7327   # Code from module openat-tests:
7328   # Code from module opendir:
7329   # Code from module parse-datetime:
7330   # Code from module parse-datetime-tests:
7331   # Code from module pathmax:
7332   # Code from module pathmax-tests:
7333   # Code from module perror:
7334   # Code from module perror-tests:
7335   # Code from module pipe-posix:
7336   # Code from module pipe-posix-tests:
7337   # Code from module priv-set:
7338   # Code from module priv-set-tests:
7339   # Code from module progname:
7340   # Code from module putenv:
7341   # Code from module quote:
7342   # Code from module quotearg:
7343   # Code from module quotearg-simple:
7344   # Code from module quotearg-simple-tests:
7345   # Code from module raise:
7346   # Code from module raise-tests:
7347   # Code from module read:
7348   # Code from module read-tests:
7349   # Code from module readdir:
7350   # Code from module readlink:
7351   # Code from module readlink-tests:
7352   # Code from module readlinkat:
7353   # Code from module readlinkat-tests:
7354   # Code from module realloc:
7355   # Code from module realloc-gnu:
7356   # Code from module realloc-gnu-tests:
7357   # Code from module realloc-posix:
7358   # Code from module regex:
7359   # Code from module regex-tests:
7360   # Code from module rewinddir:
7361   # Code from module rmdir:
7362   # Code from module rmdir-tests:
7363   # Code from module root-uid:
7364   # Code from module rpmatch:
7365   # Code from module safe-read:
7366   # Code from module same:
7367   # Code from module same-inode:
7368   # Code from module save-cwd:
7369   # Code from module savedir:
7370   # Code from module select:
7371   # Code from module select-tests:
7372   # Code from module selinux-at:
7373   # Code from module selinux-h:
7374   # Code from module setenv:
7375   # Code from module setenv-tests:
7376   # Code from module setlocale:
7377   # Code from module setlocale-tests:
7378   # Code from module setsockopt:
7379   # Code from module setsockopt-tests:
7380   # Code from module sigaction:
7381   # Code from module sigaction-tests:
7382   # Code from module signal-h:
7383   # Code from module signal-h-tests:
7384   # Code from module sigprocmask:
7385   # Code from module sigprocmask-tests:
7386   # Code from module size_max:
7387   # Code from module sleep:
7388   # Code from module sleep-tests:
7389   # Code from module snippet/_Noreturn:
7390   # Code from module snippet/arg-nonnull:
7391   # Code from module snippet/c++defs:
7392   # Code from module snippet/unused-parameter:
7393   # Code from module snippet/warn-on-use:
7394   # Code from module snprintf:
7395   # Code from module snprintf-tests:
7396   # Code from module socket:
7397   # Code from module socketlib:
7398   # Code from module sockets:
7399   # Code from module sockets-tests:
7400   # Code from module socklen:
7401   # Code from module ssize_t:
7402   # Code from module stat:
7403   # Code from module stat-macros:
7404   # Code from module stat-size:
7405   # Code from module stat-tests:
7406   # Code from module stat-time:
7407   # Code from module stat-time-tests:
7408   # Code from module statat:
7409   # Code from module statat-tests:
7410   # Code from module stdalign:
7411   # Code from module stdalign-tests:
7412   # Code from module stdarg:
7413
7414
7415
7416   # Code from module stdbool:
7417   # Code from module stdbool-tests:
7418   # Code from module stddef:
7419   # Code from module stddef-tests:
7420   # Code from module stdint:
7421   # Code from module stdint-tests:
7422   # Code from module stdio:
7423   # Code from module stdio-tests:
7424   # Code from module stdlib:
7425   # Code from module stdlib-tests:
7426   # Code from module stpcpy:
7427   # Code from module strcase:
7428   # Code from module strcasestr:
7429   # Code from module strcasestr-simple:
7430   # Code from module strcasestr-tests:
7431   # Code from module strdup-posix:
7432   # Code from module streq:
7433   # Code from module strerror:
7434   # Code from module strerror-override:
7435   # Code from module strerror-tests:
7436   # Code from module strerror_r-posix:
7437   # Code from module strerror_r-posix-tests:
7438   # Code from module strftime:
7439   # Code from module strftime-tests:
7440   # Code from module string:
7441   # Code from module string-tests:
7442   # Code from module strings:
7443   # Code from module strings-tests:
7444   # Code from module strndup:
7445   # Code from module strnlen:
7446   # Code from module strnlen-tests:
7447   # Code from module strnlen1:
7448   # Code from module strstr:
7449   # Code from module strstr-simple:
7450   # Code from module strstr-tests:
7451   # Code from module strtol:
7452   # Code from module strtol-tests:
7453   # Code from module strtoul:
7454   # Code from module strtoul-tests:
7455   # Code from module strtoull:
7456   # Code from module strtoull-tests:
7457   # Code from module strtoumax:
7458   # Code from module strtoumax-tests:
7459   # Code from module symlink:
7460   # Code from module symlink-tests:
7461   # Code from module symlinkat:
7462   # Code from module symlinkat-tests:
7463   # Code from module sys_ioctl:
7464   # Code from module sys_ioctl-tests:
7465   # Code from module sys_select:
7466   # Code from module sys_select-tests:
7467   # Code from module sys_socket:
7468   # Code from module sys_socket-tests:
7469   # Code from module sys_stat:
7470   # Code from module sys_stat-tests:
7471   # Code from module sys_time:
7472   # Code from module sys_time-tests:
7473   # Code from module sys_types:
7474   # Code from module sys_types-tests:
7475   # Code from module sys_uio:
7476   # Code from module sys_uio-tests:
7477   # Code from module sys_utsname:
7478   # Code from module sys_utsname-tests:
7479   # Code from module sys_wait:
7480   # Code from module sys_wait-tests:
7481   # Code from module test-framework-sh:
7482   # Code from module test-framework-sh-tests:
7483   # Code from module thread:
7484   # Code from module thread-tests:
7485   # Code from module threadlib:
7486
7487
7488
7489   # Code from module time:
7490   # Code from module time-tests:
7491   # Code from module time_r:
7492   # Code from module timespec:
7493   # Code from module trunc:
7494   # Code from module trunc-tests:
7495   # Code from module uname:
7496   # Code from module uname-tests:
7497   # Code from module unistd:
7498   # Code from module unistd-safer:
7499   # Code from module unistd-safer-tests:
7500   # Code from module unistd-tests:
7501   # Code from module unitypes:
7502   # Code from module uniwidth/base:
7503   # Code from module uniwidth/width:
7504   # Code from module uniwidth/width-tests:
7505   # Code from module unlink:
7506   # Code from module unlink-tests:
7507   # Code from module unlinkat:
7508   # Code from module unlinkat-tests:
7509   # Code from module unlinkdir:
7510   # Code from module unsetenv:
7511   # Code from module unsetenv-tests:
7512   # Code from module update-copyright:
7513   # Code from module update-copyright-tests:
7514   # Code from module useless-if-before-free:
7515   # Code from module vasnprintf:
7516   # Code from module vasnprintf-tests:
7517   # Code from module vc-list-files:
7518   # Code from module vc-list-files-tests:
7519   # Code from module verify:
7520   # Code from module verify-tests:
7521   # Code from module version-etc:
7522   # Code from module version-etc-fsf:
7523   # Code from module version-etc-tests:
7524   # Code from module warnings:
7525   # Code from module wchar:
7526   # Code from module wchar-tests:
7527   # Code from module wcrtomb:
7528   # Code from module wcrtomb-tests:
7529   # Code from module wctob:
7530   # Code from module wctomb:
7531   # Code from module wctype-h:
7532   # Code from module wctype-h-tests:
7533   # Code from module wcwidth:
7534   # Code from module wcwidth-tests:
7535   # Code from module xalloc:
7536   # Code from module xalloc-die:
7537   # Code from module xalloc-die-tests:
7538   # Code from module xalloc-oversized:
7539   # Code from module xgetcwd:
7540   # Code from module xsize:
7541   # Code from module xstrndup:
7542   # Code from module xstrtod:
7543   # Code from module xstrtol:
7544   # Code from module xstrtol-tests:
7545   # Code from module xstrtoumax:
7546   # Code from module xstrtoumax-tests:
7547   # Code from module yesno:
7548   # Code from module yesno-tests:
7549   # Code from module yield:
7550
7551
7552
7553 if test -n "$ac_tool_prefix"; then
7554   for ac_prog in ar
7555   do
7556     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7557 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7558 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7559 $as_echo_n "checking for $ac_word... " >&6; }
7560 if ${ac_cv_prog_AR+:} false; then :
7561   $as_echo_n "(cached) " >&6
7562 else
7563   if test -n "$AR"; then
7564   ac_cv_prog_AR="$AR" # Let the user override the test.
7565 else
7566 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7567 for as_dir in $PATH
7568 do
7569   IFS=$as_save_IFS
7570   test -z "$as_dir" && as_dir=.
7571     for ac_exec_ext in '' $ac_executable_extensions; do
7572   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7573     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
7574     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7575     break 2
7576   fi
7577 done
7578   done
7579 IFS=$as_save_IFS
7580
7581 fi
7582 fi
7583 AR=$ac_cv_prog_AR
7584 if test -n "$AR"; then
7585   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7586 $as_echo "$AR" >&6; }
7587 else
7588   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7589 $as_echo "no" >&6; }
7590 fi
7591
7592
7593     test -n "$AR" && break
7594   done
7595 fi
7596 if test -z "$AR"; then
7597   ac_ct_AR=$AR
7598   for ac_prog in ar
7599 do
7600   # Extract the first word of "$ac_prog", so it can be a program name with args.
7601 set dummy $ac_prog; ac_word=$2
7602 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7603 $as_echo_n "checking for $ac_word... " >&6; }
7604 if ${ac_cv_prog_ac_ct_AR+:} false; then :
7605   $as_echo_n "(cached) " >&6
7606 else
7607   if test -n "$ac_ct_AR"; then
7608   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7609 else
7610 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7611 for as_dir in $PATH
7612 do
7613   IFS=$as_save_IFS
7614   test -z "$as_dir" && as_dir=.
7615     for ac_exec_ext in '' $ac_executable_extensions; do
7616   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7617     ac_cv_prog_ac_ct_AR="$ac_prog"
7618     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7619     break 2
7620   fi
7621 done
7622   done
7623 IFS=$as_save_IFS
7624
7625 fi
7626 fi
7627 ac_ct_AR=$ac_cv_prog_ac_ct_AR
7628 if test -n "$ac_ct_AR"; then
7629   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
7630 $as_echo "$ac_ct_AR" >&6; }
7631 else
7632   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7633 $as_echo "no" >&6; }
7634 fi
7635
7636
7637   test -n "$ac_ct_AR" && break
7638 done
7639
7640   if test "x$ac_ct_AR" = x; then
7641     AR=""
7642   else
7643     case $cross_compiling:$ac_tool_warned in
7644 yes:)
7645 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7646 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7647 ac_tool_warned=yes ;;
7648 esac
7649     AR=$ac_ct_AR
7650   fi
7651 fi
7652
7653 if test -n "$ac_tool_prefix"; then
7654   for ac_prog in ranlib
7655   do
7656     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7657 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7659 $as_echo_n "checking for $ac_word... " >&6; }
7660 if ${ac_cv_prog_RANLIB+:} false; then :
7661   $as_echo_n "(cached) " >&6
7662 else
7663   if test -n "$RANLIB"; then
7664   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7665 else
7666 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7667 for as_dir in $PATH
7668 do
7669   IFS=$as_save_IFS
7670   test -z "$as_dir" && as_dir=.
7671     for ac_exec_ext in '' $ac_executable_extensions; do
7672   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7673     ac_cv_prog_RANLIB="$ac_tool_prefix$ac_prog"
7674     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7675     break 2
7676   fi
7677 done
7678   done
7679 IFS=$as_save_IFS
7680
7681 fi
7682 fi
7683 RANLIB=$ac_cv_prog_RANLIB
7684 if test -n "$RANLIB"; then
7685   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
7686 $as_echo "$RANLIB" >&6; }
7687 else
7688   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7689 $as_echo "no" >&6; }
7690 fi
7691
7692
7693     test -n "$RANLIB" && break
7694   done
7695 fi
7696 if test -z "$RANLIB"; then
7697   ac_ct_RANLIB=$RANLIB
7698   for ac_prog in ranlib
7699 do
7700   # Extract the first word of "$ac_prog", so it can be a program name with args.
7701 set dummy $ac_prog; ac_word=$2
7702 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7703 $as_echo_n "checking for $ac_word... " >&6; }
7704 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
7705   $as_echo_n "(cached) " >&6
7706 else
7707   if test -n "$ac_ct_RANLIB"; then
7708   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7709 else
7710 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7711 for as_dir in $PATH
7712 do
7713   IFS=$as_save_IFS
7714   test -z "$as_dir" && as_dir=.
7715     for ac_exec_ext in '' $ac_executable_extensions; do
7716   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7717     ac_cv_prog_ac_ct_RANLIB="$ac_prog"
7718     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7719     break 2
7720   fi
7721 done
7722   done
7723 IFS=$as_save_IFS
7724
7725 fi
7726 fi
7727 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7728 if test -n "$ac_ct_RANLIB"; then
7729   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
7730 $as_echo "$ac_ct_RANLIB" >&6; }
7731 else
7732   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7733 $as_echo "no" >&6; }
7734 fi
7735
7736
7737   test -n "$ac_ct_RANLIB" && break
7738 done
7739
7740   if test "x$ac_ct_RANLIB" = x; then
7741     RANLIB=":"
7742   else
7743     case $cross_compiling:$ac_tool_warned in
7744 yes:)
7745 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7746 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7747 ac_tool_warned=yes ;;
7748 esac
7749     RANLIB=$ac_ct_RANLIB
7750   fi
7751 fi
7752
7753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
7754 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
7755 set x ${MAKE-make}
7756 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
7757 if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
7758   $as_echo_n "(cached) " >&6
7759 else
7760   cat >conftest.make <<\_ACEOF
7761 SHELL = /bin/sh
7762 all:
7763         @echo '@@@%%%=$(MAKE)=@@@%%%'
7764 _ACEOF
7765 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
7766 case `${MAKE-make} -f conftest.make 2>/dev/null` in
7767   *@@@%%%=?*=@@@%%%*)
7768     eval ac_cv_prog_make_${ac_make}_set=yes;;
7769   *)
7770     eval ac_cv_prog_make_${ac_make}_set=no;;
7771 esac
7772 rm -f conftest.make
7773 fi
7774 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
7775   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7776 $as_echo "yes" >&6; }
7777   SET_MAKE=
7778 else
7779   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7780 $as_echo "no" >&6; }
7781   SET_MAKE="MAKE=${MAKE-make}"
7782 fi
7783
7784 # Check whether --enable-largefile was given.
7785 if test "${enable_largefile+set}" = set; then :
7786   enableval=$enable_largefile;
7787 fi
7788
7789 if test "$enable_largefile" != no; then
7790
7791   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
7792 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
7793 if ${ac_cv_sys_largefile_CC+:} false; then :
7794   $as_echo_n "(cached) " >&6
7795 else
7796   ac_cv_sys_largefile_CC=no
7797      if test "$GCC" != yes; then
7798        ac_save_CC=$CC
7799        while :; do
7800          # IRIX 6.2 and later do not support large files by default,
7801          # so use the C compiler's -n32 option if that helps.
7802          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7803 /* end confdefs.h.  */
7804 #include <sys/types.h>
7805  /* Check that off_t can represent 2**63 - 1 correctly.
7806     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7807     since some C++ compilers masquerading as C compilers
7808     incorrectly reject 9223372036854775807.  */
7809 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7810   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7811                        && LARGE_OFF_T % 2147483647 == 1)
7812                       ? 1 : -1];
7813 int
7814 main ()
7815 {
7816
7817   ;
7818   return 0;
7819 }
7820 _ACEOF
7821          if ac_fn_c_try_compile "$LINENO"; then :
7822   break
7823 fi
7824 rm -f core conftest.err conftest.$ac_objext
7825          CC="$CC -n32"
7826          if ac_fn_c_try_compile "$LINENO"; then :
7827   ac_cv_sys_largefile_CC=' -n32'; break
7828 fi
7829 rm -f core conftest.err conftest.$ac_objext
7830          break
7831        done
7832        CC=$ac_save_CC
7833        rm -f conftest.$ac_ext
7834     fi
7835 fi
7836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
7837 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
7838   if test "$ac_cv_sys_largefile_CC" != no; then
7839     CC=$CC$ac_cv_sys_largefile_CC
7840   fi
7841
7842   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
7843 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
7844 if ${ac_cv_sys_file_offset_bits+:} false; then :
7845   $as_echo_n "(cached) " >&6
7846 else
7847   while :; do
7848   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7849 /* end confdefs.h.  */
7850 #include <sys/types.h>
7851  /* Check that off_t can represent 2**63 - 1 correctly.
7852     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7853     since some C++ compilers masquerading as C compilers
7854     incorrectly reject 9223372036854775807.  */
7855 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7856   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7857                        && LARGE_OFF_T % 2147483647 == 1)
7858                       ? 1 : -1];
7859 int
7860 main ()
7861 {
7862
7863   ;
7864   return 0;
7865 }
7866 _ACEOF
7867 if ac_fn_c_try_compile "$LINENO"; then :
7868   ac_cv_sys_file_offset_bits=no; break
7869 fi
7870 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7871   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7872 /* end confdefs.h.  */
7873 #define _FILE_OFFSET_BITS 64
7874 #include <sys/types.h>
7875  /* Check that off_t can represent 2**63 - 1 correctly.
7876     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7877     since some C++ compilers masquerading as C compilers
7878     incorrectly reject 9223372036854775807.  */
7879 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7880   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7881                        && LARGE_OFF_T % 2147483647 == 1)
7882                       ? 1 : -1];
7883 int
7884 main ()
7885 {
7886
7887   ;
7888   return 0;
7889 }
7890 _ACEOF
7891 if ac_fn_c_try_compile "$LINENO"; then :
7892   ac_cv_sys_file_offset_bits=64; break
7893 fi
7894 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7895   ac_cv_sys_file_offset_bits=unknown
7896   break
7897 done
7898 fi
7899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
7900 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
7901 case $ac_cv_sys_file_offset_bits in #(
7902   no | unknown) ;;
7903   *)
7904 cat >>confdefs.h <<_ACEOF
7905 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
7906 _ACEOF
7907 ;;
7908 esac
7909 rm -rf conftest*
7910   if test $ac_cv_sys_file_offset_bits = unknown; then
7911     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
7912 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
7913 if ${ac_cv_sys_large_files+:} false; then :
7914   $as_echo_n "(cached) " >&6
7915 else
7916   while :; do
7917   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7918 /* end confdefs.h.  */
7919 #include <sys/types.h>
7920  /* Check that off_t can represent 2**63 - 1 correctly.
7921     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7922     since some C++ compilers masquerading as C compilers
7923     incorrectly reject 9223372036854775807.  */
7924 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7925   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7926                        && LARGE_OFF_T % 2147483647 == 1)
7927                       ? 1 : -1];
7928 int
7929 main ()
7930 {
7931
7932   ;
7933   return 0;
7934 }
7935 _ACEOF
7936 if ac_fn_c_try_compile "$LINENO"; then :
7937   ac_cv_sys_large_files=no; break
7938 fi
7939 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7940   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7941 /* end confdefs.h.  */
7942 #define _LARGE_FILES 1
7943 #include <sys/types.h>
7944  /* Check that off_t can represent 2**63 - 1 correctly.
7945     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7946     since some C++ compilers masquerading as C compilers
7947     incorrectly reject 9223372036854775807.  */
7948 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7949   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7950                        && LARGE_OFF_T % 2147483647 == 1)
7951                       ? 1 : -1];
7952 int
7953 main ()
7954 {
7955
7956   ;
7957   return 0;
7958 }
7959 _ACEOF
7960 if ac_fn_c_try_compile "$LINENO"; then :
7961   ac_cv_sys_large_files=1; break
7962 fi
7963 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7964   ac_cv_sys_large_files=unknown
7965   break
7966 done
7967 fi
7968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
7969 $as_echo "$ac_cv_sys_large_files" >&6; }
7970 case $ac_cv_sys_large_files in #(
7971   no | unknown) ;;
7972   *)
7973 cat >>confdefs.h <<_ACEOF
7974 #define _LARGE_FILES $ac_cv_sys_large_files
7975 _ACEOF
7976 ;;
7977 esac
7978 rm -rf conftest*
7979   fi
7980
7981
7982 $as_echo "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h
7983
7984 fi
7985
7986
7987
7988
7989
7990
7991
7992
7993           LIBC_FATAL_STDERR_=1
7994   export LIBC_FATAL_STDERR_
7995
7996 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
7997 if test "x$ac_cv_type_size_t" = xyes; then :
7998
7999 else
8000
8001 cat >>confdefs.h <<_ACEOF
8002 #define size_t unsigned int
8003 _ACEOF
8004
8005 fi
8006
8007 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
8008 # for constant arguments.  Useless!
8009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
8010 $as_echo_n "checking for working alloca.h... " >&6; }
8011 if ${ac_cv_working_alloca_h+:} false; then :
8012   $as_echo_n "(cached) " >&6
8013 else
8014   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8015 /* end confdefs.h.  */
8016 #include <alloca.h>
8017 int
8018 main ()
8019 {
8020 char *p = (char *) alloca (2 * sizeof (int));
8021                           if (p) return 0;
8022   ;
8023   return 0;
8024 }
8025 _ACEOF
8026 if ac_fn_c_try_link "$LINENO"; then :
8027   ac_cv_working_alloca_h=yes
8028 else
8029   ac_cv_working_alloca_h=no
8030 fi
8031 rm -f core conftest.err conftest.$ac_objext \
8032     conftest$ac_exeext conftest.$ac_ext
8033 fi
8034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
8035 $as_echo "$ac_cv_working_alloca_h" >&6; }
8036 if test $ac_cv_working_alloca_h = yes; then
8037
8038 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
8039
8040 fi
8041
8042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
8043 $as_echo_n "checking for alloca... " >&6; }
8044 if ${ac_cv_func_alloca_works+:} false; then :
8045   $as_echo_n "(cached) " >&6
8046 else
8047   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8048 /* end confdefs.h.  */
8049 #ifdef __GNUC__
8050 # define alloca __builtin_alloca
8051 #else
8052 # ifdef _MSC_VER
8053 #  include <malloc.h>
8054 #  define alloca _alloca
8055 # else
8056 #  ifdef HAVE_ALLOCA_H
8057 #   include <alloca.h>
8058 #  else
8059 #   ifdef _AIX
8060  #pragma alloca
8061 #   else
8062 #    ifndef alloca /* predefined by HP cc +Olibcalls */
8063 void *alloca (size_t);
8064 #    endif
8065 #   endif
8066 #  endif
8067 # endif
8068 #endif
8069
8070 int
8071 main ()
8072 {
8073 char *p = (char *) alloca (1);
8074                                     if (p) return 0;
8075   ;
8076   return 0;
8077 }
8078 _ACEOF
8079 if ac_fn_c_try_link "$LINENO"; then :
8080   ac_cv_func_alloca_works=yes
8081 else
8082   ac_cv_func_alloca_works=no
8083 fi
8084 rm -f core conftest.err conftest.$ac_objext \
8085     conftest$ac_exeext conftest.$ac_ext
8086 fi
8087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
8088 $as_echo "$ac_cv_func_alloca_works" >&6; }
8089
8090 if test $ac_cv_func_alloca_works = yes; then
8091
8092 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
8093
8094 else
8095   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
8096 # that cause trouble.  Some versions do not even contain alloca or
8097 # contain a buggy version.  If you still want to use their alloca,
8098 # use ar to extract alloca.o from them instead of compiling alloca.c.
8099
8100
8101
8102
8103
8104 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
8105
8106 $as_echo "#define C_ALLOCA 1" >>confdefs.h
8107
8108
8109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
8110 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
8111 if ${ac_cv_os_cray+:} false; then :
8112   $as_echo_n "(cached) " >&6
8113 else
8114   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8115 /* end confdefs.h.  */
8116 #if defined CRAY && ! defined CRAY2
8117 webecray
8118 #else
8119 wenotbecray
8120 #endif
8121
8122 _ACEOF
8123 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8124   $EGREP "webecray" >/dev/null 2>&1; then :
8125   ac_cv_os_cray=yes
8126 else
8127   ac_cv_os_cray=no
8128 fi
8129 rm -f conftest*
8130
8131 fi
8132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
8133 $as_echo "$ac_cv_os_cray" >&6; }
8134 if test $ac_cv_os_cray = yes; then
8135   for ac_func in _getb67 GETB67 getb67; do
8136     as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8137 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8138 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
8139
8140 cat >>confdefs.h <<_ACEOF
8141 #define CRAY_STACKSEG_END $ac_func
8142 _ACEOF
8143
8144     break
8145 fi
8146
8147   done
8148 fi
8149
8150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
8151 $as_echo_n "checking stack direction for C alloca... " >&6; }
8152 if ${ac_cv_c_stack_direction+:} false; then :
8153   $as_echo_n "(cached) " >&6
8154 else
8155   if test "$cross_compiling" = yes; then :
8156   ac_cv_c_stack_direction=0
8157 else
8158   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8159 /* end confdefs.h.  */
8160 $ac_includes_default
8161 int
8162 find_stack_direction (int *addr, int depth)
8163 {
8164   int dir, dummy = 0;
8165   if (! addr)
8166     addr = &dummy;
8167   *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
8168   dir = depth ? find_stack_direction (addr, depth - 1) : 0;
8169   return dir + dummy;
8170 }
8171
8172 int
8173 main (int argc, char **argv)
8174 {
8175   return find_stack_direction (0, argc + !argv + 20) < 0;
8176 }
8177 _ACEOF
8178 if ac_fn_c_try_run "$LINENO"; then :
8179   ac_cv_c_stack_direction=1
8180 else
8181   ac_cv_c_stack_direction=-1
8182 fi
8183 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8184   conftest.$ac_objext conftest.beam conftest.$ac_ext
8185 fi
8186
8187 fi
8188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
8189 $as_echo "$ac_cv_c_stack_direction" >&6; }
8190 cat >>confdefs.h <<_ACEOF
8191 #define STACK_DIRECTION $ac_cv_c_stack_direction
8192 _ACEOF
8193
8194
8195 fi
8196
8197
8198   GNULIB_BTOWC=0;
8199   GNULIB_WCTOB=0;
8200   GNULIB_MBSINIT=0;
8201   GNULIB_MBRTOWC=0;
8202   GNULIB_MBRLEN=0;
8203   GNULIB_MBSRTOWCS=0;
8204   GNULIB_MBSNRTOWCS=0;
8205   GNULIB_WCRTOMB=0;
8206   GNULIB_WCSRTOMBS=0;
8207   GNULIB_WCSNRTOMBS=0;
8208   GNULIB_WCWIDTH=0;
8209   GNULIB_WMEMCHR=0;
8210   GNULIB_WMEMCMP=0;
8211   GNULIB_WMEMCPY=0;
8212   GNULIB_WMEMMOVE=0;
8213   GNULIB_WMEMSET=0;
8214   GNULIB_WCSLEN=0;
8215   GNULIB_WCSNLEN=0;
8216   GNULIB_WCSCPY=0;
8217   GNULIB_WCPCPY=0;
8218   GNULIB_WCSNCPY=0;
8219   GNULIB_WCPNCPY=0;
8220   GNULIB_WCSCAT=0;
8221   GNULIB_WCSNCAT=0;
8222   GNULIB_WCSCMP=0;
8223   GNULIB_WCSNCMP=0;
8224   GNULIB_WCSCASECMP=0;
8225   GNULIB_WCSNCASECMP=0;
8226   GNULIB_WCSCOLL=0;
8227   GNULIB_WCSXFRM=0;
8228   GNULIB_WCSDUP=0;
8229   GNULIB_WCSCHR=0;
8230   GNULIB_WCSRCHR=0;
8231   GNULIB_WCSCSPN=0;
8232   GNULIB_WCSSPN=0;
8233   GNULIB_WCSPBRK=0;
8234   GNULIB_WCSSTR=0;
8235   GNULIB_WCSTOK=0;
8236   GNULIB_WCSWIDTH=0;
8237     HAVE_BTOWC=1;
8238   HAVE_MBSINIT=1;
8239   HAVE_MBRTOWC=1;
8240   HAVE_MBRLEN=1;
8241   HAVE_MBSRTOWCS=1;
8242   HAVE_MBSNRTOWCS=1;
8243   HAVE_WCRTOMB=1;
8244   HAVE_WCSRTOMBS=1;
8245   HAVE_WCSNRTOMBS=1;
8246   HAVE_WMEMCHR=1;
8247   HAVE_WMEMCMP=1;
8248   HAVE_WMEMCPY=1;
8249   HAVE_WMEMMOVE=1;
8250   HAVE_WMEMSET=1;
8251   HAVE_WCSLEN=1;
8252   HAVE_WCSNLEN=1;
8253   HAVE_WCSCPY=1;
8254   HAVE_WCPCPY=1;
8255   HAVE_WCSNCPY=1;
8256   HAVE_WCPNCPY=1;
8257   HAVE_WCSCAT=1;
8258   HAVE_WCSNCAT=1;
8259   HAVE_WCSCMP=1;
8260   HAVE_WCSNCMP=1;
8261   HAVE_WCSCASECMP=1;
8262   HAVE_WCSNCASECMP=1;
8263   HAVE_WCSCOLL=1;
8264   HAVE_WCSXFRM=1;
8265   HAVE_WCSDUP=1;
8266   HAVE_WCSCHR=1;
8267   HAVE_WCSRCHR=1;
8268   HAVE_WCSCSPN=1;
8269   HAVE_WCSSPN=1;
8270   HAVE_WCSPBRK=1;
8271   HAVE_WCSSTR=1;
8272   HAVE_WCSTOK=1;
8273   HAVE_WCSWIDTH=1;
8274   HAVE_DECL_WCTOB=1;
8275   HAVE_DECL_WCWIDTH=1;
8276   REPLACE_MBSTATE_T=0;
8277   REPLACE_BTOWC=0;
8278   REPLACE_WCTOB=0;
8279   REPLACE_MBSINIT=0;
8280   REPLACE_MBRTOWC=0;
8281   REPLACE_MBRLEN=0;
8282   REPLACE_MBSRTOWCS=0;
8283   REPLACE_MBSNRTOWCS=0;
8284   REPLACE_WCRTOMB=0;
8285   REPLACE_WCSRTOMBS=0;
8286   REPLACE_WCSNRTOMBS=0;
8287   REPLACE_WCWIDTH=0;
8288   REPLACE_WCSWIDTH=0;
8289
8290
8291             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
8292 $as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
8293 if ${gl_cv_header_wchar_h_correct_inline+:} false; then :
8294   $as_echo_n "(cached) " >&6
8295 else
8296   gl_cv_header_wchar_h_correct_inline=yes
8297      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8298 /* end confdefs.h.  */
8299
8300        #define wcstod renamed_wcstod
8301 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
8302    <wchar.h>.
8303    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
8304    included before <wchar.h>.  */
8305 #include <stddef.h>
8306 #include <stdio.h>
8307 #include <time.h>
8308 #include <wchar.h>
8309 extern int zero (void);
8310 int main () { return zero(); }
8311
8312 _ACEOF
8313      if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
8314   (eval $ac_compile) 2>&5
8315   ac_status=$?
8316   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8317   test $ac_status = 0; }; then
8318        mv conftest.$ac_objext conftest1.$ac_objext
8319        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8320 /* end confdefs.h.  */
8321
8322          #define wcstod renamed_wcstod
8323 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
8324    <wchar.h>.
8325    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
8326    included before <wchar.h>.  */
8327 #include <stddef.h>
8328 #include <stdio.h>
8329 #include <time.h>
8330 #include <wchar.h>
8331 int zero (void) { return 0; }
8332
8333 _ACEOF
8334        if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
8335   (eval $ac_compile) 2>&5
8336   ac_status=$?
8337   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8338   test $ac_status = 0; }; then
8339          mv conftest.$ac_objext conftest2.$ac_objext
8340          if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
8341            :
8342          else
8343            gl_cv_header_wchar_h_correct_inline=no
8344          fi
8345        fi
8346      fi
8347      rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext
8348
8349 fi
8350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
8351 $as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; }
8352   if test $gl_cv_header_wchar_h_correct_inline = no; then
8353     as_fn_error $? "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
8354 This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
8355 C99 mode. You have four options:
8356   - Add the flag -fgnu89-inline to CC and reconfigure, or
8357   - Fix your include files, using parts of
8358     <http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
8359   - Use a gcc version older than 4.3, or
8360   - Don't use the flags -std=c99 or -std=gnu99.
8361 Configuration aborted." "$LINENO" 5
8362   fi
8363
8364
8365
8366
8367
8368   for ac_func in $gl_func_list
8369 do :
8370   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8371 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8372 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
8373   cat >>confdefs.h <<_ACEOF
8374 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
8375 _ACEOF
8376
8377 fi
8378 done
8379
8380
8381
8382
8383
8384
8385   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
8386 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
8387 if ${am_cv_langinfo_codeset+:} false; then :
8388   $as_echo_n "(cached) " >&6
8389 else
8390   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8391 /* end confdefs.h.  */
8392 #include <langinfo.h>
8393 int
8394 main ()
8395 {
8396 char* cs = nl_langinfo(CODESET); return !cs;
8397   ;
8398   return 0;
8399 }
8400 _ACEOF
8401 if ac_fn_c_try_link "$LINENO"; then :
8402   am_cv_langinfo_codeset=yes
8403 else
8404   am_cv_langinfo_codeset=no
8405 fi
8406 rm -f core conftest.err conftest.$ac_objext \
8407     conftest$ac_exeext conftest.$ac_ext
8408
8409 fi
8410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
8411 $as_echo "$am_cv_langinfo_codeset" >&6; }
8412   if test $am_cv_langinfo_codeset = yes; then
8413
8414 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
8415
8416   fi
8417
8418
8419
8420
8421   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
8422 $as_echo_n "checking for a traditional french locale... " >&6; }
8423 if ${gt_cv_locale_fr+:} false; then :
8424   $as_echo_n "(cached) " >&6
8425 else
8426
8427     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8428 /* end confdefs.h.  */
8429
8430 #include <locale.h>
8431 #include <time.h>
8432 #if HAVE_LANGINFO_CODESET
8433 # include <langinfo.h>
8434 #endif
8435 #include <stdlib.h>
8436 #include <string.h>
8437 struct tm t;
8438 char buf[16];
8439 int main () {
8440   /* Check whether the given locale name is recognized by the system.  */
8441 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
8442   /* On native Windows, setlocale(category, "") looks at the system settings,
8443      not at the environment variables.  Also, when an encoding suffix such
8444      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
8445      category of the locale to "C".  */
8446   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
8447       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
8448     return 1;
8449 #else
8450   if (setlocale (LC_ALL, "") == NULL) return 1;
8451 #endif
8452   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
8453      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
8454      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
8455      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
8456      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
8457      some unit tests fail.
8458      On MirBSD 10, when an unsupported locale is specified, setlocale()
8459      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
8460 #if HAVE_LANGINFO_CODESET
8461   {
8462     const char *cs = nl_langinfo (CODESET);
8463     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
8464         || strcmp (cs, "UTF-8") == 0)
8465       return 1;
8466   }
8467 #endif
8468 #ifdef __CYGWIN__
8469   /* On Cygwin, avoid locale names without encoding suffix, because the
8470      locale_charset() function relies on the encoding suffix.  Note that
8471      LC_ALL is set on the command line.  */
8472   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
8473 #endif
8474   /* Check whether in the abbreviation of the second month, the second
8475      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
8476      one byte long. This excludes the UTF-8 encoding.  */
8477   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
8478   if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
8479 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
8480   /* Check whether the decimal separator is a comma.
8481      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
8482      are nl_langinfo(RADIXCHAR) are both ".".  */
8483   if (localeconv () ->decimal_point[0] != ',') return 1;
8484 #endif
8485   return 0;
8486 }
8487
8488 _ACEOF
8489     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
8490   (eval $ac_link) 2>&5
8491   ac_status=$?
8492   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8493   test $ac_status = 0; } && test -s conftest$ac_exeext; then
8494       case "$host_os" in
8495         # Handle native Windows specially, because there setlocale() interprets
8496         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
8497         # "fr" or "fra" as "French" or "French_France.1252",
8498         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
8499         # "ja" as "Japanese" or "Japanese_Japan.932",
8500         # and similar.
8501         mingw*)
8502           # Test for the native Windows locale name.
8503           if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8504             gt_cv_locale_fr=French_France.1252
8505           else
8506             # None found.
8507             gt_cv_locale_fr=none
8508           fi
8509           ;;
8510         *)
8511           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
8512           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
8513           # configure script would override the LC_ALL setting. Likewise for
8514           # LC_CTYPE, which is also set at the beginning of the configure script.
8515           # Test for the usual locale name.
8516           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8517             gt_cv_locale_fr=fr_FR
8518           else
8519             # Test for the locale name with explicit encoding suffix.
8520             if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8521               gt_cv_locale_fr=fr_FR.ISO-8859-1
8522             else
8523               # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
8524               if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8525                 gt_cv_locale_fr=fr_FR.ISO8859-1
8526               else
8527                 # Test for the HP-UX locale name.
8528                 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8529                   gt_cv_locale_fr=fr_FR.iso88591
8530                 else
8531                   # Test for the Solaris 7 locale name.
8532                   if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8533                     gt_cv_locale_fr=fr
8534                   else
8535                     # None found.
8536                     gt_cv_locale_fr=none
8537                   fi
8538                 fi
8539               fi
8540             fi
8541           fi
8542           ;;
8543       esac
8544     fi
8545     rm -fr conftest*
8546
8547 fi
8548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
8549 $as_echo "$gt_cv_locale_fr" >&6; }
8550   LOCALE_FR=$gt_cv_locale_fr
8551
8552
8553
8554
8555
8556
8557
8558
8559
8560   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
8561 $as_echo_n "checking whether // is distinct from /... " >&6; }
8562 if ${gl_cv_double_slash_root+:} false; then :
8563   $as_echo_n "(cached) " >&6
8564 else
8565    if test x"$cross_compiling" = xyes ; then
8566         # When cross-compiling, there is no way to tell whether // is special
8567         # short of a list of hosts.  However, the only known hosts to date
8568         # that have a distinct // are Apollo DomainOS (too old to port to),
8569         # Cygwin, and z/OS.  If anyone knows of another system for which // has
8570         # special semantics and is distinct from /, please report it to
8571         # <bug-gnulib@gnu.org>.
8572         case $host in
8573           *-cygwin | i370-ibm-openedition)
8574             gl_cv_double_slash_root=yes ;;
8575           *)
8576             # Be optimistic and assume that / and // are the same when we
8577             # don't know.
8578             gl_cv_double_slash_root='unknown, assuming no' ;;
8579         esac
8580       else
8581         set x `ls -di / // 2>/dev/null`
8582         if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
8583           gl_cv_double_slash_root=no
8584         else
8585           gl_cv_double_slash_root=yes
8586         fi
8587       fi
8588 fi
8589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
8590 $as_echo "$gl_cv_double_slash_root" >&6; }
8591   if test "$gl_cv_double_slash_root" = yes; then
8592
8593 $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
8594
8595   fi
8596
8597
8598
8599
8600
8601
8602
8603
8604   :
8605
8606
8607
8608
8609
8610      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether realpath works" >&5
8611 $as_echo_n "checking whether realpath works... " >&6; }
8612 if ${gl_cv_func_realpath_works+:} false; then :
8613   $as_echo_n "(cached) " >&6
8614 else
8615
8616     touch conftest.a
8617     mkdir conftest.d
8618     if test "$cross_compiling" = yes; then :
8619   case "$host_os" in
8620                        # Guess yes on glibc systems.
8621         *-gnu* | gnu*) gl_cv_func_realpath_works="guessing yes" ;;
8622                        # If we don't know, assume the worst.
8623         *)             gl_cv_func_realpath_works="guessing no" ;;
8624       esac
8625
8626 else
8627   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8628 /* end confdefs.h.  */
8629
8630
8631
8632 #include <stdlib.h>
8633 #if defined __MACH__ && defined __APPLE__
8634 /* Avoid a crash on Mac OS X.  */
8635 #include <mach/mach.h>
8636 #include <mach/mach_error.h>
8637 #include <mach/thread_status.h>
8638 #include <mach/exception.h>
8639 #include <mach/task.h>
8640 #include <pthread.h>
8641 /* The exception port on which our thread listens.  */
8642 static mach_port_t our_exception_port;
8643 /* The main function of the thread listening for exceptions of type
8644    EXC_BAD_ACCESS.  */
8645 static void *
8646 mach_exception_thread (void *arg)
8647 {
8648   /* Buffer for a message to be received.  */
8649   struct {
8650     mach_msg_header_t head;
8651     mach_msg_body_t msgh_body;
8652     char data[1024];
8653   } msg;
8654   mach_msg_return_t retval;
8655   /* Wait for a message on the exception port.  */
8656   retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
8657                      our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
8658   if (retval != MACH_MSG_SUCCESS)
8659     abort ();
8660   exit (1);
8661 }
8662 static void
8663 nocrash_init (void)
8664 {
8665   mach_port_t self = mach_task_self ();
8666   /* Allocate a port on which the thread shall listen for exceptions.  */
8667   if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
8668       == KERN_SUCCESS) {
8669     /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html.  */
8670     if (mach_port_insert_right (self, our_exception_port, our_exception_port,
8671                                 MACH_MSG_TYPE_MAKE_SEND)
8672         == KERN_SUCCESS) {
8673       /* The exceptions we want to catch.  Only EXC_BAD_ACCESS is interesting
8674          for us.  */
8675       exception_mask_t mask = EXC_MASK_BAD_ACCESS;
8676       /* Create the thread listening on the exception port.  */
8677       pthread_attr_t attr;
8678       pthread_t thread;
8679       if (pthread_attr_init (&attr) == 0
8680           && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
8681           && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
8682         pthread_attr_destroy (&attr);
8683         /* Replace the exception port info for these exceptions with our own.
8684            Note that we replace the exception port for the entire task, not only
8685            for a particular thread.  This has the effect that when our exception
8686            port gets the message, the thread specific exception port has already
8687            been asked, and we don't need to bother about it.
8688            See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html.  */
8689         task_set_exception_ports (self, mask, our_exception_port,
8690                                   EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
8691       }
8692     }
8693   }
8694 }
8695 #elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
8696 /* Avoid a crash on native Windows.  */
8697 #define WIN32_LEAN_AND_MEAN
8698 #include <windows.h>
8699 #include <winerror.h>
8700 static LONG WINAPI
8701 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
8702 {
8703   switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
8704     {
8705     case EXCEPTION_ACCESS_VIOLATION:
8706     case EXCEPTION_IN_PAGE_ERROR:
8707     case EXCEPTION_STACK_OVERFLOW:
8708     case EXCEPTION_GUARD_PAGE:
8709     case EXCEPTION_PRIV_INSTRUCTION:
8710     case EXCEPTION_ILLEGAL_INSTRUCTION:
8711     case EXCEPTION_DATATYPE_MISALIGNMENT:
8712     case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
8713     case EXCEPTION_NONCONTINUABLE_EXCEPTION:
8714       exit (1);
8715     }
8716   return EXCEPTION_CONTINUE_SEARCH;
8717 }
8718 static void
8719 nocrash_init (void)
8720 {
8721   SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
8722 }
8723 #else
8724 /* Avoid a crash on POSIX systems.  */
8725 #include <signal.h>
8726 /* A POSIX signal handler.  */
8727 static void
8728 exception_handler (int sig)
8729 {
8730   exit (1);
8731 }
8732 static void
8733 nocrash_init (void)
8734 {
8735 #ifdef SIGSEGV
8736   signal (SIGSEGV, exception_handler);
8737 #endif
8738 #ifdef SIGBUS
8739   signal (SIGBUS, exception_handler);
8740 #endif
8741 }
8742 #endif
8743
8744         #include <stdlib.h>
8745         #include <string.h>
8746
8747 int
8748 main ()
8749 {
8750
8751         int result = 0;
8752         {
8753           char *name = realpath ("conftest.a", NULL);
8754           if (!(name && *name == '/'))
8755             result |= 1;
8756         }
8757         {
8758           char *name = realpath ("conftest.b/../conftest.a", NULL);
8759           if (name != NULL)
8760             result |= 2;
8761         }
8762         {
8763           char *name = realpath ("conftest.a/", NULL);
8764           if (name != NULL)
8765             result |= 4;
8766         }
8767         {
8768           char *name1 = realpath (".", NULL);
8769           char *name2 = realpath ("conftest.d//./..", NULL);
8770           if (strcmp (name1, name2) != 0)
8771             result |= 8;
8772         }
8773         return result;
8774
8775   ;
8776   return 0;
8777 }
8778
8779 _ACEOF
8780 if ac_fn_c_try_run "$LINENO"; then :
8781   gl_cv_func_realpath_works=yes
8782 else
8783   gl_cv_func_realpath_works=no
8784 fi
8785 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8786   conftest.$ac_objext conftest.beam conftest.$ac_ext
8787 fi
8788
8789     rm -rf conftest.a conftest.d
8790
8791 fi
8792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_realpath_works" >&5
8793 $as_echo "$gl_cv_func_realpath_works" >&6; }
8794   case "$gl_cv_func_realpath_works" in
8795     *yes)
8796
8797 $as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
8798
8799       ;;
8800   esac
8801
8802
8803   GNULIB__EXIT=0;
8804   GNULIB_ATOLL=0;
8805   GNULIB_CALLOC_POSIX=0;
8806   GNULIB_CANONICALIZE_FILE_NAME=0;
8807   GNULIB_GETLOADAVG=0;
8808   GNULIB_GETSUBOPT=0;
8809   GNULIB_GRANTPT=0;
8810   GNULIB_MALLOC_POSIX=0;
8811   GNULIB_MBTOWC=0;
8812   GNULIB_MKDTEMP=0;
8813   GNULIB_MKOSTEMP=0;
8814   GNULIB_MKOSTEMPS=0;
8815   GNULIB_MKSTEMP=0;
8816   GNULIB_MKSTEMPS=0;
8817   GNULIB_POSIX_OPENPT=0;
8818   GNULIB_PTSNAME=0;
8819   GNULIB_PTSNAME_R=0;
8820   GNULIB_PUTENV=0;
8821   GNULIB_RANDOM=0;
8822   GNULIB_RANDOM_R=0;
8823   GNULIB_REALLOC_POSIX=0;
8824   GNULIB_REALPATH=0;
8825   GNULIB_RPMATCH=0;
8826   GNULIB_SECURE_GETENV=0;
8827   GNULIB_SETENV=0;
8828   GNULIB_STRTOD=0;
8829   GNULIB_STRTOLL=0;
8830   GNULIB_STRTOULL=0;
8831   GNULIB_SYSTEM_POSIX=0;
8832   GNULIB_UNLOCKPT=0;
8833   GNULIB_UNSETENV=0;
8834   GNULIB_WCTOMB=0;
8835     HAVE__EXIT=1;
8836   HAVE_ATOLL=1;
8837   HAVE_CANONICALIZE_FILE_NAME=1;
8838   HAVE_DECL_GETLOADAVG=1;
8839   HAVE_GETSUBOPT=1;
8840   HAVE_GRANTPT=1;
8841   HAVE_MKDTEMP=1;
8842   HAVE_MKOSTEMP=1;
8843   HAVE_MKOSTEMPS=1;
8844   HAVE_MKSTEMP=1;
8845   HAVE_MKSTEMPS=1;
8846   HAVE_POSIX_OPENPT=1;
8847   HAVE_PTSNAME=1;
8848   HAVE_PTSNAME_R=1;
8849   HAVE_RANDOM=1;
8850   HAVE_RANDOM_H=1;
8851   HAVE_RANDOM_R=1;
8852   HAVE_REALPATH=1;
8853   HAVE_RPMATCH=1;
8854   HAVE_SECURE_GETENV=1;
8855   HAVE_SETENV=1;
8856   HAVE_DECL_SETENV=1;
8857   HAVE_STRTOD=1;
8858   HAVE_STRTOLL=1;
8859   HAVE_STRTOULL=1;
8860   HAVE_STRUCT_RANDOM_DATA=1;
8861   HAVE_SYS_LOADAVG_H=0;
8862   HAVE_UNLOCKPT=1;
8863   HAVE_DECL_UNSETENV=1;
8864   REPLACE_CALLOC=0;
8865   REPLACE_CANONICALIZE_FILE_NAME=0;
8866   REPLACE_MALLOC=0;
8867   REPLACE_MBTOWC=0;
8868   REPLACE_MKSTEMP=0;
8869   REPLACE_PTSNAME=0;
8870   REPLACE_PTSNAME_R=0;
8871   REPLACE_PUTENV=0;
8872   REPLACE_RANDOM_R=0;
8873   REPLACE_REALLOC=0;
8874   REPLACE_REALPATH=0;
8875   REPLACE_SETENV=0;
8876   REPLACE_STRTOD=0;
8877   REPLACE_UNSETENV=0;
8878   REPLACE_WCTOMB=0;
8879
8880
8881
8882
8883
8884
8885
8886   GNULIB_CHDIR=0;
8887   GNULIB_CHOWN=0;
8888   GNULIB_CLOSE=0;
8889   GNULIB_DUP=0;
8890   GNULIB_DUP2=0;
8891   GNULIB_DUP3=0;
8892   GNULIB_ENVIRON=0;
8893   GNULIB_EUIDACCESS=0;
8894   GNULIB_FACCESSAT=0;
8895   GNULIB_FCHDIR=0;
8896   GNULIB_FCHOWNAT=0;
8897   GNULIB_FDATASYNC=0;
8898   GNULIB_FSYNC=0;
8899   GNULIB_FTRUNCATE=0;
8900   GNULIB_GETCWD=0;
8901   GNULIB_GETDOMAINNAME=0;
8902   GNULIB_GETDTABLESIZE=0;
8903   GNULIB_GETGROUPS=0;
8904   GNULIB_GETHOSTNAME=0;
8905   GNULIB_GETLOGIN=0;
8906   GNULIB_GETLOGIN_R=0;
8907   GNULIB_GETPAGESIZE=0;
8908   GNULIB_GETUSERSHELL=0;
8909   GNULIB_GROUP_MEMBER=0;
8910   GNULIB_ISATTY=0;
8911   GNULIB_LCHOWN=0;
8912   GNULIB_LINK=0;
8913   GNULIB_LINKAT=0;
8914   GNULIB_LSEEK=0;
8915   GNULIB_PIPE=0;
8916   GNULIB_PIPE2=0;
8917   GNULIB_PREAD=0;
8918   GNULIB_PWRITE=0;
8919   GNULIB_READ=0;
8920   GNULIB_READLINK=0;
8921   GNULIB_READLINKAT=0;
8922   GNULIB_RMDIR=0;
8923   GNULIB_SETHOSTNAME=0;
8924   GNULIB_SLEEP=0;
8925   GNULIB_SYMLINK=0;
8926   GNULIB_SYMLINKAT=0;
8927   GNULIB_TTYNAME_R=0;
8928   GNULIB_UNISTD_H_NONBLOCKING=0;
8929   GNULIB_UNISTD_H_SIGPIPE=0;
8930   GNULIB_UNLINK=0;
8931   GNULIB_UNLINKAT=0;
8932   GNULIB_USLEEP=0;
8933   GNULIB_WRITE=0;
8934     HAVE_CHOWN=1;
8935   HAVE_DUP2=1;
8936   HAVE_DUP3=1;
8937   HAVE_EUIDACCESS=1;
8938   HAVE_FACCESSAT=1;
8939   HAVE_FCHDIR=1;
8940   HAVE_FCHOWNAT=1;
8941   HAVE_FDATASYNC=1;
8942   HAVE_FSYNC=1;
8943   HAVE_FTRUNCATE=1;
8944   HAVE_GETDTABLESIZE=1;
8945   HAVE_GETGROUPS=1;
8946   HAVE_GETHOSTNAME=1;
8947   HAVE_GETLOGIN=1;
8948   HAVE_GETPAGESIZE=1;
8949   HAVE_GROUP_MEMBER=1;
8950   HAVE_LCHOWN=1;
8951   HAVE_LINK=1;
8952   HAVE_LINKAT=1;
8953   HAVE_PIPE=1;
8954   HAVE_PIPE2=1;
8955   HAVE_PREAD=1;
8956   HAVE_PWRITE=1;
8957   HAVE_READLINK=1;
8958   HAVE_READLINKAT=1;
8959   HAVE_SETHOSTNAME=1;
8960   HAVE_SLEEP=1;
8961   HAVE_SYMLINK=1;
8962   HAVE_SYMLINKAT=1;
8963   HAVE_UNLINKAT=1;
8964   HAVE_USLEEP=1;
8965   HAVE_DECL_ENVIRON=1;
8966   HAVE_DECL_FCHDIR=1;
8967   HAVE_DECL_FDATASYNC=1;
8968   HAVE_DECL_GETDOMAINNAME=1;
8969   HAVE_DECL_GETLOGIN_R=1;
8970   HAVE_DECL_GETPAGESIZE=1;
8971   HAVE_DECL_GETUSERSHELL=1;
8972   HAVE_DECL_SETHOSTNAME=1;
8973   HAVE_DECL_TTYNAME_R=1;
8974   HAVE_OS_H=0;
8975   HAVE_SYS_PARAM_H=0;
8976   REPLACE_CHOWN=0;
8977   REPLACE_CLOSE=0;
8978   REPLACE_DUP=0;
8979   REPLACE_DUP2=0;
8980   REPLACE_FCHOWNAT=0;
8981   REPLACE_FTRUNCATE=0;
8982   REPLACE_GETCWD=0;
8983   REPLACE_GETDOMAINNAME=0;
8984   REPLACE_GETDTABLESIZE=0;
8985   REPLACE_GETLOGIN_R=0;
8986   REPLACE_GETGROUPS=0;
8987   REPLACE_GETPAGESIZE=0;
8988   REPLACE_ISATTY=0;
8989   REPLACE_LCHOWN=0;
8990   REPLACE_LINK=0;
8991   REPLACE_LINKAT=0;
8992   REPLACE_LSEEK=0;
8993   REPLACE_PREAD=0;
8994   REPLACE_PWRITE=0;
8995   REPLACE_READ=0;
8996   REPLACE_READLINK=0;
8997   REPLACE_RMDIR=0;
8998   REPLACE_SLEEP=0;
8999   REPLACE_SYMLINK=0;
9000   REPLACE_TTYNAME_R=0;
9001   REPLACE_UNLINK=0;
9002   REPLACE_UNLINKAT=0;
9003   REPLACE_USLEEP=0;
9004   REPLACE_WRITE=0;
9005   UNISTD_H_HAVE_WINSOCK2_H=0;
9006   UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
9007
9008
9009
9010
9011
9012
9013   for ac_header in $gl_header_list
9014 do :
9015   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9016 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9017 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9018   cat >>confdefs.h <<_ACEOF
9019 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9020 _ACEOF
9021
9022 fi
9023
9024 done
9025
9026
9027
9028
9029
9030
9031
9032
9033
9034
9035
9036
9037   :
9038
9039
9040
9041
9042
9043
9044
9045
9046
9047
9048
9049
9050
9051
9052
9053
9054   :
9055
9056
9057
9058
9059
9060   if test $ac_cv_func__set_invalid_parameter_handler = yes; then
9061     HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
9062
9063 $as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
9064
9065   else
9066     HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
9067   fi
9068
9069
9070
9071   GNULIB_IOCTL=0;
9072     SYS_IOCTL_H_HAVE_WINSOCK2_H=0;
9073   SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
9074
9075   REPLACE_IOCTL=0;
9076
9077
9078
9079
9080
9081
9082
9083
9084
9085
9086
9087
9088      GNULIB_OPENDIR=0;
9089   GNULIB_READDIR=0;
9090   GNULIB_REWINDDIR=0;
9091   GNULIB_CLOSEDIR=0;
9092   GNULIB_DIRFD=0;
9093   GNULIB_FDOPENDIR=0;
9094   GNULIB_SCANDIR=0;
9095   GNULIB_ALPHASORT=0;
9096     HAVE_OPENDIR=1;
9097   HAVE_READDIR=1;
9098   HAVE_REWINDDIR=1;
9099   HAVE_CLOSEDIR=1;
9100   HAVE_DECL_DIRFD=1;
9101   HAVE_DECL_FDOPENDIR=1;
9102   HAVE_FDOPENDIR=1;
9103   HAVE_SCANDIR=1;
9104   HAVE_ALPHASORT=1;
9105   REPLACE_OPENDIR=0;
9106   REPLACE_CLOSEDIR=0;
9107   REPLACE_DIRFD=0;
9108   REPLACE_FDOPENDIR=0;
9109
9110
9111   GNULIB_ISBLANK=0;
9112     HAVE_ISBLANK=1;
9113
9114
9115
9116   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
9117 $as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
9118 if ${gl_cv_have_include_next+:} false; then :
9119   $as_echo_n "(cached) " >&6
9120 else
9121   rm -rf conftestd1a conftestd1b conftestd2
9122      mkdir conftestd1a conftestd1b conftestd2
9123                                                   cat <<EOF > conftestd1a/conftest.h
9124 #define DEFINED_IN_CONFTESTD1
9125 #include_next <conftest.h>
9126 #ifdef DEFINED_IN_CONFTESTD2
9127 int foo;
9128 #else
9129 #error "include_next doesn't work"
9130 #endif
9131 EOF
9132      cat <<EOF > conftestd1b/conftest.h
9133 #define DEFINED_IN_CONFTESTD1
9134 #include <stdio.h>
9135 #include_next <conftest.h>
9136 #ifdef DEFINED_IN_CONFTESTD2
9137 int foo;
9138 #else
9139 #error "include_next doesn't work"
9140 #endif
9141 EOF
9142      cat <<EOF > conftestd2/conftest.h
9143 #ifndef DEFINED_IN_CONFTESTD1
9144 #error "include_next test doesn't work"
9145 #endif
9146 #define DEFINED_IN_CONFTESTD2
9147 EOF
9148      gl_save_CPPFLAGS="$CPPFLAGS"
9149      CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
9150      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9151 /* end confdefs.h.  */
9152 #include <conftest.h>
9153 _ACEOF
9154 if ac_fn_c_try_compile "$LINENO"; then :
9155   gl_cv_have_include_next=yes
9156 else
9157   CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
9158         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9159 /* end confdefs.h.  */
9160 #include <conftest.h>
9161 _ACEOF
9162 if ac_fn_c_try_compile "$LINENO"; then :
9163   gl_cv_have_include_next=buggy
9164 else
9165   gl_cv_have_include_next=no
9166 fi
9167 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9168
9169 fi
9170 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9171      CPPFLAGS="$gl_save_CPPFLAGS"
9172      rm -rf conftestd1a conftestd1b conftestd2
9173
9174 fi
9175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
9176 $as_echo "$gl_cv_have_include_next" >&6; }
9177   PRAGMA_SYSTEM_HEADER=
9178   if test $gl_cv_have_include_next = yes; then
9179     INCLUDE_NEXT=include_next
9180     INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
9181     if test -n "$GCC"; then
9182       PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
9183     fi
9184   else
9185     if test $gl_cv_have_include_next = buggy; then
9186       INCLUDE_NEXT=include
9187       INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
9188     else
9189       INCLUDE_NEXT=include
9190       INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
9191     fi
9192   fi
9193
9194
9195
9196   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5
9197 $as_echo_n "checking whether system header files limit the line length... " >&6; }
9198 if ${gl_cv_pragma_columns+:} false; then :
9199   $as_echo_n "(cached) " >&6
9200 else
9201        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9202 /* end confdefs.h.  */
9203
9204 #ifdef __TANDEM
9205 choke me
9206 #endif
9207
9208 _ACEOF
9209 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9210   $EGREP "choke me" >/dev/null 2>&1; then :
9211   gl_cv_pragma_columns=yes
9212 else
9213   gl_cv_pragma_columns=no
9214 fi
9215 rm -f conftest*
9216
9217
9218 fi
9219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5
9220 $as_echo "$gl_cv_pragma_columns" >&6; }
9221   if test $gl_cv_pragma_columns = yes; then
9222     PRAGMA_COLUMNS="#pragma COLUMNS 10000"
9223   else
9224     PRAGMA_COLUMNS=
9225   fi
9226
9227
9228
9229
9230
9231
9232
9233
9234
9235
9236
9237
9238
9239
9240
9241
9242
9243
9244
9245
9246
9247   :
9248
9249
9250
9251
9252
9253
9254
9255   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
9256 $as_echo_n "checking if environ is properly declared... " >&6; }
9257   if ${gt_cv_var_environ_declaration+:} false; then :
9258   $as_echo_n "(cached) " >&6
9259 else
9260
9261     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9262 /* end confdefs.h.  */
9263 #if HAVE_UNISTD_H
9264      #include <unistd.h>
9265      #endif
9266      /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>.  */
9267      #include <stdlib.h>
9268
9269            extern struct { int foo; } environ;
9270 int
9271 main ()
9272 {
9273 environ.foo = 1;
9274   ;
9275   return 0;
9276 }
9277 _ACEOF
9278 if ac_fn_c_try_compile "$LINENO"; then :
9279   gt_cv_var_environ_declaration=no
9280 else
9281   gt_cv_var_environ_declaration=yes
9282 fi
9283 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9284 fi
9285
9286   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
9287 $as_echo "$gt_cv_var_environ_declaration" >&6; }
9288   if test $gt_cv_var_environ_declaration = yes; then
9289
9290 $as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
9291
9292   fi
9293
9294
9295   if test $gt_cv_var_environ_declaration != yes; then
9296     HAVE_DECL_ENVIRON=0
9297   fi
9298
9299
9300
9301   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
9302 $as_echo_n "checking for complete errno.h... " >&6; }
9303 if ${gl_cv_header_errno_h_complete+:} false; then :
9304   $as_echo_n "(cached) " >&6
9305 else
9306
9307     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9308 /* end confdefs.h.  */
9309
9310 #include <errno.h>
9311 #if !defined ETXTBSY
9312 booboo
9313 #endif
9314 #if !defined ENOMSG
9315 booboo
9316 #endif
9317 #if !defined EIDRM
9318 booboo
9319 #endif
9320 #if !defined ENOLINK
9321 booboo
9322 #endif
9323 #if !defined EPROTO
9324 booboo
9325 #endif
9326 #if !defined EMULTIHOP
9327 booboo
9328 #endif
9329 #if !defined EBADMSG
9330 booboo
9331 #endif
9332 #if !defined EOVERFLOW
9333 booboo
9334 #endif
9335 #if !defined ENOTSUP
9336 booboo
9337 #endif
9338 #if !defined ENETRESET
9339 booboo
9340 #endif
9341 #if !defined ECONNABORTED
9342 booboo
9343 #endif
9344 #if !defined ESTALE
9345 booboo
9346 #endif
9347 #if !defined EDQUOT
9348 booboo
9349 #endif
9350 #if !defined ECANCELED
9351 booboo
9352 #endif
9353 #if !defined EOWNERDEAD
9354 booboo
9355 #endif
9356 #if !defined ENOTRECOVERABLE
9357 booboo
9358 #endif
9359 #if !defined EILSEQ
9360 booboo
9361 #endif
9362
9363 _ACEOF
9364 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9365   $EGREP "booboo" >/dev/null 2>&1; then :
9366   gl_cv_header_errno_h_complete=no
9367 else
9368   gl_cv_header_errno_h_complete=yes
9369 fi
9370 rm -f conftest*
9371
9372
9373 fi
9374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
9375 $as_echo "$gl_cv_header_errno_h_complete" >&6; }
9376   if test $gl_cv_header_errno_h_complete = yes; then
9377     ERRNO_H=''
9378   else
9379
9380
9381
9382
9383
9384
9385
9386
9387      if test $gl_cv_have_include_next = yes; then
9388        gl_cv_next_errno_h='<'errno.h'>'
9389      else
9390        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
9391 $as_echo_n "checking absolute name of <errno.h>... " >&6; }
9392 if ${gl_cv_next_errno_h+:} false; then :
9393   $as_echo_n "(cached) " >&6
9394 else
9395
9396
9397
9398   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9399 /* end confdefs.h.  */
9400 #include <errno.h>
9401 _ACEOF
9402                 case "$host_os" in
9403     aix*) gl_absname_cpp="$ac_cpp -C" ;;
9404     *)    gl_absname_cpp="$ac_cpp" ;;
9405   esac
9406
9407   case "$host_os" in
9408     mingw*)
9409                                           gl_dirsep_regex='[/\\]'
9410       ;;
9411     *)
9412       gl_dirsep_regex='\/'
9413       ;;
9414   esac
9415       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
9416   gl_header_literal_regex=`echo 'errno.h' \
9417                            | sed -e "$gl_make_literal_regex_sed"`
9418   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
9419       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
9420       s|^/[^/]|//&|
9421       p
9422       q
9423     }'
9424
9425         gl_cv_absolute_errno_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
9426   sed -n "$gl_absolute_header_sed"`
9427
9428            gl_header=$gl_cv_absolute_errno_h
9429            gl_cv_next_errno_h='"'$gl_header'"'
9430
9431
9432 fi
9433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
9434 $as_echo "$gl_cv_next_errno_h" >&6; }
9435      fi
9436      NEXT_ERRNO_H=$gl_cv_next_errno_h
9437
9438      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
9439        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
9440        gl_next_as_first_directive='<'errno.h'>'
9441      else
9442        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
9443        gl_next_as_first_directive=$gl_cv_next_errno_h
9444      fi
9445      NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
9446
9447
9448
9449
9450     ERRNO_H='errno.h'
9451   fi
9452
9453    if test -n "$ERRNO_H"; then
9454   GL_GENERATE_ERRNO_H_TRUE=
9455   GL_GENERATE_ERRNO_H_FALSE='#'
9456 else
9457   GL_GENERATE_ERRNO_H_TRUE='#'
9458   GL_GENERATE_ERRNO_H_FALSE=
9459 fi
9460
9461
9462   if test -n "$ERRNO_H"; then
9463     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
9464 $as_echo_n "checking for EMULTIHOP value... " >&6; }
9465 if ${gl_cv_header_errno_h_EMULTIHOP+:} false; then :
9466   $as_echo_n "(cached) " >&6
9467 else
9468
9469       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9470 /* end confdefs.h.  */
9471
9472 #include <errno.h>
9473 #ifdef EMULTIHOP
9474 yes
9475 #endif
9476
9477 _ACEOF
9478 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9479   $EGREP "yes" >/dev/null 2>&1; then :
9480   gl_cv_header_errno_h_EMULTIHOP=yes
9481 else
9482   gl_cv_header_errno_h_EMULTIHOP=no
9483 fi
9484 rm -f conftest*
9485
9486       if test $gl_cv_header_errno_h_EMULTIHOP = no; then
9487         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9488 /* end confdefs.h.  */
9489
9490 #define _XOPEN_SOURCE_EXTENDED 1
9491 #include <errno.h>
9492 #ifdef EMULTIHOP
9493 yes
9494 #endif
9495
9496 _ACEOF
9497 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9498   $EGREP "yes" >/dev/null 2>&1; then :
9499   gl_cv_header_errno_h_EMULTIHOP=hidden
9500 fi
9501 rm -f conftest*
9502
9503         if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
9504                               if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP"        "
9505 #define _XOPEN_SOURCE_EXTENDED 1
9506 #include <errno.h>
9507 /* The following two lines are a workaround against an autoconf-2.52 bug.  */
9508 #include <stdio.h>
9509 #include <stdlib.h>
9510 "; then :
9511
9512 fi
9513
9514         fi
9515       fi
9516
9517 fi
9518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
9519 $as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
9520     case $gl_cv_header_errno_h_EMULTIHOP in
9521       yes | no)
9522         EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
9523         ;;
9524       *)
9525         EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
9526         ;;
9527     esac
9528
9529
9530   fi
9531
9532
9533   if test -n "$ERRNO_H"; then
9534     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
9535 $as_echo_n "checking for ENOLINK value... " >&6; }
9536 if ${gl_cv_header_errno_h_ENOLINK+:} false; then :
9537   $as_echo_n "(cached) " >&6
9538 else
9539
9540       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9541 /* end confdefs.h.  */
9542
9543 #include <errno.h>
9544 #ifdef ENOLINK
9545 yes
9546 #endif
9547
9548 _ACEOF
9549 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9550   $EGREP "yes" >/dev/null 2>&1; then :
9551   gl_cv_header_errno_h_ENOLINK=yes
9552 else
9553   gl_cv_header_errno_h_ENOLINK=no
9554 fi
9555 rm -f conftest*
9556
9557       if test $gl_cv_header_errno_h_ENOLINK = no; then
9558         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9559 /* end confdefs.h.  */
9560
9561 #define _XOPEN_SOURCE_EXTENDED 1
9562 #include <errno.h>
9563 #ifdef ENOLINK
9564 yes
9565 #endif
9566
9567 _ACEOF
9568 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9569   $EGREP "yes" >/dev/null 2>&1; then :
9570   gl_cv_header_errno_h_ENOLINK=hidden
9571 fi
9572 rm -f conftest*
9573
9574         if test $gl_cv_header_errno_h_ENOLINK = hidden; then
9575                               if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK"        "
9576 #define _XOPEN_SOURCE_EXTENDED 1
9577 #include <errno.h>
9578 /* The following two lines are a workaround against an autoconf-2.52 bug.  */
9579 #include <stdio.h>
9580 #include <stdlib.h>
9581 "; then :
9582
9583 fi
9584
9585         fi
9586       fi
9587
9588 fi
9589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
9590 $as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; }
9591     case $gl_cv_header_errno_h_ENOLINK in
9592       yes | no)
9593         ENOLINK_HIDDEN=0; ENOLINK_VALUE=
9594         ;;
9595       *)
9596         ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
9597         ;;
9598     esac
9599
9600
9601   fi
9602
9603
9604   if test -n "$ERRNO_H"; then
9605     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
9606 $as_echo_n "checking for EOVERFLOW value... " >&6; }
9607 if ${gl_cv_header_errno_h_EOVERFLOW+:} false; then :
9608   $as_echo_n "(cached) " >&6
9609 else
9610
9611       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9612 /* end confdefs.h.  */
9613
9614 #include <errno.h>
9615 #ifdef EOVERFLOW
9616 yes
9617 #endif
9618
9619 _ACEOF
9620 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9621   $EGREP "yes" >/dev/null 2>&1; then :
9622   gl_cv_header_errno_h_EOVERFLOW=yes
9623 else
9624   gl_cv_header_errno_h_EOVERFLOW=no
9625 fi
9626 rm -f conftest*
9627
9628       if test $gl_cv_header_errno_h_EOVERFLOW = no; then
9629         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9630 /* end confdefs.h.  */
9631
9632 #define _XOPEN_SOURCE_EXTENDED 1
9633 #include <errno.h>
9634 #ifdef EOVERFLOW
9635 yes
9636 #endif
9637
9638 _ACEOF
9639 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9640   $EGREP "yes" >/dev/null 2>&1; then :
9641   gl_cv_header_errno_h_EOVERFLOW=hidden
9642 fi
9643 rm -f conftest*
9644
9645         if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
9646                               if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW"        "
9647 #define _XOPEN_SOURCE_EXTENDED 1
9648 #include <errno.h>
9649 /* The following two lines are a workaround against an autoconf-2.52 bug.  */
9650 #include <stdio.h>
9651 #include <stdlib.h>
9652 "; then :
9653
9654 fi
9655
9656         fi
9657       fi
9658
9659 fi
9660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
9661 $as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
9662     case $gl_cv_header_errno_h_EOVERFLOW in
9663       yes | no)
9664         EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
9665         ;;
9666       *)
9667         EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
9668         ;;
9669     esac
9670
9671
9672   fi
9673
9674
9675 ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
9676 if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
9677   ac_have_decl=1
9678 else
9679   ac_have_decl=0
9680 fi
9681
9682 cat >>confdefs.h <<_ACEOF
9683 #define HAVE_DECL_STRERROR_R $ac_have_decl
9684 _ACEOF
9685
9686 for ac_func in strerror_r
9687 do :
9688   ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
9689 if test "x$ac_cv_func_strerror_r" = xyes; then :
9690   cat >>confdefs.h <<_ACEOF
9691 #define HAVE_STRERROR_R 1
9692 _ACEOF
9693
9694 fi
9695 done
9696
9697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
9698 $as_echo_n "checking whether strerror_r returns char *... " >&6; }
9699 if ${ac_cv_func_strerror_r_char_p+:} false; then :
9700   $as_echo_n "(cached) " >&6
9701 else
9702
9703     ac_cv_func_strerror_r_char_p=no
9704     if test $ac_cv_have_decl_strerror_r = yes; then
9705       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9706 /* end confdefs.h.  */
9707 $ac_includes_default
9708 int
9709 main ()
9710 {
9711
9712           char buf[100];
9713           char x = *strerror_r (0, buf, sizeof buf);
9714           char *p = strerror_r (0, buf, sizeof buf);
9715           return !p || x;
9716
9717   ;
9718   return 0;
9719 }
9720 _ACEOF
9721 if ac_fn_c_try_compile "$LINENO"; then :
9722   ac_cv_func_strerror_r_char_p=yes
9723 fi
9724 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9725     else
9726       # strerror_r is not declared.  Choose between
9727       # systems that have relatively inaccessible declarations for the
9728       # function.  BeOS and DEC UNIX 4.0 fall in this category, but the
9729       # former has a strerror_r that returns char*, while the latter
9730       # has a strerror_r that returns `int'.
9731       # This test should segfault on the DEC system.
9732       if test "$cross_compiling" = yes; then :
9733   :
9734 else
9735   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9736 /* end confdefs.h.  */
9737 $ac_includes_default
9738         extern char *strerror_r ();
9739 int
9740 main ()
9741 {
9742 char buf[100];
9743           char x = *strerror_r (0, buf, sizeof buf);
9744           return ! isalpha (x);
9745   ;
9746   return 0;
9747 }
9748 _ACEOF
9749 if ac_fn_c_try_run "$LINENO"; then :
9750   ac_cv_func_strerror_r_char_p=yes
9751 fi
9752 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9753   conftest.$ac_objext conftest.beam conftest.$ac_ext
9754 fi
9755
9756     fi
9757
9758 fi
9759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
9760 $as_echo "$ac_cv_func_strerror_r_char_p" >&6; }
9761 if test $ac_cv_func_strerror_r_char_p = yes; then
9762
9763 $as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h
9764
9765 fi
9766
9767
9768   XGETTEXT_EXTRA_OPTIONS=
9769
9770
9771
9772
9773
9774
9775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
9776 $as_echo_n "checking for uid_t in sys/types.h... " >&6; }
9777 if ${ac_cv_type_uid_t+:} false; then :
9778   $as_echo_n "(cached) " >&6
9779 else
9780   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9781 /* end confdefs.h.  */
9782 #include <sys/types.h>
9783
9784 _ACEOF
9785 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9786   $EGREP "uid_t" >/dev/null 2>&1; then :
9787   ac_cv_type_uid_t=yes
9788 else
9789   ac_cv_type_uid_t=no
9790 fi
9791 rm -f conftest*
9792
9793 fi
9794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
9795 $as_echo "$ac_cv_type_uid_t" >&6; }
9796 if test $ac_cv_type_uid_t = no; then
9797
9798 $as_echo "#define uid_t int" >>confdefs.h
9799
9800
9801 $as_echo "#define gid_t int" >>confdefs.h
9802
9803 fi
9804
9805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking type of array argument to getgroups" >&5
9806 $as_echo_n "checking type of array argument to getgroups... " >&6; }
9807 if ${ac_cv_type_getgroups+:} false; then :
9808   $as_echo_n "(cached) " >&6
9809 else
9810   if test "$cross_compiling" = yes; then :
9811   ac_cv_type_getgroups=cross
9812 else
9813   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9814 /* end confdefs.h.  */
9815 /* Thanks to Mike Rendell for this test.  */
9816 $ac_includes_default
9817 #define NGID 256
9818 #undef MAX
9819 #define MAX(x, y) ((x) > (y) ? (x) : (y))
9820
9821 int
9822 main ()
9823 {
9824   gid_t gidset[NGID];
9825   int i, n;
9826   union { gid_t gval; long int lval; }  val;
9827
9828   val.lval = -1;
9829   for (i = 0; i < NGID; i++)
9830     gidset[i] = val.gval;
9831   n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
9832                  gidset);
9833   /* Exit non-zero if getgroups seems to require an array of ints.  This
9834      happens when gid_t is short int but getgroups modifies an array
9835      of ints.  */
9836   return n > 0 && gidset[n] != val.gval;
9837 }
9838 _ACEOF
9839 if ac_fn_c_try_run "$LINENO"; then :
9840   ac_cv_type_getgroups=gid_t
9841 else
9842   ac_cv_type_getgroups=int
9843 fi
9844 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9845   conftest.$ac_objext conftest.beam conftest.$ac_ext
9846 fi
9847
9848 if test $ac_cv_type_getgroups = cross; then
9849         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9850 /* end confdefs.h.  */
9851 #include <unistd.h>
9852
9853 _ACEOF
9854 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9855   $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then :
9856   ac_cv_type_getgroups=gid_t
9857 else
9858   ac_cv_type_getgroups=int
9859 fi
9860 rm -f conftest*
9861
9862 fi
9863 fi
9864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_getgroups" >&5
9865 $as_echo "$ac_cv_type_getgroups" >&6; }
9866
9867 cat >>confdefs.h <<_ACEOF
9868 #define GETGROUPS_T $ac_cv_type_getgroups
9869 _ACEOF
9870
9871
9872
9873
9874
9875
9876       ac_fn_c_check_decl "$LINENO" "fchdir" "ac_cv_have_decl_fchdir" "$ac_includes_default"
9877 if test "x$ac_cv_have_decl_fchdir" = xyes; then :
9878   ac_have_decl=1
9879 else
9880   ac_have_decl=0
9881 fi
9882
9883 cat >>confdefs.h <<_ACEOF
9884 #define HAVE_DECL_FCHDIR $ac_have_decl
9885 _ACEOF
9886
9887
9888
9889   GNULIB_FCNTL=0;
9890   GNULIB_NONBLOCKING=0;
9891   GNULIB_OPEN=0;
9892   GNULIB_OPENAT=0;
9893     HAVE_FCNTL=1;
9894   HAVE_OPENAT=1;
9895   REPLACE_FCNTL=0;
9896   REPLACE_OPEN=0;
9897   REPLACE_OPENAT=0;
9898
9899
9900
9901
9902
9903
9904
9905
9906
9907
9908
9909
9910
9911
9912
9913   :
9914
9915
9916
9917
9918
9919
9920   :
9921
9922
9923
9924
9925
9926   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
9927 $as_echo_n "checking for working fcntl.h... " >&6; }
9928 if ${gl_cv_header_working_fcntl_h+:} false; then :
9929   $as_echo_n "(cached) " >&6
9930 else
9931   if test "$cross_compiling" = yes; then :
9932   gl_cv_header_working_fcntl_h=cross-compiling
9933 else
9934   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9935 /* end confdefs.h.  */
9936 #include <sys/types.h>
9937            #include <sys/stat.h>
9938            #if HAVE_UNISTD_H
9939            # include <unistd.h>
9940            #else /* on Windows with MSVC */
9941            # include <io.h>
9942            # include <stdlib.h>
9943            # defined sleep(n) _sleep ((n) * 1000)
9944            #endif
9945            #include <fcntl.h>
9946            #ifndef O_NOATIME
9947             #define O_NOATIME 0
9948            #endif
9949            #ifndef O_NOFOLLOW
9950             #define O_NOFOLLOW 0
9951            #endif
9952            static int const constants[] =
9953             {
9954               O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
9955               O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
9956             };
9957
9958 int
9959 main ()
9960 {
9961
9962             int result = !constants;
9963             #if HAVE_SYMLINK
9964             {
9965               static char const sym[] = "conftest.sym";
9966               if (symlink ("/dev/null", sym) != 0)
9967                 result |= 2;
9968               else
9969                 {
9970                   int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
9971                   if (fd >= 0)
9972                     {
9973                       close (fd);
9974                       result |= 4;
9975                     }
9976                 }
9977               if (unlink (sym) != 0 || symlink (".", sym) != 0)
9978                 result |= 2;
9979               else
9980                 {
9981                   int fd = open (sym, O_RDONLY | O_NOFOLLOW);
9982                   if (fd >= 0)
9983                     {
9984                       close (fd);
9985                       result |= 4;
9986                     }
9987                 }
9988               unlink (sym);
9989             }
9990             #endif
9991             {
9992               static char const file[] = "confdefs.h";
9993               int fd = open (file, O_RDONLY | O_NOATIME);
9994               if (fd < 0)
9995                 result |= 8;
9996               else
9997                 {
9998                   struct stat st0;
9999                   if (fstat (fd, &st0) != 0)
10000                     result |= 16;
10001                   else
10002                     {
10003                       char c;
10004                       sleep (1);
10005                       if (read (fd, &c, 1) != 1)
10006                         result |= 24;
10007                       else
10008                         {
10009                           if (close (fd) != 0)
10010                             result |= 32;
10011                           else
10012                             {
10013                               struct stat st1;
10014                               if (stat (file, &st1) != 0)
10015                                 result |= 40;
10016                               else
10017                                 if (st0.st_atime != st1.st_atime)
10018                                   result |= 64;
10019                             }
10020                         }
10021                     }
10022                 }
10023             }
10024             return result;
10025   ;
10026   return 0;
10027 }
10028 _ACEOF
10029 if ac_fn_c_try_run "$LINENO"; then :
10030   gl_cv_header_working_fcntl_h=yes
10031 else
10032   case $? in #(
10033         4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
10034         64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
10035         68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
10036          *) gl_cv_header_working_fcntl_h='no';;
10037         esac
10038 fi
10039 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10040   conftest.$ac_objext conftest.beam conftest.$ac_ext
10041 fi
10042
10043 fi
10044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
10045 $as_echo "$gl_cv_header_working_fcntl_h" >&6; }
10046
10047   case $gl_cv_header_working_fcntl_h in #(
10048   *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
10049   *) ac_val=1;;
10050   esac
10051
10052 cat >>confdefs.h <<_ACEOF
10053 #define HAVE_WORKING_O_NOATIME $ac_val
10054 _ACEOF
10055
10056
10057   case $gl_cv_header_working_fcntl_h in #(
10058   *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
10059   *) ac_val=1;;
10060   esac
10061
10062 cat >>confdefs.h <<_ACEOF
10063 #define HAVE_WORKING_O_NOFOLLOW $ac_val
10064 _ACEOF
10065
10066
10067 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
10068 if test "x$ac_cv_type_pid_t" = xyes; then :
10069
10070 else
10071
10072 cat >>confdefs.h <<_ACEOF
10073 #define pid_t int
10074 _ACEOF
10075
10076 fi
10077
10078 ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
10079 if test "x$ac_cv_type_mode_t" = xyes; then :
10080
10081 else
10082
10083 cat >>confdefs.h <<_ACEOF
10084 #define mode_t int
10085 _ACEOF
10086
10087 fi
10088
10089
10090
10091   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
10092 $as_echo_n "checking for promoted mode_t type... " >&6; }
10093 if ${gl_cv_promoted_mode_t+:} false; then :
10094   $as_echo_n "(cached) " >&6
10095 else
10096
10097                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10098 /* end confdefs.h.  */
10099 #include <sys/types.h>
10100 int
10101 main ()
10102 {
10103 typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
10104   ;
10105   return 0;
10106 }
10107 _ACEOF
10108 if ac_fn_c_try_compile "$LINENO"; then :
10109   gl_cv_promoted_mode_t='int'
10110 else
10111   gl_cv_promoted_mode_t='mode_t'
10112 fi
10113 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10114
10115 fi
10116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
10117 $as_echo "$gl_cv_promoted_mode_t" >&6; }
10118
10119 cat >>confdefs.h <<_ACEOF
10120 #define PROMOTED_MODE_T $gl_cv_promoted_mode_t
10121 _ACEOF
10122
10123
10124
10125   GNULIB_DPRINTF=0;
10126   GNULIB_FCLOSE=0;
10127   GNULIB_FDOPEN=0;
10128   GNULIB_FFLUSH=0;
10129   GNULIB_FGETC=0;
10130   GNULIB_FGETS=0;
10131   GNULIB_FOPEN=0;
10132   GNULIB_FPRINTF=0;
10133   GNULIB_FPRINTF_POSIX=0;
10134   GNULIB_FPURGE=0;
10135   GNULIB_FPUTC=0;
10136   GNULIB_FPUTS=0;
10137   GNULIB_FREAD=0;
10138   GNULIB_FREOPEN=0;
10139   GNULIB_FSCANF=0;
10140   GNULIB_FSEEK=0;
10141   GNULIB_FSEEKO=0;
10142   GNULIB_FTELL=0;
10143   GNULIB_FTELLO=0;
10144   GNULIB_FWRITE=0;
10145   GNULIB_GETC=0;
10146   GNULIB_GETCHAR=0;
10147   GNULIB_GETDELIM=0;
10148   GNULIB_GETLINE=0;
10149   GNULIB_OBSTACK_PRINTF=0;
10150   GNULIB_OBSTACK_PRINTF_POSIX=0;
10151   GNULIB_PCLOSE=0;
10152   GNULIB_PERROR=0;
10153   GNULIB_POPEN=0;
10154   GNULIB_PRINTF=0;
10155   GNULIB_PRINTF_POSIX=0;
10156   GNULIB_PUTC=0;
10157   GNULIB_PUTCHAR=0;
10158   GNULIB_PUTS=0;
10159   GNULIB_REMOVE=0;
10160   GNULIB_RENAME=0;
10161   GNULIB_RENAMEAT=0;
10162   GNULIB_SCANF=0;
10163   GNULIB_SNPRINTF=0;
10164   GNULIB_SPRINTF_POSIX=0;
10165   GNULIB_STDIO_H_NONBLOCKING=0;
10166   GNULIB_STDIO_H_SIGPIPE=0;
10167   GNULIB_TMPFILE=0;
10168   GNULIB_VASPRINTF=0;
10169   GNULIB_VFSCANF=0;
10170   GNULIB_VSCANF=0;
10171   GNULIB_VDPRINTF=0;
10172   GNULIB_VFPRINTF=0;
10173   GNULIB_VFPRINTF_POSIX=0;
10174   GNULIB_VPRINTF=0;
10175   GNULIB_VPRINTF_POSIX=0;
10176   GNULIB_VSNPRINTF=0;
10177   GNULIB_VSPRINTF_POSIX=0;
10178     HAVE_DECL_FPURGE=1;
10179   HAVE_DECL_FSEEKO=1;
10180   HAVE_DECL_FTELLO=1;
10181   HAVE_DECL_GETDELIM=1;
10182   HAVE_DECL_GETLINE=1;
10183   HAVE_DECL_OBSTACK_PRINTF=1;
10184   HAVE_DECL_SNPRINTF=1;
10185   HAVE_DECL_VSNPRINTF=1;
10186   HAVE_DPRINTF=1;
10187   HAVE_FSEEKO=1;
10188   HAVE_FTELLO=1;
10189   HAVE_PCLOSE=1;
10190   HAVE_POPEN=1;
10191   HAVE_RENAMEAT=1;
10192   HAVE_VASPRINTF=1;
10193   HAVE_VDPRINTF=1;
10194   REPLACE_DPRINTF=0;
10195   REPLACE_FCLOSE=0;
10196   REPLACE_FDOPEN=0;
10197   REPLACE_FFLUSH=0;
10198   REPLACE_FOPEN=0;
10199   REPLACE_FPRINTF=0;
10200   REPLACE_FPURGE=0;
10201   REPLACE_FREOPEN=0;
10202   REPLACE_FSEEK=0;
10203   REPLACE_FSEEKO=0;
10204   REPLACE_FTELL=0;
10205   REPLACE_FTELLO=0;
10206   REPLACE_GETDELIM=0;
10207   REPLACE_GETLINE=0;
10208   REPLACE_OBSTACK_PRINTF=0;
10209   REPLACE_PERROR=0;
10210   REPLACE_POPEN=0;
10211   REPLACE_PRINTF=0;
10212   REPLACE_REMOVE=0;
10213   REPLACE_RENAME=0;
10214   REPLACE_RENAMEAT=0;
10215   REPLACE_SNPRINTF=0;
10216   REPLACE_SPRINTF=0;
10217   REPLACE_STDIO_READ_FUNCS=0;
10218   REPLACE_STDIO_WRITE_FUNCS=0;
10219   REPLACE_TMPFILE=0;
10220   REPLACE_VASPRINTF=0;
10221   REPLACE_VDPRINTF=0;
10222   REPLACE_VFPRINTF=0;
10223   REPLACE_VPRINTF=0;
10224   REPLACE_VSNPRINTF=0;
10225   REPLACE_VSPRINTF=0;
10226
10227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for st_dm_mode in struct stat" >&5
10228 $as_echo_n "checking for st_dm_mode in struct stat... " >&6; }
10229 if ${ac_cv_struct_st_dm_mode+:} false; then :
10230   $as_echo_n "(cached) " >&6
10231 else
10232   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10233 /* end confdefs.h.  */
10234
10235 #include <sys/types.h>
10236 #include <sys/stat.h>
10237 int
10238 main ()
10239 {
10240 struct stat s; s.st_dm_mode;
10241   ;
10242   return 0;
10243 }
10244 _ACEOF
10245 if ac_fn_c_try_compile "$LINENO"; then :
10246   ac_cv_struct_st_dm_mode=yes
10247 else
10248   ac_cv_struct_st_dm_mode=no
10249 fi
10250 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10251 fi
10252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_st_dm_mode" >&5
10253 $as_echo "$ac_cv_struct_st_dm_mode" >&6; }
10254
10255   if test $ac_cv_struct_st_dm_mode = yes; then
10256
10257 $as_echo "#define HAVE_ST_DM_MODE 1" >>confdefs.h
10258
10259   fi
10260
10261
10262
10263       ac_fn_c_check_decl "$LINENO" "strmode" "ac_cv_have_decl_strmode" "$ac_includes_default"
10264 if test "x$ac_cv_have_decl_strmode" = xyes; then :
10265   ac_have_decl=1
10266 else
10267   ac_have_decl=0
10268 fi
10269
10270 cat >>confdefs.h <<_ACEOF
10271 #define HAVE_DECL_STRMODE $ac_have_decl
10272 _ACEOF
10273
10274
10275
10276
10277
10278
10279
10280
10281
10282    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
10283 $as_echo_n "checking for mbstate_t... " >&6; }
10284 if ${ac_cv_type_mbstate_t+:} false; then :
10285   $as_echo_n "(cached) " >&6
10286 else
10287   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10288 /* end confdefs.h.  */
10289 $ac_includes_default
10290 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
10291    <wchar.h>.
10292    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
10293    included before <wchar.h>.  */
10294 #include <stddef.h>
10295 #include <stdio.h>
10296 #include <time.h>
10297 #include <wchar.h>
10298 int
10299 main ()
10300 {
10301 mbstate_t x; return sizeof x;
10302   ;
10303   return 0;
10304 }
10305 _ACEOF
10306 if ac_fn_c_try_compile "$LINENO"; then :
10307   ac_cv_type_mbstate_t=yes
10308 else
10309   ac_cv_type_mbstate_t=no
10310 fi
10311 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10312 fi
10313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
10314 $as_echo "$ac_cv_type_mbstate_t" >&6; }
10315    if test $ac_cv_type_mbstate_t = yes; then
10316
10317 $as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
10318
10319    else
10320
10321 $as_echo "#define mbstate_t int" >>confdefs.h
10322
10323    fi
10324
10325
10326
10327
10328
10329
10330
10331
10332
10333
10334
10335
10336
10337
10338
10339
10340
10341
10342
10343
10344
10345
10346
10347
10348
10349
10350
10351
10352
10353
10354
10355
10356
10357
10358
10359
10360
10361
10362
10363
10364
10365
10366
10367
10368
10369
10370
10371
10372
10373
10374
10375
10376
10377
10378
10379
10380
10381
10382
10383
10384
10385
10386     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdin defaults to large file offsets" >&5
10387 $as_echo_n "checking whether stdin defaults to large file offsets... " >&6; }
10388 if ${gl_cv_var_stdin_large_offset+:} false; then :
10389   $as_echo_n "(cached) " >&6
10390 else
10391   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10392 /* end confdefs.h.  */
10393 #include <stdio.h>
10394 int
10395 main ()
10396 {
10397 #if defined __SL64 && defined __SCLE /* cygwin */
10398   /* Cygwin 1.5.24 and earlier fail to put stdin in 64-bit mode, making
10399      fseeko/ftello needlessly fail.  This bug was fixed in 1.5.25, and
10400      it is easier to do a version check than building a runtime test.  */
10401 # include <cygwin/version.h>
10402 # if CYGWIN_VERSION_DLL_COMBINED < CYGWIN_VERSION_DLL_MAKE_COMBINED (1005, 25)
10403   choke me
10404 # endif
10405 #endif
10406   ;
10407   return 0;
10408 }
10409 _ACEOF
10410 if ac_fn_c_try_link "$LINENO"; then :
10411   gl_cv_var_stdin_large_offset=yes
10412 else
10413   gl_cv_var_stdin_large_offset=no
10414 fi
10415 rm -f core conftest.err conftest.$ac_objext \
10416     conftest$ac_exeext conftest.$ac_ext
10417 fi
10418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var_stdin_large_offset" >&5
10419 $as_echo "$gl_cv_var_stdin_large_offset" >&6; }
10420
10421
10422
10423
10424
10425   case "$host_os" in
10426     mingw*)
10427                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
10428 $as_echo_n "checking for 64-bit off_t... " >&6; }
10429 if ${gl_cv_type_off_t_64+:} false; then :
10430   $as_echo_n "(cached) " >&6
10431 else
10432   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10433 /* end confdefs.h.  */
10434 #include <sys/types.h>
10435                 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
10436
10437 int
10438 main ()
10439 {
10440
10441   ;
10442   return 0;
10443 }
10444 _ACEOF
10445 if ac_fn_c_try_compile "$LINENO"; then :
10446   gl_cv_type_off_t_64=yes
10447 else
10448   gl_cv_type_off_t_64=no
10449 fi
10450 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10451
10452 fi
10453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
10454 $as_echo "$gl_cv_type_off_t_64" >&6; }
10455       if test $gl_cv_type_off_t_64 = no; then
10456         WINDOWS_64_BIT_OFF_T=1
10457       else
10458         WINDOWS_64_BIT_OFF_T=0
10459       fi
10460                   WINDOWS_64_BIT_ST_SIZE=1
10461       ;;
10462     *)
10463                                                       WINDOWS_64_BIT_OFF_T=0
10464       WINDOWS_64_BIT_ST_SIZE=0
10465       ;;
10466   esac
10467
10468
10469
10470
10471
10472
10473
10474
10475
10476
10477
10478
10479
10480
10481
10482
10483
10484      if test $gl_cv_have_include_next = yes; then
10485        gl_cv_next_sys_types_h='<'sys/types.h'>'
10486      else
10487        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
10488 $as_echo_n "checking absolute name of <sys/types.h>... " >&6; }
10489 if ${gl_cv_next_sys_types_h+:} false; then :
10490   $as_echo_n "(cached) " >&6
10491 else
10492
10493
10494
10495   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10496 /* end confdefs.h.  */
10497 #include <sys/types.h>
10498 _ACEOF
10499                 case "$host_os" in
10500     aix*) gl_absname_cpp="$ac_cpp -C" ;;
10501     *)    gl_absname_cpp="$ac_cpp" ;;
10502   esac
10503
10504   case "$host_os" in
10505     mingw*)
10506                                           gl_dirsep_regex='[/\\]'
10507       ;;
10508     *)
10509       gl_dirsep_regex='\/'
10510       ;;
10511   esac
10512       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
10513   gl_header_literal_regex=`echo 'sys/types.h' \
10514                            | sed -e "$gl_make_literal_regex_sed"`
10515   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10516       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10517       s|^/[^/]|//&|
10518       p
10519       q
10520     }'
10521
10522         gl_cv_absolute_sys_types_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10523   sed -n "$gl_absolute_header_sed"`
10524
10525            gl_header=$gl_cv_absolute_sys_types_h
10526            gl_cv_next_sys_types_h='"'$gl_header'"'
10527
10528
10529 fi
10530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
10531 $as_echo "$gl_cv_next_sys_types_h" >&6; }
10532      fi
10533      NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h
10534
10535      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10536        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10537        gl_next_as_first_directive='<'sys/types.h'>'
10538      else
10539        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10540        gl_next_as_first_directive=$gl_cv_next_sys_types_h
10541      fi
10542      NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
10543
10544
10545
10546
10547
10548
10549
10550
10551
10552
10553
10554
10555       ac_fn_c_check_decl "$LINENO" "fseeko" "ac_cv_have_decl_fseeko" "$ac_includes_default"
10556 if test "x$ac_cv_have_decl_fseeko" = xyes; then :
10557   ac_have_decl=1
10558 else
10559   ac_have_decl=0
10560 fi
10561
10562 cat >>confdefs.h <<_ACEOF
10563 #define HAVE_DECL_FSEEKO $ac_have_decl
10564 _ACEOF
10565
10566
10567
10568
10569
10570
10571
10572
10573
10574
10575   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fseeko" >&5
10576 $as_echo_n "checking for fseeko... " >&6; }
10577 if ${gl_cv_func_fseeko+:} false; then :
10578   $as_echo_n "(cached) " >&6
10579 else
10580
10581       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10582 /* end confdefs.h.  */
10583 #include <stdio.h>
10584
10585 int
10586 main ()
10587 {
10588 fseeko (stdin, 0, 0);
10589   ;
10590   return 0;
10591 }
10592 _ACEOF
10593 if ac_fn_c_try_link "$LINENO"; then :
10594   gl_cv_func_fseeko=yes
10595 else
10596   gl_cv_func_fseeko=no
10597 fi
10598 rm -f core conftest.err conftest.$ac_objext \
10599     conftest$ac_exeext conftest.$ac_ext
10600
10601 fi
10602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fseeko" >&5
10603 $as_echo "$gl_cv_func_fseeko" >&6; }
10604
10605
10606   :
10607
10608
10609
10610
10611
10612   if test $ac_cv_have_decl_fseeko = no; then
10613     HAVE_DECL_FSEEKO=0
10614   fi
10615
10616   if test $gl_cv_func_fseeko = no; then
10617     HAVE_FSEEKO=0
10618   else
10619     if test $WINDOWS_64_BIT_OFF_T = 1; then
10620       REPLACE_FSEEKO=1
10621     fi
10622     if test $gl_cv_var_stdin_large_offset = no; then
10623       REPLACE_FSEEKO=1
10624     fi
10625
10626
10627
10628   :
10629
10630
10631
10632
10633
10634   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
10635 $as_echo_n "checking whether fflush works on input streams... " >&6; }
10636 if ${gl_cv_func_fflush_stdin+:} false; then :
10637   $as_echo_n "(cached) " >&6
10638 else
10639   echo hello world > conftest.txt
10640      if test "$cross_compiling" = yes; then :
10641   gl_cv_func_fflush_stdin=cross
10642 else
10643   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10644 /* end confdefs.h.  */
10645
10646 #include <stdio.h>
10647 #if HAVE_UNISTD_H
10648 # include <unistd.h>
10649 #else /* on Windows with MSVC */
10650 # include <io.h>
10651 #endif
10652
10653 int
10654 main ()
10655 {
10656 FILE *f = fopen ("conftest.txt", "r");
10657          char buffer[10];
10658          int fd;
10659          int c;
10660          if (f == NULL)
10661            return 1;
10662          fd = fileno (f);
10663          if (fd < 0 || fread (buffer, 1, 5, f) != 5)
10664            return 2;
10665          /* For deterministic results, ensure f read a bigger buffer.  */
10666          if (lseek (fd, 0, SEEK_CUR) == 5)
10667            return 3;
10668          /* POSIX requires fflush-fseek to set file offset of fd.  This fails
10669             on BSD systems and on mingw.  */
10670          if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
10671            return 4;
10672          if (lseek (fd, 0, SEEK_CUR) != 5)
10673            return 5;
10674          /* Verify behaviour of fflush after ungetc. See
10675             <http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt>  */
10676          /* Verify behaviour of fflush after a backup ungetc.  This fails on
10677             mingw.  */
10678          c = fgetc (f);
10679          ungetc (c, f);
10680          fflush (f);
10681          if (fgetc (f) != c)
10682            return 6;
10683          /* Verify behaviour of fflush after a non-backup ungetc.  This fails
10684             on glibc 2.8 and on BSD systems.  */
10685          c = fgetc (f);
10686          ungetc ('@', f);
10687          fflush (f);
10688          if (fgetc (f) != c)
10689            return 7;
10690          return 0;
10691
10692   ;
10693   return 0;
10694 }
10695 _ACEOF
10696 if ac_fn_c_try_run "$LINENO"; then :
10697   gl_cv_func_fflush_stdin=yes
10698 else
10699   gl_cv_func_fflush_stdin=no
10700 fi
10701 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10702   conftest.$ac_objext conftest.beam conftest.$ac_ext
10703 fi
10704
10705      rm conftest.txt
10706
10707 fi
10708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
10709 $as_echo "$gl_cv_func_fflush_stdin" >&6; }
10710   case $gl_cv_func_fflush_stdin in
10711     yes) gl_func_fflush_stdin=1 ;;
10712     no)  gl_func_fflush_stdin=0 ;;
10713     *)   gl_func_fflush_stdin='(-1)' ;;
10714   esac
10715
10716 cat >>confdefs.h <<_ACEOF
10717 #define FUNC_FFLUSH_STDIN $gl_func_fflush_stdin
10718 _ACEOF
10719
10720
10721       if test $gl_cv_func_fflush_stdin != yes; then
10722         REPLACE_FSEEKO=1
10723       fi
10724
10725   fi
10726
10727
10728      GNULIB_FCHMODAT=0;
10729   GNULIB_FSTAT=0;
10730   GNULIB_FSTATAT=0;
10731   GNULIB_FUTIMENS=0;
10732   GNULIB_LCHMOD=0;
10733   GNULIB_LSTAT=0;
10734   GNULIB_MKDIRAT=0;
10735   GNULIB_MKFIFO=0;
10736   GNULIB_MKFIFOAT=0;
10737   GNULIB_MKNOD=0;
10738   GNULIB_MKNODAT=0;
10739   GNULIB_STAT=0;
10740   GNULIB_UTIMENSAT=0;
10741     HAVE_FCHMODAT=1;
10742   HAVE_FSTATAT=1;
10743   HAVE_FUTIMENS=1;
10744   HAVE_LCHMOD=1;
10745   HAVE_LSTAT=1;
10746   HAVE_MKDIRAT=1;
10747   HAVE_MKFIFO=1;
10748   HAVE_MKFIFOAT=1;
10749   HAVE_MKNOD=1;
10750   HAVE_MKNODAT=1;
10751   HAVE_UTIMENSAT=1;
10752   REPLACE_FSTAT=0;
10753   REPLACE_FSTATAT=0;
10754   REPLACE_FUTIMENS=0;
10755   REPLACE_LSTAT=0;
10756   REPLACE_MKDIR=0;
10757   REPLACE_MKFIFO=0;
10758   REPLACE_MKNOD=0;
10759   REPLACE_STAT=0;
10760   REPLACE_UTIMENSAT=0;
10761
10762 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
10763 $as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
10764 if ${ac_cv_header_stat_broken+:} false; then :
10765   $as_echo_n "(cached) " >&6
10766 else
10767   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10768 /* end confdefs.h.  */
10769 #include <sys/types.h>
10770 #include <sys/stat.h>
10771
10772 #if defined S_ISBLK && defined S_IFDIR
10773 extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
10774 #endif
10775
10776 #if defined S_ISBLK && defined S_IFCHR
10777 extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
10778 #endif
10779
10780 #if defined S_ISLNK && defined S_IFREG
10781 extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
10782 #endif
10783
10784 #if defined S_ISSOCK && defined S_IFREG
10785 extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
10786 #endif
10787
10788 _ACEOF
10789 if ac_fn_c_try_compile "$LINENO"; then :
10790   ac_cv_header_stat_broken=no
10791 else
10792   ac_cv_header_stat_broken=yes
10793 fi
10794 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10795 fi
10796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
10797 $as_echo "$ac_cv_header_stat_broken" >&6; }
10798 if test $ac_cv_header_stat_broken = yes; then
10799
10800 $as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
10801
10802 fi
10803
10804
10805
10806
10807
10808
10809
10810
10811
10812
10813
10814
10815
10816
10817
10818
10819
10820   :
10821
10822
10823
10824
10825
10826
10827
10828
10829      if test $gl_cv_have_include_next = yes; then
10830        gl_cv_next_sys_stat_h='<'sys/stat.h'>'
10831      else
10832        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
10833 $as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
10834 if ${gl_cv_next_sys_stat_h+:} false; then :
10835   $as_echo_n "(cached) " >&6
10836 else
10837
10838              if test $ac_cv_header_sys_stat_h = yes; then
10839
10840
10841
10842
10843   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10844 /* end confdefs.h.  */
10845 #include <sys/stat.h>
10846 _ACEOF
10847                 case "$host_os" in
10848     aix*) gl_absname_cpp="$ac_cpp -C" ;;
10849     *)    gl_absname_cpp="$ac_cpp" ;;
10850   esac
10851
10852   case "$host_os" in
10853     mingw*)
10854                                           gl_dirsep_regex='[/\\]'
10855       ;;
10856     *)
10857       gl_dirsep_regex='\/'
10858       ;;
10859   esac
10860       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
10861   gl_header_literal_regex=`echo 'sys/stat.h' \
10862                            | sed -e "$gl_make_literal_regex_sed"`
10863   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10864       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10865       s|^/[^/]|//&|
10866       p
10867       q
10868     }'
10869
10870         gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10871   sed -n "$gl_absolute_header_sed"`
10872
10873            gl_header=$gl_cv_absolute_sys_stat_h
10874            gl_cv_next_sys_stat_h='"'$gl_header'"'
10875           else
10876                gl_cv_next_sys_stat_h='<'sys/stat.h'>'
10877              fi
10878
10879
10880 fi
10881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
10882 $as_echo "$gl_cv_next_sys_stat_h" >&6; }
10883      fi
10884      NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
10885
10886      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10887        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10888        gl_next_as_first_directive='<'sys/stat.h'>'
10889      else
10890        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10891        gl_next_as_first_directive=$gl_cv_next_sys_stat_h
10892      fi
10893      NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
10894
10895
10896
10897
10898
10899
10900
10901
10902
10903
10904
10905   if test $WINDOWS_64_BIT_ST_SIZE = 1; then
10906
10907 $as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
10908
10909   fi
10910
10911       ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
10912      #include <sys/stat.h>
10913 "
10914 if test "x$ac_cv_type_nlink_t" = xyes; then :
10915
10916 else
10917
10918 $as_echo "#define nlink_t int" >>confdefs.h
10919
10920 fi
10921
10922
10923
10924     for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat     mknod mknodat stat utimensat; do
10925     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
10926     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
10927 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
10928 if eval \${$as_gl_Symbol+:} false; then :
10929   $as_echo_n "(cached) " >&6
10930 else
10931   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10932 /* end confdefs.h.  */
10933 #include <sys/stat.h>
10934
10935 int
10936 main ()
10937 {
10938 #undef $gl_func
10939   (void) $gl_func;
10940   ;
10941   return 0;
10942 }
10943 _ACEOF
10944 if ac_fn_c_try_compile "$LINENO"; then :
10945   eval "$as_gl_Symbol=yes"
10946 else
10947   eval "$as_gl_Symbol=no"
10948 fi
10949 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10950 fi
10951 eval ac_res=\$$as_gl_Symbol
10952                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10953 $as_echo "$ac_res" >&6; }
10954     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
10955   cat >>confdefs.h <<_ACEOF
10956 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
10957 _ACEOF
10958
10959                      eval ac_cv_have_decl_$gl_func=yes
10960 fi
10961       done
10962
10963
10964
10965       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
10966 $as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
10967 if ${gl_cv_func_lstat_dereferences_slashed_symlink+:} false; then :
10968   $as_echo_n "(cached) " >&6
10969 else
10970   rm -f conftest.sym conftest.file
10971      echo >conftest.file
10972      if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then
10973        if test "$cross_compiling" = yes; then :
10974   case "$host_os" in
10975                     # Guess yes on glibc systems.
10976             *-gnu*) gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
10977                     # If we don't know, assume the worst.
10978             *)      gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
10979           esac
10980
10981 else
10982   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10983 /* end confdefs.h.  */
10984 $ac_includes_default
10985 int
10986 main ()
10987 {
10988 struct stat sbuf;
10989               /* Linux will dereference the symlink and fail, as required by
10990                  POSIX.  That is better in the sense that it means we will not
10991                  have to compile and use the lstat wrapper.  */
10992               return lstat ("conftest.sym/", &sbuf) == 0;
10993
10994   ;
10995   return 0;
10996 }
10997 _ACEOF
10998 if ac_fn_c_try_run "$LINENO"; then :
10999   gl_cv_func_lstat_dereferences_slashed_symlink=yes
11000 else
11001   gl_cv_func_lstat_dereferences_slashed_symlink=no
11002 fi
11003 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11004   conftest.$ac_objext conftest.beam conftest.$ac_ext
11005 fi
11006
11007      else
11008        # If the 'ln -s' command failed, then we probably don't even
11009        # have an lstat function.
11010        gl_cv_func_lstat_dereferences_slashed_symlink="guessing no"
11011      fi
11012      rm -f conftest.sym conftest.file
11013
11014 fi
11015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
11016 $as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
11017   case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
11018     *yes)
11019
11020 cat >>confdefs.h <<_ACEOF
11021 #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
11022 _ACEOF
11023
11024       ;;
11025   esac
11026
11027
11028
11029
11030
11031
11032
11033       ac_fn_c_check_decl "$LINENO" "ftello" "ac_cv_have_decl_ftello" "$ac_includes_default"
11034 if test "x$ac_cv_have_decl_ftello" = xyes; then :
11035   ac_have_decl=1
11036 else
11037   ac_have_decl=0
11038 fi
11039
11040 cat >>confdefs.h <<_ACEOF
11041 #define HAVE_DECL_FTELLO $ac_have_decl
11042 _ACEOF
11043
11044
11045
11046
11047
11048
11049
11050
11051
11052
11053
11054   :
11055
11056
11057
11058
11059
11060   if test $ac_cv_have_decl_ftello = no; then
11061     HAVE_DECL_FTELLO=0
11062   fi
11063
11064   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ftello" >&5
11065 $as_echo_n "checking for ftello... " >&6; }
11066 if ${gl_cv_func_ftello+:} false; then :
11067   $as_echo_n "(cached) " >&6
11068 else
11069
11070       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11071 /* end confdefs.h.  */
11072 #include <stdio.h>
11073 int
11074 main ()
11075 {
11076 ftello (stdin);
11077   ;
11078   return 0;
11079 }
11080 _ACEOF
11081 if ac_fn_c_try_link "$LINENO"; then :
11082   gl_cv_func_ftello=yes
11083 else
11084   gl_cv_func_ftello=no
11085 fi
11086 rm -f core conftest.err conftest.$ac_objext \
11087     conftest$ac_exeext conftest.$ac_ext
11088
11089 fi
11090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello" >&5
11091 $as_echo "$gl_cv_func_ftello" >&6; }
11092   if test $gl_cv_func_ftello = no; then
11093     HAVE_FTELLO=0
11094   else
11095     if test $WINDOWS_64_BIT_OFF_T = 1; then
11096       REPLACE_FTELLO=1
11097     fi
11098     if test $gl_cv_var_stdin_large_offset = no; then
11099       REPLACE_FTELLO=1
11100     fi
11101     if test $REPLACE_FTELLO = 0; then
11102
11103       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ftello works" >&5
11104 $as_echo_n "checking whether ftello works... " >&6; }
11105 if ${gl_cv_func_ftello_works+:} false; then :
11106   $as_echo_n "(cached) " >&6
11107 else
11108
11109                               case "$host_os" in
11110                       # Guess no on Solaris.
11111             solaris*) gl_cv_func_ftello_works="guessing no" ;;
11112                       # Guess yes otherwise.
11113             *)        gl_cv_func_ftello_works="guessing yes" ;;
11114           esac
11115           if test "$cross_compiling" = yes; then :
11116   :
11117 else
11118   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11119 /* end confdefs.h.  */
11120
11121 #include <stdio.h>
11122 #include <stdlib.h>
11123 #include <string.h>
11124 #define TESTFILE "conftest.tmp"
11125 int
11126 main (void)
11127 {
11128   FILE *fp;
11129
11130   /* Create a file with some contents.  */
11131   fp = fopen (TESTFILE, "w");
11132   if (fp == NULL)
11133     return 70;
11134   if (fwrite ("foogarsh", 1, 8, fp) < 8)
11135     return 71;
11136   if (fclose (fp))
11137     return 72;
11138
11139   /* The file's contents is now "foogarsh".  */
11140
11141   /* Try writing after reading to EOF.  */
11142   fp = fopen (TESTFILE, "r+");
11143   if (fp == NULL)
11144     return 73;
11145   if (fseek (fp, -1, SEEK_END))
11146     return 74;
11147   if (!(getc (fp) == 'h'))
11148     return 1;
11149   if (!(getc (fp) == EOF))
11150     return 2;
11151   if (!(ftell (fp) == 8))
11152     return 3;
11153   if (!(ftell (fp) == 8))
11154     return 4;
11155   if (!(putc ('!', fp) == '!'))
11156     return 5;
11157   if (!(ftell (fp) == 9))
11158     return 6;
11159   if (!(fclose (fp) == 0))
11160     return 7;
11161   fp = fopen (TESTFILE, "r");
11162   if (fp == NULL)
11163     return 75;
11164   {
11165     char buf[10];
11166     if (!(fread (buf, 1, 10, fp) == 9))
11167       return 10;
11168     if (!(memcmp (buf, "foogarsh!", 9) == 0))
11169       return 11;
11170   }
11171   if (!(fclose (fp) == 0))
11172     return 12;
11173
11174   /* The file's contents is now "foogarsh!".  */
11175
11176   return 0;
11177 }
11178 _ACEOF
11179 if ac_fn_c_try_run "$LINENO"; then :
11180   gl_cv_func_ftello_works=yes
11181 else
11182   gl_cv_func_ftello_works=no
11183 fi
11184 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11185   conftest.$ac_objext conftest.beam conftest.$ac_ext
11186 fi
11187
11188
11189 fi
11190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello_works" >&5
11191 $as_echo "$gl_cv_func_ftello_works" >&6; }
11192       case "$gl_cv_func_ftello_works" in
11193         *yes) ;;
11194         *)
11195           REPLACE_FTELLO=1
11196
11197 $as_echo "#define FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE 1" >>confdefs.h
11198
11199           ;;
11200       esac
11201     fi
11202   fi
11203
11204
11205
11206
11207
11208
11209
11210
11211
11212
11213
11214
11215
11216
11217
11218
11219
11220
11221   :
11222
11223
11224
11225
11226
11227    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5
11228 $as_echo_n "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; }
11229 if ${gl_cv_func_getcwd_null+:} false; then :
11230   $as_echo_n "(cached) " >&6
11231 else
11232   if test "$cross_compiling" = yes; then :
11233   case "$host_os" in
11234                      # Guess yes on glibc systems.
11235             *-gnu*)  gl_cv_func_getcwd_null="guessing yes";;
11236                      # Guess yes on Cygwin.
11237             cygwin*) gl_cv_func_getcwd_null="guessing yes";;
11238                      # If we don't know, assume the worst.
11239             *)       gl_cv_func_getcwd_null="guessing no";;
11240           esac
11241
11242 else
11243   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11244 /* end confdefs.h.  */
11245
11246 #        if HAVE_UNISTD_H
11247 #         include <unistd.h>
11248 #        else /* on Windows with MSVC */
11249 #         include <direct.h>
11250 #        endif
11251 #        ifndef getcwd
11252          char *getcwd ();
11253 #        endif
11254
11255 int
11256 main ()
11257 {
11258
11259 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
11260 /* mingw cwd does not start with '/', but getcwd does allocate.
11261    However, mingw fails to honor non-zero size.  */
11262 #else
11263            if (chdir ("/") != 0)
11264              return 1;
11265            else
11266              {
11267                char *f = getcwd (NULL, 0);
11268                if (! f)
11269                  return 2;
11270                if (f[0] != '/')
11271                  return 3;
11272                if (f[1] != '\0')
11273                  return 4;
11274                return 0;
11275              }
11276 #endif
11277
11278   ;
11279   return 0;
11280 }
11281 _ACEOF
11282 if ac_fn_c_try_run "$LINENO"; then :
11283   gl_cv_func_getcwd_null=yes
11284 else
11285   gl_cv_func_getcwd_null=no
11286 fi
11287 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11288   conftest.$ac_objext conftest.beam conftest.$ac_ext
11289 fi
11290
11291 fi
11292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_null" >&5
11293 $as_echo "$gl_cv_func_getcwd_null" >&6; }
11294
11295
11296   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getcwd with POSIX signature" >&5
11297 $as_echo_n "checking for getcwd with POSIX signature... " >&6; }
11298 if ${gl_cv_func_getcwd_posix_signature+:} false; then :
11299   $as_echo_n "(cached) " >&6
11300 else
11301   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11302 /* end confdefs.h.  */
11303 #include <unistd.h>
11304 int
11305 main ()
11306 {
11307 extern
11308            #ifdef __cplusplus
11309            "C"
11310            #endif
11311            char *getcwd (char *, size_t);
11312
11313   ;
11314   return 0;
11315 }
11316
11317 _ACEOF
11318 if ac_fn_c_try_compile "$LINENO"; then :
11319   gl_cv_func_getcwd_posix_signature=yes
11320 else
11321   gl_cv_func_getcwd_posix_signature=no
11322 fi
11323 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11324
11325 fi
11326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_posix_signature" >&5
11327 $as_echo "$gl_cv_func_getcwd_posix_signature" >&6; }
11328
11329
11330       ac_fn_c_check_decl "$LINENO" "getcwd" "ac_cv_have_decl_getcwd" "$ac_includes_default"
11331 if test "x$ac_cv_have_decl_getcwd" = xyes; then :
11332   ac_have_decl=1
11333 else
11334   ac_have_decl=0
11335 fi
11336
11337 cat >>confdefs.h <<_ACEOF
11338 #define HAVE_DECL_GETCWD $ac_have_decl
11339 _ACEOF
11340
11341
11342
11343       ac_fn_c_check_decl "$LINENO" "getdelim" "ac_cv_have_decl_getdelim" "$ac_includes_default"
11344 if test "x$ac_cv_have_decl_getdelim" = xyes; then :
11345   ac_have_decl=1
11346 else
11347   ac_have_decl=0
11348 fi
11349
11350 cat >>confdefs.h <<_ACEOF
11351 #define HAVE_DECL_GETDELIM $ac_have_decl
11352 _ACEOF
11353
11354
11355
11356
11357
11358
11359
11360
11361
11362
11363
11364
11365
11366
11367
11368
11369
11370
11371       ac_fn_c_check_decl "$LINENO" "getline" "ac_cv_have_decl_getline" "$ac_includes_default"
11372 if test "x$ac_cv_have_decl_getline" = xyes; then :
11373   ac_have_decl=1
11374 else
11375   ac_have_decl=0
11376 fi
11377
11378 cat >>confdefs.h <<_ACEOF
11379 #define HAVE_DECL_GETLINE $ac_have_decl
11380 _ACEOF
11381
11382
11383
11384
11385
11386
11387
11388
11389
11390
11391
11392
11393
11394
11395
11396
11397
11398   :
11399
11400
11401
11402
11403
11404
11405
11406
11407      if test $gl_cv_have_include_next = yes; then
11408        gl_cv_next_getopt_h='<'getopt.h'>'
11409      else
11410        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5
11411 $as_echo_n "checking absolute name of <getopt.h>... " >&6; }
11412 if ${gl_cv_next_getopt_h+:} false; then :
11413   $as_echo_n "(cached) " >&6
11414 else
11415
11416              if test $ac_cv_header_getopt_h = yes; then
11417
11418
11419
11420
11421   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11422 /* end confdefs.h.  */
11423 #include <getopt.h>
11424 _ACEOF
11425                 case "$host_os" in
11426     aix*) gl_absname_cpp="$ac_cpp -C" ;;
11427     *)    gl_absname_cpp="$ac_cpp" ;;
11428   esac
11429
11430   case "$host_os" in
11431     mingw*)
11432                                           gl_dirsep_regex='[/\\]'
11433       ;;
11434     *)
11435       gl_dirsep_regex='\/'
11436       ;;
11437   esac
11438       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11439   gl_header_literal_regex=`echo 'getopt.h' \
11440                            | sed -e "$gl_make_literal_regex_sed"`
11441   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11442       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11443       s|^/[^/]|//&|
11444       p
11445       q
11446     }'
11447
11448         gl_cv_absolute_getopt_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11449   sed -n "$gl_absolute_header_sed"`
11450
11451            gl_header=$gl_cv_absolute_getopt_h
11452            gl_cv_next_getopt_h='"'$gl_header'"'
11453           else
11454                gl_cv_next_getopt_h='<'getopt.h'>'
11455              fi
11456
11457
11458 fi
11459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5
11460 $as_echo "$gl_cv_next_getopt_h" >&6; }
11461      fi
11462      NEXT_GETOPT_H=$gl_cv_next_getopt_h
11463
11464      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11465        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11466        gl_next_as_first_directive='<'getopt.h'>'
11467      else
11468        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11469        gl_next_as_first_directive=$gl_cv_next_getopt_h
11470      fi
11471      NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive
11472
11473
11474
11475
11476   if test $ac_cv_header_getopt_h = yes; then
11477     HAVE_GETOPT_H=1
11478   else
11479     HAVE_GETOPT_H=0
11480   fi
11481
11482
11483   gl_replace_getopt=
11484
11485     if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
11486     for ac_header in getopt.h
11487 do :
11488   ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
11489 if test "x$ac_cv_header_getopt_h" = xyes; then :
11490   cat >>confdefs.h <<_ACEOF
11491 #define HAVE_GETOPT_H 1
11492 _ACEOF
11493
11494 else
11495   gl_replace_getopt=yes
11496 fi
11497
11498 done
11499
11500   fi
11501
11502     if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
11503     for ac_func in getopt_long_only
11504 do :
11505   ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
11506 if test "x$ac_cv_func_getopt_long_only" = xyes; then :
11507   cat >>confdefs.h <<_ACEOF
11508 #define HAVE_GETOPT_LONG_ONLY 1
11509 _ACEOF
11510
11511 else
11512   gl_replace_getopt=yes
11513 fi
11514 done
11515
11516   fi
11517
11518           if test -z "$gl_replace_getopt"; then
11519     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5
11520 $as_echo_n "checking whether getopt is POSIX compatible... " >&6; }
11521 if ${gl_cv_func_getopt_posix+:} false; then :
11522   $as_echo_n "(cached) " >&6
11523 else
11524
11525                                                 if test $cross_compiling = no; then
11526                               if test "$cross_compiling" = yes; then :
11527   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11528 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11529 as_fn_error $? "cannot run test program while cross compiling
11530 See \`config.log' for more details" "$LINENO" 5; }
11531 else
11532   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11533 /* end confdefs.h.  */
11534
11535 #include <unistd.h>
11536 #include <stdlib.h>
11537 #include <string.h>
11538
11539 int
11540 main ()
11541 {
11542   static char program[] = "program";
11543   static char a[] = "-a";
11544   static char foo[] = "foo";
11545   static char bar[] = "bar";
11546   char *argv[] = { program, a, foo, bar, NULL };
11547   int c;
11548
11549   c = getopt (4, argv, "ab");
11550   if (!(c == 'a'))
11551     return 1;
11552   c = getopt (4, argv, "ab");
11553   if (!(c == -1))
11554     return 2;
11555   if (!(optind == 2))
11556     return 3;
11557   return 0;
11558 }
11559
11560 _ACEOF
11561 if ac_fn_c_try_run "$LINENO"; then :
11562   gl_cv_func_getopt_posix=maybe
11563 else
11564   gl_cv_func_getopt_posix=no
11565 fi
11566 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11567   conftest.$ac_objext conftest.beam conftest.$ac_ext
11568 fi
11569
11570           if test $gl_cv_func_getopt_posix = maybe; then
11571                                     if test "$cross_compiling" = yes; then :
11572   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11573 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11574 as_fn_error $? "cannot run test program while cross compiling
11575 See \`config.log' for more details" "$LINENO" 5; }
11576 else
11577   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11578 /* end confdefs.h.  */
11579
11580 #include <unistd.h>
11581 #include <stdlib.h>
11582 #include <string.h>
11583
11584 int
11585 main ()
11586 {
11587   static char program[] = "program";
11588   static char donald[] = "donald";
11589   static char p[] = "-p";
11590   static char billy[] = "billy";
11591   static char duck[] = "duck";
11592   static char a[] = "-a";
11593   static char bar[] = "bar";
11594   char *argv[] = { program, donald, p, billy, duck, a, bar, NULL };
11595   int c;
11596
11597   c = getopt (7, argv, "+abp:q:");
11598   if (!(c == -1))
11599     return 4;
11600   if (!(strcmp (argv[0], "program") == 0))
11601     return 5;
11602   if (!(strcmp (argv[1], "donald") == 0))
11603     return 6;
11604   if (!(strcmp (argv[2], "-p") == 0))
11605     return 7;
11606   if (!(strcmp (argv[3], "billy") == 0))
11607     return 8;
11608   if (!(strcmp (argv[4], "duck") == 0))
11609     return 9;
11610   if (!(strcmp (argv[5], "-a") == 0))
11611     return 10;
11612   if (!(strcmp (argv[6], "bar") == 0))
11613     return 11;
11614   if (!(optind == 1))
11615     return 12;
11616   return 0;
11617 }
11618
11619 _ACEOF
11620 if ac_fn_c_try_run "$LINENO"; then :
11621   gl_cv_func_getopt_posix=maybe
11622 else
11623   gl_cv_func_getopt_posix=no
11624 fi
11625 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11626   conftest.$ac_objext conftest.beam conftest.$ac_ext
11627 fi
11628
11629           fi
11630           if test $gl_cv_func_getopt_posix = maybe; then
11631                         if test "$cross_compiling" = yes; then :
11632   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11633 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11634 as_fn_error $? "cannot run test program while cross compiling
11635 See \`config.log' for more details" "$LINENO" 5; }
11636 else
11637   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11638 /* end confdefs.h.  */
11639
11640 #include <unistd.h>
11641 #include <stdlib.h>
11642 #include <string.h>
11643
11644 int
11645 main ()
11646 {
11647   static char program[] = "program";
11648   static char ab[] = "-ab";
11649   char *argv[3] = { program, ab, NULL };
11650   if (getopt (2, argv, "ab:") != 'a')
11651     return 13;
11652   if (getopt (2, argv, "ab:") != '?')
11653     return 14;
11654   if (optopt != 'b')
11655     return 15;
11656   if (optind != 2)
11657     return 16;
11658   return 0;
11659 }
11660
11661 _ACEOF
11662 if ac_fn_c_try_run "$LINENO"; then :
11663   gl_cv_func_getopt_posix=yes
11664 else
11665   gl_cv_func_getopt_posix=no
11666 fi
11667 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11668   conftest.$ac_objext conftest.beam conftest.$ac_ext
11669 fi
11670
11671           fi
11672         else
11673           case "$host_os" in
11674             darwin* | aix* | mingw*) gl_cv_func_getopt_posix="guessing no";;
11675             *)                       gl_cv_func_getopt_posix="guessing yes";;
11676           esac
11677         fi
11678
11679 fi
11680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5
11681 $as_echo "$gl_cv_func_getopt_posix" >&6; }
11682     case "$gl_cv_func_getopt_posix" in
11683       *no) gl_replace_getopt=yes ;;
11684     esac
11685   fi
11686
11687   if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
11688     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
11689 $as_echo_n "checking for working GNU getopt function... " >&6; }
11690 if ${gl_cv_func_getopt_gnu+:} false; then :
11691   $as_echo_n "(cached) " >&6
11692 else
11693   # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the
11694        # optstring is necessary for programs like m4 that have POSIX-mandated
11695        # semantics for supporting options interspersed with files.
11696        # Also, since getopt_long is a GNU extension, we require optind=0.
11697        # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT;
11698        # so take care to revert to the correct (non-)export state.
11699        gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }'
11700        case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in
11701          xx) gl_had_POSIXLY_CORRECT=exported ;;
11702          x)  gl_had_POSIXLY_CORRECT=yes      ;;
11703          *)  gl_had_POSIXLY_CORRECT=         ;;
11704        esac
11705        POSIXLY_CORRECT=1
11706        export POSIXLY_CORRECT
11707        if test "$cross_compiling" = yes; then :
11708            gl_cv_func_getopt_gnu="guessing no"
11709
11710 else
11711   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11712 /* end confdefs.h.  */
11713 #include <getopt.h>
11714                            #include <stddef.h>
11715                            #include <string.h>
11716
11717 #include <stdlib.h>
11718 #if defined __MACH__ && defined __APPLE__
11719 /* Avoid a crash on Mac OS X.  */
11720 #include <mach/mach.h>
11721 #include <mach/mach_error.h>
11722 #include <mach/thread_status.h>
11723 #include <mach/exception.h>
11724 #include <mach/task.h>
11725 #include <pthread.h>
11726 /* The exception port on which our thread listens.  */
11727 static mach_port_t our_exception_port;
11728 /* The main function of the thread listening for exceptions of type
11729    EXC_BAD_ACCESS.  */
11730 static void *
11731 mach_exception_thread (void *arg)
11732 {
11733   /* Buffer for a message to be received.  */
11734   struct {
11735     mach_msg_header_t head;
11736     mach_msg_body_t msgh_body;
11737     char data[1024];
11738   } msg;
11739   mach_msg_return_t retval;
11740   /* Wait for a message on the exception port.  */
11741   retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
11742                      our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
11743   if (retval != MACH_MSG_SUCCESS)
11744     abort ();
11745   exit (1);
11746 }
11747 static void
11748 nocrash_init (void)
11749 {
11750   mach_port_t self = mach_task_self ();
11751   /* Allocate a port on which the thread shall listen for exceptions.  */
11752   if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
11753       == KERN_SUCCESS) {
11754     /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html.  */
11755     if (mach_port_insert_right (self, our_exception_port, our_exception_port,
11756                                 MACH_MSG_TYPE_MAKE_SEND)
11757         == KERN_SUCCESS) {
11758       /* The exceptions we want to catch.  Only EXC_BAD_ACCESS is interesting
11759          for us.  */
11760       exception_mask_t mask = EXC_MASK_BAD_ACCESS;
11761       /* Create the thread listening on the exception port.  */
11762       pthread_attr_t attr;
11763       pthread_t thread;
11764       if (pthread_attr_init (&attr) == 0
11765           && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
11766           && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
11767         pthread_attr_destroy (&attr);
11768         /* Replace the exception port info for these exceptions with our own.
11769            Note that we replace the exception port for the entire task, not only
11770            for a particular thread.  This has the effect that when our exception
11771            port gets the message, the thread specific exception port has already
11772            been asked, and we don't need to bother about it.
11773            See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html.  */
11774         task_set_exception_ports (self, mask, our_exception_port,
11775                                   EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
11776       }
11777     }
11778   }
11779 }
11780 #elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
11781 /* Avoid a crash on native Windows.  */
11782 #define WIN32_LEAN_AND_MEAN
11783 #include <windows.h>
11784 #include <winerror.h>
11785 static LONG WINAPI
11786 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
11787 {
11788   switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
11789     {
11790     case EXCEPTION_ACCESS_VIOLATION:
11791     case EXCEPTION_IN_PAGE_ERROR:
11792     case EXCEPTION_STACK_OVERFLOW:
11793     case EXCEPTION_GUARD_PAGE:
11794     case EXCEPTION_PRIV_INSTRUCTION:
11795     case EXCEPTION_ILLEGAL_INSTRUCTION:
11796     case EXCEPTION_DATATYPE_MISALIGNMENT:
11797     case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
11798     case EXCEPTION_NONCONTINUABLE_EXCEPTION:
11799       exit (1);
11800     }
11801   return EXCEPTION_CONTINUE_SEARCH;
11802 }
11803 static void
11804 nocrash_init (void)
11805 {
11806   SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
11807 }
11808 #else
11809 /* Avoid a crash on POSIX systems.  */
11810 #include <signal.h>
11811 /* A POSIX signal handler.  */
11812 static void
11813 exception_handler (int sig)
11814 {
11815   exit (1);
11816 }
11817 static void
11818 nocrash_init (void)
11819 {
11820 #ifdef SIGSEGV
11821   signal (SIGSEGV, exception_handler);
11822 #endif
11823 #ifdef SIGBUS
11824   signal (SIGBUS, exception_handler);
11825 #endif
11826 }
11827 #endif
11828
11829
11830 int
11831 main ()
11832 {
11833
11834              int result = 0;
11835
11836              nocrash_init();
11837
11838              /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
11839                 and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
11840                 OSF/1 5.1, Solaris 10.  */
11841              {
11842                static char conftest[] = "conftest";
11843                static char plus[] = "-+";
11844                char *argv[3] = { conftest, plus, NULL };
11845                opterr = 0;
11846                if (getopt (2, argv, "+a") != '?')
11847                  result |= 1;
11848              }
11849              /* This code succeeds on glibc 2.8, mingw,
11850                 and fails on Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
11851                 IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x.  */
11852              {
11853                static char program[] = "program";
11854                static char p[] = "-p";
11855                static char foo[] = "foo";
11856                static char bar[] = "bar";
11857                char *argv[] = { program, p, foo, bar, NULL };
11858
11859                optind = 1;
11860                if (getopt (4, argv, "p::") != 'p')
11861                  result |= 2;
11862                else if (optarg != NULL)
11863                  result |= 4;
11864                else if (getopt (4, argv, "p::") != -1)
11865                  result |= 6;
11866                else if (optind != 2)
11867                  result |= 8;
11868              }
11869              /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0.  */
11870              {
11871                static char program[] = "program";
11872                static char foo[] = "foo";
11873                static char p[] = "-p";
11874                char *argv[] = { program, foo, p, NULL };
11875                optind = 0;
11876                if (getopt (3, argv, "-p") != 1)
11877                  result |= 16;
11878                else if (getopt (3, argv, "-p") != 'p')
11879                  result |= 16;
11880              }
11881              /* This code fails on glibc 2.11.  */
11882              {
11883                static char program[] = "program";
11884                static char b[] = "-b";
11885                static char a[] = "-a";
11886                char *argv[] = { program, b, a, NULL };
11887                optind = opterr = 0;
11888                if (getopt (3, argv, "+:a:b") != 'b')
11889                  result |= 32;
11890                else if (getopt (3, argv, "+:a:b") != ':')
11891                  result |= 32;
11892              }
11893              /* This code dumps core on glibc 2.14.  */
11894              {
11895                static char program[] = "program";
11896                static char w[] = "-W";
11897                static char dummy[] = "dummy";
11898                char *argv[] = { program, w, dummy, NULL };
11899                optind = opterr = 1;
11900                if (getopt (3, argv, "W;") != 'W')
11901                  result |= 64;
11902              }
11903              return result;
11904
11905   ;
11906   return 0;
11907 }
11908 _ACEOF
11909 if ac_fn_c_try_run "$LINENO"; then :
11910   gl_cv_func_getopt_gnu=yes
11911 else
11912   gl_cv_func_getopt_gnu=no
11913 fi
11914 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11915   conftest.$ac_objext conftest.beam conftest.$ac_ext
11916 fi
11917
11918        case $gl_had_POSIXLY_CORRECT in
11919          exported) ;;
11920          yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;;
11921          *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;;
11922        esac
11923
11924 fi
11925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5
11926 $as_echo "$gl_cv_func_getopt_gnu" >&6; }
11927     if test "$gl_cv_func_getopt_gnu" != yes; then
11928       gl_replace_getopt=yes
11929     else
11930       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt_long function" >&5
11931 $as_echo_n "checking for working GNU getopt_long function... " >&6; }
11932 if ${gl_cv_func_getopt_long_gnu+:} false; then :
11933   $as_echo_n "(cached) " >&6
11934 else
11935   if test "$cross_compiling" = yes; then :
11936               case "$host_os" in
11937               openbsd*) gl_cv_func_getopt_long_gnu="guessing no";;
11938               *)        gl_cv_func_getopt_long_gnu="guessing yes";;
11939             esac
11940
11941 else
11942   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11943 /* end confdefs.h.  */
11944 #include <getopt.h>
11945                 #include <stddef.h>
11946                 #include <string.h>
11947
11948 int
11949 main ()
11950 {
11951 static const struct option long_options[] =
11952                   {
11953                     { "xtremely-",no_argument,       NULL, 1003 },
11954                     { "xtra",     no_argument,       NULL, 1001 },
11955                     { "xtreme",   no_argument,       NULL, 1002 },
11956                     { "xtremely", no_argument,       NULL, 1003 },
11957                     { NULL,       0,                 NULL, 0 }
11958                   };
11959                 /* This code fails on OpenBSD 5.0.  */
11960                 {
11961                   static char program[] = "program";
11962                   static char xtremel[] = "--xtremel";
11963                   char *argv[] = { program, xtremel, NULL };
11964                   int option_index;
11965                   optind = 1; opterr = 0;
11966                   if (getopt_long (2, argv, "", long_options, &option_index) != 1003)
11967                     return 1;
11968                 }
11969                 return 0;
11970
11971   ;
11972   return 0;
11973 }
11974 _ACEOF
11975 if ac_fn_c_try_run "$LINENO"; then :
11976   gl_cv_func_getopt_long_gnu=yes
11977 else
11978   gl_cv_func_getopt_long_gnu=no
11979 fi
11980 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11981   conftest.$ac_objext conftest.beam conftest.$ac_ext
11982 fi
11983
11984
11985 fi
11986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_long_gnu" >&5
11987 $as_echo "$gl_cv_func_getopt_long_gnu" >&6; }
11988       case "$gl_cv_func_getopt_long_gnu" in
11989         *yes) ;;
11990         *) gl_replace_getopt=yes ;;
11991       esac
11992     fi
11993   fi
11994
11995
11996
11997
11998
11999
12000     REPLACE_GETOPT=0
12001     if test -n "$gl_replace_getopt"; then
12002       REPLACE_GETOPT=1
12003     fi
12004
12005   if test $REPLACE_GETOPT = 1; then
12006
12007   GETOPT_H=getopt.h
12008
12009 $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
12010
12011
12012
12013   fi
12014
12015
12016       ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default"
12017 if test "x$ac_cv_have_decl_getenv" = xyes; then :
12018   ac_have_decl=1
12019 else
12020   ac_have_decl=0
12021 fi
12022
12023 cat >>confdefs.h <<_ACEOF
12024 #define HAVE_DECL_GETENV $ac_have_decl
12025 _ACEOF
12026
12027
12028 :
12029
12030
12031
12032
12033
12034
12035
12036
12037
12038
12039 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
12040 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
12041 if ${ac_cv_c_restrict+:} false; then :
12042   $as_echo_n "(cached) " >&6
12043 else
12044   ac_cv_c_restrict=no
12045    # The order here caters to the fact that C++ does not require restrict.
12046    for ac_kw in __restrict __restrict__ _Restrict restrict; do
12047      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12048 /* end confdefs.h.  */
12049 typedef int * int_ptr;
12050         int foo (int_ptr $ac_kw ip) {
12051         return ip[0];
12052        }
12053 int
12054 main ()
12055 {
12056 int s[1];
12057         int * $ac_kw t = s;
12058         t[0] = 0;
12059         return foo(t)
12060   ;
12061   return 0;
12062 }
12063 _ACEOF
12064 if ac_fn_c_try_compile "$LINENO"; then :
12065   ac_cv_c_restrict=$ac_kw
12066 fi
12067 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12068      test "$ac_cv_c_restrict" != no && break
12069    done
12070
12071 fi
12072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
12073 $as_echo "$ac_cv_c_restrict" >&6; }
12074
12075  case $ac_cv_c_restrict in
12076    restrict) ;;
12077    no) $as_echo "#define restrict /**/" >>confdefs.h
12078  ;;
12079    *)  cat >>confdefs.h <<_ACEOF
12080 #define restrict $ac_cv_c_restrict
12081 _ACEOF
12082  ;;
12083  esac
12084
12085
12086   GNULIB_GETTIMEOFDAY=0;
12087     HAVE_GETTIMEOFDAY=1;
12088   HAVE_STRUCT_TIMEVAL=1;
12089   HAVE_SYS_TIME_H=1;
12090   REPLACE_GETTIMEOFDAY=0;
12091   REPLACE_STRUCT_TIMEVAL=0;
12092
12093
12094
12095
12096
12097
12098
12099
12100
12101
12102   :
12103
12104
12105
12106
12107
12108
12109
12110
12111
12112
12113
12114   :
12115
12116
12117
12118
12119
12120
12121
12122
12123      if test $gl_cv_have_include_next = yes; then
12124        gl_cv_next_sys_time_h='<'sys/time.h'>'
12125      else
12126        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
12127 $as_echo_n "checking absolute name of <sys/time.h>... " >&6; }
12128 if ${gl_cv_next_sys_time_h+:} false; then :
12129   $as_echo_n "(cached) " >&6
12130 else
12131
12132              if test $ac_cv_header_sys_time_h = yes; then
12133
12134
12135
12136
12137   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12138 /* end confdefs.h.  */
12139 #include <sys/time.h>
12140 _ACEOF
12141                 case "$host_os" in
12142     aix*) gl_absname_cpp="$ac_cpp -C" ;;
12143     *)    gl_absname_cpp="$ac_cpp" ;;
12144   esac
12145
12146   case "$host_os" in
12147     mingw*)
12148                                           gl_dirsep_regex='[/\\]'
12149       ;;
12150     *)
12151       gl_dirsep_regex='\/'
12152       ;;
12153   esac
12154       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12155   gl_header_literal_regex=`echo 'sys/time.h' \
12156                            | sed -e "$gl_make_literal_regex_sed"`
12157   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12158       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12159       s|^/[^/]|//&|
12160       p
12161       q
12162     }'
12163
12164         gl_cv_absolute_sys_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12165   sed -n "$gl_absolute_header_sed"`
12166
12167            gl_header=$gl_cv_absolute_sys_time_h
12168            gl_cv_next_sys_time_h='"'$gl_header'"'
12169           else
12170                gl_cv_next_sys_time_h='<'sys/time.h'>'
12171              fi
12172
12173
12174 fi
12175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
12176 $as_echo "$gl_cv_next_sys_time_h" >&6; }
12177      fi
12178      NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
12179
12180      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12181        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12182        gl_next_as_first_directive='<'sys/time.h'>'
12183      else
12184        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12185        gl_next_as_first_directive=$gl_cv_next_sys_time_h
12186      fi
12187      NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
12188
12189
12190
12191
12192
12193   if test $ac_cv_header_sys_time_h != yes; then
12194     HAVE_SYS_TIME_H=0
12195   fi
12196
12197
12198
12199
12200
12201   :
12202
12203
12204
12205
12206
12207   if test $ac_cv_header_sys_socket_h != yes; then
12208                     for ac_header in winsock2.h
12209 do :
12210   ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
12211 if test "x$ac_cv_header_winsock2_h" = xyes; then :
12212   cat >>confdefs.h <<_ACEOF
12213 #define HAVE_WINSOCK2_H 1
12214 _ACEOF
12215
12216 fi
12217
12218 done
12219
12220   fi
12221   if test "$ac_cv_header_winsock2_h" = yes; then
12222     HAVE_WINSOCK2_H=1
12223     UNISTD_H_HAVE_WINSOCK2_H=1
12224     SYS_IOCTL_H_HAVE_WINSOCK2_H=1
12225   else
12226     HAVE_WINSOCK2_H=0
12227   fi
12228
12229
12230   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
12231 $as_echo_n "checking for struct timeval... " >&6; }
12232 if ${gl_cv_sys_struct_timeval+:} false; then :
12233   $as_echo_n "(cached) " >&6
12234 else
12235   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12236 /* end confdefs.h.  */
12237 #if HAVE_SYS_TIME_H
12238              #include <sys/time.h>
12239             #endif
12240             #include <time.h>
12241             #if HAVE_WINSOCK2_H
12242             # include <winsock2.h>
12243             #endif
12244
12245 int
12246 main ()
12247 {
12248 static struct timeval x; x.tv_sec = x.tv_usec;
12249   ;
12250   return 0;
12251 }
12252 _ACEOF
12253 if ac_fn_c_try_compile "$LINENO"; then :
12254   gl_cv_sys_struct_timeval=yes
12255 else
12256   gl_cv_sys_struct_timeval=no
12257 fi
12258 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12259
12260 fi
12261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
12262 $as_echo "$gl_cv_sys_struct_timeval" >&6; }
12263   if test $gl_cv_sys_struct_timeval != yes; then
12264     HAVE_STRUCT_TIMEVAL=0
12265   else
12266                             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
12267 $as_echo_n "checking for wide-enough struct timeval.tv_sec member... " >&6; }
12268 if ${gl_cv_sys_struct_timeval_tv_sec+:} false; then :
12269   $as_echo_n "(cached) " >&6
12270 else
12271   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12272 /* end confdefs.h.  */
12273 #if HAVE_SYS_TIME_H
12274                #include <sys/time.h>
12275               #endif
12276               #include <time.h>
12277               #if HAVE_WINSOCK2_H
12278               # include <winsock2.h>
12279               #endif
12280
12281 int
12282 main ()
12283 {
12284 static struct timeval x;
12285               typedef int verify_tv_sec_type[
12286                 sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
12287               ];
12288
12289   ;
12290   return 0;
12291 }
12292 _ACEOF
12293 if ac_fn_c_try_compile "$LINENO"; then :
12294   gl_cv_sys_struct_timeval_tv_sec=yes
12295 else
12296   gl_cv_sys_struct_timeval_tv_sec=no
12297 fi
12298 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12299
12300 fi
12301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
12302 $as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
12303     if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
12304       REPLACE_STRUCT_TIMEVAL=1
12305     fi
12306   fi
12307
12308
12309     for gl_func in gettimeofday; do
12310     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
12311     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
12312 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
12313 if eval \${$as_gl_Symbol+:} false; then :
12314   $as_echo_n "(cached) " >&6
12315 else
12316   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12317 /* end confdefs.h.  */
12318
12319 #if HAVE_SYS_TIME_H
12320 # include <sys/time.h>
12321 #endif
12322 #include <time.h>
12323
12324 int
12325 main ()
12326 {
12327 #undef $gl_func
12328   (void) $gl_func;
12329   ;
12330   return 0;
12331 }
12332 _ACEOF
12333 if ac_fn_c_try_compile "$LINENO"; then :
12334   eval "$as_gl_Symbol=yes"
12335 else
12336   eval "$as_gl_Symbol=no"
12337 fi
12338 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12339 fi
12340 eval ac_res=\$$as_gl_Symbol
12341                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12342 $as_echo "$ac_res" >&6; }
12343     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
12344   cat >>confdefs.h <<_ACEOF
12345 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
12346 _ACEOF
12347
12348                      eval ac_cv_have_decl_$gl_func=yes
12349 fi
12350       done
12351
12352
12353
12354
12355
12356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
12357 $as_echo_n "checking for inline... " >&6; }
12358 if ${ac_cv_c_inline+:} false; then :
12359   $as_echo_n "(cached) " >&6
12360 else
12361   ac_cv_c_inline=no
12362 for ac_kw in inline __inline__ __inline; do
12363   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12364 /* end confdefs.h.  */
12365 #ifndef __cplusplus
12366 typedef int foo_t;
12367 static $ac_kw foo_t static_foo () {return 0; }
12368 $ac_kw foo_t foo () {return 0; }
12369 #endif
12370
12371 _ACEOF
12372 if ac_fn_c_try_compile "$LINENO"; then :
12373   ac_cv_c_inline=$ac_kw
12374 fi
12375 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12376   test "$ac_cv_c_inline" != no && break
12377 done
12378
12379 fi
12380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
12381 $as_echo "$ac_cv_c_inline" >&6; }
12382
12383 case $ac_cv_c_inline in
12384   inline | yes) ;;
12385   *)
12386     case $ac_cv_c_inline in
12387       no) ac_val=;;
12388       *) ac_val=$ac_cv_c_inline;;
12389     esac
12390     cat >>confdefs.h <<_ACEOF
12391 #ifndef __cplusplus
12392 #define inline $ac_val
12393 #endif
12394 _ACEOF
12395     ;;
12396 esac
12397
12398
12399   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
12400 $as_echo_n "checking for unsigned long long int... " >&6; }
12401 if ${ac_cv_type_unsigned_long_long_int+:} false; then :
12402   $as_echo_n "(cached) " >&6
12403 else
12404   ac_cv_type_unsigned_long_long_int=yes
12405      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
12406        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12407 /* end confdefs.h.  */
12408
12409   /* For now, do not test the preprocessor; as of 2007 there are too many
12410          implementations with broken preprocessors.  Perhaps this can
12411          be revisited in 2012.  In the meantime, code should not expect
12412          #if to work with literals wider than 32 bits.  */
12413       /* Test literals.  */
12414       long long int ll = 9223372036854775807ll;
12415       long long int nll = -9223372036854775807LL;
12416       unsigned long long int ull = 18446744073709551615ULL;
12417       /* Test constant expressions.   */
12418       typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
12419                      ? 1 : -1)];
12420       typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
12421                      ? 1 : -1)];
12422       int i = 63;
12423 int
12424 main ()
12425 {
12426 /* Test availability of runtime routines for shift and division.  */
12427       long long int llmax = 9223372036854775807ll;
12428       unsigned long long int ullmax = 18446744073709551615ull;
12429       return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
12430               | (llmax / ll) | (llmax % ll)
12431               | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
12432               | (ullmax / ull) | (ullmax % ull));
12433   ;
12434   return 0;
12435 }
12436
12437 _ACEOF
12438 if ac_fn_c_try_link "$LINENO"; then :
12439
12440 else
12441   ac_cv_type_unsigned_long_long_int=no
12442 fi
12443 rm -f core conftest.err conftest.$ac_objext \
12444     conftest$ac_exeext conftest.$ac_ext
12445      fi
12446 fi
12447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
12448 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
12449   if test $ac_cv_type_unsigned_long_long_int = yes; then
12450
12451 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
12452
12453   fi
12454
12455
12456
12457   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
12458 $as_echo_n "checking for long long int... " >&6; }
12459 if ${ac_cv_type_long_long_int+:} false; then :
12460   $as_echo_n "(cached) " >&6
12461 else
12462   ac_cv_type_long_long_int=yes
12463       if test "x${ac_cv_prog_cc_c99-no}" = xno; then
12464         ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
12465         if test $ac_cv_type_long_long_int = yes; then
12466                                         if test "$cross_compiling" = yes; then :
12467   :
12468 else
12469   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12470 /* end confdefs.h.  */
12471 #include <limits.h>
12472                  #ifndef LLONG_MAX
12473                  # define HALF \
12474                           (1LL << (sizeof (long long int) * CHAR_BIT - 2))
12475                  # define LLONG_MAX (HALF - 1 + HALF)
12476                  #endif
12477 int
12478 main ()
12479 {
12480 long long int n = 1;
12481                  int i;
12482                  for (i = 0; ; i++)
12483                    {
12484                      long long int m = n << i;
12485                      if (m >> i != n)
12486                        return 1;
12487                      if (LLONG_MAX / 2 < m)
12488                        break;
12489                    }
12490                  return 0;
12491   ;
12492   return 0;
12493 }
12494 _ACEOF
12495 if ac_fn_c_try_run "$LINENO"; then :
12496
12497 else
12498   ac_cv_type_long_long_int=no
12499 fi
12500 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12501   conftest.$ac_objext conftest.beam conftest.$ac_ext
12502 fi
12503
12504         fi
12505       fi
12506 fi
12507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
12508 $as_echo "$ac_cv_type_long_long_int" >&6; }
12509   if test $ac_cv_type_long_long_int = yes; then
12510
12511 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
12512
12513   fi
12514
12515
12516
12517
12518
12519
12520
12521
12522
12523
12524
12525
12526     gl_cv_c_multiarch=no
12527   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12528 /* end confdefs.h.  */
12529 #ifndef __APPLE_CC__
12530          not a universal capable compiler
12531         #endif
12532         typedef int dummy;
12533
12534 _ACEOF
12535 if ac_fn_c_try_compile "$LINENO"; then :
12536
12537                arch=
12538      prev=
12539      for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
12540        if test -n "$prev"; then
12541          case $word in
12542            i?86 | x86_64 | ppc | ppc64)
12543              if test -z "$arch" || test "$arch" = "$word"; then
12544                arch="$word"
12545              else
12546                gl_cv_c_multiarch=yes
12547              fi
12548              ;;
12549          esac
12550          prev=
12551        else
12552          if test "x$word" = "x-arch"; then
12553            prev=arch
12554          fi
12555        fi
12556      done
12557
12558 fi
12559 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12560   if test $gl_cv_c_multiarch = yes; then
12561     APPLE_UNIVERSAL_BUILD=1
12562   else
12563     APPLE_UNIVERSAL_BUILD=0
12564   fi
12565
12566
12567
12568
12569
12570   if test $ac_cv_type_long_long_int = yes; then
12571     HAVE_LONG_LONG_INT=1
12572   else
12573     HAVE_LONG_LONG_INT=0
12574   fi
12575
12576
12577   if test $ac_cv_type_unsigned_long_long_int = yes; then
12578     HAVE_UNSIGNED_LONG_LONG_INT=1
12579   else
12580     HAVE_UNSIGNED_LONG_LONG_INT=0
12581   fi
12582
12583
12584
12585   :
12586
12587
12588
12589
12590
12591   if test $ac_cv_header_wchar_h = yes; then
12592     HAVE_WCHAR_H=1
12593   else
12594     HAVE_WCHAR_H=0
12595   fi
12596
12597
12598       if test $ac_cv_header_inttypes_h = yes; then
12599     HAVE_INTTYPES_H=1
12600   else
12601     HAVE_INTTYPES_H=0
12602   fi
12603
12604
12605       if test $ac_cv_header_sys_types_h = yes; then
12606     HAVE_SYS_TYPES_H=1
12607   else
12608     HAVE_SYS_TYPES_H=0
12609   fi
12610
12611
12612
12613
12614
12615
12616
12617
12618   :
12619
12620
12621
12622
12623
12624
12625
12626
12627      if test $gl_cv_have_include_next = yes; then
12628        gl_cv_next_stdint_h='<'stdint.h'>'
12629      else
12630        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
12631 $as_echo_n "checking absolute name of <stdint.h>... " >&6; }
12632 if ${gl_cv_next_stdint_h+:} false; then :
12633   $as_echo_n "(cached) " >&6
12634 else
12635
12636              if test $ac_cv_header_stdint_h = yes; then
12637
12638
12639
12640
12641   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12642 /* end confdefs.h.  */
12643 #include <stdint.h>
12644 _ACEOF
12645                 case "$host_os" in
12646     aix*) gl_absname_cpp="$ac_cpp -C" ;;
12647     *)    gl_absname_cpp="$ac_cpp" ;;
12648   esac
12649
12650   case "$host_os" in
12651     mingw*)
12652                                           gl_dirsep_regex='[/\\]'
12653       ;;
12654     *)
12655       gl_dirsep_regex='\/'
12656       ;;
12657   esac
12658       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12659   gl_header_literal_regex=`echo 'stdint.h' \
12660                            | sed -e "$gl_make_literal_regex_sed"`
12661   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12662       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12663       s|^/[^/]|//&|
12664       p
12665       q
12666     }'
12667
12668         gl_cv_absolute_stdint_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12669   sed -n "$gl_absolute_header_sed"`
12670
12671            gl_header=$gl_cv_absolute_stdint_h
12672            gl_cv_next_stdint_h='"'$gl_header'"'
12673           else
12674                gl_cv_next_stdint_h='<'stdint.h'>'
12675              fi
12676
12677
12678 fi
12679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
12680 $as_echo "$gl_cv_next_stdint_h" >&6; }
12681      fi
12682      NEXT_STDINT_H=$gl_cv_next_stdint_h
12683
12684      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12685        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12686        gl_next_as_first_directive='<'stdint.h'>'
12687      else
12688        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12689        gl_next_as_first_directive=$gl_cv_next_stdint_h
12690      fi
12691      NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
12692
12693
12694
12695
12696   if test $ac_cv_header_stdint_h = yes; then
12697     HAVE_STDINT_H=1
12698   else
12699     HAVE_STDINT_H=0
12700   fi
12701
12702
12703     if test $ac_cv_header_stdint_h = yes; then
12704     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
12705 $as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
12706 if ${gl_cv_header_working_stdint_h+:} false; then :
12707   $as_echo_n "(cached) " >&6
12708 else
12709   gl_cv_header_working_stdint_h=no
12710        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12711 /* end confdefs.h.  */
12712
12713
12714 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
12715 #include <stdint.h>
12716 /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>.  */
12717 #if !(defined WCHAR_MIN && defined WCHAR_MAX)
12718 #error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
12719 #endif
12720
12721
12722   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12723      included before <wchar.h>.  */
12724   #include <stddef.h>
12725   #include <signal.h>
12726   #if HAVE_WCHAR_H
12727   # include <stdio.h>
12728   # include <time.h>
12729   # include <wchar.h>
12730   #endif
12731
12732
12733 #ifdef INT8_MAX
12734 int8_t a1 = INT8_MAX;
12735 int8_t a1min = INT8_MIN;
12736 #endif
12737 #ifdef INT16_MAX
12738 int16_t a2 = INT16_MAX;
12739 int16_t a2min = INT16_MIN;
12740 #endif
12741 #ifdef INT32_MAX
12742 int32_t a3 = INT32_MAX;
12743 int32_t a3min = INT32_MIN;
12744 #endif
12745 #ifdef INT64_MAX
12746 int64_t a4 = INT64_MAX;
12747 int64_t a4min = INT64_MIN;
12748 #endif
12749 #ifdef UINT8_MAX
12750 uint8_t b1 = UINT8_MAX;
12751 #else
12752 typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
12753 #endif
12754 #ifdef UINT16_MAX
12755 uint16_t b2 = UINT16_MAX;
12756 #endif
12757 #ifdef UINT32_MAX
12758 uint32_t b3 = UINT32_MAX;
12759 #endif
12760 #ifdef UINT64_MAX
12761 uint64_t b4 = UINT64_MAX;
12762 #endif
12763 int_least8_t c1 = INT8_C (0x7f);
12764 int_least8_t c1max = INT_LEAST8_MAX;
12765 int_least8_t c1min = INT_LEAST8_MIN;
12766 int_least16_t c2 = INT16_C (0x7fff);
12767 int_least16_t c2max = INT_LEAST16_MAX;
12768 int_least16_t c2min = INT_LEAST16_MIN;
12769 int_least32_t c3 = INT32_C (0x7fffffff);
12770 int_least32_t c3max = INT_LEAST32_MAX;
12771 int_least32_t c3min = INT_LEAST32_MIN;
12772 int_least64_t c4 = INT64_C (0x7fffffffffffffff);
12773 int_least64_t c4max = INT_LEAST64_MAX;
12774 int_least64_t c4min = INT_LEAST64_MIN;
12775 uint_least8_t d1 = UINT8_C (0xff);
12776 uint_least8_t d1max = UINT_LEAST8_MAX;
12777 uint_least16_t d2 = UINT16_C (0xffff);
12778 uint_least16_t d2max = UINT_LEAST16_MAX;
12779 uint_least32_t d3 = UINT32_C (0xffffffff);
12780 uint_least32_t d3max = UINT_LEAST32_MAX;
12781 uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
12782 uint_least64_t d4max = UINT_LEAST64_MAX;
12783 int_fast8_t e1 = INT_FAST8_MAX;
12784 int_fast8_t e1min = INT_FAST8_MIN;
12785 int_fast16_t e2 = INT_FAST16_MAX;
12786 int_fast16_t e2min = INT_FAST16_MIN;
12787 int_fast32_t e3 = INT_FAST32_MAX;
12788 int_fast32_t e3min = INT_FAST32_MIN;
12789 int_fast64_t e4 = INT_FAST64_MAX;
12790 int_fast64_t e4min = INT_FAST64_MIN;
12791 uint_fast8_t f1 = UINT_FAST8_MAX;
12792 uint_fast16_t f2 = UINT_FAST16_MAX;
12793 uint_fast32_t f3 = UINT_FAST32_MAX;
12794 uint_fast64_t f4 = UINT_FAST64_MAX;
12795 #ifdef INTPTR_MAX
12796 intptr_t g = INTPTR_MAX;
12797 intptr_t gmin = INTPTR_MIN;
12798 #endif
12799 #ifdef UINTPTR_MAX
12800 uintptr_t h = UINTPTR_MAX;
12801 #endif
12802 intmax_t i = INTMAX_MAX;
12803 uintmax_t j = UINTMAX_MAX;
12804
12805 #include <limits.h> /* for CHAR_BIT */
12806 #define TYPE_MINIMUM(t) \
12807   ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
12808 #define TYPE_MAXIMUM(t) \
12809   ((t) ((t) 0 < (t) -1 \
12810         ? (t) -1 \
12811         : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
12812 struct s {
12813   int check_PTRDIFF:
12814       PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
12815       && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
12816       ? 1 : -1;
12817   /* Detect bug in FreeBSD 6.0 / ia64.  */
12818   int check_SIG_ATOMIC:
12819       SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
12820       && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
12821       ? 1 : -1;
12822   int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
12823   int check_WCHAR:
12824       WCHAR_MIN == TYPE_MINIMUM (wchar_t)
12825       && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
12826       ? 1 : -1;
12827   /* Detect bug in mingw.  */
12828   int check_WINT:
12829       WINT_MIN == TYPE_MINIMUM (wint_t)
12830       && WINT_MAX == TYPE_MAXIMUM (wint_t)
12831       ? 1 : -1;
12832
12833   /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others.  */
12834   int check_UINT8_C:
12835         (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
12836   int check_UINT16_C:
12837         (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
12838
12839   /* Detect bugs in OpenBSD 3.9 stdint.h.  */
12840 #ifdef UINT8_MAX
12841   int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
12842 #endif
12843 #ifdef UINT16_MAX
12844   int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
12845 #endif
12846 #ifdef UINT32_MAX
12847   int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
12848 #endif
12849 #ifdef UINT64_MAX
12850   int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
12851 #endif
12852   int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
12853   int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
12854   int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
12855   int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
12856   int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
12857   int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
12858   int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
12859   int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
12860   int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
12861   int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
12862   int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
12863 };
12864
12865 int
12866 main ()
12867 {
12868
12869   ;
12870   return 0;
12871 }
12872 _ACEOF
12873 if ac_fn_c_try_compile "$LINENO"; then :
12874                                                     if test "$cross_compiling" = yes; then :
12875                  gl_cv_header_working_stdint_h=yes
12876
12877 else
12878   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12879 /* end confdefs.h.  */
12880
12881
12882 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
12883 #include <stdint.h>
12884
12885
12886   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12887      included before <wchar.h>.  */
12888   #include <stddef.h>
12889   #include <signal.h>
12890   #if HAVE_WCHAR_H
12891   # include <stdio.h>
12892   # include <time.h>
12893   # include <wchar.h>
12894   #endif
12895
12896
12897 #include <stdio.h>
12898 #include <string.h>
12899 #define MVAL(macro) MVAL1(macro)
12900 #define MVAL1(expression) #expression
12901 static const char *macro_values[] =
12902   {
12903 #ifdef INT8_MAX
12904     MVAL (INT8_MAX),
12905 #endif
12906 #ifdef INT16_MAX
12907     MVAL (INT16_MAX),
12908 #endif
12909 #ifdef INT32_MAX
12910     MVAL (INT32_MAX),
12911 #endif
12912 #ifdef INT64_MAX
12913     MVAL (INT64_MAX),
12914 #endif
12915 #ifdef UINT8_MAX
12916     MVAL (UINT8_MAX),
12917 #endif
12918 #ifdef UINT16_MAX
12919     MVAL (UINT16_MAX),
12920 #endif
12921 #ifdef UINT32_MAX
12922     MVAL (UINT32_MAX),
12923 #endif
12924 #ifdef UINT64_MAX
12925     MVAL (UINT64_MAX),
12926 #endif
12927     NULL
12928   };
12929
12930 int
12931 main ()
12932 {
12933
12934   const char **mv;
12935   for (mv = macro_values; *mv != NULL; mv++)
12936     {
12937       const char *value = *mv;
12938       /* Test whether it looks like a cast expression.  */
12939       if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
12940           || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
12941           || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
12942           || strncmp (value, "((int)"/*)*/, 6) == 0
12943           || strncmp (value, "((signed short)"/*)*/, 15) == 0
12944           || strncmp (value, "((signed char)"/*)*/, 14) == 0)
12945         return mv - macro_values + 1;
12946     }
12947   return 0;
12948
12949   ;
12950   return 0;
12951 }
12952 _ACEOF
12953 if ac_fn_c_try_run "$LINENO"; then :
12954   gl_cv_header_working_stdint_h=yes
12955 fi
12956 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12957   conftest.$ac_objext conftest.beam conftest.$ac_ext
12958 fi
12959
12960
12961 fi
12962 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12963
12964 fi
12965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
12966 $as_echo "$gl_cv_header_working_stdint_h" >&6; }
12967   fi
12968   if test "$gl_cv_header_working_stdint_h" = yes; then
12969     STDINT_H=
12970   else
12971             for ac_header in sys/inttypes.h sys/bitypes.h
12972 do :
12973   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12974 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12975 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12976   cat >>confdefs.h <<_ACEOF
12977 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12978 _ACEOF
12979
12980 fi
12981
12982 done
12983
12984     if test $ac_cv_header_sys_inttypes_h = yes; then
12985       HAVE_SYS_INTTYPES_H=1
12986     else
12987       HAVE_SYS_INTTYPES_H=0
12988     fi
12989
12990     if test $ac_cv_header_sys_bitypes_h = yes; then
12991       HAVE_SYS_BITYPES_H=1
12992     else
12993       HAVE_SYS_BITYPES_H=0
12994     fi
12995
12996
12997
12998
12999   if test $APPLE_UNIVERSAL_BUILD = 0; then
13000
13001
13002   for gltype in ptrdiff_t size_t ; do
13003     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
13004 $as_echo_n "checking for bit size of $gltype... " >&6; }
13005 if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
13006   $as_echo_n "(cached) " >&6
13007 else
13008   if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result"        "
13009   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
13010      included before <wchar.h>.  */
13011   #include <stddef.h>
13012   #include <signal.h>
13013   #if HAVE_WCHAR_H
13014   # include <stdio.h>
13015   # include <time.h>
13016   # include <wchar.h>
13017   #endif
13018
13019 #include <limits.h>"; then :
13020
13021 else
13022   result=unknown
13023 fi
13024
13025        eval gl_cv_bitsizeof_${gltype}=\$result
13026
13027 fi
13028 eval ac_res=\$gl_cv_bitsizeof_${gltype}
13029                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13030 $as_echo "$ac_res" >&6; }
13031     eval result=\$gl_cv_bitsizeof_${gltype}
13032     if test $result = unknown; then
13033                                                 result=0
13034     fi
13035     GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
13036     cat >>confdefs.h <<_ACEOF
13037 #define BITSIZEOF_${GLTYPE} $result
13038 _ACEOF
13039
13040     eval BITSIZEOF_${GLTYPE}=\$result
13041   done
13042
13043
13044   fi
13045
13046
13047   for gltype in sig_atomic_t wchar_t wint_t ; do
13048     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
13049 $as_echo_n "checking for bit size of $gltype... " >&6; }
13050 if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
13051   $as_echo_n "(cached) " >&6
13052 else
13053   if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result"        "
13054   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
13055      included before <wchar.h>.  */
13056   #include <stddef.h>
13057   #include <signal.h>
13058   #if HAVE_WCHAR_H
13059   # include <stdio.h>
13060   # include <time.h>
13061   # include <wchar.h>
13062   #endif
13063
13064 #include <limits.h>"; then :
13065
13066 else
13067   result=unknown
13068 fi
13069
13070        eval gl_cv_bitsizeof_${gltype}=\$result
13071
13072 fi
13073 eval ac_res=\$gl_cv_bitsizeof_${gltype}
13074                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13075 $as_echo "$ac_res" >&6; }
13076     eval result=\$gl_cv_bitsizeof_${gltype}
13077     if test $result = unknown; then
13078                                                 result=0
13079     fi
13080     GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
13081     cat >>confdefs.h <<_ACEOF
13082 #define BITSIZEOF_${GLTYPE} $result
13083 _ACEOF
13084
13085     eval BITSIZEOF_${GLTYPE}=\$result
13086   done
13087
13088
13089
13090
13091   for gltype in sig_atomic_t wchar_t wint_t ; do
13092     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
13093 $as_echo_n "checking whether $gltype is signed... " >&6; }
13094 if eval \${gl_cv_type_${gltype}_signed+:} false; then :
13095   $as_echo_n "(cached) " >&6
13096 else
13097   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13098 /* end confdefs.h.  */
13099
13100   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
13101      included before <wchar.h>.  */
13102   #include <stddef.h>
13103   #include <signal.h>
13104   #if HAVE_WCHAR_H
13105   # include <stdio.h>
13106   # include <time.h>
13107   # include <wchar.h>
13108   #endif
13109
13110             int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
13111 int
13112 main ()
13113 {
13114
13115   ;
13116   return 0;
13117 }
13118 _ACEOF
13119 if ac_fn_c_try_compile "$LINENO"; then :
13120   result=yes
13121 else
13122   result=no
13123 fi
13124 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13125        eval gl_cv_type_${gltype}_signed=\$result
13126
13127 fi
13128 eval ac_res=\$gl_cv_type_${gltype}_signed
13129                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13130 $as_echo "$ac_res" >&6; }
13131     eval result=\$gl_cv_type_${gltype}_signed
13132     GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
13133     if test "$result" = yes; then
13134       cat >>confdefs.h <<_ACEOF
13135 #define HAVE_SIGNED_${GLTYPE} 1
13136 _ACEOF
13137
13138       eval HAVE_SIGNED_${GLTYPE}=1
13139     else
13140       eval HAVE_SIGNED_${GLTYPE}=0
13141     fi
13142   done
13143
13144
13145   gl_cv_type_ptrdiff_t_signed=yes
13146   gl_cv_type_size_t_signed=no
13147   if test $APPLE_UNIVERSAL_BUILD = 0; then
13148
13149
13150   for gltype in ptrdiff_t size_t ; do
13151     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
13152 $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
13153 if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
13154   $as_echo_n "(cached) " >&6
13155 else
13156   eval gl_cv_type_${gltype}_suffix=no
13157        eval result=\$gl_cv_type_${gltype}_signed
13158        if test "$result" = yes; then
13159          glsufu=
13160        else
13161          glsufu=u
13162        fi
13163        for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
13164          case $glsuf in
13165            '')  gltype1='int';;
13166            l)   gltype1='long int';;
13167            ll)  gltype1='long long int';;
13168            i64) gltype1='__int64';;
13169            u)   gltype1='unsigned int';;
13170            ul)  gltype1='unsigned long int';;
13171            ull) gltype1='unsigned long long int';;
13172            ui64)gltype1='unsigned __int64';;
13173          esac
13174          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13175 /* end confdefs.h.  */
13176
13177   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
13178      included before <wchar.h>.  */
13179   #include <stddef.h>
13180   #include <signal.h>
13181   #if HAVE_WCHAR_H
13182   # include <stdio.h>
13183   # include <time.h>
13184   # include <wchar.h>
13185   #endif
13186
13187               extern $gltype foo;
13188               extern $gltype1 foo;
13189 int
13190 main ()
13191 {
13192
13193   ;
13194   return 0;
13195 }
13196 _ACEOF
13197 if ac_fn_c_try_compile "$LINENO"; then :
13198   eval gl_cv_type_${gltype}_suffix=\$glsuf
13199 fi
13200 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13201          eval result=\$gl_cv_type_${gltype}_suffix
13202          test "$result" != no && break
13203        done
13204 fi
13205 eval ac_res=\$gl_cv_type_${gltype}_suffix
13206                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13207 $as_echo "$ac_res" >&6; }
13208     GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
13209     eval result=\$gl_cv_type_${gltype}_suffix
13210     test "$result" = no && result=
13211     eval ${GLTYPE}_SUFFIX=\$result
13212     cat >>confdefs.h <<_ACEOF
13213 #define ${GLTYPE}_SUFFIX $result
13214 _ACEOF
13215
13216   done
13217
13218
13219   fi
13220
13221
13222   for gltype in sig_atomic_t wchar_t wint_t ; do
13223     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
13224 $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
13225 if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
13226   $as_echo_n "(cached) " >&6
13227 else
13228   eval gl_cv_type_${gltype}_suffix=no
13229        eval result=\$gl_cv_type_${gltype}_signed
13230        if test "$result" = yes; then
13231          glsufu=
13232        else
13233          glsufu=u
13234        fi
13235        for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
13236          case $glsuf in
13237            '')  gltype1='int';;
13238            l)   gltype1='long int';;
13239            ll)  gltype1='long long int';;
13240            i64) gltype1='__int64';;
13241            u)   gltype1='unsigned int';;
13242            ul)  gltype1='unsigned long int';;
13243            ull) gltype1='unsigned long long int';;
13244            ui64)gltype1='unsigned __int64';;
13245          esac
13246          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13247 /* end confdefs.h.  */
13248
13249   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
13250      included before <wchar.h>.  */
13251   #include <stddef.h>
13252   #include <signal.h>
13253   #if HAVE_WCHAR_H
13254   # include <stdio.h>
13255   # include <time.h>
13256   # include <wchar.h>
13257   #endif
13258
13259               extern $gltype foo;
13260               extern $gltype1 foo;
13261 int
13262 main ()
13263 {
13264
13265   ;
13266   return 0;
13267 }
13268 _ACEOF
13269 if ac_fn_c_try_compile "$LINENO"; then :
13270   eval gl_cv_type_${gltype}_suffix=\$glsuf
13271 fi
13272 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13273          eval result=\$gl_cv_type_${gltype}_suffix
13274          test "$result" != no && break
13275        done
13276 fi
13277 eval ac_res=\$gl_cv_type_${gltype}_suffix
13278                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13279 $as_echo "$ac_res" >&6; }
13280     GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
13281     eval result=\$gl_cv_type_${gltype}_suffix
13282     test "$result" = no && result=
13283     eval ${GLTYPE}_SUFFIX=\$result
13284     cat >>confdefs.h <<_ACEOF
13285 #define ${GLTYPE}_SUFFIX $result
13286 _ACEOF
13287
13288   done
13289
13290
13291
13292           if test $BITSIZEOF_WINT_T -lt 32; then
13293     BITSIZEOF_WINT_T=32
13294   fi
13295
13296     STDINT_H=stdint.h
13297   fi
13298
13299    if test -n "$STDINT_H"; then
13300   GL_GENERATE_STDINT_H_TRUE=
13301   GL_GENERATE_STDINT_H_FALSE='#'
13302 else
13303   GL_GENERATE_STDINT_H_TRUE='#'
13304   GL_GENERATE_STDINT_H_FALSE=
13305 fi
13306
13307
13308
13309
13310
13311
13312
13313
13314   GNULIB_IMAXABS=0;
13315   GNULIB_IMAXDIV=0;
13316   GNULIB_STRTOIMAX=0;
13317   GNULIB_STRTOUMAX=0;
13318     HAVE_DECL_IMAXABS=1;
13319   HAVE_DECL_IMAXDIV=1;
13320   HAVE_DECL_STRTOIMAX=1;
13321   HAVE_DECL_STRTOUMAX=1;
13322   REPLACE_STRTOIMAX=0;
13323   REPLACE_STRTOUMAX=0;
13324   INT32_MAX_LT_INTMAX_MAX=1;
13325   INT64_MAX_EQ_LONG_MAX='defined _LP64';
13326   PRI_MACROS_BROKEN=0;
13327   PRIPTR_PREFIX=__PRIPTR_PREFIX;
13328   UINT32_MAX_LT_UINTMAX_MAX=1;
13329   UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
13330
13331
13332
13333
13334   :
13335
13336
13337
13338
13339
13340
13341
13342
13343
13344
13345
13346
13347
13348   :
13349
13350
13351
13352
13353
13354
13355
13356
13357      if test $gl_cv_have_include_next = yes; then
13358        gl_cv_next_inttypes_h='<'inttypes.h'>'
13359      else
13360        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
13361 $as_echo_n "checking absolute name of <inttypes.h>... " >&6; }
13362 if ${gl_cv_next_inttypes_h+:} false; then :
13363   $as_echo_n "(cached) " >&6
13364 else
13365
13366              if test $ac_cv_header_inttypes_h = yes; then
13367
13368
13369
13370
13371   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13372 /* end confdefs.h.  */
13373 #include <inttypes.h>
13374 _ACEOF
13375                 case "$host_os" in
13376     aix*) gl_absname_cpp="$ac_cpp -C" ;;
13377     *)    gl_absname_cpp="$ac_cpp" ;;
13378   esac
13379
13380   case "$host_os" in
13381     mingw*)
13382                                           gl_dirsep_regex='[/\\]'
13383       ;;
13384     *)
13385       gl_dirsep_regex='\/'
13386       ;;
13387   esac
13388       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13389   gl_header_literal_regex=`echo 'inttypes.h' \
13390                            | sed -e "$gl_make_literal_regex_sed"`
13391   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13392       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13393       s|^/[^/]|//&|
13394       p
13395       q
13396     }'
13397
13398         gl_cv_absolute_inttypes_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13399   sed -n "$gl_absolute_header_sed"`
13400
13401            gl_header=$gl_cv_absolute_inttypes_h
13402            gl_cv_next_inttypes_h='"'$gl_header'"'
13403           else
13404                gl_cv_next_inttypes_h='<'inttypes.h'>'
13405              fi
13406
13407
13408 fi
13409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
13410 $as_echo "$gl_cv_next_inttypes_h" >&6; }
13411      fi
13412      NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
13413
13414      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13415        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13416        gl_next_as_first_directive='<'inttypes.h'>'
13417      else
13418        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13419        gl_next_as_first_directive=$gl_cv_next_inttypes_h
13420      fi
13421      NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
13422
13423
13424
13425
13426
13427
13428
13429
13430     for gl_func in imaxabs imaxdiv strtoimax strtoumax; do
13431     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
13432     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
13433 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
13434 if eval \${$as_gl_Symbol+:} false; then :
13435   $as_echo_n "(cached) " >&6
13436 else
13437   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13438 /* end confdefs.h.  */
13439 #include <inttypes.h>
13440
13441 int
13442 main ()
13443 {
13444 #undef $gl_func
13445   (void) $gl_func;
13446   ;
13447   return 0;
13448 }
13449 _ACEOF
13450 if ac_fn_c_try_compile "$LINENO"; then :
13451   eval "$as_gl_Symbol=yes"
13452 else
13453   eval "$as_gl_Symbol=no"
13454 fi
13455 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13456 fi
13457 eval ac_res=\$$as_gl_Symbol
13458                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13459 $as_echo "$ac_res" >&6; }
13460     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
13461   cat >>confdefs.h <<_ACEOF
13462 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
13463 _ACEOF
13464
13465                      eval ac_cv_have_decl_$gl_func=yes
13466 fi
13467       done
13468
13469
13470
13471   for ac_header in inttypes.h
13472 do :
13473   ac_fn_c_check_header_mongrel "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
13474 if test "x$ac_cv_header_inttypes_h" = xyes; then :
13475   cat >>confdefs.h <<_ACEOF
13476 #define HAVE_INTTYPES_H 1
13477 _ACEOF
13478
13479 fi
13480
13481 done
13482
13483   if test $ac_cv_header_inttypes_h = yes; then
13484     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the inttypes.h PRIxNN macros are broken" >&5
13485 $as_echo_n "checking whether the inttypes.h PRIxNN macros are broken... " >&6; }
13486 if ${gt_cv_inttypes_pri_broken+:} false; then :
13487   $as_echo_n "(cached) " >&6
13488 else
13489
13490         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13491 /* end confdefs.h.  */
13492
13493 #include <inttypes.h>
13494 #ifdef PRId32
13495 char *p = PRId32;
13496 #endif
13497
13498 int
13499 main ()
13500 {
13501
13502   ;
13503   return 0;
13504 }
13505 _ACEOF
13506 if ac_fn_c_try_compile "$LINENO"; then :
13507   gt_cv_inttypes_pri_broken=no
13508 else
13509   gt_cv_inttypes_pri_broken=yes
13510 fi
13511 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13512
13513 fi
13514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_inttypes_pri_broken" >&5
13515 $as_echo "$gt_cv_inttypes_pri_broken" >&6; }
13516   fi
13517   if test "$gt_cv_inttypes_pri_broken" = yes; then
13518
13519 cat >>confdefs.h <<_ACEOF
13520 #define PRI_MACROS_BROKEN 1
13521 _ACEOF
13522
13523     PRI_MACROS_BROKEN=1
13524   else
13525     PRI_MACROS_BROKEN=0
13526   fi
13527
13528
13529
13530   GNULIB_ACOSF=0;
13531   GNULIB_ACOSL=0;
13532   GNULIB_ASINF=0;
13533   GNULIB_ASINL=0;
13534   GNULIB_ATANF=0;
13535   GNULIB_ATANL=0;
13536   GNULIB_ATAN2F=0;
13537   GNULIB_CBRT=0;
13538   GNULIB_CBRTF=0;
13539   GNULIB_CBRTL=0;
13540   GNULIB_CEIL=0;
13541   GNULIB_CEILF=0;
13542   GNULIB_CEILL=0;
13543   GNULIB_COPYSIGN=0;
13544   GNULIB_COPYSIGNF=0;
13545   GNULIB_COPYSIGNL=0;
13546   GNULIB_COSF=0;
13547   GNULIB_COSL=0;
13548   GNULIB_COSHF=0;
13549   GNULIB_EXPF=0;
13550   GNULIB_EXPL=0;
13551   GNULIB_EXP2=0;
13552   GNULIB_EXP2F=0;
13553   GNULIB_EXP2L=0;
13554   GNULIB_EXPM1=0;
13555   GNULIB_EXPM1F=0;
13556   GNULIB_EXPM1L=0;
13557   GNULIB_FABSF=0;
13558   GNULIB_FABSL=0;
13559   GNULIB_FLOOR=0;
13560   GNULIB_FLOORF=0;
13561   GNULIB_FLOORL=0;
13562   GNULIB_FMA=0;
13563   GNULIB_FMAF=0;
13564   GNULIB_FMAL=0;
13565   GNULIB_FMOD=0;
13566   GNULIB_FMODF=0;
13567   GNULIB_FMODL=0;
13568   GNULIB_FREXPF=0;
13569   GNULIB_FREXP=0;
13570   GNULIB_FREXPL=0;
13571   GNULIB_HYPOT=0;
13572   GNULIB_HYPOTF=0;
13573   GNULIB_HYPOTL=0;
13574   GNULIB_ILOGB=0;
13575   GNULIB_ILOGBF=0;
13576   GNULIB_ILOGBL=0;
13577   GNULIB_ISFINITE=0;
13578   GNULIB_ISINF=0;
13579   GNULIB_ISNAN=0;
13580   GNULIB_ISNANF=0;
13581   GNULIB_ISNAND=0;
13582   GNULIB_ISNANL=0;
13583   GNULIB_LDEXPF=0;
13584   GNULIB_LDEXPL=0;
13585   GNULIB_LOG=0;
13586   GNULIB_LOGF=0;
13587   GNULIB_LOGL=0;
13588   GNULIB_LOG10=0;
13589   GNULIB_LOG10F=0;
13590   GNULIB_LOG10L=0;
13591   GNULIB_LOG1P=0;
13592   GNULIB_LOG1PF=0;
13593   GNULIB_LOG1PL=0;
13594   GNULIB_LOG2=0;
13595   GNULIB_LOG2F=0;
13596   GNULIB_LOG2L=0;
13597   GNULIB_LOGB=0;
13598   GNULIB_LOGBF=0;
13599   GNULIB_LOGBL=0;
13600   GNULIB_MODF=0;
13601   GNULIB_MODFF=0;
13602   GNULIB_MODFL=0;
13603   GNULIB_POWF=0;
13604   GNULIB_REMAINDER=0;
13605   GNULIB_REMAINDERF=0;
13606   GNULIB_REMAINDERL=0;
13607   GNULIB_RINT=0;
13608   GNULIB_RINTF=0;
13609   GNULIB_RINTL=0;
13610   GNULIB_ROUND=0;
13611   GNULIB_ROUNDF=0;
13612   GNULIB_ROUNDL=0;
13613   GNULIB_SIGNBIT=0;
13614   GNULIB_SINF=0;
13615   GNULIB_SINL=0;
13616   GNULIB_SINHF=0;
13617   GNULIB_SQRTF=0;
13618   GNULIB_SQRTL=0;
13619   GNULIB_TANF=0;
13620   GNULIB_TANL=0;
13621   GNULIB_TANHF=0;
13622   GNULIB_TRUNC=0;
13623   GNULIB_TRUNCF=0;
13624   GNULIB_TRUNCL=0;
13625     HAVE_ACOSF=1;
13626   HAVE_ACOSL=1;
13627   HAVE_ASINF=1;
13628   HAVE_ASINL=1;
13629   HAVE_ATANF=1;
13630   HAVE_ATANL=1;
13631   HAVE_ATAN2F=1;
13632   HAVE_CBRT=1;
13633   HAVE_CBRTF=1;
13634   HAVE_CBRTL=1;
13635   HAVE_COPYSIGN=1;
13636   HAVE_COPYSIGNL=1;
13637   HAVE_COSF=1;
13638   HAVE_COSL=1;
13639   HAVE_COSHF=1;
13640   HAVE_EXPF=1;
13641   HAVE_EXPL=1;
13642   HAVE_EXPM1=1;
13643   HAVE_EXPM1F=1;
13644   HAVE_FABSF=1;
13645   HAVE_FABSL=1;
13646   HAVE_FMA=1;
13647   HAVE_FMAF=1;
13648   HAVE_FMAL=1;
13649   HAVE_FMODF=1;
13650   HAVE_FMODL=1;
13651   HAVE_FREXPF=1;
13652   HAVE_HYPOTF=1;
13653   HAVE_HYPOTL=1;
13654   HAVE_ILOGB=1;
13655   HAVE_ILOGBF=1;
13656   HAVE_ILOGBL=1;
13657   HAVE_ISNANF=1;
13658   HAVE_ISNAND=1;
13659   HAVE_ISNANL=1;
13660   HAVE_LDEXPF=1;
13661   HAVE_LOGF=1;
13662   HAVE_LOGL=1;
13663   HAVE_LOG10F=1;
13664   HAVE_LOG10L=1;
13665   HAVE_LOG1P=1;
13666   HAVE_LOG1PF=1;
13667   HAVE_LOG1PL=1;
13668   HAVE_LOGBF=1;
13669   HAVE_LOGBL=1;
13670   HAVE_MODFF=1;
13671   HAVE_MODFL=1;
13672   HAVE_POWF=1;
13673   HAVE_REMAINDER=1;
13674   HAVE_REMAINDERF=1;
13675   HAVE_RINT=1;
13676   HAVE_RINTL=1;
13677   HAVE_SINF=1;
13678   HAVE_SINL=1;
13679   HAVE_SINHF=1;
13680   HAVE_SQRTF=1;
13681   HAVE_SQRTL=1;
13682   HAVE_TANF=1;
13683   HAVE_TANL=1;
13684   HAVE_TANHF=1;
13685   HAVE_DECL_ACOSL=1;
13686   HAVE_DECL_ASINL=1;
13687   HAVE_DECL_ATANL=1;
13688   HAVE_DECL_CBRTF=1;
13689   HAVE_DECL_CBRTL=1;
13690   HAVE_DECL_CEILF=1;
13691   HAVE_DECL_CEILL=1;
13692   HAVE_DECL_COPYSIGNF=1;
13693   HAVE_DECL_COSL=1;
13694   HAVE_DECL_EXPL=1;
13695   HAVE_DECL_EXP2=1;
13696   HAVE_DECL_EXP2F=1;
13697   HAVE_DECL_EXP2L=1;
13698   HAVE_DECL_EXPM1L=1;
13699   HAVE_DECL_FLOORF=1;
13700   HAVE_DECL_FLOORL=1;
13701   HAVE_DECL_FREXPL=1;
13702   HAVE_DECL_LDEXPL=1;
13703   HAVE_DECL_LOGL=1;
13704   HAVE_DECL_LOG10L=1;
13705   HAVE_DECL_LOG2=1;
13706   HAVE_DECL_LOG2F=1;
13707   HAVE_DECL_LOG2L=1;
13708   HAVE_DECL_LOGB=1;
13709   HAVE_DECL_REMAINDER=1;
13710   HAVE_DECL_REMAINDERL=1;
13711   HAVE_DECL_RINTF=1;
13712   HAVE_DECL_ROUND=1;
13713   HAVE_DECL_ROUNDF=1;
13714   HAVE_DECL_ROUNDL=1;
13715   HAVE_DECL_SINL=1;
13716   HAVE_DECL_SQRTL=1;
13717   HAVE_DECL_TANL=1;
13718   HAVE_DECL_TRUNC=1;
13719   HAVE_DECL_TRUNCF=1;
13720   HAVE_DECL_TRUNCL=1;
13721   REPLACE_CBRTF=0;
13722   REPLACE_CBRTL=0;
13723   REPLACE_CEIL=0;
13724   REPLACE_CEILF=0;
13725   REPLACE_CEILL=0;
13726   REPLACE_EXPM1=0;
13727   REPLACE_EXPM1F=0;
13728   REPLACE_EXP2=0;
13729   REPLACE_EXP2L=0;
13730   REPLACE_FABSL=0;
13731   REPLACE_FLOOR=0;
13732   REPLACE_FLOORF=0;
13733   REPLACE_FLOORL=0;
13734   REPLACE_FMA=0;
13735   REPLACE_FMAF=0;
13736   REPLACE_FMAL=0;
13737   REPLACE_FMOD=0;
13738   REPLACE_FMODF=0;
13739   REPLACE_FMODL=0;
13740   REPLACE_FREXPF=0;
13741   REPLACE_FREXP=0;
13742   REPLACE_FREXPL=0;
13743   REPLACE_HUGE_VAL=0;
13744   REPLACE_HYPOT=0;
13745   REPLACE_HYPOTF=0;
13746   REPLACE_HYPOTL=0;
13747   REPLACE_ILOGB=0;
13748   REPLACE_ILOGBF=0;
13749   REPLACE_ISFINITE=0;
13750   REPLACE_ISINF=0;
13751   REPLACE_ISNAN=0;
13752   REPLACE_LDEXPL=0;
13753   REPLACE_LOG=0;
13754   REPLACE_LOGF=0;
13755   REPLACE_LOGL=0;
13756   REPLACE_LOG10=0;
13757   REPLACE_LOG10F=0;
13758   REPLACE_LOG10L=0;
13759   REPLACE_LOG1P=0;
13760   REPLACE_LOG1PF=0;
13761   REPLACE_LOG1PL=0;
13762   REPLACE_LOG2=0;
13763   REPLACE_LOG2F=0;
13764   REPLACE_LOG2L=0;
13765   REPLACE_LOGB=0;
13766   REPLACE_LOGBF=0;
13767   REPLACE_LOGBL=0;
13768   REPLACE_MODF=0;
13769   REPLACE_MODFF=0;
13770   REPLACE_MODFL=0;
13771   REPLACE_NAN=0;
13772   REPLACE_REMAINDER=0;
13773   REPLACE_REMAINDERF=0;
13774   REPLACE_REMAINDERL=0;
13775   REPLACE_ROUND=0;
13776   REPLACE_ROUNDF=0;
13777   REPLACE_ROUNDL=0;
13778   REPLACE_SIGNBIT=0;
13779   REPLACE_SIGNBIT_USING_GCC=0;
13780   REPLACE_SQRTL=0;
13781   REPLACE_TRUNC=0;
13782   REPLACE_TRUNCF=0;
13783   REPLACE_TRUNCL=0;
13784
13785
13786    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13787 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
13788 if ${ac_cv_c_bigendian+:} false; then :
13789   $as_echo_n "(cached) " >&6
13790 else
13791   ac_cv_c_bigendian=unknown
13792     # See if we're dealing with a universal compiler.
13793     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13794 /* end confdefs.h.  */
13795 #ifndef __APPLE_CC__
13796                not a universal capable compiler
13797              #endif
13798              typedef int dummy;
13799
13800 _ACEOF
13801 if ac_fn_c_try_compile "$LINENO"; then :
13802
13803         # Check for potential -arch flags.  It is not universal unless
13804         # there are at least two -arch flags with different values.
13805         ac_arch=
13806         ac_prev=
13807         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13808          if test -n "$ac_prev"; then
13809            case $ac_word in
13810              i?86 | x86_64 | ppc | ppc64)
13811                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13812                  ac_arch=$ac_word
13813                else
13814                  ac_cv_c_bigendian=universal
13815                  break
13816                fi
13817                ;;
13818            esac
13819            ac_prev=
13820          elif test "x$ac_word" = "x-arch"; then
13821            ac_prev=arch
13822          fi
13823        done
13824 fi
13825 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13826     if test $ac_cv_c_bigendian = unknown; then
13827       # See if sys/param.h defines the BYTE_ORDER macro.
13828       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13829 /* end confdefs.h.  */
13830 #include <sys/types.h>
13831              #include <sys/param.h>
13832
13833 int
13834 main ()
13835 {
13836 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13837                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13838                      && LITTLE_ENDIAN)
13839               bogus endian macros
13840              #endif
13841
13842   ;
13843   return 0;
13844 }
13845 _ACEOF
13846 if ac_fn_c_try_compile "$LINENO"; then :
13847   # It does; now see whether it defined to BIG_ENDIAN or not.
13848          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13849 /* end confdefs.h.  */
13850 #include <sys/types.h>
13851                 #include <sys/param.h>
13852
13853 int
13854 main ()
13855 {
13856 #if BYTE_ORDER != BIG_ENDIAN
13857                  not big endian
13858                 #endif
13859
13860   ;
13861   return 0;
13862 }
13863 _ACEOF
13864 if ac_fn_c_try_compile "$LINENO"; then :
13865   ac_cv_c_bigendian=yes
13866 else
13867   ac_cv_c_bigendian=no
13868 fi
13869 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13870 fi
13871 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13872     fi
13873     if test $ac_cv_c_bigendian = unknown; then
13874       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13875       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13876 /* end confdefs.h.  */
13877 #include <limits.h>
13878
13879 int
13880 main ()
13881 {
13882 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13883               bogus endian macros
13884              #endif
13885
13886   ;
13887   return 0;
13888 }
13889 _ACEOF
13890 if ac_fn_c_try_compile "$LINENO"; then :
13891   # It does; now see whether it defined to _BIG_ENDIAN or not.
13892          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13893 /* end confdefs.h.  */
13894 #include <limits.h>
13895
13896 int
13897 main ()
13898 {
13899 #ifndef _BIG_ENDIAN
13900                  not big endian
13901                 #endif
13902
13903   ;
13904   return 0;
13905 }
13906 _ACEOF
13907 if ac_fn_c_try_compile "$LINENO"; then :
13908   ac_cv_c_bigendian=yes
13909 else
13910   ac_cv_c_bigendian=no
13911 fi
13912 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13913 fi
13914 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13915     fi
13916     if test $ac_cv_c_bigendian = unknown; then
13917       # Compile a test program.
13918       if test "$cross_compiling" = yes; then :
13919   # Try to guess by grepping values from an object file.
13920          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13921 /* end confdefs.h.  */
13922 short int ascii_mm[] =
13923                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13924                 short int ascii_ii[] =
13925                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13926                 int use_ascii (int i) {
13927                   return ascii_mm[i] + ascii_ii[i];
13928                 }
13929                 short int ebcdic_ii[] =
13930                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13931                 short int ebcdic_mm[] =
13932                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13933                 int use_ebcdic (int i) {
13934                   return ebcdic_mm[i] + ebcdic_ii[i];
13935                 }
13936                 extern int foo;
13937
13938 int
13939 main ()
13940 {
13941 return use_ascii (foo) == use_ebcdic (foo);
13942   ;
13943   return 0;
13944 }
13945 _ACEOF
13946 if ac_fn_c_try_compile "$LINENO"; then :
13947   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13948               ac_cv_c_bigendian=yes
13949             fi
13950             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13951               if test "$ac_cv_c_bigendian" = unknown; then
13952                 ac_cv_c_bigendian=no
13953               else
13954                 # finding both strings is unlikely to happen, but who knows?
13955                 ac_cv_c_bigendian=unknown
13956               fi
13957             fi
13958 fi
13959 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13960 else
13961   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13962 /* end confdefs.h.  */
13963 $ac_includes_default
13964 int
13965 main ()
13966 {
13967
13968              /* Are we little or big endian?  From Harbison&Steele.  */
13969              union
13970              {
13971                long int l;
13972                char c[sizeof (long int)];
13973              } u;
13974              u.l = 1;
13975              return u.c[sizeof (long int) - 1] == 1;
13976
13977   ;
13978   return 0;
13979 }
13980 _ACEOF
13981 if ac_fn_c_try_run "$LINENO"; then :
13982   ac_cv_c_bigendian=no
13983 else
13984   ac_cv_c_bigendian=yes
13985 fi
13986 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13987   conftest.$ac_objext conftest.beam conftest.$ac_ext
13988 fi
13989
13990     fi
13991 fi
13992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13993 $as_echo "$ac_cv_c_bigendian" >&6; }
13994  case $ac_cv_c_bigendian in #(
13995    yes)
13996      $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13997 ;; #(
13998    no)
13999       ;; #(
14000    universal)
14001
14002 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
14003
14004      ;; #(
14005    *)
14006      as_fn_error $? "unknown endianness
14007  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
14008  esac
14009
14010
14011
14012   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long double and double are the same" >&5
14013 $as_echo_n "checking whether long double and double are the same... " >&6; }
14014 if ${gl_cv_long_double_equals_double+:} false; then :
14015   $as_echo_n "(cached) " >&6
14016 else
14017   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14018 /* end confdefs.h.  */
14019 #include <float.h>
14020 int
14021 main ()
14022 {
14023 typedef int check[sizeof (long double) == sizeof (double)
14024                               && LDBL_MANT_DIG == DBL_MANT_DIG
14025                               && LDBL_MAX_EXP == DBL_MAX_EXP
14026                               && LDBL_MIN_EXP == DBL_MIN_EXP
14027                               ? 1 : -1];
14028
14029   ;
14030   return 0;
14031 }
14032 _ACEOF
14033 if ac_fn_c_try_compile "$LINENO"; then :
14034   gl_cv_long_double_equals_double=yes
14035 else
14036   gl_cv_long_double_equals_double=no
14037 fi
14038 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14039
14040 fi
14041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_long_double_equals_double" >&5
14042 $as_echo "$gl_cv_long_double_equals_double" >&6; }
14043   if test $gl_cv_long_double_equals_double = yes; then
14044
14045 $as_echo "#define HAVE_SAME_LONG_DOUBLE_AS_DOUBLE 1" >>confdefs.h
14046
14047     HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=1
14048   else
14049     HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=0
14050   fi
14051
14052
14053
14054   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
14055 $as_echo_n "checking where to find the exponent in a 'double'... " >&6; }
14056 if ${gl_cv_cc_double_expbit0+:} false; then :
14057   $as_echo_n "(cached) " >&6
14058 else
14059
14060       if test "$cross_compiling" = yes; then :
14061
14062                                                                       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14063 /* end confdefs.h.  */
14064
14065 #if defined arm || defined __arm || defined __arm__
14066   mixed_endianness
14067 #endif
14068
14069 _ACEOF
14070 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14071   $EGREP "mixed_endianness" >/dev/null 2>&1; then :
14072   gl_cv_cc_double_expbit0="unknown"
14073 else
14074
14075                                                          :
14076 if ${ac_cv_c_bigendian+:} false; then :
14077   $as_echo_n "(cached) " >&6
14078 else
14079   ac_cv_c_bigendian=unknown
14080     # See if we're dealing with a universal compiler.
14081     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14082 /* end confdefs.h.  */
14083 #ifndef __APPLE_CC__
14084                not a universal capable compiler
14085              #endif
14086              typedef int dummy;
14087
14088 _ACEOF
14089 if ac_fn_c_try_compile "$LINENO"; then :
14090
14091         # Check for potential -arch flags.  It is not universal unless
14092         # there are at least two -arch flags with different values.
14093         ac_arch=
14094         ac_prev=
14095         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14096          if test -n "$ac_prev"; then
14097            case $ac_word in
14098              i?86 | x86_64 | ppc | ppc64)
14099                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14100                  ac_arch=$ac_word
14101                else
14102                  ac_cv_c_bigendian=universal
14103                  break
14104                fi
14105                ;;
14106            esac
14107            ac_prev=
14108          elif test "x$ac_word" = "x-arch"; then
14109            ac_prev=arch
14110          fi
14111        done
14112 fi
14113 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14114     if test $ac_cv_c_bigendian = unknown; then
14115       # See if sys/param.h defines the BYTE_ORDER macro.
14116       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14117 /* end confdefs.h.  */
14118 #include <sys/types.h>
14119              #include <sys/param.h>
14120
14121 int
14122 main ()
14123 {
14124 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14125                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14126                      && LITTLE_ENDIAN)
14127               bogus endian macros
14128              #endif
14129
14130   ;
14131   return 0;
14132 }
14133 _ACEOF
14134 if ac_fn_c_try_compile "$LINENO"; then :
14135   # It does; now see whether it defined to BIG_ENDIAN or not.
14136          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14137 /* end confdefs.h.  */
14138 #include <sys/types.h>
14139                 #include <sys/param.h>
14140
14141 int
14142 main ()
14143 {
14144 #if BYTE_ORDER != BIG_ENDIAN
14145                  not big endian
14146                 #endif
14147
14148   ;
14149   return 0;
14150 }
14151 _ACEOF
14152 if ac_fn_c_try_compile "$LINENO"; then :
14153   ac_cv_c_bigendian=yes
14154 else
14155   ac_cv_c_bigendian=no
14156 fi
14157 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14158 fi
14159 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14160     fi
14161     if test $ac_cv_c_bigendian = unknown; then
14162       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14163       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14164 /* end confdefs.h.  */
14165 #include <limits.h>
14166
14167 int
14168 main ()
14169 {
14170 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14171               bogus endian macros
14172              #endif
14173
14174   ;
14175   return 0;
14176 }
14177 _ACEOF
14178 if ac_fn_c_try_compile "$LINENO"; then :
14179   # It does; now see whether it defined to _BIG_ENDIAN or not.
14180          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14181 /* end confdefs.h.  */
14182 #include <limits.h>
14183
14184 int
14185 main ()
14186 {
14187 #ifndef _BIG_ENDIAN
14188                  not big endian
14189                 #endif
14190
14191   ;
14192   return 0;
14193 }
14194 _ACEOF
14195 if ac_fn_c_try_compile "$LINENO"; then :
14196   ac_cv_c_bigendian=yes
14197 else
14198   ac_cv_c_bigendian=no
14199 fi
14200 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14201 fi
14202 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14203     fi
14204     if test $ac_cv_c_bigendian = unknown; then
14205       # Compile a test program.
14206       if test "$cross_compiling" = yes; then :
14207   # Try to guess by grepping values from an object file.
14208          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14209 /* end confdefs.h.  */
14210 short int ascii_mm[] =
14211                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14212                 short int ascii_ii[] =
14213                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14214                 int use_ascii (int i) {
14215                   return ascii_mm[i] + ascii_ii[i];
14216                 }
14217                 short int ebcdic_ii[] =
14218                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14219                 short int ebcdic_mm[] =
14220                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14221                 int use_ebcdic (int i) {
14222                   return ebcdic_mm[i] + ebcdic_ii[i];
14223                 }
14224                 extern int foo;
14225
14226 int
14227 main ()
14228 {
14229 return use_ascii (foo) == use_ebcdic (foo);
14230   ;
14231   return 0;
14232 }
14233 _ACEOF
14234 if ac_fn_c_try_compile "$LINENO"; then :
14235   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14236               ac_cv_c_bigendian=yes
14237             fi
14238             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14239               if test "$ac_cv_c_bigendian" = unknown; then
14240                 ac_cv_c_bigendian=no
14241               else
14242                 # finding both strings is unlikely to happen, but who knows?
14243                 ac_cv_c_bigendian=unknown
14244               fi
14245             fi
14246 fi
14247 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14248 else
14249   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14250 /* end confdefs.h.  */
14251 $ac_includes_default
14252 int
14253 main ()
14254 {
14255
14256              /* Are we little or big endian?  From Harbison&Steele.  */
14257              union
14258              {
14259                long int l;
14260                char c[sizeof (long int)];
14261              } u;
14262              u.l = 1;
14263              return u.c[sizeof (long int) - 1] == 1;
14264
14265   ;
14266   return 0;
14267 }
14268 _ACEOF
14269 if ac_fn_c_try_run "$LINENO"; then :
14270   ac_cv_c_bigendian=no
14271 else
14272   ac_cv_c_bigendian=yes
14273 fi
14274 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14275   conftest.$ac_objext conftest.beam conftest.$ac_ext
14276 fi
14277
14278     fi
14279 fi
14280 :
14281  case $ac_cv_c_bigendian in #(
14282    yes)
14283      gl_cv_cc_double_expbit0="word 0 bit 20";; #(
14284    no)
14285      gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
14286    universal)
14287
14288 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
14289
14290      ;; #(
14291    *)
14292      gl_cv_cc_double_expbit0="unknown" ;;
14293  esac
14294
14295
14296 fi
14297 rm -f conftest*
14298
14299
14300 else
14301   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14302 /* end confdefs.h.  */
14303
14304 #include <float.h>
14305 #include <stddef.h>
14306 #include <stdio.h>
14307 #include <string.h>
14308 #define NWORDS \
14309   ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
14310 typedef union { double value; unsigned int word[NWORDS]; } memory_double;
14311 static unsigned int ored_words[NWORDS];
14312 static unsigned int anded_words[NWORDS];
14313 static void add_to_ored_words (double x)
14314 {
14315   memory_double m;
14316   size_t i;
14317   /* Clear it first, in case sizeof (double) < sizeof (memory_double).  */
14318   memset (&m, 0, sizeof (memory_double));
14319   m.value = x;
14320   for (i = 0; i < NWORDS; i++)
14321     {
14322       ored_words[i] |= m.word[i];
14323       anded_words[i] &= m.word[i];
14324     }
14325 }
14326 int main ()
14327 {
14328   size_t j;
14329   FILE *fp = fopen ("conftest.out", "w");
14330   if (fp == NULL)
14331     return 1;
14332   for (j = 0; j < NWORDS; j++)
14333     anded_words[j] = ~ (unsigned int) 0;
14334   add_to_ored_words (0.25);
14335   add_to_ored_words (0.5);
14336   add_to_ored_words (1.0);
14337   add_to_ored_words (2.0);
14338   add_to_ored_words (4.0);
14339   /* Remove bits that are common (e.g. if representation of the first mantissa
14340      bit is explicit).  */
14341   for (j = 0; j < NWORDS; j++)
14342     ored_words[j] &= ~anded_words[j];
14343   /* Now find the nonzero word.  */
14344   for (j = 0; j < NWORDS; j++)
14345     if (ored_words[j] != 0)
14346       break;
14347   if (j < NWORDS)
14348     {
14349       size_t i;
14350       for (i = j + 1; i < NWORDS; i++)
14351         if (ored_words[i] != 0)
14352           {
14353             fprintf (fp, "unknown");
14354             return (fclose (fp) != 0);
14355           }
14356       for (i = 0; ; i++)
14357         if ((ored_words[j] >> i) & 1)
14358           {
14359             fprintf (fp, "word %d bit %d", (int) j, (int) i);
14360             return (fclose (fp) != 0);
14361           }
14362     }
14363   fprintf (fp, "unknown");
14364   return (fclose (fp) != 0);
14365 }
14366
14367 _ACEOF
14368 if ac_fn_c_try_run "$LINENO"; then :
14369   gl_cv_cc_double_expbit0=`cat conftest.out`
14370 else
14371   gl_cv_cc_double_expbit0="unknown"
14372 fi
14373 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14374   conftest.$ac_objext conftest.beam conftest.$ac_ext
14375 fi
14376
14377       rm -f conftest.out
14378
14379 fi
14380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
14381 $as_echo "$gl_cv_cc_double_expbit0" >&6; }
14382   case "$gl_cv_cc_double_expbit0" in
14383     word*bit*)
14384       word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
14385       bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
14386
14387 cat >>confdefs.h <<_ACEOF
14388 #define DBL_EXPBIT0_WORD $word
14389 _ACEOF
14390
14391
14392 cat >>confdefs.h <<_ACEOF
14393 #define DBL_EXPBIT0_BIT $bit
14394 _ACEOF
14395
14396       ;;
14397   esac
14398
14399
14400   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5
14401 $as_echo_n "checking where to find the exponent in a 'float'... " >&6; }
14402 if ${gl_cv_cc_float_expbit0+:} false; then :
14403   $as_echo_n "(cached) " >&6
14404 else
14405
14406       if test "$cross_compiling" = yes; then :
14407   gl_cv_cc_float_expbit0="word 0 bit 23"
14408 else
14409   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14410 /* end confdefs.h.  */
14411
14412 #include <float.h>
14413 #include <stddef.h>
14414 #include <stdio.h>
14415 #include <string.h>
14416 #define NWORDS \
14417   ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
14418 typedef union { float value; unsigned int word[NWORDS]; } memory_float;
14419 static unsigned int ored_words[NWORDS];
14420 static unsigned int anded_words[NWORDS];
14421 static void add_to_ored_words (float x)
14422 {
14423   memory_float m;
14424   size_t i;
14425   /* Clear it first, in case
14426      sizeof (float) < sizeof (memory_float).  */
14427   memset (&m, 0, sizeof (memory_float));
14428   m.value = x;
14429   for (i = 0; i < NWORDS; i++)
14430     {
14431       ored_words[i] |= m.word[i];
14432       anded_words[i] &= m.word[i];
14433     }
14434 }
14435 int main ()
14436 {
14437   size_t j;
14438   FILE *fp = fopen ("conftest.out", "w");
14439   if (fp == NULL)
14440     return 1;
14441   for (j = 0; j < NWORDS; j++)
14442     anded_words[j] = ~ (unsigned int) 0;
14443   add_to_ored_words (0.25f);
14444   add_to_ored_words (0.5f);
14445   add_to_ored_words (1.0f);
14446   add_to_ored_words (2.0f);
14447   add_to_ored_words (4.0f);
14448   /* Remove bits that are common (e.g. if representation of the first mantissa
14449      bit is explicit).  */
14450   for (j = 0; j < NWORDS; j++)
14451     ored_words[j] &= ~anded_words[j];
14452   /* Now find the nonzero word.  */
14453   for (j = 0; j < NWORDS; j++)
14454     if (ored_words[j] != 0)
14455       break;
14456   if (j < NWORDS)
14457     {
14458       size_t i;
14459       for (i = j + 1; i < NWORDS; i++)
14460         if (ored_words[i] != 0)
14461           {
14462             fprintf (fp, "unknown");
14463             return (fclose (fp) != 0);
14464           }
14465       for (i = 0; ; i++)
14466         if ((ored_words[j] >> i) & 1)
14467           {
14468             fprintf (fp, "word %d bit %d", (int) j, (int) i);
14469             return (fclose (fp) != 0);
14470           }
14471     }
14472   fprintf (fp, "unknown");
14473   return (fclose (fp) != 0);
14474 }
14475
14476 _ACEOF
14477 if ac_fn_c_try_run "$LINENO"; then :
14478   gl_cv_cc_float_expbit0=`cat conftest.out`
14479 else
14480   gl_cv_cc_float_expbit0="unknown"
14481 fi
14482 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14483   conftest.$ac_objext conftest.beam conftest.$ac_ext
14484 fi
14485
14486       rm -f conftest.out
14487
14488 fi
14489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5
14490 $as_echo "$gl_cv_cc_float_expbit0" >&6; }
14491   case "$gl_cv_cc_float_expbit0" in
14492     word*bit*)
14493       word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
14494       bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'`
14495
14496 cat >>confdefs.h <<_ACEOF
14497 #define FLT_EXPBIT0_WORD $word
14498 _ACEOF
14499
14500
14501 cat >>confdefs.h <<_ACEOF
14502 #define FLT_EXPBIT0_BIT $bit
14503 _ACEOF
14504
14505       ;;
14506   esac
14507
14508
14509   GNULIB_ISWBLANK=0;
14510   GNULIB_WCTYPE=0;
14511   GNULIB_ISWCTYPE=0;
14512   GNULIB_WCTRANS=0;
14513   GNULIB_TOWCTRANS=0;
14514     HAVE_ISWBLANK=1;
14515   HAVE_WCTYPE_T=1;
14516   HAVE_WCTRANS_T=1;
14517   REPLACE_ISWBLANK=0;
14518
14519
14520
14521
14522
14523
14524
14525   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
14526 $as_echo_n "checking for wint_t... " >&6; }
14527 if ${gt_cv_c_wint_t+:} false; then :
14528   $as_echo_n "(cached) " >&6
14529 else
14530   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14531 /* end confdefs.h.  */
14532
14533 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
14534    <wchar.h>.
14535    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
14536    before <wchar.h>.  */
14537 #include <stddef.h>
14538 #include <stdio.h>
14539 #include <time.h>
14540 #include <wchar.h>
14541             wint_t foo = (wchar_t)'\0';
14542 int
14543 main ()
14544 {
14545
14546   ;
14547   return 0;
14548 }
14549 _ACEOF
14550 if ac_fn_c_try_compile "$LINENO"; then :
14551   gt_cv_c_wint_t=yes
14552 else
14553   gt_cv_c_wint_t=no
14554 fi
14555 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14556 fi
14557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
14558 $as_echo "$gt_cv_c_wint_t" >&6; }
14559   if test $gt_cv_c_wint_t = yes; then
14560
14561 $as_echo "#define HAVE_WINT_T 1" >>confdefs.h
14562
14563   fi
14564
14565
14566
14567
14568
14569
14570   :
14571
14572
14573
14574
14575
14576   if test $ac_cv_func_iswcntrl = yes; then
14577     HAVE_ISWCNTRL=1
14578   else
14579     HAVE_ISWCNTRL=0
14580   fi
14581
14582
14583
14584   if test $gt_cv_c_wint_t = yes; then
14585     HAVE_WINT_T=1
14586   else
14587     HAVE_WINT_T=0
14588   fi
14589
14590
14591
14592
14593
14594
14595
14596
14597   :
14598
14599
14600
14601
14602
14603
14604
14605
14606      if test $gl_cv_have_include_next = yes; then
14607        gl_cv_next_wctype_h='<'wctype.h'>'
14608      else
14609        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
14610 $as_echo_n "checking absolute name of <wctype.h>... " >&6; }
14611 if ${gl_cv_next_wctype_h+:} false; then :
14612   $as_echo_n "(cached) " >&6
14613 else
14614
14615              if test $ac_cv_header_wctype_h = yes; then
14616
14617
14618
14619
14620   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14621 /* end confdefs.h.  */
14622 #include <wctype.h>
14623 _ACEOF
14624                 case "$host_os" in
14625     aix*) gl_absname_cpp="$ac_cpp -C" ;;
14626     *)    gl_absname_cpp="$ac_cpp" ;;
14627   esac
14628
14629   case "$host_os" in
14630     mingw*)
14631                                           gl_dirsep_regex='[/\\]'
14632       ;;
14633     *)
14634       gl_dirsep_regex='\/'
14635       ;;
14636   esac
14637       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
14638   gl_header_literal_regex=`echo 'wctype.h' \
14639                            | sed -e "$gl_make_literal_regex_sed"`
14640   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
14641       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
14642       s|^/[^/]|//&|
14643       p
14644       q
14645     }'
14646
14647         gl_cv_absolute_wctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
14648   sed -n "$gl_absolute_header_sed"`
14649
14650            gl_header=$gl_cv_absolute_wctype_h
14651            gl_cv_next_wctype_h='"'$gl_header'"'
14652           else
14653                gl_cv_next_wctype_h='<'wctype.h'>'
14654              fi
14655
14656
14657 fi
14658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
14659 $as_echo "$gl_cv_next_wctype_h" >&6; }
14660      fi
14661      NEXT_WCTYPE_H=$gl_cv_next_wctype_h
14662
14663      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
14664        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
14665        gl_next_as_first_directive='<'wctype.h'>'
14666      else
14667        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
14668        gl_next_as_first_directive=$gl_cv_next_wctype_h
14669      fi
14670      NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
14671
14672
14673
14674
14675   if test $ac_cv_header_wctype_h = yes; then
14676     if test $ac_cv_func_iswcntrl = yes; then
14677                   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
14678 $as_echo_n "checking whether iswcntrl works... " >&6; }
14679 if ${gl_cv_func_iswcntrl_works+:} false; then :
14680   $as_echo_n "(cached) " >&6
14681 else
14682
14683           if test "$cross_compiling" = yes; then :
14684   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14685 /* end confdefs.h.  */
14686 #include <stdlib.h>
14687                           #if __GNU_LIBRARY__ == 1
14688                           Linux libc5 i18n is broken.
14689                           #endif
14690 int
14691 main ()
14692 {
14693
14694   ;
14695   return 0;
14696 }
14697 _ACEOF
14698 if ac_fn_c_try_compile "$LINENO"; then :
14699   gl_cv_func_iswcntrl_works="guessing yes"
14700 else
14701   gl_cv_func_iswcntrl_works="guessing no"
14702 fi
14703 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14704
14705 else
14706   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14707 /* end confdefs.h.  */
14708
14709                /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
14710                   included before <wchar.h>.
14711                   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
14712                   must be included before <wchar.h>.  */
14713                #include <stddef.h>
14714                #include <stdio.h>
14715                #include <time.h>
14716                #include <wchar.h>
14717                #include <wctype.h>
14718                int main () { return iswprint ('x') == 0; }
14719
14720 _ACEOF
14721 if ac_fn_c_try_run "$LINENO"; then :
14722   gl_cv_func_iswcntrl_works=yes
14723 else
14724   gl_cv_func_iswcntrl_works=no
14725 fi
14726 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14727   conftest.$ac_objext conftest.beam conftest.$ac_ext
14728 fi
14729
14730
14731 fi
14732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
14733 $as_echo "$gl_cv_func_iswcntrl_works" >&6; }
14734     fi
14735     HAVE_WCTYPE_H=1
14736   else
14737     HAVE_WCTYPE_H=0
14738   fi
14739
14740
14741   case "$gl_cv_func_iswcntrl_works" in
14742     *yes) REPLACE_ISWCNTRL=0 ;;
14743     *)    REPLACE_ISWCNTRL=1 ;;
14744   esac
14745
14746
14747   if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
14748         :
14749   fi
14750
14751   if test $REPLACE_ISWCNTRL = 1; then
14752     REPLACE_TOWLOWER=1
14753   else
14754     for ac_func in towlower
14755 do :
14756   ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
14757 if test "x$ac_cv_func_towlower" = xyes; then :
14758   cat >>confdefs.h <<_ACEOF
14759 #define HAVE_TOWLOWER 1
14760 _ACEOF
14761
14762 fi
14763 done
14764
14765     if test $ac_cv_func_towlower = yes; then
14766       REPLACE_TOWLOWER=0
14767     else
14768       ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
14769              included before <wchar.h>.
14770              BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
14771              must be included before <wchar.h>.  */
14772           #include <stddef.h>
14773           #include <stdio.h>
14774           #include <time.h>
14775           #include <wchar.h>
14776           #if HAVE_WCTYPE_H
14777           # include <wctype.h>
14778           #endif
14779
14780 "
14781 if test "x$ac_cv_have_decl_towlower" = xyes; then :
14782   ac_have_decl=1
14783 else
14784   ac_have_decl=0
14785 fi
14786
14787 cat >>confdefs.h <<_ACEOF
14788 #define HAVE_DECL_TOWLOWER $ac_have_decl
14789 _ACEOF
14790
14791       if test $ac_cv_have_decl_towlower = yes; then
14792                                 REPLACE_TOWLOWER=1
14793       else
14794         REPLACE_TOWLOWER=0
14795       fi
14796     fi
14797   fi
14798
14799
14800   if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
14801         :
14802   fi
14803
14804           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
14805 $as_echo_n "checking for wctype_t... " >&6; }
14806 if ${gl_cv_type_wctype_t+:} false; then :
14807   $as_echo_n "(cached) " >&6
14808 else
14809   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14810 /* end confdefs.h.  */
14811 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
14812                included before <wchar.h>.
14813                BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
14814                must be included before <wchar.h>.  */
14815             #include <stddef.h>
14816             #include <stdio.h>
14817             #include <time.h>
14818             #include <wchar.h>
14819             #if HAVE_WCTYPE_H
14820             # include <wctype.h>
14821             #endif
14822             wctype_t a;
14823
14824 int
14825 main ()
14826 {
14827
14828   ;
14829   return 0;
14830 }
14831 _ACEOF
14832 if ac_fn_c_try_compile "$LINENO"; then :
14833   gl_cv_type_wctype_t=yes
14834 else
14835   gl_cv_type_wctype_t=no
14836 fi
14837 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14838
14839 fi
14840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
14841 $as_echo "$gl_cv_type_wctype_t" >&6; }
14842   if test $gl_cv_type_wctype_t = no; then
14843     HAVE_WCTYPE_T=0
14844   fi
14845
14846       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
14847 $as_echo_n "checking for wctrans_t... " >&6; }
14848 if ${gl_cv_type_wctrans_t+:} false; then :
14849   $as_echo_n "(cached) " >&6
14850 else
14851   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14852 /* end confdefs.h.  */
14853 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
14854                included before <wchar.h>.
14855                BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
14856                must be included before <wchar.h>.  */
14857             #include <stddef.h>
14858             #include <stdio.h>
14859             #include <time.h>
14860             #include <wchar.h>
14861             #include <wctype.h>
14862             wctrans_t a;
14863
14864 int
14865 main ()
14866 {
14867
14868   ;
14869   return 0;
14870 }
14871 _ACEOF
14872 if ac_fn_c_try_compile "$LINENO"; then :
14873   gl_cv_type_wctrans_t=yes
14874 else
14875   gl_cv_type_wctrans_t=no
14876 fi
14877 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14878
14879 fi
14880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
14881 $as_echo "$gl_cv_type_wctrans_t" >&6; }
14882   if test $gl_cv_type_wctrans_t = no; then
14883     HAVE_WCTRANS_T=0
14884   fi
14885
14886
14887     for gl_func in wctype iswctype wctrans towctrans     ; do
14888     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
14889     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
14890 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
14891 if eval \${$as_gl_Symbol+:} false; then :
14892   $as_echo_n "(cached) " >&6
14893 else
14894   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14895 /* end confdefs.h.  */
14896
14897 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
14898    <wchar.h>.
14899    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
14900    included before <wchar.h>.  */
14901 #if !(defined __GLIBC__ && !defined __UCLIBC__)
14902 # include <stddef.h>
14903 # include <stdio.h>
14904 # include <time.h>
14905 # include <wchar.h>
14906 #endif
14907 #include <wctype.h>
14908
14909 int
14910 main ()
14911 {
14912 #undef $gl_func
14913   (void) $gl_func;
14914   ;
14915   return 0;
14916 }
14917 _ACEOF
14918 if ac_fn_c_try_compile "$LINENO"; then :
14919   eval "$as_gl_Symbol=yes"
14920 else
14921   eval "$as_gl_Symbol=no"
14922 fi
14923 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14924 fi
14925 eval ac_res=\$$as_gl_Symbol
14926                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
14927 $as_echo "$ac_res" >&6; }
14928     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
14929   cat >>confdefs.h <<_ACEOF
14930 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
14931 _ACEOF
14932
14933                      eval ac_cv_have_decl_$gl_func=yes
14934 fi
14935       done
14936
14937
14938
14939
14940
14941
14942
14943
14944   GNULIB_NL_LANGINFO=0;
14945     HAVE_NL_LANGINFO=1;
14946   REPLACE_NL_LANGINFO=0;
14947
14948
14949
14950
14951
14952
14953
14954       ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
14955 if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then :
14956   ac_have_decl=1
14957 else
14958   ac_have_decl=0
14959 fi
14960
14961 cat >>confdefs.h <<_ACEOF
14962 #define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
14963 _ACEOF
14964
14965
14966
14967     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library >= 2.1 or uClibc" >&5
14968 $as_echo_n "checking whether we are using the GNU C Library >= 2.1 or uClibc... " >&6; }
14969 if ${ac_cv_gnu_library_2_1+:} false; then :
14970   $as_echo_n "(cached) " >&6
14971 else
14972   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14973 /* end confdefs.h.  */
14974
14975 #include <features.h>
14976 #ifdef __GNU_LIBRARY__
14977  #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
14978   Lucky GNU user
14979  #endif
14980 #endif
14981 #ifdef __UCLIBC__
14982  Lucky user
14983 #endif
14984
14985 _ACEOF
14986 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14987   $EGREP "Lucky" >/dev/null 2>&1; then :
14988   ac_cv_gnu_library_2_1=yes
14989 else
14990   ac_cv_gnu_library_2_1=no
14991 fi
14992 rm -f conftest*
14993
14994
14995
14996 fi
14997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2_1" >&5
14998 $as_echo "$ac_cv_gnu_library_2_1" >&6; }
14999
15000     GLIBC21="$ac_cv_gnu_library_2_1"
15001
15002
15003
15004   GNULIB_LOCALECONV=0;
15005   GNULIB_SETLOCALE=0;
15006   GNULIB_DUPLOCALE=0;
15007     HAVE_DUPLOCALE=1;
15008   REPLACE_LOCALECONV=0;
15009   REPLACE_SETLOCALE=0;
15010   REPLACE_DUPLOCALE=0;
15011   REPLACE_STRUCT_LCONV=0;
15012
15013
15014     REPLACE_NULL=0;
15015   HAVE_WCHAR_T=1;
15016
15017
15018   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
15019 $as_echo_n "checking for wchar_t... " >&6; }
15020 if ${gt_cv_c_wchar_t+:} false; then :
15021   $as_echo_n "(cached) " >&6
15022 else
15023   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15024 /* end confdefs.h.  */
15025 #include <stddef.h>
15026             wchar_t foo = (wchar_t)'\0';
15027 int
15028 main ()
15029 {
15030
15031   ;
15032   return 0;
15033 }
15034 _ACEOF
15035 if ac_fn_c_try_compile "$LINENO"; then :
15036   gt_cv_c_wchar_t=yes
15037 else
15038   gt_cv_c_wchar_t=no
15039 fi
15040 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15041 fi
15042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
15043 $as_echo "$gt_cv_c_wchar_t" >&6; }
15044   if test $gt_cv_c_wchar_t = yes; then
15045
15046 $as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
15047
15048   fi
15049
15050
15051
15052
15053   STDDEF_H=
15054   if test $gt_cv_c_wchar_t = no; then
15055     HAVE_WCHAR_T=0
15056     STDDEF_H=stddef.h
15057   fi
15058   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
15059 $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
15060 if ${gl_cv_decl_null_works+:} false; then :
15061   $as_echo_n "(cached) " >&6
15062 else
15063   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15064 /* end confdefs.h.  */
15065 #include <stddef.h>
15066       int test[2 * (sizeof NULL == sizeof (void *)) -1];
15067
15068 int
15069 main ()
15070 {
15071
15072   ;
15073   return 0;
15074 }
15075 _ACEOF
15076 if ac_fn_c_try_compile "$LINENO"; then :
15077   gl_cv_decl_null_works=yes
15078 else
15079   gl_cv_decl_null_works=no
15080 fi
15081 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15082 fi
15083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
15084 $as_echo "$gl_cv_decl_null_works" >&6; }
15085   if test $gl_cv_decl_null_works = no; then
15086     REPLACE_NULL=1
15087     STDDEF_H=stddef.h
15088   fi
15089
15090    if test -n "$STDDEF_H"; then
15091   GL_GENERATE_STDDEF_H_TRUE=
15092   GL_GENERATE_STDDEF_H_FALSE='#'
15093 else
15094   GL_GENERATE_STDDEF_H_TRUE='#'
15095   GL_GENERATE_STDDEF_H_FALSE=
15096 fi
15097
15098   if test -n "$STDDEF_H"; then
15099
15100
15101
15102
15103
15104
15105
15106
15107      if test $gl_cv_have_include_next = yes; then
15108        gl_cv_next_stddef_h='<'stddef.h'>'
15109      else
15110        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
15111 $as_echo_n "checking absolute name of <stddef.h>... " >&6; }
15112 if ${gl_cv_next_stddef_h+:} false; then :
15113   $as_echo_n "(cached) " >&6
15114 else
15115
15116
15117
15118   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15119 /* end confdefs.h.  */
15120 #include <stddef.h>
15121 _ACEOF
15122                 case "$host_os" in
15123     aix*) gl_absname_cpp="$ac_cpp -C" ;;
15124     *)    gl_absname_cpp="$ac_cpp" ;;
15125   esac
15126
15127   case "$host_os" in
15128     mingw*)
15129                                           gl_dirsep_regex='[/\\]'
15130       ;;
15131     *)
15132       gl_dirsep_regex='\/'
15133       ;;
15134   esac
15135       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
15136   gl_header_literal_regex=`echo 'stddef.h' \
15137                            | sed -e "$gl_make_literal_regex_sed"`
15138   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
15139       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
15140       s|^/[^/]|//&|
15141       p
15142       q
15143     }'
15144
15145         gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
15146   sed -n "$gl_absolute_header_sed"`
15147
15148            gl_header=$gl_cv_absolute_stddef_h
15149            gl_cv_next_stddef_h='"'$gl_header'"'
15150
15151
15152 fi
15153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
15154 $as_echo "$gl_cv_next_stddef_h" >&6; }
15155      fi
15156      NEXT_STDDEF_H=$gl_cv_next_stddef_h
15157
15158      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
15159        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
15160        gl_next_as_first_directive='<'stddef.h'>'
15161      else
15162        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
15163        gl_next_as_first_directive=$gl_cv_next_stddef_h
15164      fi
15165      NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
15166
15167
15168
15169
15170   fi
15171
15172
15173
15174
15175
15176
15177
15178       if test "X$prefix" = "XNONE"; then
15179     acl_final_prefix="$ac_default_prefix"
15180   else
15181     acl_final_prefix="$prefix"
15182   fi
15183   if test "X$exec_prefix" = "XNONE"; then
15184     acl_final_exec_prefix='${prefix}'
15185   else
15186     acl_final_exec_prefix="$exec_prefix"
15187   fi
15188   acl_save_prefix="$prefix"
15189   prefix="$acl_final_prefix"
15190   eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
15191   prefix="$acl_save_prefix"
15192
15193
15194
15195 # Check whether --with-gnu-ld was given.
15196 if test "${with_gnu_ld+set}" = set; then :
15197   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
15198 else
15199   with_gnu_ld=no
15200 fi
15201
15202 # Prepare PATH_SEPARATOR.
15203 # The user is always right.
15204 if test "${PATH_SEPARATOR+set}" != set; then
15205   # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
15206   # contains only /bin. Note that ksh looks also at the FPATH variable,
15207   # so we have to set that as well for the test.
15208   PATH_SEPARATOR=:
15209   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
15210     && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
15211            || PATH_SEPARATOR=';'
15212        }
15213 fi
15214
15215 ac_prog=ld
15216 if test "$GCC" = yes; then
15217   # Check if gcc -print-prog-name=ld gives a path.
15218   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
15219 $as_echo_n "checking for ld used by $CC... " >&6; }
15220   case $host in
15221   *-*-mingw*)
15222     # gcc leaves a trailing carriage return which upsets mingw
15223     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
15224   *)
15225     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
15226   esac
15227   case $ac_prog in
15228     # Accept absolute paths.
15229     [\\/]* | ?:[\\/]*)
15230       re_direlt='/[^/][^/]*/\.\./'
15231       # Canonicalize the pathname of ld
15232       ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'`
15233       while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do
15234         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
15235       done
15236       test -z "$LD" && LD="$ac_prog"
15237       ;;
15238   "")
15239     # If it fails, then pretend we aren't using GCC.
15240     ac_prog=ld
15241     ;;
15242   *)
15243     # If it is relative, then search for the first ld in PATH.
15244     with_gnu_ld=unknown
15245     ;;
15246   esac
15247 elif test "$with_gnu_ld" = yes; then
15248   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
15249 $as_echo_n "checking for GNU ld... " >&6; }
15250 else
15251   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
15252 $as_echo_n "checking for non-GNU ld... " >&6; }
15253 fi
15254 if ${acl_cv_path_LD+:} false; then :
15255   $as_echo_n "(cached) " >&6
15256 else
15257   if test -z "$LD"; then
15258   acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
15259   for ac_dir in $PATH; do
15260     IFS="$acl_save_ifs"
15261     test -z "$ac_dir" && ac_dir=.
15262     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
15263       acl_cv_path_LD="$ac_dir/$ac_prog"
15264       # Check to see if the program is GNU ld.  I'd rather use --version,
15265       # but apparently some variants of GNU ld only accept -v.
15266       # Break only if it was the GNU/non-GNU ld that we prefer.
15267       case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
15268       *GNU* | *'with BFD'*)
15269         test "$with_gnu_ld" != no && break
15270         ;;
15271       *)
15272         test "$with_gnu_ld" != yes && break
15273         ;;
15274       esac
15275     fi
15276   done
15277   IFS="$acl_save_ifs"
15278 else
15279   acl_cv_path_LD="$LD" # Let the user override the test with a path.
15280 fi
15281 fi
15282
15283 LD="$acl_cv_path_LD"
15284 if test -n "$LD"; then
15285   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
15286 $as_echo "$LD" >&6; }
15287 else
15288   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15289 $as_echo "no" >&6; }
15290 fi
15291 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
15292 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
15293 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
15294 if ${acl_cv_prog_gnu_ld+:} false; then :
15295   $as_echo_n "(cached) " >&6
15296 else
15297   # I'd rather use --version here, but apparently some GNU lds only accept -v.
15298 case `$LD -v 2>&1 </dev/null` in
15299 *GNU* | *'with BFD'*)
15300   acl_cv_prog_gnu_ld=yes
15301   ;;
15302 *)
15303   acl_cv_prog_gnu_ld=no
15304   ;;
15305 esac
15306 fi
15307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
15308 $as_echo "$acl_cv_prog_gnu_ld" >&6; }
15309 with_gnu_ld=$acl_cv_prog_gnu_ld
15310
15311
15312
15313
15314                                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
15315 $as_echo_n "checking for shared library run path origin... " >&6; }
15316 if ${acl_cv_rpath+:} false; then :
15317   $as_echo_n "(cached) " >&6
15318 else
15319
15320     CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
15321     ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
15322     . ./conftest.sh
15323     rm -f ./conftest.sh
15324     acl_cv_rpath=done
15325
15326 fi
15327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
15328 $as_echo "$acl_cv_rpath" >&6; }
15329   wl="$acl_cv_wl"
15330   acl_libext="$acl_cv_libext"
15331   acl_shlibext="$acl_cv_shlibext"
15332   acl_libname_spec="$acl_cv_libname_spec"
15333   acl_library_names_spec="$acl_cv_library_names_spec"
15334   acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
15335   acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
15336   acl_hardcode_direct="$acl_cv_hardcode_direct"
15337   acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
15338     # Check whether --enable-rpath was given.
15339 if test "${enable_rpath+set}" = set; then :
15340   enableval=$enable_rpath; :
15341 else
15342   enable_rpath=yes
15343 fi
15344
15345
15346
15347
15348   acl_libdirstem=lib
15349   acl_libdirstem2=
15350   case "$host_os" in
15351     solaris*)
15352                                     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5
15353 $as_echo_n "checking for 64-bit host... " >&6; }
15354 if ${gl_cv_solaris_64bit+:} false; then :
15355   $as_echo_n "(cached) " >&6
15356 else
15357   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15358 /* end confdefs.h.  */
15359
15360 #ifdef _LP64
15361 sixtyfour bits
15362 #endif
15363
15364 _ACEOF
15365 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15366   $EGREP "sixtyfour bits" >/dev/null 2>&1; then :
15367   gl_cv_solaris_64bit=yes
15368 else
15369   gl_cv_solaris_64bit=no
15370 fi
15371 rm -f conftest*
15372
15373
15374 fi
15375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5
15376 $as_echo "$gl_cv_solaris_64bit" >&6; }
15377       if test $gl_cv_solaris_64bit = yes; then
15378         acl_libdirstem=lib/64
15379         case "$host_cpu" in
15380           sparc*)        acl_libdirstem2=lib/sparcv9 ;;
15381           i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
15382         esac
15383       fi
15384       ;;
15385     *)
15386       searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
15387       if test -n "$searchpath"; then
15388         acl_save_IFS="${IFS=    }"; IFS=":"
15389         for searchdir in $searchpath; do
15390           if test -d "$searchdir"; then
15391             case "$searchdir" in
15392               */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
15393               */../ | */.. )
15394                 # Better ignore directories of this form. They are misleading.
15395                 ;;
15396               *) searchdir=`cd "$searchdir" && pwd`
15397                  case "$searchdir" in
15398                    */lib64 ) acl_libdirstem=lib64 ;;
15399                  esac ;;
15400             esac
15401           fi
15402         done
15403         IFS="$acl_save_IFS"
15404       fi
15405       ;;
15406   esac
15407   test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
15408
15409
15410
15411   gl_threads_api=none
15412   LIBTHREAD=
15413   LTLIBTHREAD=
15414   LIBMULTITHREAD=
15415   LTLIBMULTITHREAD=
15416   if test "$gl_use_threads" != no; then
15417         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
15418 $as_echo_n "checking whether imported symbols can be declared weak... " >&6; }
15419 if ${gl_cv_have_weak+:} false; then :
15420   $as_echo_n "(cached) " >&6
15421 else
15422   gl_cv_have_weak=no
15423               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15424 /* end confdefs.h.  */
15425 extern void xyzzy ();
15426 #pragma weak xyzzy
15427 int
15428 main ()
15429 {
15430 xyzzy();
15431   ;
15432   return 0;
15433 }
15434 _ACEOF
15435 if ac_fn_c_try_link "$LINENO"; then :
15436   gl_cv_have_weak=maybe
15437 fi
15438 rm -f core conftest.err conftest.$ac_objext \
15439     conftest$ac_exeext conftest.$ac_ext
15440        if test $gl_cv_have_weak = maybe; then
15441                            if test "$cross_compiling" = yes; then :
15442                           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15443 /* end confdefs.h.  */
15444 #ifdef __ELF__
15445                Extensible Linking Format
15446                #endif
15447
15448 _ACEOF
15449 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15450   $EGREP "Extensible Linking Format" >/dev/null 2>&1; then :
15451   gl_cv_have_weak="guessing yes"
15452 else
15453   gl_cv_have_weak="guessing no"
15454 fi
15455 rm -f conftest*
15456
15457
15458 else
15459   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15460 /* end confdefs.h.  */
15461
15462 #include <stdio.h>
15463 #pragma weak fputs
15464 int main ()
15465 {
15466   return (fputs == NULL);
15467 }
15468 _ACEOF
15469 if ac_fn_c_try_run "$LINENO"; then :
15470   gl_cv_have_weak=yes
15471 else
15472   gl_cv_have_weak=no
15473 fi
15474 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15475   conftest.$ac_objext conftest.beam conftest.$ac_ext
15476 fi
15477
15478        fi
15479
15480 fi
15481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
15482 $as_echo "$gl_cv_have_weak" >&6; }
15483     if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
15484       # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
15485       # it groks <pthread.h>. It's added above, in gl_THREADLIB_EARLY_BODY.
15486       ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
15487 if test "x$ac_cv_header_pthread_h" = xyes; then :
15488   gl_have_pthread_h=yes
15489 else
15490   gl_have_pthread_h=no
15491 fi
15492
15493
15494       if test "$gl_have_pthread_h" = yes; then
15495         # Other possible tests:
15496         #   -lpthreads (FSU threads, PCthreads)
15497         #   -lgthreads
15498         gl_have_pthread=
15499         # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
15500         # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
15501         # the second one only in libpthread, and lock.c needs it.
15502         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15503 /* end confdefs.h.  */
15504 #include <pthread.h>
15505 int
15506 main ()
15507 {
15508 pthread_mutex_lock((pthread_mutex_t*)0);
15509                pthread_mutexattr_init((pthread_mutexattr_t*)0);
15510   ;
15511   return 0;
15512 }
15513 _ACEOF
15514 if ac_fn_c_try_link "$LINENO"; then :
15515   gl_have_pthread=yes
15516 fi
15517 rm -f core conftest.err conftest.$ac_objext \
15518     conftest$ac_exeext conftest.$ac_ext
15519         # Test for libpthread by looking for pthread_kill. (Not pthread_self,
15520         # since it is defined as a macro on OSF/1.)
15521         if test -n "$gl_have_pthread"; then
15522           # The program links fine without libpthread. But it may actually
15523           # need to link with libpthread in order to create multiple threads.
15524           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
15525 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
15526 if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
15527   $as_echo_n "(cached) " >&6
15528 else
15529   ac_check_lib_save_LIBS=$LIBS
15530 LIBS="-lpthread  $LIBS"
15531 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15532 /* end confdefs.h.  */
15533
15534 /* Override any GCC internal prototype to avoid an error.
15535    Use char because int might match the return type of a GCC
15536    builtin and then its argument prototype would still apply.  */
15537 #ifdef __cplusplus
15538 extern "C"
15539 #endif
15540 char pthread_kill ();
15541 int
15542 main ()
15543 {
15544 return pthread_kill ();
15545   ;
15546   return 0;
15547 }
15548 _ACEOF
15549 if ac_fn_c_try_link "$LINENO"; then :
15550   ac_cv_lib_pthread_pthread_kill=yes
15551 else
15552   ac_cv_lib_pthread_pthread_kill=no
15553 fi
15554 rm -f core conftest.err conftest.$ac_objext \
15555     conftest$ac_exeext conftest.$ac_ext
15556 LIBS=$ac_check_lib_save_LIBS
15557 fi
15558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
15559 $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
15560 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
15561   LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread
15562              # On Solaris and HP-UX, most pthread functions exist also in libc.
15563              # Therefore pthread_in_use() needs to actually try to create a
15564              # thread: pthread_create from libc will fail, whereas
15565              # pthread_create will actually create a thread.
15566              case "$host_os" in
15567                solaris* | hpux*)
15568
15569 $as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
15570
15571              esac
15572
15573 fi
15574
15575         else
15576           # Some library is needed. Try libpthread and libc_r.
15577           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
15578 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
15579 if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
15580   $as_echo_n "(cached) " >&6
15581 else
15582   ac_check_lib_save_LIBS=$LIBS
15583 LIBS="-lpthread  $LIBS"
15584 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15585 /* end confdefs.h.  */
15586
15587 /* Override any GCC internal prototype to avoid an error.
15588    Use char because int might match the return type of a GCC
15589    builtin and then its argument prototype would still apply.  */
15590 #ifdef __cplusplus
15591 extern "C"
15592 #endif
15593 char pthread_kill ();
15594 int
15595 main ()
15596 {
15597 return pthread_kill ();
15598   ;
15599   return 0;
15600 }
15601 _ACEOF
15602 if ac_fn_c_try_link "$LINENO"; then :
15603   ac_cv_lib_pthread_pthread_kill=yes
15604 else
15605   ac_cv_lib_pthread_pthread_kill=no
15606 fi
15607 rm -f core conftest.err conftest.$ac_objext \
15608     conftest$ac_exeext conftest.$ac_ext
15609 LIBS=$ac_check_lib_save_LIBS
15610 fi
15611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
15612 $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
15613 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
15614   gl_have_pthread=yes
15615              LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread
15616              LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread
15617 fi
15618
15619           if test -z "$gl_have_pthread"; then
15620             # For FreeBSD 4.
15621             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
15622 $as_echo_n "checking for pthread_kill in -lc_r... " >&6; }
15623 if ${ac_cv_lib_c_r_pthread_kill+:} false; then :
15624   $as_echo_n "(cached) " >&6
15625 else
15626   ac_check_lib_save_LIBS=$LIBS
15627 LIBS="-lc_r  $LIBS"
15628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15629 /* end confdefs.h.  */
15630
15631 /* Override any GCC internal prototype to avoid an error.
15632    Use char because int might match the return type of a GCC
15633    builtin and then its argument prototype would still apply.  */
15634 #ifdef __cplusplus
15635 extern "C"
15636 #endif
15637 char pthread_kill ();
15638 int
15639 main ()
15640 {
15641 return pthread_kill ();
15642   ;
15643   return 0;
15644 }
15645 _ACEOF
15646 if ac_fn_c_try_link "$LINENO"; then :
15647   ac_cv_lib_c_r_pthread_kill=yes
15648 else
15649   ac_cv_lib_c_r_pthread_kill=no
15650 fi
15651 rm -f core conftest.err conftest.$ac_objext \
15652     conftest$ac_exeext conftest.$ac_ext
15653 LIBS=$ac_check_lib_save_LIBS
15654 fi
15655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
15656 $as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; }
15657 if test "x$ac_cv_lib_c_r_pthread_kill" = xyes; then :
15658   gl_have_pthread=yes
15659                LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r
15660                LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r
15661 fi
15662
15663           fi
15664         fi
15665         if test -n "$gl_have_pthread"; then
15666           gl_threads_api=posix
15667
15668 $as_echo "#define USE_POSIX_THREADS 1" >>confdefs.h
15669
15670           if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
15671             if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
15672
15673 $as_echo "#define USE_POSIX_THREADS_WEAK 1" >>confdefs.h
15674
15675               LIBTHREAD=
15676               LTLIBTHREAD=
15677             fi
15678           fi
15679         fi
15680       fi
15681     fi
15682     if test -z "$gl_have_pthread"; then
15683       if test "$gl_use_threads" = yes || test "$gl_use_threads" = solaris; then
15684         gl_have_solaristhread=
15685         gl_save_LIBS="$LIBS"
15686         LIBS="$LIBS -lthread"
15687         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15688 /* end confdefs.h.  */
15689
15690 #include <thread.h>
15691 #include <synch.h>
15692
15693 int
15694 main ()
15695 {
15696 thr_self();
15697   ;
15698   return 0;
15699 }
15700 _ACEOF
15701 if ac_fn_c_try_link "$LINENO"; then :
15702   gl_have_solaristhread=yes
15703 fi
15704 rm -f core conftest.err conftest.$ac_objext \
15705     conftest$ac_exeext conftest.$ac_ext
15706         LIBS="$gl_save_LIBS"
15707         if test -n "$gl_have_solaristhread"; then
15708           gl_threads_api=solaris
15709           LIBTHREAD=-lthread
15710           LTLIBTHREAD=-lthread
15711           LIBMULTITHREAD="$LIBTHREAD"
15712           LTLIBMULTITHREAD="$LTLIBTHREAD"
15713
15714 $as_echo "#define USE_SOLARIS_THREADS 1" >>confdefs.h
15715
15716           if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
15717
15718 $as_echo "#define USE_SOLARIS_THREADS_WEAK 1" >>confdefs.h
15719
15720             LIBTHREAD=
15721             LTLIBTHREAD=
15722           fi
15723         fi
15724       fi
15725     fi
15726     if test "$gl_use_threads" = pth; then
15727       gl_save_CPPFLAGS="$CPPFLAGS"
15728
15729
15730
15731
15732
15733   { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libpth" >&5
15734 $as_echo_n "checking how to link with libpth... " >&6; }
15735 if ${ac_cv_libpth_libs+:} false; then :
15736   $as_echo_n "(cached) " >&6
15737 else
15738
15739
15740
15741
15742
15743
15744
15745
15746     use_additional=yes
15747
15748   acl_save_prefix="$prefix"
15749   prefix="$acl_final_prefix"
15750   acl_save_exec_prefix="$exec_prefix"
15751   exec_prefix="$acl_final_exec_prefix"
15752
15753     eval additional_includedir=\"$includedir\"
15754     eval additional_libdir=\"$libdir\"
15755
15756   exec_prefix="$acl_save_exec_prefix"
15757   prefix="$acl_save_prefix"
15758
15759
15760 # Check whether --with-libpth-prefix was given.
15761 if test "${with_libpth_prefix+set}" = set; then :
15762   withval=$with_libpth_prefix;
15763     if test "X$withval" = "Xno"; then
15764       use_additional=no
15765     else
15766       if test "X$withval" = "X"; then
15767
15768   acl_save_prefix="$prefix"
15769   prefix="$acl_final_prefix"
15770   acl_save_exec_prefix="$exec_prefix"
15771   exec_prefix="$acl_final_exec_prefix"
15772
15773           eval additional_includedir=\"$includedir\"
15774           eval additional_libdir=\"$libdir\"
15775
15776   exec_prefix="$acl_save_exec_prefix"
15777   prefix="$acl_save_prefix"
15778
15779       else
15780         additional_includedir="$withval/include"
15781         additional_libdir="$withval/$acl_libdirstem"
15782         if test "$acl_libdirstem2" != "$acl_libdirstem" \
15783            && ! test -d "$withval/$acl_libdirstem"; then
15784           additional_libdir="$withval/$acl_libdirstem2"
15785         fi
15786       fi
15787     fi
15788
15789 fi
15790
15791       LIBPTH=
15792   LTLIBPTH=
15793   INCPTH=
15794   LIBPTH_PREFIX=
15795       HAVE_LIBPTH=
15796   rpathdirs=
15797   ltrpathdirs=
15798   names_already_handled=
15799   names_next_round='pth '
15800   while test -n "$names_next_round"; do
15801     names_this_round="$names_next_round"
15802     names_next_round=
15803     for name in $names_this_round; do
15804       already_handled=
15805       for n in $names_already_handled; do
15806         if test "$n" = "$name"; then
15807           already_handled=yes
15808           break
15809         fi
15810       done
15811       if test -z "$already_handled"; then
15812         names_already_handled="$names_already_handled $name"
15813                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
15814         eval value=\"\$HAVE_LIB$uppername\"
15815         if test -n "$value"; then
15816           if test "$value" = yes; then
15817             eval value=\"\$LIB$uppername\"
15818             test -z "$value" || LIBPTH="${LIBPTH}${LIBPTH:+ }$value"
15819             eval value=\"\$LTLIB$uppername\"
15820             test -z "$value" || LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$value"
15821           else
15822                                     :
15823           fi
15824         else
15825                               found_dir=
15826           found_la=
15827           found_so=
15828           found_a=
15829           eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
15830           if test -n "$acl_shlibext"; then
15831             shrext=".$acl_shlibext"             # typically: shrext=.so
15832           else
15833             shrext=
15834           fi
15835           if test $use_additional = yes; then
15836             dir="$additional_libdir"
15837                                     if test -n "$acl_shlibext"; then
15838               if test -f "$dir/$libname$shrext"; then
15839                 found_dir="$dir"
15840                 found_so="$dir/$libname$shrext"
15841               else
15842                 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
15843                   ver=`(cd "$dir" && \
15844                         for f in "$libname$shrext".*; do echo "$f"; done \
15845                         | sed -e "s,^$libname$shrext\\\\.,," \
15846                         | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
15847                         | sed 1q ) 2>/dev/null`
15848                   if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
15849                     found_dir="$dir"
15850                     found_so="$dir/$libname$shrext.$ver"
15851                   fi
15852                 else
15853                   eval library_names=\"$acl_library_names_spec\"
15854                   for f in $library_names; do
15855                     if test -f "$dir/$f"; then
15856                       found_dir="$dir"
15857                       found_so="$dir/$f"
15858                       break
15859                     fi
15860                   done
15861                 fi
15862               fi
15863             fi
15864                         if test "X$found_dir" = "X"; then
15865               if test -f "$dir/$libname.$acl_libext"; then
15866                 found_dir="$dir"
15867                 found_a="$dir/$libname.$acl_libext"
15868               fi
15869             fi
15870             if test "X$found_dir" != "X"; then
15871               if test -f "$dir/$libname.la"; then
15872                 found_la="$dir/$libname.la"
15873               fi
15874             fi
15875           fi
15876           if test "X$found_dir" = "X"; then
15877             for x in $LDFLAGS $LTLIBPTH; do
15878
15879   acl_save_prefix="$prefix"
15880   prefix="$acl_final_prefix"
15881   acl_save_exec_prefix="$exec_prefix"
15882   exec_prefix="$acl_final_exec_prefix"
15883   eval x=\"$x\"
15884   exec_prefix="$acl_save_exec_prefix"
15885   prefix="$acl_save_prefix"
15886
15887               case "$x" in
15888                 -L*)
15889                   dir=`echo "X$x" | sed -e 's/^X-L//'`
15890                                     if test -n "$acl_shlibext"; then
15891                     if test -f "$dir/$libname$shrext"; then
15892                       found_dir="$dir"
15893                       found_so="$dir/$libname$shrext"
15894                     else
15895                       if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
15896                         ver=`(cd "$dir" && \
15897                               for f in "$libname$shrext".*; do echo "$f"; done \
15898                               | sed -e "s,^$libname$shrext\\\\.,," \
15899                               | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
15900                               | sed 1q ) 2>/dev/null`
15901                         if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
15902                           found_dir="$dir"
15903                           found_so="$dir/$libname$shrext.$ver"
15904                         fi
15905                       else
15906                         eval library_names=\"$acl_library_names_spec\"
15907                         for f in $library_names; do
15908                           if test -f "$dir/$f"; then
15909                             found_dir="$dir"
15910                             found_so="$dir/$f"
15911                             break
15912                           fi
15913                         done
15914                       fi
15915                     fi
15916                   fi
15917                                     if test "X$found_dir" = "X"; then
15918                     if test -f "$dir/$libname.$acl_libext"; then
15919                       found_dir="$dir"
15920                       found_a="$dir/$libname.$acl_libext"
15921                     fi
15922                   fi
15923                   if test "X$found_dir" != "X"; then
15924                     if test -f "$dir/$libname.la"; then
15925                       found_la="$dir/$libname.la"
15926                     fi
15927                   fi
15928                   ;;
15929               esac
15930               if test "X$found_dir" != "X"; then
15931                 break
15932               fi
15933             done
15934           fi
15935           if test "X$found_dir" != "X"; then
15936                         LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$found_dir -l$name"
15937             if test "X$found_so" != "X"; then
15938                                                         if test "$enable_rpath" = no \
15939                  || test "X$found_dir" = "X/usr/$acl_libdirstem" \
15940                  || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
15941                                 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
15942               else
15943                                                                                 haveit=
15944                 for x in $ltrpathdirs; do
15945                   if test "X$x" = "X$found_dir"; then
15946                     haveit=yes
15947                     break
15948                   fi
15949                 done
15950                 if test -z "$haveit"; then
15951                   ltrpathdirs="$ltrpathdirs $found_dir"
15952                 fi
15953                                 if test "$acl_hardcode_direct" = yes; then
15954                                                       LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
15955                 else
15956                   if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
15957                                                             LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
15958                                                             haveit=
15959                     for x in $rpathdirs; do
15960                       if test "X$x" = "X$found_dir"; then
15961                         haveit=yes
15962                         break
15963                       fi
15964                     done
15965                     if test -z "$haveit"; then
15966                       rpathdirs="$rpathdirs $found_dir"
15967                     fi
15968                   else
15969                                                                                 haveit=
15970                     for x in $LDFLAGS $LIBPTH; do
15971
15972   acl_save_prefix="$prefix"
15973   prefix="$acl_final_prefix"
15974   acl_save_exec_prefix="$exec_prefix"
15975   exec_prefix="$acl_final_exec_prefix"
15976   eval x=\"$x\"
15977   exec_prefix="$acl_save_exec_prefix"
15978   prefix="$acl_save_prefix"
15979
15980                       if test "X$x" = "X-L$found_dir"; then
15981                         haveit=yes
15982                         break
15983                       fi
15984                     done
15985                     if test -z "$haveit"; then
15986                       LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir"
15987                     fi
15988                     if test "$acl_hardcode_minus_L" != no; then
15989                                                                                         LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
15990                     else
15991                                                                                                                                                                                 LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name"
15992                     fi
15993                   fi
15994                 fi
15995               fi
15996             else
15997               if test "X$found_a" != "X"; then
15998                                 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_a"
15999               else
16000                                                 LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir -l$name"
16001               fi
16002             fi
16003                         additional_includedir=
16004             case "$found_dir" in
16005               */$acl_libdirstem | */$acl_libdirstem/)
16006                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
16007                 if test "$name" = 'pth'; then
16008                   LIBPTH_PREFIX="$basedir"
16009                 fi
16010                 additional_includedir="$basedir/include"
16011                 ;;
16012               */$acl_libdirstem2 | */$acl_libdirstem2/)
16013                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
16014                 if test "$name" = 'pth'; then
16015                   LIBPTH_PREFIX="$basedir"
16016                 fi
16017                 additional_includedir="$basedir/include"
16018                 ;;
16019             esac
16020             if test "X$additional_includedir" != "X"; then
16021                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
16022                 haveit=
16023                 if test "X$additional_includedir" = "X/usr/local/include"; then
16024                   if test -n "$GCC"; then
16025                     case $host_os in
16026                       linux* | gnu* | k*bsd*-gnu) haveit=yes;;
16027                     esac
16028                   fi
16029                 fi
16030                 if test -z "$haveit"; then
16031                   for x in $CPPFLAGS $INCPTH; do
16032
16033   acl_save_prefix="$prefix"
16034   prefix="$acl_final_prefix"
16035   acl_save_exec_prefix="$exec_prefix"
16036   exec_prefix="$acl_final_exec_prefix"
16037   eval x=\"$x\"
16038   exec_prefix="$acl_save_exec_prefix"
16039   prefix="$acl_save_prefix"
16040
16041                     if test "X$x" = "X-I$additional_includedir"; then
16042                       haveit=yes
16043                       break
16044                     fi
16045                   done
16046                   if test -z "$haveit"; then
16047                     if test -d "$additional_includedir"; then
16048                                             INCPTH="${INCPTH}${INCPTH:+ }-I$additional_includedir"
16049                     fi
16050                   fi
16051                 fi
16052               fi
16053             fi
16054                         if test -n "$found_la"; then
16055                                                         save_libdir="$libdir"
16056               case "$found_la" in
16057                 */* | *\\*) . "$found_la" ;;
16058                 *) . "./$found_la" ;;
16059               esac
16060               libdir="$save_libdir"
16061                             for dep in $dependency_libs; do
16062                 case "$dep" in
16063                   -L*)
16064                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
16065                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
16066                        && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
16067                       haveit=
16068                       if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
16069                          || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
16070                         if test -n "$GCC"; then
16071                           case $host_os in
16072                             linux* | gnu* | k*bsd*-gnu) haveit=yes;;
16073                           esac
16074                         fi
16075                       fi
16076                       if test -z "$haveit"; then
16077                         haveit=
16078                         for x in $LDFLAGS $LIBPTH; do
16079
16080   acl_save_prefix="$prefix"
16081   prefix="$acl_final_prefix"
16082   acl_save_exec_prefix="$exec_prefix"
16083   exec_prefix="$acl_final_exec_prefix"
16084   eval x=\"$x\"
16085   exec_prefix="$acl_save_exec_prefix"
16086   prefix="$acl_save_prefix"
16087
16088                           if test "X$x" = "X-L$additional_libdir"; then
16089                             haveit=yes
16090                             break
16091                           fi
16092                         done
16093                         if test -z "$haveit"; then
16094                           if test -d "$additional_libdir"; then
16095                                                         LIBPTH="${LIBPTH}${LIBPTH:+ }-L$additional_libdir"
16096                           fi
16097                         fi
16098                         haveit=
16099                         for x in $LDFLAGS $LTLIBPTH; do
16100
16101   acl_save_prefix="$prefix"
16102   prefix="$acl_final_prefix"
16103   acl_save_exec_prefix="$exec_prefix"
16104   exec_prefix="$acl_final_exec_prefix"
16105   eval x=\"$x\"
16106   exec_prefix="$acl_save_exec_prefix"
16107   prefix="$acl_save_prefix"
16108
16109                           if test "X$x" = "X-L$additional_libdir"; then
16110                             haveit=yes
16111                             break
16112                           fi
16113                         done
16114                         if test -z "$haveit"; then
16115                           if test -d "$additional_libdir"; then
16116                                                         LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$additional_libdir"
16117                           fi
16118                         fi
16119                       fi
16120                     fi
16121                     ;;
16122                   -R*)
16123                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
16124                     if test "$enable_rpath" != no; then
16125                                                                   haveit=
16126                       for x in $rpathdirs; do
16127                         if test "X$x" = "X$dir"; then
16128                           haveit=yes
16129                           break
16130                         fi
16131                       done
16132                       if test -z "$haveit"; then
16133                         rpathdirs="$rpathdirs $dir"
16134                       fi
16135                                                                   haveit=
16136                       for x in $ltrpathdirs; do
16137                         if test "X$x" = "X$dir"; then
16138                           haveit=yes
16139                           break
16140                         fi
16141                       done
16142                       if test -z "$haveit"; then
16143                         ltrpathdirs="$ltrpathdirs $dir"
16144                       fi
16145                     fi
16146                     ;;
16147                   -l*)
16148                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
16149                     ;;
16150                   *.la)
16151                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
16152                     ;;
16153                   *)
16154                                         LIBPTH="${LIBPTH}${LIBPTH:+ }$dep"
16155                     LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$dep"
16156                     ;;
16157                 esac
16158               done
16159             fi
16160           else
16161                                                             LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name"
16162             LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-l$name"
16163           fi
16164         fi
16165       fi
16166     done
16167   done
16168   if test "X$rpathdirs" != "X"; then
16169     if test -n "$acl_hardcode_libdir_separator"; then
16170                         alldirs=
16171       for found_dir in $rpathdirs; do
16172         alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
16173       done
16174             acl_save_libdir="$libdir"
16175       libdir="$alldirs"
16176       eval flag=\"$acl_hardcode_libdir_flag_spec\"
16177       libdir="$acl_save_libdir"
16178       LIBPTH="${LIBPTH}${LIBPTH:+ }$flag"
16179     else
16180             for found_dir in $rpathdirs; do
16181         acl_save_libdir="$libdir"
16182         libdir="$found_dir"
16183         eval flag=\"$acl_hardcode_libdir_flag_spec\"
16184         libdir="$acl_save_libdir"
16185         LIBPTH="${LIBPTH}${LIBPTH:+ }$flag"
16186       done
16187     fi
16188   fi
16189   if test "X$ltrpathdirs" != "X"; then
16190             for found_dir in $ltrpathdirs; do
16191       LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-R$found_dir"
16192     done
16193   fi
16194
16195
16196
16197
16198
16199
16200     ac_cv_libpth_libs="$LIBPTH"
16201     ac_cv_libpth_ltlibs="$LTLIBPTH"
16202     ac_cv_libpth_cppflags="$INCPTH"
16203     ac_cv_libpth_prefix="$LIBPTH_PREFIX"
16204
16205 fi
16206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libpth_libs" >&5
16207 $as_echo "$ac_cv_libpth_libs" >&6; }
16208   LIBPTH="$ac_cv_libpth_libs"
16209   LTLIBPTH="$ac_cv_libpth_ltlibs"
16210   INCPTH="$ac_cv_libpth_cppflags"
16211   LIBPTH_PREFIX="$ac_cv_libpth_prefix"
16212
16213   for element in $INCPTH; do
16214     haveit=
16215     for x in $CPPFLAGS; do
16216
16217   acl_save_prefix="$prefix"
16218   prefix="$acl_final_prefix"
16219   acl_save_exec_prefix="$exec_prefix"
16220   exec_prefix="$acl_final_exec_prefix"
16221   eval x=\"$x\"
16222   exec_prefix="$acl_save_exec_prefix"
16223   prefix="$acl_save_prefix"
16224
16225       if test "X$x" = "X$element"; then
16226         haveit=yes
16227         break
16228       fi
16229     done
16230     if test -z "$haveit"; then
16231       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
16232     fi
16233   done
16234
16235
16236
16237
16238       HAVE_LIBPTH=yes
16239
16240
16241
16242       gl_have_pth=
16243       gl_save_LIBS="$LIBS"
16244       LIBS="$LIBS $LIBPTH"
16245       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16246 /* end confdefs.h.  */
16247 #include <pth.h>
16248 int
16249 main ()
16250 {
16251 pth_self();
16252   ;
16253   return 0;
16254 }
16255 _ACEOF
16256 if ac_fn_c_try_link "$LINENO"; then :
16257   gl_have_pth=yes
16258 fi
16259 rm -f core conftest.err conftest.$ac_objext \
16260     conftest$ac_exeext conftest.$ac_ext
16261       LIBS="$gl_save_LIBS"
16262       if test -n "$gl_have_pth"; then
16263         gl_threads_api=pth
16264         LIBTHREAD="$LIBPTH"
16265         LTLIBTHREAD="$LTLIBPTH"
16266         LIBMULTITHREAD="$LIBTHREAD"
16267         LTLIBMULTITHREAD="$LTLIBTHREAD"
16268
16269 $as_echo "#define USE_PTH_THREADS 1" >>confdefs.h
16270
16271         if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
16272           if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
16273
16274 $as_echo "#define USE_PTH_THREADS_WEAK 1" >>confdefs.h
16275
16276             LIBTHREAD=
16277             LTLIBTHREAD=
16278           fi
16279         fi
16280       else
16281         CPPFLAGS="$gl_save_CPPFLAGS"
16282       fi
16283     fi
16284     if test -z "$gl_have_pthread"; then
16285       case "$gl_use_threads" in
16286         yes | windows | win32) # The 'win32' is for backward compatibility.
16287           if { case "$host_os" in
16288                  mingw*) true;;
16289                  *) false;;
16290                esac
16291              }; then
16292             gl_threads_api=windows
16293
16294 $as_echo "#define USE_WINDOWS_THREADS 1" >>confdefs.h
16295
16296           fi
16297           ;;
16298       esac
16299     fi
16300   fi
16301   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for multithread API to use" >&5
16302 $as_echo_n "checking for multithread API to use... " >&6; }
16303   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_threads_api" >&5
16304 $as_echo "$gl_threads_api" >&6; }
16305
16306
16307
16308
16309
16310
16311
16312
16313
16314
16315
16316
16317
16318
16319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
16320 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
16321 if ${ac_cv_path_SED+:} false; then :
16322   $as_echo_n "(cached) " >&6
16323 else
16324             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
16325      for ac_i in 1 2 3 4 5 6 7; do
16326        ac_script="$ac_script$as_nl$ac_script"
16327      done
16328      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
16329      { ac_script=; unset ac_script;}
16330      if test -z "$SED"; then
16331   ac_path_SED_found=false
16332   # Loop through the user's path and test for each of PROGNAME-LIST
16333   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16334 for as_dir in $PATH
16335 do
16336   IFS=$as_save_IFS
16337   test -z "$as_dir" && as_dir=.
16338     for ac_prog in sed gsed; do
16339     for ac_exec_ext in '' $ac_executable_extensions; do
16340       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
16341       as_fn_executable_p "$ac_path_SED" || continue
16342 # Check for GNU ac_path_SED and select it if it is found.
16343   # Check for GNU $ac_path_SED
16344 case `"$ac_path_SED" --version 2>&1` in
16345 *GNU*)
16346   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
16347 *)
16348   ac_count=0
16349   $as_echo_n 0123456789 >"conftest.in"
16350   while :
16351   do
16352     cat "conftest.in" "conftest.in" >"conftest.tmp"
16353     mv "conftest.tmp" "conftest.in"
16354     cp "conftest.in" "conftest.nl"
16355     $as_echo '' >> "conftest.nl"
16356     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
16357     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
16358     as_fn_arith $ac_count + 1 && ac_count=$as_val
16359     if test $ac_count -gt ${ac_path_SED_max-0}; then
16360       # Best one so far, save it but keep looking for a better one
16361       ac_cv_path_SED="$ac_path_SED"
16362       ac_path_SED_max=$ac_count
16363     fi
16364     # 10*(2^10) chars as input seems more than enough
16365     test $ac_count -gt 10 && break
16366   done
16367   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
16368 esac
16369
16370       $ac_path_SED_found && break 3
16371     done
16372   done
16373   done
16374 IFS=$as_save_IFS
16375   if test -z "$ac_cv_path_SED"; then
16376     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
16377   fi
16378 else
16379   ac_cv_path_SED=$SED
16380 fi
16381
16382 fi
16383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
16384 $as_echo "$ac_cv_path_SED" >&6; }
16385  SED="$ac_cv_path_SED"
16386   rm -f conftest.sed
16387
16388
16389   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5
16390 $as_echo_n "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; }
16391 if ${gl_cv_func_malloc_posix+:} false; then :
16392   $as_echo_n "(cached) " >&6
16393 else
16394
16395                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16396 /* end confdefs.h.  */
16397
16398 int
16399 main ()
16400 {
16401 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
16402              choke me
16403              #endif
16404
16405   ;
16406   return 0;
16407 }
16408 _ACEOF
16409 if ac_fn_c_try_compile "$LINENO"; then :
16410   gl_cv_func_malloc_posix=yes
16411 else
16412   gl_cv_func_malloc_posix=no
16413 fi
16414 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16415
16416 fi
16417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
16418 $as_echo "$gl_cv_func_malloc_posix" >&6; }
16419
16420
16421
16422       for ac_header in stdlib.h
16423 do :
16424   ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
16425 if test "x$ac_cv_header_stdlib_h" = xyes; then :
16426   cat >>confdefs.h <<_ACEOF
16427 #define HAVE_STDLIB_H 1
16428 _ACEOF
16429
16430 fi
16431
16432 done
16433
16434   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
16435 $as_echo_n "checking for GNU libc compatible malloc... " >&6; }
16436 if ${ac_cv_func_malloc_0_nonnull+:} false; then :
16437   $as_echo_n "(cached) " >&6
16438 else
16439   if test "$cross_compiling" = yes; then :
16440   case "$host_os" in
16441           # Guess yes on platforms where we know the result.
16442           *-gnu* | freebsd* | netbsd* | openbsd* \
16443           | hpux* | solaris* | cygwin* | mingw*)
16444             ac_cv_func_malloc_0_nonnull=yes ;;
16445           # If we don't know, assume the worst.
16446           *) ac_cv_func_malloc_0_nonnull=no ;;
16447         esac
16448
16449 else
16450   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16451 /* end confdefs.h.  */
16452 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
16453             # include <stdlib.h>
16454             #else
16455             char *malloc ();
16456             #endif
16457
16458 int
16459 main ()
16460 {
16461 return ! malloc (0);
16462   ;
16463   return 0;
16464 }
16465
16466 _ACEOF
16467 if ac_fn_c_try_run "$LINENO"; then :
16468   ac_cv_func_malloc_0_nonnull=yes
16469 else
16470   ac_cv_func_malloc_0_nonnull=no
16471 fi
16472 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16473   conftest.$ac_objext conftest.beam conftest.$ac_ext
16474 fi
16475
16476
16477 fi
16478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
16479 $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
16480   if test $ac_cv_func_malloc_0_nonnull = yes; then :
16481   gl_cv_func_malloc_0_nonnull=1
16482 else
16483   gl_cv_func_malloc_0_nonnull=0
16484 fi
16485
16486
16487 cat >>confdefs.h <<_ACEOF
16488 #define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull
16489 _ACEOF
16490
16491
16492
16493
16494
16495
16496
16497
16498
16499
16500
16501
16502
16503
16504
16505
16506
16507
16508
16509
16510   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
16511 $as_echo_n "checking for a traditional japanese locale... " >&6; }
16512 if ${gt_cv_locale_ja+:} false; then :
16513   $as_echo_n "(cached) " >&6
16514 else
16515
16516     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16517 /* end confdefs.h.  */
16518
16519 #include <locale.h>
16520 #include <time.h>
16521 #if HAVE_LANGINFO_CODESET
16522 # include <langinfo.h>
16523 #endif
16524 #include <stdlib.h>
16525 #include <string.h>
16526 struct tm t;
16527 char buf[16];
16528 int main ()
16529 {
16530   const char *p;
16531   /* Check whether the given locale name is recognized by the system.  */
16532 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
16533   /* On native Windows, setlocale(category, "") looks at the system settings,
16534      not at the environment variables.  Also, when an encoding suffix such
16535      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
16536      category of the locale to "C".  */
16537   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
16538       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
16539     return 1;
16540 #else
16541   if (setlocale (LC_ALL, "") == NULL) return 1;
16542 #endif
16543   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
16544      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
16545      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
16546      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
16547      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
16548      some unit tests fail.
16549      On MirBSD 10, when an unsupported locale is specified, setlocale()
16550      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
16551 #if HAVE_LANGINFO_CODESET
16552   {
16553     const char *cs = nl_langinfo (CODESET);
16554     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
16555         || strcmp (cs, "UTF-8") == 0)
16556       return 1;
16557   }
16558 #endif
16559 #ifdef __CYGWIN__
16560   /* On Cygwin, avoid locale names without encoding suffix, because the
16561      locale_charset() function relies on the encoding suffix.  Note that
16562      LC_ALL is set on the command line.  */
16563   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
16564 #endif
16565   /* Check whether MB_CUR_MAX is > 1.  This excludes the dysfunctional locales
16566      on Cygwin 1.5.x.  */
16567   if (MB_CUR_MAX == 1)
16568     return 1;
16569   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
16570      This excludes the UTF-8 encoding (except on MirBSD).  */
16571   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
16572   if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
16573   for (p = buf; *p != '\0'; p++)
16574     if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
16575       return 1;
16576   return 0;
16577 }
16578
16579 _ACEOF
16580     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
16581   (eval $ac_link) 2>&5
16582   ac_status=$?
16583   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16584   test $ac_status = 0; } && test -s conftest$ac_exeext; then
16585       case "$host_os" in
16586         # Handle native Windows specially, because there setlocale() interprets
16587         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
16588         # "fr" or "fra" as "French" or "French_France.1252",
16589         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
16590         # "ja" as "Japanese" or "Japanese_Japan.932",
16591         # and similar.
16592         mingw*)
16593           # Note that on native Windows, the Japanese locale is
16594           # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
16595           # cannot use it here.
16596           gt_cv_locale_ja=none
16597           ;;
16598         *)
16599           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
16600           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
16601           # configure script would override the LC_ALL setting. Likewise for
16602           # LC_CTYPE, which is also set at the beginning of the configure script.
16603           # Test for the AIX locale name.
16604           if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
16605             gt_cv_locale_ja=ja_JP
16606           else
16607             # Test for the locale name with explicit encoding suffix.
16608             if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
16609               gt_cv_locale_ja=ja_JP.EUC-JP
16610             else
16611               # Test for the HP-UX, OSF/1, NetBSD locale name.
16612               if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
16613                 gt_cv_locale_ja=ja_JP.eucJP
16614               else
16615                 # Test for the IRIX, FreeBSD locale name.
16616                 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
16617                   gt_cv_locale_ja=ja_JP.EUC
16618                 else
16619                   # Test for the Solaris 7 locale name.
16620                   if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
16621                     gt_cv_locale_ja=ja
16622                   else
16623                     # Special test for NetBSD 1.6.
16624                     if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
16625                       gt_cv_locale_ja=ja_JP.eucJP
16626                     else
16627                       # None found.
16628                       gt_cv_locale_ja=none
16629                     fi
16630                   fi
16631                 fi
16632               fi
16633             fi
16634           fi
16635           ;;
16636       esac
16637     fi
16638     rm -fr conftest*
16639
16640 fi
16641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
16642 $as_echo "$gt_cv_locale_ja" >&6; }
16643   LOCALE_JA=$gt_cv_locale_ja
16644
16645
16646
16647
16648
16649   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
16650 $as_echo_n "checking for a transitional chinese locale... " >&6; }
16651 if ${gt_cv_locale_zh_CN+:} false; then :
16652   $as_echo_n "(cached) " >&6
16653 else
16654
16655     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16656 /* end confdefs.h.  */
16657
16658 #include <locale.h>
16659 #include <stdlib.h>
16660 #include <time.h>
16661 #if HAVE_LANGINFO_CODESET
16662 # include <langinfo.h>
16663 #endif
16664 #include <stdlib.h>
16665 #include <string.h>
16666 struct tm t;
16667 char buf[16];
16668 int main ()
16669 {
16670   const char *p;
16671   /* Check whether the given locale name is recognized by the system.  */
16672 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
16673   /* On native Windows, setlocale(category, "") looks at the system settings,
16674      not at the environment variables.  Also, when an encoding suffix such
16675      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
16676      category of the locale to "C".  */
16677   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
16678       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
16679     return 1;
16680 #else
16681   if (setlocale (LC_ALL, "") == NULL) return 1;
16682 #endif
16683   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
16684      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
16685      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
16686      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
16687      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
16688      some unit tests fail.
16689      On MirBSD 10, when an unsupported locale is specified, setlocale()
16690      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
16691 #if HAVE_LANGINFO_CODESET
16692   {
16693     const char *cs = nl_langinfo (CODESET);
16694     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
16695         || strcmp (cs, "UTF-8") == 0)
16696       return 1;
16697   }
16698 #endif
16699 #ifdef __CYGWIN__
16700   /* On Cygwin, avoid locale names without encoding suffix, because the
16701      locale_charset() function relies on the encoding suffix.  Note that
16702      LC_ALL is set on the command line.  */
16703   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
16704 #endif
16705   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
16706      This excludes the UTF-8 encoding (except on MirBSD).  */
16707   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
16708   if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
16709   for (p = buf; *p != '\0'; p++)
16710     if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
16711       return 1;
16712   /* Check whether a typical GB18030 multibyte sequence is recognized as a
16713      single wide character.  This excludes the GB2312 and GBK encodings.  */
16714   if (mblen ("\203\062\332\066", 5) != 4)
16715     return 1;
16716   return 0;
16717 }
16718
16719 _ACEOF
16720     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
16721   (eval $ac_link) 2>&5
16722   ac_status=$?
16723   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16724   test $ac_status = 0; } && test -s conftest$ac_exeext; then
16725       case "$host_os" in
16726         # Handle native Windows specially, because there setlocale() interprets
16727         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
16728         # "fr" or "fra" as "French" or "French_France.1252",
16729         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
16730         # "ja" as "Japanese" or "Japanese_Japan.932",
16731         # and similar.
16732         mingw*)
16733           # Test for the hypothetical native Windows locale name.
16734           if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
16735             gt_cv_locale_zh_CN=Chinese_China.54936
16736           else
16737             # None found.
16738             gt_cv_locale_zh_CN=none
16739           fi
16740           ;;
16741         solaris2.8)
16742           # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
16743           # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
16744           # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
16745           gt_cv_locale_zh_CN=none
16746           ;;
16747         *)
16748           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
16749           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
16750           # configure script would override the LC_ALL setting. Likewise for
16751           # LC_CTYPE, which is also set at the beginning of the configure script.
16752           # Test for the locale name without encoding suffix.
16753           if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
16754             gt_cv_locale_zh_CN=zh_CN
16755           else
16756             # Test for the locale name with explicit encoding suffix.
16757             if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
16758               gt_cv_locale_zh_CN=zh_CN.GB18030
16759             else
16760               # None found.
16761               gt_cv_locale_zh_CN=none
16762             fi
16763           fi
16764           ;;
16765       esac
16766     else
16767       # If there was a link error, due to mblen(), the system is so old that
16768       # it certainly doesn't have a chinese locale.
16769       gt_cv_locale_zh_CN=none
16770     fi
16771     rm -fr conftest*
16772
16773 fi
16774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
16775 $as_echo "$gt_cv_locale_zh_CN" >&6; }
16776   LOCALE_ZH_CN=$gt_cv_locale_zh_CN
16777
16778
16779
16780
16781   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
16782 $as_echo_n "checking for a french Unicode locale... " >&6; }
16783 if ${gt_cv_locale_fr_utf8+:} false; then :
16784   $as_echo_n "(cached) " >&6
16785 else
16786
16787     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16788 /* end confdefs.h.  */
16789
16790 #include <locale.h>
16791 #include <time.h>
16792 #if HAVE_LANGINFO_CODESET
16793 # include <langinfo.h>
16794 #endif
16795 #include <stdlib.h>
16796 #include <string.h>
16797 struct tm t;
16798 char buf[16];
16799 int main () {
16800   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
16801      imitates locale dependent behaviour by looking at the environment
16802      variables, and all locales use the UTF-8 encoding.  */
16803 #if !(defined __BEOS__ || defined __HAIKU__)
16804   /* Check whether the given locale name is recognized by the system.  */
16805 # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
16806   /* On native Windows, setlocale(category, "") looks at the system settings,
16807      not at the environment variables.  Also, when an encoding suffix such
16808      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
16809      category of the locale to "C".  */
16810   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
16811       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
16812     return 1;
16813 # else
16814   if (setlocale (LC_ALL, "") == NULL) return 1;
16815 # endif
16816   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
16817      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
16818      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
16819      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
16820      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
16821      some unit tests fail.  */
16822 # if HAVE_LANGINFO_CODESET
16823   {
16824     const char *cs = nl_langinfo (CODESET);
16825     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
16826       return 1;
16827   }
16828 # endif
16829 # ifdef __CYGWIN__
16830   /* On Cygwin, avoid locale names without encoding suffix, because the
16831      locale_charset() function relies on the encoding suffix.  Note that
16832      LC_ALL is set on the command line.  */
16833   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
16834 # endif
16835   /* Check whether in the abbreviation of the second month, the second
16836      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
16837      two bytes long, with UTF-8 encoding.  */
16838   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
16839   if (strftime (buf, sizeof (buf), "%b", &t) < 4
16840       || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
16841     return 1;
16842 #endif
16843 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
16844   /* Check whether the decimal separator is a comma.
16845      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
16846      are nl_langinfo(RADIXCHAR) are both ".".  */
16847   if (localeconv () ->decimal_point[0] != ',') return 1;
16848 #endif
16849   return 0;
16850 }
16851
16852 _ACEOF
16853     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
16854   (eval $ac_link) 2>&5
16855   ac_status=$?
16856   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16857   test $ac_status = 0; } && test -s conftest$ac_exeext; then
16858       case "$host_os" in
16859         # Handle native Windows specially, because there setlocale() interprets
16860         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
16861         # "fr" or "fra" as "French" or "French_France.1252",
16862         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
16863         # "ja" as "Japanese" or "Japanese_Japan.932",
16864         # and similar.
16865         mingw*)
16866           # Test for the hypothetical native Windows locale name.
16867           if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
16868             gt_cv_locale_fr_utf8=French_France.65001
16869           else
16870             # None found.
16871             gt_cv_locale_fr_utf8=none
16872           fi
16873           ;;
16874         *)
16875           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
16876           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
16877           # configure script would override the LC_ALL setting. Likewise for
16878           # LC_CTYPE, which is also set at the beginning of the configure script.
16879           # Test for the usual locale name.
16880           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
16881             gt_cv_locale_fr_utf8=fr_FR
16882           else
16883             # Test for the locale name with explicit encoding suffix.
16884             if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
16885               gt_cv_locale_fr_utf8=fr_FR.UTF-8
16886             else
16887               # Test for the Solaris 7 locale name.
16888               if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
16889                 gt_cv_locale_fr_utf8=fr.UTF-8
16890               else
16891                 # None found.
16892                 gt_cv_locale_fr_utf8=none
16893               fi
16894             fi
16895           fi
16896           ;;
16897       esac
16898     fi
16899     rm -fr conftest*
16900
16901 fi
16902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
16903 $as_echo "$gt_cv_locale_fr_utf8" >&6; }
16904   LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
16905
16906
16907
16908   GNULIB_FFSL=0;
16909   GNULIB_FFSLL=0;
16910   GNULIB_MEMCHR=0;
16911   GNULIB_MEMMEM=0;
16912   GNULIB_MEMPCPY=0;
16913   GNULIB_MEMRCHR=0;
16914   GNULIB_RAWMEMCHR=0;
16915   GNULIB_STPCPY=0;
16916   GNULIB_STPNCPY=0;
16917   GNULIB_STRCHRNUL=0;
16918   GNULIB_STRDUP=0;
16919   GNULIB_STRNCAT=0;
16920   GNULIB_STRNDUP=0;
16921   GNULIB_STRNLEN=0;
16922   GNULIB_STRPBRK=0;
16923   GNULIB_STRSEP=0;
16924   GNULIB_STRSTR=0;
16925   GNULIB_STRCASESTR=0;
16926   GNULIB_STRTOK_R=0;
16927   GNULIB_MBSLEN=0;
16928   GNULIB_MBSNLEN=0;
16929   GNULIB_MBSCHR=0;
16930   GNULIB_MBSRCHR=0;
16931   GNULIB_MBSSTR=0;
16932   GNULIB_MBSCASECMP=0;
16933   GNULIB_MBSNCASECMP=0;
16934   GNULIB_MBSPCASECMP=0;
16935   GNULIB_MBSCASESTR=0;
16936   GNULIB_MBSCSPN=0;
16937   GNULIB_MBSPBRK=0;
16938   GNULIB_MBSSPN=0;
16939   GNULIB_MBSSEP=0;
16940   GNULIB_MBSTOK_R=0;
16941   GNULIB_STRERROR=0;
16942   GNULIB_STRERROR_R=0;
16943   GNULIB_STRSIGNAL=0;
16944   GNULIB_STRVERSCMP=0;
16945   HAVE_MBSLEN=0;
16946     HAVE_FFSL=1;
16947   HAVE_FFSLL=1;
16948   HAVE_MEMCHR=1;
16949   HAVE_DECL_MEMMEM=1;
16950   HAVE_MEMPCPY=1;
16951   HAVE_DECL_MEMRCHR=1;
16952   HAVE_RAWMEMCHR=1;
16953   HAVE_STPCPY=1;
16954   HAVE_STPNCPY=1;
16955   HAVE_STRCHRNUL=1;
16956   HAVE_DECL_STRDUP=1;
16957   HAVE_DECL_STRNDUP=1;
16958   HAVE_DECL_STRNLEN=1;
16959   HAVE_STRPBRK=1;
16960   HAVE_STRSEP=1;
16961   HAVE_STRCASESTR=1;
16962   HAVE_DECL_STRTOK_R=1;
16963   HAVE_DECL_STRERROR_R=1;
16964   HAVE_DECL_STRSIGNAL=1;
16965   HAVE_STRVERSCMP=1;
16966   REPLACE_MEMCHR=0;
16967   REPLACE_MEMMEM=0;
16968   REPLACE_STPNCPY=0;
16969   REPLACE_STRDUP=0;
16970   REPLACE_STRSTR=0;
16971   REPLACE_STRCASESTR=0;
16972   REPLACE_STRCHRNUL=0;
16973   REPLACE_STRERROR=0;
16974   REPLACE_STRERROR_R=0;
16975   REPLACE_STRNCAT=0;
16976   REPLACE_STRNDUP=0;
16977   REPLACE_STRNLEN=0;
16978   REPLACE_STRSIGNAL=0;
16979   REPLACE_STRTOK_R=0;
16980   UNDEFINE_STRTOK_R=0;
16981
16982
16983
16984
16985
16986
16987
16988
16989
16990
16991
16992
16993
16994
16995
16996
16997
16998
16999
17000
17001   # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
17002   # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
17003   # irrelevant for anonymous mappings.
17004   ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
17005 if test "x$ac_cv_func_mmap" = xyes; then :
17006   gl_have_mmap=yes
17007 else
17008   gl_have_mmap=no
17009 fi
17010
17011
17012   # Try to allow MAP_ANONYMOUS.
17013   gl_have_mmap_anonymous=no
17014   if test $gl_have_mmap = yes; then
17015     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
17016 $as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
17017     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17018 /* end confdefs.h.  */
17019
17020 #include <sys/mman.h>
17021 #ifdef MAP_ANONYMOUS
17022     I cannot identify this map
17023 #endif
17024
17025 _ACEOF
17026 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17027   $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
17028   gl_have_mmap_anonymous=yes
17029 fi
17030 rm -f conftest*
17031
17032     if test $gl_have_mmap_anonymous != yes; then
17033       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17034 /* end confdefs.h.  */
17035
17036 #include <sys/mman.h>
17037 #ifdef MAP_ANON
17038     I cannot identify this map
17039 #endif
17040
17041 _ACEOF
17042 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17043   $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
17044
17045 $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
17046
17047          gl_have_mmap_anonymous=yes
17048 fi
17049 rm -f conftest*
17050
17051     fi
17052     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
17053 $as_echo "$gl_have_mmap_anonymous" >&6; }
17054     if test $gl_have_mmap_anonymous = yes; then
17055
17056 $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
17057
17058     fi
17059   fi
17060
17061
17062   :
17063
17064
17065
17066
17067
17068
17069   :
17070
17071
17072
17073
17074
17075
17076
17077
17078   if test $HAVE_MEMCHR = 1; then
17079     # Detect platform-specific bugs in some versions of glibc:
17080     # memchr should not dereference anything with length 0
17081     #   http://bugzilla.redhat.com/499689
17082     # memchr should not dereference overestimated length after a match
17083     #   http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
17084     #   http://sourceware.org/bugzilla/show_bug.cgi?id=10162
17085     # Assume that memchr works on platforms that lack mprotect.
17086     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
17087 $as_echo_n "checking whether memchr works... " >&6; }
17088 if ${gl_cv_func_memchr_works+:} false; then :
17089   $as_echo_n "(cached) " >&6
17090 else
17091   if test "$cross_compiling" = yes; then :
17092          gl_cv_func_memchr_works="guessing no"
17093 else
17094   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17095 /* end confdefs.h.  */
17096
17097 #include <string.h>
17098 #if HAVE_SYS_MMAN_H
17099 # include <fcntl.h>
17100 # include <unistd.h>
17101 # include <sys/types.h>
17102 # include <sys/mman.h>
17103 # ifndef MAP_FILE
17104 #  define MAP_FILE 0
17105 # endif
17106 #endif
17107
17108 int
17109 main ()
17110 {
17111
17112   int result = 0;
17113   char *fence = NULL;
17114 #if HAVE_SYS_MMAN_H && HAVE_MPROTECT
17115 # if HAVE_MAP_ANONYMOUS
17116   const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
17117   const int fd = -1;
17118 # else /* !HAVE_MAP_ANONYMOUS */
17119   const int flags = MAP_FILE | MAP_PRIVATE;
17120   int fd = open ("/dev/zero", O_RDONLY, 0666);
17121   if (fd >= 0)
17122 # endif
17123     {
17124       int pagesize = getpagesize ();
17125       char *two_pages =
17126         (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
17127                        flags, fd, 0);
17128       if (two_pages != (char *)(-1)
17129           && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
17130         fence = two_pages + pagesize;
17131     }
17132 #endif
17133   if (fence)
17134     {
17135       if (memchr (fence, 0, 0))
17136         result |= 1;
17137       strcpy (fence - 9, "12345678");
17138       if (memchr (fence - 9, 0, 79) != fence - 1)
17139         result |= 2;
17140       if (memchr (fence - 1, 0, 3) != fence - 1)
17141         result |= 4;
17142     }
17143   return result;
17144
17145   ;
17146   return 0;
17147 }
17148 _ACEOF
17149 if ac_fn_c_try_run "$LINENO"; then :
17150   gl_cv_func_memchr_works=yes
17151 else
17152   gl_cv_func_memchr_works=no
17153 fi
17154 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17155   conftest.$ac_objext conftest.beam conftest.$ac_ext
17156 fi
17157
17158 fi
17159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
17160 $as_echo "$gl_cv_func_memchr_works" >&6; }
17161     if test "$gl_cv_func_memchr_works" != yes; then
17162       REPLACE_MEMCHR=1
17163     fi
17164   fi
17165
17166
17167       ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default"
17168 if test "x$ac_cv_have_decl_memrchr" = xyes; then :
17169   ac_have_decl=1
17170 else
17171   ac_have_decl=0
17172 fi
17173
17174 cat >>confdefs.h <<_ACEOF
17175 #define HAVE_DECL_MEMRCHR $ac_have_decl
17176 _ACEOF
17177
17178
17179
17180   GNULIB_MKTIME=0;
17181   GNULIB_NANOSLEEP=0;
17182   GNULIB_STRPTIME=0;
17183   GNULIB_TIMEGM=0;
17184   GNULIB_TIME_R=0;
17185     HAVE_DECL_LOCALTIME_R=1;
17186   HAVE_NANOSLEEP=1;
17187   HAVE_STRPTIME=1;
17188   HAVE_TIMEGM=1;
17189         REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
17190   REPLACE_MKTIME=GNULIB_PORTCHECK;
17191   REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
17192   REPLACE_TIMEGM=GNULIB_PORTCHECK;
17193
17194       : ${GNULIB_GETTIMEOFDAY=0};
17195         REPLACE_GMTIME=0;
17196   REPLACE_LOCALTIME=0;
17197
17198
17199       ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
17200 if test "x$ac_cv_have_decl_alarm" = xyes; then :
17201   ac_have_decl=1
17202 else
17203   ac_have_decl=0
17204 fi
17205
17206 cat >>confdefs.h <<_ACEOF
17207 #define HAVE_DECL_ALARM $ac_have_decl
17208 _ACEOF
17209
17210
17211
17212
17213
17214
17215     ac_fn_c_check_decl "$LINENO" "trunc" "ac_cv_have_decl_trunc" "#include <math.h>
17216 "
17217 if test "x$ac_cv_have_decl_trunc" = xyes; then :
17218   ac_have_decl=1
17219 else
17220   ac_have_decl=0
17221 fi
17222
17223 cat >>confdefs.h <<_ACEOF
17224 #define HAVE_DECL_TRUNC $ac_have_decl
17225 _ACEOF
17226
17227   if test "$ac_cv_have_decl_trunc" = yes; then
17228         TRUNC_LIBM=?
17229     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17230 /* end confdefs.h.  */
17231 #ifndef __NO_MATH_INLINES
17232            # define __NO_MATH_INLINES 1 /* for glibc */
17233            #endif
17234            #include <math.h>
17235            double x;
17236 int
17237 main ()
17238 {
17239 x = trunc(x);
17240   ;
17241   return 0;
17242 }
17243 _ACEOF
17244 if ac_fn_c_try_link "$LINENO"; then :
17245   TRUNC_LIBM=
17246 fi
17247 rm -f core conftest.err conftest.$ac_objext \
17248     conftest$ac_exeext conftest.$ac_ext
17249     if test "$TRUNC_LIBM" = "?"; then
17250       save_LIBS="$LIBS"
17251       LIBS="$LIBS -lm"
17252       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17253 /* end confdefs.h.  */
17254 #ifndef __NO_MATH_INLINES
17255              # define __NO_MATH_INLINES 1 /* for glibc */
17256              #endif
17257              #include <math.h>
17258              double x;
17259 int
17260 main ()
17261 {
17262 x = trunc(x);
17263   ;
17264   return 0;
17265 }
17266 _ACEOF
17267 if ac_fn_c_try_link "$LINENO"; then :
17268   TRUNC_LIBM="-lm"
17269 fi
17270 rm -f core conftest.err conftest.$ac_objext \
17271     conftest$ac_exeext conftest.$ac_ext
17272       LIBS="$save_LIBS"
17273     fi
17274     if test "$TRUNC_LIBM" = "?"; then
17275       TRUNC_LIBM=
17276     fi
17277
17278   else
17279     HAVE_DECL_TRUNC=0
17280   fi
17281   if test $HAVE_DECL_TRUNC = 0 || test $REPLACE_TRUNC = 1; then
17282         TRUNC_LIBM=
17283   fi
17284
17285
17286
17287
17288
17289
17290
17291
17292
17293
17294
17295
17296 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
17297 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
17298 if ${ac_cv_header_stdbool_h+:} false; then :
17299   $as_echo_n "(cached) " >&6
17300 else
17301   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17302 /* end confdefs.h.  */
17303
17304              #include <stdbool.h>
17305              #ifndef bool
17306               "error: bool is not defined"
17307              #endif
17308              #ifndef false
17309               "error: false is not defined"
17310              #endif
17311              #if false
17312               "error: false is not 0"
17313              #endif
17314              #ifndef true
17315               "error: true is not defined"
17316              #endif
17317              #if true != 1
17318               "error: true is not 1"
17319              #endif
17320              #ifndef __bool_true_false_are_defined
17321               "error: __bool_true_false_are_defined is not defined"
17322              #endif
17323
17324              struct s { _Bool s: 1; _Bool t; } s;
17325
17326              char a[true == 1 ? 1 : -1];
17327              char b[false == 0 ? 1 : -1];
17328              char c[__bool_true_false_are_defined == 1 ? 1 : -1];
17329              char d[(bool) 0.5 == true ? 1 : -1];
17330              /* See body of main program for 'e'.  */
17331              char f[(_Bool) 0.0 == false ? 1 : -1];
17332              char g[true];
17333              char h[sizeof (_Bool)];
17334              char i[sizeof s.t];
17335              enum { j = false, k = true, l = false * true, m = true * 256 };
17336              /* The following fails for
17337                 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
17338              _Bool n[m];
17339              char o[sizeof n == m * sizeof n[0] ? 1 : -1];
17340              char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
17341              /* Catch a bug in an HP-UX C compiler.  See
17342                 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
17343                 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
17344               */
17345              _Bool q = true;
17346              _Bool *pq = &q;
17347
17348 int
17349 main ()
17350 {
17351
17352              bool e = &s;
17353              *pq |= q;
17354              *pq |= ! q;
17355              /* Refer to every declared value, to avoid compiler optimizations.  */
17356              return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
17357                      + !m + !n + !o + !p + !q + !pq);
17358
17359   ;
17360   return 0;
17361 }
17362 _ACEOF
17363 if ac_fn_c_try_compile "$LINENO"; then :
17364   ac_cv_header_stdbool_h=yes
17365 else
17366   ac_cv_header_stdbool_h=no
17367 fi
17368 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17369 fi
17370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
17371 $as_echo "$ac_cv_header_stdbool_h" >&6; }
17372    ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
17373 if test "x$ac_cv_type__Bool" = xyes; then :
17374
17375 cat >>confdefs.h <<_ACEOF
17376 #define HAVE__BOOL 1
17377 _ACEOF
17378
17379
17380 fi
17381
17382
17383
17384
17385
17386   # Define two additional variables used in the Makefile substitution.
17387
17388   if test "$ac_cv_header_stdbool_h" = yes; then
17389     STDBOOL_H=''
17390   else
17391     STDBOOL_H='stdbool.h'
17392   fi
17393
17394    if test -n "$STDBOOL_H"; then
17395   GL_GENERATE_STDBOOL_H_TRUE=
17396   GL_GENERATE_STDBOOL_H_FALSE='#'
17397 else
17398   GL_GENERATE_STDBOOL_H_TRUE='#'
17399   GL_GENERATE_STDBOOL_H_FALSE=
17400 fi
17401
17402
17403   if test "$ac_cv_type__Bool" = yes; then
17404     HAVE__BOOL=1
17405   else
17406     HAVE__BOOL=0
17407   fi
17408
17409
17410
17411   # parse-datetime.y works with bison only.
17412   : ${YACC='bison -y'}
17413
17414
17415   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compound literals" >&5
17416 $as_echo_n "checking for compound literals... " >&6; }
17417 if ${gl_cv_compound_literals+:} false; then :
17418   $as_echo_n "(cached) " >&6
17419 else
17420   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17421 /* end confdefs.h.  */
17422 struct s { int i, j; };
17423 int
17424 main ()
17425 {
17426 struct s t = (struct s) { 3, 4 };
17427         if (t.i != 0) return 0;
17428   ;
17429   return 0;
17430 }
17431 _ACEOF
17432 if ac_fn_c_try_compile "$LINENO"; then :
17433   gl_cv_compound_literals=yes
17434 else
17435   gl_cv_compound_literals=no
17436 fi
17437 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17438 fi
17439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compound_literals" >&5
17440 $as_echo "$gl_cv_compound_literals" >&6; }
17441   if test $gl_cv_compound_literals = yes; then
17442
17443 $as_echo "#define HAVE_COMPOUND_LITERALS 1" >>confdefs.h
17444
17445   fi
17446
17447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
17448 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
17449 if ${ac_cv_struct_tm+:} false; then :
17450   $as_echo_n "(cached) " >&6
17451 else
17452   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17453 /* end confdefs.h.  */
17454 #include <sys/types.h>
17455 #include <time.h>
17456
17457 int
17458 main ()
17459 {
17460 struct tm tm;
17461                                      int *p = &tm.tm_sec;
17462                                      return !p;
17463   ;
17464   return 0;
17465 }
17466 _ACEOF
17467 if ac_fn_c_try_compile "$LINENO"; then :
17468   ac_cv_struct_tm=time.h
17469 else
17470   ac_cv_struct_tm=sys/time.h
17471 fi
17472 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17473 fi
17474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
17475 $as_echo "$ac_cv_struct_tm" >&6; }
17476 if test $ac_cv_struct_tm = sys/time.h; then
17477
17478 $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
17479
17480 fi
17481
17482
17483  ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include <time.h>
17484 "
17485 if test "x$ac_cv_member_struct_tm_tm_gmtoff" = xyes; then :
17486
17487 $as_echo "#define HAVE_TM_GMTOFF 1" >>confdefs.h
17488
17489 fi
17490
17491
17492
17493      REPLACE_STRERROR_0=0
17494   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5
17495 $as_echo_n "checking whether strerror(0) succeeds... " >&6; }
17496 if ${gl_cv_func_strerror_0_works+:} false; then :
17497   $as_echo_n "(cached) " >&6
17498 else
17499   if test "$cross_compiling" = yes; then :
17500   case "$host_os" in
17501                  # Guess yes on glibc systems.
17502          *-gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
17503                  # If we don't know, assume the worst.
17504          *)      gl_cv_func_strerror_0_works="guessing no" ;;
17505        esac
17506
17507 else
17508   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17509 /* end confdefs.h.  */
17510 #include <string.h>
17511            #include <errno.h>
17512
17513 int
17514 main ()
17515 {
17516 int result = 0;
17517            char *str;
17518            errno = 0;
17519            str = strerror (0);
17520            if (!*str) result |= 1;
17521            if (errno) result |= 2;
17522            if (strstr (str, "nknown") || strstr (str, "ndefined"))
17523              result |= 4;
17524            return result;
17525   ;
17526   return 0;
17527 }
17528 _ACEOF
17529 if ac_fn_c_try_run "$LINENO"; then :
17530   gl_cv_func_strerror_0_works=yes
17531 else
17532   gl_cv_func_strerror_0_works=no
17533 fi
17534 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17535   conftest.$ac_objext conftest.beam conftest.$ac_ext
17536 fi
17537
17538
17539 fi
17540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5
17541 $as_echo "$gl_cv_func_strerror_0_works" >&6; }
17542   case "$gl_cv_func_strerror_0_works" in
17543     *yes) ;;
17544     *)
17545       REPLACE_STRERROR_0=1
17546
17547 $as_echo "#define REPLACE_STRERROR_0 1" >>confdefs.h
17548
17549       ;;
17550   esac
17551
17552
17553
17554
17555
17556
17557
17558
17559
17560
17561
17562
17563
17564
17565
17566
17567   :
17568
17569
17570
17571
17572
17573   if test $ac_cv_func_strerror_r = yes; then
17574     if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
17575                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strerror_r with POSIX signature" >&5
17576 $as_echo_n "checking for strerror_r with POSIX signature... " >&6; }
17577 if ${gl_cv_func_strerror_r_posix_signature+:} false; then :
17578   $as_echo_n "(cached) " >&6
17579 else
17580   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17581 /* end confdefs.h.  */
17582 #include <string.h>
17583                 int strerror_r (int, char *, size_t);
17584
17585 int
17586 main ()
17587 {
17588
17589   ;
17590   return 0;
17591 }
17592 _ACEOF
17593 if ac_fn_c_try_compile "$LINENO"; then :
17594   gl_cv_func_strerror_r_posix_signature=yes
17595 else
17596   gl_cv_func_strerror_r_posix_signature=no
17597 fi
17598 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17599
17600 fi
17601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_posix_signature" >&5
17602 $as_echo "$gl_cv_func_strerror_r_posix_signature" >&6; }
17603       if test $gl_cv_func_strerror_r_posix_signature = yes; then
17604                                                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r works" >&5
17605 $as_echo_n "checking whether strerror_r works... " >&6; }
17606 if ${gl_cv_func_strerror_r_works+:} false; then :
17607   $as_echo_n "(cached) " >&6
17608 else
17609   if test "$cross_compiling" = yes; then :
17610
17611               case "$host_os" in
17612                        # Guess no on AIX.
17613                 aix*)  gl_cv_func_strerror_r_works="guessing no";;
17614                        # Guess no on HP-UX.
17615                 hpux*) gl_cv_func_strerror_r_works="guessing no";;
17616                        # Guess no on BSD variants.
17617                 *bsd*)  gl_cv_func_strerror_r_works="guessing no";;
17618                        # Guess yes otherwise.
17619                 *)     gl_cv_func_strerror_r_works="guessing yes";;
17620               esac
17621
17622 else
17623   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17624 /* end confdefs.h.  */
17625 #include <errno.h>
17626                   #include <string.h>
17627
17628 int
17629 main ()
17630 {
17631 int result = 0;
17632                   char buf[79];
17633                   if (strerror_r (EACCES, buf, 0) < 0)
17634                     result |= 1;
17635                   errno = 0;
17636                   if (strerror_r (EACCES, buf, sizeof buf) != 0)
17637                     result |= 2;
17638                   strcpy (buf, "Unknown");
17639                   if (strerror_r (0, buf, sizeof buf) != 0)
17640                     result |= 4;
17641                   if (errno)
17642                     result |= 8;
17643                   if (strstr (buf, "nknown") || strstr (buf, "ndefined"))
17644                     result |= 0x10;
17645                   errno = 0;
17646                   *buf = 0;
17647                   if (strerror_r (-3, buf, sizeof buf) < 0)
17648                     result |= 0x20;
17649                   if (errno)
17650                     result |= 0x40;
17651                   if (!*buf)
17652                     result |= 0x80;
17653                   return result;
17654
17655   ;
17656   return 0;
17657 }
17658 _ACEOF
17659 if ac_fn_c_try_run "$LINENO"; then :
17660   gl_cv_func_strerror_r_works=yes
17661 else
17662   gl_cv_func_strerror_r_works=no
17663 fi
17664 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17665   conftest.$ac_objext conftest.beam conftest.$ac_ext
17666 fi
17667
17668
17669 fi
17670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
17671 $as_echo "$gl_cv_func_strerror_r_works" >&6; }
17672       else
17673
17674   :
17675
17676
17677
17678
17679
17680                         if test $ac_cv_func___xpg_strerror_r = yes; then
17681           { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __xpg_strerror_r works" >&5
17682 $as_echo_n "checking whether __xpg_strerror_r works... " >&6; }
17683 if ${gl_cv_func_strerror_r_works+:} false; then :
17684   $as_echo_n "(cached) " >&6
17685 else
17686   if test "$cross_compiling" = yes; then :
17687                                   gl_cv_func_strerror_r_works="guessing no"
17688
17689 else
17690   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17691 /* end confdefs.h.  */
17692 #include <errno.h>
17693                     #include <string.h>
17694                     extern
17695                     #ifdef __cplusplus
17696                     "C"
17697                     #endif
17698                     int __xpg_strerror_r(int, char *, size_t);
17699
17700 int
17701 main ()
17702 {
17703 int result = 0;
17704                     char buf[256] = "^";
17705                     char copy[256];
17706                     char *str = strerror (-1);
17707                     strcpy (copy, str);
17708                     if (__xpg_strerror_r (-2, buf, 1) == 0)
17709                       result |= 1;
17710                     if (*buf)
17711                       result |= 2;
17712                     __xpg_strerror_r (-2, buf, 256);
17713                     if (strcmp (str, copy))
17714                       result |= 4;
17715                     return result;
17716
17717   ;
17718   return 0;
17719 }
17720 _ACEOF
17721 if ac_fn_c_try_run "$LINENO"; then :
17722   gl_cv_func_strerror_r_works=yes
17723 else
17724   gl_cv_func_strerror_r_works=no
17725 fi
17726 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17727   conftest.$ac_objext conftest.beam conftest.$ac_ext
17728 fi
17729
17730
17731 fi
17732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
17733 $as_echo "$gl_cv_func_strerror_r_works" >&6; }
17734         fi
17735       fi
17736     fi
17737   fi
17738
17739
17740       ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
17741 if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
17742   ac_have_decl=1
17743 else
17744   ac_have_decl=0
17745 fi
17746
17747 cat >>confdefs.h <<_ACEOF
17748 #define HAVE_DECL_STRERROR_R $ac_have_decl
17749 _ACEOF
17750
17751
17752
17753
17754
17755
17756
17757
17758
17759   :
17760
17761
17762
17763
17764
17765   if test $ac_cv_have_decl_strerror_r = no; then
17766     HAVE_DECL_STRERROR_R=0
17767   fi
17768
17769   if test $ac_cv_func_strerror_r = yes; then
17770     if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
17771       if test $gl_cv_func_strerror_r_posix_signature = yes; then
17772         case "$gl_cv_func_strerror_r_works" in
17773                     *no) REPLACE_STRERROR_R=1 ;;
17774         esac
17775       else
17776                 REPLACE_STRERROR_R=1
17777       fi
17778     else
17779                   REPLACE_STRERROR_R=1
17780     fi
17781   fi
17782
17783
17784
17785
17786
17787
17788
17789
17790
17791
17792
17793
17794   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
17795 $as_echo_n "checking for ssize_t... " >&6; }
17796 if ${gt_cv_ssize_t+:} false; then :
17797   $as_echo_n "(cached) " >&6
17798 else
17799   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17800 /* end confdefs.h.  */
17801 #include <sys/types.h>
17802 int
17803 main ()
17804 {
17805 int x = sizeof (ssize_t *) + sizeof (ssize_t);
17806             return !x;
17807   ;
17808   return 0;
17809 }
17810 _ACEOF
17811 if ac_fn_c_try_compile "$LINENO"; then :
17812   gt_cv_ssize_t=yes
17813 else
17814   gt_cv_ssize_t=no
17815 fi
17816 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17817 fi
17818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
17819 $as_echo "$gt_cv_ssize_t" >&6; }
17820   if test $gt_cv_ssize_t = no; then
17821
17822 $as_echo "#define ssize_t int" >>confdefs.h
17823
17824   fi
17825
17826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long file names" >&5
17827 $as_echo_n "checking for long file names... " >&6; }
17828 if ${ac_cv_sys_long_file_names+:} false; then :
17829   $as_echo_n "(cached) " >&6
17830 else
17831   ac_cv_sys_long_file_names=yes
17832 # Test for long file names in all the places we know might matter:
17833 #      .                the current directory, where building will happen
17834 #      $prefix/lib      where we will be installing things
17835 #      $exec_prefix/lib likewise
17836 #      $TMPDIR          if set, where it might want to write temporary files
17837 #      /tmp             where it might want to write temporary files
17838 #      /var/tmp         likewise
17839 #      /usr/tmp         likewise
17840 for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do
17841   # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib
17842   # in the usual case where exec_prefix is '${prefix}'.
17843   case $ac_dir in #(
17844     . | /* | ?:[\\/]*) ;; #(
17845     *) continue;;
17846   esac
17847   test -w "$ac_dir/." || continue # It is less confusing to not echo anything here.
17848   ac_xdir=$ac_dir/cf$$
17849   (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
17850   ac_tf1=$ac_xdir/conftest9012345
17851   ac_tf2=$ac_xdir/conftest9012346
17852   touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" ||
17853     ac_cv_sys_long_file_names=no
17854   rm -f -r "$ac_xdir" 2>/dev/null
17855   test $ac_cv_sys_long_file_names = no && break
17856 done
17857 fi
17858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_long_file_names" >&5
17859 $as_echo "$ac_cv_sys_long_file_names" >&6; }
17860 if test $ac_cv_sys_long_file_names = yes; then
17861
17862 $as_echo "#define HAVE_LONG_FILE_NAMES 1" >>confdefs.h
17863
17864 fi
17865
17866
17867
17868
17869
17870
17871
17872
17873
17874
17875
17876 # Check whether --with-selinux was given.
17877 if test "${with_selinux+set}" = set; then :
17878   withval=$with_selinux;
17879 else
17880   with_selinux=maybe
17881 fi
17882
17883
17884   LIB_SELINUX=
17885   if test "$with_selinux" != no; then
17886     gl_save_LIBS=$LIBS
17887     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setfilecon" >&5
17888 $as_echo_n "checking for library containing setfilecon... " >&6; }
17889 if ${ac_cv_search_setfilecon+:} false; then :
17890   $as_echo_n "(cached) " >&6
17891 else
17892   ac_func_search_save_LIBS=$LIBS
17893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17894 /* end confdefs.h.  */
17895
17896 /* Override any GCC internal prototype to avoid an error.
17897    Use char because int might match the return type of a GCC
17898    builtin and then its argument prototype would still apply.  */
17899 #ifdef __cplusplus
17900 extern "C"
17901 #endif
17902 char setfilecon ();
17903 int
17904 main ()
17905 {
17906 return setfilecon ();
17907   ;
17908   return 0;
17909 }
17910 _ACEOF
17911 for ac_lib in '' selinux; do
17912   if test -z "$ac_lib"; then
17913     ac_res="none required"
17914   else
17915     ac_res=-l$ac_lib
17916     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17917   fi
17918   if ac_fn_c_try_link "$LINENO"; then :
17919   ac_cv_search_setfilecon=$ac_res
17920 fi
17921 rm -f core conftest.err conftest.$ac_objext \
17922     conftest$ac_exeext
17923   if ${ac_cv_search_setfilecon+:} false; then :
17924   break
17925 fi
17926 done
17927 if ${ac_cv_search_setfilecon+:} false; then :
17928
17929 else
17930   ac_cv_search_setfilecon=no
17931 fi
17932 rm conftest.$ac_ext
17933 LIBS=$ac_func_search_save_LIBS
17934 fi
17935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setfilecon" >&5
17936 $as_echo "$ac_cv_search_setfilecon" >&6; }
17937 ac_res=$ac_cv_search_setfilecon
17938 if test "$ac_res" != no; then :
17939   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17940   test "$ac_cv_search_setfilecon" = "none required" ||
17941                     LIB_SELINUX=$ac_cv_search_setfilecon
17942 fi
17943
17944     LIBS=$gl_save_LIBS
17945   fi
17946
17947
17948   # Warn if SELinux is found but libselinux is absent;
17949   if test "$ac_cv_search_setfilecon" = no; then
17950     if test "$host" = "$build" && test -d /selinux; then
17951       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This system supports SELinux but libselinux is missing." >&5
17952 $as_echo "$as_me: WARNING: This system supports SELinux but libselinux is missing." >&2;}
17953       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GNU findutils will be compiled without SELinux support." >&5
17954 $as_echo "$as_me: WARNING: GNU findutils will be compiled without SELinux support." >&2;}
17955     fi
17956     with_selinux=no
17957   fi
17958
17959
17960
17961
17962
17963
17964
17965       ac_fn_c_check_decl "$LINENO" "setenv" "ac_cv_have_decl_setenv" "$ac_includes_default"
17966 if test "x$ac_cv_have_decl_setenv" = xyes; then :
17967   ac_have_decl=1
17968 else
17969   ac_have_decl=0
17970 fi
17971
17972 cat >>confdefs.h <<_ACEOF
17973 #define HAVE_DECL_SETENV $ac_have_decl
17974 _ACEOF
17975
17976
17977
17978
17979
17980
17981
17982
17983
17984
17985   :
17986
17987
17988
17989
17990
17991   if test $ac_cv_have_decl_setenv = no; then
17992     HAVE_DECL_SETENV=0
17993   fi
17994
17995   :
17996
17997
17998
17999
18000
18001
18002
18003
18004
18005   :
18006
18007
18008
18009
18010
18011   for ac_header in search.h
18012 do :
18013   ac_fn_c_check_header_mongrel "$LINENO" "search.h" "ac_cv_header_search_h" "$ac_includes_default"
18014 if test "x$ac_cv_header_search_h" = xyes; then :
18015   cat >>confdefs.h <<_ACEOF
18016 #define HAVE_SEARCH_H 1
18017 _ACEOF
18018
18019 fi
18020
18021 done
18022
18023   for ac_func in tsearch
18024 do :
18025   ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch"
18026 if test "x$ac_cv_func_tsearch" = xyes; then :
18027   cat >>confdefs.h <<_ACEOF
18028 #define HAVE_TSEARCH 1
18029 _ACEOF
18030
18031 fi
18032 done
18033
18034
18035
18036
18037
18038
18039
18040
18041
18042
18043   :
18044
18045
18046
18047
18048
18049
18050
18051
18052
18053   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf returns a byte count as in C99" >&5
18054 $as_echo_n "checking whether snprintf returns a byte count as in C99... " >&6; }
18055 if ${gl_cv_func_snprintf_retval_c99+:} false; then :
18056   $as_echo_n "(cached) " >&6
18057 else
18058
18059       if test "$cross_compiling" = yes; then :
18060
18061          case "$host_os" in
18062                                  # Guess yes on glibc systems.
18063            *-gnu*)               gl_cv_func_snprintf_retval_c99="guessing yes";;
18064                                  # Guess yes on FreeBSD >= 5.
18065            freebsd[1-4]*)        gl_cv_func_snprintf_retval_c99="guessing no";;
18066            freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
18067                                  # Guess yes on Mac OS X >= 10.3.
18068            darwin[1-6].*)        gl_cv_func_snprintf_retval_c99="guessing no";;
18069            darwin*)              gl_cv_func_snprintf_retval_c99="guessing yes";;
18070                                  # Guess yes on OpenBSD >= 3.9.
18071            openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
18072                                  gl_cv_func_snprintf_retval_c99="guessing no";;
18073            openbsd*)             gl_cv_func_snprintf_retval_c99="guessing yes";;
18074                                  # Guess yes on Solaris >= 2.10.
18075            solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";;
18076            solaris*)             gl_cv_func_printf_sizes_c99="guessing no";;
18077                                  # Guess yes on AIX >= 4.
18078            aix[1-3]*)            gl_cv_func_snprintf_retval_c99="guessing no";;
18079            aix*)                 gl_cv_func_snprintf_retval_c99="guessing yes";;
18080                                  # Guess yes on NetBSD >= 3.
18081            netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
18082                                  gl_cv_func_snprintf_retval_c99="guessing no";;
18083            netbsd*)              gl_cv_func_snprintf_retval_c99="guessing yes";;
18084                                  # Guess yes on BeOS.
18085            beos*)                gl_cv_func_snprintf_retval_c99="guessing yes";;
18086                                  # If we don't know, assume the worst.
18087            *)                    gl_cv_func_snprintf_retval_c99="guessing no";;
18088          esac
18089
18090 else
18091   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18092 /* end confdefs.h.  */
18093
18094 #include <stdio.h>
18095 #include <string.h>
18096 #if HAVE_SNPRINTF
18097 # define my_snprintf snprintf
18098 #else
18099 # include <stdarg.h>
18100 static int my_snprintf (char *buf, int size, const char *format, ...)
18101 {
18102   va_list args;
18103   int ret;
18104   va_start (args, format);
18105   ret = vsnprintf (buf, size, format, args);
18106   va_end (args);
18107   return ret;
18108 }
18109 #endif
18110 static char buf[100];
18111 int main ()
18112 {
18113   strcpy (buf, "ABCDEF");
18114   if (my_snprintf (buf, 3, "%d %d", 4567, 89) != 7)
18115     return 1;
18116   if (my_snprintf (buf, 0, "%d %d", 4567, 89) != 7)
18117     return 2;
18118   if (my_snprintf (NULL, 0, "%d %d", 4567, 89) != 7)
18119     return 3;
18120   return 0;
18121 }
18122 _ACEOF
18123 if ac_fn_c_try_run "$LINENO"; then :
18124   gl_cv_func_snprintf_retval_c99=yes
18125 else
18126   gl_cv_func_snprintf_retval_c99=no
18127 fi
18128 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18129   conftest.$ac_objext conftest.beam conftest.$ac_ext
18130 fi
18131
18132
18133 fi
18134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_retval_c99" >&5
18135 $as_echo "$gl_cv_func_snprintf_retval_c99" >&6; }
18136
18137
18138       ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
18139 if test "x$ac_cv_have_decl_snprintf" = xyes; then :
18140   ac_have_decl=1
18141 else
18142   ac_have_decl=0
18143 fi
18144
18145 cat >>confdefs.h <<_ACEOF
18146 #define HAVE_DECL_SNPRINTF $ac_have_decl
18147 _ACEOF
18148
18149
18150
18151   :
18152
18153
18154
18155
18156
18157    if test $ac_cv_header_sys_socket_h = no; then
18158                          for ac_header in ws2tcpip.h
18159 do :
18160   ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default"
18161 if test "x$ac_cv_header_ws2tcpip_h" = xyes; then :
18162   cat >>confdefs.h <<_ACEOF
18163 #define HAVE_WS2TCPIP_H 1
18164 _ACEOF
18165
18166 fi
18167
18168 done
18169
18170    fi
18171
18172
18173   GNULIB_FFS=0;
18174     HAVE_FFS=1;
18175   HAVE_STRCASECMP=1;
18176   HAVE_DECL_STRNCASECMP=1;
18177
18178
18179
18180
18181
18182
18183
18184   for ac_func in strcasestr
18185 do :
18186   ac_fn_c_check_func "$LINENO" "strcasestr" "ac_cv_func_strcasestr"
18187 if test "x$ac_cv_func_strcasestr" = xyes; then :
18188   cat >>confdefs.h <<_ACEOF
18189 #define HAVE_STRCASESTR 1
18190 _ACEOF
18191
18192 fi
18193 done
18194
18195   if test $ac_cv_func_strcasestr = no; then
18196     HAVE_STRCASESTR=0
18197   else
18198     if test "$gl_cv_func_memchr_works" != yes; then
18199       REPLACE_STRCASESTR=1
18200     else
18201             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strcasestr works" >&5
18202 $as_echo_n "checking whether strcasestr works... " >&6; }
18203 if ${gl_cv_func_strcasestr_works_always+:} false; then :
18204   $as_echo_n "(cached) " >&6
18205 else
18206   if test "$cross_compiling" = yes; then :
18207                                                          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18208 /* end confdefs.h.  */
18209
18210 #ifdef __GNU_LIBRARY__
18211  #include <features.h>
18212  #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
18213      || defined __UCLIBC__
18214   Lucky user
18215  #endif
18216 #elif defined __CYGWIN__
18217  #include <cygwin/version.h>
18218  #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
18219   Lucky user
18220  #endif
18221 #else
18222   Lucky user
18223 #endif
18224
18225 _ACEOF
18226 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18227   $EGREP "Lucky user" >/dev/null 2>&1; then :
18228   gl_cv_func_strcasestr_works_always="guessing yes"
18229 else
18230   gl_cv_func_strcasestr_works_always="guessing no"
18231 fi
18232 rm -f conftest*
18233
18234
18235 else
18236   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18237 /* end confdefs.h.  */
18238
18239 #include <string.h> /* for strcasestr */
18240 #define P "_EF_BF_BD"
18241 #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
18242 #define NEEDLE P P P P P
18243
18244 int
18245 main ()
18246 {
18247 return !!strcasestr (HAYSTACK, NEEDLE);
18248
18249   ;
18250   return 0;
18251 }
18252 _ACEOF
18253 if ac_fn_c_try_run "$LINENO"; then :
18254   gl_cv_func_strcasestr_works_always=yes
18255 else
18256   gl_cv_func_strcasestr_works_always=no
18257 fi
18258 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18259   conftest.$ac_objext conftest.beam conftest.$ac_ext
18260 fi
18261
18262
18263 fi
18264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strcasestr_works_always" >&5
18265 $as_echo "$gl_cv_func_strcasestr_works_always" >&6; }
18266       case "$gl_cv_func_strcasestr_works_always" in
18267         *yes) ;;
18268         *)
18269           REPLACE_STRCASESTR=1
18270           ;;
18271       esac
18272     fi
18273   fi
18274
18275
18276
18277
18278
18279
18280
18281       ac_fn_c_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default"
18282 if test "x$ac_cv_have_decl_strdup" = xyes; then :
18283   ac_have_decl=1
18284 else
18285   ac_have_decl=0
18286 fi
18287
18288 cat >>confdefs.h <<_ACEOF
18289 #define HAVE_DECL_STRDUP $ac_have_decl
18290 _ACEOF
18291
18292
18293
18294
18295
18296
18297
18298
18299
18300
18301
18302
18303
18304
18305
18306
18307
18308
18309
18310
18311
18312
18313
18314      if test $gl_cv_have_include_next = yes; then
18315        gl_cv_next_string_h='<'string.h'>'
18316      else
18317        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
18318 $as_echo_n "checking absolute name of <string.h>... " >&6; }
18319 if ${gl_cv_next_string_h+:} false; then :
18320   $as_echo_n "(cached) " >&6
18321 else
18322
18323
18324
18325   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18326 /* end confdefs.h.  */
18327 #include <string.h>
18328 _ACEOF
18329                 case "$host_os" in
18330     aix*) gl_absname_cpp="$ac_cpp -C" ;;
18331     *)    gl_absname_cpp="$ac_cpp" ;;
18332   esac
18333
18334   case "$host_os" in
18335     mingw*)
18336                                           gl_dirsep_regex='[/\\]'
18337       ;;
18338     *)
18339       gl_dirsep_regex='\/'
18340       ;;
18341   esac
18342       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18343   gl_header_literal_regex=`echo 'string.h' \
18344                            | sed -e "$gl_make_literal_regex_sed"`
18345   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18346       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18347       s|^/[^/]|//&|
18348       p
18349       q
18350     }'
18351
18352         gl_cv_absolute_string_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18353   sed -n "$gl_absolute_header_sed"`
18354
18355            gl_header=$gl_cv_absolute_string_h
18356            gl_cv_next_string_h='"'$gl_header'"'
18357
18358
18359 fi
18360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
18361 $as_echo "$gl_cv_next_string_h" >&6; }
18362      fi
18363      NEXT_STRING_H=$gl_cv_next_string_h
18364
18365      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18366        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18367        gl_next_as_first_directive='<'string.h'>'
18368      else
18369        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18370        gl_next_as_first_directive=$gl_cv_next_string_h
18371      fi
18372      NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
18373
18374
18375
18376
18377
18378
18379     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
18380     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
18381     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
18382 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
18383 if eval \${$as_gl_Symbol+:} false; then :
18384   $as_echo_n "(cached) " >&6
18385 else
18386   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18387 /* end confdefs.h.  */
18388 #include <string.h>
18389
18390 int
18391 main ()
18392 {
18393 #undef $gl_func
18394   (void) $gl_func;
18395   ;
18396   return 0;
18397 }
18398 _ACEOF
18399 if ac_fn_c_try_compile "$LINENO"; then :
18400   eval "$as_gl_Symbol=yes"
18401 else
18402   eval "$as_gl_Symbol=no"
18403 fi
18404 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18405 fi
18406 eval ac_res=\$$as_gl_Symbol
18407                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18408 $as_echo "$ac_res" >&6; }
18409     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
18410   cat >>confdefs.h <<_ACEOF
18411 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
18412 _ACEOF
18413
18414                      eval ac_cv_have_decl_$gl_func=yes
18415 fi
18416       done
18417
18418
18419
18420
18421
18422
18423
18424
18425
18426
18427
18428
18429
18430
18431
18432
18433   :
18434
18435
18436
18437
18438
18439
18440
18441
18442      if test $gl_cv_have_include_next = yes; then
18443        gl_cv_next_strings_h='<'strings.h'>'
18444      else
18445        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <strings.h>" >&5
18446 $as_echo_n "checking absolute name of <strings.h>... " >&6; }
18447 if ${gl_cv_next_strings_h+:} false; then :
18448   $as_echo_n "(cached) " >&6
18449 else
18450
18451              if test $ac_cv_header_strings_h = yes; then
18452
18453
18454
18455
18456   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18457 /* end confdefs.h.  */
18458 #include <strings.h>
18459 _ACEOF
18460                 case "$host_os" in
18461     aix*) gl_absname_cpp="$ac_cpp -C" ;;
18462     *)    gl_absname_cpp="$ac_cpp" ;;
18463   esac
18464
18465   case "$host_os" in
18466     mingw*)
18467                                           gl_dirsep_regex='[/\\]'
18468       ;;
18469     *)
18470       gl_dirsep_regex='\/'
18471       ;;
18472   esac
18473       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18474   gl_header_literal_regex=`echo 'strings.h' \
18475                            | sed -e "$gl_make_literal_regex_sed"`
18476   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18477       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18478       s|^/[^/]|//&|
18479       p
18480       q
18481     }'
18482
18483         gl_cv_absolute_strings_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18484   sed -n "$gl_absolute_header_sed"`
18485
18486            gl_header=$gl_cv_absolute_strings_h
18487            gl_cv_next_strings_h='"'$gl_header'"'
18488           else
18489                gl_cv_next_strings_h='<'strings.h'>'
18490              fi
18491
18492
18493 fi
18494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_strings_h" >&5
18495 $as_echo "$gl_cv_next_strings_h" >&6; }
18496      fi
18497      NEXT_STRINGS_H=$gl_cv_next_strings_h
18498
18499      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18500        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18501        gl_next_as_first_directive='<'strings.h'>'
18502      else
18503        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18504        gl_next_as_first_directive=$gl_cv_next_strings_h
18505      fi
18506      NEXT_AS_FIRST_DIRECTIVE_STRINGS_H=$gl_next_as_first_directive
18507
18508
18509
18510
18511   if test $ac_cv_header_strings_h = yes; then
18512     HAVE_STRINGS_H=1
18513   else
18514     HAVE_STRINGS_H=0
18515   fi
18516
18517
18518
18519     for gl_func in ffs strcasecmp strncasecmp; do
18520     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
18521     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
18522 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
18523 if eval \${$as_gl_Symbol+:} false; then :
18524   $as_echo_n "(cached) " >&6
18525 else
18526   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18527 /* end confdefs.h.  */
18528
18529     /* Minix 3.1.8 has a bug: <sys/types.h> must be included before
18530        <strings.h>.  */
18531     #include <sys/types.h>
18532     #include <strings.h>
18533
18534 int
18535 main ()
18536 {
18537 #undef $gl_func
18538   (void) $gl_func;
18539   ;
18540   return 0;
18541 }
18542 _ACEOF
18543 if ac_fn_c_try_compile "$LINENO"; then :
18544   eval "$as_gl_Symbol=yes"
18545 else
18546   eval "$as_gl_Symbol=no"
18547 fi
18548 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18549 fi
18550 eval ac_res=\$$as_gl_Symbol
18551                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18552 $as_echo "$ac_res" >&6; }
18553     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
18554   cat >>confdefs.h <<_ACEOF
18555 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
18556 _ACEOF
18557
18558                      eval ac_cv_have_decl_$gl_func=yes
18559 fi
18560       done
18561
18562
18563
18564       ac_fn_c_check_decl "$LINENO" "strndup" "ac_cv_have_decl_strndup" "$ac_includes_default"
18565 if test "x$ac_cv_have_decl_strndup" = xyes; then :
18566   ac_have_decl=1
18567 else
18568   ac_have_decl=0
18569 fi
18570
18571 cat >>confdefs.h <<_ACEOF
18572 #define HAVE_DECL_STRNDUP $ac_have_decl
18573 _ACEOF
18574
18575
18576
18577
18578
18579
18580
18581
18582       ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
18583 if test "x$ac_cv_have_decl_strnlen" = xyes; then :
18584   ac_have_decl=1
18585 else
18586   ac_have_decl=0
18587 fi
18588
18589 cat >>confdefs.h <<_ACEOF
18590 #define HAVE_DECL_STRNLEN $ac_have_decl
18591 _ACEOF
18592
18593
18594
18595
18596
18597   if test "$gl_cv_func_memchr_works" != yes; then
18598     REPLACE_STRSTR=1
18599   else
18600         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
18601 $as_echo_n "checking whether strstr works... " >&6; }
18602 if ${gl_cv_func_strstr_works_always+:} false; then :
18603   $as_echo_n "(cached) " >&6
18604 else
18605   if test "$cross_compiling" = yes; then :
18606                                                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18607 /* end confdefs.h.  */
18608
18609 #ifdef __GNU_LIBRARY__
18610  #include <features.h>
18611  #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
18612      || defined __UCLIBC__
18613   Lucky user
18614  #endif
18615 #elif defined __CYGWIN__
18616  #include <cygwin/version.h>
18617  #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
18618   Lucky user
18619  #endif
18620 #else
18621   Lucky user
18622 #endif
18623
18624 _ACEOF
18625 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18626   $EGREP "Lucky user" >/dev/null 2>&1; then :
18627   gl_cv_func_strstr_works_always="guessing yes"
18628 else
18629   gl_cv_func_strstr_works_always="guessing no"
18630 fi
18631 rm -f conftest*
18632
18633
18634 else
18635   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18636 /* end confdefs.h.  */
18637
18638 #include <string.h> /* for strstr */
18639 #define P "_EF_BF_BD"
18640 #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
18641 #define NEEDLE P P P P P
18642
18643 int
18644 main ()
18645 {
18646 return !!strstr (HAYSTACK, NEEDLE);
18647
18648   ;
18649   return 0;
18650 }
18651 _ACEOF
18652 if ac_fn_c_try_run "$LINENO"; then :
18653   gl_cv_func_strstr_works_always=yes
18654 else
18655   gl_cv_func_strstr_works_always=no
18656 fi
18657 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18658   conftest.$ac_objext conftest.beam conftest.$ac_ext
18659 fi
18660
18661
18662 fi
18663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
18664 $as_echo "$gl_cv_func_strstr_works_always" >&6; }
18665     case "$gl_cv_func_strstr_works_always" in
18666       *yes) ;;
18667       *)
18668         REPLACE_STRSTR=1
18669         ;;
18670     esac
18671   fi
18672
18673
18674
18675
18676
18677
18678
18679       ac_fn_c_check_decl "$LINENO" "strtoumax" "ac_cv_have_decl_strtoumax" "$ac_includes_default"
18680 if test "x$ac_cv_have_decl_strtoumax" = xyes; then :
18681   ac_have_decl=1
18682 else
18683   ac_have_decl=0
18684 fi
18685
18686 cat >>confdefs.h <<_ACEOF
18687 #define HAVE_DECL_STRTOUMAX $ac_have_decl
18688 _ACEOF
18689
18690
18691
18692   GNULIB_SOCKET=0;
18693   GNULIB_CONNECT=0;
18694   GNULIB_ACCEPT=0;
18695   GNULIB_BIND=0;
18696   GNULIB_GETPEERNAME=0;
18697   GNULIB_GETSOCKNAME=0;
18698   GNULIB_GETSOCKOPT=0;
18699   GNULIB_LISTEN=0;
18700   GNULIB_RECV=0;
18701   GNULIB_SEND=0;
18702   GNULIB_RECVFROM=0;
18703   GNULIB_SENDTO=0;
18704   GNULIB_SETSOCKOPT=0;
18705   GNULIB_SHUTDOWN=0;
18706   GNULIB_ACCEPT4=0;
18707   HAVE_STRUCT_SOCKADDR_STORAGE=1;
18708   HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=1;
18709
18710   HAVE_SA_FAMILY_T=1;
18711   HAVE_ACCEPT4=1;
18712
18713
18714
18715
18716
18717
18718
18719
18720
18721   GNULIB_UNAME=0;
18722     HAVE_UNAME=1;
18723   HAVE_STRUCT_UTSNAME=1;
18724
18725
18726
18727
18728
18729
18730
18731   GNULIB_WAITPID=0;
18732
18733
18734
18735
18736
18737
18738
18739
18740   :
18741
18742
18743
18744
18745
18746   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
18747 $as_echo_n "checking for struct timespec in <time.h>... " >&6; }
18748 if ${gl_cv_sys_struct_timespec_in_time_h+:} false; then :
18749   $as_echo_n "(cached) " >&6
18750 else
18751   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18752 /* end confdefs.h.  */
18753 #include <time.h>
18754
18755 int
18756 main ()
18757 {
18758 static struct timespec x; x.tv_sec = x.tv_nsec;
18759   ;
18760   return 0;
18761 }
18762 _ACEOF
18763 if ac_fn_c_try_compile "$LINENO"; then :
18764   gl_cv_sys_struct_timespec_in_time_h=yes
18765 else
18766   gl_cv_sys_struct_timespec_in_time_h=no
18767 fi
18768 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18769 fi
18770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
18771 $as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
18772
18773   TIME_H_DEFINES_STRUCT_TIMESPEC=0
18774   SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
18775   PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
18776   if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
18777     TIME_H_DEFINES_STRUCT_TIMESPEC=1
18778   else
18779     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
18780 $as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
18781 if ${gl_cv_sys_struct_timespec_in_sys_time_h+:} false; then :
18782   $as_echo_n "(cached) " >&6
18783 else
18784   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18785 /* end confdefs.h.  */
18786 #include <sys/time.h>
18787
18788 int
18789 main ()
18790 {
18791 static struct timespec x; x.tv_sec = x.tv_nsec;
18792   ;
18793   return 0;
18794 }
18795 _ACEOF
18796 if ac_fn_c_try_compile "$LINENO"; then :
18797   gl_cv_sys_struct_timespec_in_sys_time_h=yes
18798 else
18799   gl_cv_sys_struct_timespec_in_sys_time_h=no
18800 fi
18801 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18802 fi
18803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
18804 $as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
18805     if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
18806       SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
18807     else
18808       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
18809 $as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
18810 if ${gl_cv_sys_struct_timespec_in_pthread_h+:} false; then :
18811   $as_echo_n "(cached) " >&6
18812 else
18813   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18814 /* end confdefs.h.  */
18815 #include <pthread.h>
18816
18817 int
18818 main ()
18819 {
18820 static struct timespec x; x.tv_sec = x.tv_nsec;
18821   ;
18822   return 0;
18823 }
18824 _ACEOF
18825 if ac_fn_c_try_compile "$LINENO"; then :
18826   gl_cv_sys_struct_timespec_in_pthread_h=yes
18827 else
18828   gl_cv_sys_struct_timespec_in_pthread_h=no
18829 fi
18830 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18831 fi
18832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
18833 $as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
18834       if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
18835         PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
18836       fi
18837     fi
18838   fi
18839
18840
18841
18842
18843
18844
18845
18846
18847
18848
18849
18850
18851
18852
18853
18854      if test $gl_cv_have_include_next = yes; then
18855        gl_cv_next_time_h='<'time.h'>'
18856      else
18857        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
18858 $as_echo_n "checking absolute name of <time.h>... " >&6; }
18859 if ${gl_cv_next_time_h+:} false; then :
18860   $as_echo_n "(cached) " >&6
18861 else
18862
18863
18864
18865   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18866 /* end confdefs.h.  */
18867 #include <time.h>
18868 _ACEOF
18869                 case "$host_os" in
18870     aix*) gl_absname_cpp="$ac_cpp -C" ;;
18871     *)    gl_absname_cpp="$ac_cpp" ;;
18872   esac
18873
18874   case "$host_os" in
18875     mingw*)
18876                                           gl_dirsep_regex='[/\\]'
18877       ;;
18878     *)
18879       gl_dirsep_regex='\/'
18880       ;;
18881   esac
18882       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18883   gl_header_literal_regex=`echo 'time.h' \
18884                            | sed -e "$gl_make_literal_regex_sed"`
18885   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18886       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18887       s|^/[^/]|//&|
18888       p
18889       q
18890     }'
18891
18892         gl_cv_absolute_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18893   sed -n "$gl_absolute_header_sed"`
18894
18895            gl_header=$gl_cv_absolute_time_h
18896            gl_cv_next_time_h='"'$gl_header'"'
18897
18898
18899 fi
18900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
18901 $as_echo "$gl_cv_next_time_h" >&6; }
18902      fi
18903      NEXT_TIME_H=$gl_cv_next_time_h
18904
18905      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18906        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18907        gl_next_as_first_directive='<'time.h'>'
18908      else
18909        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18910        gl_next_as_first_directive=$gl_cv_next_time_h
18911      fi
18912      NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
18913
18914
18915
18916
18917
18918
18919
18920
18921
18922
18923
18924
18925
18926
18927
18928
18929
18930
18931
18932
18933
18934
18935 gl_libunistring_sed_extract_major='/^[0-9]/{s/^\([0-9]*\).*/\1/p;q;}
18936 i\
18937 0
18938 q
18939 '
18940 gl_libunistring_sed_extract_minor='/^[0-9][0-9]*[.][0-9]/{s/^[0-9]*[.]\([0-9]*\).*/\1/p;q;}
18941 i\
18942 0
18943 q
18944 '
18945 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;}
18946 i\
18947 0
18948 q
18949 '
18950
18951
18952   if test "$HAVE_LIBUNISTRING" = yes; then
18953     LIBUNISTRING_VERSION_MAJOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_major"`
18954     LIBUNISTRING_VERSION_MINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_minor"`
18955     LIBUNISTRING_VERSION_SUBMINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_subminor"`
18956   fi
18957
18958
18959
18960
18961
18962
18963
18964       ac_fn_c_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default"
18965 if test "x$ac_cv_have_decl_unsetenv" = xyes; then :
18966   ac_have_decl=1
18967 else
18968   ac_have_decl=0
18969 fi
18970
18971 cat >>confdefs.h <<_ACEOF
18972 #define HAVE_DECL_UNSETENV $ac_have_decl
18973 _ACEOF
18974
18975
18976
18977
18978
18979
18980
18981
18982
18983
18984
18985
18986
18987
18988   :
18989
18990
18991
18992
18993
18994   if test $ac_cv_header_features_h = yes; then
18995     HAVE_FEATURES_H=1
18996   else
18997     HAVE_FEATURES_H=0
18998   fi
18999
19000
19001
19002   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5
19003 $as_echo_n "checking for inttypes.h... " >&6; }
19004 if ${gl_cv_header_inttypes_h+:} false; then :
19005   $as_echo_n "(cached) " >&6
19006 else
19007   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19008 /* end confdefs.h.  */
19009
19010 #include <sys/types.h>
19011 #include <inttypes.h>
19012
19013 int
19014 main ()
19015 {
19016 uintmax_t i = (uintmax_t) -1; return !i;
19017   ;
19018   return 0;
19019 }
19020 _ACEOF
19021 if ac_fn_c_try_compile "$LINENO"; then :
19022   gl_cv_header_inttypes_h=yes
19023 else
19024   gl_cv_header_inttypes_h=no
19025 fi
19026 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19027 fi
19028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_inttypes_h" >&5
19029 $as_echo "$gl_cv_header_inttypes_h" >&6; }
19030   if test $gl_cv_header_inttypes_h = yes; then
19031
19032 cat >>confdefs.h <<_ACEOF
19033 #define HAVE_INTTYPES_H_WITH_UINTMAX 1
19034 _ACEOF
19035
19036   fi
19037
19038
19039   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint.h" >&5
19040 $as_echo_n "checking for stdint.h... " >&6; }
19041 if ${gl_cv_header_stdint_h+:} false; then :
19042   $as_echo_n "(cached) " >&6
19043 else
19044   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19045 /* end confdefs.h.  */
19046 #include <sys/types.h>
19047             #include <stdint.h>
19048 int
19049 main ()
19050 {
19051 uintmax_t i = (uintmax_t) -1; return !i;
19052   ;
19053   return 0;
19054 }
19055 _ACEOF
19056 if ac_fn_c_try_compile "$LINENO"; then :
19057   gl_cv_header_stdint_h=yes
19058 else
19059   gl_cv_header_stdint_h=no
19060 fi
19061 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19062 fi
19063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_h" >&5
19064 $as_echo "$gl_cv_header_stdint_h" >&6; }
19065   if test $gl_cv_header_stdint_h = yes; then
19066
19067 cat >>confdefs.h <<_ACEOF
19068 #define HAVE_STDINT_H_WITH_UINTMAX 1
19069 _ACEOF
19070
19071   fi
19072
19073
19074
19075
19076   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intmax_t" >&5
19077 $as_echo_n "checking for intmax_t... " >&6; }
19078 if ${gt_cv_c_intmax_t+:} false; then :
19079   $as_echo_n "(cached) " >&6
19080 else
19081   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19082 /* end confdefs.h.  */
19083
19084 #include <stddef.h>
19085 #include <stdlib.h>
19086 #if HAVE_STDINT_H_WITH_UINTMAX
19087 #include <stdint.h>
19088 #endif
19089 #if HAVE_INTTYPES_H_WITH_UINTMAX
19090 #include <inttypes.h>
19091 #endif
19092
19093 int
19094 main ()
19095 {
19096 intmax_t x = -1; return !x;
19097   ;
19098   return 0;
19099 }
19100 _ACEOF
19101 if ac_fn_c_try_compile "$LINENO"; then :
19102   gt_cv_c_intmax_t=yes
19103 else
19104   gt_cv_c_intmax_t=no
19105 fi
19106 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19107 fi
19108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_intmax_t" >&5
19109 $as_echo "$gt_cv_c_intmax_t" >&6; }
19110   if test $gt_cv_c_intmax_t = yes; then
19111
19112 $as_echo "#define HAVE_INTMAX_T 1" >>confdefs.h
19113
19114   else
19115
19116     test $ac_cv_type_long_long_int = yes \
19117       && ac_type='long long' \
19118       || ac_type='long'
19119
19120 cat >>confdefs.h <<_ACEOF
19121 #define intmax_t $ac_type
19122 _ACEOF
19123
19124   fi
19125
19126
19127
19128
19129
19130
19131   for ac_func in snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb
19132 do :
19133   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19134 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
19135 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
19136   cat >>confdefs.h <<_ACEOF
19137 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
19138 _ACEOF
19139
19140 fi
19141 done
19142
19143       ac_fn_c_check_decl "$LINENO" "_snprintf" "ac_cv_have_decl__snprintf" "#include <stdio.h>
19144 "
19145 if test "x$ac_cv_have_decl__snprintf" = xyes; then :
19146   ac_have_decl=1
19147 else
19148   ac_have_decl=0
19149 fi
19150
19151 cat >>confdefs.h <<_ACEOF
19152 #define HAVE_DECL__SNPRINTF $ac_have_decl
19153 _ACEOF
19154
19155
19156
19157   case "$gl_cv_func_snprintf_retval_c99" in
19158     *yes)
19159
19160 $as_echo "#define HAVE_SNPRINTF_RETVAL_C99 1" >>confdefs.h
19161
19162       ;;
19163   esac
19164
19165
19166
19167
19168
19169
19170
19171
19172
19173
19174
19175
19176   GNULIB_INET_NTOP=0;
19177   GNULIB_INET_PTON=0;
19178     HAVE_DECL_INET_NTOP=1;
19179   HAVE_DECL_INET_PTON=1;
19180   REPLACE_INET_NTOP=0;
19181   REPLACE_INET_PTON=0;
19182
19183
19184
19185
19186
19187
19188
19189
19190
19191   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ungetc works on arbitrary bytes" >&5
19192 $as_echo_n "checking whether ungetc works on arbitrary bytes... " >&6; }
19193 if ${gl_cv_func_ungetc_works+:} false; then :
19194   $as_echo_n "(cached) " >&6
19195 else
19196   if test "$cross_compiling" = yes; then :
19197   case "$host_os" in
19198                    # Guess yes on glibc systems.
19199            *-gnu*) gl_cv_func_ungetc_works="guessing yes" ;;
19200                    # If we don't know, assume the worst.
19201            *)      gl_cv_func_ungetc_works="guessing no" ;;
19202          esac
19203
19204 else
19205   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19206 /* end confdefs.h.  */
19207
19208 #include <stdio.h>
19209
19210 int
19211 main ()
19212 {
19213 FILE *f;
19214            if (!(f = fopen ("conftest.tmp", "w+"))) return 1;
19215            if (fputs ("abc", f) < 0) return 2;
19216            rewind (f);
19217            if (fgetc (f) != 'a') return 3;
19218            if (fgetc (f) != 'b') return 4;
19219            if (ungetc ('d', f) != 'd') return 5;
19220            if (ftell (f) != 1) return 6;
19221            if (fgetc (f) != 'd') return 7;
19222            if (ftell (f) != 2) return 8;
19223            if (fseek (f, 0, SEEK_CUR) != 0) return 9;
19224            if (ftell (f) != 2) return 10;
19225            if (fgetc (f) != 'c') return 11;
19226            fclose (f); remove ("conftest.tmp");
19227   ;
19228   return 0;
19229 }
19230 _ACEOF
19231 if ac_fn_c_try_run "$LINENO"; then :
19232   gl_cv_func_ungetc_works=yes
19233 else
19234   gl_cv_func_ungetc_works=no
19235 fi
19236 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19237   conftest.$ac_objext conftest.beam conftest.$ac_ext
19238 fi
19239
19240
19241 fi
19242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ungetc_works" >&5
19243 $as_echo "$gl_cv_func_ungetc_works" >&6; }
19244   case "$gl_cv_func_ungetc_works" in
19245     *yes) ;;
19246     *)
19247
19248 $as_echo "#define FUNC_UNGETC_BROKEN 1" >>confdefs.h
19249
19250       ;;
19251   esac
19252
19253
19254
19255
19256
19257
19258
19259
19260
19261
19262         case "$host_os" in
19263     osf*)
19264
19265 $as_echo "#define _POSIX_PII_SOCKET 1" >>confdefs.h
19266
19267       ;;
19268   esac
19269
19270   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> is self-contained" >&5
19271 $as_echo_n "checking whether <sys/socket.h> is self-contained... " >&6; }
19272 if ${gl_cv_header_sys_socket_h_selfcontained+:} false; then :
19273   $as_echo_n "(cached) " >&6
19274 else
19275
19276       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19277 /* end confdefs.h.  */
19278 #include <sys/socket.h>
19279 int
19280 main ()
19281 {
19282
19283   ;
19284   return 0;
19285 }
19286 _ACEOF
19287 if ac_fn_c_try_compile "$LINENO"; then :
19288   gl_cv_header_sys_socket_h_selfcontained=yes
19289 else
19290   gl_cv_header_sys_socket_h_selfcontained=no
19291 fi
19292 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19293
19294 fi
19295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_selfcontained" >&5
19296 $as_echo "$gl_cv_header_sys_socket_h_selfcontained" >&6; }
19297   if test $gl_cv_header_sys_socket_h_selfcontained = yes; then
19298             for ac_func in shutdown
19299 do :
19300   ac_fn_c_check_func "$LINENO" "shutdown" "ac_cv_func_shutdown"
19301 if test "x$ac_cv_func_shutdown" = xyes; then :
19302   cat >>confdefs.h <<_ACEOF
19303 #define HAVE_SHUTDOWN 1
19304 _ACEOF
19305
19306 fi
19307 done
19308
19309     if test $ac_cv_func_shutdown = yes; then
19310       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> defines the SHUT_* macros" >&5
19311 $as_echo_n "checking whether <sys/socket.h> defines the SHUT_* macros... " >&6; }
19312 if ${gl_cv_header_sys_socket_h_shut+:} false; then :
19313   $as_echo_n "(cached) " >&6
19314 else
19315
19316           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19317 /* end confdefs.h.  */
19318 #include <sys/socket.h>
19319 int
19320 main ()
19321 {
19322 int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR };
19323   ;
19324   return 0;
19325 }
19326 _ACEOF
19327 if ac_fn_c_try_compile "$LINENO"; then :
19328   gl_cv_header_sys_socket_h_shut=yes
19329 else
19330   gl_cv_header_sys_socket_h_shut=no
19331 fi
19332 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19333
19334 fi
19335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_shut" >&5
19336 $as_echo "$gl_cv_header_sys_socket_h_shut" >&6; }
19337       if test $gl_cv_header_sys_socket_h_shut = no; then
19338         SYS_SOCKET_H='sys/socket.h'
19339       fi
19340     fi
19341   fi
19342   # We need to check for ws2tcpip.h now.
19343
19344
19345
19346
19347
19348
19349
19350
19351   :
19352
19353
19354
19355
19356
19357
19358
19359
19360      if test $gl_cv_have_include_next = yes; then
19361        gl_cv_next_sys_socket_h='<'sys/socket.h'>'
19362      else
19363        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/socket.h>" >&5
19364 $as_echo_n "checking absolute name of <sys/socket.h>... " >&6; }
19365 if ${gl_cv_next_sys_socket_h+:} false; then :
19366   $as_echo_n "(cached) " >&6
19367 else
19368
19369              if test $ac_cv_header_sys_socket_h = yes; then
19370
19371
19372
19373
19374   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19375 /* end confdefs.h.  */
19376 #include <sys/socket.h>
19377 _ACEOF
19378                 case "$host_os" in
19379     aix*) gl_absname_cpp="$ac_cpp -C" ;;
19380     *)    gl_absname_cpp="$ac_cpp" ;;
19381   esac
19382
19383   case "$host_os" in
19384     mingw*)
19385                                           gl_dirsep_regex='[/\\]'
19386       ;;
19387     *)
19388       gl_dirsep_regex='\/'
19389       ;;
19390   esac
19391       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19392   gl_header_literal_regex=`echo 'sys/socket.h' \
19393                            | sed -e "$gl_make_literal_regex_sed"`
19394   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19395       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19396       s|^/[^/]|//&|
19397       p
19398       q
19399     }'
19400
19401         gl_cv_absolute_sys_socket_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19402   sed -n "$gl_absolute_header_sed"`
19403
19404            gl_header=$gl_cv_absolute_sys_socket_h
19405            gl_cv_next_sys_socket_h='"'$gl_header'"'
19406           else
19407                gl_cv_next_sys_socket_h='<'sys/socket.h'>'
19408              fi
19409
19410
19411 fi
19412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_socket_h" >&5
19413 $as_echo "$gl_cv_next_sys_socket_h" >&6; }
19414      fi
19415      NEXT_SYS_SOCKET_H=$gl_cv_next_sys_socket_h
19416
19417      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19418        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19419        gl_next_as_first_directive='<'sys/socket.h'>'
19420      else
19421        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19422        gl_next_as_first_directive=$gl_cv_next_sys_socket_h
19423      fi
19424      NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H=$gl_next_as_first_directive
19425
19426
19427
19428
19429   if test $ac_cv_header_sys_socket_h = yes; then
19430     HAVE_SYS_SOCKET_H=1
19431     HAVE_WS2TCPIP_H=0
19432   else
19433     HAVE_SYS_SOCKET_H=0
19434     if test $ac_cv_header_ws2tcpip_h = yes; then
19435       HAVE_WS2TCPIP_H=1
19436     else
19437       HAVE_WS2TCPIP_H=0
19438     fi
19439   fi
19440
19441
19442
19443   ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "
19444   /* sys/types.h is not needed according to POSIX, but the
19445      sys/socket.h in i386-unknown-freebsd4.10 and
19446      powerpc-apple-darwin5.5 required it. */
19447 #include <sys/types.h>
19448 #ifdef HAVE_SYS_SOCKET_H
19449 #include <sys/socket.h>
19450 #endif
19451 #ifdef HAVE_WS2TCPIP_H
19452 #include <ws2tcpip.h>
19453 #endif
19454
19455 "
19456 if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
19457
19458 cat >>confdefs.h <<_ACEOF
19459 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
19460 _ACEOF
19461
19462
19463 fi
19464 ac_fn_c_check_type "$LINENO" "sa_family_t" "ac_cv_type_sa_family_t" "
19465   /* sys/types.h is not needed according to POSIX, but the
19466      sys/socket.h in i386-unknown-freebsd4.10 and
19467      powerpc-apple-darwin5.5 required it. */
19468 #include <sys/types.h>
19469 #ifdef HAVE_SYS_SOCKET_H
19470 #include <sys/socket.h>
19471 #endif
19472 #ifdef HAVE_WS2TCPIP_H
19473 #include <ws2tcpip.h>
19474 #endif
19475
19476 "
19477 if test "x$ac_cv_type_sa_family_t" = xyes; then :
19478
19479 cat >>confdefs.h <<_ACEOF
19480 #define HAVE_SA_FAMILY_T 1
19481 _ACEOF
19482
19483
19484 fi
19485
19486   if test $ac_cv_type_struct_sockaddr_storage = no; then
19487     HAVE_STRUCT_SOCKADDR_STORAGE=0
19488   fi
19489   if test $ac_cv_type_sa_family_t = no; then
19490     HAVE_SA_FAMILY_T=0
19491   fi
19492   if test $ac_cv_type_struct_sockaddr_storage != no; then
19493     ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
19494        #ifdef HAVE_SYS_SOCKET_H
19495        #include <sys/socket.h>
19496        #endif
19497        #ifdef HAVE_WS2TCPIP_H
19498        #include <ws2tcpip.h>
19499        #endif
19500
19501 "
19502 if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then :
19503
19504 cat >>confdefs.h <<_ACEOF
19505 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
19506 _ACEOF
19507
19508
19509 else
19510   HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=0
19511 fi
19512
19513   fi
19514   if test $HAVE_STRUCT_SOCKADDR_STORAGE = 0 || test $HAVE_SA_FAMILY_T = 0 \
19515      || test $HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = 0; then
19516     SYS_SOCKET_H='sys/socket.h'
19517   fi
19518
19519
19520
19521
19522   :
19523
19524
19525
19526
19527
19528   if test $ac_cv_header_sys_socket_h != yes; then
19529                     for ac_header in winsock2.h
19530 do :
19531   ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
19532 if test "x$ac_cv_header_winsock2_h" = xyes; then :
19533   cat >>confdefs.h <<_ACEOF
19534 #define HAVE_WINSOCK2_H 1
19535 _ACEOF
19536
19537 fi
19538
19539 done
19540
19541   fi
19542   if test "$ac_cv_header_winsock2_h" = yes; then
19543     HAVE_WINSOCK2_H=1
19544     UNISTD_H_HAVE_WINSOCK2_H=1
19545     SYS_IOCTL_H_HAVE_WINSOCK2_H=1
19546   else
19547     HAVE_WINSOCK2_H=0
19548   fi
19549
19550
19551
19552
19553     for gl_func in socket connect accept bind getpeername getsockname getsockopt     listen recv send recvfrom sendto setsockopt shutdown accept4; do
19554     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
19555     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
19556 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
19557 if eval \${$as_gl_Symbol+:} false; then :
19558   $as_echo_n "(cached) " >&6
19559 else
19560   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19561 /* end confdefs.h.  */
19562
19563 /* Some systems require prerequisite headers.  */
19564 #include <sys/types.h>
19565 #include <sys/socket.h>
19566
19567 int
19568 main ()
19569 {
19570 #undef $gl_func
19571   (void) $gl_func;
19572   ;
19573   return 0;
19574 }
19575 _ACEOF
19576 if ac_fn_c_try_compile "$LINENO"; then :
19577   eval "$as_gl_Symbol=yes"
19578 else
19579   eval "$as_gl_Symbol=no"
19580 fi
19581 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19582 fi
19583 eval ac_res=\$$as_gl_Symbol
19584                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
19585 $as_echo "$ac_res" >&6; }
19586     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
19587   cat >>confdefs.h <<_ACEOF
19588 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
19589 _ACEOF
19590
19591                      eval ac_cv_have_decl_$gl_func=yes
19592 fi
19593       done
19594
19595
19596
19597
19598
19599
19600
19601
19602
19603
19604   :
19605
19606
19607
19608
19609
19610
19611   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv4 sockets" >&5
19612 $as_echo_n "checking for IPv4 sockets... " >&6; }
19613   if ${gl_cv_socket_ipv4+:} false; then :
19614   $as_echo_n "(cached) " >&6
19615 else
19616   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19617 /* end confdefs.h.  */
19618 #include <sys/types.h>
19619 #ifdef HAVE_SYS_SOCKET_H
19620 #include <sys/socket.h>
19621 #endif
19622 #ifdef HAVE_NETINET_IN_H
19623 #include <netinet/in.h>
19624 #endif
19625 #ifdef HAVE_WINSOCK2_H
19626 #include <winsock2.h>
19627 #endif
19628 int
19629 main ()
19630 {
19631 int x = AF_INET; struct in_addr y; struct sockaddr_in z;
19632  if (&x && &y && &z) return 0;
19633   ;
19634   return 0;
19635 }
19636 _ACEOF
19637 if ac_fn_c_try_compile "$LINENO"; then :
19638   gl_cv_socket_ipv4=yes
19639 else
19640   gl_cv_socket_ipv4=no
19641 fi
19642 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19643 fi
19644
19645   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv4" >&5
19646 $as_echo "$gl_cv_socket_ipv4" >&6; }
19647   if test $gl_cv_socket_ipv4 = yes; then
19648
19649 $as_echo "#define HAVE_IPV4 1" >>confdefs.h
19650
19651   fi
19652
19653   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv6 sockets" >&5
19654 $as_echo_n "checking for IPv6 sockets... " >&6; }
19655   if ${gl_cv_socket_ipv6+:} false; then :
19656   $as_echo_n "(cached) " >&6
19657 else
19658   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19659 /* end confdefs.h.  */
19660 #include <sys/types.h>
19661 #ifdef HAVE_SYS_SOCKET_H
19662 #include <sys/socket.h>
19663 #endif
19664 #ifdef HAVE_NETINET_IN_H
19665 #include <netinet/in.h>
19666 #endif
19667 #ifdef HAVE_WINSOCK2_H
19668 #include <winsock2.h>
19669 #endif
19670 #ifdef HAVE_WS2TCPIP_H
19671 #include <ws2tcpip.h>
19672 #endif
19673 int
19674 main ()
19675 {
19676 int x = AF_INET6; struct in6_addr y; struct sockaddr_in6 z;
19677  if (&x && &y && &z) return 0;
19678   ;
19679   return 0;
19680 }
19681 _ACEOF
19682 if ac_fn_c_try_compile "$LINENO"; then :
19683   gl_cv_socket_ipv6=yes
19684 else
19685   gl_cv_socket_ipv6=no
19686 fi
19687 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19688 fi
19689
19690   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv6" >&5
19691 $as_echo "$gl_cv_socket_ipv6" >&6; }
19692   if test $gl_cv_socket_ipv6 = yes; then
19693
19694 $as_echo "#define HAVE_IPV6 1" >>confdefs.h
19695
19696   fi
19697
19698 ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
19699 if test "x$ac_cv_type_off_t" = xyes; then :
19700
19701 else
19702
19703 cat >>confdefs.h <<_ACEOF
19704 #define off_t long int
19705 _ACEOF
19706
19707 fi
19708
19709
19710
19711
19712
19713
19714
19715   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
19716 $as_echo_n "checking for LC_MESSAGES... " >&6; }
19717 if ${gt_cv_val_LC_MESSAGES+:} false; then :
19718   $as_echo_n "(cached) " >&6
19719 else
19720   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19721 /* end confdefs.h.  */
19722 #include <locale.h>
19723 int
19724 main ()
19725 {
19726 return LC_MESSAGES
19727   ;
19728   return 0;
19729 }
19730 _ACEOF
19731 if ac_fn_c_try_link "$LINENO"; then :
19732   gt_cv_val_LC_MESSAGES=yes
19733 else
19734   gt_cv_val_LC_MESSAGES=no
19735 fi
19736 rm -f core conftest.err conftest.$ac_objext \
19737     conftest$ac_exeext conftest.$ac_ext
19738 fi
19739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_val_LC_MESSAGES" >&5
19740 $as_echo "$gt_cv_val_LC_MESSAGES" >&6; }
19741   if test $gt_cv_val_LC_MESSAGES = yes; then
19742
19743 $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
19744
19745   fi
19746
19747
19748     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5
19749 $as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; }
19750 if ${gt_cv_func_CFPreferencesCopyAppValue+:} false; then :
19751   $as_echo_n "(cached) " >&6
19752 else
19753   gt_save_LIBS="$LIBS"
19754      LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
19755      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19756 /* end confdefs.h.  */
19757 #include <CoreFoundation/CFPreferences.h>
19758 int
19759 main ()
19760 {
19761 CFPreferencesCopyAppValue(NULL, NULL)
19762   ;
19763   return 0;
19764 }
19765 _ACEOF
19766 if ac_fn_c_try_link "$LINENO"; then :
19767   gt_cv_func_CFPreferencesCopyAppValue=yes
19768 else
19769   gt_cv_func_CFPreferencesCopyAppValue=no
19770 fi
19771 rm -f core conftest.err conftest.$ac_objext \
19772     conftest$ac_exeext conftest.$ac_ext
19773      LIBS="$gt_save_LIBS"
19774 fi
19775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5
19776 $as_echo "$gt_cv_func_CFPreferencesCopyAppValue" >&6; }
19777   if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
19778
19779 $as_echo "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h
19780
19781   fi
19782     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5
19783 $as_echo_n "checking for CFLocaleCopyCurrent... " >&6; }
19784 if ${gt_cv_func_CFLocaleCopyCurrent+:} false; then :
19785   $as_echo_n "(cached) " >&6
19786 else
19787   gt_save_LIBS="$LIBS"
19788      LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
19789      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19790 /* end confdefs.h.  */
19791 #include <CoreFoundation/CFLocale.h>
19792 int
19793 main ()
19794 {
19795 CFLocaleCopyCurrent();
19796   ;
19797   return 0;
19798 }
19799 _ACEOF
19800 if ac_fn_c_try_link "$LINENO"; then :
19801   gt_cv_func_CFLocaleCopyCurrent=yes
19802 else
19803   gt_cv_func_CFLocaleCopyCurrent=no
19804 fi
19805 rm -f core conftest.err conftest.$ac_objext \
19806     conftest$ac_exeext conftest.$ac_ext
19807      LIBS="$gt_save_LIBS"
19808 fi
19809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5
19810 $as_echo "$gt_cv_func_CFLocaleCopyCurrent" >&6; }
19811   if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
19812
19813 $as_echo "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h
19814
19815   fi
19816   INTL_MACOSX_LIBS=
19817   if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
19818     INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
19819   fi
19820
19821
19822
19823   GNULIB_PSELECT=0;
19824   GNULIB_SELECT=0;
19825     HAVE_PSELECT=1;
19826   REPLACE_PSELECT=0;
19827   REPLACE_SELECT=0;
19828
19829
19830
19831
19832
19833
19834
19835
19836
19837   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/select.h> is self-contained" >&5
19838 $as_echo_n "checking whether <sys/select.h> is self-contained... " >&6; }
19839 if ${gl_cv_header_sys_select_h_selfcontained+:} false; then :
19840   $as_echo_n "(cached) " >&6
19841 else
19842
19843                                     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19844 /* end confdefs.h.  */
19845 #include <sys/select.h>
19846 int
19847 main ()
19848 {
19849 struct timeval b;
19850   ;
19851   return 0;
19852 }
19853 _ACEOF
19854 if ac_fn_c_try_compile "$LINENO"; then :
19855   gl_cv_header_sys_select_h_selfcontained=yes
19856 else
19857   gl_cv_header_sys_select_h_selfcontained=no
19858 fi
19859 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19860                         if test $gl_cv_header_sys_select_h_selfcontained = yes; then
19861         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19862 /* end confdefs.h.  */
19863 #include <sys/select.h>
19864 int
19865 main ()
19866 {
19867 int memset; int bzero;
19868   ;
19869   return 0;
19870 }
19871
19872 _ACEOF
19873 if ac_fn_c_try_compile "$LINENO"; then :
19874   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19875 /* end confdefs.h.  */
19876 #include <sys/select.h>
19877 int
19878 main ()
19879 {
19880
19881                   #undef memset
19882                   #define memset nonexistent_memset
19883                   extern
19884                   #ifdef __cplusplus
19885                   "C"
19886                   #endif
19887                   void *memset (void *, int, unsigned long);
19888                   #undef bzero
19889                   #define bzero nonexistent_bzero
19890                   extern
19891                   #ifdef __cplusplus
19892                   "C"
19893                   #endif
19894                   void bzero (void *, unsigned long);
19895                   fd_set fds;
19896                   FD_ZERO (&fds);
19897
19898   ;
19899   return 0;
19900 }
19901
19902 _ACEOF
19903 if ac_fn_c_try_link "$LINENO"; then :
19904
19905 else
19906   gl_cv_header_sys_select_h_selfcontained=no
19907 fi
19908 rm -f core conftest.err conftest.$ac_objext \
19909     conftest$ac_exeext conftest.$ac_ext
19910
19911 fi
19912 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19913       fi
19914
19915 fi
19916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_select_h_selfcontained" >&5
19917 $as_echo "$gl_cv_header_sys_select_h_selfcontained" >&6; }
19918
19919
19920
19921
19922
19923
19924   :
19925
19926
19927
19928
19929
19930
19931
19932
19933      if test $gl_cv_have_include_next = yes; then
19934        gl_cv_next_sys_select_h='<'sys/select.h'>'
19935      else
19936        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/select.h>" >&5
19937 $as_echo_n "checking absolute name of <sys/select.h>... " >&6; }
19938 if ${gl_cv_next_sys_select_h+:} false; then :
19939   $as_echo_n "(cached) " >&6
19940 else
19941
19942              if test $ac_cv_header_sys_select_h = yes; then
19943
19944
19945
19946
19947   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19948 /* end confdefs.h.  */
19949 #include <sys/select.h>
19950 _ACEOF
19951                 case "$host_os" in
19952     aix*) gl_absname_cpp="$ac_cpp -C" ;;
19953     *)    gl_absname_cpp="$ac_cpp" ;;
19954   esac
19955
19956   case "$host_os" in
19957     mingw*)
19958                                           gl_dirsep_regex='[/\\]'
19959       ;;
19960     *)
19961       gl_dirsep_regex='\/'
19962       ;;
19963   esac
19964       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19965   gl_header_literal_regex=`echo 'sys/select.h' \
19966                            | sed -e "$gl_make_literal_regex_sed"`
19967   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19968       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19969       s|^/[^/]|//&|
19970       p
19971       q
19972     }'
19973
19974         gl_cv_absolute_sys_select_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19975   sed -n "$gl_absolute_header_sed"`
19976
19977            gl_header=$gl_cv_absolute_sys_select_h
19978            gl_cv_next_sys_select_h='"'$gl_header'"'
19979           else
19980                gl_cv_next_sys_select_h='<'sys/select.h'>'
19981              fi
19982
19983
19984 fi
19985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_select_h" >&5
19986 $as_echo "$gl_cv_next_sys_select_h" >&6; }
19987      fi
19988      NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h
19989
19990      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19991        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19992        gl_next_as_first_directive='<'sys/select.h'>'
19993      else
19994        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19995        gl_next_as_first_directive=$gl_cv_next_sys_select_h
19996      fi
19997      NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive
19998
19999
20000
20001
20002   if test $ac_cv_header_sys_select_h = yes; then
20003     HAVE_SYS_SELECT_H=1
20004   else
20005     HAVE_SYS_SELECT_H=0
20006   fi
20007
20008
20009
20010
20011
20012   :
20013
20014
20015
20016
20017
20018   if test $ac_cv_header_sys_socket_h != yes; then
20019                     for ac_header in winsock2.h
20020 do :
20021   ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
20022 if test "x$ac_cv_header_winsock2_h" = xyes; then :
20023   cat >>confdefs.h <<_ACEOF
20024 #define HAVE_WINSOCK2_H 1
20025 _ACEOF
20026
20027 fi
20028
20029 done
20030
20031   fi
20032   if test "$ac_cv_header_winsock2_h" = yes; then
20033     HAVE_WINSOCK2_H=1
20034     UNISTD_H_HAVE_WINSOCK2_H=1
20035     SYS_IOCTL_H_HAVE_WINSOCK2_H=1
20036   else
20037     HAVE_WINSOCK2_H=0
20038   fi
20039
20040
20041
20042
20043     for gl_func in pselect select; do
20044     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
20045     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
20046 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
20047 if eval \${$as_gl_Symbol+:} false; then :
20048   $as_echo_n "(cached) " >&6
20049 else
20050   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20051 /* end confdefs.h.  */
20052
20053 /* Some systems require prerequisite headers.  */
20054 #include <sys/types.h>
20055 #if !(defined __GLIBC__ && !defined __UCLIBC__) && HAVE_SYS_TIME_H
20056 # include <sys/time.h>
20057 #endif
20058 #include <sys/select.h>
20059
20060 int
20061 main ()
20062 {
20063 #undef $gl_func
20064   (void) $gl_func;
20065   ;
20066   return 0;
20067 }
20068 _ACEOF
20069 if ac_fn_c_try_compile "$LINENO"; then :
20070   eval "$as_gl_Symbol=yes"
20071 else
20072   eval "$as_gl_Symbol=no"
20073 fi
20074 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20075 fi
20076 eval ac_res=\$$as_gl_Symbol
20077                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20078 $as_echo "$ac_res" >&6; }
20079     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
20080   cat >>confdefs.h <<_ACEOF
20081 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
20082 _ACEOF
20083
20084                      eval ac_cv_have_decl_$gl_func=yes
20085 fi
20086       done
20087
20088
20089
20090
20091
20092
20093
20094   :
20095
20096
20097
20098
20099
20100   if test $ac_cv_header_sys_socket_h != yes; then
20101                     for ac_header in winsock2.h
20102 do :
20103   ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
20104 if test "x$ac_cv_header_winsock2_h" = xyes; then :
20105   cat >>confdefs.h <<_ACEOF
20106 #define HAVE_WINSOCK2_H 1
20107 _ACEOF
20108
20109 fi
20110
20111 done
20112
20113   fi
20114   if test "$ac_cv_header_winsock2_h" = yes; then
20115     HAVE_WINSOCK2_H=1
20116     UNISTD_H_HAVE_WINSOCK2_H=1
20117     SYS_IOCTL_H_HAVE_WINSOCK2_H=1
20118   else
20119     HAVE_WINSOCK2_H=0
20120   fi
20121
20122    LIBSOCKET=
20123   if test $HAVE_WINSOCK2_H = 1; then
20124         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we need to call WSAStartup in winsock2.h and -lws2_32" >&5
20125 $as_echo_n "checking if we need to call WSAStartup in winsock2.h and -lws2_32... " >&6; }
20126 if ${gl_cv_func_wsastartup+:} false; then :
20127   $as_echo_n "(cached) " >&6
20128 else
20129
20130       gl_save_LIBS="$LIBS"
20131       LIBS="$LIBS -lws2_32"
20132       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20133 /* end confdefs.h.  */
20134
20135 #ifdef HAVE_WINSOCK2_H
20136 # include <winsock2.h>
20137 #endif
20138 int
20139 main ()
20140 {
20141
20142           WORD wVersionRequested = MAKEWORD(1, 1);
20143           WSADATA wsaData;
20144           int err = WSAStartup(wVersionRequested, &wsaData);
20145           WSACleanup ();
20146   ;
20147   return 0;
20148 }
20149 _ACEOF
20150 if ac_fn_c_try_link "$LINENO"; then :
20151   gl_cv_func_wsastartup=yes
20152 else
20153   gl_cv_func_wsastartup=no
20154 fi
20155 rm -f core conftest.err conftest.$ac_objext \
20156     conftest$ac_exeext conftest.$ac_ext
20157       LIBS="$gl_save_LIBS"
20158
20159 fi
20160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wsastartup" >&5
20161 $as_echo "$gl_cv_func_wsastartup" >&6; }
20162     if test "$gl_cv_func_wsastartup" = "yes"; then
20163
20164 $as_echo "#define WINDOWS_SOCKETS 1" >>confdefs.h
20165
20166       LIBSOCKET='-lws2_32'
20167     fi
20168   else
20169                     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5
20170 $as_echo_n "checking for library containing setsockopt... " >&6; }
20171 if ${gl_cv_lib_socket+:} false; then :
20172   $as_echo_n "(cached) " >&6
20173 else
20174
20175       gl_cv_lib_socket=
20176       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20177 /* end confdefs.h.  */
20178 extern
20179 #ifdef __cplusplus
20180 "C"
20181 #endif
20182 char setsockopt();
20183 int
20184 main ()
20185 {
20186 setsockopt();
20187   ;
20188   return 0;
20189 }
20190 _ACEOF
20191 if ac_fn_c_try_link "$LINENO"; then :
20192
20193 else
20194   gl_save_LIBS="$LIBS"
20195          LIBS="$gl_save_LIBS -lsocket"
20196          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20197 /* end confdefs.h.  */
20198 extern
20199 #ifdef __cplusplus
20200 "C"
20201 #endif
20202 char setsockopt();
20203 int
20204 main ()
20205 {
20206 setsockopt();
20207   ;
20208   return 0;
20209 }
20210 _ACEOF
20211 if ac_fn_c_try_link "$LINENO"; then :
20212   gl_cv_lib_socket="-lsocket"
20213 fi
20214 rm -f core conftest.err conftest.$ac_objext \
20215     conftest$ac_exeext conftest.$ac_ext
20216          if test -z "$gl_cv_lib_socket"; then
20217            LIBS="$gl_save_LIBS -lnetwork"
20218            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20219 /* end confdefs.h.  */
20220 extern
20221 #ifdef __cplusplus
20222 "C"
20223 #endif
20224 char setsockopt();
20225 int
20226 main ()
20227 {
20228 setsockopt();
20229   ;
20230   return 0;
20231 }
20232 _ACEOF
20233 if ac_fn_c_try_link "$LINENO"; then :
20234   gl_cv_lib_socket="-lnetwork"
20235 fi
20236 rm -f core conftest.err conftest.$ac_objext \
20237     conftest$ac_exeext conftest.$ac_ext
20238            if test -z "$gl_cv_lib_socket"; then
20239              LIBS="$gl_save_LIBS -lnet"
20240              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20241 /* end confdefs.h.  */
20242 extern
20243 #ifdef __cplusplus
20244 "C"
20245 #endif
20246 char setsockopt();
20247 int
20248 main ()
20249 {
20250 setsockopt();
20251   ;
20252   return 0;
20253 }
20254 _ACEOF
20255 if ac_fn_c_try_link "$LINENO"; then :
20256   gl_cv_lib_socket="-lnet"
20257 fi
20258 rm -f core conftest.err conftest.$ac_objext \
20259     conftest$ac_exeext conftest.$ac_ext
20260            fi
20261          fi
20262          LIBS="$gl_save_LIBS"
20263
20264 fi
20265 rm -f core conftest.err conftest.$ac_objext \
20266     conftest$ac_exeext conftest.$ac_ext
20267       if test -z "$gl_cv_lib_socket"; then
20268         gl_cv_lib_socket="none needed"
20269       fi
20270
20271 fi
20272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_lib_socket" >&5
20273 $as_echo "$gl_cv_lib_socket" >&6; }
20274     if test "$gl_cv_lib_socket" != "none needed"; then
20275       LIBSOCKET="$gl_cv_lib_socket"
20276     fi
20277   fi
20278
20279
20280
20281
20282
20283
20284   :
20285
20286
20287
20288
20289
20290   if test "$ac_cv_header_winsock2_h" = yes; then
20291     REPLACE_SELECT=1
20292   else
20293
20294   :
20295
20296
20297
20298
20299
20300     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether select supports a 0 argument" >&5
20301 $as_echo_n "checking whether select supports a 0 argument... " >&6; }
20302 if ${gl_cv_func_select_supports0+:} false; then :
20303   $as_echo_n "(cached) " >&6
20304 else
20305
20306         if test "$cross_compiling" = yes; then :
20307
20308            case "$host_os" in
20309                        # Guess no on Interix.
20310              interix*) gl_cv_func_select_supports0="guessing no";;
20311                        # Guess yes otherwise.
20312              *)        gl_cv_func_select_supports0="guessing yes";;
20313            esac
20314
20315 else
20316   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20317 /* end confdefs.h.  */
20318
20319 #include <sys/types.h>
20320 #include <sys/time.h>
20321 #if HAVE_SYS_SELECT_H
20322 #include <sys/select.h>
20323 #endif
20324 int main ()
20325 {
20326   struct timeval timeout;
20327   timeout.tv_sec = 0;
20328   timeout.tv_usec = 5;
20329   return select (0, (fd_set *)0, (fd_set *)0, (fd_set *)0, &timeout) < 0;
20330 }
20331 _ACEOF
20332 if ac_fn_c_try_run "$LINENO"; then :
20333   gl_cv_func_select_supports0=yes
20334 else
20335   gl_cv_func_select_supports0=no
20336 fi
20337 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20338   conftest.$ac_objext conftest.beam conftest.$ac_ext
20339 fi
20340
20341
20342 fi
20343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_select_supports0" >&5
20344 $as_echo "$gl_cv_func_select_supports0" >&6; }
20345     case "$gl_cv_func_select_supports0" in
20346       *yes) ;;
20347       *) REPLACE_SELECT=1 ;;
20348     esac
20349
20350         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether select detects invalid fds" >&5
20351 $as_echo_n "checking whether select detects invalid fds... " >&6; }
20352 if ${gl_cv_func_select_detects_ebadf+:} false; then :
20353   $as_echo_n "(cached) " >&6
20354 else
20355
20356         if test "$cross_compiling" = yes; then :
20357
20358            case "$host_os" in
20359                     # Guess yes on glibc systems.
20360             *-gnu*) gl_cv_func_select_detects_ebadf="guessing yes" ;;
20361                     # If we don't know, assume the worst.
20362             *)      gl_cv_func_select_detects_ebadf="guessing no" ;;
20363            esac
20364
20365 else
20366   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20367 /* end confdefs.h.  */
20368
20369 #include <sys/types.h>
20370 #include <sys/time.h>
20371 #if HAVE_SYS_SELECT_H
20372 # include <sys/select.h>
20373 #endif
20374 #include <unistd.h>
20375 #include <errno.h>
20376
20377 int
20378 main ()
20379 {
20380
20381   fd_set set;
20382   dup2(0, 16);
20383   FD_ZERO(&set);
20384   FD_SET(16, &set);
20385   close(16);
20386   struct timeval timeout;
20387   timeout.tv_sec = 0;
20388   timeout.tv_usec = 5;
20389   return select (17, &set, NULL, NULL, &timeout) != -1 || errno != EBADF;
20390
20391   ;
20392   return 0;
20393 }
20394 _ACEOF
20395 if ac_fn_c_try_run "$LINENO"; then :
20396   gl_cv_func_select_detects_ebadf=yes
20397 else
20398   gl_cv_func_select_detects_ebadf=no
20399 fi
20400 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20401   conftest.$ac_objext conftest.beam conftest.$ac_ext
20402 fi
20403
20404
20405 fi
20406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_select_detects_ebadf" >&5
20407 $as_echo "$gl_cv_func_select_detects_ebadf" >&6; }
20408     case $gl_cv_func_select_detects_ebadf in
20409       *yes) ;;
20410       *) REPLACE_SELECT=1 ;;
20411     esac
20412   fi
20413
20414     LIB_SELECT="$LIBSOCKET"
20415   if test $REPLACE_SELECT = 1; then
20416     case "$host_os" in
20417       mingw*)
20418                                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20419 /* end confdefs.h.  */
20420
20421 #define WIN32_LEAN_AND_MEAN
20422 #include <windows.h>
20423 int
20424 main ()
20425 {
20426   MsgWaitForMultipleObjects (0, NULL, 0, 0, 0);
20427   return 0;
20428 }
20429 _ACEOF
20430 if ac_fn_c_try_link "$LINENO"; then :
20431
20432 else
20433   LIB_SELECT="$LIB_SELECT -luser32"
20434 fi
20435 rm -f core conftest.err conftest.$ac_objext \
20436     conftest$ac_exeext conftest.$ac_ext
20437         ;;
20438     esac
20439   fi
20440
20441
20442
20443
20444
20445
20446
20447
20448   GNULIB_PTHREAD_SIGMASK=0;
20449   GNULIB_RAISE=0;
20450   GNULIB_SIGNAL_H_SIGPIPE=0;
20451   GNULIB_SIGPROCMASK=0;
20452   GNULIB_SIGACTION=0;
20453     HAVE_POSIX_SIGNALBLOCKING=1;
20454   HAVE_PTHREAD_SIGMASK=1;
20455   HAVE_RAISE=1;
20456   HAVE_SIGSET_T=1;
20457   HAVE_SIGINFO_T=1;
20458   HAVE_SIGACTION=1;
20459   HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
20460
20461   HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
20462
20463   HAVE_SIGHANDLER_T=1;
20464   REPLACE_PTHREAD_SIGMASK=0;
20465   REPLACE_RAISE=0;
20466
20467
20468   ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
20469       #include <signal.h>
20470       /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>.  */
20471       #include <sys/types.h>
20472
20473 "
20474 if test "x$ac_cv_type_sigset_t" = xyes; then :
20475
20476 cat >>confdefs.h <<_ACEOF
20477 #define HAVE_SIGSET_T 1
20478 _ACEOF
20479
20480 gl_cv_type_sigset_t=yes
20481 else
20482   gl_cv_type_sigset_t=no
20483 fi
20484
20485   if test $gl_cv_type_sigset_t != yes; then
20486     HAVE_SIGSET_T=0
20487   fi
20488
20489
20490
20491
20492
20493
20494
20495
20496
20497
20498
20499
20500
20501
20502
20503
20504
20505
20506
20507
20508
20509
20510
20511
20512
20513
20514
20515
20516
20517
20518
20519
20520
20521
20522
20523
20524
20525
20526
20527
20528
20529
20530    if false; then
20531   GL_COND_LIBTOOL_TRUE=
20532   GL_COND_LIBTOOL_FALSE='#'
20533 else
20534   GL_COND_LIBTOOL_TRUE='#'
20535   GL_COND_LIBTOOL_FALSE=
20536 fi
20537
20538   gl_cond_libtool=false
20539   gl_libdeps=
20540   gl_ltlibdeps=
20541   gl_m4_base='gl/m4'
20542
20543
20544
20545
20546
20547
20548
20549
20550
20551   gl_source_base='gl/lib'
20552
20553
20554   if test $ac_cv_func_alloca_works = no; then
20555     :
20556   fi
20557
20558   # Define an additional variable used in the Makefile substitution.
20559   if test $ac_cv_working_alloca_h = yes; then
20560     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
20561 $as_echo_n "checking for alloca as a compiler built-in... " >&6; }
20562 if ${gl_cv_rpl_alloca+:} false; then :
20563   $as_echo_n "(cached) " >&6
20564 else
20565
20566       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20567 /* end confdefs.h.  */
20568
20569 #if defined __GNUC__ || defined _AIX || defined _MSC_VER
20570         Need own alloca
20571 #endif
20572
20573 _ACEOF
20574 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20575   $EGREP "Need own alloca" >/dev/null 2>&1; then :
20576   gl_cv_rpl_alloca=yes
20577 else
20578   gl_cv_rpl_alloca=no
20579 fi
20580 rm -f conftest*
20581
20582
20583 fi
20584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
20585 $as_echo "$gl_cv_rpl_alloca" >&6; }
20586     if test $gl_cv_rpl_alloca = yes; then
20587
20588 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
20589
20590       ALLOCA_H=alloca.h
20591     else
20592                   ALLOCA_H=
20593     fi
20594   else
20595     ALLOCA_H=alloca.h
20596   fi
20597
20598    if test -n "$ALLOCA_H"; then
20599   GL_GENERATE_ALLOCA_H_TRUE=
20600   GL_GENERATE_ALLOCA_H_FALSE='#'
20601 else
20602   GL_GENERATE_ALLOCA_H_TRUE='#'
20603   GL_GENERATE_ALLOCA_H_FALSE=
20604 fi
20605
20606
20607
20608
20609 cat >>confdefs.h <<_ACEOF
20610 #define GNULIB_AREADLINKAT 1
20611 _ACEOF
20612
20613
20614
20615   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable assertions" >&5
20616 $as_echo_n "checking whether to enable assertions... " >&6; }
20617   # Check whether --enable-assert was given.
20618 if test "${enable_assert+set}" = set; then :
20619   enableval=$enable_assert; if test "x$enableval" = xno; then :
20620
20621 $as_echo "#define NDEBUG 1" >>confdefs.h
20622
20623 elif test "x$enableval" != xyes; then :
20624   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: invalid argument supplied to --enable-assert" >&5
20625 $as_echo "$as_me: WARNING: invalid argument supplied to --enable-assert" >&2;}
20626       enable_assert=yes
20627 fi
20628 else
20629   enable_assert=yes
20630 fi
20631
20632   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_assert" >&5
20633 $as_echo "$enable_assert" >&6; }
20634
20635
20636
20637
20638
20639
20640
20641
20642
20643   gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext"
20644
20645
20646
20647
20648
20649
20650
20651   :
20652
20653
20654
20655
20656
20657   if test $ac_cv_func_btowc = no; then
20658     HAVE_BTOWC=0
20659   else
20660
20661
20662
20663
20664         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(0) is correct" >&5
20665 $as_echo_n "checking whether btowc(0) is correct... " >&6; }
20666 if ${gl_cv_func_btowc_nul+:} false; then :
20667   $as_echo_n "(cached) " >&6
20668 else
20669
20670         if test "$cross_compiling" = yes; then :
20671
20672            case "$host_os" in
20673                       # Guess no on Cygwin.
20674              cygwin*) gl_cv_func_btowc_nul="guessing no" ;;
20675                       # Guess yes otherwise.
20676              *)       gl_cv_func_btowc_nul="guessing yes" ;;
20677            esac
20678
20679 else
20680   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20681 /* end confdefs.h.  */
20682
20683 #include <string.h>
20684 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
20685    <wchar.h>.
20686    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20687    included before <wchar.h>.  */
20688 #include <stddef.h>
20689 #include <stdio.h>
20690 #include <time.h>
20691 #include <wchar.h>
20692 int main ()
20693 {
20694   if (btowc ('\0') != 0)
20695     return 1;
20696   return 0;
20697 }
20698 _ACEOF
20699 if ac_fn_c_try_run "$LINENO"; then :
20700   gl_cv_func_btowc_nul=yes
20701 else
20702   gl_cv_func_btowc_nul=no
20703 fi
20704 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20705   conftest.$ac_objext conftest.beam conftest.$ac_ext
20706 fi
20707
20708
20709 fi
20710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_nul" >&5
20711 $as_echo "$gl_cv_func_btowc_nul" >&6; }
20712
20713         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(EOF) is correct" >&5
20714 $as_echo_n "checking whether btowc(EOF) is correct... " >&6; }
20715 if ${gl_cv_func_btowc_eof+:} false; then :
20716   $as_echo_n "(cached) " >&6
20717 else
20718
20719                         case "$host_os" in
20720                  # Guess no on IRIX.
20721           irix*) gl_cv_func_btowc_eof="guessing no" ;;
20722                  # Guess yes otherwise.
20723           *)     gl_cv_func_btowc_eof="guessing yes" ;;
20724         esac
20725         if test $LOCALE_FR != none; then
20726           if test "$cross_compiling" = yes; then :
20727   :
20728 else
20729   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20730 /* end confdefs.h.  */
20731
20732 #include <locale.h>
20733 #include <string.h>
20734 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
20735    <wchar.h>.
20736    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20737    included before <wchar.h>.  */
20738 #include <stddef.h>
20739 #include <stdio.h>
20740 #include <time.h>
20741 #include <wchar.h>
20742 int main ()
20743 {
20744   if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
20745     {
20746       if (btowc (EOF) != WEOF)
20747         return 1;
20748     }
20749   return 0;
20750 }
20751 _ACEOF
20752 if ac_fn_c_try_run "$LINENO"; then :
20753   gl_cv_func_btowc_eof=yes
20754 else
20755   gl_cv_func_btowc_eof=no
20756 fi
20757 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20758   conftest.$ac_objext conftest.beam conftest.$ac_ext
20759 fi
20760
20761         fi
20762
20763 fi
20764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_eof" >&5
20765 $as_echo "$gl_cv_func_btowc_eof" >&6; }
20766
20767     case "$gl_cv_func_btowc_nul" in
20768       *yes) ;;
20769       *) REPLACE_BTOWC=1 ;;
20770     esac
20771     case "$gl_cv_func_btowc_eof" in
20772       *yes) ;;
20773       *) REPLACE_BTOWC=1 ;;
20774     esac
20775   fi
20776
20777   if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then
20778
20779
20780
20781
20782
20783
20784
20785
20786   gl_LIBOBJS="$gl_LIBOBJS btowc.$ac_objext"
20787
20788
20789   :
20790
20791   fi
20792
20793
20794
20795
20796
20797           GNULIB_BTOWC=1
20798
20799
20800
20801
20802
20803 $as_echo "#define GNULIB_TEST_BTOWC 1" >>confdefs.h
20804
20805
20806
20807
20808     for ac_header in byteswap.h
20809 do :
20810   ac_fn_c_check_header_mongrel "$LINENO" "byteswap.h" "ac_cv_header_byteswap_h" "$ac_includes_default"
20811 if test "x$ac_cv_header_byteswap_h" = xyes; then :
20812   cat >>confdefs.h <<_ACEOF
20813 #define HAVE_BYTESWAP_H 1
20814 _ACEOF
20815
20816     BYTESWAP_H=''
20817
20818 else
20819
20820     BYTESWAP_H='byteswap.h'
20821
20822 fi
20823
20824 done
20825
20826
20827    if test -n "$BYTESWAP_H"; then
20828   GL_GENERATE_BYTESWAP_H_TRUE=
20829   GL_GENERATE_BYTESWAP_H_FALSE='#'
20830 else
20831   GL_GENERATE_BYTESWAP_H_TRUE='#'
20832   GL_GENERATE_BYTESWAP_H_FALSE=
20833 fi
20834
20835
20836
20837
20838
20839   :
20840
20841
20842
20843
20844
20845
20846
20847   if test $ac_cv_func_canonicalize_file_name = no; then
20848     HAVE_CANONICALIZE_FILE_NAME=0
20849   else
20850     case "$gl_cv_func_realpath_works" in
20851       *yes) ;;
20852       *)    REPLACE_CANONICALIZE_FILE_NAME=1 ;;
20853     esac
20854   fi
20855
20856
20857
20858 cat >>confdefs.h <<_ACEOF
20859 #define GNULIB_CANONICALIZE 1
20860 _ACEOF
20861
20862
20863
20864
20865 $as_echo "#define GNULIB_TEST_CANONICALIZE 1" >>confdefs.h
20866
20867
20868
20869
20870
20871
20872
20873           GNULIB_CANONICALIZE_FILE_NAME=1
20874
20875
20876
20877
20878
20879 $as_echo "#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1" >>confdefs.h
20880
20881
20882
20883
20884   :
20885
20886
20887
20888
20889
20890
20891
20892
20893
20894
20895           GNULIB_CHDIR=1
20896
20897
20898
20899
20900
20901 $as_echo "#define GNULIB_TEST_CHDIR 1" >>confdefs.h
20902
20903
20904
20905
20906
20907   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether this system has an arbitrary file name length limit" >&5
20908 $as_echo_n "checking whether this system has an arbitrary file name length limit... " >&6; }
20909 if ${gl_cv_have_arbitrary_file_name_length_limit+:} false; then :
20910   $as_echo_n "(cached) " >&6
20911 else
20912   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20913 /* end confdefs.h.  */
20914
20915 /* Arrange to define PATH_MAX, like "pathmax.h" does. */
20916 #if HAVE_UNISTD_H
20917 # include <unistd.h>
20918 #endif
20919 #include <limits.h>
20920 #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
20921 # include <sys/param.h>
20922 #endif
20923 #if !defined PATH_MAX && defined MAXPATHLEN
20924 # define PATH_MAX MAXPATHLEN
20925 #endif
20926 #ifdef __hpux
20927 # undef PATH_MAX
20928 # define PATH_MAX 1024
20929 #endif
20930 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
20931 # undef PATH_MAX
20932 # define PATH_MAX 260
20933 #endif
20934
20935 #ifdef PATH_MAX
20936 have_arbitrary_file_name_length_limit
20937 #endif
20938 _ACEOF
20939 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20940   $EGREP "have_arbitrary_file_name_length_limit" >/dev/null 2>&1; then :
20941   gl_cv_have_arbitrary_file_name_length_limit=yes
20942 else
20943   gl_cv_have_arbitrary_file_name_length_limit=no
20944 fi
20945 rm -f conftest*
20946
20947 fi
20948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_arbitrary_file_name_length_limit" >&5
20949 $as_echo "$gl_cv_have_arbitrary_file_name_length_limit" >&6; }
20950
20951   if test $gl_cv_have_arbitrary_file_name_length_limit = yes; then
20952
20953
20954
20955
20956
20957
20958
20959
20960   gl_LIBOBJS="$gl_LIBOBJS chdir-long.$ac_objext"
20961
20962     :
20963   fi
20964
20965
20966
20967   # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
20968   # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
20969
20970   # Save and restore LIBS so e.g., -lrt, isn't added to it.  Otherwise, *all*
20971   # programs in the package would end up linked with that potentially-shared
20972   # library, inducing unnecessary run-time overhead.
20973   LIB_CLOCK_GETTIME=
20974
20975   gl_saved_libs=$LIBS
20976     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
20977 $as_echo_n "checking for library containing clock_gettime... " >&6; }
20978 if ${ac_cv_search_clock_gettime+:} false; then :
20979   $as_echo_n "(cached) " >&6
20980 else
20981   ac_func_search_save_LIBS=$LIBS
20982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20983 /* end confdefs.h.  */
20984
20985 /* Override any GCC internal prototype to avoid an error.
20986    Use char because int might match the return type of a GCC
20987    builtin and then its argument prototype would still apply.  */
20988 #ifdef __cplusplus
20989 extern "C"
20990 #endif
20991 char clock_gettime ();
20992 int
20993 main ()
20994 {
20995 return clock_gettime ();
20996   ;
20997   return 0;
20998 }
20999 _ACEOF
21000 for ac_lib in '' rt posix4; do
21001   if test -z "$ac_lib"; then
21002     ac_res="none required"
21003   else
21004     ac_res=-l$ac_lib
21005     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
21006   fi
21007   if ac_fn_c_try_link "$LINENO"; then :
21008   ac_cv_search_clock_gettime=$ac_res
21009 fi
21010 rm -f core conftest.err conftest.$ac_objext \
21011     conftest$ac_exeext
21012   if ${ac_cv_search_clock_gettime+:} false; then :
21013   break
21014 fi
21015 done
21016 if ${ac_cv_search_clock_gettime+:} false; then :
21017
21018 else
21019   ac_cv_search_clock_gettime=no
21020 fi
21021 rm conftest.$ac_ext
21022 LIBS=$ac_func_search_save_LIBS
21023 fi
21024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
21025 $as_echo "$ac_cv_search_clock_gettime" >&6; }
21026 ac_res=$ac_cv_search_clock_gettime
21027 if test "$ac_res" != no; then :
21028   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
21029   test "$ac_cv_search_clock_gettime" = "none required" ||
21030                     LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime
21031 fi
21032
21033     for ac_func in clock_gettime clock_settime
21034 do :
21035   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
21036 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
21037 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
21038   cat >>confdefs.h <<_ACEOF
21039 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
21040 _ACEOF
21041
21042 fi
21043 done
21044
21045   LIBS=$gl_saved_libs
21046
21047
21048
21049 $as_echo "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h
21050
21051
21052
21053
21054
21055   if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
21056     REPLACE_CLOSE=1
21057   fi
21058
21059
21060
21061
21062
21063   :
21064
21065
21066
21067
21068
21069   if test $ac_cv_header_sys_socket_h != yes; then
21070                     for ac_header in winsock2.h
21071 do :
21072   ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
21073 if test "x$ac_cv_header_winsock2_h" = xyes; then :
21074   cat >>confdefs.h <<_ACEOF
21075 #define HAVE_WINSOCK2_H 1
21076 _ACEOF
21077
21078 fi
21079
21080 done
21081
21082   fi
21083   if test "$ac_cv_header_winsock2_h" = yes; then
21084     HAVE_WINSOCK2_H=1
21085     UNISTD_H_HAVE_WINSOCK2_H=1
21086     SYS_IOCTL_H_HAVE_WINSOCK2_H=1
21087   else
21088     HAVE_WINSOCK2_H=0
21089   fi
21090
21091
21092     if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
21093                         REPLACE_CLOSE=1
21094     fi
21095
21096
21097     if test $REPLACE_CLOSE = 0; then
21098
21099
21100
21101   :
21102
21103
21104
21105
21106
21107   if test $ac_cv_func_fchdir = no; then
21108     HAVE_FCHDIR=0
21109   fi
21110
21111       if test $HAVE_FCHDIR = 0; then
21112         REPLACE_CLOSE=1
21113       fi
21114     fi
21115
21116
21117   if test $REPLACE_CLOSE = 1; then
21118
21119
21120
21121
21122
21123
21124
21125
21126   gl_LIBOBJS="$gl_LIBOBJS close.$ac_objext"
21127
21128   fi
21129
21130
21131
21132
21133
21134           GNULIB_CLOSE=1
21135
21136
21137
21138
21139
21140 $as_echo "#define GNULIB_TEST_CLOSE 1" >>confdefs.h
21141
21142
21143
21144
21145   :
21146
21147
21148
21149 cat >>confdefs.h <<_ACEOF
21150 #define GNULIB_CLOSE_STREAM 1
21151 _ACEOF
21152
21153
21154
21155
21156
21157   for ac_func in closedir
21158 do :
21159   ac_fn_c_check_func "$LINENO" "closedir" "ac_cv_func_closedir"
21160 if test "x$ac_cv_func_closedir" = xyes; then :
21161   cat >>confdefs.h <<_ACEOF
21162 #define HAVE_CLOSEDIR 1
21163 _ACEOF
21164
21165 fi
21166 done
21167
21168   if test $ac_cv_func_closedir = no; then
21169     HAVE_CLOSEDIR=0
21170   fi
21171
21172
21173
21174
21175   :
21176
21177
21178
21179
21180
21181   if test $ac_cv_func_fchdir = no; then
21182     HAVE_FCHDIR=0
21183   fi
21184
21185     if test $HAVE_FCHDIR = 0; then
21186       if test $HAVE_CLOSEDIR = 1; then
21187         REPLACE_CLOSEDIR=1
21188       fi
21189     fi
21190
21191
21192   if test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1; then
21193
21194
21195
21196
21197
21198
21199
21200
21201   gl_LIBOBJS="$gl_LIBOBJS closedir.$ac_objext"
21202
21203   fi
21204
21205
21206
21207
21208
21209           GNULIB_CLOSEDIR=1
21210
21211
21212
21213
21214
21215 $as_echo "#define GNULIB_TEST_CLOSEDIR 1" >>confdefs.h
21216
21217
21218
21219
21220   :
21221
21222
21223   :
21224
21225
21226           if test "x$datarootdir" = x; then
21227     datarootdir='${datadir}'
21228
21229   fi
21230     if test "x$docdir" = x; then
21231     docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
21232
21233   fi
21234     if test "x$htmldir" = x; then
21235     htmldir='${docdir}'
21236
21237   fi
21238   if test "x$dvidir" = x; then
21239     dvidir='${docdir}'
21240
21241   fi
21242   if test "x$pdfdir" = x; then
21243     pdfdir='${docdir}'
21244
21245   fi
21246   if test "x$psdir" = x; then
21247     psdir='${docdir}'
21248
21249   fi
21250   if test "x$lispdir" = x; then
21251     lispdir='${datarootdir}/emacs/site-lisp'
21252
21253   fi
21254   if test "x$localedir" = x; then
21255     localedir='${datarootdir}/locale'
21256
21257   fi
21258     if test "x$runstatedir" = x; then
21259     runstatedir='${localstatedir}/run'
21260
21261   fi
21262
21263       pkglibexecdir='${libexecdir}/${PACKAGE}'
21264
21265
21266
21267
21268
21269
21270
21271
21272
21273
21274
21275
21276
21277      if test $gl_cv_have_include_next = yes; then
21278        gl_cv_next_ctype_h='<'ctype.h'>'
21279      else
21280        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <ctype.h>" >&5
21281 $as_echo_n "checking absolute name of <ctype.h>... " >&6; }
21282 if ${gl_cv_next_ctype_h+:} false; then :
21283   $as_echo_n "(cached) " >&6
21284 else
21285
21286
21287
21288   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21289 /* end confdefs.h.  */
21290 #include <ctype.h>
21291 _ACEOF
21292                 case "$host_os" in
21293     aix*) gl_absname_cpp="$ac_cpp -C" ;;
21294     *)    gl_absname_cpp="$ac_cpp" ;;
21295   esac
21296
21297   case "$host_os" in
21298     mingw*)
21299                                           gl_dirsep_regex='[/\\]'
21300       ;;
21301     *)
21302       gl_dirsep_regex='\/'
21303       ;;
21304   esac
21305       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21306   gl_header_literal_regex=`echo 'ctype.h' \
21307                            | sed -e "$gl_make_literal_regex_sed"`
21308   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21309       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21310       s|^/[^/]|//&|
21311       p
21312       q
21313     }'
21314
21315         gl_cv_absolute_ctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21316   sed -n "$gl_absolute_header_sed"`
21317
21318            gl_header=$gl_cv_absolute_ctype_h
21319            gl_cv_next_ctype_h='"'$gl_header'"'
21320
21321
21322 fi
21323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_ctype_h" >&5
21324 $as_echo "$gl_cv_next_ctype_h" >&6; }
21325      fi
21326      NEXT_CTYPE_H=$gl_cv_next_ctype_h
21327
21328      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21329        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21330        gl_next_as_first_directive='<'ctype.h'>'
21331      else
21332        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21333        gl_next_as_first_directive=$gl_cv_next_ctype_h
21334      fi
21335      NEXT_AS_FIRST_DIRECTIVE_CTYPE_H=$gl_next_as_first_directive
21336
21337
21338
21339
21340
21341
21342     for gl_func in isblank; do
21343     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
21344     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
21345 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
21346 if eval \${$as_gl_Symbol+:} false; then :
21347   $as_echo_n "(cached) " >&6
21348 else
21349   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21350 /* end confdefs.h.  */
21351 #include <ctype.h>
21352
21353 int
21354 main ()
21355 {
21356 #undef $gl_func
21357   (void) $gl_func;
21358   ;
21359   return 0;
21360 }
21361 _ACEOF
21362 if ac_fn_c_try_compile "$LINENO"; then :
21363   eval "$as_gl_Symbol=yes"
21364 else
21365   eval "$as_gl_Symbol=no"
21366 fi
21367 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21368 fi
21369 eval ac_res=\$$as_gl_Symbol
21370                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
21371 $as_echo "$ac_res" >&6; }
21372     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
21373   cat >>confdefs.h <<_ACEOF
21374 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
21375 _ACEOF
21376
21377                      eval ac_cv_have_decl_$gl_func=yes
21378 fi
21379       done
21380
21381
21382   :
21383       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_ino member in directory struct" >&5
21384 $as_echo_n "checking for d_ino member in directory struct... " >&6; }
21385 if ${gl_cv_struct_dirent_d_ino+:} false; then :
21386   $as_echo_n "(cached) " >&6
21387 else
21388   if test "$cross_compiling" = yes; then :
21389   case "$host_os" in
21390                            # Guess yes on glibc systems with Linux kernel.
21391               linux*-gnu*) gl_cv_struct_dirent_d_ino="guessing yes" ;;
21392                            # If we don't know, assume the worst.
21393               *)           gl_cv_struct_dirent_d_ino="guessing no" ;;
21394             esac
21395
21396 else
21397   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21398 /* end confdefs.h.  */
21399 #include <sys/types.h>
21400              #include <sys/stat.h>
21401              #include <dirent.h>
21402
21403 int
21404 main ()
21405 {
21406 DIR *dp = opendir (".");
21407              struct dirent *e;
21408              struct stat st;
21409              if (! dp)
21410                return 1;
21411              e = readdir (dp);
21412              if (! e)
21413                return 2;
21414              if (lstat (e->d_name, &st) != 0)
21415                return 3;
21416              if (e->d_ino != st.st_ino)
21417                return 4;
21418              return 0;
21419
21420   ;
21421   return 0;
21422 }
21423 _ACEOF
21424 if ac_fn_c_try_run "$LINENO"; then :
21425   gl_cv_struct_dirent_d_ino=yes
21426 else
21427   gl_cv_struct_dirent_d_ino=no
21428 fi
21429 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21430   conftest.$ac_objext conftest.beam conftest.$ac_ext
21431 fi
21432
21433 fi
21434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_ino" >&5
21435 $as_echo "$gl_cv_struct_dirent_d_ino" >&6; }
21436    case "$gl_cv_struct_dirent_d_ino" in
21437      *yes)
21438
21439 $as_echo "#define D_INO_IN_DIRENT 1" >>confdefs.h
21440
21441        ;;
21442    esac
21443
21444
21445   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_type member in directory struct" >&5
21446 $as_echo_n "checking for d_type member in directory struct... " >&6; }
21447 if ${gl_cv_struct_dirent_d_type+:} false; then :
21448   $as_echo_n "(cached) " >&6
21449 else
21450   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21451 /* end confdefs.h.  */
21452
21453 #include <sys/types.h>
21454 #include <dirent.h>
21455
21456 int
21457 main ()
21458 {
21459 struct dirent dp; dp.d_type = 0;
21460   ;
21461   return 0;
21462 }
21463 _ACEOF
21464 if ac_fn_c_try_link "$LINENO"; then :
21465   gl_cv_struct_dirent_d_type=yes
21466 else
21467   gl_cv_struct_dirent_d_type=no
21468 fi
21469 rm -f core conftest.err conftest.$ac_objext \
21470     conftest$ac_exeext conftest.$ac_ext
21471
21472
21473 fi
21474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_type" >&5
21475 $as_echo "$gl_cv_struct_dirent_d_type" >&6; }
21476    if test $gl_cv_struct_dirent_d_type = yes; then
21477
21478 $as_echo "#define HAVE_STRUCT_DIRENT_D_TYPE 1" >>confdefs.h
21479
21480    fi
21481
21482
21483
21484
21485
21486
21487
21488
21489
21490
21491
21492   :
21493
21494
21495
21496
21497
21498
21499
21500
21501      if test $gl_cv_have_include_next = yes; then
21502        gl_cv_next_dirent_h='<'dirent.h'>'
21503      else
21504        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
21505 $as_echo_n "checking absolute name of <dirent.h>... " >&6; }
21506 if ${gl_cv_next_dirent_h+:} false; then :
21507   $as_echo_n "(cached) " >&6
21508 else
21509
21510              if test $ac_cv_header_dirent_h = yes; then
21511
21512
21513
21514
21515   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21516 /* end confdefs.h.  */
21517 #include <dirent.h>
21518 _ACEOF
21519                 case "$host_os" in
21520     aix*) gl_absname_cpp="$ac_cpp -C" ;;
21521     *)    gl_absname_cpp="$ac_cpp" ;;
21522   esac
21523
21524   case "$host_os" in
21525     mingw*)
21526                                           gl_dirsep_regex='[/\\]'
21527       ;;
21528     *)
21529       gl_dirsep_regex='\/'
21530       ;;
21531   esac
21532       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21533   gl_header_literal_regex=`echo 'dirent.h' \
21534                            | sed -e "$gl_make_literal_regex_sed"`
21535   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21536       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21537       s|^/[^/]|//&|
21538       p
21539       q
21540     }'
21541
21542         gl_cv_absolute_dirent_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21543   sed -n "$gl_absolute_header_sed"`
21544
21545            gl_header=$gl_cv_absolute_dirent_h
21546            gl_cv_next_dirent_h='"'$gl_header'"'
21547           else
21548                gl_cv_next_dirent_h='<'dirent.h'>'
21549              fi
21550
21551
21552 fi
21553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
21554 $as_echo "$gl_cv_next_dirent_h" >&6; }
21555      fi
21556      NEXT_DIRENT_H=$gl_cv_next_dirent_h
21557
21558      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21559        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21560        gl_next_as_first_directive='<'dirent.h'>'
21561      else
21562        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21563        gl_next_as_first_directive=$gl_cv_next_dirent_h
21564      fi
21565      NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive
21566
21567
21568
21569
21570   if test $ac_cv_header_dirent_h = yes; then
21571     HAVE_DIRENT_H=1
21572   else
21573     HAVE_DIRENT_H=0
21574   fi
21575
21576
21577
21578     for gl_func in alphasort closedir dirfd fdopendir opendir readdir rewinddir scandir; do
21579     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
21580     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
21581 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
21582 if eval \${$as_gl_Symbol+:} false; then :
21583   $as_echo_n "(cached) " >&6
21584 else
21585   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21586 /* end confdefs.h.  */
21587 #include <dirent.h>
21588
21589 int
21590 main ()
21591 {
21592 #undef $gl_func
21593   (void) $gl_func;
21594   ;
21595   return 0;
21596 }
21597 _ACEOF
21598 if ac_fn_c_try_compile "$LINENO"; then :
21599   eval "$as_gl_Symbol=yes"
21600 else
21601   eval "$as_gl_Symbol=no"
21602 fi
21603 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21604 fi
21605 eval ac_res=\$$as_gl_Symbol
21606                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
21607 $as_echo "$ac_res" >&6; }
21608     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
21609   cat >>confdefs.h <<_ACEOF
21610 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
21611 _ACEOF
21612
21613                      eval ac_cv_have_decl_$gl_func=yes
21614 fi
21615       done
21616
21617
21618
21619
21620   :
21621
21622
21623
21624
21625
21626
21627
21628
21629 cat >>confdefs.h <<_ACEOF
21630 #define GNULIB_DIRENT_SAFER 1
21631 _ACEOF
21632
21633
21634
21635
21636
21637
21638
21639   for ac_func in dirfd
21640 do :
21641   ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd"
21642 if test "x$ac_cv_func_dirfd" = xyes; then :
21643   cat >>confdefs.h <<_ACEOF
21644 #define HAVE_DIRFD 1
21645 _ACEOF
21646
21647 fi
21648 done
21649
21650   ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
21651       #include <dirent.h>
21652 "
21653 if test "x$ac_cv_have_decl_dirfd" = xyes; then :
21654   ac_have_decl=1
21655 else
21656   ac_have_decl=0
21657 fi
21658
21659 cat >>confdefs.h <<_ACEOF
21660 #define HAVE_DECL_DIRFD $ac_have_decl
21661 _ACEOF
21662
21663   if test $ac_cv_have_decl_dirfd = no; then
21664     HAVE_DECL_DIRFD=0
21665   fi
21666
21667   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dirfd is a macro" >&5
21668 $as_echo_n "checking whether dirfd is a macro... " >&6; }
21669 if ${gl_cv_func_dirfd_macro+:} false; then :
21670   $as_echo_n "(cached) " >&6
21671 else
21672   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21673 /* end confdefs.h.  */
21674
21675 #include <sys/types.h>
21676 #include <dirent.h>
21677 #ifdef dirfd
21678  dirent_header_defines_dirfd
21679 #endif
21680 _ACEOF
21681 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21682   $EGREP "dirent_header_defines_dirfd" >/dev/null 2>&1; then :
21683   gl_cv_func_dirfd_macro=yes
21684 else
21685   gl_cv_func_dirfd_macro=no
21686 fi
21687 rm -f conftest*
21688
21689 fi
21690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dirfd_macro" >&5
21691 $as_echo "$gl_cv_func_dirfd_macro" >&6; }
21692
21693   # Use the replacement only if we have no function or macro with that name.
21694   if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no; then
21695     if test $ac_cv_have_decl_dirfd = yes; then
21696       # If the system declares dirfd already, let's declare rpl_dirfd instead.
21697       REPLACE_DIRFD=1
21698     fi
21699   fi
21700
21701   if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no; then
21702
21703
21704
21705
21706
21707
21708
21709
21710   gl_LIBOBJS="$gl_LIBOBJS dirfd.$ac_objext"
21711
21712
21713   { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get the file descriptor associated with an open DIR*" >&5
21714 $as_echo_n "checking how to get the file descriptor associated with an open DIR*... " >&6; }
21715 if ${gl_cv_sys_dir_fd_member_name+:} false; then :
21716   $as_echo_n "(cached) " >&6
21717 else
21718
21719       dirfd_save_CFLAGS=$CFLAGS
21720       for ac_expr in d_fd dd_fd; do
21721
21722         CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr"
21723         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21724 /* end confdefs.h.  */
21725
21726            #include <sys/types.h>
21727            #include <dirent.h>
21728 int
21729 main ()
21730 {
21731 DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;
21732   ;
21733   return 0;
21734 }
21735 _ACEOF
21736 if ac_fn_c_try_compile "$LINENO"; then :
21737   dir_fd_found=yes
21738
21739 fi
21740 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21741         CFLAGS=$dirfd_save_CFLAGS
21742         test "$dir_fd_found" = yes && break
21743       done
21744       test "$dir_fd_found" = yes || ac_expr=no_such_member
21745
21746       gl_cv_sys_dir_fd_member_name=$ac_expr
21747
21748
21749 fi
21750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_dir_fd_member_name" >&5
21751 $as_echo "$gl_cv_sys_dir_fd_member_name" >&6; }
21752   if test $gl_cv_sys_dir_fd_member_name != no_such_member; then
21753
21754 cat >>confdefs.h <<_ACEOF
21755 #define DIR_FD_MEMBER_NAME $gl_cv_sys_dir_fd_member_name
21756 _ACEOF
21757
21758   fi
21759
21760
21761   fi
21762
21763
21764
21765
21766
21767           GNULIB_DIRFD=1
21768
21769
21770
21771
21772
21773 $as_echo "#define GNULIB_TEST_DIRFD 1" >>confdefs.h
21774
21775
21776
21777
21778
21779
21780
21781
21782 cat >>confdefs.h <<_ACEOF
21783 #define GNULIB_DIRNAME 1
21784 _ACEOF
21785
21786
21787
21788
21789
21790
21791
21792
21793   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
21794 $as_echo_n "checking whether // is distinct from /... " >&6; }
21795 if ${gl_cv_double_slash_root+:} false; then :
21796   $as_echo_n "(cached) " >&6
21797 else
21798    if test x"$cross_compiling" = xyes ; then
21799         # When cross-compiling, there is no way to tell whether // is special
21800         # short of a list of hosts.  However, the only known hosts to date
21801         # that have a distinct // are Apollo DomainOS (too old to port to),
21802         # Cygwin, and z/OS.  If anyone knows of another system for which // has
21803         # special semantics and is distinct from /, please report it to
21804         # <bug-gnulib@gnu.org>.
21805         case $host in
21806           *-cygwin | i370-ibm-openedition)
21807             gl_cv_double_slash_root=yes ;;
21808           *)
21809             # Be optimistic and assume that / and // are the same when we
21810             # don't know.
21811             gl_cv_double_slash_root='unknown, assuming no' ;;
21812         esac
21813       else
21814         set x `ls -di / // 2>/dev/null`
21815         if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
21816           gl_cv_double_slash_root=no
21817         else
21818           gl_cv_double_slash_root=yes
21819         fi
21820       fi
21821 fi
21822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
21823 $as_echo "$gl_cv_double_slash_root" >&6; }
21824   if test "$gl_cv_double_slash_root" = yes; then
21825
21826 $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
21827
21828   fi
21829
21830
21831
21832
21833   if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
21834     REPLACE_DUP=1
21835   fi
21836
21837
21838
21839
21840   :
21841
21842
21843
21844
21845
21846   if test $ac_cv_func_fchdir = no; then
21847     HAVE_FCHDIR=0
21848   fi
21849
21850     if test $HAVE_FCHDIR = 0; then
21851       REPLACE_DUP=1
21852     fi
21853
21854
21855   if test $REPLACE_DUP = 1; then
21856
21857
21858
21859
21860
21861
21862
21863
21864   gl_LIBOBJS="$gl_LIBOBJS dup.$ac_objext"
21865
21866     :
21867   fi
21868
21869
21870
21871
21872
21873           GNULIB_DUP=1
21874
21875
21876
21877
21878
21879 $as_echo "#define GNULIB_TEST_DUP 1" >>confdefs.h
21880
21881
21882
21883
21884
21885
21886
21887
21888 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
21889
21890
21891   if test $HAVE_DUP2 = 1; then
21892     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
21893 $as_echo_n "checking whether dup2 works... " >&6; }
21894 if ${gl_cv_func_dup2_works+:} false; then :
21895   $as_echo_n "(cached) " >&6
21896 else
21897   if test "$cross_compiling" = yes; then :
21898   case "$host_os" in
21899            mingw*) # on this platform, dup2 always returns 0 for success
21900              gl_cv_func_dup2_works="guessing no" ;;
21901            cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
21902              gl_cv_func_dup2_works="guessing no" ;;
21903            linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a
21904                    # closed fd may yield -EBADF instead of -1 / errno=EBADF.
21905              gl_cv_func_dup2_works="guessing no" ;;
21906            freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF.
21907              gl_cv_func_dup2_works="guessing no" ;;
21908            haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
21909              gl_cv_func_dup2_works="guessing no" ;;
21910            *) gl_cv_func_dup2_works="guessing yes" ;;
21911          esac
21912 else
21913   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21914 /* end confdefs.h.  */
21915
21916          #include <unistd.h>
21917 #include <fcntl.h>
21918 #include <errno.h>
21919 int
21920 main ()
21921 {
21922 int result = 0;
21923 #ifdef FD_CLOEXEC
21924             if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
21925               result |= 1;
21926 #endif
21927             if (dup2 (1, 1) == 0)
21928               result |= 2;
21929 #ifdef FD_CLOEXEC
21930             if (fcntl (1, F_GETFD) != FD_CLOEXEC)
21931               result |= 4;
21932 #endif
21933             close (0);
21934             if (dup2 (0, 0) != -1)
21935               result |= 8;
21936             /* Many gnulib modules require POSIX conformance of EBADF.  */
21937             if (dup2 (2, 1000000) == -1 && errno != EBADF)
21938               result |= 16;
21939             /* Flush out some cygwin core dumps.  */
21940             if (dup2 (2, -1) != -1 || errno != EBADF)
21941               result |= 32;
21942             dup2 (2, 255);
21943             dup2 (2, 256);
21944             return result;
21945
21946   ;
21947   return 0;
21948 }
21949
21950 _ACEOF
21951 if ac_fn_c_try_run "$LINENO"; then :
21952   gl_cv_func_dup2_works=yes
21953 else
21954   gl_cv_func_dup2_works=no
21955 fi
21956 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21957   conftest.$ac_objext conftest.beam conftest.$ac_ext
21958 fi
21959
21960
21961 fi
21962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
21963 $as_echo "$gl_cv_func_dup2_works" >&6; }
21964     case "$gl_cv_func_dup2_works" in
21965       *yes) ;;
21966       *)
21967         REPLACE_DUP2=1
21968         for ac_func in setdtablesize
21969 do :
21970   ac_fn_c_check_func "$LINENO" "setdtablesize" "ac_cv_func_setdtablesize"
21971 if test "x$ac_cv_func_setdtablesize" = xyes; then :
21972   cat >>confdefs.h <<_ACEOF
21973 #define HAVE_SETDTABLESIZE 1
21974 _ACEOF
21975
21976 fi
21977 done
21978
21979         ;;
21980     esac
21981   fi
21982
21983
21984
21985
21986   :
21987
21988
21989
21990
21991
21992   if test $ac_cv_func_fchdir = no; then
21993     HAVE_FCHDIR=0
21994   fi
21995
21996     if test $HAVE_FCHDIR = 0; then
21997       if test $HAVE_DUP2 = 1; then
21998         REPLACE_DUP2=1
21999       fi
22000     fi
22001
22002
22003   if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
22004
22005
22006
22007
22008
22009
22010
22011
22012   gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
22013
22014
22015   fi
22016
22017
22018
22019
22020
22021           GNULIB_DUP2=1
22022
22023
22024
22025
22026
22027 $as_echo "#define GNULIB_TEST_DUP2 1" >>confdefs.h
22028
22029
22030
22031
22032
22033
22034
22035
22036
22037           GNULIB_ENVIRON=1
22038
22039
22040
22041
22042
22043 $as_echo "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h
22044
22045
22046
22047
22048
22049       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
22050 $as_echo_n "checking for error_at_line... " >&6; }
22051 if ${ac_cv_lib_error_at_line+:} false; then :
22052   $as_echo_n "(cached) " >&6
22053 else
22054   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22055 /* end confdefs.h.  */
22056 #include <error.h>
22057 int
22058 main ()
22059 {
22060 error_at_line (0, 0, "", 0, "an error occurred");
22061   ;
22062   return 0;
22063 }
22064 _ACEOF
22065 if ac_fn_c_try_link "$LINENO"; then :
22066   ac_cv_lib_error_at_line=yes
22067 else
22068   ac_cv_lib_error_at_line=no
22069 fi
22070 rm -f core conftest.err conftest.$ac_objext \
22071     conftest$ac_exeext conftest.$ac_ext
22072 fi
22073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
22074 $as_echo "$ac_cv_lib_error_at_line" >&6; }
22075
22076   if test $ac_cv_lib_error_at_line = no; then
22077
22078
22079
22080
22081
22082
22083
22084
22085   gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext"
22086
22087
22088
22089   :
22090
22091   fi
22092
22093
22094   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error:3:c-format"
22095
22096
22097
22098   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error_at_line:5:c-format"
22099
22100
22101
22102
22103
22104
22105   for ac_func in euidaccess
22106 do :
22107   ac_fn_c_check_func "$LINENO" "euidaccess" "ac_cv_func_euidaccess"
22108 if test "x$ac_cv_func_euidaccess" = xyes; then :
22109   cat >>confdefs.h <<_ACEOF
22110 #define HAVE_EUIDACCESS 1
22111 _ACEOF
22112
22113 fi
22114 done
22115
22116   if test $ac_cv_func_euidaccess = no; then
22117     HAVE_EUIDACCESS=0
22118   fi
22119
22120   if test $HAVE_EUIDACCESS = 0; then
22121
22122
22123
22124
22125
22126
22127
22128
22129   gl_LIBOBJS="$gl_LIBOBJS euidaccess.$ac_objext"
22130
22131
22132
22133   :
22134
22135
22136
22137
22138
22139     for ac_header in libgen.h
22140 do :
22141   ac_fn_c_check_header_mongrel "$LINENO" "libgen.h" "ac_cv_header_libgen_h" "$ac_includes_default"
22142 if test "x$ac_cv_header_libgen_h" = xyes; then :
22143   cat >>confdefs.h <<_ACEOF
22144 #define HAVE_LIBGEN_H 1
22145 _ACEOF
22146
22147 fi
22148
22149 done
22150
22151
22152         ac_fn_c_check_func "$LINENO" "getgroups" "ac_cv_func_getgroups"
22153 if test "x$ac_cv_func_getgroups" = xyes; then :
22154
22155 fi
22156
22157
22158   # If we don't yet have getgroups, see if it's in -lbsd.
22159   # This is reported to be necessary on an ITOS 3000WS running SEIUX 3.1.
22160   ac_save_LIBS=$LIBS
22161   if test $ac_cv_func_getgroups = no; then
22162     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getgroups in -lbsd" >&5
22163 $as_echo_n "checking for getgroups in -lbsd... " >&6; }
22164 if ${ac_cv_lib_bsd_getgroups+:} false; then :
22165   $as_echo_n "(cached) " >&6
22166 else
22167   ac_check_lib_save_LIBS=$LIBS
22168 LIBS="-lbsd  $LIBS"
22169 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22170 /* end confdefs.h.  */
22171
22172 /* Override any GCC internal prototype to avoid an error.
22173    Use char because int might match the return type of a GCC
22174    builtin and then its argument prototype would still apply.  */
22175 #ifdef __cplusplus
22176 extern "C"
22177 #endif
22178 char getgroups ();
22179 int
22180 main ()
22181 {
22182 return getgroups ();
22183   ;
22184   return 0;
22185 }
22186 _ACEOF
22187 if ac_fn_c_try_link "$LINENO"; then :
22188   ac_cv_lib_bsd_getgroups=yes
22189 else
22190   ac_cv_lib_bsd_getgroups=no
22191 fi
22192 rm -f core conftest.err conftest.$ac_objext \
22193     conftest$ac_exeext conftest.$ac_ext
22194 LIBS=$ac_check_lib_save_LIBS
22195 fi
22196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_getgroups" >&5
22197 $as_echo "$ac_cv_lib_bsd_getgroups" >&6; }
22198 if test "x$ac_cv_lib_bsd_getgroups" = xyes; then :
22199   GETGROUPS_LIB=-lbsd
22200 fi
22201
22202   fi
22203
22204   # Run the program to test the functionality of the system-supplied
22205   # getgroups function only if there is such a function.
22206   if test $ac_cv_func_getgroups = yes; then
22207     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getgroups" >&5
22208 $as_echo_n "checking for working getgroups... " >&6; }
22209 if ${ac_cv_func_getgroups_works+:} false; then :
22210   $as_echo_n "(cached) " >&6
22211 else
22212   if test "$cross_compiling" = yes; then :
22213   case "$host_os" in # ((
22214                     # Guess yes on glibc systems.
22215             *-gnu*) ac_cv_func_getgroups_works="guessing yes" ;;
22216                     # If we don't know, assume the worst.
22217             *)      ac_cv_func_getgroups_works="guessing no" ;;
22218           esac
22219
22220 else
22221   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22222 /* end confdefs.h.  */
22223 $ac_includes_default
22224 int
22225 main ()
22226 {
22227 /* On Ultrix 4.3, getgroups (0, 0) always fails.  */
22228               return getgroups (0, 0) == -1;
22229   ;
22230   return 0;
22231 }
22232
22233 _ACEOF
22234 if ac_fn_c_try_run "$LINENO"; then :
22235   ac_cv_func_getgroups_works=yes
22236 else
22237   ac_cv_func_getgroups_works=no
22238 fi
22239 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22240   conftest.$ac_objext conftest.beam conftest.$ac_ext
22241 fi
22242
22243
22244 fi
22245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getgroups_works" >&5
22246 $as_echo "$ac_cv_func_getgroups_works" >&6; }
22247   else
22248     ac_cv_func_getgroups_works=no
22249   fi
22250   case "$ac_cv_func_getgroups_works" in
22251     *yes)
22252
22253 $as_echo "#define HAVE_GETGROUPS 1" >>confdefs.h
22254
22255       ;;
22256   esac
22257   LIBS=$ac_save_LIBS
22258
22259
22260   # Solaris 9 and 10 need -lgen to get the eaccess function.
22261   # Save and restore LIBS so -lgen isn't added to it.  Otherwise, *all*
22262   # programs in the package would end up linked with that potentially-shared
22263   # library, inducing unnecessary run-time overhead.
22264   LIB_EACCESS=
22265
22266   gl_saved_libs=$LIBS
22267     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing eaccess" >&5
22268 $as_echo_n "checking for library containing eaccess... " >&6; }
22269 if ${ac_cv_search_eaccess+:} false; then :
22270   $as_echo_n "(cached) " >&6
22271 else
22272   ac_func_search_save_LIBS=$LIBS
22273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22274 /* end confdefs.h.  */
22275
22276 /* Override any GCC internal prototype to avoid an error.
22277    Use char because int might match the return type of a GCC
22278    builtin and then its argument prototype would still apply.  */
22279 #ifdef __cplusplus
22280 extern "C"
22281 #endif
22282 char eaccess ();
22283 int
22284 main ()
22285 {
22286 return eaccess ();
22287   ;
22288   return 0;
22289 }
22290 _ACEOF
22291 for ac_lib in '' gen; do
22292   if test -z "$ac_lib"; then
22293     ac_res="none required"
22294   else
22295     ac_res=-l$ac_lib
22296     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
22297   fi
22298   if ac_fn_c_try_link "$LINENO"; then :
22299   ac_cv_search_eaccess=$ac_res
22300 fi
22301 rm -f core conftest.err conftest.$ac_objext \
22302     conftest$ac_exeext
22303   if ${ac_cv_search_eaccess+:} false; then :
22304   break
22305 fi
22306 done
22307 if ${ac_cv_search_eaccess+:} false; then :
22308
22309 else
22310   ac_cv_search_eaccess=no
22311 fi
22312 rm conftest.$ac_ext
22313 LIBS=$ac_func_search_save_LIBS
22314 fi
22315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_eaccess" >&5
22316 $as_echo "$ac_cv_search_eaccess" >&6; }
22317 ac_res=$ac_cv_search_eaccess
22318 if test "$ac_res" != no; then :
22319   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
22320   test "$ac_cv_search_eaccess" = "none required" ||
22321                     LIB_EACCESS=$ac_cv_search_eaccess
22322 fi
22323
22324     for ac_func in eaccess
22325 do :
22326   ac_fn_c_check_func "$LINENO" "eaccess" "ac_cv_func_eaccess"
22327 if test "x$ac_cv_func_eaccess" = xyes; then :
22328   cat >>confdefs.h <<_ACEOF
22329 #define HAVE_EACCESS 1
22330 _ACEOF
22331
22332 fi
22333 done
22334
22335   LIBS=$gl_saved_libs
22336
22337   fi
22338
22339
22340
22341
22342
22343           GNULIB_EUIDACCESS=1
22344
22345
22346
22347
22348
22349 $as_echo "#define GNULIB_TEST_EUIDACCESS 1" >>confdefs.h
22350
22351
22352
22353
22354
22355
22356
22357
22358
22359
22360   :
22361
22362
22363
22364
22365
22366   if test $ac_cv_func_faccessat = no; then
22367     HAVE_FACCESSAT=0
22368   fi
22369
22370   if test $HAVE_FACCESSAT = 0; then
22371
22372
22373
22374
22375
22376
22377
22378
22379   gl_LIBOBJS="$gl_LIBOBJS faccessat.$ac_objext"
22380
22381
22382   for ac_func in access
22383 do :
22384   ac_fn_c_check_func "$LINENO" "access" "ac_cv_func_access"
22385 if test "x$ac_cv_func_access" = xyes; then :
22386   cat >>confdefs.h <<_ACEOF
22387 #define HAVE_ACCESS 1
22388 _ACEOF
22389
22390 fi
22391 done
22392
22393
22394   fi
22395
22396
22397 cat >>confdefs.h <<_ACEOF
22398 #define GNULIB_FACCESSAT 1
22399 _ACEOF
22400
22401
22402
22403
22404
22405
22406
22407           GNULIB_FACCESSAT=1
22408
22409
22410
22411
22412
22413 $as_echo "#define GNULIB_TEST_FACCESSAT 1" >>confdefs.h
22414
22415
22416
22417
22418
22419
22420
22421
22422   :
22423
22424
22425
22426
22427
22428   if test $ac_cv_have_decl_fchdir = no; then
22429     HAVE_DECL_FCHDIR=0
22430   fi
22431
22432
22433   if test $HAVE_FCHDIR = 0; then
22434
22435
22436
22437
22438
22439
22440
22441
22442   gl_LIBOBJS="$gl_LIBOBJS fchdir.$ac_objext"
22443
22444     :
22445
22446 $as_echo "#define REPLACE_FCHDIR 1" >>confdefs.h
22447
22448                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open can visit directories" >&5
22449 $as_echo_n "checking whether open can visit directories... " >&6; }
22450 if ${gl_cv_func_open_directory_works+:} false; then :
22451   $as_echo_n "(cached) " >&6
22452 else
22453   if test "$cross_compiling" = yes; then :
22454   case "$host_os" in
22455                    # Guess yes on glibc systems.
22456            *-gnu*) gl_cv_func_open_directory_works="guessing yes" ;;
22457                    # If we don't know, assume the worst.
22458            *)      gl_cv_func_open_directory_works="guessing no" ;;
22459          esac
22460
22461 else
22462   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22463 /* end confdefs.h.  */
22464 #include <fcntl.h>
22465
22466 int
22467 main ()
22468 {
22469 return open(".", O_RDONLY) < 0;
22470   ;
22471   return 0;
22472 }
22473 _ACEOF
22474 if ac_fn_c_try_run "$LINENO"; then :
22475   gl_cv_func_open_directory_works=yes
22476 else
22477   gl_cv_func_open_directory_works=no
22478 fi
22479 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22480   conftest.$ac_objext conftest.beam conftest.$ac_ext
22481 fi
22482
22483 fi
22484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_directory_works" >&5
22485 $as_echo "$gl_cv_func_open_directory_works" >&6; }
22486     case "$gl_cv_func_open_directory_works" in
22487       *yes) ;;
22488       *)
22489
22490 $as_echo "#define REPLACE_OPEN_DIRECTORY 1" >>confdefs.h
22491
22492         ;;
22493     esac
22494   fi
22495
22496
22497
22498
22499
22500
22501           GNULIB_FCHDIR=1
22502
22503
22504
22505
22506
22507 $as_echo "#define GNULIB_TEST_FCHDIR 1" >>confdefs.h
22508
22509
22510
22511
22512
22513
22514
22515
22516   :
22517
22518
22519
22520
22521
22522   if test $ac_cv_func_fcntl = no; then
22523
22524
22525
22526   :
22527
22528
22529
22530
22531
22532   if test $ac_cv_func_fcntl = no; then
22533     HAVE_FCNTL=0
22534   else
22535     REPLACE_FCNTL=1
22536   fi
22537
22538   else
22539             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
22540 $as_echo_n "checking whether fcntl handles F_DUPFD correctly... " >&6; }
22541 if ${gl_cv_func_fcntl_f_dupfd_works+:} false; then :
22542   $as_echo_n "(cached) " >&6
22543 else
22544   if test "$cross_compiling" = yes; then :
22545   # Guess that it works on glibc systems
22546           case $host_os in #((
22547             *-gnu*) gl_cv_func_fcntl_f_dupfd_works="guessing yes";;
22548             *)      gl_cv_func_fcntl_f_dupfd_works="guessing no";;
22549           esac
22550 else
22551   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22552 /* end confdefs.h.  */
22553
22554 #include <fcntl.h>
22555 #include <errno.h>
22556
22557 int
22558 main ()
22559 {
22560 int result = 0;
22561       if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
22562       if (errno != EINVAL) result |= 2;
22563       return result;
22564
22565   ;
22566   return 0;
22567 }
22568 _ACEOF
22569 if ac_fn_c_try_run "$LINENO"; then :
22570   gl_cv_func_fcntl_f_dupfd_works=yes
22571 else
22572   gl_cv_func_fcntl_f_dupfd_works=no
22573 fi
22574 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22575   conftest.$ac_objext conftest.beam conftest.$ac_ext
22576 fi
22577
22578 fi
22579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
22580 $as_echo "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
22581     case $gl_cv_func_fcntl_f_dupfd_works in
22582       *yes) ;;
22583       *)
22584
22585
22586   :
22587
22588
22589
22590
22591
22592   if test $ac_cv_func_fcntl = no; then
22593     HAVE_FCNTL=0
22594   else
22595     REPLACE_FCNTL=1
22596   fi
22597
22598
22599 $as_echo "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
22600  ;;
22601     esac
22602
22603         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
22604 $as_echo_n "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
22605 if ${gl_cv_func_fcntl_f_dupfd_cloexec+:} false; then :
22606   $as_echo_n "(cached) " >&6
22607 else
22608   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22609 /* end confdefs.h.  */
22610
22611 #include <fcntl.h>
22612 #ifndef F_DUPFD_CLOEXEC
22613 choke me
22614 #endif
22615
22616 int
22617 main ()
22618 {
22619
22620   ;
22621   return 0;
22622 }
22623 _ACEOF
22624 if ac_fn_c_try_compile "$LINENO"; then :
22625   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22626 /* end confdefs.h.  */
22627
22628 #ifdef __linux__
22629 /* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
22630    it to support the semantics on older kernels that failed with EINVAL.  */
22631 choke me
22632 #endif
22633
22634 int
22635 main ()
22636 {
22637
22638   ;
22639   return 0;
22640 }
22641 _ACEOF
22642 if ac_fn_c_try_compile "$LINENO"; then :
22643   gl_cv_func_fcntl_f_dupfd_cloexec=yes
22644 else
22645   gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
22646 fi
22647 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22648 else
22649   gl_cv_func_fcntl_f_dupfd_cloexec=no
22650 fi
22651 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22652 fi
22653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
22654 $as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
22655     if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then
22656
22657
22658
22659   :
22660
22661
22662
22663
22664
22665   if test $ac_cv_func_fcntl = no; then
22666     HAVE_FCNTL=0
22667   else
22668     REPLACE_FCNTL=1
22669   fi
22670
22671           fi
22672   fi
22673
22674
22675
22676
22677   :
22678
22679
22680
22681
22682
22683   if test $ac_cv_func_fchdir = no; then
22684     HAVE_FCHDIR=0
22685   fi
22686
22687     if test $HAVE_FCHDIR = 0; then
22688
22689
22690
22691   :
22692
22693
22694
22695
22696
22697   if test $ac_cv_func_fcntl = no; then
22698     HAVE_FCNTL=0
22699   else
22700     REPLACE_FCNTL=1
22701   fi
22702
22703     fi
22704
22705
22706   if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
22707
22708
22709
22710
22711
22712
22713
22714
22715   gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
22716
22717   fi
22718
22719
22720
22721
22722
22723           GNULIB_FCNTL=1
22724
22725
22726
22727
22728
22729 $as_echo "#define GNULIB_TEST_FCNTL 1" >>confdefs.h
22730
22731
22732
22733
22734
22735
22736
22737
22738
22739
22740
22741
22742
22743
22744      if test $gl_cv_have_include_next = yes; then
22745        gl_cv_next_fcntl_h='<'fcntl.h'>'
22746      else
22747        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
22748 $as_echo_n "checking absolute name of <fcntl.h>... " >&6; }
22749 if ${gl_cv_next_fcntl_h+:} false; then :
22750   $as_echo_n "(cached) " >&6
22751 else
22752
22753
22754
22755   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22756 /* end confdefs.h.  */
22757 #include <fcntl.h>
22758 _ACEOF
22759                 case "$host_os" in
22760     aix*) gl_absname_cpp="$ac_cpp -C" ;;
22761     *)    gl_absname_cpp="$ac_cpp" ;;
22762   esac
22763
22764   case "$host_os" in
22765     mingw*)
22766                                           gl_dirsep_regex='[/\\]'
22767       ;;
22768     *)
22769       gl_dirsep_regex='\/'
22770       ;;
22771   esac
22772       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22773   gl_header_literal_regex=`echo 'fcntl.h' \
22774                            | sed -e "$gl_make_literal_regex_sed"`
22775   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22776       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22777       s|^/[^/]|//&|
22778       p
22779       q
22780     }'
22781
22782         gl_cv_absolute_fcntl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22783   sed -n "$gl_absolute_header_sed"`
22784
22785            gl_header=$gl_cv_absolute_fcntl_h
22786            gl_cv_next_fcntl_h='"'$gl_header'"'
22787
22788
22789 fi
22790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
22791 $as_echo "$gl_cv_next_fcntl_h" >&6; }
22792      fi
22793      NEXT_FCNTL_H=$gl_cv_next_fcntl_h
22794
22795      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22796        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22797        gl_next_as_first_directive='<'fcntl.h'>'
22798      else
22799        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22800        gl_next_as_first_directive=$gl_cv_next_fcntl_h
22801      fi
22802      NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
22803
22804
22805
22806
22807
22808
22809
22810
22811
22812
22813     for gl_func in fcntl openat; do
22814     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
22815     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
22816 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
22817 if eval \${$as_gl_Symbol+:} false; then :
22818   $as_echo_n "(cached) " >&6
22819 else
22820   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22821 /* end confdefs.h.  */
22822 #include <fcntl.h>
22823
22824 int
22825 main ()
22826 {
22827 #undef $gl_func
22828   (void) $gl_func;
22829   ;
22830   return 0;
22831 }
22832 _ACEOF
22833 if ac_fn_c_try_compile "$LINENO"; then :
22834   eval "$as_gl_Symbol=yes"
22835 else
22836   eval "$as_gl_Symbol=no"
22837 fi
22838 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22839 fi
22840 eval ac_res=\$$as_gl_Symbol
22841                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
22842 $as_echo "$ac_res" >&6; }
22843     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
22844   cat >>confdefs.h <<_ACEOF
22845 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
22846 _ACEOF
22847
22848                      eval ac_cv_have_decl_$gl_func=yes
22849 fi
22850       done
22851
22852
22853
22854
22855
22856
22857
22858 cat >>confdefs.h <<_ACEOF
22859 #define GNULIB_FCNTL_SAFER 1
22860 _ACEOF
22861
22862
22863
22864
22865
22866
22867
22868     ac_fn_c_check_decl "$LINENO" "fdopendir" "ac_cv_have_decl_fdopendir" "
22869 #include <dirent.h>
22870
22871 "
22872 if test "x$ac_cv_have_decl_fdopendir" = xyes; then :
22873   ac_have_decl=1
22874 else
22875   ac_have_decl=0
22876 fi
22877
22878 cat >>confdefs.h <<_ACEOF
22879 #define HAVE_DECL_FDOPENDIR $ac_have_decl
22880 _ACEOF
22881 if test $ac_have_decl = 1; then :
22882
22883 else
22884   HAVE_DECL_FDOPENDIR=0
22885 fi
22886
22887
22888   :
22889
22890
22891
22892
22893
22894   if test $ac_cv_func_fdopendir = no; then
22895     HAVE_FDOPENDIR=0
22896   else
22897     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fdopendir works" >&5
22898 $as_echo_n "checking whether fdopendir works... " >&6; }
22899 if ${gl_cv_func_fdopendir_works+:} false; then :
22900   $as_echo_n "(cached) " >&6
22901 else
22902   if test "$cross_compiling" = yes; then :
22903   case "$host_os" in
22904                     # Guess yes on glibc systems.
22905             *-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;;
22906                     # If we don't know, assume the worst.
22907             *)      gl_cv_func_fdopendir_works="guessing no" ;;
22908           esac
22909
22910 else
22911   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22912 /* end confdefs.h.  */
22913
22914 #include <dirent.h>
22915 #include <fcntl.h>
22916 #include <unistd.h>
22917 #if !HAVE_DECL_FDOPENDIR
22918 extern
22919 # ifdef __cplusplus
22920 "C"
22921 # endif
22922 DIR *fdopendir (int);
22923 #endif
22924
22925 int
22926 main ()
22927 {
22928 int result = 0;
22929      int fd = open ("conftest.c", O_RDONLY);
22930      if (fd < 0) result |= 1;
22931      if (fdopendir (fd)) result |= 2;
22932      if (close (fd)) result |= 4;
22933      return result;
22934   ;
22935   return 0;
22936 }
22937 _ACEOF
22938 if ac_fn_c_try_run "$LINENO"; then :
22939   gl_cv_func_fdopendir_works=yes
22940 else
22941   gl_cv_func_fdopendir_works=no
22942 fi
22943 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22944   conftest.$ac_objext conftest.beam conftest.$ac_ext
22945 fi
22946
22947 fi
22948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopendir_works" >&5
22949 $as_echo "$gl_cv_func_fdopendir_works" >&6; }
22950     case "$gl_cv_func_fdopendir_works" in
22951       *yes) ;;
22952       *)
22953         REPLACE_FDOPENDIR=1
22954         ;;
22955     esac
22956   fi
22957
22958   if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then
22959
22960
22961
22962
22963
22964
22965
22966
22967   gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext"
22968
22969   fi
22970
22971
22972
22973
22974
22975           GNULIB_FDOPENDIR=1
22976
22977
22978
22979
22980
22981 $as_echo "#define GNULIB_TEST_FDOPENDIR 1" >>confdefs.h
22982
22983
22984
22985
22986
22987 cat >>confdefs.h <<_ACEOF
22988 #define GNULIB_FDOPENDIR 1
22989 _ACEOF
22990
22991
22992
22993
22994
22995
22996   :
22997
22998
22999
23000
23001
23002   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
23003 $as_echo_n "checking whether fflush works on input streams... " >&6; }
23004 if ${gl_cv_func_fflush_stdin+:} false; then :
23005   $as_echo_n "(cached) " >&6
23006 else
23007   echo hello world > conftest.txt
23008      if test "$cross_compiling" = yes; then :
23009   gl_cv_func_fflush_stdin=cross
23010 else
23011   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23012 /* end confdefs.h.  */
23013
23014 #include <stdio.h>
23015 #if HAVE_UNISTD_H
23016 # include <unistd.h>
23017 #else /* on Windows with MSVC */
23018 # include <io.h>
23019 #endif
23020
23021 int
23022 main ()
23023 {
23024 FILE *f = fopen ("conftest.txt", "r");
23025          char buffer[10];
23026          int fd;
23027          int c;
23028          if (f == NULL)
23029            return 1;
23030          fd = fileno (f);
23031          if (fd < 0 || fread (buffer, 1, 5, f) != 5)
23032            return 2;
23033          /* For deterministic results, ensure f read a bigger buffer.  */
23034          if (lseek (fd, 0, SEEK_CUR) == 5)
23035            return 3;
23036          /* POSIX requires fflush-fseek to set file offset of fd.  This fails
23037             on BSD systems and on mingw.  */
23038          if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
23039            return 4;
23040          if (lseek (fd, 0, SEEK_CUR) != 5)
23041            return 5;
23042          /* Verify behaviour of fflush after ungetc. See
23043             <http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt>  */
23044          /* Verify behaviour of fflush after a backup ungetc.  This fails on
23045             mingw.  */
23046          c = fgetc (f);
23047          ungetc (c, f);
23048          fflush (f);
23049          if (fgetc (f) != c)
23050            return 6;
23051          /* Verify behaviour of fflush after a non-backup ungetc.  This fails
23052             on glibc 2.8 and on BSD systems.  */
23053          c = fgetc (f);
23054          ungetc ('@', f);
23055          fflush (f);
23056          if (fgetc (f) != c)
23057            return 7;
23058          return 0;
23059
23060   ;
23061   return 0;
23062 }
23063 _ACEOF
23064 if ac_fn_c_try_run "$LINENO"; then :
23065   gl_cv_func_fflush_stdin=yes
23066 else
23067   gl_cv_func_fflush_stdin=no
23068 fi
23069 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23070   conftest.$ac_objext conftest.beam conftest.$ac_ext
23071 fi
23072
23073      rm conftest.txt
23074
23075 fi
23076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
23077 $as_echo "$gl_cv_func_fflush_stdin" >&6; }
23078   case $gl_cv_func_fflush_stdin in
23079     yes) gl_func_fflush_stdin=1 ;;
23080     no)  gl_func_fflush_stdin=0 ;;
23081     *)   gl_func_fflush_stdin='(-1)' ;;
23082   esac
23083
23084 cat >>confdefs.h <<_ACEOF
23085 #define FUNC_FFLUSH_STDIN $gl_func_fflush_stdin
23086 _ACEOF
23087
23088
23089   if test $gl_cv_func_fflush_stdin != yes; then
23090     REPLACE_FFLUSH=1
23091   fi
23092
23093   if test $REPLACE_FFLUSH = 1; then
23094
23095
23096
23097
23098
23099
23100
23101
23102   gl_LIBOBJS="$gl_LIBOBJS fflush.$ac_objext"
23103
23104     :
23105   fi
23106
23107
23108 cat >>confdefs.h <<_ACEOF
23109 #define GNULIB_FFLUSH 1
23110 _ACEOF
23111
23112
23113
23114
23115
23116
23117
23118           GNULIB_FFLUSH=1
23119
23120
23121
23122
23123
23124 $as_echo "#define GNULIB_TEST_FFLUSH 1" >>confdefs.h
23125
23126
23127
23128
23129
23130     ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
23131 if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
23132
23133 cat >>confdefs.h <<_ACEOF
23134 #define HAVE_STRUCT_STAT_ST_BLOCKS 1
23135 _ACEOF
23136
23137
23138 $as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
23139
23140 else
23141   :
23142 fi
23143
23144
23145
23146
23147   if test $ac_cv_member_struct_stat_st_blocks = no; then
23148
23149
23150
23151
23152
23153
23154
23155
23156   gl_LIBOBJS="$gl_LIBOBJS fileblocks.$ac_objext"
23157
23158
23159
23160   :
23161
23162
23163
23164
23165
23166   :
23167
23168   fi
23169
23170
23171
23172   :
23173
23174
23175
23176
23177
23178
23179
23180
23181   :
23182
23183
23184
23185
23186
23187
23188
23189   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array member" >&5
23190 $as_echo_n "checking for flexible array member... " >&6; }
23191 if ${ac_cv_c_flexmember+:} false; then :
23192   $as_echo_n "(cached) " >&6
23193 else
23194   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23195 /* end confdefs.h.  */
23196 #include <stdlib.h>
23197             #include <stdio.h>
23198             #include <stddef.h>
23199             struct s { int n; double d[]; };
23200 int
23201 main ()
23202 {
23203 int m = getchar ();
23204             struct s *p = malloc (offsetof (struct s, d)
23205                                   + m * sizeof (double));
23206             p->d[0] = 0.0;
23207             return p->d != (double *) NULL;
23208   ;
23209   return 0;
23210 }
23211 _ACEOF
23212 if ac_fn_c_try_compile "$LINENO"; then :
23213   ac_cv_c_flexmember=yes
23214 else
23215   ac_cv_c_flexmember=no
23216 fi
23217 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23218 fi
23219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
23220 $as_echo "$ac_cv_c_flexmember" >&6; }
23221   if test $ac_cv_c_flexmember = yes; then
23222
23223 $as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
23224
23225   else
23226     $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
23227
23228   fi
23229
23230
23231
23232
23233   FLOAT_H=
23234   REPLACE_FLOAT_LDBL=0
23235   case "$host_os" in
23236     aix* | beos* | openbsd* | mirbsd* | irix*)
23237       FLOAT_H=float.h
23238       ;;
23239     freebsd*)
23240       case "$host_cpu" in
23241         i[34567]86 )
23242           FLOAT_H=float.h
23243           ;;
23244         x86_64 )
23245           # On x86_64 systems, the C compiler may still be generating
23246           # 32-bit code.
23247           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23248 /* end confdefs.h.  */
23249 #if defined __LP64__ || defined __x86_64__ || defined __amd64__
23250              yes
23251              #endif
23252 _ACEOF
23253 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23254   $EGREP "yes" >/dev/null 2>&1; then :
23255
23256 else
23257   FLOAT_H=float.h
23258 fi
23259 rm -f conftest*
23260
23261           ;;
23262       esac
23263       ;;
23264     linux*)
23265       case "$host_cpu" in
23266         powerpc*)
23267           FLOAT_H=float.h
23268           ;;
23269       esac
23270       ;;
23271   esac
23272   case "$host_os" in
23273     aix* | freebsd* | linux*)
23274       if test -n "$FLOAT_H"; then
23275         REPLACE_FLOAT_LDBL=1
23276       fi
23277       ;;
23278   esac
23279
23280     REPLACE_ITOLD=0
23281   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5
23282 $as_echo_n "checking whether conversion from 'int' to 'long double' works... " >&6; }
23283 if ${gl_cv_func_itold_works+:} false; then :
23284   $as_echo_n "(cached) " >&6
23285 else
23286
23287       if test "$cross_compiling" = yes; then :
23288   case "$host" in
23289            sparc*-*-linux*)
23290              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23291 /* end confdefs.h.  */
23292 #if defined __LP64__ || defined __arch64__
23293                 yes
23294                 #endif
23295 _ACEOF
23296 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23297   $EGREP "yes" >/dev/null 2>&1; then :
23298   gl_cv_func_itold_works="guessing no"
23299 else
23300   gl_cv_func_itold_works="guessing yes"
23301 fi
23302 rm -f conftest*
23303
23304              ;;
23305            *) gl_cv_func_itold_works="guessing yes" ;;
23306          esac
23307
23308 else
23309   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23310 /* end confdefs.h.  */
23311
23312 int i = -1;
23313 volatile long double ld;
23314 int main ()
23315 {
23316   ld += i * 1.0L;
23317   if (ld > 0)
23318     return 1;
23319   return 0;
23320 }
23321 _ACEOF
23322 if ac_fn_c_try_run "$LINENO"; then :
23323   gl_cv_func_itold_works=yes
23324 else
23325   gl_cv_func_itold_works=no
23326 fi
23327 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23328   conftest.$ac_objext conftest.beam conftest.$ac_ext
23329 fi
23330
23331
23332 fi
23333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5
23334 $as_echo "$gl_cv_func_itold_works" >&6; }
23335   case "$gl_cv_func_itold_works" in
23336     *no)
23337       REPLACE_ITOLD=1
23338                   FLOAT_H=float.h
23339       ;;
23340   esac
23341
23342   if test -n "$FLOAT_H"; then
23343
23344
23345
23346
23347
23348
23349
23350
23351      if test $gl_cv_have_include_next = yes; then
23352        gl_cv_next_float_h='<'float.h'>'
23353      else
23354        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
23355 $as_echo_n "checking absolute name of <float.h>... " >&6; }
23356 if ${gl_cv_next_float_h+:} false; then :
23357   $as_echo_n "(cached) " >&6
23358 else
23359
23360
23361
23362   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23363 /* end confdefs.h.  */
23364 #include <float.h>
23365 _ACEOF
23366                 case "$host_os" in
23367     aix*) gl_absname_cpp="$ac_cpp -C" ;;
23368     *)    gl_absname_cpp="$ac_cpp" ;;
23369   esac
23370
23371   case "$host_os" in
23372     mingw*)
23373                                           gl_dirsep_regex='[/\\]'
23374       ;;
23375     *)
23376       gl_dirsep_regex='\/'
23377       ;;
23378   esac
23379       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23380   gl_header_literal_regex=`echo 'float.h' \
23381                            | sed -e "$gl_make_literal_regex_sed"`
23382   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23383       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23384       s|^/[^/]|//&|
23385       p
23386       q
23387     }'
23388
23389         gl_cv_absolute_float_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23390   sed -n "$gl_absolute_header_sed"`
23391
23392            gl_header=$gl_cv_absolute_float_h
23393            gl_cv_next_float_h='"'$gl_header'"'
23394
23395
23396 fi
23397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
23398 $as_echo "$gl_cv_next_float_h" >&6; }
23399      fi
23400      NEXT_FLOAT_H=$gl_cv_next_float_h
23401
23402      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23403        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23404        gl_next_as_first_directive='<'float.h'>'
23405      else
23406        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23407        gl_next_as_first_directive=$gl_cv_next_float_h
23408      fi
23409      NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive
23410
23411
23412
23413
23414   fi
23415
23416    if test -n "$FLOAT_H"; then
23417   GL_GENERATE_FLOAT_H_TRUE=
23418   GL_GENERATE_FLOAT_H_FALSE='#'
23419 else
23420   GL_GENERATE_FLOAT_H_TRUE='#'
23421   GL_GENERATE_FLOAT_H_FALSE=
23422 fi
23423
23424
23425
23426   if test $REPLACE_FLOAT_LDBL = 1; then
23427
23428
23429
23430
23431
23432
23433
23434
23435   gl_LIBOBJS="$gl_LIBOBJS float.$ac_objext"
23436
23437   fi
23438   if test $REPLACE_ITOLD = 1; then
23439
23440
23441
23442
23443
23444
23445
23446
23447   gl_LIBOBJS="$gl_LIBOBJS itold.$ac_objext"
23448
23449   fi
23450
23451
23452
23453
23454
23455   FNMATCH_H=
23456   gl_fnmatch_required_lowercase=`
23457     echo $gl_fnmatch_required | LC_ALL=C tr '[A-Z]' '[a-z]'
23458   `
23459   gl_fnmatch_cache_var="gl_cv_func_fnmatch_${gl_fnmatch_required_lowercase}"
23460   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working $gl_fnmatch_required fnmatch" >&5
23461 $as_echo_n "checking for working $gl_fnmatch_required fnmatch... " >&6; }
23462 if eval \${$gl_fnmatch_cache_var+:} false; then :
23463   $as_echo_n "(cached) " >&6
23464 else
23465                            if test $gl_fnmatch_required = GNU; then
23466        gl_fnmatch_gnu_start=
23467        gl_fnmatch_gnu_end=
23468      else
23469        gl_fnmatch_gnu_start='#if 0'
23470        gl_fnmatch_gnu_end='#endif'
23471      fi
23472      if test "$cross_compiling" = yes; then :
23473   eval "$gl_fnmatch_cache_var=\"guessing no\""
23474 else
23475   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23476 /* end confdefs.h.  */
23477 #include <fnmatch.h>
23478             static int
23479             y (char const *pattern, char const *string, int flags)
23480             {
23481               return fnmatch (pattern, string, flags) == 0;
23482             }
23483             static int
23484             n (char const *pattern, char const *string, int flags)
23485             {
23486               return fnmatch (pattern, string, flags) == FNM_NOMATCH;
23487             }
23488
23489 int
23490 main ()
23491 {
23492 char const *Apat = 'A' < '\\\\' ? "[A-\\\\\\\\]" : "[\\\\\\\\-A]";
23493             char const *apat = 'a' < '\\\\' ? "[a-\\\\\\\\]" : "[\\\\\\\\-a]";
23494             static char const A_1[] = { 'A' - 1, 0 };
23495             static char const A01[] = { 'A' + 1, 0 };
23496             static char const a_1[] = { 'a' - 1, 0 };
23497             static char const a01[] = { 'a' + 1, 0 };
23498             static char const bs_1[] = { '\\\\' - 1, 0 };
23499             static char const bs01[] = { '\\\\' + 1, 0 };
23500             int result = 0;
23501             if (!n ("a*", "", 0))
23502               return 1;
23503             if (!y ("a*", "abc", 0))
23504               return 1;
23505             if (!y ("[/b", "[/b", 0)) /*"]]"*/ /* glibc Bugzilla bug 12378 */
23506               return 1;
23507             if (!n ("d*/*1", "d/s/1", FNM_PATHNAME))
23508               return 2;
23509             if (!y ("a\\\\bc", "abc", 0))
23510               return 3;
23511             if (!n ("a\\\\bc", "abc", FNM_NOESCAPE))
23512               return 3;
23513             if (!y ("*x", ".x", 0))
23514               return 4;
23515             if (!n ("*x", ".x", FNM_PERIOD))
23516               return 4;
23517             if (!y (Apat, "\\\\", 0))
23518               return 5;
23519             if (!y (Apat, "A", 0))
23520               return 5;
23521             if (!y (apat, "\\\\", 0))
23522               return 5;
23523             if (!y (apat, "a", 0))
23524               return 5;
23525             if (!(n (Apat, A_1, 0) == ('A' < '\\\\')))
23526               return 5;
23527             if (!(n (apat, a_1, 0) == ('a' < '\\\\')))
23528               return 5;
23529             if (!(y (Apat, A01, 0) == ('A' < '\\\\')))
23530               return 5;
23531             if (!(y (apat, a01, 0) == ('a' < '\\\\')))
23532               return 5;
23533             if (!(y (Apat, bs_1, 0) == ('A' < '\\\\')))
23534               return 5;
23535             if (!(y (apat, bs_1, 0) == ('a' < '\\\\')))
23536               return 5;
23537             if (!(n (Apat, bs01, 0) == ('A' < '\\\\')))
23538               return 5;
23539             if (!(n (apat, bs01, 0) == ('a' < '\\\\')))
23540               return 5;
23541             $gl_fnmatch_gnu_start
23542             if (!y ("xxXX", "xXxX", FNM_CASEFOLD))
23543               result |= 8;
23544             if (!y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH))
23545               result |= 16;
23546             if (!n ("d*/*1", "d/s/1", FNM_FILE_NAME))
23547               result |= 32;
23548             if (!y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR))
23549               result |= 64;
23550             if (!y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR))
23551               result |= 64;
23552             if (!y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR))
23553               result |= 64;
23554             $gl_fnmatch_gnu_end
23555             return result;
23556
23557   ;
23558   return 0;
23559 }
23560 _ACEOF
23561 if ac_fn_c_try_run "$LINENO"; then :
23562   eval "$gl_fnmatch_cache_var=yes"
23563 else
23564   eval "$gl_fnmatch_cache_var=no"
23565 fi
23566 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23567   conftest.$ac_objext conftest.beam conftest.$ac_ext
23568 fi
23569
23570
23571 fi
23572 eval ac_res=\$$gl_fnmatch_cache_var
23573                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
23574 $as_echo "$ac_res" >&6; }
23575   eval "gl_fnmatch_result=\"\$$gl_fnmatch_cache_var\""
23576   if test "$gl_fnmatch_result" = yes; then
23577             rm -f "$gl_source_base/fnmatch.h"
23578   else
23579     FNMATCH_H=fnmatch.h
23580   fi
23581
23582    if test -n "$FNMATCH_H"; then
23583   GL_GENERATE_FNMATCH_H_TRUE=
23584   GL_GENERATE_FNMATCH_H_FALSE='#'
23585 else
23586   GL_GENERATE_FNMATCH_H_TRUE='#'
23587   GL_GENERATE_FNMATCH_H_FALSE=
23588 fi
23589
23590
23591   if test -n "$FNMATCH_H"; then
23592
23593
23594
23595
23596
23597
23598
23599
23600   gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
23601
23602
23603
23604 cat >>confdefs.h <<_ACEOF
23605 #define fnmatch ${gl_fnmatch_required_lowercase}_fnmatch
23606 _ACEOF
23607
23608
23609   ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
23610 "
23611 if test "x$ac_cv_have_decl_isblank" = xyes; then :
23612   ac_have_decl=1
23613 else
23614   ac_have_decl=0
23615 fi
23616
23617 cat >>confdefs.h <<_ACEOF
23618 #define HAVE_DECL_ISBLANK $ac_have_decl
23619 _ACEOF
23620
23621
23622   :
23623
23624
23625
23626
23627
23628
23629
23630
23631
23632
23633
23634
23635
23636
23637
23638
23639
23640
23641
23642
23643
23644
23645
23646
23647
23648
23649
23650   :
23651
23652
23653
23654
23655
23656
23657   fi
23658
23659
23660
23661
23662
23663   if test -n "$FNMATCH_H"; then
23664
23665
23666
23667
23668
23669
23670
23671
23672   gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
23673
23674
23675
23676 cat >>confdefs.h <<_ACEOF
23677 #define fnmatch ${gl_fnmatch_required_lowercase}_fnmatch
23678 _ACEOF
23679
23680
23681   ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
23682 "
23683 if test "x$ac_cv_have_decl_isblank" = xyes; then :
23684   ac_have_decl=1
23685 else
23686   ac_have_decl=0
23687 fi
23688
23689 cat >>confdefs.h <<_ACEOF
23690 #define HAVE_DECL_ISBLANK $ac_have_decl
23691 _ACEOF
23692
23693
23694   :
23695
23696
23697
23698
23699
23700
23701
23702
23703
23704
23705
23706
23707
23708
23709
23710
23711
23712
23713
23714
23715
23716
23717
23718
23719
23720
23721
23722   :
23723
23724
23725
23726
23727
23728
23729   fi
23730
23731
23732
23733   case "$host_os" in
23734     mingw* | pw*)
23735             REPLACE_FOPEN=1
23736             gl_cv_func_fopen_slash="guessing no"
23737       ;;
23738     *)
23739                   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fopen recognizes a trailing slash" >&5
23740 $as_echo_n "checking whether fopen recognizes a trailing slash... " >&6; }
23741 if ${gl_cv_func_fopen_slash+:} false; then :
23742   $as_echo_n "(cached) " >&6
23743 else
23744
23745           if test "$cross_compiling" = yes; then :
23746
23747              case "$host_os" in
23748                aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
23749                  gl_cv_func_fopen_slash="guessing no" ;;
23750                *)
23751                  gl_cv_func_fopen_slash="guessing yes" ;;
23752              esac
23753
23754 else
23755   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23756 /* end confdefs.h.  */
23757
23758 #include <stddef.h>
23759 #include <stdio.h>
23760 int main ()
23761 {
23762   return fopen ("conftest.sl/", "w") != NULL;
23763 }
23764 _ACEOF
23765 if ac_fn_c_try_run "$LINENO"; then :
23766   gl_cv_func_fopen_slash=yes
23767 else
23768   gl_cv_func_fopen_slash=no
23769 fi
23770 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23771   conftest.$ac_objext conftest.beam conftest.$ac_ext
23772 fi
23773
23774           rm -f conftest.sl
23775
23776 fi
23777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fopen_slash" >&5
23778 $as_echo "$gl_cv_func_fopen_slash" >&6; }
23779       ;;
23780   esac
23781   case "$gl_cv_func_fopen_slash" in
23782     *no)
23783
23784 $as_echo "#define FOPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
23785
23786       REPLACE_FOPEN=1
23787       ;;
23788   esac
23789
23790   if test $REPLACE_FOPEN = 1; then
23791
23792
23793
23794
23795
23796
23797
23798
23799   gl_LIBOBJS="$gl_LIBOBJS fopen.$ac_objext"
23800
23801     :
23802   fi
23803
23804
23805
23806
23807
23808           GNULIB_FOPEN=1
23809
23810
23811
23812
23813
23814 $as_echo "#define GNULIB_TEST_FOPEN 1" >>confdefs.h
23815
23816
23817
23818
23819
23820 cat >>confdefs.h <<_ACEOF
23821 #define GNULIB_FOPEN_SAFER 1
23822 _ACEOF
23823
23824
23825
23826
23827   :
23828
23829
23830
23831
23832
23833   fp_headers='
23834     #include <stdio.h>
23835     #if HAVE_STDIO_EXT_H
23836     # include <stdio_ext.h>
23837     #endif
23838   '
23839   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpending" >&5
23840 $as_echo_n "checking for __fpending... " >&6; }
23841 if ${gl_cv_func___fpending+:} false; then :
23842   $as_echo_n "(cached) " >&6
23843 else
23844
23845       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23846 /* end confdefs.h.  */
23847 $fp_headers
23848 int
23849 main ()
23850 {
23851 return ! __fpending (stdin);
23852   ;
23853   return 0;
23854 }
23855 _ACEOF
23856 if ac_fn_c_try_link "$LINENO"; then :
23857   gl_cv_func___fpending=yes
23858 else
23859   gl_cv_func___fpending=no
23860 fi
23861 rm -f core conftest.err conftest.$ac_objext \
23862     conftest$ac_exeext conftest.$ac_ext
23863
23864 fi
23865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func___fpending" >&5
23866 $as_echo "$gl_cv_func___fpending" >&6; }
23867   if test $gl_cv_func___fpending = yes; then
23868     ac_fn_c_check_decl "$LINENO" "__fpending" "ac_cv_have_decl___fpending" "$fp_headers
23869 "
23870 if test "x$ac_cv_have_decl___fpending" = xyes; then :
23871   ac_have_decl=1
23872 else
23873   ac_have_decl=0
23874 fi
23875
23876 cat >>confdefs.h <<_ACEOF
23877 #define HAVE_DECL___FPENDING $ac_have_decl
23878 _ACEOF
23879
23880   fi
23881
23882   if test $gl_cv_func___fpending = no; then
23883
23884
23885
23886
23887
23888
23889
23890
23891   gl_LIBOBJS="$gl_LIBOBJS fpending.$ac_objext"
23892
23893
23894   { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to determine the number of pending output bytes on a stream" >&5
23895 $as_echo_n "checking how to determine the number of pending output bytes on a stream... " >&6; }
23896 if ${ac_cv_sys_pending_output_n_bytes+:} false; then :
23897   $as_echo_n "(cached) " >&6
23898 else
23899
23900       for ac_expr in                                                    \
23901                                                                         \
23902           '# glibc2'                                                    \
23903           'fp->_IO_write_ptr - fp->_IO_write_base'                      \
23904                                                                         \
23905           '# traditional Unix'                                          \
23906           'fp->_ptr - fp->_base'                                        \
23907                                                                         \
23908           '# BSD'                                                       \
23909           'fp->_p - fp->_bf._base'                                      \
23910                                                                         \
23911           '# SCO, Unixware'                                             \
23912           '(fp->__ptr ? fp->__ptr - fp->__base : 0)'                    \
23913                                                                         \
23914           '# QNX'                                                       \
23915           '(fp->_Mode & 0x2000 /*_MWRITE*/ ? fp->_Next - fp->_Buf : 0)' \
23916                                                                         \
23917           '# old glibc?'                                                \
23918           'fp->__bufp - fp->__buffer'                                   \
23919                                                                         \
23920           '# old glibc iostream?'                                       \
23921           'fp->_pptr - fp->_pbase'                                      \
23922                                                                         \
23923           '# emx+gcc'                                                   \
23924           'fp->_ptr - fp->_buffer'                                      \
23925                                                                         \
23926           '# Minix'                                                     \
23927           'fp->_ptr - fp->_buf'                                         \
23928                                                                         \
23929           '# Plan9'                                                     \
23930           'fp->wp - fp->buf'                                            \
23931                                                                         \
23932           '# VMS'                                                       \
23933           '(*fp)->_ptr - (*fp)->_base'                                  \
23934                                                                         \
23935           '# e.g., DGUX R4.11; the info is not available'               \
23936           1                                                             \
23937           ; do
23938
23939         # Skip each embedded comment.
23940         case "$ac_expr" in '#'*) continue;; esac
23941
23942         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23943 /* end confdefs.h.  */
23944 #include <stdio.h>
23945 int
23946 main ()
23947 {
23948 FILE *fp = stdin; (void) ($ac_expr);
23949   ;
23950   return 0;
23951 }
23952 _ACEOF
23953 if ac_fn_c_try_compile "$LINENO"; then :
23954   fp_done=yes
23955
23956 fi
23957 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23958         test "$fp_done" = yes && break
23959       done
23960
23961       ac_cv_sys_pending_output_n_bytes=$ac_expr
23962
23963
23964 fi
23965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_pending_output_n_bytes" >&5
23966 $as_echo "$ac_cv_sys_pending_output_n_bytes" >&6; }
23967
23968 cat >>confdefs.h <<_ACEOF
23969 #define PENDING_OUTPUT_N_BYTES $ac_cv_sys_pending_output_n_bytes
23970 _ACEOF
23971
23972
23973   fi
23974
23975
23976
23977   :
23978
23979
23980
23981
23982
23983
23984   :
23985
23986
23987
23988
23989
23990   ac_fn_c_check_decl "$LINENO" "fpurge" "ac_cv_have_decl_fpurge" "#include <stdio.h>
23991 "
23992 if test "x$ac_cv_have_decl_fpurge" = xyes; then :
23993   ac_have_decl=1
23994 else
23995   ac_have_decl=0
23996 fi
23997
23998 cat >>confdefs.h <<_ACEOF
23999 #define HAVE_DECL_FPURGE $ac_have_decl
24000 _ACEOF
24001
24002   if test "x$ac_cv_func_fpurge" = xyes; then
24003     HAVE_FPURGE=1
24004     # Detect BSD bug.  Only cygwin 1.7 is known to be immune.
24005     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fpurge works" >&5
24006 $as_echo_n "checking whether fpurge works... " >&6; }
24007 if ${gl_cv_func_fpurge_works+:} false; then :
24008   $as_echo_n "(cached) " >&6
24009 else
24010   if test "$cross_compiling" = yes; then :
24011   gl_cv_func_fpurge_works='guessing no'
24012 else
24013   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24014 /* end confdefs.h.  */
24015 #include <stdio.h>
24016
24017 int
24018 main ()
24019 {
24020 FILE *f = fopen ("conftest.txt", "w+");
24021         if (!f) return 1;
24022         if (fputc ('a', f) != 'a') return 2;
24023         rewind (f);
24024         if (fgetc (f) != 'a') return 3;
24025         if (fgetc (f) != EOF) return 4;
24026         if (fpurge (f) != 0) return 5;
24027         if (putc ('b', f) != 'b') return 6;
24028         if (fclose (f) != 0) return 7;
24029         if ((f = fopen ("conftest.txt", "r")) == NULL) return 8;
24030         if (fgetc (f) != 'a') return 9;
24031         if (fgetc (f) != 'b') return 10;
24032         if (fgetc (f) != EOF) return 11;
24033         if (fclose (f) != 0) return 12;
24034         if (remove ("conftest.txt") != 0) return 13;
24035         return 0;
24036   ;
24037   return 0;
24038 }
24039 _ACEOF
24040 if ac_fn_c_try_run "$LINENO"; then :
24041   gl_cv_func_fpurge_works=yes
24042 else
24043   gl_cv_func_fpurge_works=no
24044 fi
24045 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24046   conftest.$ac_objext conftest.beam conftest.$ac_ext
24047 fi
24048
24049 fi
24050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fpurge_works" >&5
24051 $as_echo "$gl_cv_func_fpurge_works" >&6; }
24052     if test "x$gl_cv_func_fpurge_works" != xyes; then
24053       REPLACE_FPURGE=1
24054     fi
24055   else
24056     HAVE_FPURGE=0
24057   fi
24058   if test "x$ac_cv_have_decl_fpurge" = xno; then
24059     HAVE_DECL_FPURGE=0
24060   fi
24061
24062   if test $HAVE_FPURGE = 0 || test $REPLACE_FPURGE = 1; then
24063
24064
24065
24066
24067
24068
24069
24070
24071   gl_LIBOBJS="$gl_LIBOBJS fpurge.$ac_objext"
24072
24073   fi
24074
24075
24076
24077
24078
24079           GNULIB_FPURGE=1
24080
24081
24082
24083
24084
24085 $as_echo "#define GNULIB_TEST_FPURGE 1" >>confdefs.h
24086
24087
24088
24089
24090
24091   :
24092
24093
24094
24095
24096
24097
24098   if test $ac_cv_func___freadahead = no; then
24099
24100
24101
24102
24103
24104
24105
24106
24107   gl_LIBOBJS="$gl_LIBOBJS freadahead.$ac_objext"
24108
24109   fi
24110
24111
24112   :
24113
24114
24115
24116
24117
24118
24119
24120
24121
24122     if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then
24123     REPLACE_FSEEK=1
24124   fi
24125
24126   if test $REPLACE_FSEEK = 1; then
24127
24128
24129
24130
24131
24132
24133
24134
24135   gl_LIBOBJS="$gl_LIBOBJS fseek.$ac_objext"
24136
24137   fi
24138
24139
24140
24141
24142
24143           GNULIB_FSEEK=1
24144
24145
24146
24147
24148
24149 $as_echo "#define GNULIB_TEST_FSEEK 1" >>confdefs.h
24150
24151
24152
24153
24154
24155
24156
24157
24158
24159
24160
24161   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fseeko" >&5
24162 $as_echo_n "checking for fseeko... " >&6; }
24163 if ${gl_cv_func_fseeko+:} false; then :
24164   $as_echo_n "(cached) " >&6
24165 else
24166
24167       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24168 /* end confdefs.h.  */
24169 #include <stdio.h>
24170
24171 int
24172 main ()
24173 {
24174 fseeko (stdin, 0, 0);
24175   ;
24176   return 0;
24177 }
24178 _ACEOF
24179 if ac_fn_c_try_link "$LINENO"; then :
24180   gl_cv_func_fseeko=yes
24181 else
24182   gl_cv_func_fseeko=no
24183 fi
24184 rm -f core conftest.err conftest.$ac_objext \
24185     conftest$ac_exeext conftest.$ac_ext
24186
24187 fi
24188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fseeko" >&5
24189 $as_echo "$gl_cv_func_fseeko" >&6; }
24190
24191
24192   :
24193
24194
24195
24196
24197
24198   if test $ac_cv_have_decl_fseeko = no; then
24199     HAVE_DECL_FSEEKO=0
24200   fi
24201
24202   if test $gl_cv_func_fseeko = no; then
24203     HAVE_FSEEKO=0
24204   else
24205     if test $WINDOWS_64_BIT_OFF_T = 1; then
24206       REPLACE_FSEEKO=1
24207     fi
24208     if test $gl_cv_var_stdin_large_offset = no; then
24209       REPLACE_FSEEKO=1
24210     fi
24211
24212
24213
24214   :
24215
24216
24217
24218
24219
24220   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
24221 $as_echo_n "checking whether fflush works on input streams... " >&6; }
24222 if ${gl_cv_func_fflush_stdin+:} false; then :
24223   $as_echo_n "(cached) " >&6
24224 else
24225   echo hello world > conftest.txt
24226      if test "$cross_compiling" = yes; then :
24227   gl_cv_func_fflush_stdin=cross
24228 else
24229   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24230 /* end confdefs.h.  */
24231
24232 #include <stdio.h>
24233 #if HAVE_UNISTD_H
24234 # include <unistd.h>
24235 #else /* on Windows with MSVC */
24236 # include <io.h>
24237 #endif
24238
24239 int
24240 main ()
24241 {
24242 FILE *f = fopen ("conftest.txt", "r");
24243          char buffer[10];
24244          int fd;
24245          int c;
24246          if (f == NULL)
24247            return 1;
24248          fd = fileno (f);
24249          if (fd < 0 || fread (buffer, 1, 5, f) != 5)
24250            return 2;
24251          /* For deterministic results, ensure f read a bigger buffer.  */
24252          if (lseek (fd, 0, SEEK_CUR) == 5)
24253            return 3;
24254          /* POSIX requires fflush-fseek to set file offset of fd.  This fails
24255             on BSD systems and on mingw.  */
24256          if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
24257            return 4;
24258          if (lseek (fd, 0, SEEK_CUR) != 5)
24259            return 5;
24260          /* Verify behaviour of fflush after ungetc. See
24261             <http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt>  */
24262          /* Verify behaviour of fflush after a backup ungetc.  This fails on
24263             mingw.  */
24264          c = fgetc (f);
24265          ungetc (c, f);
24266          fflush (f);
24267          if (fgetc (f) != c)
24268            return 6;
24269          /* Verify behaviour of fflush after a non-backup ungetc.  This fails
24270             on glibc 2.8 and on BSD systems.  */
24271          c = fgetc (f);
24272          ungetc ('@', f);
24273          fflush (f);
24274          if (fgetc (f) != c)
24275            return 7;
24276          return 0;
24277
24278   ;
24279   return 0;
24280 }
24281 _ACEOF
24282 if ac_fn_c_try_run "$LINENO"; then :
24283   gl_cv_func_fflush_stdin=yes
24284 else
24285   gl_cv_func_fflush_stdin=no
24286 fi
24287 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24288   conftest.$ac_objext conftest.beam conftest.$ac_ext
24289 fi
24290
24291      rm conftest.txt
24292
24293 fi
24294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
24295 $as_echo "$gl_cv_func_fflush_stdin" >&6; }
24296   case $gl_cv_func_fflush_stdin in
24297     yes) gl_func_fflush_stdin=1 ;;
24298     no)  gl_func_fflush_stdin=0 ;;
24299     *)   gl_func_fflush_stdin='(-1)' ;;
24300   esac
24301
24302 cat >>confdefs.h <<_ACEOF
24303 #define FUNC_FFLUSH_STDIN $gl_func_fflush_stdin
24304 _ACEOF
24305
24306
24307       if test $gl_cv_func_fflush_stdin != yes; then
24308         REPLACE_FSEEKO=1
24309       fi
24310
24311   fi
24312
24313   if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then
24314
24315
24316
24317
24318
24319
24320
24321
24322   gl_LIBOBJS="$gl_LIBOBJS fseeko.$ac_objext"
24323
24324
24325       for ac_func in _fseeki64
24326 do :
24327   ac_fn_c_check_func "$LINENO" "_fseeki64" "ac_cv_func__fseeki64"
24328 if test "x$ac_cv_func__fseeki64" = xyes; then :
24329   cat >>confdefs.h <<_ACEOF
24330 #define HAVE__FSEEKI64 1
24331 _ACEOF
24332
24333 fi
24334 done
24335
24336
24337   fi
24338
24339
24340
24341
24342
24343           GNULIB_FSEEKO=1
24344
24345
24346
24347
24348
24349 $as_echo "#define GNULIB_TEST_FSEEKO 1" >>confdefs.h
24350
24351
24352
24353
24354
24355
24356
24357   if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
24358     REPLACE_FSTAT=1
24359   fi
24360
24361
24362   if test $WINDOWS_64_BIT_ST_SIZE = 1; then
24363     REPLACE_FSTAT=1
24364   fi
24365
24366
24367
24368
24369
24370   :
24371
24372
24373
24374
24375
24376   if test $ac_cv_func_fchdir = no; then
24377     HAVE_FCHDIR=0
24378   fi
24379
24380     if test $HAVE_FCHDIR = 0; then
24381       case "$gl_cv_func_open_directory_works" in
24382         *yes) ;;
24383         *)
24384           REPLACE_FSTAT=1
24385           ;;
24386       esac
24387     fi
24388
24389
24390   if test $REPLACE_FSTAT = 1; then
24391
24392
24393
24394
24395
24396
24397
24398
24399   gl_LIBOBJS="$gl_LIBOBJS fstat.$ac_objext"
24400
24401     :
24402   fi
24403
24404
24405
24406
24407
24408           GNULIB_FSTAT=1
24409
24410
24411
24412
24413
24414 $as_echo "#define GNULIB_TEST_FSTAT 1" >>confdefs.h
24415
24416
24417
24418
24419
24420
24421
24422
24423   :
24424
24425
24426
24427
24428
24429
24430   if test $ac_cv_func_fstatat = no; then
24431     HAVE_FSTATAT=0
24432   else
24433             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fstatat (..., 0) works" >&5
24434 $as_echo_n "checking whether fstatat (..., 0) works... " >&6; }
24435 if ${gl_cv_func_fstatat_zero_flag+:} false; then :
24436   $as_echo_n "(cached) " >&6
24437 else
24438   if test "$cross_compiling" = yes; then :
24439   case "$host_os" in
24440             aix*) gl_cv_func_fstatat_zero_flag="guessing no";;
24441             *)    gl_cv_func_fstatat_zero_flag="guessing yes";;
24442           esac
24443
24444 else
24445   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24446 /* end confdefs.h.  */
24447
24448               #include <fcntl.h>
24449               #include <sys/stat.h>
24450               int
24451               main (void)
24452               {
24453                 struct stat a;
24454                 return fstatat (AT_FDCWD, ".", &a, 0) != 0;
24455               }
24456
24457 _ACEOF
24458 if ac_fn_c_try_run "$LINENO"; then :
24459   gl_cv_func_fstatat_zero_flag=yes
24460 else
24461   gl_cv_func_fstatat_zero_flag=no
24462 fi
24463 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24464   conftest.$ac_objext conftest.beam conftest.$ac_ext
24465 fi
24466
24467
24468 fi
24469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fstatat_zero_flag" >&5
24470 $as_echo "$gl_cv_func_fstatat_zero_flag" >&6; }
24471
24472     case $gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in
24473     *yes+*yes) ;;
24474     *) REPLACE_FSTATAT=1
24475        case $gl_cv_func_fstatat_zero_flag in
24476        *yes)
24477
24478 $as_echo "#define HAVE_WORKING_FSTATAT_ZERO_FLAG 1" >>confdefs.h
24479
24480          ;;
24481        esac
24482        ;;
24483     esac
24484   fi
24485
24486   if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
24487
24488
24489
24490
24491
24492
24493
24494
24495   gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext"
24496
24497   fi
24498
24499
24500
24501
24502
24503           GNULIB_FSTATAT=1
24504
24505
24506
24507
24508
24509 $as_echo "#define GNULIB_TEST_FSTATAT 1" >>confdefs.h
24510
24511
24512
24513
24514
24515
24516     if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then
24517     REPLACE_FTELL=1
24518   fi
24519
24520   if test $REPLACE_FTELL = 1; then
24521
24522
24523
24524
24525
24526
24527
24528
24529   gl_LIBOBJS="$gl_LIBOBJS ftell.$ac_objext"
24530
24531   fi
24532
24533
24534
24535
24536
24537           GNULIB_FTELL=1
24538
24539
24540
24541
24542
24543 $as_echo "#define GNULIB_TEST_FTELL 1" >>confdefs.h
24544
24545
24546
24547
24548
24549
24550
24551
24552
24553
24554
24555
24556   :
24557
24558
24559
24560
24561
24562   if test $ac_cv_have_decl_ftello = no; then
24563     HAVE_DECL_FTELLO=0
24564   fi
24565
24566   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ftello" >&5
24567 $as_echo_n "checking for ftello... " >&6; }
24568 if ${gl_cv_func_ftello+:} false; then :
24569   $as_echo_n "(cached) " >&6
24570 else
24571
24572       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24573 /* end confdefs.h.  */
24574 #include <stdio.h>
24575 int
24576 main ()
24577 {
24578 ftello (stdin);
24579   ;
24580   return 0;
24581 }
24582 _ACEOF
24583 if ac_fn_c_try_link "$LINENO"; then :
24584   gl_cv_func_ftello=yes
24585 else
24586   gl_cv_func_ftello=no
24587 fi
24588 rm -f core conftest.err conftest.$ac_objext \
24589     conftest$ac_exeext conftest.$ac_ext
24590
24591 fi
24592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello" >&5
24593 $as_echo "$gl_cv_func_ftello" >&6; }
24594   if test $gl_cv_func_ftello = no; then
24595     HAVE_FTELLO=0
24596   else
24597     if test $WINDOWS_64_BIT_OFF_T = 1; then
24598       REPLACE_FTELLO=1
24599     fi
24600     if test $gl_cv_var_stdin_large_offset = no; then
24601       REPLACE_FTELLO=1
24602     fi
24603     if test $REPLACE_FTELLO = 0; then
24604
24605       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ftello works" >&5
24606 $as_echo_n "checking whether ftello works... " >&6; }
24607 if ${gl_cv_func_ftello_works+:} false; then :
24608   $as_echo_n "(cached) " >&6
24609 else
24610
24611                               case "$host_os" in
24612                       # Guess no on Solaris.
24613             solaris*) gl_cv_func_ftello_works="guessing no" ;;
24614                       # Guess yes otherwise.
24615             *)        gl_cv_func_ftello_works="guessing yes" ;;
24616           esac
24617           if test "$cross_compiling" = yes; then :
24618   :
24619 else
24620   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24621 /* end confdefs.h.  */
24622
24623 #include <stdio.h>
24624 #include <stdlib.h>
24625 #include <string.h>
24626 #define TESTFILE "conftest.tmp"
24627 int
24628 main (void)
24629 {
24630   FILE *fp;
24631
24632   /* Create a file with some contents.  */
24633   fp = fopen (TESTFILE, "w");
24634   if (fp == NULL)
24635     return 70;
24636   if (fwrite ("foogarsh", 1, 8, fp) < 8)
24637     return 71;
24638   if (fclose (fp))
24639     return 72;
24640
24641   /* The file's contents is now "foogarsh".  */
24642
24643   /* Try writing after reading to EOF.  */
24644   fp = fopen (TESTFILE, "r+");
24645   if (fp == NULL)
24646     return 73;
24647   if (fseek (fp, -1, SEEK_END))
24648     return 74;
24649   if (!(getc (fp) == 'h'))
24650     return 1;
24651   if (!(getc (fp) == EOF))
24652     return 2;
24653   if (!(ftell (fp) == 8))
24654     return 3;
24655   if (!(ftell (fp) == 8))
24656     return 4;
24657   if (!(putc ('!', fp) == '!'))
24658     return 5;
24659   if (!(ftell (fp) == 9))
24660     return 6;
24661   if (!(fclose (fp) == 0))
24662     return 7;
24663   fp = fopen (TESTFILE, "r");
24664   if (fp == NULL)
24665     return 75;
24666   {
24667     char buf[10];
24668     if (!(fread (buf, 1, 10, fp) == 9))
24669       return 10;
24670     if (!(memcmp (buf, "foogarsh!", 9) == 0))
24671       return 11;
24672   }
24673   if (!(fclose (fp) == 0))
24674     return 12;
24675
24676   /* The file's contents is now "foogarsh!".  */
24677
24678   return 0;
24679 }
24680 _ACEOF
24681 if ac_fn_c_try_run "$LINENO"; then :
24682   gl_cv_func_ftello_works=yes
24683 else
24684   gl_cv_func_ftello_works=no
24685 fi
24686 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24687   conftest.$ac_objext conftest.beam conftest.$ac_ext
24688 fi
24689
24690
24691 fi
24692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello_works" >&5
24693 $as_echo "$gl_cv_func_ftello_works" >&6; }
24694       case "$gl_cv_func_ftello_works" in
24695         *yes) ;;
24696         *)
24697           REPLACE_FTELLO=1
24698
24699 $as_echo "#define FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE 1" >>confdefs.h
24700
24701           ;;
24702       esac
24703     fi
24704   fi
24705
24706   if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then
24707
24708
24709
24710
24711
24712
24713
24714
24715   gl_LIBOBJS="$gl_LIBOBJS ftello.$ac_objext"
24716
24717
24718       for ac_func in _ftelli64
24719 do :
24720   ac_fn_c_check_func "$LINENO" "_ftelli64" "ac_cv_func__ftelli64"
24721 if test "x$ac_cv_func__ftelli64" = xyes; then :
24722   cat >>confdefs.h <<_ACEOF
24723 #define HAVE__FTELLI64 1
24724 _ACEOF
24725
24726 fi
24727 done
24728
24729
24730   fi
24731
24732
24733
24734
24735
24736           GNULIB_FTELLO=1
24737
24738
24739
24740
24741
24742 $as_echo "#define GNULIB_TEST_FTELLO 1" >>confdefs.h
24743
24744
24745
24746
24747
24748
24749
24750
24751
24752   :
24753
24754
24755
24756
24757
24758
24759   case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink in
24760   yes+*yes)
24761     ;;
24762   yes+*)
24763     # Solaris 9 has *at functions, but uniformly mishandles trailing
24764     # slash in all of them.
24765     REPLACE_OPENAT=1
24766     ;;
24767   *)
24768     HAVE_OPENAT=0
24769     ;;
24770   esac
24771
24772
24773
24774   :
24775
24776
24777
24778
24779
24780
24781   :
24782
24783
24784
24785
24786
24787
24788
24789   ac_fn_c_check_member "$LINENO" "struct statfs" "f_type" "ac_cv_member_struct_statfs_f_type" "$ac_includes_default
24790      #include <sys/vfs.h>
24791 "
24792 if test "x$ac_cv_member_struct_statfs_f_type" = xyes; then :
24793
24794 cat >>confdefs.h <<_ACEOF
24795 #define HAVE_STRUCT_STATFS_F_TYPE 1
24796 _ACEOF
24797
24798
24799 fi
24800
24801
24802
24803
24804
24805
24806
24807
24808
24809
24810
24811   gl_LIBOBJS="$gl_LIBOBJS fts.$ac_objext"
24812
24813
24814
24815
24816
24817
24818   gl_abort_bug=no
24819   case "$host_os" in
24820     mingw*)
24821       gl_cv_func_getcwd_path_max=yes
24822       ;;
24823     *)
24824
24825
24826   :
24827
24828
24829
24830
24831
24832
24833
24834   :
24835
24836
24837
24838
24839
24840
24841   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd handles long file names properly" >&5
24842 $as_echo_n "checking whether getcwd handles long file names properly... " >&6; }
24843 if ${gl_cv_func_getcwd_path_max+:} false; then :
24844   $as_echo_n "(cached) " >&6
24845 else
24846   # Arrange for deletion of the temporary directory this test creates.
24847      ac_clean_files="$ac_clean_files confdir3"
24848           if test "$cross_compiling" = yes; then :
24849   case "$host_os" in
24850        aix*) gl_cv_func_getcwd_path_max='no, it has the AIX bug';;
24851        *) gl_cv_func_getcwd_path_max=no;;
24852      esac
24853 else
24854   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24855 /* end confdefs.h.  */
24856
24857 #include <errno.h>
24858 #include <stdlib.h>
24859 #if HAVE_UNISTD_H
24860 # include <unistd.h>
24861 #else
24862 # include <direct.h>
24863 #endif
24864 #include <string.h>
24865 #include <limits.h>
24866 #include <sys/stat.h>
24867 #include <sys/types.h>
24868 #include <fcntl.h>
24869
24870
24871 /* Arrange to define PATH_MAX, like "pathmax.h" does. */
24872 #if HAVE_UNISTD_H
24873 # include <unistd.h>
24874 #endif
24875 #include <limits.h>
24876 #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
24877 # include <sys/param.h>
24878 #endif
24879 #if !defined PATH_MAX && defined MAXPATHLEN
24880 # define PATH_MAX MAXPATHLEN
24881 #endif
24882 #ifdef __hpux
24883 # undef PATH_MAX
24884 # define PATH_MAX 1024
24885 #endif
24886 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
24887 # undef PATH_MAX
24888 # define PATH_MAX 260
24889 #endif
24890
24891
24892 #ifndef AT_FDCWD
24893 # define AT_FDCWD 0
24894 #endif
24895 #ifdef ENAMETOOLONG
24896 # define is_ENAMETOOLONG(x) ((x) == ENAMETOOLONG)
24897 #else
24898 # define is_ENAMETOOLONG(x) 0
24899 #endif
24900
24901 /* Use the getcwd function, not any macro.  */
24902 #undef getcwd
24903
24904 /* Don't get link errors because mkdir is redefined to rpl_mkdir.  */
24905 #undef mkdir
24906
24907 #ifndef S_IRWXU
24908 # define S_IRWXU 0700
24909 #endif
24910
24911 /* The length of this name must be 8.  */
24912 #define DIR_NAME "confdir3"
24913 #define DIR_NAME_LEN 8
24914 #define DIR_NAME_SIZE (DIR_NAME_LEN + 1)
24915
24916 /* The length of "../".  */
24917 #define DOTDOTSLASH_LEN 3
24918
24919 /* Leftover bytes in the buffer, to work around library or OS bugs.  */
24920 #define BUF_SLOP 20
24921
24922 int
24923 main ()
24924 {
24925 #ifndef PATH_MAX
24926   /* The Hurd doesn't define this, so getcwd can't exhibit the bug --
24927      at least not on a local file system.  And if we were to start worrying
24928      about remote file systems, we'd have to enable the wrapper function
24929      all of the time, just to be safe.  That's not worth the cost.  */
24930   exit (0);
24931 #elif ((INT_MAX / (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1) \
24932         - DIR_NAME_SIZE - BUF_SLOP) \
24933        <= PATH_MAX)
24934   /* FIXME: Assuming there's a system for which this is true,
24935      this should be done in a compile test.  */
24936   exit (0);
24937 #else
24938   char buf[PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1)
24939            + DIR_NAME_SIZE + BUF_SLOP];
24940   char *cwd = getcwd (buf, PATH_MAX);
24941   size_t initial_cwd_len;
24942   size_t cwd_len;
24943   int fail = 0;
24944   size_t n_chdirs = 0;
24945
24946   if (cwd == NULL)
24947     exit (10);
24948
24949   cwd_len = initial_cwd_len = strlen (cwd);
24950
24951   while (1)
24952     {
24953       size_t dotdot_max = PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN);
24954       char *c = NULL;
24955
24956       cwd_len += DIR_NAME_SIZE;
24957       /* If mkdir or chdir fails, it could be that this system cannot create
24958          any file with an absolute name longer than PATH_MAX, such as cygwin.
24959          If so, leave fail as 0, because the current working directory can't
24960          be too long for getcwd if it can't even be created.  For other
24961          errors, be pessimistic and consider that as a failure, too.  */
24962       if (mkdir (DIR_NAME, S_IRWXU) < 0 || chdir (DIR_NAME) < 0)
24963         {
24964           if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
24965             fail = 20;
24966           break;
24967         }
24968
24969       if (PATH_MAX <= cwd_len && cwd_len < PATH_MAX + DIR_NAME_SIZE)
24970         {
24971           c = getcwd (buf, PATH_MAX);
24972           if (!c && errno == ENOENT)
24973             {
24974               fail = 11;
24975               break;
24976             }
24977           if (c)
24978             {
24979               fail = 31;
24980               break;
24981             }
24982           if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
24983             {
24984               fail = 21;
24985               break;
24986             }
24987         }
24988
24989       if (dotdot_max <= cwd_len - initial_cwd_len)
24990         {
24991           if (dotdot_max + DIR_NAME_SIZE < cwd_len - initial_cwd_len)
24992             break;
24993           c = getcwd (buf, cwd_len + 1);
24994           if (!c)
24995             {
24996               if (! (errno == ERANGE || errno == ENOENT
24997                      || is_ENAMETOOLONG (errno)))
24998                 {
24999                   fail = 22;
25000                   break;
25001                 }
25002               if (AT_FDCWD || errno == ERANGE || errno == ENOENT)
25003                 {
25004                   fail = 12;
25005                   break;
25006                 }
25007             }
25008         }
25009
25010       if (c && strlen (c) != cwd_len)
25011         {
25012           fail = 23;
25013           break;
25014         }
25015       ++n_chdirs;
25016     }
25017
25018   /* Leaving behind such a deep directory is not polite.
25019      So clean up here, right away, even though the driving
25020      shell script would also clean up.  */
25021   {
25022     size_t i;
25023
25024     /* Try rmdir first, in case the chdir failed.  */
25025     rmdir (DIR_NAME);
25026     for (i = 0; i <= n_chdirs; i++)
25027       {
25028         if (chdir ("..") < 0)
25029           break;
25030         if (rmdir (DIR_NAME) != 0)
25031           break;
25032       }
25033   }
25034
25035   exit (fail);
25036 #endif
25037 }
25038
25039 _ACEOF
25040 if ac_fn_c_try_run "$LINENO"; then :
25041   gl_cv_func_getcwd_path_max=yes
25042 else
25043   case $? in
25044      10|11|12) gl_cv_func_getcwd_path_max='no, but it is partly working';;
25045      31) gl_cv_func_getcwd_path_max='no, it has the AIX bug';;
25046      *) gl_cv_func_getcwd_path_max=no;;
25047      esac
25048 fi
25049 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25050   conftest.$ac_objext conftest.beam conftest.$ac_ext
25051 fi
25052
25053
25054 fi
25055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_path_max" >&5
25056 $as_echo "$gl_cv_func_getcwd_path_max" >&6; }
25057
25058       case "$gl_cv_func_getcwd_null" in
25059         *yes)
25060
25061
25062   :
25063
25064
25065
25066
25067
25068
25069   :
25070
25071
25072
25073
25074
25075
25076   for ac_func in getpagesize
25077 do :
25078   ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
25079 if test "x$ac_cv_func_getpagesize" = xyes; then :
25080   cat >>confdefs.h <<_ACEOF
25081 #define HAVE_GETPAGESIZE 1
25082 _ACEOF
25083
25084 fi
25085 done
25086
25087   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd aborts when 4k < cwd_length < 16k" >&5
25088 $as_echo_n "checking whether getcwd aborts when 4k < cwd_length < 16k... " >&6; }
25089 if ${gl_cv_func_getcwd_abort_bug+:} false; then :
25090   $as_echo_n "(cached) " >&6
25091 else
25092   # Remove any remnants of a previous test.
25093      rm -rf confdir-14B---
25094      # Arrange for deletion of the temporary directory this test creates.
25095      ac_clean_files="$ac_clean_files confdir-14B---"
25096           if test "$cross_compiling" = yes; then :
25097   gl_cv_func_getcwd_abort_bug=yes
25098 else
25099   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25100 /* end confdefs.h.  */
25101
25102 #include <errno.h>
25103 #include <stdlib.h>
25104 #if HAVE_UNISTD_H
25105 # include <unistd.h>
25106 #else /* on Windows with MSVC */
25107 # include <direct.h>
25108 #endif
25109 #include <string.h>
25110 #include <sys/stat.h>
25111
25112
25113 /* Arrange to define PATH_MAX, like "pathmax.h" does. */
25114 #if HAVE_UNISTD_H
25115 # include <unistd.h>
25116 #endif
25117 #include <limits.h>
25118 #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
25119 # include <sys/param.h>
25120 #endif
25121 #if !defined PATH_MAX && defined MAXPATHLEN
25122 # define PATH_MAX MAXPATHLEN
25123 #endif
25124 #ifdef __hpux
25125 # undef PATH_MAX
25126 # define PATH_MAX 1024
25127 #endif
25128 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
25129 # undef PATH_MAX
25130 # define PATH_MAX 260
25131 #endif
25132
25133
25134 /* Don't get link errors because mkdir is redefined to rpl_mkdir.  */
25135 #undef mkdir
25136
25137 #ifndef S_IRWXU
25138 # define S_IRWXU 0700
25139 #endif
25140
25141 /* FIXME: skip the run-test altogether on systems without getpagesize.  */
25142 #if ! HAVE_GETPAGESIZE
25143 # define getpagesize() 0
25144 #endif
25145
25146 /* This size is chosen to be larger than PATH_MAX (4k), yet smaller than
25147    the 16kB pagesize on ia64 linux.  Those conditions make the code below
25148    trigger a bug in glibc's getcwd implementation before 2.4.90-10.  */
25149 #define TARGET_LEN (5 * 1024)
25150
25151 int
25152 main ()
25153 {
25154   char *cwd;
25155   size_t initial_cwd_len;
25156   int fail = 0;
25157
25158   /* The bug is triggered when PATH_MAX < getpagesize (), so skip
25159      this relatively expensive and invasive test if that's not true.  */
25160 #ifdef PATH_MAX
25161   int bug_possible = PATH_MAX < getpagesize ();
25162 #else
25163   int bug_possible = 0;
25164 #endif
25165   if (! bug_possible)
25166     return 0;
25167
25168   cwd = getcwd (NULL, 0);
25169   if (cwd == NULL)
25170     return 2;
25171
25172   initial_cwd_len = strlen (cwd);
25173   free (cwd);
25174
25175   if (1)
25176     {
25177       static char const dir_name[] = "confdir-14B---";
25178       size_t desired_depth = ((TARGET_LEN - 1 - initial_cwd_len)
25179                               / sizeof dir_name);
25180       size_t d;
25181       for (d = 0; d < desired_depth; d++)
25182         {
25183           if (mkdir (dir_name, S_IRWXU) < 0 || chdir (dir_name) < 0)
25184             {
25185               if (! (errno == ERANGE || errno == ENAMETOOLONG
25186                      || errno == ENOENT))
25187                 fail = 3; /* Unable to construct deep hierarchy.  */
25188               break;
25189             }
25190         }
25191
25192       /* If libc has the bug in question, this invocation of getcwd
25193          results in a failed assertion.  */
25194       cwd = getcwd (NULL, 0);
25195       if (cwd == NULL)
25196         fail = 4; /* getcwd didn't assert, but it failed for a long name
25197                      where the answer could have been learned.  */
25198       free (cwd);
25199
25200       /* Call rmdir first, in case the above chdir failed.  */
25201       rmdir (dir_name);
25202       while (0 < d--)
25203         {
25204           if (chdir ("..") < 0)
25205             {
25206               fail = 5;
25207               break;
25208             }
25209           rmdir (dir_name);
25210         }
25211     }
25212
25213   return fail;
25214 }
25215
25216 _ACEOF
25217 if ac_fn_c_try_run "$LINENO"; then :
25218   gl_cv_func_getcwd_abort_bug=no
25219 else
25220                                 ret=$?
25221      if test $ret -ge 128 || test $ret = 4; then
25222        gl_cv_func_getcwd_abort_bug=yes
25223      else
25224        gl_cv_func_getcwd_abort_bug=no
25225      fi
25226 fi
25227 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25228   conftest.$ac_objext conftest.beam conftest.$ac_ext
25229 fi
25230
25231
25232 fi
25233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_abort_bug" >&5
25234 $as_echo "$gl_cv_func_getcwd_abort_bug" >&6; }
25235   if test $gl_cv_func_getcwd_abort_bug = yes; then :
25236   gl_abort_bug=yes
25237 fi
25238
25239           ;;
25240       esac
25241       ;;
25242   esac
25243       case "$gl_cv_func_getcwd_path_max" in
25244     "no"|"no, it has the AIX bug") ;;
25245     *)
25246
25247 $as_echo "#define HAVE_MINIMALLY_WORKING_GETCWD 1" >>confdefs.h
25248
25249       ;;
25250   esac
25251   case "$gl_cv_func_getcwd_path_max" in
25252     "no, but it is partly working")
25253
25254 $as_echo "#define HAVE_PARTLY_WORKING_GETCWD 1" >>confdefs.h
25255
25256       ;;
25257   esac
25258
25259   if { case "$gl_cv_func_getcwd_null" in *yes) false;; *) true;; esac; } \
25260      || test $gl_cv_func_getcwd_posix_signature != yes \
25261      || test "$gl_cv_func_getcwd_path_max" != yes \
25262      || test $gl_abort_bug = yes; then
25263     REPLACE_GETCWD=1
25264   fi
25265
25266   if test $REPLACE_GETCWD = 1; then
25267
25268
25269
25270
25271
25272
25273
25274
25275   gl_LIBOBJS="$gl_LIBOBJS getcwd.$ac_objext"
25276
25277
25278
25279
25280   :
25281
25282   fi
25283
25284
25285 cat >>confdefs.h <<_ACEOF
25286 #define GNULIB_GETCWD 1
25287 _ACEOF
25288
25289
25290
25291
25292
25293
25294
25295           GNULIB_GETCWD=1
25296
25297
25298
25299
25300
25301 $as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
25302
25303
25304
25305
25306
25307
25308
25309
25310   case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_posix_signature in
25311   *yes,yes) ;;
25312   *)
25313         REPLACE_GETCWD=1
25314     ;;
25315   esac
25316
25317   if test $REPLACE_GETCWD = 1; then
25318
25319
25320
25321
25322
25323
25324
25325
25326   gl_LIBOBJS="$gl_LIBOBJS getcwd-lgpl.$ac_objext"
25327
25328   fi
25329
25330
25331
25332
25333
25334           GNULIB_GETCWD=1
25335
25336
25337
25338
25339
25340 $as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
25341
25342
25343
25344
25345
25346
25347
25348
25349
25350   :
25351
25352
25353
25354
25355
25356
25357
25358   :
25359
25360
25361
25362
25363
25364   if test $ac_cv_func_getdelim = yes; then
25365     HAVE_GETDELIM=1
25366         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getdelim function" >&5
25367 $as_echo_n "checking for working getdelim function... " >&6; }
25368 if ${gl_cv_func_working_getdelim+:} false; then :
25369   $as_echo_n "(cached) " >&6
25370 else
25371   echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data
25372     if test "$cross_compiling" = yes; then :
25373         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25374 /* end confdefs.h.  */
25375
25376 #include <features.h>
25377 #ifdef __GNU_LIBRARY__
25378  #if (__GLIBC__ >= 2) && !defined __UCLIBC__
25379   Lucky GNU user
25380  #endif
25381 #endif
25382
25383 _ACEOF
25384 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25385   $EGREP "Lucky GNU user" >/dev/null 2>&1; then :
25386   gl_cv_func_working_getdelim="guessing yes"
25387 else
25388   gl_cv_func_working_getdelim="guessing no"
25389 fi
25390 rm -f conftest*
25391
25392
25393 else
25394   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25395 /* end confdefs.h.  */
25396
25397 #    include <stdio.h>
25398 #    include <stdlib.h>
25399 #    include <string.h>
25400     int main ()
25401     {
25402       FILE *in = fopen ("./conftest.data", "r");
25403       if (!in)
25404         return 1;
25405       {
25406         /* Test result for a NULL buffer and a zero size.
25407            Based on a test program from Karl Heuer.  */
25408         char *line = NULL;
25409         size_t siz = 0;
25410         int len = getdelim (&line, &siz, '\n', in);
25411         if (!(len == 4 && line && strcmp (line, "foo\n") == 0))
25412           return 2;
25413       }
25414       {
25415         /* Test result for a NULL buffer and a non-zero size.
25416            This crashes on FreeBSD 8.0.  */
25417         char *line = NULL;
25418         size_t siz = (size_t)(~0) / 4;
25419         if (getdelim (&line, &siz, '\n', in) == -1)
25420           return 3;
25421       }
25422       return 0;
25423     }
25424
25425 _ACEOF
25426 if ac_fn_c_try_run "$LINENO"; then :
25427   gl_cv_func_working_getdelim=yes
25428 else
25429   gl_cv_func_working_getdelim=no
25430 fi
25431 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25432   conftest.$ac_objext conftest.beam conftest.$ac_ext
25433 fi
25434
25435 fi
25436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_getdelim" >&5
25437 $as_echo "$gl_cv_func_working_getdelim" >&6; }
25438     case "$gl_cv_func_working_getdelim" in
25439       *no)
25440         REPLACE_GETDELIM=1
25441         ;;
25442     esac
25443   else
25444     HAVE_GETDELIM=0
25445   fi
25446
25447   if test $ac_cv_have_decl_getdelim = no; then
25448     HAVE_DECL_GETDELIM=0
25449   fi
25450
25451   if test $HAVE_GETDELIM = 0 || test $REPLACE_GETDELIM = 1; then
25452
25453
25454
25455
25456
25457
25458
25459
25460   gl_LIBOBJS="$gl_LIBOBJS getdelim.$ac_objext"
25461
25462
25463   for ac_func in flockfile funlockfile
25464 do :
25465   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
25466 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
25467 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
25468   cat >>confdefs.h <<_ACEOF
25469 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
25470 _ACEOF
25471
25472 fi
25473 done
25474
25475   ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
25476 if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then :
25477   ac_have_decl=1
25478 else
25479   ac_have_decl=0
25480 fi
25481
25482 cat >>confdefs.h <<_ACEOF
25483 #define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
25484 _ACEOF
25485
25486
25487   fi
25488
25489
25490
25491
25492
25493           GNULIB_GETDELIM=1
25494
25495
25496
25497
25498
25499 $as_echo "#define GNULIB_TEST_GETDELIM 1" >>confdefs.h
25500
25501
25502
25503
25504
25505
25506
25507   :
25508
25509
25510
25511
25512
25513   if test $ac_cv_func_getdtablesize = yes; then
25514     # Cygwin 1.7.25 automatically increases the RLIMIT_NOFILE soft limit
25515     # up to an unchangeable hard limit; all other platforms correctly
25516     # require setrlimit before getdtablesize() can report a larger value.
25517     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getdtablesize works" >&5
25518 $as_echo_n "checking whether getdtablesize works... " >&6; }
25519 if ${gl_cv_func_getdtablesize_works+:} false; then :
25520   $as_echo_n "(cached) " >&6
25521 else
25522   if test "$cross_compiling" = yes; then :
25523   case "$host_os" in
25524           cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows
25525             gl_cv_func_getdtablesize_works="guessing no" ;;
25526           *) gl_cv_func_getdtablesize_works="guessing yes" ;;
25527          esac
25528 else
25529   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25530 /* end confdefs.h.  */
25531
25532         #include <unistd.h>
25533 int
25534 main ()
25535 {
25536 int size = getdtablesize();
25537            if (dup2 (0, getdtablesize()) != -1)
25538              return 1;
25539            if (size != getdtablesize())
25540              return 2;
25541
25542   ;
25543   return 0;
25544 }
25545 _ACEOF
25546 if ac_fn_c_try_run "$LINENO"; then :
25547   gl_cv_func_getdtablesize_works=yes
25548 else
25549   gl_cv_func_getdtablesize_works=no
25550 fi
25551 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25552   conftest.$ac_objext conftest.beam conftest.$ac_ext
25553 fi
25554
25555
25556 fi
25557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getdtablesize_works" >&5
25558 $as_echo "$gl_cv_func_getdtablesize_works" >&6; }
25559     case "$gl_cv_func_getdtablesize_works" in
25560       *yes) ;;
25561       *) REPLACE_GETDTABLESIZE=1 ;;
25562     esac
25563   else
25564     HAVE_GETDTABLESIZE=0
25565   fi
25566
25567   if test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1; then
25568
25569
25570
25571
25572
25573
25574
25575
25576   gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext"
25577
25578     :
25579   fi
25580
25581
25582
25583
25584
25585           GNULIB_GETDTABLESIZE=1
25586
25587
25588
25589
25590
25591 $as_echo "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h
25592
25593
25594
25595
25596
25597
25598
25599
25600         ac_fn_c_check_func "$LINENO" "getgroups" "ac_cv_func_getgroups"
25601 if test "x$ac_cv_func_getgroups" = xyes; then :
25602
25603 fi
25604
25605
25606   # If we don't yet have getgroups, see if it's in -lbsd.
25607   # This is reported to be necessary on an ITOS 3000WS running SEIUX 3.1.
25608   ac_save_LIBS=$LIBS
25609   if test $ac_cv_func_getgroups = no; then
25610     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getgroups in -lbsd" >&5
25611 $as_echo_n "checking for getgroups in -lbsd... " >&6; }
25612 if ${ac_cv_lib_bsd_getgroups+:} false; then :
25613   $as_echo_n "(cached) " >&6
25614 else
25615   ac_check_lib_save_LIBS=$LIBS
25616 LIBS="-lbsd  $LIBS"
25617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25618 /* end confdefs.h.  */
25619
25620 /* Override any GCC internal prototype to avoid an error.
25621    Use char because int might match the return type of a GCC
25622    builtin and then its argument prototype would still apply.  */
25623 #ifdef __cplusplus
25624 extern "C"
25625 #endif
25626 char getgroups ();
25627 int
25628 main ()
25629 {
25630 return getgroups ();
25631   ;
25632   return 0;
25633 }
25634 _ACEOF
25635 if ac_fn_c_try_link "$LINENO"; then :
25636   ac_cv_lib_bsd_getgroups=yes
25637 else
25638   ac_cv_lib_bsd_getgroups=no
25639 fi
25640 rm -f core conftest.err conftest.$ac_objext \
25641     conftest$ac_exeext conftest.$ac_ext
25642 LIBS=$ac_check_lib_save_LIBS
25643 fi
25644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_getgroups" >&5
25645 $as_echo "$ac_cv_lib_bsd_getgroups" >&6; }
25646 if test "x$ac_cv_lib_bsd_getgroups" = xyes; then :
25647   GETGROUPS_LIB=-lbsd
25648 fi
25649
25650   fi
25651
25652   # Run the program to test the functionality of the system-supplied
25653   # getgroups function only if there is such a function.
25654   if test $ac_cv_func_getgroups = yes; then
25655     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getgroups" >&5
25656 $as_echo_n "checking for working getgroups... " >&6; }
25657 if ${ac_cv_func_getgroups_works+:} false; then :
25658   $as_echo_n "(cached) " >&6
25659 else
25660   if test "$cross_compiling" = yes; then :
25661   case "$host_os" in # ((
25662                     # Guess yes on glibc systems.
25663             *-gnu*) ac_cv_func_getgroups_works="guessing yes" ;;
25664                     # If we don't know, assume the worst.
25665             *)      ac_cv_func_getgroups_works="guessing no" ;;
25666           esac
25667
25668 else
25669   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25670 /* end confdefs.h.  */
25671 $ac_includes_default
25672 int
25673 main ()
25674 {
25675 /* On Ultrix 4.3, getgroups (0, 0) always fails.  */
25676               return getgroups (0, 0) == -1;
25677   ;
25678   return 0;
25679 }
25680
25681 _ACEOF
25682 if ac_fn_c_try_run "$LINENO"; then :
25683   ac_cv_func_getgroups_works=yes
25684 else
25685   ac_cv_func_getgroups_works=no
25686 fi
25687 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25688   conftest.$ac_objext conftest.beam conftest.$ac_ext
25689 fi
25690
25691
25692 fi
25693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getgroups_works" >&5
25694 $as_echo "$ac_cv_func_getgroups_works" >&6; }
25695   else
25696     ac_cv_func_getgroups_works=no
25697   fi
25698   case "$ac_cv_func_getgroups_works" in
25699     *yes)
25700
25701 $as_echo "#define HAVE_GETGROUPS 1" >>confdefs.h
25702
25703       ;;
25704   esac
25705   LIBS=$ac_save_LIBS
25706
25707   if test $ac_cv_func_getgroups != yes; then
25708     HAVE_GETGROUPS=0
25709   else
25710     if test "$ac_cv_type_getgroups" != gid_t \
25711        || { case "$ac_cv_func_getgroups_works" in
25712               *yes) false;;
25713               *) true;;
25714             esac
25715           }; then
25716       REPLACE_GETGROUPS=1
25717
25718 $as_echo "#define GETGROUPS_ZERO_BUG 1" >>confdefs.h
25719
25720     else
25721             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getgroups handles negative values" >&5
25722 $as_echo_n "checking whether getgroups handles negative values... " >&6; }
25723 if ${gl_cv_func_getgroups_works+:} false; then :
25724   $as_echo_n "(cached) " >&6
25725 else
25726   if test "$cross_compiling" = yes; then :
25727   case "$host_os" in
25728                      # Guess yes on glibc systems.
25729              *-gnu*) gl_cv_func_getgroups_works="guessing yes" ;;
25730                      # If we don't know, assume the worst.
25731              *)      gl_cv_func_getgroups_works="guessing no" ;;
25732            esac
25733
25734 else
25735   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25736 /* end confdefs.h.  */
25737 $ac_includes_default
25738 int
25739 main ()
25740 {
25741 int size = getgroups (0, 0);
25742             gid_t *list = malloc (size * sizeof *list);
25743             return getgroups (-1, list) != -1;
25744   ;
25745   return 0;
25746 }
25747 _ACEOF
25748 if ac_fn_c_try_run "$LINENO"; then :
25749   gl_cv_func_getgroups_works=yes
25750 else
25751   gl_cv_func_getgroups_works=no
25752 fi
25753 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25754   conftest.$ac_objext conftest.beam conftest.$ac_ext
25755 fi
25756
25757 fi
25758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getgroups_works" >&5
25759 $as_echo "$gl_cv_func_getgroups_works" >&6; }
25760       case "$gl_cv_func_getgroups_works" in
25761         *yes) ;;
25762         *) REPLACE_GETGROUPS=1 ;;
25763       esac
25764     fi
25765   fi
25766   test -n "$GETGROUPS_LIB" && LIBS="$GETGROUPS_LIB $LIBS"
25767
25768   if test $HAVE_GETGROUPS = 0 || test $REPLACE_GETGROUPS = 1; then
25769
25770
25771
25772
25773
25774
25775
25776
25777   gl_LIBOBJS="$gl_LIBOBJS getgroups.$ac_objext"
25778
25779   fi
25780
25781
25782
25783
25784
25785           GNULIB_GETGROUPS=1
25786
25787
25788
25789
25790
25791 $as_echo "#define GNULIB_TEST_GETGROUPS 1" >>confdefs.h
25792
25793
25794
25795
25796
25797
25798
25799
25800
25801   :
25802
25803
25804
25805
25806
25807   if test $ac_cv_header_sys_socket_h != yes; then
25808                     for ac_header in winsock2.h
25809 do :
25810   ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
25811 if test "x$ac_cv_header_winsock2_h" = xyes; then :
25812   cat >>confdefs.h <<_ACEOF
25813 #define HAVE_WINSOCK2_H 1
25814 _ACEOF
25815
25816 fi
25817
25818 done
25819
25820   fi
25821   if test "$ac_cv_header_winsock2_h" = yes; then
25822     HAVE_WINSOCK2_H=1
25823     UNISTD_H_HAVE_WINSOCK2_H=1
25824     SYS_IOCTL_H_HAVE_WINSOCK2_H=1
25825   else
25826     HAVE_WINSOCK2_H=0
25827   fi
25828
25829
25830
25831         GETHOSTNAME_LIB=
25832   for ac_func in gethostname
25833 do :
25834   ac_fn_c_check_func "$LINENO" "gethostname" "ac_cv_func_gethostname"
25835 if test "x$ac_cv_func_gethostname" = xyes; then :
25836   cat >>confdefs.h <<_ACEOF
25837 #define HAVE_GETHOSTNAME 1
25838 _ACEOF
25839
25840 else
25841
25842     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostname in winsock2.h and -lws2_32" >&5
25843 $as_echo_n "checking for gethostname in winsock2.h and -lws2_32... " >&6; }
25844 if ${gl_cv_w32_gethostname+:} false; then :
25845   $as_echo_n "(cached) " >&6
25846 else
25847   gl_cv_w32_gethostname=no
25848        gl_save_LIBS="$LIBS"
25849        LIBS="$LIBS -lws2_32"
25850        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25851 /* end confdefs.h.  */
25852
25853 #ifdef HAVE_WINSOCK2_H
25854 #include <winsock2.h>
25855 #endif
25856 #include <stddef.h>
25857
25858 int
25859 main ()
25860 {
25861 gethostname(NULL, 0);
25862   ;
25863   return 0;
25864 }
25865 _ACEOF
25866 if ac_fn_c_try_link "$LINENO"; then :
25867   gl_cv_w32_gethostname=yes
25868 fi
25869 rm -f core conftest.err conftest.$ac_objext \
25870     conftest$ac_exeext conftest.$ac_ext
25871        LIBS="$gl_save_LIBS"
25872
25873 fi
25874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_w32_gethostname" >&5
25875 $as_echo "$gl_cv_w32_gethostname" >&6; }
25876     if test "$gl_cv_w32_gethostname" = "yes"; then
25877       GETHOSTNAME_LIB="-lws2_32"
25878     fi
25879
25880 fi
25881 done
25882
25883
25884
25885   if test "$ac_cv_func_gethostname" = no; then
25886     HAVE_GETHOSTNAME=0
25887   fi
25888
25889
25890
25891   :
25892
25893
25894
25895
25896
25897
25898   :
25899
25900
25901
25902
25903
25904
25905   :
25906
25907
25908
25909
25910
25911   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HOST_NAME_MAX" >&5
25912 $as_echo_n "checking for HOST_NAME_MAX... " >&6; }
25913 if ${gl_cv_decl_HOST_NAME_MAX+:} false; then :
25914   $as_echo_n "(cached) " >&6
25915 else
25916
25917     gl_cv_decl_HOST_NAME_MAX=
25918     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25919 /* end confdefs.h.  */
25920
25921 #include <limits.h>
25922 #ifdef HOST_NAME_MAX
25923 lucky
25924 #endif
25925
25926 _ACEOF
25927 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25928   $EGREP "lucky" >/dev/null 2>&1; then :
25929   gl_cv_decl_HOST_NAME_MAX=yes
25930 fi
25931 rm -f conftest*
25932
25933     if test -z "$gl_cv_decl_HOST_NAME_MAX"; then
25934             if test "$gl_cv_w32_gethostname" = yes; then
25935                 gl_cv_decl_HOST_NAME_MAX=256
25936       else
25937         if ac_fn_c_compute_int "$LINENO" "MAXHOSTNAMELEN" "gl_cv_decl_HOST_NAME_MAX"        "
25938 #include <sys/types.h>
25939 #if HAVE_SYS_PARAM_H
25940 # include <sys/param.h>
25941 #endif
25942 #if HAVE_SYS_SOCKET_H
25943 # include <sys/socket.h>
25944 #endif
25945 #if HAVE_NETDB_H
25946 # include <netdb.h>
25947 #endif
25948 "; then :
25949
25950 else
25951                         gl_cv_decl_HOST_NAME_MAX=256
25952
25953 fi
25954
25955
25956       fi
25957     fi
25958
25959 fi
25960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_HOST_NAME_MAX" >&5
25961 $as_echo "$gl_cv_decl_HOST_NAME_MAX" >&6; }
25962   if test "$gl_cv_decl_HOST_NAME_MAX" != yes; then
25963
25964 cat >>confdefs.h <<_ACEOF
25965 #define HOST_NAME_MAX $gl_cv_decl_HOST_NAME_MAX
25966 _ACEOF
25967
25968   fi
25969
25970
25971   if test $HAVE_GETHOSTNAME = 0; then
25972
25973
25974
25975
25976
25977
25978
25979
25980   gl_LIBOBJS="$gl_LIBOBJS gethostname.$ac_objext"
25981
25982
25983   if test "$gl_cv_w32_gethostname" != "yes"; then
25984     for ac_func in uname
25985 do :
25986   ac_fn_c_check_func "$LINENO" "uname" "ac_cv_func_uname"
25987 if test "x$ac_cv_func_uname" = xyes; then :
25988   cat >>confdefs.h <<_ACEOF
25989 #define HAVE_UNAME 1
25990 _ACEOF
25991
25992 fi
25993 done
25994
25995   fi
25996
25997   fi
25998
25999
26000
26001
26002
26003           GNULIB_GETHOSTNAME=1
26004
26005
26006
26007
26008
26009 $as_echo "#define GNULIB_TEST_GETHOSTNAME 1" >>confdefs.h
26010
26011
26012
26013
26014
26015
26016
26017
26018
26019   :
26020
26021
26022
26023
26024
26025
26026   gl_getline_needs_run_time_check=no
26027   ac_fn_c_check_func "$LINENO" "getline" "ac_cv_func_getline"
26028 if test "x$ac_cv_func_getline" = xyes; then :
26029                    gl_getline_needs_run_time_check=yes
26030 else
26031   am_cv_func_working_getline=no
26032 fi
26033
26034   if test $gl_getline_needs_run_time_check = yes; then
26035     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getline function" >&5
26036 $as_echo_n "checking for working getline function... " >&6; }
26037 if ${am_cv_func_working_getline+:} false; then :
26038   $as_echo_n "(cached) " >&6
26039 else
26040   echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data
26041     if test "$cross_compiling" = yes; then :
26042         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26043 /* end confdefs.h.  */
26044
26045 #include <features.h>
26046 #ifdef __GNU_LIBRARY__
26047  #if (__GLIBC__ >= 2) && !defined __UCLIBC__
26048   Lucky GNU user
26049  #endif
26050 #endif
26051
26052 _ACEOF
26053 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26054   $EGREP "Lucky GNU user" >/dev/null 2>&1; then :
26055   am_cv_func_working_getline="guessing yes"
26056 else
26057   am_cv_func_working_getline="guessing no"
26058 fi
26059 rm -f conftest*
26060
26061
26062 else
26063   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26064 /* end confdefs.h.  */
26065
26066 #    include <stdio.h>
26067 #    include <stdlib.h>
26068 #    include <string.h>
26069     int main ()
26070     {
26071       FILE *in = fopen ("./conftest.data", "r");
26072       if (!in)
26073         return 1;
26074       {
26075         /* Test result for a NULL buffer and a zero size.
26076            Based on a test program from Karl Heuer.  */
26077         char *line = NULL;
26078         size_t siz = 0;
26079         int len = getline (&line, &siz, in);
26080         if (!(len == 4 && line && strcmp (line, "foo\n") == 0))
26081           return 2;
26082       }
26083       {
26084         /* Test result for a NULL buffer and a non-zero size.
26085            This crashes on FreeBSD 8.0.  */
26086         char *line = NULL;
26087         size_t siz = (size_t)(~0) / 4;
26088         if (getline (&line, &siz, in) == -1)
26089           return 3;
26090       }
26091       return 0;
26092     }
26093
26094 _ACEOF
26095 if ac_fn_c_try_run "$LINENO"; then :
26096   am_cv_func_working_getline=yes
26097 else
26098   am_cv_func_working_getline=no
26099 fi
26100 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26101   conftest.$ac_objext conftest.beam conftest.$ac_ext
26102 fi
26103
26104 fi
26105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_working_getline" >&5
26106 $as_echo "$am_cv_func_working_getline" >&6; }
26107   fi
26108
26109   if test $ac_cv_have_decl_getline = no; then
26110     HAVE_DECL_GETLINE=0
26111   fi
26112
26113   case "$am_cv_func_working_getline" in
26114     *no)
26115                         REPLACE_GETLINE=1
26116       ;;
26117   esac
26118
26119   if test $REPLACE_GETLINE = 1; then
26120
26121
26122
26123
26124
26125
26126
26127
26128   gl_LIBOBJS="$gl_LIBOBJS getline.$ac_objext"
26129
26130
26131   :
26132
26133   fi
26134
26135
26136
26137
26138
26139           GNULIB_GETLINE=1
26140
26141
26142
26143
26144
26145 $as_echo "#define GNULIB_TEST_GETLINE 1" >>confdefs.h
26146
26147
26148
26149
26150
26151
26152
26153
26154   if test $REPLACE_GETOPT = 1; then
26155
26156
26157
26158
26159
26160
26161
26162
26163   gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
26164
26165
26166
26167
26168
26169
26170
26171
26172
26173   gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
26174
26175
26176
26177   :
26178
26179
26180
26181
26182
26183
26184         GNULIB_GL_UNISTD_H_GETOPT=1
26185   fi
26186
26187
26188
26189 $as_echo "#define GNULIB_TEST_GETOPT_GNU 1" >>confdefs.h
26190
26191
26192
26193
26194
26195
26196
26197     REPLACE_GETOPT=0
26198     if test -n "$gl_replace_getopt"; then
26199       REPLACE_GETOPT=1
26200     fi
26201
26202   if test $REPLACE_GETOPT = 1; then
26203
26204   GETOPT_H=getopt.h
26205
26206 $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
26207
26208
26209
26210   fi
26211
26212   if test $REPLACE_GETOPT = 1; then
26213
26214
26215
26216
26217
26218
26219
26220
26221   gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
26222
26223
26224
26225
26226
26227
26228
26229
26230
26231   gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
26232
26233
26234
26235   :
26236
26237
26238
26239
26240
26241
26242         GNULIB_GL_UNISTD_H_GETOPT=1
26243   fi
26244
26245
26246
26247
26248
26249
26250
26251
26252   :
26253
26254
26255
26256
26257
26258
26259
26260
26261
26262
26263
26264
26265
26266
26267   :
26268
26269
26270
26271
26272
26273
26274   gl_gettimeofday_timezone=void
26275   if test $ac_cv_func_gettimeofday != yes; then
26276     HAVE_GETTIMEOFDAY=0
26277   else
26278
26279
26280
26281  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5
26282 $as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; }
26283 if ${gl_cv_func_gettimeofday_clobber+:} false; then :
26284   $as_echo_n "(cached) " >&6
26285 else
26286   if test "$cross_compiling" = yes; then :
26287   # When cross-compiling:
26288       case "$host_os" in
26289                 # Guess all is fine on glibc systems.
26290         *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
26291                 # If we don't know, assume the worst.
26292         *)      gl_cv_func_gettimeofday_clobber="guessing yes" ;;
26293       esac
26294
26295 else
26296   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26297 /* end confdefs.h.  */
26298 #include <string.h>
26299           #include <sys/time.h>
26300           #include <time.h>
26301           #include <stdlib.h>
26302
26303 int
26304 main ()
26305 {
26306
26307           time_t t = 0;
26308           struct tm *lt;
26309           struct tm saved_lt;
26310           struct timeval tv;
26311           lt = localtime (&t);
26312           saved_lt = *lt;
26313           gettimeofday (&tv, NULL);
26314           return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
26315
26316   ;
26317   return 0;
26318 }
26319 _ACEOF
26320 if ac_fn_c_try_run "$LINENO"; then :
26321   gl_cv_func_gettimeofday_clobber=no
26322 else
26323   gl_cv_func_gettimeofday_clobber=yes
26324 fi
26325 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26326   conftest.$ac_objext conftest.beam conftest.$ac_ext
26327 fi
26328
26329 fi
26330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5
26331 $as_echo "$gl_cv_func_gettimeofday_clobber" >&6; }
26332
26333  case "$gl_cv_func_gettimeofday_clobber" in
26334    *yes)
26335      REPLACE_GETTIMEOFDAY=1
26336
26337   REPLACE_GMTIME=1
26338   REPLACE_LOCALTIME=1
26339
26340
26341 $as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
26342
26343      ;;
26344  esac
26345
26346     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
26347 $as_echo_n "checking for gettimeofday with POSIX signature... " >&6; }
26348 if ${gl_cv_func_gettimeofday_posix_signature+:} false; then :
26349   $as_echo_n "(cached) " >&6
26350 else
26351   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26352 /* end confdefs.h.  */
26353 #include <sys/time.h>
26354               struct timeval c;
26355               int gettimeofday (struct timeval *restrict, void *restrict);
26356
26357 int
26358 main ()
26359 {
26360 /* glibc uses struct timezone * rather than the POSIX void *
26361                  if _GNU_SOURCE is defined.  However, since the only portable
26362                  use of gettimeofday uses NULL as the second parameter, and
26363                  since the glibc definition is actually more typesafe, it is
26364                  not worth wrapping this to get a compliant signature.  */
26365               int (*f) (struct timeval *restrict, void *restrict)
26366                 = gettimeofday;
26367               int x = f (&c, 0);
26368               return !(x | c.tv_sec | c.tv_usec);
26369
26370   ;
26371   return 0;
26372 }
26373 _ACEOF
26374 if ac_fn_c_try_compile "$LINENO"; then :
26375   gl_cv_func_gettimeofday_posix_signature=yes
26376 else
26377   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26378 /* end confdefs.h.  */
26379 #include <sys/time.h>
26380 int gettimeofday (struct timeval *restrict, struct timezone *restrict);
26381
26382 int
26383 main ()
26384 {
26385
26386   ;
26387   return 0;
26388 }
26389 _ACEOF
26390 if ac_fn_c_try_compile "$LINENO"; then :
26391   gl_cv_func_gettimeofday_posix_signature=almost
26392 else
26393   gl_cv_func_gettimeofday_posix_signature=no
26394 fi
26395 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26396 fi
26397 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26398 fi
26399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
26400 $as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; }
26401     if test $gl_cv_func_gettimeofday_posix_signature = almost; then
26402       gl_gettimeofday_timezone='struct timezone'
26403     elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
26404       REPLACE_GETTIMEOFDAY=1
26405     fi
26406         if test $REPLACE_STRUCT_TIMEVAL = 1; then
26407       REPLACE_GETTIMEOFDAY=1
26408     fi
26409
26410   fi
26411
26412 cat >>confdefs.h <<_ACEOF
26413 #define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone
26414 _ACEOF
26415
26416
26417   if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
26418
26419
26420
26421
26422
26423
26424
26425
26426   gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
26427
26428
26429   for ac_header in sys/timeb.h
26430 do :
26431   ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
26432 if test "x$ac_cv_header_sys_timeb_h" = xyes; then :
26433   cat >>confdefs.h <<_ACEOF
26434 #define HAVE_SYS_TIMEB_H 1
26435 _ACEOF
26436
26437 fi
26438
26439 done
26440
26441   for ac_func in _ftime
26442 do :
26443   ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
26444 if test "x$ac_cv_func__ftime" = xyes; then :
26445   cat >>confdefs.h <<_ACEOF
26446 #define HAVE__FTIME 1
26447 _ACEOF
26448
26449 fi
26450 done
26451
26452
26453   fi
26454
26455
26456
26457
26458
26459           GNULIB_GETTIMEOFDAY=1
26460
26461
26462
26463
26464
26465 $as_echo "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h
26466
26467
26468
26469   # Autoconf 2.61a.99 and earlier don't support linking a file only
26470   # in VPATH builds.  But since GNUmakefile is for maintainer use
26471   # only, it does not matter if we skip the link with older autoconf.
26472   # Automake 1.10.1 and earlier try to remove GNUmakefile in non-VPATH
26473   # builds, so use a shell variable to bypass this.
26474   GNUmakefile=GNUmakefile
26475   ac_config_links="$ac_config_links $GNUmakefile:$GNUmakefile"
26476
26477
26478
26479
26480
26481
26482       ac_fn_c_check_func "$LINENO" "group_member" "ac_cv_func_group_member"
26483 if test "x$ac_cv_func_group_member" = xyes; then :
26484
26485 else
26486
26487     HAVE_GROUP_MEMBER=0
26488
26489 fi
26490
26491
26492   if test $HAVE_GROUP_MEMBER = 0; then
26493
26494
26495
26496
26497
26498
26499
26500
26501   gl_LIBOBJS="$gl_LIBOBJS group-member.$ac_objext"
26502
26503
26504
26505
26506   fi
26507
26508
26509
26510
26511
26512           GNULIB_GROUP_MEMBER=1
26513
26514
26515
26516
26517
26518 $as_echo "#define GNULIB_TEST_GROUP_MEMBER 1" >>confdefs.h
26519
26520
26521
26522
26523   :
26524
26525
26526   :
26527
26528
26529   :
26530
26531
26532
26533   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler generally respects inline" >&5
26534 $as_echo_n "checking whether the compiler generally respects inline... " >&6; }
26535 if ${gl_cv_c_inline_effective+:} false; then :
26536   $as_echo_n "(cached) " >&6
26537 else
26538   if test $ac_cv_c_inline = no; then
26539        gl_cv_c_inline_effective=no
26540      else
26541                                           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26542 /* end confdefs.h.  */
26543
26544 int
26545 main ()
26546 {
26547 #ifdef __NO_INLINE__
26548                #error "inline is not effective"
26549              #endif
26550   ;
26551   return 0;
26552 }
26553 _ACEOF
26554 if ac_fn_c_try_compile "$LINENO"; then :
26555   gl_cv_c_inline_effective=yes
26556 else
26557   gl_cv_c_inline_effective=no
26558 fi
26559 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26560      fi
26561
26562 fi
26563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_inline_effective" >&5
26564 $as_echo "$gl_cv_c_inline_effective" >&6; }
26565   if test $gl_cv_c_inline_effective = yes; then
26566
26567 $as_echo "#define HAVE_INLINE 1" >>confdefs.h
26568
26569   fi
26570
26571
26572
26573
26574
26575
26576   PRIPTR_PREFIX=
26577   if test -n "$STDINT_H"; then
26578         PRIPTR_PREFIX='"l"'
26579   else
26580         for glpfx in '' l ll I64; do
26581       case $glpfx in
26582         '')  gltype1='int';;
26583         l)   gltype1='long int';;
26584         ll)  gltype1='long long int';;
26585         I64) gltype1='__int64';;
26586       esac
26587       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26588 /* end confdefs.h.  */
26589 #include <stdint.h>
26590            extern intptr_t foo;
26591            extern $gltype1 foo;
26592 int
26593 main ()
26594 {
26595
26596   ;
26597   return 0;
26598 }
26599 _ACEOF
26600 if ac_fn_c_try_compile "$LINENO"; then :
26601   PRIPTR_PREFIX='"'$glpfx'"'
26602 fi
26603 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26604       test -n "$PRIPTR_PREFIX" && break
26605     done
26606   fi
26607
26608
26609
26610   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT32_MAX < INTMAX_MAX" >&5
26611 $as_echo_n "checking whether INT32_MAX < INTMAX_MAX... " >&6; }
26612 if ${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+:} false; then :
26613   $as_echo_n "(cached) " >&6
26614 else
26615   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26616 /* end confdefs.h.  */
26617 /* Work also in C++ mode.  */
26618             #define __STDC_LIMIT_MACROS 1
26619
26620             /* Work if build is not clean.  */
26621             #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
26622
26623             #include <limits.h>
26624             #if HAVE_STDINT_H
26625              #include <stdint.h>
26626             #endif
26627
26628             #if defined INT32_MAX && defined INTMAX_MAX
26629              #define CONDITION (INT32_MAX < INTMAX_MAX)
26630             #elif HAVE_LONG_LONG_INT
26631              #define CONDITION (sizeof (int) < sizeof (long long int))
26632             #else
26633              #define CONDITION 0
26634             #endif
26635             int test[CONDITION ? 1 : -1];
26636 int
26637 main ()
26638 {
26639
26640   ;
26641   return 0;
26642 }
26643 _ACEOF
26644 if ac_fn_c_try_compile "$LINENO"; then :
26645   gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes
26646 else
26647   gl_cv_test_INT32_MAX_LT_INTMAX_MAX=no
26648 fi
26649 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26650 fi
26651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&5
26652 $as_echo "$gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&6; }
26653   if test $gl_cv_test_INT32_MAX_LT_INTMAX_MAX = yes; then
26654     INT32_MAX_LT_INTMAX_MAX=1;
26655   else
26656     INT32_MAX_LT_INTMAX_MAX=0;
26657   fi
26658
26659
26660   if test $APPLE_UNIVERSAL_BUILD = 0; then
26661
26662   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT64_MAX == LONG_MAX" >&5
26663 $as_echo_n "checking whether INT64_MAX == LONG_MAX... " >&6; }
26664 if ${gl_cv_test_INT64_MAX_EQ_LONG_MAX+:} false; then :
26665   $as_echo_n "(cached) " >&6
26666 else
26667   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26668 /* end confdefs.h.  */
26669 /* Work also in C++ mode.  */
26670             #define __STDC_LIMIT_MACROS 1
26671
26672             /* Work if build is not clean.  */
26673             #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
26674
26675             #include <limits.h>
26676             #if HAVE_STDINT_H
26677              #include <stdint.h>
26678             #endif
26679
26680             #if defined INT64_MAX
26681              #define CONDITION (INT64_MAX == LONG_MAX)
26682             #elif HAVE_LONG_LONG_INT
26683              #define CONDITION (sizeof (long long int) == sizeof (long int))
26684             #else
26685              #define CONDITION 0
26686             #endif
26687             int test[CONDITION ? 1 : -1];
26688 int
26689 main ()
26690 {
26691
26692   ;
26693   return 0;
26694 }
26695 _ACEOF
26696 if ac_fn_c_try_compile "$LINENO"; then :
26697   gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes
26698 else
26699   gl_cv_test_INT64_MAX_EQ_LONG_MAX=no
26700 fi
26701 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26702 fi
26703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&5
26704 $as_echo "$gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&6; }
26705   if test $gl_cv_test_INT64_MAX_EQ_LONG_MAX = yes; then
26706     INT64_MAX_EQ_LONG_MAX=1;
26707   else
26708     INT64_MAX_EQ_LONG_MAX=0;
26709   fi
26710
26711
26712   else
26713     INT64_MAX_EQ_LONG_MAX=-1
26714   fi
26715
26716   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT32_MAX < UINTMAX_MAX" >&5
26717 $as_echo_n "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; }
26718 if ${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+:} false; then :
26719   $as_echo_n "(cached) " >&6
26720 else
26721   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26722 /* end confdefs.h.  */
26723 /* Work also in C++ mode.  */
26724             #define __STDC_LIMIT_MACROS 1
26725
26726             /* Work if build is not clean.  */
26727             #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
26728
26729             #include <limits.h>
26730             #if HAVE_STDINT_H
26731              #include <stdint.h>
26732             #endif
26733
26734             #if defined UINT32_MAX && defined UINTMAX_MAX
26735              #define CONDITION (UINT32_MAX < UINTMAX_MAX)
26736             #elif HAVE_LONG_LONG_INT
26737              #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int))
26738             #else
26739              #define CONDITION 0
26740             #endif
26741             int test[CONDITION ? 1 : -1];
26742 int
26743 main ()
26744 {
26745
26746   ;
26747   return 0;
26748 }
26749 _ACEOF
26750 if ac_fn_c_try_compile "$LINENO"; then :
26751   gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes
26752 else
26753   gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=no
26754 fi
26755 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26756 fi
26757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&5
26758 $as_echo "$gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&6; }
26759   if test $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX = yes; then
26760     UINT32_MAX_LT_UINTMAX_MAX=1;
26761   else
26762     UINT32_MAX_LT_UINTMAX_MAX=0;
26763   fi
26764
26765
26766   if test $APPLE_UNIVERSAL_BUILD = 0; then
26767
26768   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT64_MAX == ULONG_MAX" >&5
26769 $as_echo_n "checking whether UINT64_MAX == ULONG_MAX... " >&6; }
26770 if ${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+:} false; then :
26771   $as_echo_n "(cached) " >&6
26772 else
26773   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26774 /* end confdefs.h.  */
26775 /* Work also in C++ mode.  */
26776             #define __STDC_LIMIT_MACROS 1
26777
26778             /* Work if build is not clean.  */
26779             #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
26780
26781             #include <limits.h>
26782             #if HAVE_STDINT_H
26783              #include <stdint.h>
26784             #endif
26785
26786             #if defined UINT64_MAX
26787              #define CONDITION (UINT64_MAX == ULONG_MAX)
26788             #elif HAVE_LONG_LONG_INT
26789              #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int))
26790             #else
26791              #define CONDITION 0
26792             #endif
26793             int test[CONDITION ? 1 : -1];
26794 int
26795 main ()
26796 {
26797
26798   ;
26799   return 0;
26800 }
26801 _ACEOF
26802 if ac_fn_c_try_compile "$LINENO"; then :
26803   gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes
26804 else
26805   gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=no
26806 fi
26807 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26808 fi
26809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&5
26810 $as_echo "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; }
26811   if test $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX = yes; then
26812     UINT64_MAX_EQ_ULONG_MAX=1;
26813   else
26814     UINT64_MAX_EQ_ULONG_MAX=0;
26815   fi
26816
26817
26818   else
26819     UINT64_MAX_EQ_ULONG_MAX=-1
26820   fi
26821
26822
26823
26824
26825
26826
26827
26828
26829   :
26830
26831
26832
26833
26834
26835   if test $ac_cv_func_isblank = no; then
26836     HAVE_ISBLANK=0
26837   fi
26838
26839   if test $HAVE_ISBLANK = 0; then
26840
26841
26842
26843
26844
26845
26846
26847
26848   gl_LIBOBJS="$gl_LIBOBJS isblank.$ac_objext"
26849
26850   fi
26851
26852
26853
26854
26855
26856           GNULIB_ISBLANK=1
26857
26858
26859
26860
26861
26862
26863
26864   ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
26865 "
26866 if test "x$ac_cv_have_decl_isfinite" = xyes; then :
26867   ac_have_decl=1
26868 else
26869   ac_have_decl=0
26870 fi
26871
26872 cat >>confdefs.h <<_ACEOF
26873 #define HAVE_DECL_ISFINITE $ac_have_decl
26874 _ACEOF
26875
26876   if test "$ac_cv_have_decl_isfinite" = yes; then
26877
26878   save_LIBS=$LIBS
26879   ISFINITE_LIBM=missing
26880   for libm in "" "-lm"; do
26881     LIBS="$save_LIBS $libm"
26882     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26883 /* end confdefs.h.  */
26884
26885          #ifndef __NO_MATH_INLINES
26886          # define __NO_MATH_INLINES 1 /* for glibc */
26887          #endif
26888          #include <math.h>
26889
26890          double x;
26891 int
26892 main ()
26893 {
26894 x = isfinite (x) + isfinite ((float) x);
26895   ;
26896   return 0;
26897 }
26898 _ACEOF
26899 if ac_fn_c_try_link "$LINENO"; then :
26900   ISFINITE_LIBM=$libm
26901 break
26902 fi
26903 rm -f core conftest.err conftest.$ac_objext \
26904     conftest$ac_exeext conftest.$ac_ext
26905   done
26906   LIBS=$save_LIBS
26907
26908     if test "$ISFINITE_LIBM" != missing; then
26909
26910
26911
26912
26913      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isfinite(long double) works" >&5
26914 $as_echo_n "checking whether isfinite(long double) works... " >&6; }
26915 if ${gl_cv_func_isfinitel_works+:} false; then :
26916   $as_echo_n "(cached) " >&6
26917 else
26918
26919       if test "$cross_compiling" = yes; then :
26920   case "$host_cpu" in
26921                                # Guess no on ia64, x86_64, i386.
26922          ia64 | x86_64 | i*86) gl_cv_func_isfinitel_works="guessing no";;
26923          *)                    gl_cv_func_isfinitel_works="guessing yes";;
26924        esac
26925
26926 else
26927   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26928 /* end confdefs.h.  */
26929
26930 #include <float.h>
26931 #include <limits.h>
26932 #include <math.h>
26933 #define NWORDS \
26934   ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
26935 typedef union { unsigned int word[NWORDS]; long double value; }
26936         memory_long_double;
26937 /* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the
26938    runtime type conversion.  */
26939 #ifdef __sgi
26940 static long double NaNl ()
26941 {
26942   double zero = 0.0;
26943   return zero / zero;
26944 }
26945 #else
26946 # define NaNl() (0.0L / 0.0L)
26947 #endif
26948 int main ()
26949 {
26950   int result = 0;
26951
26952   {
26953     memory_long_double m;
26954     unsigned int i;
26955
26956     /* The isfinite macro should be immune against changes in the sign bit and
26957        in the mantissa bits.  The xor operation twiddles a bit that can only be
26958        a sign bit or a mantissa bit (since the exponent never extends to
26959        bit 31).  */
26960     m.value = NaNl ();
26961     m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
26962     for (i = 0; i < NWORDS; i++)
26963       m.word[i] |= 1;
26964     if (isfinite (m.value))
26965       result |= 1;
26966   }
26967
26968 #if ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
26969 /* Representation of an 80-bit 'long double' as an initializer for a sequence
26970    of 'unsigned int' words.  */
26971 # ifdef WORDS_BIGENDIAN
26972 #  define LDBL80_WORDS(exponent,manthi,mantlo) \
26973      { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
26974        ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16),    \
26975        (unsigned int) (mantlo) << 16                                        \
26976      }
26977 # else
26978 #  define LDBL80_WORDS(exponent,manthi,mantlo) \
26979      { mantlo, manthi, exponent }
26980 # endif
26981   { /* Quiet NaN.  */
26982     static memory_long_double x =
26983       { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
26984     if (isfinite (x.value))
26985       result |= 2;
26986   }
26987   {
26988     /* Signalling NaN.  */
26989     static memory_long_double x =
26990       { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
26991     if (isfinite (x.value))
26992       result |= 2;
26993   }
26994   /* The isfinite macro should recognize Pseudo-NaNs, Pseudo-Infinities,
26995      Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in
26996        Intel IA-64 Architecture Software Developer's Manual, Volume 1:
26997        Application Architecture.
26998        Table 5-2 "Floating-Point Register Encodings"
26999        Figure 5-6 "Memory to Floating-Point Register Data Translation"
27000    */
27001   { /* Pseudo-NaN.  */
27002     static memory_long_double x =
27003       { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
27004     if (isfinite (x.value))
27005       result |= 4;
27006   }
27007   { /* Pseudo-Infinity.  */
27008     static memory_long_double x =
27009       { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
27010     if (isfinite (x.value))
27011       result |= 8;
27012   }
27013   { /* Pseudo-Zero.  */
27014     static memory_long_double x =
27015       { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
27016     if (isfinite (x.value))
27017       result |= 16;
27018   }
27019   { /* Unnormalized number.  */
27020     static memory_long_double x =
27021       { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
27022     if (isfinite (x.value))
27023       result |= 32;
27024   }
27025   { /* Pseudo-Denormal.  */
27026     static memory_long_double x =
27027       { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
27028     if (isfinite (x.value))
27029       result |= 64;
27030   }
27031 #endif
27032
27033   return result;
27034 }
27035 _ACEOF
27036 if ac_fn_c_try_run "$LINENO"; then :
27037   gl_cv_func_isfinitel_works=yes
27038 else
27039   gl_cv_func_isfinitel_works=no
27040 fi
27041 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27042   conftest.$ac_objext conftest.beam conftest.$ac_ext
27043 fi
27044
27045
27046 fi
27047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isfinitel_works" >&5
27048 $as_echo "$gl_cv_func_isfinitel_works" >&6; }
27049
27050       case "$gl_cv_func_isfinitel_works" in
27051         *yes) ;;
27052         *)    ISFINITE_LIBM=missing;;
27053       esac
27054                       fi
27055   fi
27056   if test "$ac_cv_have_decl_isfinite" != yes ||
27057      test "$ISFINITE_LIBM" = missing; then
27058     REPLACE_ISFINITE=1
27059         ISFINITE_LIBM=
27060   fi
27061
27062
27063   if test $REPLACE_ISFINITE = 1; then
27064
27065
27066
27067
27068
27069
27070
27071
27072   gl_LIBOBJS="$gl_LIBOBJS isfinite.$ac_objext"
27073
27074   fi
27075
27076
27077
27078
27079
27080           GNULIB_ISFINITE=1
27081
27082
27083
27084
27085
27086 $as_echo "#define GNULIB_TEST_ISFINITE 1" >>confdefs.h
27087
27088
27089
27090
27091
27092
27093   ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
27094       #ifndef isinf
27095       #error \"isinf must be a macro, not a function\"
27096       #endif
27097
27098 "
27099 if test "x$ac_cv_have_decl_isinf" = xyes; then :
27100   ac_have_decl=1
27101 else
27102   ac_have_decl=0
27103 fi
27104
27105 cat >>confdefs.h <<_ACEOF
27106 #define HAVE_DECL_ISINF $ac_have_decl
27107 _ACEOF
27108
27109   if test "$ac_cv_have_decl_isinf" = yes; then
27110
27111   save_LIBS=$LIBS
27112   ISINF_LIBM=missing
27113   for libm in "" "-lm"; do
27114     LIBS="$save_LIBS $libm"
27115     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27116 /* end confdefs.h.  */
27117
27118          #ifndef __NO_MATH_INLINES
27119          # define __NO_MATH_INLINES 1 /* for glibc */
27120          #endif
27121          #include <math.h>
27122
27123          double x;
27124 int
27125 main ()
27126 {
27127 x = isinf (x) + isinf ((float) x);
27128   ;
27129   return 0;
27130 }
27131 _ACEOF
27132 if ac_fn_c_try_link "$LINENO"; then :
27133   ISINF_LIBM=$libm
27134 break
27135 fi
27136 rm -f core conftest.err conftest.$ac_objext \
27137     conftest$ac_exeext conftest.$ac_ext
27138   done
27139   LIBS=$save_LIBS
27140
27141     if test "$ISINF_LIBM" != missing; then
27142
27143
27144
27145
27146      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isinf(long double) works" >&5
27147 $as_echo_n "checking whether isinf(long double) works... " >&6; }
27148 if ${gl_cv_func_isinfl_works+:} false; then :
27149   $as_echo_n "(cached) " >&6
27150 else
27151
27152       if test "$cross_compiling" = yes; then :
27153
27154        case "$host" in
27155            # Guess no on OpenBSD ia64, x86_64, i386.
27156          ia64-*-openbsd* | x86_64-*-openbsd* | i*86-*-openbsd*)
27157             gl_cv_func_isinfl_works="guessing no";;
27158          *)
27159             gl_cv_func_isinfl_works="guessing yes";;
27160        esac
27161
27162 else
27163   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27164 /* end confdefs.h.  */
27165
27166 #include <float.h>
27167 #include <limits.h>
27168 #include <math.h>
27169 #define NWORDS \
27170   ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
27171 typedef union { unsigned int word[NWORDS]; long double value; }
27172         memory_long_double;
27173 /* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the
27174    runtime type conversion.  */
27175 #ifdef __sgi
27176 static long double NaNl ()
27177 {
27178   double zero = 0.0;
27179   return zero / zero;
27180 }
27181 #else
27182 # define NaNl() (0.0L / 0.0L)
27183 #endif
27184 int main ()
27185 {
27186   int result = 0;
27187
27188   if (isinf (LDBL_MAX))
27189     result |= 1;
27190
27191   {
27192     memory_long_double m;
27193     unsigned int i;
27194
27195     /* The isinf macro should be immune against changes in the sign bit and
27196        in the mantissa bits.  The xor operation twiddles a bit that can only be
27197        a sign bit or a mantissa bit (since the exponent never extends to
27198        bit 31).  */
27199     m.value = NaNl ();
27200     m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
27201     for (i = 0; i < NWORDS; i++)
27202       m.word[i] |= 1;
27203     if (isinf (m.value))
27204       result |= 2;
27205   }
27206
27207 #if ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
27208 /* Representation of an 80-bit 'long double' as an initializer for a sequence
27209    of 'unsigned int' words.  */
27210 # ifdef WORDS_BIGENDIAN
27211 #  define LDBL80_WORDS(exponent,manthi,mantlo) \
27212      { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
27213        ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16),    \
27214        (unsigned int) (mantlo) << 16                                        \
27215      }
27216 # else
27217 #  define LDBL80_WORDS(exponent,manthi,mantlo) \
27218      { mantlo, manthi, exponent }
27219 # endif
27220   { /* Quiet NaN.  */
27221     static memory_long_double x =
27222       { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
27223     if (isinf (x.value))
27224       result |= 2;
27225   }
27226   {
27227     /* Signalling NaN.  */
27228     static memory_long_double x =
27229       { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
27230     if (isinf (x.value))
27231       result |= 2;
27232   }
27233   /* The isinf macro should recognize Pseudo-NaNs, Pseudo-Infinities,
27234      Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in
27235        Intel IA-64 Architecture Software Developer's Manual, Volume 1:
27236        Application Architecture.
27237        Table 5-2 "Floating-Point Register Encodings"
27238        Figure 5-6 "Memory to Floating-Point Register Data Translation"
27239    */
27240   { /* Pseudo-NaN.  */
27241     static memory_long_double x =
27242       { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
27243     if (isinf (x.value))
27244       result |= 4;
27245   }
27246   { /* Pseudo-Infinity.  */
27247     static memory_long_double x =
27248       { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
27249     if (isinf (x.value))
27250       result |= 8;
27251   }
27252   { /* Pseudo-Zero.  */
27253     static memory_long_double x =
27254       { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
27255     if (isinf (x.value))
27256       result |= 16;
27257   }
27258   { /* Unnormalized number.  */
27259     static memory_long_double x =
27260       { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
27261     if (isinf (x.value))
27262       result |= 32;
27263   }
27264   { /* Pseudo-Denormal.  */
27265     static memory_long_double x =
27266       { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
27267     if (isinf (x.value))
27268       result |= 64;
27269   }
27270 #endif
27271
27272   return result;
27273 }
27274 _ACEOF
27275 if ac_fn_c_try_run "$LINENO"; then :
27276   gl_cv_func_isinfl_works=yes
27277 else
27278   gl_cv_func_isinfl_works=no
27279 fi
27280 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27281   conftest.$ac_objext conftest.beam conftest.$ac_ext
27282 fi
27283
27284
27285 fi
27286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isinfl_works" >&5
27287 $as_echo "$gl_cv_func_isinfl_works" >&6; }
27288
27289       case "$gl_cv_func_isinfl_works" in
27290         *yes) ;;
27291         *)    ISINF_LIBM=missing;;
27292       esac
27293     fi
27294   fi
27295   if test "$ac_cv_have_decl_isinf" != yes ||
27296      test "$ISINF_LIBM" = missing; then
27297     REPLACE_ISINF=1
27298         ISINF_LIBM=
27299   fi
27300
27301
27302   if test $REPLACE_ISINF = 1; then
27303
27304
27305
27306
27307
27308
27309
27310
27311   gl_LIBOBJS="$gl_LIBOBJS isinf.$ac_objext"
27312
27313   fi
27314
27315
27316
27317
27318
27319           GNULIB_ISINF=1
27320
27321
27322
27323
27324
27325 $as_echo "#define GNULIB_TEST_ISINF 1" >>confdefs.h
27326
27327
27328
27329
27330
27331   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(double) can be used without linking with libm" >&5
27332 $as_echo_n "checking whether isnan(double) can be used without linking with libm... " >&6; }
27333 if ${gl_cv_func_isnand_no_libm+:} false; then :
27334   $as_echo_n "(cached) " >&6
27335 else
27336
27337       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27338 /* end confdefs.h.  */
27339 #include <math.h>
27340              #if __GNUC__ >= 4
27341              # undef isnand
27342              # define isnand(x) __builtin_isnan ((double)(x))
27343              #else
27344              # undef isnand
27345              # define isnand(x) isnan ((double)(x))
27346              #endif
27347              double x;
27348 int
27349 main ()
27350 {
27351 return isnand (x);
27352   ;
27353   return 0;
27354 }
27355 _ACEOF
27356 if ac_fn_c_try_link "$LINENO"; then :
27357   gl_cv_func_isnand_no_libm=yes
27358 else
27359   gl_cv_func_isnand_no_libm=no
27360 fi
27361 rm -f core conftest.err conftest.$ac_objext \
27362     conftest$ac_exeext conftest.$ac_ext
27363
27364 fi
27365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnand_no_libm" >&5
27366 $as_echo "$gl_cv_func_isnand_no_libm" >&6; }
27367
27368   gl_func_isnand_no_libm=$gl_cv_func_isnand_no_libm
27369   if test $gl_cv_func_isnand_no_libm = yes; then
27370
27371 $as_echo "#define HAVE_ISNAND_IN_LIBC 1" >>confdefs.h
27372
27373   fi
27374
27375   if test $gl_func_isnand_no_libm != yes; then
27376
27377
27378
27379
27380
27381
27382
27383
27384   gl_LIBOBJS="$gl_LIBOBJS isnand.$ac_objext"
27385
27386
27387
27388
27389   fi
27390
27391
27392   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) can be used without linking with libm" >&5
27393 $as_echo_n "checking whether isnan(float) can be used without linking with libm... " >&6; }
27394 if ${gl_cv_func_isnanf_no_libm+:} false; then :
27395   $as_echo_n "(cached) " >&6
27396 else
27397
27398       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27399 /* end confdefs.h.  */
27400 #include <math.h>
27401              #if __GNUC__ >= 4
27402              # undef isnanf
27403              # define isnanf(x) __builtin_isnanf ((float)(x))
27404              #elif defined isnan
27405              # undef isnanf
27406              # define isnanf(x) isnan ((float)(x))
27407              #endif
27408              float x;
27409 int
27410 main ()
27411 {
27412 return isnanf (x);
27413   ;
27414   return 0;
27415 }
27416 _ACEOF
27417 if ac_fn_c_try_link "$LINENO"; then :
27418   gl_cv_func_isnanf_no_libm=yes
27419 else
27420   gl_cv_func_isnanf_no_libm=no
27421 fi
27422 rm -f core conftest.err conftest.$ac_objext \
27423     conftest$ac_exeext conftest.$ac_ext
27424
27425 fi
27426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanf_no_libm" >&5
27427 $as_echo "$gl_cv_func_isnanf_no_libm" >&6; }
27428
27429   if test $gl_cv_func_isnanf_no_libm = yes; then
27430
27431
27432
27433   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) works" >&5
27434 $as_echo_n "checking whether isnan(float) works... " >&6; }
27435 if ${gl_cv_func_isnanf_works+:} false; then :
27436   $as_echo_n "(cached) " >&6
27437 else
27438
27439       if test "$cross_compiling" = yes; then :
27440   case "$host_os" in
27441            irix* | solaris*) gl_cv_func_isnanf_works="guessing no";;
27442            *)                gl_cv_func_isnanf_works="guessing yes";;
27443          esac
27444
27445 else
27446   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27447 /* end confdefs.h.  */
27448
27449 #include <math.h>
27450 #if __GNUC__ >= 4
27451 # undef isnanf
27452 # define isnanf(x) __builtin_isnanf ((float)(x))
27453 #elif defined isnan
27454 # undef isnanf
27455 # define isnanf(x) isnan ((float)(x))
27456 #endif
27457 /* The Compaq (ex-DEC) C 6.4 compiler chokes on the expression 0.0 / 0.0.  */
27458 #ifdef __DECC
27459 static float
27460 NaN ()
27461 {
27462   static float zero = 0.0f;
27463   return zero / zero;
27464 }
27465 #else
27466 # define NaN() (0.0f / 0.0f)
27467 #endif
27468 #define NWORDS \
27469   ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
27470 typedef union { unsigned int word[NWORDS]; float value; } memory_float;
27471 int main()
27472 {
27473   int result = 0;
27474
27475   if (isnanf (1.0f / 0.0f))
27476     result |= 1;
27477
27478   if (!isnanf (NaN ()))
27479     result |= 2;
27480
27481 #if defined FLT_EXPBIT0_WORD && defined FLT_EXPBIT0_BIT
27482   /* The isnanf function should be immune against changes in the sign bit and
27483      in the mantissa bits.  The xor operation twiddles a bit that can only be
27484      a sign bit or a mantissa bit.  */
27485   if (FLT_EXPBIT0_WORD == 0 && FLT_EXPBIT0_BIT > 0)
27486     {
27487       memory_float m;
27488
27489       m.value = NaN ();
27490       /* Set the bits below the exponent to 01111...111.  */
27491       m.word[0] &= -1U << FLT_EXPBIT0_BIT;
27492       m.word[0] |= 1U << (FLT_EXPBIT0_BIT - 1) - 1;
27493       if (!isnanf (m.value))
27494         result |= 4;
27495     }
27496 #endif
27497
27498   return result;
27499 }
27500 _ACEOF
27501 if ac_fn_c_try_run "$LINENO"; then :
27502   gl_cv_func_isnanf_works=yes
27503 else
27504   gl_cv_func_isnanf_works=no
27505 fi
27506 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27507   conftest.$ac_objext conftest.beam conftest.$ac_ext
27508 fi
27509
27510
27511 fi
27512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanf_works" >&5
27513 $as_echo "$gl_cv_func_isnanf_works" >&6; }
27514
27515   fi
27516   if test $gl_cv_func_isnanf_no_libm = yes \
27517      && { case "$gl_cv_func_isnanf_works" in
27518             *yes) true;;
27519             *) false;;
27520           esac
27521         }; then
27522     gl_func_isnanf_no_libm=yes
27523
27524 $as_echo "#define HAVE_ISNANF_IN_LIBC 1" >>confdefs.h
27525
27526   else
27527     gl_func_isnanf_no_libm=no
27528   fi
27529
27530   if test $gl_func_isnanf_no_libm != yes; then
27531
27532
27533
27534
27535
27536
27537
27538
27539   gl_LIBOBJS="$gl_LIBOBJS isnanf.$ac_objext"
27540
27541
27542
27543   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5
27544 $as_echo_n "checking where to find the exponent in a 'float'... " >&6; }
27545 if ${gl_cv_cc_float_expbit0+:} false; then :
27546   $as_echo_n "(cached) " >&6
27547 else
27548
27549       if test "$cross_compiling" = yes; then :
27550   gl_cv_cc_float_expbit0="word 0 bit 23"
27551 else
27552   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27553 /* end confdefs.h.  */
27554
27555 #include <float.h>
27556 #include <stddef.h>
27557 #include <stdio.h>
27558 #include <string.h>
27559 #define NWORDS \
27560   ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
27561 typedef union { float value; unsigned int word[NWORDS]; } memory_float;
27562 static unsigned int ored_words[NWORDS];
27563 static unsigned int anded_words[NWORDS];
27564 static void add_to_ored_words (float x)
27565 {
27566   memory_float m;
27567   size_t i;
27568   /* Clear it first, in case
27569      sizeof (float) < sizeof (memory_float).  */
27570   memset (&m, 0, sizeof (memory_float));
27571   m.value = x;
27572   for (i = 0; i < NWORDS; i++)
27573     {
27574       ored_words[i] |= m.word[i];
27575       anded_words[i] &= m.word[i];
27576     }
27577 }
27578 int main ()
27579 {
27580   size_t j;
27581   FILE *fp = fopen ("conftest.out", "w");
27582   if (fp == NULL)
27583     return 1;
27584   for (j = 0; j < NWORDS; j++)
27585     anded_words[j] = ~ (unsigned int) 0;
27586   add_to_ored_words (0.25f);
27587   add_to_ored_words (0.5f);
27588   add_to_ored_words (1.0f);
27589   add_to_ored_words (2.0f);
27590   add_to_ored_words (4.0f);
27591   /* Remove bits that are common (e.g. if representation of the first mantissa
27592      bit is explicit).  */
27593   for (j = 0; j < NWORDS; j++)
27594     ored_words[j] &= ~anded_words[j];
27595   /* Now find the nonzero word.  */
27596   for (j = 0; j < NWORDS; j++)
27597     if (ored_words[j] != 0)
27598       break;
27599   if (j < NWORDS)
27600     {
27601       size_t i;
27602       for (i = j + 1; i < NWORDS; i++)
27603         if (ored_words[i] != 0)
27604           {
27605             fprintf (fp, "unknown");
27606             return (fclose (fp) != 0);
27607           }
27608       for (i = 0; ; i++)
27609         if ((ored_words[j] >> i) & 1)
27610           {
27611             fprintf (fp, "word %d bit %d", (int) j, (int) i);
27612             return (fclose (fp) != 0);
27613           }
27614     }
27615   fprintf (fp, "unknown");
27616   return (fclose (fp) != 0);
27617 }
27618
27619 _ACEOF
27620 if ac_fn_c_try_run "$LINENO"; then :
27621   gl_cv_cc_float_expbit0=`cat conftest.out`
27622 else
27623   gl_cv_cc_float_expbit0="unknown"
27624 fi
27625 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27626   conftest.$ac_objext conftest.beam conftest.$ac_ext
27627 fi
27628
27629       rm -f conftest.out
27630
27631 fi
27632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5
27633 $as_echo "$gl_cv_cc_float_expbit0" >&6; }
27634   case "$gl_cv_cc_float_expbit0" in
27635     word*bit*)
27636       word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
27637       bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'`
27638
27639 cat >>confdefs.h <<_ACEOF
27640 #define FLT_EXPBIT0_WORD $word
27641 _ACEOF
27642
27643
27644 cat >>confdefs.h <<_ACEOF
27645 #define FLT_EXPBIT0_BIT $bit
27646 _ACEOF
27647
27648       ;;
27649   esac
27650
27651
27652   fi
27653
27654
27655   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(long double) can be used without linking with libm" >&5
27656 $as_echo_n "checking whether isnan(long double) can be used without linking with libm... " >&6; }
27657 if ${gl_cv_func_isnanl_no_libm+:} false; then :
27658   $as_echo_n "(cached) " >&6
27659 else
27660
27661       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27662 /* end confdefs.h.  */
27663 #include <math.h>
27664              #if __GNUC__ >= 4
27665              # undef isnanl
27666              # define isnanl(x) __builtin_isnanl ((long double)(x))
27667              #elif defined isnan
27668              # undef isnanl
27669              # define isnanl(x) isnan ((long double)(x))
27670              #endif
27671              long double x;
27672 int
27673 main ()
27674 {
27675 return isnanl (x);
27676   ;
27677   return 0;
27678 }
27679 _ACEOF
27680 if ac_fn_c_try_link "$LINENO"; then :
27681   gl_cv_func_isnanl_no_libm=yes
27682 else
27683   gl_cv_func_isnanl_no_libm=no
27684 fi
27685 rm -f core conftest.err conftest.$ac_objext \
27686     conftest$ac_exeext conftest.$ac_ext
27687
27688 fi
27689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_no_libm" >&5
27690 $as_echo "$gl_cv_func_isnanl_no_libm" >&6; }
27691
27692   gl_func_isnanl_no_libm=$gl_cv_func_isnanl_no_libm
27693   if test $gl_func_isnanl_no_libm = yes; then
27694
27695
27696
27697
27698      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnanl works" >&5
27699 $as_echo_n "checking whether isnanl works... " >&6; }
27700 if ${gl_cv_func_isnanl_works+:} false; then :
27701   $as_echo_n "(cached) " >&6
27702 else
27703
27704       if test "$cross_compiling" = yes; then :
27705   case "$host_cpu" in
27706                                  # Guess no on ia64, x86_64, i386.
27707            ia64 | x86_64 | i*86) gl_cv_func_isnanl_works="guessing no";;
27708            *)
27709              case "$host_os" in
27710                netbsd*) gl_cv_func_isnanl_works="guessing no";;
27711                *)       gl_cv_func_isnanl_works="guessing yes";;
27712              esac
27713              ;;
27714          esac
27715
27716 else
27717   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27718 /* end confdefs.h.  */
27719
27720 #include <float.h>
27721 #include <limits.h>
27722 #include <math.h>
27723 #if __GNUC__ >= 4
27724 # undef isnanl
27725 # define isnanl(x) __builtin_isnanl ((long double)(x))
27726 #elif defined isnan
27727 # undef isnanl
27728 # define isnanl(x) isnan ((long double)(x))
27729 #endif
27730 #define NWORDS \
27731   ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
27732 typedef union { unsigned int word[NWORDS]; long double value; }
27733         memory_long_double;
27734 /* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the
27735    runtime type conversion.  */
27736 #ifdef __sgi
27737 static long double NaNl ()
27738 {
27739   double zero = 0.0;
27740   return zero / zero;
27741 }
27742 #else
27743 # define NaNl() (0.0L / 0.0L)
27744 #endif
27745 int main ()
27746 {
27747   int result = 0;
27748
27749   if (!isnanl (NaNl ()))
27750     result |= 1;
27751
27752   {
27753     memory_long_double m;
27754     unsigned int i;
27755
27756     /* The isnanl function should be immune against changes in the sign bit and
27757        in the mantissa bits.  The xor operation twiddles a bit that can only be
27758        a sign bit or a mantissa bit (since the exponent never extends to
27759        bit 31).  */
27760     m.value = NaNl ();
27761     m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
27762     for (i = 0; i < NWORDS; i++)
27763       m.word[i] |= 1;
27764     if (!isnanl (m.value))
27765       result |= 1;
27766   }
27767
27768 #if ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
27769 /* Representation of an 80-bit 'long double' as an initializer for a sequence
27770    of 'unsigned int' words.  */
27771 # ifdef WORDS_BIGENDIAN
27772 #  define LDBL80_WORDS(exponent,manthi,mantlo) \
27773      { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
27774        ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16),    \
27775        (unsigned int) (mantlo) << 16                                        \
27776      }
27777 # else
27778 #  define LDBL80_WORDS(exponent,manthi,mantlo) \
27779      { mantlo, manthi, exponent }
27780 # endif
27781   { /* Quiet NaN.  */
27782     static memory_long_double x =
27783       { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
27784     if (!isnanl (x.value))
27785       result |= 2;
27786   }
27787   {
27788     /* Signalling NaN.  */
27789     static memory_long_double x =
27790       { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
27791     if (!isnanl (x.value))
27792       result |= 2;
27793   }
27794   /* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities,
27795      Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in
27796        Intel IA-64 Architecture Software Developer's Manual, Volume 1:
27797        Application Architecture.
27798        Table 5-2 "Floating-Point Register Encodings"
27799        Figure 5-6 "Memory to Floating-Point Register Data Translation"
27800    */
27801   { /* Pseudo-NaN.  */
27802     static memory_long_double x =
27803       { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
27804     if (!isnanl (x.value))
27805       result |= 4;
27806   }
27807   { /* Pseudo-Infinity.  */
27808     static memory_long_double x =
27809       { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
27810     if (!isnanl (x.value))
27811       result |= 8;
27812   }
27813   { /* Pseudo-Zero.  */
27814     static memory_long_double x =
27815       { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
27816     if (!isnanl (x.value))
27817       result |= 16;
27818   }
27819   { /* Unnormalized number.  */
27820     static memory_long_double x =
27821       { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
27822     if (!isnanl (x.value))
27823       result |= 32;
27824   }
27825   { /* Pseudo-Denormal.  */
27826     static memory_long_double x =
27827       { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
27828     if (!isnanl (x.value))
27829       result |= 64;
27830   }
27831 #endif
27832
27833   return result;
27834 }
27835 _ACEOF
27836 if ac_fn_c_try_run "$LINENO"; then :
27837   gl_cv_func_isnanl_works=yes
27838 else
27839   gl_cv_func_isnanl_works=no
27840 fi
27841 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27842   conftest.$ac_objext conftest.beam conftest.$ac_ext
27843 fi
27844
27845
27846 fi
27847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_works" >&5
27848 $as_echo "$gl_cv_func_isnanl_works" >&6; }
27849
27850     case "$gl_cv_func_isnanl_works" in
27851       *yes) ;;
27852       *)    gl_func_isnanl_no_libm=no ;;
27853     esac
27854   fi
27855   if test $gl_func_isnanl_no_libm = yes; then
27856
27857 $as_echo "#define HAVE_ISNANL_IN_LIBC 1" >>confdefs.h
27858
27859   fi
27860
27861   if test $gl_func_isnanl_no_libm != yes; then
27862
27863
27864
27865
27866
27867
27868
27869
27870   gl_LIBOBJS="$gl_LIBOBJS isnanl.$ac_objext"
27871
27872
27873
27874
27875   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5
27876 $as_echo_n "checking where to find the exponent in a 'long double'... " >&6; }
27877 if ${gl_cv_cc_long_double_expbit0+:} false; then :
27878   $as_echo_n "(cached) " >&6
27879 else
27880
27881       if test "$cross_compiling" = yes; then :
27882
27883                               gl_cv_cc_long_double_expbit0="unknown"
27884
27885 else
27886   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27887 /* end confdefs.h.  */
27888
27889 #include <float.h>
27890 #include <stddef.h>
27891 #include <stdio.h>
27892 #include <string.h>
27893 #define NWORDS \
27894   ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
27895 typedef union { long double value; unsigned int word[NWORDS]; }
27896         memory_long_double;
27897 static unsigned int ored_words[NWORDS];
27898 static unsigned int anded_words[NWORDS];
27899 static void add_to_ored_words (long double x)
27900 {
27901   memory_long_double m;
27902   size_t i;
27903   /* Clear it first, in case
27904      sizeof (long double) < sizeof (memory_long_double).  */
27905   memset (&m, 0, sizeof (memory_long_double));
27906   m.value = x;
27907   for (i = 0; i < NWORDS; i++)
27908     {
27909       ored_words[i] |= m.word[i];
27910       anded_words[i] &= m.word[i];
27911     }
27912 }
27913 int main ()
27914 {
27915   size_t j;
27916   FILE *fp = fopen ("conftest.out", "w");
27917   if (fp == NULL)
27918     return 1;
27919   for (j = 0; j < NWORDS; j++)
27920     anded_words[j] = ~ (unsigned int) 0;
27921   add_to_ored_words (0.25L);
27922   add_to_ored_words (0.5L);
27923   add_to_ored_words (1.0L);
27924   add_to_ored_words (2.0L);
27925   add_to_ored_words (4.0L);
27926   /* Remove bits that are common (e.g. if representation of the first mantissa
27927      bit is explicit).  */
27928   for (j = 0; j < NWORDS; j++)
27929     ored_words[j] &= ~anded_words[j];
27930   /* Now find the nonzero word.  */
27931   for (j = 0; j < NWORDS; j++)
27932     if (ored_words[j] != 0)
27933       break;
27934   if (j < NWORDS)
27935     {
27936       size_t i;
27937       for (i = j + 1; i < NWORDS; i++)
27938         if (ored_words[i] != 0)
27939           {
27940             fprintf (fp, "unknown");
27941             return (fclose (fp) != 0);
27942           }
27943       for (i = 0; ; i++)
27944         if ((ored_words[j] >> i) & 1)
27945           {
27946             fprintf (fp, "word %d bit %d", (int) j, (int) i);
27947             return (fclose (fp) != 0);
27948           }
27949     }
27950   fprintf (fp, "unknown");
27951   return (fclose (fp) != 0);
27952 }
27953
27954 _ACEOF
27955 if ac_fn_c_try_run "$LINENO"; then :
27956   gl_cv_cc_long_double_expbit0=`cat conftest.out`
27957 else
27958   gl_cv_cc_long_double_expbit0="unknown"
27959 fi
27960 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27961   conftest.$ac_objext conftest.beam conftest.$ac_ext
27962 fi
27963
27964       rm -f conftest.out
27965
27966 fi
27967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5
27968 $as_echo "$gl_cv_cc_long_double_expbit0" >&6; }
27969   case "$gl_cv_cc_long_double_expbit0" in
27970     word*bit*)
27971       word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
27972       bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'`
27973
27974 cat >>confdefs.h <<_ACEOF
27975 #define LDBL_EXPBIT0_WORD $word
27976 _ACEOF
27977
27978
27979 cat >>confdefs.h <<_ACEOF
27980 #define LDBL_EXPBIT0_BIT $bit
27981 _ACEOF
27982
27983       ;;
27984   esac
27985
27986
27987
27988   fi
27989
27990
27991
27992
27993
27994   :
27995
27996
27997
27998
27999
28000   ac_fn_c_check_decl "$LINENO" "iswblank" "ac_cv_have_decl_iswblank" "
28001 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
28002    <wchar.h>.
28003    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
28004    before <wchar.h>.  */
28005 #include <stddef.h>
28006 #include <stdio.h>
28007 #include <time.h>
28008 #include <wchar.h>
28009 #include <wctype.h>
28010
28011 "
28012 if test "x$ac_cv_have_decl_iswblank" = xyes; then :
28013   ac_have_decl=1
28014 else
28015   ac_have_decl=0
28016 fi
28017
28018 cat >>confdefs.h <<_ACEOF
28019 #define HAVE_DECL_ISWBLANK $ac_have_decl
28020 _ACEOF
28021
28022   if test $ac_cv_func_iswblank = no; then
28023     HAVE_ISWBLANK=0
28024     if test $ac_cv_have_decl_iswblank = yes; then
28025       REPLACE_ISWBLANK=1
28026     fi
28027   fi
28028   if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
28029         :
28030   else
28031     if test $HAVE_ISWBLANK = 0 || test $REPLACE_ISWBLANK = 1; then
28032             :
28033     fi
28034   fi
28035
28036
28037   if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
28038     :
28039   else
28040     if test $HAVE_ISWBLANK = 0 || test $REPLACE_ISWBLANK = 1; then
28041
28042
28043
28044
28045
28046
28047
28048
28049   gl_LIBOBJS="$gl_LIBOBJS iswblank.$ac_objext"
28050
28051     fi
28052   fi
28053
28054
28055
28056
28057
28058           GNULIB_ISWBLANK=1
28059
28060
28061
28062
28063
28064 $as_echo "#define GNULIB_TEST_ISWBLANK 1" >>confdefs.h
28065
28066
28067
28068
28069
28070
28071
28072
28073
28074
28075
28076
28077
28078
28079   :
28080
28081
28082
28083
28084
28085
28086
28087
28088      if test $gl_cv_have_include_next = yes; then
28089        gl_cv_next_langinfo_h='<'langinfo.h'>'
28090      else
28091        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <langinfo.h>" >&5
28092 $as_echo_n "checking absolute name of <langinfo.h>... " >&6; }
28093 if ${gl_cv_next_langinfo_h+:} false; then :
28094   $as_echo_n "(cached) " >&6
28095 else
28096
28097              if test $ac_cv_header_langinfo_h = yes; then
28098
28099
28100
28101
28102   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28103 /* end confdefs.h.  */
28104 #include <langinfo.h>
28105 _ACEOF
28106                 case "$host_os" in
28107     aix*) gl_absname_cpp="$ac_cpp -C" ;;
28108     *)    gl_absname_cpp="$ac_cpp" ;;
28109   esac
28110
28111   case "$host_os" in
28112     mingw*)
28113                                           gl_dirsep_regex='[/\\]'
28114       ;;
28115     *)
28116       gl_dirsep_regex='\/'
28117       ;;
28118   esac
28119       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
28120   gl_header_literal_regex=`echo 'langinfo.h' \
28121                            | sed -e "$gl_make_literal_regex_sed"`
28122   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
28123       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
28124       s|^/[^/]|//&|
28125       p
28126       q
28127     }'
28128
28129         gl_cv_absolute_langinfo_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
28130   sed -n "$gl_absolute_header_sed"`
28131
28132            gl_header=$gl_cv_absolute_langinfo_h
28133            gl_cv_next_langinfo_h='"'$gl_header'"'
28134           else
28135                gl_cv_next_langinfo_h='<'langinfo.h'>'
28136              fi
28137
28138
28139 fi
28140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_langinfo_h" >&5
28141 $as_echo "$gl_cv_next_langinfo_h" >&6; }
28142      fi
28143      NEXT_LANGINFO_H=$gl_cv_next_langinfo_h
28144
28145      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
28146        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
28147        gl_next_as_first_directive='<'langinfo.h'>'
28148      else
28149        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
28150        gl_next_as_first_directive=$gl_cv_next_langinfo_h
28151      fi
28152      NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H=$gl_next_as_first_directive
28153
28154
28155
28156
28157
28158     HAVE_LANGINFO_CODESET=0
28159   HAVE_LANGINFO_T_FMT_AMPM=0
28160   HAVE_LANGINFO_ERA=0
28161   HAVE_LANGINFO_YESEXPR=0
28162
28163   :
28164
28165
28166
28167
28168
28169   if test $ac_cv_header_langinfo_h = yes; then
28170     HAVE_LANGINFO_H=1
28171             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines CODESET" >&5
28172 $as_echo_n "checking whether langinfo.h defines CODESET... " >&6; }
28173 if ${gl_cv_header_langinfo_codeset+:} false; then :
28174   $as_echo_n "(cached) " >&6
28175 else
28176   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28177 /* end confdefs.h.  */
28178 #include <langinfo.h>
28179 int a = CODESET;
28180
28181 int
28182 main ()
28183 {
28184
28185   ;
28186   return 0;
28187 }
28188 _ACEOF
28189 if ac_fn_c_try_compile "$LINENO"; then :
28190   gl_cv_header_langinfo_codeset=yes
28191 else
28192   gl_cv_header_langinfo_codeset=no
28193 fi
28194 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28195
28196 fi
28197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_codeset" >&5
28198 $as_echo "$gl_cv_header_langinfo_codeset" >&6; }
28199     if test $gl_cv_header_langinfo_codeset = yes; then
28200       HAVE_LANGINFO_CODESET=1
28201     fi
28202     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines T_FMT_AMPM" >&5
28203 $as_echo_n "checking whether langinfo.h defines T_FMT_AMPM... " >&6; }
28204 if ${gl_cv_header_langinfo_t_fmt_ampm+:} false; then :
28205   $as_echo_n "(cached) " >&6
28206 else
28207   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28208 /* end confdefs.h.  */
28209 #include <langinfo.h>
28210 int a = T_FMT_AMPM;
28211
28212 int
28213 main ()
28214 {
28215
28216   ;
28217   return 0;
28218 }
28219 _ACEOF
28220 if ac_fn_c_try_compile "$LINENO"; then :
28221   gl_cv_header_langinfo_t_fmt_ampm=yes
28222 else
28223   gl_cv_header_langinfo_t_fmt_ampm=no
28224 fi
28225 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28226
28227 fi
28228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_t_fmt_ampm" >&5
28229 $as_echo "$gl_cv_header_langinfo_t_fmt_ampm" >&6; }
28230     if test $gl_cv_header_langinfo_t_fmt_ampm = yes; then
28231       HAVE_LANGINFO_T_FMT_AMPM=1
28232     fi
28233     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines ERA" >&5
28234 $as_echo_n "checking whether langinfo.h defines ERA... " >&6; }
28235 if ${gl_cv_header_langinfo_era+:} false; then :
28236   $as_echo_n "(cached) " >&6
28237 else
28238   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28239 /* end confdefs.h.  */
28240 #include <langinfo.h>
28241 int a = ERA;
28242
28243 int
28244 main ()
28245 {
28246
28247   ;
28248   return 0;
28249 }
28250 _ACEOF
28251 if ac_fn_c_try_compile "$LINENO"; then :
28252   gl_cv_header_langinfo_era=yes
28253 else
28254   gl_cv_header_langinfo_era=no
28255 fi
28256 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28257
28258 fi
28259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_era" >&5
28260 $as_echo "$gl_cv_header_langinfo_era" >&6; }
28261     if test $gl_cv_header_langinfo_era = yes; then
28262       HAVE_LANGINFO_ERA=1
28263     fi
28264     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines YESEXPR" >&5
28265 $as_echo_n "checking whether langinfo.h defines YESEXPR... " >&6; }
28266 if ${gl_cv_header_langinfo_yesexpr+:} false; then :
28267   $as_echo_n "(cached) " >&6
28268 else
28269   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28270 /* end confdefs.h.  */
28271 #include <langinfo.h>
28272 int a = YESEXPR;
28273
28274 int
28275 main ()
28276 {
28277
28278   ;
28279   return 0;
28280 }
28281 _ACEOF
28282 if ac_fn_c_try_compile "$LINENO"; then :
28283   gl_cv_header_langinfo_yesexpr=yes
28284 else
28285   gl_cv_header_langinfo_yesexpr=no
28286 fi
28287 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28288
28289 fi
28290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_yesexpr" >&5
28291 $as_echo "$gl_cv_header_langinfo_yesexpr" >&6; }
28292     if test $gl_cv_header_langinfo_yesexpr = yes; then
28293       HAVE_LANGINFO_YESEXPR=1
28294     fi
28295   else
28296     HAVE_LANGINFO_H=0
28297   fi
28298
28299
28300
28301
28302
28303
28304
28305     for gl_func in nl_langinfo; do
28306     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
28307     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
28308 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
28309 if eval \${$as_gl_Symbol+:} false; then :
28310   $as_echo_n "(cached) " >&6
28311 else
28312   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28313 /* end confdefs.h.  */
28314 #include <langinfo.h>
28315
28316 int
28317 main ()
28318 {
28319 #undef $gl_func
28320   (void) $gl_func;
28321   ;
28322   return 0;
28323 }
28324 _ACEOF
28325 if ac_fn_c_try_compile "$LINENO"; then :
28326   eval "$as_gl_Symbol=yes"
28327 else
28328   eval "$as_gl_Symbol=no"
28329 fi
28330 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28331 fi
28332 eval ac_res=\$$as_gl_Symbol
28333                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
28334 $as_echo "$ac_res" >&6; }
28335     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
28336   cat >>confdefs.h <<_ACEOF
28337 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
28338 _ACEOF
28339
28340                      eval ac_cv_have_decl_$gl_func=yes
28341 fi
28342       done
28343
28344
28345
28346
28347
28348
28349
28350   :
28351
28352
28353
28354
28355
28356
28357
28358
28359
28360   LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(abs_top_builddir)/$gl_source_base\""
28361
28362
28363
28364
28365
28366
28367
28368
28369
28370   case "$host_os" in
28371     solaris*)
28372
28373 $as_echo "#define _LCONV_C99 1" >>confdefs.h
28374
28375       ;;
28376   esac
28377
28378   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h conforms to POSIX:2001" >&5
28379 $as_echo_n "checking whether locale.h conforms to POSIX:2001... " >&6; }
28380 if ${gl_cv_header_locale_h_posix2001+:} false; then :
28381   $as_echo_n "(cached) " >&6
28382 else
28383   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28384 /* end confdefs.h.  */
28385 #include <locale.h>
28386             int x = LC_MESSAGES;
28387             int y = sizeof (((struct lconv *) 0)->decimal_point);
28388 int
28389 main ()
28390 {
28391
28392   ;
28393   return 0;
28394 }
28395 _ACEOF
28396 if ac_fn_c_try_compile "$LINENO"; then :
28397   gl_cv_header_locale_h_posix2001=yes
28398 else
28399   gl_cv_header_locale_h_posix2001=no
28400 fi
28401 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28402 fi
28403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_h_posix2001" >&5
28404 $as_echo "$gl_cv_header_locale_h_posix2001" >&6; }
28405
28406
28407   :
28408
28409
28410
28411
28412
28413   if test $ac_cv_header_xlocale_h = yes; then
28414     HAVE_XLOCALE_H=1
28415                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h defines locale_t" >&5
28416 $as_echo_n "checking whether locale.h defines locale_t... " >&6; }
28417 if ${gl_cv_header_locale_has_locale_t+:} false; then :
28418   $as_echo_n "(cached) " >&6
28419 else
28420   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28421 /* end confdefs.h.  */
28422 #include <locale.h>
28423               locale_t x;
28424 int
28425 main ()
28426 {
28427
28428   ;
28429   return 0;
28430 }
28431 _ACEOF
28432 if ac_fn_c_try_compile "$LINENO"; then :
28433   gl_cv_header_locale_has_locale_t=yes
28434 else
28435   gl_cv_header_locale_has_locale_t=no
28436 fi
28437 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28438
28439 fi
28440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_has_locale_t" >&5
28441 $as_echo "$gl_cv_header_locale_has_locale_t" >&6; }
28442     if test $gl_cv_header_locale_has_locale_t = yes; then
28443       gl_cv_header_locale_h_needs_xlocale_h=no
28444     else
28445       gl_cv_header_locale_h_needs_xlocale_h=yes
28446     fi
28447   else
28448     HAVE_XLOCALE_H=0
28449     gl_cv_header_locale_h_needs_xlocale_h=no
28450   fi
28451
28452
28453           { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct lconv is properly defined" >&5
28454 $as_echo_n "checking whether struct lconv is properly defined... " >&6; }
28455 if ${gl_cv_sys_struct_lconv_ok+:} false; then :
28456   $as_echo_n "(cached) " >&6
28457 else
28458   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28459 /* end confdefs.h.  */
28460 #include <locale.h>
28461             struct lconv l;
28462             int x = sizeof (l.decimal_point);
28463             int y = sizeof (l.int_p_cs_precedes);
28464 int
28465 main ()
28466 {
28467
28468   ;
28469   return 0;
28470 }
28471 _ACEOF
28472 if ac_fn_c_try_compile "$LINENO"; then :
28473   gl_cv_sys_struct_lconv_ok=yes
28474 else
28475   gl_cv_sys_struct_lconv_ok=no
28476 fi
28477 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28478
28479 fi
28480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_lconv_ok" >&5
28481 $as_echo "$gl_cv_sys_struct_lconv_ok" >&6; }
28482   if test $gl_cv_sys_struct_lconv_ok = no; then
28483     REPLACE_STRUCT_LCONV=1
28484   fi
28485
28486
28487
28488
28489
28490
28491
28492
28493
28494      if test $gl_cv_have_include_next = yes; then
28495        gl_cv_next_locale_h='<'locale.h'>'
28496      else
28497        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <locale.h>" >&5
28498 $as_echo_n "checking absolute name of <locale.h>... " >&6; }
28499 if ${gl_cv_next_locale_h+:} false; then :
28500   $as_echo_n "(cached) " >&6
28501 else
28502
28503
28504
28505   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28506 /* end confdefs.h.  */
28507 #include <locale.h>
28508 _ACEOF
28509                 case "$host_os" in
28510     aix*) gl_absname_cpp="$ac_cpp -C" ;;
28511     *)    gl_absname_cpp="$ac_cpp" ;;
28512   esac
28513
28514   case "$host_os" in
28515     mingw*)
28516                                           gl_dirsep_regex='[/\\]'
28517       ;;
28518     *)
28519       gl_dirsep_regex='\/'
28520       ;;
28521   esac
28522       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
28523   gl_header_literal_regex=`echo 'locale.h' \
28524                            | sed -e "$gl_make_literal_regex_sed"`
28525   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
28526       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
28527       s|^/[^/]|//&|
28528       p
28529       q
28530     }'
28531
28532         gl_cv_absolute_locale_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
28533   sed -n "$gl_absolute_header_sed"`
28534
28535            gl_header=$gl_cv_absolute_locale_h
28536            gl_cv_next_locale_h='"'$gl_header'"'
28537
28538
28539 fi
28540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_locale_h" >&5
28541 $as_echo "$gl_cv_next_locale_h" >&6; }
28542      fi
28543      NEXT_LOCALE_H=$gl_cv_next_locale_h
28544
28545      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
28546        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
28547        gl_next_as_first_directive='<'locale.h'>'
28548      else
28549        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
28550        gl_next_as_first_directive=$gl_cv_next_locale_h
28551      fi
28552      NEXT_AS_FIRST_DIRECTIVE_LOCALE_H=$gl_next_as_first_directive
28553
28554
28555
28556
28557
28558
28559     for gl_func in setlocale duplocale; do
28560     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
28561     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
28562 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
28563 if eval \${$as_gl_Symbol+:} false; then :
28564   $as_echo_n "(cached) " >&6
28565 else
28566   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28567 /* end confdefs.h.  */
28568 #include <locale.h>
28569 /* Some systems provide declarations in a non-standard header.  */
28570 #if HAVE_XLOCALE_H
28571 # include <xlocale.h>
28572 #endif
28573
28574 int
28575 main ()
28576 {
28577 #undef $gl_func
28578   (void) $gl_func;
28579   ;
28580   return 0;
28581 }
28582 _ACEOF
28583 if ac_fn_c_try_compile "$LINENO"; then :
28584   eval "$as_gl_Symbol=yes"
28585 else
28586   eval "$as_gl_Symbol=no"
28587 fi
28588 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28589 fi
28590 eval ac_res=\$$as_gl_Symbol
28591                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
28592 $as_echo "$ac_res" >&6; }
28593     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
28594   cat >>confdefs.h <<_ACEOF
28595 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
28596 _ACEOF
28597
28598                      eval ac_cv_have_decl_$gl_func=yes
28599 fi
28600       done
28601
28602
28603
28604
28605
28606
28607   if test $REPLACE_STRUCT_LCONV = 1; then
28608     REPLACE_LOCALECONV=1
28609   fi
28610
28611   if test $REPLACE_LOCALECONV = 1; then
28612
28613
28614
28615
28616
28617
28618
28619
28620   gl_LIBOBJS="$gl_LIBOBJS localeconv.$ac_objext"
28621
28622
28623   ac_fn_c_check_member "$LINENO" "struct lconv" "decimal_point" "ac_cv_member_struct_lconv_decimal_point" "#include <locale.h>
28624 "
28625 if test "x$ac_cv_member_struct_lconv_decimal_point" = xyes; then :
28626
28627 cat >>confdefs.h <<_ACEOF
28628 #define HAVE_STRUCT_LCONV_DECIMAL_POINT 1
28629 _ACEOF
28630
28631
28632 fi
28633
28634
28635   fi
28636
28637
28638
28639
28640
28641           GNULIB_LOCALECONV=1
28642
28643
28644
28645
28646
28647 $as_echo "#define GNULIB_TEST_LOCALECONV 1" >>confdefs.h
28648
28649
28650
28651
28652
28653   if test "$gl_threads_api" = posix; then
28654     # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the
28655     # pthread_rwlock_* functions.
28656     ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
28657 "
28658 if test "x$ac_cv_type_pthread_rwlock_t" = xyes; then :
28659
28660 $as_echo "#define HAVE_PTHREAD_RWLOCK 1" >>confdefs.h
28661
28662 fi
28663
28664     # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro.
28665     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28666 /* end confdefs.h.  */
28667
28668       #include <pthread.h>
28669 int
28670 main ()
28671 {
28672
28673 #if __FreeBSD__ == 4
28674 error "No, in FreeBSD 4.0 recursive mutexes actually don't work."
28675 #elif (defined __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ \
28676        && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070)
28677 error "No, in Mac OS X < 10.7 recursive mutexes actually don't work."
28678 #else
28679 int x = (int)PTHREAD_MUTEX_RECURSIVE;
28680 return !x;
28681 #endif
28682
28683   ;
28684   return 0;
28685 }
28686 _ACEOF
28687 if ac_fn_c_try_compile "$LINENO"; then :
28688
28689 $as_echo "#define HAVE_PTHREAD_MUTEX_RECURSIVE 1" >>confdefs.h
28690
28691 fi
28692 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28693   fi
28694   :
28695
28696
28697
28698 cat >>confdefs.h <<_ACEOF
28699 #define GNULIB_LOCK 1
28700 _ACEOF
28701
28702
28703
28704
28705
28706
28707
28708
28709   :
28710
28711
28712
28713
28714
28715   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lseek detects pipes" >&5
28716 $as_echo_n "checking whether lseek detects pipes... " >&6; }
28717 if ${gl_cv_func_lseek_pipe+:} false; then :
28718   $as_echo_n "(cached) " >&6
28719 else
28720   case "$host_os" in
28721        mingw*)
28722                                                                gl_cv_func_lseek_pipe=no
28723          ;;
28724        *)
28725          if test $cross_compiling = no; then
28726            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28727 /* end confdefs.h.  */
28728
28729 #include <sys/types.h> /* for off_t */
28730 #include <stdio.h> /* for SEEK_CUR */
28731 #if HAVE_UNISTD_H
28732 # include <unistd.h>
28733 #else /* on Windows with MSVC */
28734 # include <io.h>
28735 #endif
28736
28737 int
28738 main ()
28739 {
28740
28741   /* Exit with success only if stdin is seekable.  */
28742   return lseek (0, (off_t)0, SEEK_CUR) < 0;
28743
28744   ;
28745   return 0;
28746 }
28747 _ACEOF
28748 if ac_fn_c_try_link "$LINENO"; then :
28749   if test -s conftest$ac_exeext \
28750                  && ./conftest$ac_exeext < conftest.$ac_ext \
28751                  && test 1 = "`echo hi \
28752                    | { ./conftest$ac_exeext; echo $?; cat >/dev/null; }`"; then
28753                 gl_cv_func_lseek_pipe=yes
28754               else
28755                 gl_cv_func_lseek_pipe=no
28756               fi
28757
28758 else
28759   gl_cv_func_lseek_pipe=no
28760 fi
28761 rm -f core conftest.err conftest.$ac_objext \
28762     conftest$ac_exeext conftest.$ac_ext
28763          else
28764            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28765 /* end confdefs.h.  */
28766
28767 #if defined __BEOS__
28768 /* BeOS mistakenly return 0 when trying to seek on pipes.  */
28769   Choke me.
28770 #endif
28771 _ACEOF
28772 if ac_fn_c_try_compile "$LINENO"; then :
28773   gl_cv_func_lseek_pipe=yes
28774 else
28775   gl_cv_func_lseek_pipe=no
28776 fi
28777 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28778          fi
28779          ;;
28780      esac
28781
28782 fi
28783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lseek_pipe" >&5
28784 $as_echo "$gl_cv_func_lseek_pipe" >&6; }
28785   if test $gl_cv_func_lseek_pipe = no; then
28786     REPLACE_LSEEK=1
28787
28788 $as_echo "#define LSEEK_PIPE_BROKEN 1" >>confdefs.h
28789
28790   fi
28791
28792
28793   if test $WINDOWS_64_BIT_OFF_T = 1; then
28794     REPLACE_LSEEK=1
28795   fi
28796
28797   if test $REPLACE_LSEEK = 1; then
28798
28799
28800
28801
28802
28803
28804
28805
28806   gl_LIBOBJS="$gl_LIBOBJS lseek.$ac_objext"
28807
28808   fi
28809
28810
28811
28812
28813
28814           GNULIB_LSEEK=1
28815
28816
28817
28818
28819
28820 $as_echo "#define GNULIB_TEST_LSEEK 1" >>confdefs.h
28821
28822
28823
28824
28825
28826
28827   :
28828
28829
28830
28831
28832
28833   if test $ac_cv_func_lstat = yes; then
28834
28835     case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
28836       *no)
28837         REPLACE_LSTAT=1
28838         ;;
28839     esac
28840   else
28841     HAVE_LSTAT=0
28842   fi
28843
28844   if test $REPLACE_LSTAT = 1; then
28845
28846
28847
28848
28849
28850
28851
28852
28853   gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
28854
28855     :
28856   fi
28857
28858
28859
28860
28861
28862           GNULIB_LSTAT=1
28863
28864
28865
28866
28867
28868 $as_echo "#define GNULIB_TEST_LSTAT 1" >>confdefs.h
28869
28870
28871
28872
28873
28874
28875
28876
28877       for ac_header in stdlib.h
28878 do :
28879   ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
28880 if test "x$ac_cv_header_stdlib_h" = xyes; then :
28881   cat >>confdefs.h <<_ACEOF
28882 #define HAVE_STDLIB_H 1
28883 _ACEOF
28884
28885 fi
28886
28887 done
28888
28889   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
28890 $as_echo_n "checking for GNU libc compatible malloc... " >&6; }
28891 if ${ac_cv_func_malloc_0_nonnull+:} false; then :
28892   $as_echo_n "(cached) " >&6
28893 else
28894   if test "$cross_compiling" = yes; then :
28895   case "$host_os" in
28896           # Guess yes on platforms where we know the result.
28897           *-gnu* | freebsd* | netbsd* | openbsd* \
28898           | hpux* | solaris* | cygwin* | mingw*)
28899             ac_cv_func_malloc_0_nonnull=yes ;;
28900           # If we don't know, assume the worst.
28901           *) ac_cv_func_malloc_0_nonnull=no ;;
28902         esac
28903
28904 else
28905   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28906 /* end confdefs.h.  */
28907 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
28908             # include <stdlib.h>
28909             #else
28910             char *malloc ();
28911             #endif
28912
28913 int
28914 main ()
28915 {
28916 return ! malloc (0);
28917   ;
28918   return 0;
28919 }
28920
28921 _ACEOF
28922 if ac_fn_c_try_run "$LINENO"; then :
28923   ac_cv_func_malloc_0_nonnull=yes
28924 else
28925   ac_cv_func_malloc_0_nonnull=no
28926 fi
28927 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28928   conftest.$ac_objext conftest.beam conftest.$ac_ext
28929 fi
28930
28931
28932 fi
28933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
28934 $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
28935   if test $ac_cv_func_malloc_0_nonnull = yes; then :
28936
28937 $as_echo "#define HAVE_MALLOC_GNU 1" >>confdefs.h
28938
28939 else
28940   $as_echo "#define HAVE_MALLOC_GNU 0" >>confdefs.h
28941
28942      REPLACE_MALLOC=1
28943
28944 fi
28945
28946
28947   if test $REPLACE_MALLOC = 1; then
28948
28949
28950
28951
28952
28953
28954
28955
28956   gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
28957
28958   fi
28959
28960
28961 cat >>confdefs.h <<_ACEOF
28962 #define GNULIB_MALLOC_GNU 1
28963 _ACEOF
28964
28965
28966
28967
28968
28969   if test $gl_cv_func_malloc_posix = yes; then
28970
28971 $as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
28972
28973   else
28974     REPLACE_MALLOC=1
28975   fi
28976
28977   if test $REPLACE_MALLOC = 1; then
28978
28979
28980
28981
28982
28983
28984
28985
28986   gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
28987
28988   fi
28989
28990
28991
28992
28993
28994           GNULIB_MALLOC_POSIX=1
28995
28996
28997
28998
28999
29000 $as_echo "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
29001
29002
29003
29004
29005
29006
29007
29008
29009
29010
29011
29012
29013
29014
29015
29016   :
29017
29018
29019
29020
29021
29022
29023
29024
29025      if test $gl_cv_have_include_next = yes; then
29026        gl_cv_next_math_h='<'math.h'>'
29027      else
29028        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <math.h>" >&5
29029 $as_echo_n "checking absolute name of <math.h>... " >&6; }
29030 if ${gl_cv_next_math_h+:} false; then :
29031   $as_echo_n "(cached) " >&6
29032 else
29033
29034              if test $ac_cv_header_math_h = yes; then
29035
29036
29037
29038
29039   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29040 /* end confdefs.h.  */
29041 #include <math.h>
29042 _ACEOF
29043                 case "$host_os" in
29044     aix*) gl_absname_cpp="$ac_cpp -C" ;;
29045     *)    gl_absname_cpp="$ac_cpp" ;;
29046   esac
29047
29048   case "$host_os" in
29049     mingw*)
29050                                           gl_dirsep_regex='[/\\]'
29051       ;;
29052     *)
29053       gl_dirsep_regex='\/'
29054       ;;
29055   esac
29056       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
29057   gl_header_literal_regex=`echo 'math.h' \
29058                            | sed -e "$gl_make_literal_regex_sed"`
29059   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
29060       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
29061       s|^/[^/]|//&|
29062       p
29063       q
29064     }'
29065
29066         gl_cv_absolute_math_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
29067   sed -n "$gl_absolute_header_sed"`
29068
29069            gl_header=$gl_cv_absolute_math_h
29070            gl_cv_next_math_h='"'$gl_header'"'
29071           else
29072                gl_cv_next_math_h='<'math.h'>'
29073              fi
29074
29075
29076 fi
29077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_math_h" >&5
29078 $as_echo "$gl_cv_next_math_h" >&6; }
29079      fi
29080      NEXT_MATH_H=$gl_cv_next_math_h
29081
29082      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
29083        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
29084        gl_next_as_first_directive='<'math.h'>'
29085      else
29086        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
29087        gl_next_as_first_directive=$gl_cv_next_math_h
29088      fi
29089      NEXT_AS_FIRST_DIRECTIVE_MATH_H=$gl_next_as_first_directive
29090
29091
29092
29093
29094
29095   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NAN macro works" >&5
29096 $as_echo_n "checking whether NAN macro works... " >&6; }
29097 if ${gl_cv_header_math_nan_works+:} false; then :
29098   $as_echo_n "(cached) " >&6
29099 else
29100   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29101 /* end confdefs.h.  */
29102 #include <math.h>
29103 int
29104 main ()
29105 {
29106 /* Solaris 10 has a broken definition of NAN.  Other platforms
29107         fail to provide NAN, or provide it only in C99 mode; this
29108         test only needs to fail when NAN is provided but wrong.  */
29109          float f = 1.0f;
29110 #ifdef NAN
29111          f = NAN;
29112 #endif
29113          return f == 0;
29114   ;
29115   return 0;
29116 }
29117 _ACEOF
29118 if ac_fn_c_try_compile "$LINENO"; then :
29119   gl_cv_header_math_nan_works=yes
29120 else
29121   gl_cv_header_math_nan_works=no
29122 fi
29123 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29124 fi
29125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_nan_works" >&5
29126 $as_echo "$gl_cv_header_math_nan_works" >&6; }
29127   if test $gl_cv_header_math_nan_works = no; then
29128     REPLACE_NAN=1
29129   fi
29130   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether HUGE_VAL works" >&5
29131 $as_echo_n "checking whether HUGE_VAL works... " >&6; }
29132 if ${gl_cv_header_math_huge_val_works+:} false; then :
29133   $as_echo_n "(cached) " >&6
29134 else
29135   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29136 /* end confdefs.h.  */
29137 #include <math.h>
29138 int
29139 main ()
29140 {
29141 /* Solaris 10 has a broken definition of HUGE_VAL.  */
29142          double d = HUGE_VAL;
29143          return d == 0;
29144   ;
29145   return 0;
29146 }
29147 _ACEOF
29148 if ac_fn_c_try_compile "$LINENO"; then :
29149   gl_cv_header_math_huge_val_works=yes
29150 else
29151   gl_cv_header_math_huge_val_works=no
29152 fi
29153 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29154 fi
29155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_huge_val_works" >&5
29156 $as_echo "$gl_cv_header_math_huge_val_works" >&6; }
29157   if test $gl_cv_header_math_huge_val_works = no; then
29158     REPLACE_HUGE_VAL=1
29159   fi
29160
29161
29162     for gl_func in acosf acosl asinf asinl atanf atanl      cbrt cbrtf cbrtl ceilf ceill copysign copysignf copysignl cosf cosl coshf      expf expl exp2 exp2f exp2l expm1 expm1f expm1l      fabsf fabsl floorf floorl fma fmaf fmal      fmod fmodf fmodl frexpf frexpl hypotf hypotl      ilogb ilogbf ilogbl      ldexpf ldexpl      log logf logl log10 log10f log10l log1p log1pf log1pl log2 log2f log2l      logb logbf logbl      modf modff modfl powf      remainder remainderf remainderl      rint rintf rintl round roundf roundl sinf sinl sinhf sqrtf sqrtl      tanf tanl tanhf trunc truncf truncl; do
29163     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
29164     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
29165 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
29166 if eval \${$as_gl_Symbol+:} false; then :
29167   $as_echo_n "(cached) " >&6
29168 else
29169   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29170 /* end confdefs.h.  */
29171 #include <math.h>
29172 int
29173 main ()
29174 {
29175 #undef $gl_func
29176   (void) $gl_func;
29177   ;
29178   return 0;
29179 }
29180 _ACEOF
29181 if ac_fn_c_try_compile "$LINENO"; then :
29182   eval "$as_gl_Symbol=yes"
29183 else
29184   eval "$as_gl_Symbol=no"
29185 fi
29186 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29187 fi
29188 eval ac_res=\$$as_gl_Symbol
29189                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
29190 $as_echo "$ac_res" >&6; }
29191     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
29192   cat >>confdefs.h <<_ACEOF
29193 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
29194 _ACEOF
29195
29196                      eval ac_cv_have_decl_$gl_func=yes
29197 fi
29198       done
29199
29200
29201
29202
29203
29204
29205
29206
29207
29208
29209
29210
29211
29212
29213   :
29214
29215
29216
29217
29218
29219
29220   :
29221
29222
29223
29224
29225
29226   if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
29227
29228
29229
29230      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
29231 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
29232 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
29233   $as_echo_n "(cached) " >&6
29234 else
29235
29236                   case "$host_os" in
29237                      # Guess no on AIX and OSF/1.
29238         aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
29239                      # Guess yes otherwise.
29240         *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
29241       esac
29242       if test $LOCALE_JA != none; then
29243         if test "$cross_compiling" = yes; then :
29244   :
29245 else
29246   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29247 /* end confdefs.h.  */
29248
29249 #include <locale.h>
29250 #include <string.h>
29251 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
29252    <wchar.h>.
29253    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
29254    included before <wchar.h>.  */
29255 #include <stddef.h>
29256 #include <stdio.h>
29257 #include <time.h>
29258 #include <wchar.h>
29259 int main ()
29260 {
29261   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
29262     {
29263       const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
29264       mbstate_t state;
29265       wchar_t wc;
29266
29267       memset (&state, '\0', sizeof (mbstate_t));
29268       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
29269         if (mbsinit (&state))
29270           return 1;
29271     }
29272   return 0;
29273 }
29274 _ACEOF
29275 if ac_fn_c_try_run "$LINENO"; then :
29276   gl_cv_func_mbrtowc_incomplete_state=yes
29277 else
29278   gl_cv_func_mbrtowc_incomplete_state=no
29279 fi
29280 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29281   conftest.$ac_objext conftest.beam conftest.$ac_ext
29282 fi
29283
29284       fi
29285
29286 fi
29287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
29288 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
29289
29290
29291
29292
29293      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
29294 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
29295 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
29296   $as_echo_n "(cached) " >&6
29297 else
29298
29299                   case "$host_os" in
29300                     # Guess no on Solaris 8.
29301         solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
29302                     # Guess yes otherwise.
29303         *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
29304       esac
29305       if test $LOCALE_ZH_CN != none; then
29306         if test "$cross_compiling" = yes; then :
29307   :
29308 else
29309   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29310 /* end confdefs.h.  */
29311
29312 #include <locale.h>
29313 #include <stdlib.h>
29314 #include <string.h>
29315 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
29316    <wchar.h>.
29317    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
29318    included before <wchar.h>.  */
29319 #include <stddef.h>
29320 #include <stdio.h>
29321 #include <time.h>
29322 #include <wchar.h>
29323 int main ()
29324 {
29325   /* This fails on Solaris 8:
29326      mbrtowc returns 2, and sets wc to 0x00F0.
29327      mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
29328   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
29329     {
29330       char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
29331       mbstate_t state;
29332       wchar_t wc;
29333
29334       memset (&state, '\0', sizeof (mbstate_t));
29335       if (mbrtowc (&wc, input + 3, 6, &state) != 4
29336           && mbtowc (&wc, input + 3, 6) == 4)
29337         return 1;
29338     }
29339   return 0;
29340 }
29341 _ACEOF
29342 if ac_fn_c_try_run "$LINENO"; then :
29343   gl_cv_func_mbrtowc_sanitycheck=yes
29344 else
29345   gl_cv_func_mbrtowc_sanitycheck=no
29346 fi
29347 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29348   conftest.$ac_objext conftest.beam conftest.$ac_ext
29349 fi
29350
29351       fi
29352
29353 fi
29354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
29355 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
29356
29357     REPLACE_MBSTATE_T=0
29358     case "$gl_cv_func_mbrtowc_incomplete_state" in
29359       *yes) ;;
29360       *) REPLACE_MBSTATE_T=1 ;;
29361     esac
29362     case "$gl_cv_func_mbrtowc_sanitycheck" in
29363       *yes) ;;
29364       *) REPLACE_MBSTATE_T=1 ;;
29365     esac
29366   else
29367     REPLACE_MBSTATE_T=1
29368   fi
29369
29370
29371
29372   :
29373
29374
29375
29376
29377
29378   if test $ac_cv_func_mbrtowc = no; then
29379     HAVE_MBRTOWC=0
29380     ac_fn_c_check_decl "$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" "
29381 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
29382    <wchar.h>.
29383    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
29384    included before <wchar.h>.  */
29385 #include <stddef.h>
29386 #include <stdio.h>
29387 #include <time.h>
29388 #include <wchar.h>
29389
29390 "
29391 if test "x$ac_cv_have_decl_mbrtowc" = xyes; then :
29392   ac_have_decl=1
29393 else
29394   ac_have_decl=0
29395 fi
29396
29397 cat >>confdefs.h <<_ACEOF
29398 #define HAVE_DECL_MBRTOWC $ac_have_decl
29399 _ACEOF
29400
29401     if test $ac_cv_have_decl_mbrtowc = yes; then
29402                         REPLACE_MBRTOWC=1
29403     fi
29404   else
29405     if test $REPLACE_MBSTATE_T = 1; then
29406       REPLACE_MBRTOWC=1
29407     else
29408
29409
29410
29411      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5
29412 $as_echo_n "checking whether mbrtowc handles a NULL pwc argument... " >&6; }
29413 if ${gl_cv_func_mbrtowc_null_arg1+:} false; then :
29414   $as_echo_n "(cached) " >&6
29415 else
29416
29417                   case "$host_os" in
29418                   # Guess no on Solaris.
29419         solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;;
29420                   # Guess yes otherwise.
29421         *)        gl_cv_func_mbrtowc_null_arg1="guessing yes" ;;
29422       esac
29423       if test $LOCALE_FR_UTF8 != none; then
29424         if test "$cross_compiling" = yes; then :
29425   :
29426 else
29427   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29428 /* end confdefs.h.  */
29429
29430 #include <locale.h>
29431 #include <stdlib.h>
29432 #include <string.h>
29433 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
29434    <wchar.h>.
29435    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
29436    included before <wchar.h>.  */
29437 #include <stddef.h>
29438 #include <stdio.h>
29439 #include <time.h>
29440 #include <wchar.h>
29441 int main ()
29442 {
29443   int result = 0;
29444
29445   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
29446     {
29447       char input[] = "\303\237er";
29448       mbstate_t state;
29449       wchar_t wc;
29450       size_t ret;
29451
29452       memset (&state, '\0', sizeof (mbstate_t));
29453       wc = (wchar_t) 0xBADFACE;
29454       ret = mbrtowc (&wc, input, 5, &state);
29455       if (ret != 2)
29456         result |= 1;
29457       if (!mbsinit (&state))
29458         result |= 2;
29459
29460       memset (&state, '\0', sizeof (mbstate_t));
29461       ret = mbrtowc (NULL, input, 5, &state);
29462       if (ret != 2) /* Solaris 7 fails here: ret is -1.  */
29463         result |= 4;
29464       if (!mbsinit (&state))
29465         result |= 8;
29466     }
29467   return result;
29468 }
29469 _ACEOF
29470 if ac_fn_c_try_run "$LINENO"; then :
29471   gl_cv_func_mbrtowc_null_arg1=yes
29472 else
29473   gl_cv_func_mbrtowc_null_arg1=no
29474 fi
29475 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29476   conftest.$ac_objext conftest.beam conftest.$ac_ext
29477 fi
29478
29479       fi
29480
29481 fi
29482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5
29483 $as_echo "$gl_cv_func_mbrtowc_null_arg1" >&6; }
29484
29485
29486
29487
29488      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
29489 $as_echo_n "checking whether mbrtowc handles a NULL string argument... " >&6; }
29490 if ${gl_cv_func_mbrtowc_null_arg2+:} false; then :
29491   $as_echo_n "(cached) " >&6
29492 else
29493
29494                   case "$host_os" in
29495               # Guess no on OSF/1.
29496         osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;;
29497               # Guess yes otherwise.
29498         *)    gl_cv_func_mbrtowc_null_arg2="guessing yes" ;;
29499       esac
29500       if test $LOCALE_FR_UTF8 != none; then
29501         if test "$cross_compiling" = yes; then :
29502   :
29503 else
29504   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29505 /* end confdefs.h.  */
29506
29507 #include <locale.h>
29508 #include <string.h>
29509 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
29510    <wchar.h>.
29511    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
29512    included before <wchar.h>.  */
29513 #include <stddef.h>
29514 #include <stdio.h>
29515 #include <time.h>
29516 #include <wchar.h>
29517 int main ()
29518 {
29519   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
29520     {
29521       mbstate_t state;
29522       wchar_t wc;
29523       int ret;
29524
29525       memset (&state, '\0', sizeof (mbstate_t));
29526       wc = (wchar_t) 0xBADFACE;
29527       mbrtowc (&wc, NULL, 5, &state);
29528       /* Check that wc was not modified.  */
29529       if (wc != (wchar_t) 0xBADFACE)
29530         return 1;
29531     }
29532   return 0;
29533 }
29534 _ACEOF
29535 if ac_fn_c_try_run "$LINENO"; then :
29536   gl_cv_func_mbrtowc_null_arg2=yes
29537 else
29538   gl_cv_func_mbrtowc_null_arg2=no
29539 fi
29540 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29541   conftest.$ac_objext conftest.beam conftest.$ac_ext
29542 fi
29543
29544       fi
29545
29546 fi
29547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5
29548 $as_echo "$gl_cv_func_mbrtowc_null_arg2" >&6; }
29549
29550
29551
29552
29553
29554
29555   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
29556 $as_echo_n "checking whether mbrtowc has a correct return value... " >&6; }
29557 if ${gl_cv_func_mbrtowc_retval+:} false; then :
29558   $as_echo_n "(cached) " >&6
29559 else
29560
29561                   case "$host_os" in
29562                                    # Guess no on HP-UX, Solaris, native Windows.
29563         hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;;
29564                                    # Guess yes otherwise.
29565         *)                         gl_cv_func_mbrtowc_retval="guessing yes" ;;
29566       esac
29567       if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \
29568          || { case "$host_os" in mingw*) true;; *) false;; esac; }; then
29569         if test "$cross_compiling" = yes; then :
29570   :
29571 else
29572   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29573 /* end confdefs.h.  */
29574
29575 #include <locale.h>
29576 #include <string.h>
29577 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
29578    <wchar.h>.
29579    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
29580    included before <wchar.h>.  */
29581 #include <stddef.h>
29582 #include <stdio.h>
29583 #include <time.h>
29584 #include <wchar.h>
29585 int main ()
29586 {
29587   int result = 0;
29588   int found_some_locale = 0;
29589   /* This fails on Solaris.  */
29590   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
29591     {
29592       char input[] = "B\303\274\303\237er"; /* "Büßer" */
29593       mbstate_t state;
29594       wchar_t wc;
29595
29596       memset (&state, '\0', sizeof (mbstate_t));
29597       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
29598         {
29599           input[1] = '\0';
29600           if (mbrtowc (&wc, input + 2, 5, &state) != 1)
29601             result |= 1;
29602         }
29603       found_some_locale = 1;
29604     }
29605   /* This fails on HP-UX 11.11.  */
29606   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
29607     {
29608       char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
29609       mbstate_t state;
29610       wchar_t wc;
29611
29612       memset (&state, '\0', sizeof (mbstate_t));
29613       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
29614         {
29615           input[1] = '\0';
29616           if (mbrtowc (&wc, input + 2, 5, &state) != 2)
29617             result |= 2;
29618         }
29619       found_some_locale = 1;
29620     }
29621   /* This fails on native Windows.  */
29622   if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
29623     {
29624       char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */
29625       mbstate_t state;
29626       wchar_t wc;
29627
29628       memset (&state, '\0', sizeof (mbstate_t));
29629       if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
29630         {
29631           input[3] = '\0';
29632           if (mbrtowc (&wc, input + 4, 4, &state) != 1)
29633             result |= 4;
29634         }
29635       found_some_locale = 1;
29636     }
29637   if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
29638     {
29639       char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */
29640       mbstate_t state;
29641       wchar_t wc;
29642
29643       memset (&state, '\0', sizeof (mbstate_t));
29644       if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
29645         {
29646           input[3] = '\0';
29647           if (mbrtowc (&wc, input + 4, 4, &state) != 1)
29648             result |= 8;
29649         }
29650       found_some_locale = 1;
29651     }
29652   if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
29653     {
29654       char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */
29655       mbstate_t state;
29656       wchar_t wc;
29657
29658       memset (&state, '\0', sizeof (mbstate_t));
29659       if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
29660         {
29661           input[3] = '\0';
29662           if (mbrtowc (&wc, input + 4, 4, &state) != 1)
29663             result |= 16;
29664         }
29665       found_some_locale = 1;
29666     }
29667   return (found_some_locale ? result : 77);
29668 }
29669 _ACEOF
29670 if ac_fn_c_try_run "$LINENO"; then :
29671   gl_cv_func_mbrtowc_retval=yes
29672 else
29673   if test $? != 77; then
29674              gl_cv_func_mbrtowc_retval=no
29675            fi
29676
29677 fi
29678 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29679   conftest.$ac_objext conftest.beam conftest.$ac_ext
29680 fi
29681
29682       fi
29683
29684 fi
29685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
29686 $as_echo "$gl_cv_func_mbrtowc_retval" >&6; }
29687
29688
29689
29690
29691      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
29692 $as_echo_n "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
29693 if ${gl_cv_func_mbrtowc_nul_retval+:} false; then :
29694   $as_echo_n "(cached) " >&6
29695 else
29696
29697                   case "$host_os" in
29698                        # Guess no on Solaris 8 and 9.
29699         solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
29700                        # Guess yes otherwise.
29701         *)             gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
29702       esac
29703       if test $LOCALE_ZH_CN != none; then
29704         if test "$cross_compiling" = yes; then :
29705   :
29706 else
29707   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29708 /* end confdefs.h.  */
29709
29710 #include <locale.h>
29711 #include <string.h>
29712 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
29713    <wchar.h>.
29714    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
29715    included before <wchar.h>.  */
29716 #include <stddef.h>
29717 #include <stdio.h>
29718 #include <time.h>
29719 #include <wchar.h>
29720 int main ()
29721 {
29722   /* This fails on Solaris 8 and 9.  */
29723   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
29724     {
29725       mbstate_t state;
29726       wchar_t wc;
29727
29728       memset (&state, '\0', sizeof (mbstate_t));
29729       if (mbrtowc (&wc, "", 1, &state) != 0)
29730         return 1;
29731     }
29732   return 0;
29733 }
29734 _ACEOF
29735 if ac_fn_c_try_run "$LINENO"; then :
29736   gl_cv_func_mbrtowc_nul_retval=yes
29737 else
29738   gl_cv_func_mbrtowc_nul_retval=no
29739 fi
29740 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29741   conftest.$ac_objext conftest.beam conftest.$ac_ext
29742 fi
29743
29744       fi
29745
29746 fi
29747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
29748 $as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; }
29749
29750       case "$gl_cv_func_mbrtowc_null_arg1" in
29751         *yes) ;;
29752         *)
29753 $as_echo "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h
29754
29755            REPLACE_MBRTOWC=1
29756            ;;
29757       esac
29758       case "$gl_cv_func_mbrtowc_null_arg2" in
29759         *yes) ;;
29760         *)
29761 $as_echo "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h
29762
29763            REPLACE_MBRTOWC=1
29764            ;;
29765       esac
29766       case "$gl_cv_func_mbrtowc_retval" in
29767         *yes) ;;
29768         *)
29769 $as_echo "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
29770
29771            REPLACE_MBRTOWC=1
29772            ;;
29773       esac
29774       case "$gl_cv_func_mbrtowc_nul_retval" in
29775         *yes) ;;
29776         *)
29777 $as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
29778
29779            REPLACE_MBRTOWC=1
29780            ;;
29781       esac
29782     fi
29783   fi
29784
29785   if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
29786
29787
29788
29789
29790
29791
29792
29793
29794   gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext"
29795
29796
29797   :
29798
29799   fi
29800
29801
29802
29803
29804
29805           GNULIB_MBRTOWC=1
29806
29807
29808
29809
29810
29811 $as_echo "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h
29812
29813
29814
29815
29816
29817
29818
29819
29820           GNULIB_MBSCASESTR=1
29821
29822
29823
29824
29825
29826 $as_echo "#define GNULIB_TEST_MBSCASESTR 1" >>confdefs.h
29827
29828
29829
29830
29831
29832
29833
29834
29835
29836
29837
29838
29839
29840   :
29841
29842
29843
29844
29845
29846
29847   :
29848
29849
29850
29851
29852
29853   if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
29854
29855
29856
29857      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
29858 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
29859 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
29860   $as_echo_n "(cached) " >&6
29861 else
29862
29863                   case "$host_os" in
29864                      # Guess no on AIX and OSF/1.
29865         aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
29866                      # Guess yes otherwise.
29867         *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
29868       esac
29869       if test $LOCALE_JA != none; then
29870         if test "$cross_compiling" = yes; then :
29871   :
29872 else
29873   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29874 /* end confdefs.h.  */
29875
29876 #include <locale.h>
29877 #include <string.h>
29878 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
29879    <wchar.h>.
29880    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
29881    included before <wchar.h>.  */
29882 #include <stddef.h>
29883 #include <stdio.h>
29884 #include <time.h>
29885 #include <wchar.h>
29886 int main ()
29887 {
29888   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
29889     {
29890       const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
29891       mbstate_t state;
29892       wchar_t wc;
29893
29894       memset (&state, '\0', sizeof (mbstate_t));
29895       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
29896         if (mbsinit (&state))
29897           return 1;
29898     }
29899   return 0;
29900 }
29901 _ACEOF
29902 if ac_fn_c_try_run "$LINENO"; then :
29903   gl_cv_func_mbrtowc_incomplete_state=yes
29904 else
29905   gl_cv_func_mbrtowc_incomplete_state=no
29906 fi
29907 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29908   conftest.$ac_objext conftest.beam conftest.$ac_ext
29909 fi
29910
29911       fi
29912
29913 fi
29914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
29915 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
29916
29917
29918
29919
29920      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
29921 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
29922 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
29923   $as_echo_n "(cached) " >&6
29924 else
29925
29926                   case "$host_os" in
29927                     # Guess no on Solaris 8.
29928         solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
29929                     # Guess yes otherwise.
29930         *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
29931       esac
29932       if test $LOCALE_ZH_CN != none; then
29933         if test "$cross_compiling" = yes; then :
29934   :
29935 else
29936   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29937 /* end confdefs.h.  */
29938
29939 #include <locale.h>
29940 #include <stdlib.h>
29941 #include <string.h>
29942 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
29943    <wchar.h>.
29944    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
29945    included before <wchar.h>.  */
29946 #include <stddef.h>
29947 #include <stdio.h>
29948 #include <time.h>
29949 #include <wchar.h>
29950 int main ()
29951 {
29952   /* This fails on Solaris 8:
29953      mbrtowc returns 2, and sets wc to 0x00F0.
29954      mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
29955   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
29956     {
29957       char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
29958       mbstate_t state;
29959       wchar_t wc;
29960
29961       memset (&state, '\0', sizeof (mbstate_t));
29962       if (mbrtowc (&wc, input + 3, 6, &state) != 4
29963           && mbtowc (&wc, input + 3, 6) == 4)
29964         return 1;
29965     }
29966   return 0;
29967 }
29968 _ACEOF
29969 if ac_fn_c_try_run "$LINENO"; then :
29970   gl_cv_func_mbrtowc_sanitycheck=yes
29971 else
29972   gl_cv_func_mbrtowc_sanitycheck=no
29973 fi
29974 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29975   conftest.$ac_objext conftest.beam conftest.$ac_ext
29976 fi
29977
29978       fi
29979
29980 fi
29981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
29982 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
29983
29984     REPLACE_MBSTATE_T=0
29985     case "$gl_cv_func_mbrtowc_incomplete_state" in
29986       *yes) ;;
29987       *) REPLACE_MBSTATE_T=1 ;;
29988     esac
29989     case "$gl_cv_func_mbrtowc_sanitycheck" in
29990       *yes) ;;
29991       *) REPLACE_MBSTATE_T=1 ;;
29992     esac
29993   else
29994     REPLACE_MBSTATE_T=1
29995   fi
29996
29997
29998
29999   :
30000
30001
30002
30003
30004
30005   if test $ac_cv_func_mbsinit = no; then
30006     HAVE_MBSINIT=0
30007     ac_fn_c_check_decl "$LINENO" "mbsinit" "ac_cv_have_decl_mbsinit" "
30008 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
30009    <wchar.h>.
30010    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
30011    included before <wchar.h>.  */
30012 #include <stddef.h>
30013 #include <stdio.h>
30014 #include <time.h>
30015 #include <wchar.h>
30016
30017 "
30018 if test "x$ac_cv_have_decl_mbsinit" = 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_MBSINIT $ac_have_decl
30026 _ACEOF
30027
30028     if test $ac_cv_have_decl_mbsinit = yes; then
30029                         REPLACE_MBSINIT=1
30030     fi
30031   else
30032     if test $REPLACE_MBSTATE_T = 1; then
30033       REPLACE_MBSINIT=1
30034     else
30035                         case "$host_os" in
30036         mingw*) REPLACE_MBSINIT=1 ;;
30037       esac
30038     fi
30039   fi
30040
30041   if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
30042
30043
30044
30045
30046
30047
30048
30049
30050   gl_LIBOBJS="$gl_LIBOBJS mbsinit.$ac_objext"
30051
30052
30053   :
30054
30055   fi
30056
30057
30058
30059
30060
30061           GNULIB_MBSINIT=1
30062
30063
30064
30065
30066
30067 $as_echo "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h
30068
30069
30070
30071
30072
30073
30074   :
30075
30076
30077
30078
30079
30080   if test $ac_cv_func_mbslen = yes; then
30081     HAVE_MBSLEN=1
30082   else
30083     HAVE_MBSLEN=0
30084   fi
30085
30086
30087
30088
30089
30090
30091           GNULIB_MBSLEN=1
30092
30093
30094
30095
30096
30097 $as_echo "#define GNULIB_TEST_MBSLEN 1" >>confdefs.h
30098
30099
30100
30101
30102
30103
30104
30105
30106
30107
30108
30109
30110   :
30111
30112
30113
30114
30115
30116
30117   :
30118
30119
30120
30121
30122
30123   if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
30124
30125
30126
30127      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
30128 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
30129 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
30130   $as_echo_n "(cached) " >&6
30131 else
30132
30133                   case "$host_os" in
30134                      # Guess no on AIX and OSF/1.
30135         aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
30136                      # Guess yes otherwise.
30137         *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
30138       esac
30139       if test $LOCALE_JA != none; then
30140         if test "$cross_compiling" = yes; then :
30141   :
30142 else
30143   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30144 /* end confdefs.h.  */
30145
30146 #include <locale.h>
30147 #include <string.h>
30148 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
30149    <wchar.h>.
30150    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
30151    included before <wchar.h>.  */
30152 #include <stddef.h>
30153 #include <stdio.h>
30154 #include <time.h>
30155 #include <wchar.h>
30156 int main ()
30157 {
30158   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
30159     {
30160       const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
30161       mbstate_t state;
30162       wchar_t wc;
30163
30164       memset (&state, '\0', sizeof (mbstate_t));
30165       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
30166         if (mbsinit (&state))
30167           return 1;
30168     }
30169   return 0;
30170 }
30171 _ACEOF
30172 if ac_fn_c_try_run "$LINENO"; then :
30173   gl_cv_func_mbrtowc_incomplete_state=yes
30174 else
30175   gl_cv_func_mbrtowc_incomplete_state=no
30176 fi
30177 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30178   conftest.$ac_objext conftest.beam conftest.$ac_ext
30179 fi
30180
30181       fi
30182
30183 fi
30184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
30185 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
30186
30187
30188
30189
30190      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
30191 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
30192 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
30193   $as_echo_n "(cached) " >&6
30194 else
30195
30196                   case "$host_os" in
30197                     # Guess no on Solaris 8.
30198         solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
30199                     # Guess yes otherwise.
30200         *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
30201       esac
30202       if test $LOCALE_ZH_CN != none; then
30203         if test "$cross_compiling" = yes; then :
30204   :
30205 else
30206   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30207 /* end confdefs.h.  */
30208
30209 #include <locale.h>
30210 #include <stdlib.h>
30211 #include <string.h>
30212 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
30213    <wchar.h>.
30214    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
30215    included before <wchar.h>.  */
30216 #include <stddef.h>
30217 #include <stdio.h>
30218 #include <time.h>
30219 #include <wchar.h>
30220 int main ()
30221 {
30222   /* This fails on Solaris 8:
30223      mbrtowc returns 2, and sets wc to 0x00F0.
30224      mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
30225   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
30226     {
30227       char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
30228       mbstate_t state;
30229       wchar_t wc;
30230
30231       memset (&state, '\0', sizeof (mbstate_t));
30232       if (mbrtowc (&wc, input + 3, 6, &state) != 4
30233           && mbtowc (&wc, input + 3, 6) == 4)
30234         return 1;
30235     }
30236   return 0;
30237 }
30238 _ACEOF
30239 if ac_fn_c_try_run "$LINENO"; then :
30240   gl_cv_func_mbrtowc_sanitycheck=yes
30241 else
30242   gl_cv_func_mbrtowc_sanitycheck=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       fi
30249
30250 fi
30251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
30252 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
30253
30254     REPLACE_MBSTATE_T=0
30255     case "$gl_cv_func_mbrtowc_incomplete_state" in
30256       *yes) ;;
30257       *) REPLACE_MBSTATE_T=1 ;;
30258     esac
30259     case "$gl_cv_func_mbrtowc_sanitycheck" in
30260       *yes) ;;
30261       *) REPLACE_MBSTATE_T=1 ;;
30262     esac
30263   else
30264     REPLACE_MBSTATE_T=1
30265   fi
30266
30267
30268
30269   :
30270
30271
30272
30273
30274
30275   if test $ac_cv_func_mbsrtowcs = no; then
30276     HAVE_MBSRTOWCS=0
30277     ac_fn_c_check_decl "$LINENO" "mbsrtowcs" "ac_cv_have_decl_mbsrtowcs" "
30278 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
30279    <wchar.h>.
30280    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
30281    included before <wchar.h>.  */
30282 #include <stddef.h>
30283 #include <stdio.h>
30284 #include <time.h>
30285 #include <wchar.h>
30286
30287 "
30288 if test "x$ac_cv_have_decl_mbsrtowcs" = xyes; then :
30289   ac_have_decl=1
30290 else
30291   ac_have_decl=0
30292 fi
30293
30294 cat >>confdefs.h <<_ACEOF
30295 #define HAVE_DECL_MBSRTOWCS $ac_have_decl
30296 _ACEOF
30297
30298     if test $ac_cv_have_decl_mbsrtowcs = yes; then
30299                         REPLACE_MBSRTOWCS=1
30300     fi
30301   else
30302     if test $REPLACE_MBSTATE_T = 1; then
30303       REPLACE_MBSRTOWCS=1
30304     else
30305
30306
30307
30308
30309
30310
30311      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbsrtowcs works" >&5
30312 $as_echo_n "checking whether mbsrtowcs works... " >&6; }
30313 if ${gl_cv_func_mbsrtowcs_works+:} false; then :
30314   $as_echo_n "(cached) " >&6
30315 else
30316
30317                   case "$host_os" in
30318                                    # Guess no on HP-UX, Solaris, mingw.
30319         hpux* | solaris* | mingw*) gl_cv_func_mbsrtowcs_works="guessing no" ;;
30320                                    # Guess yes otherwise.
30321         *)                         gl_cv_func_mbsrtowcs_works="guessing yes" ;;
30322       esac
30323       if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
30324         if test "$cross_compiling" = yes; then :
30325   :
30326 else
30327   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30328 /* end confdefs.h.  */
30329
30330 #include <locale.h>
30331 #include <string.h>
30332 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
30333    <wchar.h>.
30334    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
30335    included before <wchar.h>.  */
30336 #include <stddef.h>
30337 #include <stdio.h>
30338 #include <time.h>
30339 #include <wchar.h>
30340 int main ()
30341 {
30342   int result = 0;
30343   /* Test whether the function supports a NULL destination argument.
30344      This fails on native Windows.  */
30345   if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
30346     {
30347       const char input[] = "\337er";
30348       const char *src = input;
30349       mbstate_t state;
30350
30351       memset (&state, '\0', sizeof (mbstate_t));
30352       if (mbsrtowcs (NULL, &src, 1, &state) != 3
30353           || src != input)
30354         result |= 1;
30355     }
30356   /* Test whether the function works when started with a conversion state
30357      in non-initial state.  This fails on HP-UX 11.11 and Solaris 10.  */
30358   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
30359     {
30360       const char input[] = "B\303\274\303\237er";
30361       mbstate_t state;
30362
30363       memset (&state, '\0', sizeof (mbstate_t));
30364       if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
30365         if (!mbsinit (&state))
30366           {
30367             const char *src = input + 2;
30368             if (mbsrtowcs (NULL, &src, 10, &state) != 4)
30369               result |= 2;
30370           }
30371     }
30372   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
30373     {
30374       const char input[] = "<\306\374\313\334\270\354>";
30375       mbstate_t state;
30376
30377       memset (&state, '\0', sizeof (mbstate_t));
30378       if (mbrtowc (NULL, input + 3, 1, &state) == (size_t)(-2))
30379         if (!mbsinit (&state))
30380           {
30381             const char *src = input + 4;
30382             if (mbsrtowcs (NULL, &src, 10, &state) != 3)
30383               result |= 4;
30384           }
30385     }
30386   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
30387     {
30388       const char input[] = "B\250\271\201\060\211\070er";
30389       mbstate_t state;
30390
30391       memset (&state, '\0', sizeof (mbstate_t));
30392       if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
30393         if (!mbsinit (&state))
30394           {
30395             const char *src = input + 2;
30396             if (mbsrtowcs (NULL, &src, 10, &state) != 4)
30397               result |= 8;
30398           }
30399     }
30400   return result;
30401 }
30402 _ACEOF
30403 if ac_fn_c_try_run "$LINENO"; then :
30404   gl_cv_func_mbsrtowcs_works=yes
30405 else
30406   gl_cv_func_mbsrtowcs_works=no
30407 fi
30408 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30409   conftest.$ac_objext conftest.beam conftest.$ac_ext
30410 fi
30411
30412       fi
30413
30414 fi
30415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbsrtowcs_works" >&5
30416 $as_echo "$gl_cv_func_mbsrtowcs_works" >&6; }
30417
30418       case "$gl_cv_func_mbsrtowcs_works" in
30419         *yes) ;;
30420         *) REPLACE_MBSRTOWCS=1 ;;
30421       esac
30422     fi
30423   fi
30424
30425   if test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1; then
30426
30427
30428
30429
30430
30431
30432
30433
30434   gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs.$ac_objext"
30435
30436
30437
30438
30439
30440
30441
30442
30443
30444   gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs-state.$ac_objext"
30445
30446
30447   :
30448
30449   fi
30450
30451
30452
30453
30454
30455           GNULIB_MBSRTOWCS=1
30456
30457
30458
30459
30460
30461 $as_echo "#define GNULIB_TEST_MBSRTOWCS 1" >>confdefs.h
30462
30463
30464
30465
30466
30467
30468
30469
30470           GNULIB_MBSSTR=1
30471
30472
30473
30474
30475
30476 $as_echo "#define GNULIB_TEST_MBSSTR 1" >>confdefs.h
30477
30478
30479
30480
30481
30482
30483   if false; then
30484     REPLACE_MBTOWC=1
30485   fi
30486
30487   if test $REPLACE_MBTOWC = 1; then
30488
30489
30490
30491
30492
30493
30494
30495
30496   gl_LIBOBJS="$gl_LIBOBJS mbtowc.$ac_objext"
30497
30498
30499   :
30500
30501   fi
30502
30503
30504
30505
30506
30507           GNULIB_MBTOWC=1
30508
30509
30510
30511
30512
30513 $as_echo "#define GNULIB_TEST_MBTOWC 1" >>confdefs.h
30514
30515
30516
30517
30518
30519   :
30520
30521
30522   if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
30523
30524
30525
30526
30527
30528
30529
30530
30531   gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext"
30532
30533
30534   for ac_header in bp-sym.h
30535 do :
30536   ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
30537 if test "x$ac_cv_header_bp_sym_h" = xyes; then :
30538   cat >>confdefs.h <<_ACEOF
30539 #define HAVE_BP_SYM_H 1
30540 _ACEOF
30541
30542 fi
30543
30544 done
30545
30546
30547   fi
30548
30549
30550
30551
30552
30553           GNULIB_MEMCHR=1
30554
30555
30556
30557
30558
30559 $as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
30560
30561
30562
30563
30564
30565
30566
30567
30568
30569   for ac_func in mempcpy
30570 do :
30571   ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
30572 if test "x$ac_cv_func_mempcpy" = xyes; then :
30573   cat >>confdefs.h <<_ACEOF
30574 #define HAVE_MEMPCPY 1
30575 _ACEOF
30576
30577 fi
30578 done
30579
30580   if test $ac_cv_func_mempcpy = no; then
30581     HAVE_MEMPCPY=0
30582   fi
30583
30584   if test $HAVE_MEMPCPY = 0; then
30585
30586
30587
30588
30589
30590
30591
30592
30593   gl_LIBOBJS="$gl_LIBOBJS mempcpy.$ac_objext"
30594
30595
30596   :
30597
30598   fi
30599
30600
30601
30602
30603
30604           GNULIB_MEMPCPY=1
30605
30606
30607
30608
30609
30610 $as_echo "#define GNULIB_TEST_MEMPCPY 1" >>confdefs.h
30611
30612
30613
30614
30615
30616
30617
30618
30619   :
30620
30621
30622
30623
30624
30625   if test $ac_cv_have_decl_memrchr = no; then
30626     HAVE_DECL_MEMRCHR=0
30627   fi
30628
30629   for ac_func in memrchr
30630 do :
30631   ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr"
30632 if test "x$ac_cv_func_memrchr" = xyes; then :
30633   cat >>confdefs.h <<_ACEOF
30634 #define HAVE_MEMRCHR 1
30635 _ACEOF
30636
30637 fi
30638 done
30639
30640
30641   if test $ac_cv_func_memrchr = no; then
30642
30643
30644
30645
30646
30647
30648
30649
30650   gl_LIBOBJS="$gl_LIBOBJS memrchr.$ac_objext"
30651
30652     :
30653   fi
30654
30655
30656
30657
30658
30659           GNULIB_MEMRCHR=1
30660
30661
30662
30663
30664
30665 $as_echo "#define GNULIB_TEST_MEMRCHR 1" >>confdefs.h
30666
30667
30668
30669
30670
30671
30672
30673   :
30674
30675
30676
30677
30678
30679
30680   :
30681
30682
30683
30684
30685
30686
30687   if test $APPLE_UNIVERSAL_BUILD = 1; then
30688     # A universal build on Apple Mac OS X platforms.
30689     # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode.
30690     # But we need a configuration result that is valid in both modes.
30691     gl_cv_func_working_mktime=no
30692   fi
30693   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5
30694 $as_echo_n "checking for working mktime... " >&6; }
30695 if ${gl_cv_func_working_mktime+:} false; then :
30696   $as_echo_n "(cached) " >&6
30697 else
30698   if test "$cross_compiling" = yes; then :
30699   gl_cv_func_working_mktime=no
30700 else
30701   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30702 /* end confdefs.h.  */
30703 /* Test program from Paul Eggert and Tony Leneis.  */
30704 #include <limits.h>
30705 #include <stdlib.h>
30706 #include <time.h>
30707
30708 #ifdef HAVE_UNISTD_H
30709 # include <unistd.h>
30710 #endif
30711
30712 #if HAVE_DECL_ALARM
30713 # include <signal.h>
30714 #endif
30715
30716 /* Work around redefinition to rpl_putenv by other config tests.  */
30717 #undef putenv
30718
30719 static time_t time_t_max;
30720 static time_t time_t_min;
30721
30722 /* Values we'll use to set the TZ environment variable.  */
30723 static char *tz_strings[] = {
30724   (char *) 0, "TZ=GMT0", "TZ=JST-9",
30725   "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
30726 };
30727 #define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
30728
30729 /* Return 0 if mktime fails to convert a date in the spring-forward gap.
30730    Based on a problem report from Andreas Jaeger.  */
30731 static int
30732 spring_forward_gap ()
30733 {
30734   /* glibc (up to about 1998-10-07) failed this test. */
30735   struct tm tm;
30736
30737   /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
30738      instead of "TZ=America/Vancouver" in order to detect the bug even
30739      on systems that don't support the Olson extension, or don't have the
30740      full zoneinfo tables installed.  */
30741   putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
30742
30743   tm.tm_year = 98;
30744   tm.tm_mon = 3;
30745   tm.tm_mday = 5;
30746   tm.tm_hour = 2;
30747   tm.tm_min = 0;
30748   tm.tm_sec = 0;
30749   tm.tm_isdst = -1;
30750   return mktime (&tm) != (time_t) -1;
30751 }
30752
30753 static int
30754 mktime_test1 (time_t now)
30755 {
30756   struct tm *lt;
30757   return ! (lt = localtime (&now)) || mktime (lt) == now;
30758 }
30759
30760 static int
30761 mktime_test (time_t now)
30762 {
30763   return (mktime_test1 (now)
30764           && mktime_test1 ((time_t) (time_t_max - now))
30765           && mktime_test1 ((time_t) (time_t_min + now)));
30766 }
30767
30768 static int
30769 irix_6_4_bug ()
30770 {
30771   /* Based on code from Ariel Faigon.  */
30772   struct tm tm;
30773   tm.tm_year = 96;
30774   tm.tm_mon = 3;
30775   tm.tm_mday = 0;
30776   tm.tm_hour = 0;
30777   tm.tm_min = 0;
30778   tm.tm_sec = 0;
30779   tm.tm_isdst = -1;
30780   mktime (&tm);
30781   return tm.tm_mon == 2 && tm.tm_mday == 31;
30782 }
30783
30784 static int
30785 bigtime_test (int j)
30786 {
30787   struct tm tm;
30788   time_t now;
30789   tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
30790   now = mktime (&tm);
30791   if (now != (time_t) -1)
30792     {
30793       struct tm *lt = localtime (&now);
30794       if (! (lt
30795              && lt->tm_year == tm.tm_year
30796              && lt->tm_mon == tm.tm_mon
30797              && lt->tm_mday == tm.tm_mday
30798              && lt->tm_hour == tm.tm_hour
30799              && lt->tm_min == tm.tm_min
30800              && lt->tm_sec == tm.tm_sec
30801              && lt->tm_yday == tm.tm_yday
30802              && lt->tm_wday == tm.tm_wday
30803              && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
30804                   == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
30805         return 0;
30806     }
30807   return 1;
30808 }
30809
30810 static int
30811 year_2050_test ()
30812 {
30813   /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
30814      ignoring leap seconds.  */
30815   unsigned long int answer = 2527315200UL;
30816
30817   struct tm tm;
30818   time_t t;
30819   tm.tm_year = 2050 - 1900;
30820   tm.tm_mon = 2 - 1;
30821   tm.tm_mday = 1;
30822   tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
30823   tm.tm_isdst = -1;
30824
30825   /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
30826      instead of "TZ=America/Vancouver" in order to detect the bug even
30827      on systems that don't support the Olson extension, or don't have the
30828      full zoneinfo tables installed.  */
30829   putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
30830
30831   t = mktime (&tm);
30832
30833   /* Check that the result is either a failure, or close enough
30834      to the correct answer that we can assume the discrepancy is
30835      due to leap seconds.  */
30836   return (t == (time_t) -1
30837           || (0 < t && answer - 120 <= t && t <= answer + 120));
30838 }
30839
30840 int
30841 main ()
30842 {
30843   int result = 0;
30844   time_t t, delta;
30845   int i, j;
30846   int time_t_signed_magnitude = (time_t) ~ (time_t) 0 < (time_t) -1;
30847   int time_t_signed = ! ((time_t) 0 < (time_t) -1);
30848
30849 #if HAVE_DECL_ALARM
30850   /* This test makes some buggy mktime implementations loop.
30851      Give up after 60 seconds; a mktime slower than that
30852      isn't worth using anyway.  */
30853   signal (SIGALRM, SIG_DFL);
30854   alarm (60);
30855 #endif
30856
30857   time_t_max = (! time_t_signed
30858                 ? (time_t) -1
30859                 : ((((time_t) 1 << (sizeof (time_t) * CHAR_BIT - 2)) - 1)
30860                    * 2 + 1));
30861   time_t_min = (! time_t_signed
30862                 ? (time_t) 0
30863                 : time_t_signed_magnitude
30864                 ? ~ (time_t) 0
30865                 : ~ time_t_max);
30866
30867   delta = time_t_max / 997; /* a suitable prime number */
30868   for (i = 0; i < N_STRINGS; i++)
30869     {
30870       if (tz_strings[i])
30871         putenv (tz_strings[i]);
30872
30873       for (t = 0; t <= time_t_max - delta && (result & 1) == 0; t += delta)
30874         if (! mktime_test (t))
30875           result |= 1;
30876       if ((result & 2) == 0
30877           && ! (mktime_test ((time_t) 1)
30878                 && mktime_test ((time_t) (60 * 60))
30879                 && mktime_test ((time_t) (60 * 60 * 24))))
30880         result |= 2;
30881
30882       for (j = 1; (result & 4) == 0; j <<= 1)
30883         {
30884           if (! bigtime_test (j))
30885             result |= 4;
30886           if (INT_MAX / 2 < j)
30887             break;
30888         }
30889       if ((result & 8) == 0 && ! bigtime_test (INT_MAX))
30890         result |= 8;
30891     }
30892   if (! irix_6_4_bug ())
30893     result |= 16;
30894   if (! spring_forward_gap ())
30895     result |= 32;
30896   if (! year_2050_test ())
30897     result |= 64;
30898   return result;
30899 }
30900 _ACEOF
30901 if ac_fn_c_try_run "$LINENO"; then :
30902   gl_cv_func_working_mktime=yes
30903 else
30904   gl_cv_func_working_mktime=no
30905 fi
30906 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30907   conftest.$ac_objext conftest.beam conftest.$ac_ext
30908 fi
30909
30910
30911 fi
30912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mktime" >&5
30913 $as_echo "$gl_cv_func_working_mktime" >&6; }
30914
30915   if test $gl_cv_func_working_mktime = no; then
30916     REPLACE_MKTIME=1
30917   else
30918     REPLACE_MKTIME=0
30919   fi
30920
30921   if test $REPLACE_MKTIME = 1; then
30922
30923
30924
30925
30926
30927
30928
30929
30930   gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext"
30931
30932     :
30933   fi
30934
30935
30936
30937
30938
30939           GNULIB_MKTIME=1
30940
30941
30942
30943
30944
30945 $as_echo "#define GNULIB_TEST_MKTIME 1" >>confdefs.h
30946
30947
30948
30949
30950   :
30951
30952
30953
30954
30955
30956
30957
30958
30959
30960   MODF_LIBM=
30961   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether modf can be used without linking with libm" >&5
30962 $as_echo_n "checking whether modf can be used without linking with libm... " >&6; }
30963 if ${gl_cv_func_modf_no_libm+:} false; then :
30964   $as_echo_n "(cached) " >&6
30965 else
30966
30967       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30968 /* end confdefs.h.  */
30969 #ifndef __NO_MATH_INLINES
30970              # define __NO_MATH_INLINES 1 /* for glibc */
30971              #endif
30972              #include <math.h>
30973
30974              double (*funcptr) (double, double *) = modf;
30975              int i_ret;
30976              float f_ret;
30977              double d_ret;
30978              long double l_ret;
30979 int
30980 main ()
30981 {
30982 double y = funcptr (1.6180339887, &d_ret) + modf (1.6180339887, &d_ret);
30983
30984              return y < 0.3 || y > 1.7;
30985
30986   ;
30987   return 0;
30988 }
30989 _ACEOF
30990 if ac_fn_c_try_link "$LINENO"; then :
30991   gl_cv_func_modf_no_libm=yes
30992 else
30993   gl_cv_func_modf_no_libm=no
30994 fi
30995 rm -f core conftest.err conftest.$ac_objext \
30996     conftest$ac_exeext conftest.$ac_ext
30997
30998 fi
30999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_modf_no_libm" >&5
31000 $as_echo "$gl_cv_func_modf_no_libm" >&6; }
31001   if test $gl_cv_func_modf_no_libm = no; then
31002     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether modf can be used with libm" >&5
31003 $as_echo_n "checking whether modf can be used with libm... " >&6; }
31004 if ${gl_cv_func_modf_in_libm+:} false; then :
31005   $as_echo_n "(cached) " >&6
31006 else
31007
31008         save_LIBS="$LIBS"
31009         LIBS="$LIBS -lm"
31010         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31011 /* end confdefs.h.  */
31012 #ifndef __NO_MATH_INLINES
31013                # define __NO_MATH_INLINES 1 /* for glibc */
31014                #endif
31015                #include <math.h>
31016
31017                double (*funcptr) (double, double *) = modf;
31018                int i_ret;
31019                float f_ret;
31020                double d_ret;
31021                long double l_ret;
31022 int
31023 main ()
31024 {
31025 double y = funcptr (1.6180339887, &d_ret) + modf (1.6180339887, &d_ret);
31026
31027                return y < 0.3 || y > 1.7;
31028
31029   ;
31030   return 0;
31031 }
31032 _ACEOF
31033 if ac_fn_c_try_link "$LINENO"; then :
31034   gl_cv_func_modf_in_libm=yes
31035 else
31036   gl_cv_func_modf_in_libm=no
31037 fi
31038 rm -f core conftest.err conftest.$ac_objext \
31039     conftest$ac_exeext conftest.$ac_ext
31040         LIBS="$save_LIBS"
31041
31042 fi
31043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_modf_in_libm" >&5
31044 $as_echo "$gl_cv_func_modf_in_libm" >&6; }
31045     if test $gl_cv_func_modf_in_libm = yes; then
31046       MODF_LIBM=-lm
31047     fi
31048   fi
31049
31050
31051
31052
31053
31054
31055
31056   if test $REPLACE_MODF = 1; then
31057
31058     MODF_LIBM="$TRUNC_LIBM"
31059   fi
31060
31061   if test $REPLACE_MODF = 1; then
31062
31063
31064
31065
31066
31067
31068
31069
31070   gl_LIBOBJS="$gl_LIBOBJS modf.$ac_objext"
31071
31072   fi
31073
31074
31075
31076
31077
31078           GNULIB_MODF=1
31079
31080
31081
31082
31083
31084 $as_echo "#define GNULIB_TEST_MODF 1" >>confdefs.h
31085
31086
31087
31088
31089
31090 for ac_func in listmntent getmntinfo
31091 do :
31092   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
31093 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
31094 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
31095   cat >>confdefs.h <<_ACEOF
31096 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
31097 _ACEOF
31098
31099 fi
31100 done
31101
31102
31103   :
31104
31105
31106
31107
31108
31109
31110
31111
31112
31113 # We must include grp.h before ucred.h on OSF V4.0, since ucred.h uses
31114 # NGROUPS (as the array dimension for a struct member) without a definition.
31115 for ac_header in sys/ucred.h
31116 do :
31117   ac_fn_c_check_header_compile "$LINENO" "sys/ucred.h" "ac_cv_header_sys_ucred_h" "#include <grp.h>
31118 "
31119 if test "x$ac_cv_header_sys_ucred_h" = xyes; then :
31120   cat >>confdefs.h <<_ACEOF
31121 #define HAVE_SYS_UCRED_H 1
31122 _ACEOF
31123
31124 fi
31125
31126 done
31127
31128
31129 for ac_header in sys/mount.h
31130 do :
31131   ac_fn_c_check_header_compile "$LINENO" "sys/mount.h" "ac_cv_header_sys_mount_h" "$ac_includes_default
31132    #if HAVE_SYS_PARAM_H
31133      #include <sys/param.h>
31134     #endif
31135 "
31136 if test "x$ac_cv_header_sys_mount_h" = xyes; then :
31137   cat >>confdefs.h <<_ACEOF
31138 #define HAVE_SYS_MOUNT_H 1
31139 _ACEOF
31140
31141 fi
31142
31143 done
31144
31145
31146 for ac_header in mntent.h sys/fs_types.h
31147 do :
31148   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
31149 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
31150 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
31151   cat >>confdefs.h <<_ACEOF
31152 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
31153 _ACEOF
31154
31155 fi
31156
31157 done
31158
31159     getfsstat_includes="\
31160 $ac_includes_default
31161 #if HAVE_SYS_PARAM_H
31162 # include <sys/param.h> /* needed by powerpc-apple-darwin1.3.7 */
31163 #endif
31164 #if HAVE_SYS_UCRED_H
31165 # include <grp.h> /* needed for definition of NGROUPS */
31166 # include <sys/ucred.h> /* needed by powerpc-apple-darwin1.3.7 */
31167 #endif
31168 #if HAVE_SYS_MOUNT_H
31169 # include <sys/mount.h>
31170 #endif
31171 #if HAVE_SYS_FS_TYPES_H
31172 # include <sys/fs_types.h> /* needed by powerpc-apple-darwin1.3.7 */
31173 #endif
31174 "
31175 ac_fn_c_check_member "$LINENO" "struct fsstat" "f_fstypename" "ac_cv_member_struct_fsstat_f_fstypename" "$getfsstat_includes
31176 "
31177 if test "x$ac_cv_member_struct_fsstat_f_fstypename" = xyes; then :
31178
31179 cat >>confdefs.h <<_ACEOF
31180 #define HAVE_STRUCT_FSSTAT_F_FSTYPENAME 1
31181 _ACEOF
31182
31183
31184 fi
31185
31186
31187 # Determine how to get the list of mounted file systems.
31188 ac_list_mounted_fs=
31189
31190 # If the getmntent function is available but not in the standard library,
31191 # make sure LIBS contains the appropriate -l option.
31192 # getmntent is in the standard C library on UNICOS, in -lsun on Irix 4,
31193 # -lseq on Dynix/PTX, -lgen on Unixware.
31194 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getmntent" >&5
31195 $as_echo_n "checking for library containing getmntent... " >&6; }
31196 if ${ac_cv_search_getmntent+:} false; then :
31197   $as_echo_n "(cached) " >&6
31198 else
31199   ac_func_search_save_LIBS=$LIBS
31200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31201 /* end confdefs.h.  */
31202
31203 /* Override any GCC internal prototype to avoid an error.
31204    Use char because int might match the return type of a GCC
31205    builtin and then its argument prototype would still apply.  */
31206 #ifdef __cplusplus
31207 extern "C"
31208 #endif
31209 char getmntent ();
31210 int
31211 main ()
31212 {
31213 return getmntent ();
31214   ;
31215   return 0;
31216 }
31217 _ACEOF
31218 for ac_lib in '' sun seq gen; do
31219   if test -z "$ac_lib"; then
31220     ac_res="none required"
31221   else
31222     ac_res=-l$ac_lib
31223     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
31224   fi
31225   if ac_fn_c_try_link "$LINENO"; then :
31226   ac_cv_search_getmntent=$ac_res
31227 fi
31228 rm -f core conftest.err conftest.$ac_objext \
31229     conftest$ac_exeext
31230   if ${ac_cv_search_getmntent+:} false; then :
31231   break
31232 fi
31233 done
31234 if ${ac_cv_search_getmntent+:} false; then :
31235
31236 else
31237   ac_cv_search_getmntent=no
31238 fi
31239 rm conftest.$ac_ext
31240 LIBS=$ac_func_search_save_LIBS
31241 fi
31242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getmntent" >&5
31243 $as_echo "$ac_cv_search_getmntent" >&6; }
31244 ac_res=$ac_cv_search_getmntent
31245 if test "$ac_res" != no; then :
31246   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
31247
31248 fi
31249
31250 for ac_func in getmntent
31251 do :
31252   ac_fn_c_check_func "$LINENO" "getmntent" "ac_cv_func_getmntent"
31253 if test "x$ac_cv_func_getmntent" = xyes; then :
31254   cat >>confdefs.h <<_ACEOF
31255 #define HAVE_GETMNTENT 1
31256 _ACEOF
31257
31258 fi
31259 done
31260
31261
31262
31263 # This test must precede the ones for getmntent because Unicos-9 is
31264 # reported to have the getmntent function, but its support is incompatible
31265 # with other getmntent implementations.
31266
31267 # NOTE: Normally, I wouldn't use a check for system type as I've done for
31268 # 'CRAY' below since that goes against the whole autoconf philosophy.  But
31269 # I think there is too great a chance that some non-Cray system has a
31270 # function named listmntent to risk the false positive.
31271
31272 if test -z "$ac_list_mounted_fs"; then
31273   # Cray UNICOS 9
31274   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for listmntent of Cray/Unicos-9" >&5
31275 $as_echo_n "checking for listmntent of Cray/Unicos-9... " >&6; }
31276   if ${fu_cv_sys_mounted_cray_listmntent+:} false; then :
31277   $as_echo_n "(cached) " >&6
31278 else
31279   fu_cv_sys_mounted_cray_listmntent=no
31280       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31281 /* end confdefs.h.  */
31282 #ifdef _CRAY
31283 yes
31284 #endif
31285
31286 _ACEOF
31287 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31288   $EGREP "yes" >/dev/null 2>&1; then :
31289   test $ac_cv_func_listmntent = yes \
31290             && fu_cv_sys_mounted_cray_listmntent=yes
31291
31292 fi
31293 rm -f conftest*
31294
31295
31296
31297 fi
31298
31299   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_mounted_cray_listmntent" >&5
31300 $as_echo "$fu_cv_sys_mounted_cray_listmntent" >&6; }
31301   if test $fu_cv_sys_mounted_cray_listmntent = yes; then
31302     ac_list_mounted_fs=found
31303
31304 $as_echo "#define MOUNTED_LISTMNTENT 1" >>confdefs.h
31305
31306   fi
31307 fi
31308
31309 if test -z "$ac_list_mounted_fs"; then
31310   # AIX.
31311   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mntctl function and struct vmount" >&5
31312 $as_echo_n "checking for mntctl function and struct vmount... " >&6; }
31313   if ${fu_cv_sys_mounted_vmount+:} false; then :
31314   $as_echo_n "(cached) " >&6
31315 else
31316   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31317 /* end confdefs.h.  */
31318 #include <fshelp.h>
31319 _ACEOF
31320 if ac_fn_c_try_cpp "$LINENO"; then :
31321   fu_cv_sys_mounted_vmount=yes
31322 else
31323   fu_cv_sys_mounted_vmount=no
31324 fi
31325 rm -f conftest.err conftest.i conftest.$ac_ext
31326 fi
31327
31328   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_mounted_vmount" >&5
31329 $as_echo "$fu_cv_sys_mounted_vmount" >&6; }
31330   if test $fu_cv_sys_mounted_vmount = yes; then
31331     ac_list_mounted_fs=found
31332
31333 $as_echo "#define MOUNTED_VMOUNT 1" >>confdefs.h
31334
31335   fi
31336 fi
31337
31338 if test $ac_cv_func_getmntent = yes; then
31339
31340   # This system has the getmntent function.
31341   # Determine whether it's the one-argument variant or the two-argument one.
31342
31343   if test -z "$ac_list_mounted_fs"; then
31344     # 4.3BSD, SunOS, HP-UX, Dynix, Irix
31345     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for one-argument getmntent function" >&5
31346 $as_echo_n "checking for one-argument getmntent function... " >&6; }
31347     if ${fu_cv_sys_mounted_getmntent1+:} false; then :
31348   $as_echo_n "(cached) " >&6
31349 else
31350   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31351 /* end confdefs.h.  */
31352
31353 /* SunOS 4.1.x /usr/include/mntent.h needs this for FILE */
31354 #include <stdio.h>
31355
31356 #include <mntent.h>
31357 #if !defined MOUNTED
31358 # if defined _PATH_MOUNTED      /* GNU libc  */
31359 #  define MOUNTED _PATH_MOUNTED
31360 # endif
31361 # if defined MNT_MNTTAB /* HP-UX.  */
31362 #  define MOUNTED MNT_MNTTAB
31363 # endif
31364 # if defined MNTTABNAME /* Dynix.  */
31365 #  define MOUNTED MNTTABNAME
31366 # endif
31367 #endif
31368
31369 int
31370 main ()
31371 {
31372  struct mntent *mnt = 0; char *table = MOUNTED;
31373                          if (sizeof mnt && sizeof table) return 0;
31374   ;
31375   return 0;
31376 }
31377 _ACEOF
31378 if ac_fn_c_try_compile "$LINENO"; then :
31379   fu_cv_sys_mounted_getmntent1=yes
31380 else
31381   fu_cv_sys_mounted_getmntent1=no
31382 fi
31383 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31384 fi
31385
31386     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_mounted_getmntent1" >&5
31387 $as_echo "$fu_cv_sys_mounted_getmntent1" >&6; }
31388     if test $fu_cv_sys_mounted_getmntent1 = yes; then
31389       ac_list_mounted_fs=found
31390
31391 $as_echo "#define MOUNTED_GETMNTENT1 1" >>confdefs.h
31392
31393     fi
31394   fi
31395
31396   if test -z "$ac_list_mounted_fs"; then
31397     # SVR4
31398     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for two-argument getmntent function" >&5
31399 $as_echo_n "checking for two-argument getmntent function... " >&6; }
31400     if ${fu_cv_sys_mounted_getmntent2+:} false; then :
31401   $as_echo_n "(cached) " >&6
31402 else
31403   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31404 /* end confdefs.h.  */
31405 #include <sys/mnttab.h>
31406
31407 _ACEOF
31408 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31409   $EGREP "getmntent" >/dev/null 2>&1; then :
31410   fu_cv_sys_mounted_getmntent2=yes
31411 else
31412   fu_cv_sys_mounted_getmntent2=no
31413 fi
31414 rm -f conftest*
31415
31416 fi
31417
31418     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_mounted_getmntent2" >&5
31419 $as_echo "$fu_cv_sys_mounted_getmntent2" >&6; }
31420     if test $fu_cv_sys_mounted_getmntent2 = yes; then
31421       ac_list_mounted_fs=found
31422
31423 $as_echo "#define MOUNTED_GETMNTENT2 1" >>confdefs.h
31424
31425       for ac_func in hasmntopt
31426 do :
31427   ac_fn_c_check_func "$LINENO" "hasmntopt" "ac_cv_func_hasmntopt"
31428 if test "x$ac_cv_func_hasmntopt" = xyes; then :
31429   cat >>confdefs.h <<_ACEOF
31430 #define HAVE_HASMNTOPT 1
31431 _ACEOF
31432
31433 fi
31434 done
31435
31436     fi
31437   fi
31438
31439 fi
31440
31441 if test -z "$ac_list_mounted_fs"; then
31442   # DEC Alpha running OSF/1, and Apple Darwin 1.3.
31443   # powerpc-apple-darwin1.3.7 needs sys/param.h sys/ucred.h sys/fs_types.h
31444
31445   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getfsstat function" >&5
31446 $as_echo_n "checking for getfsstat function... " >&6; }
31447   if ${fu_cv_sys_mounted_getfsstat+:} false; then :
31448   $as_echo_n "(cached) " >&6
31449 else
31450   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31451 /* end confdefs.h.  */
31452
31453 #include <sys/types.h>
31454 #if HAVE_STRUCT_FSSTAT_F_FSTYPENAME
31455 # define FS_TYPE(Ent) ((Ent).f_fstypename)
31456 #else
31457 # define FS_TYPE(Ent) mnt_names[(Ent).f_type]
31458 #endif
31459 $getfsstat_includes
31460
31461 int
31462 main ()
31463 {
31464 struct statfs *stats;
31465         int numsys = getfsstat ((struct statfs *)0, 0L, MNT_WAIT);
31466         char *t = FS_TYPE (*stats);
31467   ;
31468   return 0;
31469 }
31470 _ACEOF
31471 if ac_fn_c_try_link "$LINENO"; then :
31472   fu_cv_sys_mounted_getfsstat=yes
31473 else
31474   fu_cv_sys_mounted_getfsstat=no
31475 fi
31476 rm -f core conftest.err conftest.$ac_objext \
31477     conftest$ac_exeext conftest.$ac_ext
31478 fi
31479
31480   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_mounted_getfsstat" >&5
31481 $as_echo "$fu_cv_sys_mounted_getfsstat" >&6; }
31482   if test $fu_cv_sys_mounted_getfsstat = yes; then
31483     ac_list_mounted_fs=found
31484
31485 $as_echo "#define MOUNTED_GETFSSTAT 1" >>confdefs.h
31486
31487   fi
31488 fi
31489
31490 if test -z "$ac_list_mounted_fs"; then
31491   # SVR3
31492   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIXME existence of three headers" >&5
31493 $as_echo_n "checking for FIXME existence of three headers... " >&6; }
31494   if ${fu_cv_sys_mounted_fread_fstyp+:} false; then :
31495   $as_echo_n "(cached) " >&6
31496 else
31497   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31498 /* end confdefs.h.  */
31499
31500 #include <sys/statfs.h>
31501 #include <sys/fstyp.h>
31502 #include <mnttab.h>
31503 _ACEOF
31504 if ac_fn_c_try_cpp "$LINENO"; then :
31505   fu_cv_sys_mounted_fread_fstyp=yes
31506 else
31507   fu_cv_sys_mounted_fread_fstyp=no
31508 fi
31509 rm -f conftest.err conftest.i conftest.$ac_ext
31510 fi
31511
31512   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_mounted_fread_fstyp" >&5
31513 $as_echo "$fu_cv_sys_mounted_fread_fstyp" >&6; }
31514   if test $fu_cv_sys_mounted_fread_fstyp = yes; then
31515     ac_list_mounted_fs=found
31516
31517 $as_echo "#define MOUNTED_FREAD_FSTYP 1" >>confdefs.h
31518
31519   fi
31520 fi
31521
31522 if test -z "$ac_list_mounted_fs"; then
31523   # 4.4BSD and DEC OSF/1.
31524   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getmntinfo function" >&5
31525 $as_echo_n "checking for getmntinfo function... " >&6; }
31526   if ${fu_cv_sys_mounted_getmntinfo+:} false; then :
31527   $as_echo_n "(cached) " >&6
31528 else
31529
31530       test "$ac_cv_func_getmntinfo" = yes \
31531           && fu_cv_sys_mounted_getmntinfo=yes \
31532           || fu_cv_sys_mounted_getmntinfo=no
31533
31534 fi
31535
31536   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_mounted_getmntinfo" >&5
31537 $as_echo "$fu_cv_sys_mounted_getmntinfo" >&6; }
31538   if test $fu_cv_sys_mounted_getmntinfo = yes; then
31539     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getmntinfo returns statvfs structures" >&5
31540 $as_echo_n "checking whether getmntinfo returns statvfs structures... " >&6; }
31541     if ${fu_cv_sys_mounted_getmntinfo2+:} false; then :
31542   $as_echo_n "(cached) " >&6
31543 else
31544
31545         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31546 /* end confdefs.h.  */
31547
31548 #if HAVE_SYS_PARAM_H
31549 # include <sys/param.h>
31550 #endif
31551 #include <sys/types.h>
31552 #if HAVE_SYS_MOUNT_H
31553 # include <sys/mount.h>
31554 #endif
31555 #if HAVE_SYS_STATVFS_H
31556 # include <sys/statvfs.h>
31557 #endif
31558 extern
31559 #ifdef __cplusplus
31560 "C"
31561 #endif
31562 int getmntinfo (struct statfs **, int);
31563
31564 int
31565 main ()
31566 {
31567
31568   ;
31569   return 0;
31570 }
31571 _ACEOF
31572 if ac_fn_c_try_compile "$LINENO"; then :
31573   fu_cv_sys_mounted_getmntinfo2=no
31574 else
31575   fu_cv_sys_mounted_getmntinfo2=yes
31576 fi
31577 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31578
31579 fi
31580
31581     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_mounted_getmntinfo2" >&5
31582 $as_echo "$fu_cv_sys_mounted_getmntinfo2" >&6; }
31583     if test $fu_cv_sys_mounted_getmntinfo2 = no; then
31584       ac_list_mounted_fs=found
31585
31586 $as_echo "#define MOUNTED_GETMNTINFO 1" >>confdefs.h
31587
31588     else
31589       ac_list_mounted_fs=found
31590
31591 $as_echo "#define MOUNTED_GETMNTINFO2 1" >>confdefs.h
31592
31593     fi
31594   fi
31595 fi
31596
31597 if test -z "$ac_list_mounted_fs"; then
31598   # Ultrix
31599   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getmnt function" >&5
31600 $as_echo_n "checking for getmnt function... " >&6; }
31601   if ${fu_cv_sys_mounted_getmnt+:} false; then :
31602   $as_echo_n "(cached) " >&6
31603 else
31604   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31605 /* end confdefs.h.  */
31606
31607 #include <sys/fs_types.h>
31608 #include <sys/mount.h>
31609 _ACEOF
31610 if ac_fn_c_try_cpp "$LINENO"; then :
31611   fu_cv_sys_mounted_getmnt=yes
31612 else
31613   fu_cv_sys_mounted_getmnt=no
31614 fi
31615 rm -f conftest.err conftest.i conftest.$ac_ext
31616 fi
31617
31618   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_mounted_getmnt" >&5
31619 $as_echo "$fu_cv_sys_mounted_getmnt" >&6; }
31620   if test $fu_cv_sys_mounted_getmnt = yes; then
31621     ac_list_mounted_fs=found
31622
31623 $as_echo "#define MOUNTED_GETMNT 1" >>confdefs.h
31624
31625   fi
31626 fi
31627
31628 if test -z "$ac_list_mounted_fs"; then
31629   # BeOS
31630   for ac_func in next_dev fs_stat_dev
31631 do :
31632   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
31633 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
31634 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
31635   cat >>confdefs.h <<_ACEOF
31636 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
31637 _ACEOF
31638
31639 fi
31640 done
31641
31642   for ac_header in fs_info.h
31643 do :
31644   ac_fn_c_check_header_mongrel "$LINENO" "fs_info.h" "ac_cv_header_fs_info_h" "$ac_includes_default"
31645 if test "x$ac_cv_header_fs_info_h" = xyes; then :
31646   cat >>confdefs.h <<_ACEOF
31647 #define HAVE_FS_INFO_H 1
31648 _ACEOF
31649
31650 fi
31651
31652 done
31653
31654   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BEOS mounted file system support functions" >&5
31655 $as_echo_n "checking for BEOS mounted file system support functions... " >&6; }
31656   if test $ac_cv_header_fs_info_h = yes \
31657       && test $ac_cv_func_next_dev = yes \
31658         && test $ac_cv_func_fs_stat_dev = yes; then
31659     fu_result=yes
31660   else
31661     fu_result=no
31662   fi
31663   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_result" >&5
31664 $as_echo "$fu_result" >&6; }
31665   if test $fu_result = yes; then
31666     ac_list_mounted_fs=found
31667
31668 $as_echo "#define MOUNTED_FS_STAT_DEV 1" >>confdefs.h
31669
31670   fi
31671 fi
31672
31673 if test -z "$ac_list_mounted_fs"; then
31674   # SVR2
31675   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is possible to resort to fread on /etc/mnttab" >&5
31676 $as_echo_n "checking whether it is possible to resort to fread on /etc/mnttab... " >&6; }
31677   if ${fu_cv_sys_mounted_fread+:} false; then :
31678   $as_echo_n "(cached) " >&6
31679 else
31680   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31681 /* end confdefs.h.  */
31682 #include <mnttab.h>
31683 _ACEOF
31684 if ac_fn_c_try_cpp "$LINENO"; then :
31685   fu_cv_sys_mounted_fread=yes
31686 else
31687   fu_cv_sys_mounted_fread=no
31688 fi
31689 rm -f conftest.err conftest.i conftest.$ac_ext
31690 fi
31691
31692   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_mounted_fread" >&5
31693 $as_echo "$fu_cv_sys_mounted_fread" >&6; }
31694   if test $fu_cv_sys_mounted_fread = yes; then
31695     ac_list_mounted_fs=found
31696
31697 $as_echo "#define MOUNTED_FREAD 1" >>confdefs.h
31698
31699   fi
31700 fi
31701
31702 if test -z "$ac_list_mounted_fs"; then
31703   # Interix / BSD alike statvfs
31704   # the code is really interix specific, so make sure, we're on it.
31705   case "$host" in
31706   *-interix*)
31707     for ac_func in statvfs
31708 do :
31709   ac_fn_c_check_func "$LINENO" "statvfs" "ac_cv_func_statvfs"
31710 if test "x$ac_cv_func_statvfs" = xyes; then :
31711   cat >>confdefs.h <<_ACEOF
31712 #define HAVE_STATVFS 1
31713 _ACEOF
31714
31715 fi
31716 done
31717
31718     if test $ac_cv_func_statvfs = yes; then
31719       ac_list_mounted_fs=found
31720
31721 $as_echo "#define MOUNTED_INTERIX_STATVFS 1" >>confdefs.h
31722
31723     fi
31724     ;;
31725   esac
31726 fi
31727
31728 if test -z "$ac_list_mounted_fs"; then
31729   as_fn_error $? "could not determine how to read list of mounted file systems" "$LINENO" 5
31730   # FIXME -- no need to abort building the whole package
31731   # Can't build mountlist.c or anything that needs its functions
31732 fi
31733
31734 if test $ac_list_mounted_fs = found; then :
31735   gl_cv_list_mounted_fs=yes
31736 else
31737   gl_cv_list_mounted_fs=no
31738 fi
31739
31740
31741
31742   if test $gl_cv_list_mounted_fs = yes; then
31743
31744
31745
31746
31747
31748
31749
31750
31751   gl_LIBOBJS="$gl_LIBOBJS mountlist.$ac_objext"
31752
31753
31754     for ac_header in sys/mntent.h
31755 do :
31756   ac_fn_c_check_header_mongrel "$LINENO" "sys/mntent.h" "ac_cv_header_sys_mntent_h" "$ac_includes_default"
31757 if test "x$ac_cv_header_sys_mntent_h" = xyes; then :
31758   cat >>confdefs.h <<_ACEOF
31759 #define HAVE_SYS_MNTENT_H 1
31760 _ACEOF
31761
31762 fi
31763
31764 done
31765
31766
31767   ac_fn_c_check_member "$LINENO" "struct statfs" "f_fstypename" "ac_cv_member_struct_statfs_f_fstypename" "
31768       #include <sys/types.h>
31769       #include <sys/param.h>
31770       #include <sys/mount.h>
31771
31772 "
31773 if test "x$ac_cv_member_struct_statfs_f_fstypename" = xyes; then :
31774
31775 cat >>confdefs.h <<_ACEOF
31776 #define HAVE_STRUCT_STATFS_F_FSTYPENAME 1
31777 _ACEOF
31778
31779
31780 fi
31781
31782
31783
31784   fi
31785
31786
31787   :
31788
31789
31790
31791
31792
31793   if test $ac_cv_func__set_invalid_parameter_handler = yes; then
31794     HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
31795
31796 $as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
31797
31798   else
31799     HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
31800   fi
31801
31802
31803   if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
31804
31805
31806
31807
31808
31809
31810
31811
31812   gl_LIBOBJS="$gl_LIBOBJS msvc-inval.$ac_objext"
31813
31814   fi
31815
31816
31817
31818   if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
31819
31820
31821
31822
31823
31824
31825
31826
31827   gl_LIBOBJS="$gl_LIBOBJS msvc-nothrow.$ac_objext"
31828
31829   fi
31830
31831
31832
31833
31834
31835   :
31836
31837
31838
31839
31840
31841      if test $ac_cv_func_nl_langinfo = yes; then
31842     # On Irix 6.5, YESEXPR is defined, but nl_langinfo(YESEXPR) is broken.
31843     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether YESEXPR works" >&5
31844 $as_echo_n "checking whether YESEXPR works... " >&6; }
31845 if ${gl_cv_func_nl_langinfo_yesexpr_works+:} false; then :
31846   $as_echo_n "(cached) " >&6
31847 else
31848   if test "$cross_compiling" = yes; then :
31849
31850          case "$host_os" in
31851                    # Guess no on irix systems.
31852            irix*)  gl_cv_func_nl_langinfo_yesexpr_works="guessing no";;
31853                    # Guess yes elsewhere.
31854            *)      gl_cv_func_nl_langinfo_yesexpr_works="guessing yes";;
31855          esac
31856
31857 else
31858   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31859 /* end confdefs.h.  */
31860 #include <langinfo.h>
31861
31862 int
31863 main ()
31864 {
31865 return !*nl_langinfo(YESEXPR);
31866
31867   ;
31868   return 0;
31869 }
31870 _ACEOF
31871 if ac_fn_c_try_run "$LINENO"; then :
31872   gl_cv_func_nl_langinfo_yesexpr_works=yes
31873 else
31874   gl_cv_func_nl_langinfo_yesexpr_works=no
31875 fi
31876 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31877   conftest.$ac_objext conftest.beam conftest.$ac_ext
31878 fi
31879
31880
31881 fi
31882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_nl_langinfo_yesexpr_works" >&5
31883 $as_echo "$gl_cv_func_nl_langinfo_yesexpr_works" >&6; }
31884     case $gl_cv_func_nl_langinfo_yesexpr_works in
31885       *yes) FUNC_NL_LANGINFO_YESEXPR_WORKS=1 ;;
31886       *)    FUNC_NL_LANGINFO_YESEXPR_WORKS=0 ;;
31887     esac
31888
31889 cat >>confdefs.h <<_ACEOF
31890 #define FUNC_NL_LANGINFO_YESEXPR_WORKS $FUNC_NL_LANGINFO_YESEXPR_WORKS
31891 _ACEOF
31892
31893     if test $HAVE_LANGINFO_CODESET = 1 && test $HAVE_LANGINFO_ERA = 1 \
31894         && test $FUNC_NL_LANGINFO_YESEXPR_WORKS = 1; then
31895       :
31896     else
31897       REPLACE_NL_LANGINFO=1
31898
31899 $as_echo "#define REPLACE_NL_LANGINFO 1" >>confdefs.h
31900
31901     fi
31902   else
31903     HAVE_NL_LANGINFO=0
31904   fi
31905
31906   if test $HAVE_NL_LANGINFO = 0 || test $REPLACE_NL_LANGINFO = 1; then
31907
31908
31909
31910
31911
31912
31913
31914
31915   gl_LIBOBJS="$gl_LIBOBJS nl_langinfo.$ac_objext"
31916
31917   fi
31918
31919
31920
31921
31922
31923           GNULIB_NL_LANGINFO=1
31924
31925
31926
31927
31928
31929 $as_echo "#define GNULIB_TEST_NL_LANGINFO 1" >>confdefs.h
31930
31931
31932
31933
31934
31935   case "$host_os" in
31936     mingw* | pw*)
31937       REPLACE_OPEN=1
31938       ;;
31939     *)
31940
31941   :
31942
31943
31944
31945
31946
31947       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
31948 $as_echo_n "checking whether open recognizes a trailing slash... " >&6; }
31949 if ${gl_cv_func_open_slash+:} false; then :
31950   $as_echo_n "(cached) " >&6
31951 else
31952   # Assume that if we have lstat, we can also check symlinks.
31953           if test $ac_cv_func_lstat = yes; then
31954             touch conftest.tmp
31955             ln -s conftest.tmp conftest.lnk
31956           fi
31957           if test "$cross_compiling" = yes; then :
31958
31959              case "$host_os" in
31960                freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
31961                  gl_cv_func_open_slash="guessing no" ;;
31962                *)
31963                  gl_cv_func_open_slash="guessing yes" ;;
31964              esac
31965
31966 else
31967   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31968 /* end confdefs.h.  */
31969
31970 #include <fcntl.h>
31971 #if HAVE_UNISTD_H
31972 # include <unistd.h>
31973 #endif
31974 int main ()
31975 {
31976   int result = 0;
31977 #if HAVE_LSTAT
31978   if (open ("conftest.lnk/", O_RDONLY) != -1)
31979     result |= 1;
31980 #endif
31981   if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
31982     result |= 2;
31983   return result;
31984 }
31985 _ACEOF
31986 if ac_fn_c_try_run "$LINENO"; then :
31987   gl_cv_func_open_slash=yes
31988 else
31989   gl_cv_func_open_slash=no
31990 fi
31991 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31992   conftest.$ac_objext conftest.beam conftest.$ac_ext
31993 fi
31994
31995           rm -f conftest.sl conftest.tmp conftest.lnk
31996
31997 fi
31998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5
31999 $as_echo "$gl_cv_func_open_slash" >&6; }
32000       case "$gl_cv_func_open_slash" in
32001         *no)
32002
32003 $as_echo "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
32004
32005           REPLACE_OPEN=1
32006           ;;
32007       esac
32008       ;;
32009   esac
32010
32011     if test $REPLACE_OPEN = 0; then
32012
32013
32014
32015   :
32016
32017
32018
32019
32020
32021   if test $ac_cv_func_fchdir = no; then
32022     HAVE_FCHDIR=0
32023   fi
32024
32025       if test $HAVE_FCHDIR = 0; then
32026         REPLACE_OPEN=1
32027       fi
32028     fi
32029
32030
32031
32032   if test $REPLACE_OPEN = 1; then
32033
32034
32035
32036
32037
32038
32039
32040
32041   gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext"
32042
32043
32044
32045   :
32046
32047   fi
32048
32049
32050
32051
32052
32053           GNULIB_OPEN=1
32054
32055
32056
32057
32058
32059 $as_echo "#define GNULIB_TEST_OPEN 1" >>confdefs.h
32060
32061
32062
32063
32064
32065
32066
32067   :
32068
32069
32070
32071
32072
32073
32074   case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink in
32075   yes+*yes)
32076     ;;
32077   yes+*)
32078     # Solaris 9 has *at functions, but uniformly mishandles trailing
32079     # slash in all of them.
32080     REPLACE_OPENAT=1
32081     ;;
32082   *)
32083     HAVE_OPENAT=0
32084     ;;
32085   esac
32086
32087   if test $HAVE_OPENAT = 0 || test $REPLACE_OPENAT = 1; then
32088
32089
32090
32091
32092
32093
32094
32095
32096   gl_LIBOBJS="$gl_LIBOBJS openat.$ac_objext"
32097
32098
32099
32100   :
32101
32102   fi
32103
32104
32105 cat >>confdefs.h <<_ACEOF
32106 #define GNULIB_OPENAT 1
32107 _ACEOF
32108
32109
32110
32111
32112
32113
32114           GNULIB_OPENAT=1
32115
32116
32117
32118
32119
32120 $as_echo "#define GNULIB_TEST_OPENAT 1" >>confdefs.h
32121
32122
32123
32124
32125
32126
32127
32128
32129 cat >>confdefs.h <<_ACEOF
32130 #define GNULIB_OPENAT_SAFER 1
32131 _ACEOF
32132
32133
32134
32135
32136
32137   for ac_func in opendir
32138 do :
32139   ac_fn_c_check_func "$LINENO" "opendir" "ac_cv_func_opendir"
32140 if test "x$ac_cv_func_opendir" = xyes; then :
32141   cat >>confdefs.h <<_ACEOF
32142 #define HAVE_OPENDIR 1
32143 _ACEOF
32144
32145 fi
32146 done
32147
32148   if test $ac_cv_func_opendir = no; then
32149     HAVE_OPENDIR=0
32150   fi
32151
32152
32153
32154
32155   :
32156
32157
32158
32159
32160
32161   if test $ac_cv_func_fchdir = no; then
32162     HAVE_FCHDIR=0
32163   fi
32164
32165     if test $HAVE_FCHDIR = 0; then
32166       if test $HAVE_OPENDIR = 1; then
32167         REPLACE_OPENDIR=1
32168       fi
32169     fi
32170
32171
32172   if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then
32173
32174
32175
32176
32177
32178
32179
32180
32181   gl_LIBOBJS="$gl_LIBOBJS opendir.$ac_objext"
32182
32183   fi
32184
32185
32186
32187
32188
32189           GNULIB_OPENDIR=1
32190
32191
32192
32193
32194
32195 $as_echo "#define GNULIB_TEST_OPENDIR 1" >>confdefs.h
32196
32197
32198
32199
32200
32201
32202
32203
32204
32205   ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
32206 #include <$ac_cv_struct_tm>
32207
32208 "
32209 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
32210
32211 cat >>confdefs.h <<_ACEOF
32212 #define HAVE_STRUCT_TM_TM_ZONE 1
32213 _ACEOF
32214
32215
32216 fi
32217
32218 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
32219
32220 $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
32221
32222 else
32223   ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
32224 "
32225 if test "x$ac_cv_have_decl_tzname" = xyes; then :
32226   ac_have_decl=1
32227 else
32228   ac_have_decl=0
32229 fi
32230
32231 cat >>confdefs.h <<_ACEOF
32232 #define HAVE_DECL_TZNAME $ac_have_decl
32233 _ACEOF
32234
32235   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
32236 $as_echo_n "checking for tzname... " >&6; }
32237 if ${ac_cv_var_tzname+:} false; then :
32238   $as_echo_n "(cached) " >&6
32239 else
32240   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32241 /* end confdefs.h.  */
32242 #include <time.h>
32243 #if !HAVE_DECL_TZNAME
32244 extern char *tzname[];
32245 #endif
32246
32247 int
32248 main ()
32249 {
32250 return tzname[0][0];
32251   ;
32252   return 0;
32253 }
32254 _ACEOF
32255 if ac_fn_c_try_link "$LINENO"; then :
32256   ac_cv_var_tzname=yes
32257 else
32258   ac_cv_var_tzname=no
32259 fi
32260 rm -f core conftest.err conftest.$ac_objext \
32261     conftest$ac_exeext conftest.$ac_ext
32262 fi
32263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
32264 $as_echo "$ac_cv_var_tzname" >&6; }
32265   if test $ac_cv_var_tzname = yes; then
32266
32267 $as_echo "#define HAVE_TZNAME 1" >>confdefs.h
32268
32269   fi
32270 fi
32271
32272
32273
32274   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32275 /* end confdefs.h.  */
32276
32277 #include <time.h> /* for time_t */
32278 #include <limits.h> /* for CHAR_BIT, LONG_MIN, LONG_MAX */
32279 #define TYPE_MINIMUM(t) \
32280   ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
32281 #define TYPE_MAXIMUM(t) \
32282   ((t) ((t) 0 < (t) -1 \
32283         ? (t) -1 \
32284         : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
32285 typedef int verify_min[2 * (LONG_MIN <= TYPE_MINIMUM (time_t)) - 1];
32286 typedef int verify_max[2 * (TYPE_MAXIMUM (time_t) <= LONG_MAX) - 1];
32287
32288 _ACEOF
32289 if ac_fn_c_try_compile "$LINENO"; then :
32290
32291 $as_echo "#define TIME_T_FITS_IN_LONG_INT 1" >>confdefs.h
32292
32293
32294 fi
32295 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32296
32297
32298
32299   :
32300
32301
32302
32303
32304
32305
32306
32307
32308
32309
32310
32311           if test "$ERRNO_H:$REPLACE_STRERROR_0" != :0; then
32312             REPLACE_PERROR=1
32313   fi
32314   case ${gl_cv_func_strerror_r_works-unset} in
32315     unset|*yes)
32316       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether perror matches strerror" >&5
32317 $as_echo_n "checking whether perror matches strerror... " >&6; }
32318 if ${gl_cv_func_perror_works+:} false; then :
32319   $as_echo_n "(cached) " >&6
32320 else
32321   if test "$cross_compiling" = yes; then :
32322               gl_cv_func_perror_works="guessing no"
32323
32324 else
32325   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32326 /* end confdefs.h.  */
32327 #include <errno.h>
32328                 #include <stdio.h>
32329                 #include <stdlib.h>
32330                 #include <string.h>
32331
32332 int
32333 main ()
32334 {
32335 char *str = strerror (-1);
32336                 if (!getenv("CONFTEST_OUTPUT")) return 0;
32337                 if (!str) str = "";
32338                 puts (str);
32339                 errno = -1;
32340                 perror ("");
32341                 return 0;
32342
32343   ;
32344   return 0;
32345 }
32346 _ACEOF
32347 if ac_fn_c_try_run "$LINENO"; then :
32348   if CONFTEST_OUTPUT=1 ./conftest$EXEEXT >conftest.txt1 2>conftest.txt2 \
32349                && cmp conftest.txt1 conftest.txt2 >/dev/null; then
32350               gl_cv_func_perror_works=yes
32351             else
32352               gl_cv_func_perror_works=no
32353             fi
32354             rm -rf conftest.txt1 conftest.txt2
32355 else
32356   gl_cv_func_perror_works=no
32357 fi
32358 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32359   conftest.$ac_objext conftest.beam conftest.$ac_ext
32360 fi
32361
32362
32363 fi
32364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_perror_works" >&5
32365 $as_echo "$gl_cv_func_perror_works" >&6; }
32366       if test "$gl_cv_func_perror_works" != yes; then
32367         REPLACE_PERROR=1
32368       fi
32369       ;;
32370     *)
32371                   REPLACE_PERROR=1
32372       ;;
32373   esac
32374
32375   if test $REPLACE_PERROR = 1; then
32376
32377
32378
32379
32380
32381
32382
32383
32384   gl_LIBOBJS="$gl_LIBOBJS perror.$ac_objext"
32385
32386   fi
32387
32388
32389
32390
32391
32392           GNULIB_PERROR=1
32393
32394
32395
32396
32397
32398 $as_echo "#define GNULIB_TEST_PERROR 1" >>confdefs.h
32399
32400
32401
32402   ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
32403 "
32404 if test "x$ac_cv_have_decl_program_invocation_name" = xyes; then :
32405   ac_have_decl=1
32406 else
32407   ac_have_decl=0
32408 fi
32409
32410 cat >>confdefs.h <<_ACEOF
32411 #define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl
32412 _ACEOF
32413
32414   ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
32415 "
32416 if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes; then :
32417   ac_have_decl=1
32418 else
32419   ac_have_decl=0
32420 fi
32421
32422 cat >>confdefs.h <<_ACEOF
32423 #define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl
32424 _ACEOF
32425
32426
32427       :
32428
32429
32430   :
32431
32432
32433
32434
32435   if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
32436     REPLACE_READ=1
32437   fi
32438
32439
32440   if test $REPLACE_READ = 1; then
32441
32442
32443
32444
32445
32446
32447
32448
32449   gl_LIBOBJS="$gl_LIBOBJS read.$ac_objext"
32450
32451     :
32452   fi
32453
32454
32455
32456
32457
32458           GNULIB_READ=1
32459
32460
32461
32462
32463
32464 $as_echo "#define GNULIB_TEST_READ 1" >>confdefs.h
32465
32466
32467
32468
32469
32470
32471   for ac_func in readdir
32472 do :
32473   ac_fn_c_check_func "$LINENO" "readdir" "ac_cv_func_readdir"
32474 if test "x$ac_cv_func_readdir" = xyes; then :
32475   cat >>confdefs.h <<_ACEOF
32476 #define HAVE_READDIR 1
32477 _ACEOF
32478
32479 fi
32480 done
32481
32482   if test $ac_cv_func_readdir = no; then
32483     HAVE_READDIR=0
32484   fi
32485
32486   if test $HAVE_READDIR = 0; then
32487
32488
32489
32490
32491
32492
32493
32494
32495   gl_LIBOBJS="$gl_LIBOBJS readdir.$ac_objext"
32496
32497   fi
32498
32499
32500
32501
32502
32503           GNULIB_READDIR=1
32504
32505
32506
32507
32508
32509 $as_echo "#define GNULIB_TEST_READDIR 1" >>confdefs.h
32510
32511
32512
32513
32514
32515
32516   :
32517
32518
32519
32520
32521
32522   if test $ac_cv_func_readlink = no; then
32523     HAVE_READLINK=0
32524   else
32525     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
32526 $as_echo_n "checking whether readlink signature is correct... " >&6; }
32527 if ${gl_cv_decl_readlink_works+:} false; then :
32528   $as_echo_n "(cached) " >&6
32529 else
32530   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32531 /* end confdefs.h.  */
32532 #include <unistd.h>
32533       /* Cause compilation failure if original declaration has wrong type.  */
32534       ssize_t readlink (const char *, char *, size_t);
32535 int
32536 main ()
32537 {
32538
32539   ;
32540   return 0;
32541 }
32542 _ACEOF
32543 if ac_fn_c_try_compile "$LINENO"; then :
32544   gl_cv_decl_readlink_works=yes
32545 else
32546   gl_cv_decl_readlink_works=no
32547 fi
32548 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32549 fi
32550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
32551 $as_echo "$gl_cv_decl_readlink_works" >&6; }
32552             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
32553 $as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; }
32554 if ${gl_cv_func_readlink_works+:} false; then :
32555   $as_echo_n "(cached) " >&6
32556 else
32557   # We have readlink, so assume ln -s works.
32558        ln -s conftest.no-such conftest.link
32559        ln -s conftest.link conftest.lnk2
32560        if test "$cross_compiling" = yes; then :
32561   case "$host_os" in
32562                     # Guess yes on glibc systems.
32563             *-gnu*) gl_cv_func_readlink_works="guessing yes" ;;
32564                     # If we don't know, assume the worst.
32565             *)      gl_cv_func_readlink_works="guessing no" ;;
32566           esac
32567
32568 else
32569   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32570 /* end confdefs.h.  */
32571 #include <unistd.h>
32572
32573 int
32574 main ()
32575 {
32576 char buf[20];
32577       return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
32578   ;
32579   return 0;
32580 }
32581 _ACEOF
32582 if ac_fn_c_try_run "$LINENO"; then :
32583   gl_cv_func_readlink_works=yes
32584 else
32585   gl_cv_func_readlink_works=no
32586 fi
32587 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32588   conftest.$ac_objext conftest.beam conftest.$ac_ext
32589 fi
32590
32591       rm -f conftest.link conftest.lnk2
32592 fi
32593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5
32594 $as_echo "$gl_cv_func_readlink_works" >&6; }
32595     case "$gl_cv_func_readlink_works" in
32596       *yes)
32597         if test "$gl_cv_decl_readlink_works" != yes; then
32598           REPLACE_READLINK=1
32599         fi
32600         ;;
32601       *)
32602
32603 $as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
32604
32605         REPLACE_READLINK=1
32606         ;;
32607     esac
32608   fi
32609
32610   if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
32611
32612
32613
32614
32615
32616
32617
32618
32619   gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext"
32620
32621
32622   :
32623
32624   fi
32625
32626
32627
32628
32629
32630           GNULIB_READLINK=1
32631
32632
32633
32634
32635
32636 $as_echo "#define GNULIB_TEST_READLINK 1" >>confdefs.h
32637
32638
32639
32640
32641
32642
32643
32644   :
32645
32646
32647
32648
32649
32650   if test $ac_cv_func_readlinkat = no; then
32651     HAVE_READLINKAT=0
32652   fi
32653
32654   if test $HAVE_READLINKAT = 0; then
32655
32656
32657
32658
32659
32660
32661
32662
32663   gl_LIBOBJS="$gl_LIBOBJS readlinkat.$ac_objext"
32664
32665   fi
32666
32667
32668
32669
32670
32671           GNULIB_READLINKAT=1
32672
32673
32674
32675
32676
32677 $as_echo "#define GNULIB_TEST_READLINKAT 1" >>confdefs.h
32678
32679
32680
32681
32682
32683
32684       for ac_header in stdlib.h
32685 do :
32686   ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
32687 if test "x$ac_cv_header_stdlib_h" = xyes; then :
32688   cat >>confdefs.h <<_ACEOF
32689 #define HAVE_STDLIB_H 1
32690 _ACEOF
32691
32692 fi
32693
32694 done
32695
32696   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible realloc" >&5
32697 $as_echo_n "checking for GNU libc compatible realloc... " >&6; }
32698 if ${ac_cv_func_realloc_0_nonnull+:} false; then :
32699   $as_echo_n "(cached) " >&6
32700 else
32701   if test "$cross_compiling" = yes; then :
32702   case "$host_os" in
32703           # Guess yes on platforms where we know the result.
32704           *-gnu* | freebsd* | netbsd* | openbsd* \
32705           | hpux* | solaris* | cygwin* | mingw*)
32706             ac_cv_func_realloc_0_nonnull=yes ;;
32707           # If we don't know, assume the worst.
32708           *) ac_cv_func_realloc_0_nonnull=no ;;
32709         esac
32710
32711 else
32712   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32713 /* end confdefs.h.  */
32714 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
32715             # include <stdlib.h>
32716             #else
32717             char *realloc ();
32718             #endif
32719
32720 int
32721 main ()
32722 {
32723 return ! realloc (0, 0);
32724   ;
32725   return 0;
32726 }
32727
32728 _ACEOF
32729 if ac_fn_c_try_run "$LINENO"; then :
32730   ac_cv_func_realloc_0_nonnull=yes
32731 else
32732   ac_cv_func_realloc_0_nonnull=no
32733 fi
32734 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32735   conftest.$ac_objext conftest.beam conftest.$ac_ext
32736 fi
32737
32738
32739 fi
32740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5
32741 $as_echo "$ac_cv_func_realloc_0_nonnull" >&6; }
32742   if test $ac_cv_func_realloc_0_nonnull = yes; then :
32743
32744 $as_echo "#define HAVE_REALLOC_GNU 1" >>confdefs.h
32745
32746 else
32747   $as_echo "#define HAVE_REALLOC_GNU 0" >>confdefs.h
32748
32749      REPLACE_REALLOC=1
32750
32751 fi
32752
32753
32754   if test $REPLACE_REALLOC = 1; then
32755
32756
32757
32758
32759
32760
32761
32762
32763   gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
32764
32765   fi
32766
32767
32768 cat >>confdefs.h <<_ACEOF
32769 #define GNULIB_REALLOC_GNU 1
32770 _ACEOF
32771
32772
32773
32774
32775
32776   if test $gl_cv_func_malloc_posix = yes; then
32777
32778 $as_echo "#define HAVE_REALLOC_POSIX 1" >>confdefs.h
32779
32780   else
32781     REPLACE_REALLOC=1
32782   fi
32783
32784   if test $REPLACE_REALLOC = 1; then
32785
32786
32787
32788
32789
32790
32791
32792
32793   gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
32794
32795   fi
32796
32797
32798
32799
32800
32801           GNULIB_REALLOC_POSIX=1
32802
32803
32804
32805
32806
32807 $as_echo "#define GNULIB_TEST_REALLOC_POSIX 1" >>confdefs.h
32808
32809
32810
32811
32812
32813 # Check whether --with-included-regex was given.
32814 if test "${with_included_regex+set}" = set; then :
32815   withval=$with_included_regex;
32816 fi
32817
32818
32819   case $with_included_regex in #(
32820   yes|no) ac_use_included_regex=$with_included_regex
32821         ;;
32822   '')
32823     # If the system regex support is good enough that it passes the
32824     # following run test, then default to *not* using the included regex.c.
32825     # If cross compiling, assume the test would fail and use the included
32826     # regex.c.
32827
32828   :
32829
32830
32831
32832
32833
32834
32835   :
32836
32837
32838
32839
32840
32841     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working re_compile_pattern" >&5
32842 $as_echo_n "checking for working re_compile_pattern... " >&6; }
32843 if ${gl_cv_func_re_compile_pattern_working+:} false; then :
32844   $as_echo_n "(cached) " >&6
32845 else
32846   if test "$cross_compiling" = yes; then :
32847          gl_cv_func_re_compile_pattern_working=no
32848 else
32849   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32850 /* end confdefs.h.  */
32851 #include <regex.h>
32852
32853             #include <locale.h>
32854             #include <limits.h>
32855             #include <string.h>
32856
32857             #if defined M_CHECK_ACTION || HAVE_DECL_ALARM
32858             # include <signal.h>
32859             # include <unistd.h>
32860             #endif
32861
32862             #if HAVE_MALLOC_H
32863             # include <malloc.h>
32864             #endif
32865
32866             #ifdef M_CHECK_ACTION
32867             /* Exit with distinguishable exit code.  */
32868             static void sigabrt_no_core (int sig) { raise (SIGTERM); }
32869             #endif
32870
32871 int
32872 main ()
32873 {
32874 int result = 0;
32875             static struct re_pattern_buffer regex;
32876             unsigned char folded_chars[UCHAR_MAX + 1];
32877             int i;
32878             const char *s;
32879             struct re_registers regs;
32880
32881             /* Some builds of glibc go into an infinite loop on this
32882                test.  Use alarm to force death, and mallopt to avoid
32883                malloc recursion in diagnosing the corrupted heap. */
32884 #if HAVE_DECL_ALARM
32885             signal (SIGALRM, SIG_DFL);
32886             alarm (2);
32887 #endif
32888 #ifdef M_CHECK_ACTION
32889             signal (SIGABRT, sigabrt_no_core);
32890             mallopt (M_CHECK_ACTION, 2);
32891 #endif
32892
32893             if (setlocale (LC_ALL, "en_US.UTF-8"))
32894               {
32895                 {
32896                   /* http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html
32897                      This test needs valgrind to catch the bug on Debian
32898                      GNU/Linux 3.1 x86, but it might catch the bug better
32899                      on other platforms and it shouldn't hurt to try the
32900                      test here.  */
32901                   static char const pat[] = "insert into";
32902                   static char const data[] =
32903                     "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK";
32904                   re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE
32905                                  | RE_ICASE);
32906                   memset (&regex, 0, sizeof regex);
32907                   s = re_compile_pattern (pat, sizeof pat - 1, &regex);
32908                   if (s)
32909                     result |= 1;
32910                   else if (re_search (&regex, data, sizeof data - 1,
32911                                       0, sizeof data - 1, &regs)
32912                            != -1)
32913                     result |= 1;
32914                 }
32915
32916                 {
32917                   /* This test is from glibc bug 15078.
32918                      The test case is from Andreas Schwab in
32919                      <http://www.sourceware.org/ml/libc-alpha/2013-01/msg00967.html>.
32920                      */
32921                   static char const pat[] = "[^x]x";
32922                   static char const data[] =
32923                     /* <U1000><U103B><U103D><U1014><U103A><U102F><U1015><U103A> */
32924                     "\xe1\x80\x80"
32925                     "\xe1\x80\xbb"
32926                     "\xe1\x80\xbd"
32927                     "\xe1\x80\x94"
32928                     "\xe1\x80\xba"
32929                     "\xe1\x80\xaf"
32930                     "\xe1\x80\x95"
32931                     "\xe1\x80\xba"
32932                     "x";
32933                   re_set_syntax (0);
32934                   memset (&regex, 0, sizeof regex);
32935                   s = re_compile_pattern (pat, sizeof pat - 1, &regex);
32936                   if (s)
32937                     result |= 1;
32938                   else
32939                     {
32940                       i = re_search (&regex, data, sizeof data - 1,
32941                                      0, sizeof data - 1, 0);
32942                       if (i != 0 && i != 21)
32943                         result |= 1;
32944                     }
32945                 }
32946
32947                 if (! setlocale (LC_ALL, "C"))
32948                   return 1;
32949               }
32950
32951             /* This test is from glibc bug 3957, reported by Andrew Mackey.  */
32952             re_set_syntax (RE_SYNTAX_EGREP | RE_HAT_LISTS_NOT_NEWLINE);
32953             memset (&regex, 0, sizeof regex);
32954             s = re_compile_pattern ("a[^x]b", 6, &regex);
32955             if (s)
32956               result |= 2;
32957             /* This should fail, but succeeds for glibc-2.5.  */
32958             else if (re_search (&regex, "a\nb", 3, 0, 3, &regs) != -1)
32959               result |= 2;
32960
32961             /* This regular expression is from Spencer ere test number 75
32962                in grep-2.3.  */
32963             re_set_syntax (RE_SYNTAX_POSIX_EGREP);
32964             memset (&regex, 0, sizeof regex);
32965             for (i = 0; i <= UCHAR_MAX; i++)
32966               folded_chars[i] = i;
32967             regex.translate = folded_chars;
32968             s = re_compile_pattern ("a[[:]:]]b\n", 11, &regex);
32969             /* This should fail with _Invalid character class name_ error.  */
32970             if (!s)
32971               result |= 4;
32972
32973             /* Ensure that [b-a] is diagnosed as invalid, when
32974                using RE_NO_EMPTY_RANGES. */
32975             re_set_syntax (RE_SYNTAX_POSIX_EGREP | RE_NO_EMPTY_RANGES);
32976             memset (&regex, 0, sizeof regex);
32977             s = re_compile_pattern ("a[b-a]", 6, &regex);
32978             if (s == 0)
32979               result |= 8;
32980
32981             /* This should succeed, but does not for glibc-2.1.3.  */
32982             memset (&regex, 0, sizeof regex);
32983             s = re_compile_pattern ("{1", 2, &regex);
32984             if (s)
32985               result |= 8;
32986
32987             /* The following example is derived from a problem report
32988                against gawk from Jorge Stolfi <stolfi@ic.unicamp.br>.  */
32989             memset (&regex, 0, sizeof regex);
32990             s = re_compile_pattern ("[an\371]*n", 7, &regex);
32991             if (s)
32992               result |= 8;
32993             /* This should match, but does not for glibc-2.2.1.  */
32994             else if (re_match (&regex, "an", 2, 0, &regs) != 2)
32995               result |= 8;
32996
32997             memset (&regex, 0, sizeof regex);
32998             s = re_compile_pattern ("x", 1, &regex);
32999             if (s)
33000               result |= 8;
33001             /* glibc-2.2.93 does not work with a negative RANGE argument.  */
33002             else if (re_search (&regex, "wxy", 3, 2, -2, &regs) != 1)
33003               result |= 8;
33004
33005             /* The version of regex.c in older versions of gnulib
33006                ignored RE_ICASE.  Detect that problem too.  */
33007             re_set_syntax (RE_SYNTAX_EMACS | RE_ICASE);
33008             memset (&regex, 0, sizeof regex);
33009             s = re_compile_pattern ("x", 1, &regex);
33010             if (s)
33011               result |= 16;
33012             else if (re_search (&regex, "WXY", 3, 0, 3, &regs) < 0)
33013               result |= 16;
33014
33015             /* Catch a bug reported by Vin Shelton in
33016                http://lists.gnu.org/archive/html/bug-coreutils/2007-06/msg00089.html
33017                */
33018             re_set_syntax (RE_SYNTAX_POSIX_BASIC
33019                            & ~RE_CONTEXT_INVALID_DUP
33020                            & ~RE_NO_EMPTY_RANGES);
33021             memset (&regex, 0, sizeof regex);
33022             s = re_compile_pattern ("[[:alnum:]_-]\\\\+$", 16, &regex);
33023             if (s)
33024               result |= 32;
33025
33026             /* REG_STARTEND was added to glibc on 2004-01-15.
33027                Reject older versions.  */
33028             if (! REG_STARTEND)
33029               result |= 64;
33030
33031 #if 0
33032             /* It would be nice to reject hosts whose regoff_t values are too
33033                narrow (including glibc on hosts with 64-bit ptrdiff_t and
33034                32-bit int), but we should wait until glibc implements this
33035                feature.  Otherwise, support for equivalence classes and
33036                multibyte collation symbols would always be broken except
33037                when compiling --without-included-regex.   */
33038             if (sizeof (regoff_t) < sizeof (ptrdiff_t)
33039                 || sizeof (regoff_t) < sizeof (ssize_t))
33040               result |= 64;
33041 #endif
33042
33043             return result;
33044
33045   ;
33046   return 0;
33047 }
33048 _ACEOF
33049 if ac_fn_c_try_run "$LINENO"; then :
33050   gl_cv_func_re_compile_pattern_working=yes
33051 else
33052   gl_cv_func_re_compile_pattern_working=no
33053 fi
33054 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33055   conftest.$ac_objext conftest.beam conftest.$ac_ext
33056 fi
33057
33058 fi
33059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_re_compile_pattern_working" >&5
33060 $as_echo "$gl_cv_func_re_compile_pattern_working" >&6; }
33061     case $gl_cv_func_re_compile_pattern_working in #(
33062     yes) ac_use_included_regex=no;; #(
33063     no) ac_use_included_regex=yes;;
33064     esac
33065     ;;
33066   *) as_fn_error $? "Invalid value for --with-included-regex: $with_included_regex" "$LINENO" 5
33067     ;;
33068   esac
33069
33070   if test $ac_use_included_regex = yes; then
33071
33072 $as_echo "#define _REGEX_INCLUDE_LIMITS_H 1" >>confdefs.h
33073
33074
33075 $as_echo "#define _REGEX_LARGE_OFFSETS 1" >>confdefs.h
33076
33077
33078 $as_echo "#define re_syntax_options rpl_re_syntax_options" >>confdefs.h
33079
33080
33081 $as_echo "#define re_set_syntax rpl_re_set_syntax" >>confdefs.h
33082
33083
33084 $as_echo "#define re_compile_pattern rpl_re_compile_pattern" >>confdefs.h
33085
33086
33087 $as_echo "#define re_compile_fastmap rpl_re_compile_fastmap" >>confdefs.h
33088
33089
33090 $as_echo "#define re_search rpl_re_search" >>confdefs.h
33091
33092
33093 $as_echo "#define re_search_2 rpl_re_search_2" >>confdefs.h
33094
33095
33096 $as_echo "#define re_match rpl_re_match" >>confdefs.h
33097
33098
33099 $as_echo "#define re_match_2 rpl_re_match_2" >>confdefs.h
33100
33101
33102 $as_echo "#define re_set_registers rpl_re_set_registers" >>confdefs.h
33103
33104
33105 $as_echo "#define re_comp rpl_re_comp" >>confdefs.h
33106
33107
33108 $as_echo "#define re_exec rpl_re_exec" >>confdefs.h
33109
33110
33111 $as_echo "#define regcomp rpl_regcomp" >>confdefs.h
33112
33113
33114 $as_echo "#define regexec rpl_regexec" >>confdefs.h
33115
33116
33117 $as_echo "#define regerror rpl_regerror" >>confdefs.h
33118
33119
33120 $as_echo "#define regfree rpl_regfree" >>confdefs.h
33121
33122   fi
33123
33124   if test $ac_use_included_regex = yes; then
33125
33126
33127
33128
33129
33130
33131
33132
33133   gl_LIBOBJS="$gl_LIBOBJS regex.$ac_objext"
33134
33135
33136
33137
33138
33139
33140
33141
33142   for ac_header in libintl.h
33143 do :
33144   ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
33145 if test "x$ac_cv_header_libintl_h" = xyes; then :
33146   cat >>confdefs.h <<_ACEOF
33147 #define HAVE_LIBINTL_H 1
33148 _ACEOF
33149
33150 fi
33151
33152 done
33153
33154
33155   :
33156
33157
33158
33159
33160
33161
33162
33163
33164   ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
33165 "
33166 if test "x$ac_cv_have_decl_isblank" = xyes; then :
33167   ac_have_decl=1
33168 else
33169   ac_have_decl=0
33170 fi
33171
33172 cat >>confdefs.h <<_ACEOF
33173 #define HAVE_DECL_ISBLANK $ac_have_decl
33174 _ACEOF
33175
33176
33177   fi
33178
33179
33180
33181   for ac_func in rewinddir
33182 do :
33183   ac_fn_c_check_func "$LINENO" "rewinddir" "ac_cv_func_rewinddir"
33184 if test "x$ac_cv_func_rewinddir" = xyes; then :
33185   cat >>confdefs.h <<_ACEOF
33186 #define HAVE_REWINDDIR 1
33187 _ACEOF
33188
33189 fi
33190 done
33191
33192   if test $ac_cv_func_rewinddir = no; then
33193     HAVE_REWINDDIR=0
33194   fi
33195
33196   if test $HAVE_REWINDDIR = 0; then
33197
33198
33199
33200
33201
33202
33203
33204
33205   gl_LIBOBJS="$gl_LIBOBJS rewinddir.$ac_objext"
33206
33207   fi
33208
33209
33210
33211
33212
33213           GNULIB_REWINDDIR=1
33214
33215
33216
33217
33218
33219 $as_echo "#define GNULIB_TEST_REWINDDIR 1" >>confdefs.h
33220
33221
33222
33223
33224
33225
33226   :
33227
33228
33229
33230
33231
33232   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rmdir works" >&5
33233 $as_echo_n "checking whether rmdir works... " >&6; }
33234 if ${gl_cv_func_rmdir_works+:} false; then :
33235   $as_echo_n "(cached) " >&6
33236 else
33237   mkdir conftest.dir
33238      touch conftest.file
33239      if test "$cross_compiling" = yes; then :
33240   case "$host_os" in
33241                   # Guess yes on glibc systems.
33242           *-gnu*) gl_cv_func_rmdir_works="guessing yes" ;;
33243                   # If we don't know, assume the worst.
33244           *)      gl_cv_func_rmdir_works="guessing no" ;;
33245         esac
33246
33247 else
33248   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33249 /* end confdefs.h.  */
33250 #include <stdio.h>
33251            #include <errno.h>
33252            #if HAVE_UNISTD_H
33253            # include <unistd.h>
33254            #else /* on Windows with MSVC */
33255            # include <direct.h>
33256            #endif
33257
33258 int
33259 main ()
33260 {
33261 int result = 0;
33262       if (!rmdir ("conftest.file/"))
33263         result |= 1;
33264       else if (errno != ENOTDIR)
33265         result |= 2;
33266       if (!rmdir ("conftest.dir/./"))
33267         result |= 4;
33268       return result;
33269
33270   ;
33271   return 0;
33272 }
33273 _ACEOF
33274 if ac_fn_c_try_run "$LINENO"; then :
33275   gl_cv_func_rmdir_works=yes
33276 else
33277   gl_cv_func_rmdir_works=no
33278 fi
33279 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33280   conftest.$ac_objext conftest.beam conftest.$ac_ext
33281 fi
33282
33283      rm -rf conftest.dir conftest.file
33284 fi
33285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rmdir_works" >&5
33286 $as_echo "$gl_cv_func_rmdir_works" >&6; }
33287   case "$gl_cv_func_rmdir_works" in
33288     *yes) ;;
33289     *)
33290       REPLACE_RMDIR=1
33291       ;;
33292   esac
33293
33294   if test $REPLACE_RMDIR = 1; then
33295
33296
33297
33298
33299
33300
33301
33302
33303   gl_LIBOBJS="$gl_LIBOBJS rmdir.$ac_objext"
33304
33305   fi
33306
33307
33308
33309
33310
33311           GNULIB_RMDIR=1
33312
33313
33314
33315
33316
33317 $as_echo "#define GNULIB_TEST_RMDIR 1" >>confdefs.h
33318
33319
33320
33321
33322
33323
33324
33325   for ac_func in rpmatch
33326 do :
33327   ac_fn_c_check_func "$LINENO" "rpmatch" "ac_cv_func_rpmatch"
33328 if test "x$ac_cv_func_rpmatch" = xyes; then :
33329   cat >>confdefs.h <<_ACEOF
33330 #define HAVE_RPMATCH 1
33331 _ACEOF
33332
33333 fi
33334 done
33335
33336   if test $ac_cv_func_rpmatch = no; then
33337     HAVE_RPMATCH=0
33338   fi
33339
33340   if test $HAVE_RPMATCH = 0; then
33341
33342
33343
33344
33345
33346
33347
33348
33349   gl_LIBOBJS="$gl_LIBOBJS rpmatch.$ac_objext"
33350
33351
33352   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and YESEXPR" >&5
33353 $as_echo_n "checking for nl_langinfo and YESEXPR... " >&6; }
33354 if ${gl_cv_langinfo_yesexpr+:} false; then :
33355   $as_echo_n "(cached) " >&6
33356 else
33357   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33358 /* end confdefs.h.  */
33359 #include <langinfo.h>
33360 int
33361 main ()
33362 {
33363 char* cs = nl_langinfo(YESEXPR); return !cs;
33364   ;
33365   return 0;
33366 }
33367 _ACEOF
33368 if ac_fn_c_try_link "$LINENO"; then :
33369   gl_cv_langinfo_yesexpr=yes
33370 else
33371   gl_cv_langinfo_yesexpr=no
33372 fi
33373 rm -f core conftest.err conftest.$ac_objext \
33374     conftest$ac_exeext conftest.$ac_ext
33375
33376 fi
33377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_langinfo_yesexpr" >&5
33378 $as_echo "$gl_cv_langinfo_yesexpr" >&6; }
33379   if test $gl_cv_langinfo_yesexpr = yes; then
33380
33381 $as_echo "#define HAVE_LANGINFO_YESEXPR 1" >>confdefs.h
33382
33383   fi
33384
33385   fi
33386
33387
33388
33389
33390
33391           GNULIB_RPMATCH=1
33392
33393
33394
33395
33396
33397 $as_echo "#define GNULIB_TEST_RPMATCH 1" >>confdefs.h
33398
33399
33400
33401
33402
33403
33404
33405
33406
33407   :
33408
33409
33410
33411
33412
33413
33414
33415
33416   :
33417
33418
33419
33420
33421
33422
33423
33424   :
33425
33426   for ac_header in selinux/flask.h
33427 do :
33428   ac_fn_c_check_header_mongrel "$LINENO" "selinux/flask.h" "ac_cv_header_selinux_flask_h" "$ac_includes_default"
33429 if test "x$ac_cv_header_selinux_flask_h" = xyes; then :
33430   cat >>confdefs.h <<_ACEOF
33431 #define HAVE_SELINUX_FLASK_H 1
33432 _ACEOF
33433
33434 fi
33435
33436 done
33437
33438
33439
33440
33441
33442
33443
33444
33445
33446   gl_LIBOBJS="$gl_LIBOBJS selinux-at.$ac_objext"
33447
33448
33449
33450   if test "$with_selinux" != no; then
33451     for ac_header in selinux/selinux.h
33452 do :
33453   ac_fn_c_check_header_mongrel "$LINENO" "selinux/selinux.h" "ac_cv_header_selinux_selinux_h" "$ac_includes_default"
33454 if test "x$ac_cv_header_selinux_selinux_h" = xyes; then :
33455   cat >>confdefs.h <<_ACEOF
33456 #define HAVE_SELINUX_SELINUX_H 1
33457 _ACEOF
33458
33459 fi
33460
33461 done
33462
33463
33464     if test "$ac_cv_header_selinux_selinux_h" = yes; then
33465       # We do have <selinux/selinux.h>, so do compile getfilecon.c
33466       # and arrange to use its wrappers.
33467
33468
33469
33470
33471
33472
33473   :
33474
33475
33476
33477
33478
33479
33480
33481
33482      if test $gl_cv_have_include_next = yes; then
33483        gl_cv_next_selinux_selinux_h='<'selinux/selinux.h'>'
33484      else
33485        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <selinux/selinux.h>" >&5
33486 $as_echo_n "checking absolute name of <selinux/selinux.h>... " >&6; }
33487 if ${gl_cv_next_selinux_selinux_h+:} false; then :
33488   $as_echo_n "(cached) " >&6
33489 else
33490
33491              if test $ac_cv_header_selinux_selinux_h = yes; then
33492
33493
33494
33495
33496   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33497 /* end confdefs.h.  */
33498 #include <selinux/selinux.h>
33499 _ACEOF
33500                 case "$host_os" in
33501     aix*) gl_absname_cpp="$ac_cpp -C" ;;
33502     *)    gl_absname_cpp="$ac_cpp" ;;
33503   esac
33504
33505   case "$host_os" in
33506     mingw*)
33507                                           gl_dirsep_regex='[/\\]'
33508       ;;
33509     *)
33510       gl_dirsep_regex='\/'
33511       ;;
33512   esac
33513       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
33514   gl_header_literal_regex=`echo 'selinux/selinux.h' \
33515                            | sed -e "$gl_make_literal_regex_sed"`
33516   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
33517       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
33518       s|^/[^/]|//&|
33519       p
33520       q
33521     }'
33522
33523         gl_cv_absolute_selinux_selinux_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
33524   sed -n "$gl_absolute_header_sed"`
33525
33526            gl_header=$gl_cv_absolute_selinux_selinux_h
33527            gl_cv_next_selinux_selinux_h='"'$gl_header'"'
33528           else
33529                gl_cv_next_selinux_selinux_h='<'selinux/selinux.h'>'
33530              fi
33531
33532
33533 fi
33534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_selinux_selinux_h" >&5
33535 $as_echo "$gl_cv_next_selinux_selinux_h" >&6; }
33536      fi
33537      NEXT_SELINUX_SELINUX_H=$gl_cv_next_selinux_selinux_h
33538
33539      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
33540        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
33541        gl_next_as_first_directive='<'selinux/selinux.h'>'
33542      else
33543        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
33544        gl_next_as_first_directive=$gl_cv_next_selinux_selinux_h
33545      fi
33546      NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H=$gl_next_as_first_directive
33547
33548
33549
33550
33551
33552 $as_echo "#define getfilecon rpl_getfilecon" >>confdefs.h
33553
33554
33555 $as_echo "#define lgetfilecon rpl_lgetfilecon" >>confdefs.h
33556
33557
33558 $as_echo "#define fgetfilecon rpl_fgetfilecon" >>confdefs.h
33559
33560     fi
33561
33562     case "$ac_cv_search_setfilecon:$ac_cv_header_selinux_selinux_h" in
33563       no:*) # already warned
33564         ;;
33565       *:no)
33566         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libselinux was found but selinux/selinux.h is missing." >&5
33567 $as_echo "$as_me: WARNING: libselinux was found but selinux/selinux.h is missing." >&2;}
33568         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GNU findutils will be compiled without SELinux support." >&5
33569 $as_echo "$as_me: WARNING: GNU findutils will be compiled without SELinux support." >&2;}
33570     esac
33571   else
33572     # Do as if <selinux/selinux.h> does not exist, even if
33573     # AC_CHECK_HEADERS_ONCE has already determined that it exists.
33574     $as_echo "#define HAVE_SELINUX_SELINUX_H 0" >>confdefs.h
33575
33576   fi
33577
33578
33579
33580   if test "$with_selinux" != no; then
33581     for ac_header in selinux/context.h
33582 do :
33583   ac_fn_c_check_header_mongrel "$LINENO" "selinux/context.h" "ac_cv_header_selinux_context_h" "$ac_includes_default"
33584 if test "x$ac_cv_header_selinux_context_h" = xyes; then :
33585   cat >>confdefs.h <<_ACEOF
33586 #define HAVE_SELINUX_CONTEXT_H 1
33587 _ACEOF
33588  SELINUX_CONTEXT_H=
33589 else
33590   SELINUX_CONTEXT_H=selinux/context.h
33591 fi
33592
33593 done
33594
33595   else
33596     SELINUX_CONTEXT_H=selinux/context.h
33597   fi
33598
33599    if test -n "$SELINUX_CONTEXT_H"; then
33600   GL_GENERATE_SELINUX_CONTEXT_H_TRUE=
33601   GL_GENERATE_SELINUX_CONTEXT_H_FALSE='#'
33602 else
33603   GL_GENERATE_SELINUX_CONTEXT_H_TRUE='#'
33604   GL_GENERATE_SELINUX_CONTEXT_H_FALSE=
33605 fi
33606
33607
33608   if test "$with_selinux" != no && test "$ac_cv_header_selinux_selinux_h" = yes; then
33609
33610
33611
33612
33613
33614
33615
33616
33617   gl_LIBOBJS="$gl_LIBOBJS getfilecon.$ac_objext"
33618
33619   fi
33620
33621
33622      if test $ac_cv_func_setenv = no; then
33623     HAVE_SETENV=0
33624   else
33625     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setenv validates arguments" >&5
33626 $as_echo_n "checking whether setenv validates arguments... " >&6; }
33627 if ${gl_cv_func_setenv_works+:} false; then :
33628   $as_echo_n "(cached) " >&6
33629 else
33630   if test "$cross_compiling" = yes; then :
33631   case "$host_os" in
33632                  # Guess yes on glibc systems.
33633          *-gnu*) gl_cv_func_setenv_works="guessing yes" ;;
33634                  # If we don't know, assume the worst.
33635          *)      gl_cv_func_setenv_works="guessing no" ;;
33636        esac
33637
33638 else
33639   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33640 /* end confdefs.h.  */
33641
33642        #include <stdlib.h>
33643        #include <errno.h>
33644        #include <string.h>
33645
33646 int
33647 main ()
33648 {
33649
33650        int result = 0;
33651        {
33652          if (setenv ("", "", 0) != -1)
33653            result |= 1;
33654          else if (errno != EINVAL)
33655            result |= 2;
33656        }
33657        {
33658          if (setenv ("a", "=", 1) != 0)
33659            result |= 4;
33660          else if (strcmp (getenv ("a"), "=") != 0)
33661            result |= 8;
33662        }
33663        return result;
33664
33665   ;
33666   return 0;
33667 }
33668 _ACEOF
33669 if ac_fn_c_try_run "$LINENO"; then :
33670   gl_cv_func_setenv_works=yes
33671 else
33672   gl_cv_func_setenv_works=no
33673 fi
33674 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33675   conftest.$ac_objext conftest.beam conftest.$ac_ext
33676 fi
33677
33678 fi
33679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setenv_works" >&5
33680 $as_echo "$gl_cv_func_setenv_works" >&6; }
33681     case "$gl_cv_func_setenv_works" in
33682       *yes) ;;
33683       *)
33684         REPLACE_SETENV=1
33685         ;;
33686     esac
33687   fi
33688
33689   if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then
33690
33691
33692
33693
33694
33695
33696
33697
33698   gl_LIBOBJS="$gl_LIBOBJS setenv.$ac_objext"
33699
33700   fi
33701
33702
33703
33704
33705
33706           GNULIB_SETENV=1
33707
33708
33709
33710
33711
33712 $as_echo "#define GNULIB_TEST_SETENV 1" >>confdefs.h
33713
33714
33715
33716
33717   for ac_header in stdint.h
33718 do :
33719   ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
33720 if test "x$ac_cv_header_stdint_h" = xyes; then :
33721   cat >>confdefs.h <<_ACEOF
33722 #define HAVE_STDINT_H 1
33723 _ACEOF
33724
33725 fi
33726
33727 done
33728
33729     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIZE_MAX" >&5
33730 $as_echo_n "checking for SIZE_MAX... " >&6; }
33731 if ${gl_cv_size_max+:} false; then :
33732   $as_echo_n "(cached) " >&6
33733 else
33734
33735     gl_cv_size_max=
33736     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33737 /* end confdefs.h.  */
33738
33739 #include <limits.h>
33740 #if HAVE_STDINT_H
33741 #include <stdint.h>
33742 #endif
33743 #ifdef SIZE_MAX
33744 Found it
33745 #endif
33746
33747 _ACEOF
33748 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
33749   $EGREP "Found it" >/dev/null 2>&1; then :
33750   gl_cv_size_max=yes
33751 fi
33752 rm -f conftest*
33753
33754     if test -z "$gl_cv_size_max"; then
33755                         if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) * CHAR_BIT - 1" "size_t_bits_minus_1"        "#include <stddef.h>
33756 #include <limits.h>"; then :
33757
33758 else
33759   size_t_bits_minus_1=
33760 fi
33761
33762       if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) <= sizeof (unsigned int)" "fits_in_uint"        "#include <stddef.h>"; then :
33763
33764 else
33765   fits_in_uint=
33766 fi
33767
33768       if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then
33769         if test $fits_in_uint = 1; then
33770                               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33771 /* end confdefs.h.  */
33772 #include <stddef.h>
33773                  extern size_t foo;
33774                  extern unsigned long foo;
33775
33776 int
33777 main ()
33778 {
33779
33780   ;
33781   return 0;
33782 }
33783 _ACEOF
33784 if ac_fn_c_try_compile "$LINENO"; then :
33785   fits_in_uint=0
33786 fi
33787 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33788         fi
33789                                 if test $fits_in_uint = 1; then
33790           gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)"
33791         else
33792           gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)"
33793         fi
33794       else
33795                 gl_cv_size_max='((size_t)~(size_t)0)'
33796       fi
33797     fi
33798
33799 fi
33800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_size_max" >&5
33801 $as_echo "$gl_cv_size_max" >&6; }
33802   if test "$gl_cv_size_max" != yes; then
33803
33804 cat >>confdefs.h <<_ACEOF
33805 #define SIZE_MAX $gl_cv_size_max
33806 _ACEOF
33807
33808   fi
33809
33810
33811
33812
33813   gl_cv_func_snprintf_usable=no
33814   for ac_func in snprintf
33815 do :
33816   ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
33817 if test "x$ac_cv_func_snprintf" = xyes; then :
33818   cat >>confdefs.h <<_ACEOF
33819 #define HAVE_SNPRINTF 1
33820 _ACEOF
33821
33822 fi
33823 done
33824
33825   if test $ac_cv_func_snprintf = yes; then
33826
33827
33828
33829   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf respects a size of 1" >&5
33830 $as_echo_n "checking whether snprintf respects a size of 1... " >&6; }
33831 if ${gl_cv_func_snprintf_size1+:} false; then :
33832   $as_echo_n "(cached) " >&6
33833 else
33834
33835       if test "$cross_compiling" = yes; then :
33836   gl_cv_func_snprintf_size1="guessing yes"
33837 else
33838   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33839 /* end confdefs.h.  */
33840
33841 #include <stdio.h>
33842 #if HAVE_SNPRINTF
33843 # define my_snprintf snprintf
33844 #else
33845 # include <stdarg.h>
33846 static int my_snprintf (char *buf, int size, const char *format, ...)
33847 {
33848   va_list args;
33849   int ret;
33850   va_start (args, format);
33851   ret = vsnprintf (buf, size, format, args);
33852   va_end (args);
33853   return ret;
33854 }
33855 #endif
33856 int main()
33857 {
33858   static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
33859   my_snprintf (buf, 1, "%d", 12345);
33860   return buf[1] != 'E';
33861 }
33862 _ACEOF
33863 if ac_fn_c_try_run "$LINENO"; then :
33864   gl_cv_func_snprintf_size1=yes
33865 else
33866   gl_cv_func_snprintf_size1=no
33867 fi
33868 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33869   conftest.$ac_objext conftest.beam conftest.$ac_ext
33870 fi
33871
33872
33873 fi
33874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_size1" >&5
33875 $as_echo "$gl_cv_func_snprintf_size1" >&6; }
33876
33877     case "$gl_cv_func_snprintf_size1" in
33878       *yes)
33879
33880         case "$gl_cv_func_snprintf_retval_c99" in
33881           *yes)
33882
33883
33884      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports POSIX/XSI format strings with positions" >&5
33885 $as_echo_n "checking whether printf supports POSIX/XSI format strings with positions... " >&6; }
33886 if ${gl_cv_func_printf_positions+:} false; then :
33887   $as_echo_n "(cached) " >&6
33888 else
33889
33890       if test "$cross_compiling" = yes; then :
33891
33892          case "$host_os" in
33893            netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*)
33894                          gl_cv_func_printf_positions="guessing no";;
33895            beos*)        gl_cv_func_printf_positions="guessing no";;
33896            mingw* | pw*) gl_cv_func_printf_positions="guessing no";;
33897            *)            gl_cv_func_printf_positions="guessing yes";;
33898          esac
33899
33900 else
33901   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33902 /* end confdefs.h.  */
33903
33904 #include <stdio.h>
33905 #include <string.h>
33906 /* The string "%2$d %1$d", with dollar characters protected from the shell's
33907    dollar expansion (possibly an autoconf bug).  */
33908 static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
33909 static char buf[100];
33910 int main ()
33911 {
33912   sprintf (buf, format, 33, 55);
33913   return (strcmp (buf, "55 33") != 0);
33914 }
33915 _ACEOF
33916 if ac_fn_c_try_run "$LINENO"; then :
33917   gl_cv_func_printf_positions=yes
33918 else
33919   gl_cv_func_printf_positions=no
33920 fi
33921 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33922   conftest.$ac_objext conftest.beam conftest.$ac_ext
33923 fi
33924
33925
33926 fi
33927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_positions" >&5
33928 $as_echo "$gl_cv_func_printf_positions" >&6; }
33929
33930             case "$gl_cv_func_printf_positions" in
33931               *yes)
33932                 gl_cv_func_snprintf_usable=yes
33933                 ;;
33934             esac
33935             ;;
33936         esac
33937         ;;
33938     esac
33939   fi
33940   if test $gl_cv_func_snprintf_usable = no; then
33941
33942
33943
33944
33945
33946
33947
33948
33949
33950
33951   gl_LIBOBJS="$gl_LIBOBJS snprintf.$ac_objext"
33952
33953   if test $ac_cv_func_snprintf = yes; then
33954     REPLACE_SNPRINTF=1
33955   fi
33956   :
33957
33958   fi
33959
33960   :
33961
33962
33963
33964
33965
33966   if test $ac_cv_have_decl_snprintf = no; then
33967     HAVE_DECL_SNPRINTF=0
33968   fi
33969
33970
33971
33972
33973
33974
33975           GNULIB_SNPRINTF=1
33976
33977
33978
33979
33980
33981 $as_echo "#define GNULIB_TEST_SNPRINTF 1" >>confdefs.h
33982
33983
33984
33985
33986
33987 cat >>confdefs.h <<_ACEOF
33988 #define GNULIB_SNPRINTF 1
33989 _ACEOF
33990
33991
33992
33993
33994
33995
33996
33997   :
33998
33999
34000
34001
34002
34003   if test $ac_cv_header_sys_socket_h != yes; then
34004                     for ac_header in winsock2.h
34005 do :
34006   ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
34007 if test "x$ac_cv_header_winsock2_h" = xyes; then :
34008   cat >>confdefs.h <<_ACEOF
34009 #define HAVE_WINSOCK2_H 1
34010 _ACEOF
34011
34012 fi
34013
34014 done
34015
34016   fi
34017   if test "$ac_cv_header_winsock2_h" = yes; then
34018     HAVE_WINSOCK2_H=1
34019     UNISTD_H_HAVE_WINSOCK2_H=1
34020     SYS_IOCTL_H_HAVE_WINSOCK2_H=1
34021   else
34022     HAVE_WINSOCK2_H=0
34023   fi
34024
34025    LIBSOCKET=
34026   if test $HAVE_WINSOCK2_H = 1; then
34027         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we need to call WSAStartup in winsock2.h and -lws2_32" >&5
34028 $as_echo_n "checking if we need to call WSAStartup in winsock2.h and -lws2_32... " >&6; }
34029 if ${gl_cv_func_wsastartup+:} false; then :
34030   $as_echo_n "(cached) " >&6
34031 else
34032
34033       gl_save_LIBS="$LIBS"
34034       LIBS="$LIBS -lws2_32"
34035       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34036 /* end confdefs.h.  */
34037
34038 #ifdef HAVE_WINSOCK2_H
34039 # include <winsock2.h>
34040 #endif
34041 int
34042 main ()
34043 {
34044
34045           WORD wVersionRequested = MAKEWORD(1, 1);
34046           WSADATA wsaData;
34047           int err = WSAStartup(wVersionRequested, &wsaData);
34048           WSACleanup ();
34049   ;
34050   return 0;
34051 }
34052 _ACEOF
34053 if ac_fn_c_try_link "$LINENO"; then :
34054   gl_cv_func_wsastartup=yes
34055 else
34056   gl_cv_func_wsastartup=no
34057 fi
34058 rm -f core conftest.err conftest.$ac_objext \
34059     conftest$ac_exeext conftest.$ac_ext
34060       LIBS="$gl_save_LIBS"
34061
34062 fi
34063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wsastartup" >&5
34064 $as_echo "$gl_cv_func_wsastartup" >&6; }
34065     if test "$gl_cv_func_wsastartup" = "yes"; then
34066
34067 $as_echo "#define WINDOWS_SOCKETS 1" >>confdefs.h
34068
34069       LIBSOCKET='-lws2_32'
34070     fi
34071   else
34072                     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5
34073 $as_echo_n "checking for library containing setsockopt... " >&6; }
34074 if ${gl_cv_lib_socket+:} false; then :
34075   $as_echo_n "(cached) " >&6
34076 else
34077
34078       gl_cv_lib_socket=
34079       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34080 /* end confdefs.h.  */
34081 extern
34082 #ifdef __cplusplus
34083 "C"
34084 #endif
34085 char setsockopt();
34086 int
34087 main ()
34088 {
34089 setsockopt();
34090   ;
34091   return 0;
34092 }
34093 _ACEOF
34094 if ac_fn_c_try_link "$LINENO"; then :
34095
34096 else
34097   gl_save_LIBS="$LIBS"
34098          LIBS="$gl_save_LIBS -lsocket"
34099          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34100 /* end confdefs.h.  */
34101 extern
34102 #ifdef __cplusplus
34103 "C"
34104 #endif
34105 char setsockopt();
34106 int
34107 main ()
34108 {
34109 setsockopt();
34110   ;
34111   return 0;
34112 }
34113 _ACEOF
34114 if ac_fn_c_try_link "$LINENO"; then :
34115   gl_cv_lib_socket="-lsocket"
34116 fi
34117 rm -f core conftest.err conftest.$ac_objext \
34118     conftest$ac_exeext conftest.$ac_ext
34119          if test -z "$gl_cv_lib_socket"; then
34120            LIBS="$gl_save_LIBS -lnetwork"
34121            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34122 /* end confdefs.h.  */
34123 extern
34124 #ifdef __cplusplus
34125 "C"
34126 #endif
34127 char setsockopt();
34128 int
34129 main ()
34130 {
34131 setsockopt();
34132   ;
34133   return 0;
34134 }
34135 _ACEOF
34136 if ac_fn_c_try_link "$LINENO"; then :
34137   gl_cv_lib_socket="-lnetwork"
34138 fi
34139 rm -f core conftest.err conftest.$ac_objext \
34140     conftest$ac_exeext conftest.$ac_ext
34141            if test -z "$gl_cv_lib_socket"; then
34142              LIBS="$gl_save_LIBS -lnet"
34143              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34144 /* end confdefs.h.  */
34145 extern
34146 #ifdef __cplusplus
34147 "C"
34148 #endif
34149 char setsockopt();
34150 int
34151 main ()
34152 {
34153 setsockopt();
34154   ;
34155   return 0;
34156 }
34157 _ACEOF
34158 if ac_fn_c_try_link "$LINENO"; then :
34159   gl_cv_lib_socket="-lnet"
34160 fi
34161 rm -f core conftest.err conftest.$ac_objext \
34162     conftest$ac_exeext conftest.$ac_ext
34163            fi
34164          fi
34165          LIBS="$gl_save_LIBS"
34166
34167 fi
34168 rm -f core conftest.err conftest.$ac_objext \
34169     conftest$ac_exeext conftest.$ac_ext
34170       if test -z "$gl_cv_lib_socket"; then
34171         gl_cv_lib_socket="none needed"
34172       fi
34173
34174 fi
34175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_lib_socket" >&5
34176 $as_echo "$gl_cv_lib_socket" >&6; }
34177     if test "$gl_cv_lib_socket" != "none needed"; then
34178       LIBSOCKET="$gl_cv_lib_socket"
34179     fi
34180   fi
34181
34182
34183
34184
34185
34186
34187   :
34188
34189
34190      ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
34191 /* <sys/types.h> is not needed according to POSIX, but the
34192    <sys/socket.h> in i386-unknown-freebsd4.10 and
34193    powerpc-apple-darwin5.5 required it. */
34194 #include <sys/types.h>
34195 #if HAVE_SYS_SOCKET_H
34196 # include <sys/socket.h>
34197 #elif HAVE_WS2TCPIP_H
34198 # include <ws2tcpip.h>
34199 #endif
34200
34201 "
34202 if test "x$ac_cv_type_socklen_t" = xyes; then :
34203
34204 else
34205   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5
34206 $as_echo_n "checking for socklen_t equivalent... " >&6; }
34207       if ${gl_cv_socklen_t_equiv+:} false; then :
34208   $as_echo_n "(cached) " >&6
34209 else
34210   # Systems have either "struct sockaddr *" or
34211          # "void *" as the second argument to getpeername
34212          gl_cv_socklen_t_equiv=
34213          for arg2 in "struct sockaddr" void; do
34214            for t in int size_t "unsigned int" "long int" "unsigned long int"; do
34215              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34216 /* end confdefs.h.  */
34217 #include <sys/types.h>
34218                    #include <sys/socket.h>
34219
34220                    int getpeername (int, $arg2 *, $t *);
34221 int
34222 main ()
34223 {
34224 $t len;
34225                   getpeername (0, 0, &len);
34226   ;
34227   return 0;
34228 }
34229 _ACEOF
34230 if ac_fn_c_try_compile "$LINENO"; then :
34231   gl_cv_socklen_t_equiv="$t"
34232 fi
34233 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34234              test "$gl_cv_socklen_t_equiv" != "" && break
34235            done
34236            test "$gl_cv_socklen_t_equiv" != "" && break
34237          done
34238
34239 fi
34240
34241       if test "$gl_cv_socklen_t_equiv" = ""; then
34242         as_fn_error $? "Cannot find a type to use in place of socklen_t" "$LINENO" 5
34243       fi
34244       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socklen_t_equiv" >&5
34245 $as_echo "$gl_cv_socklen_t_equiv" >&6; }
34246
34247 cat >>confdefs.h <<_ACEOF
34248 #define socklen_t $gl_cv_socklen_t_equiv
34249 _ACEOF
34250
34251 fi
34252
34253
34254   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
34255 $as_echo_n "checking for ssize_t... " >&6; }
34256 if ${gt_cv_ssize_t+:} false; then :
34257   $as_echo_n "(cached) " >&6
34258 else
34259   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34260 /* end confdefs.h.  */
34261 #include <sys/types.h>
34262 int
34263 main ()
34264 {
34265 int x = sizeof (ssize_t *) + sizeof (ssize_t);
34266             return !x;
34267   ;
34268   return 0;
34269 }
34270 _ACEOF
34271 if ac_fn_c_try_compile "$LINENO"; then :
34272   gt_cv_ssize_t=yes
34273 else
34274   gt_cv_ssize_t=no
34275 fi
34276 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34277 fi
34278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
34279 $as_echo "$gt_cv_ssize_t" >&6; }
34280   if test $gt_cv_ssize_t = no; then
34281
34282 $as_echo "#define ssize_t int" >>confdefs.h
34283
34284   fi
34285
34286
34287
34288
34289   :
34290
34291
34292
34293
34294
34295     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5
34296 $as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; }
34297 if ${gl_cv_func_stat_dir_slash+:} false; then :
34298   $as_echo_n "(cached) " >&6
34299 else
34300   if test "$cross_compiling" = yes; then :
34301   case $host_os in
34302             mingw*) gl_cv_func_stat_dir_slash="guessing no";;
34303             *) gl_cv_func_stat_dir_slash="guessing yes";;
34304           esac
34305 else
34306   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34307 /* end confdefs.h.  */
34308 #include <sys/stat.h>
34309
34310 int
34311 main ()
34312 {
34313 struct stat st; return stat (".", &st) != stat ("./", &st);
34314   ;
34315   return 0;
34316 }
34317 _ACEOF
34318 if ac_fn_c_try_run "$LINENO"; then :
34319   gl_cv_func_stat_dir_slash=yes
34320 else
34321   gl_cv_func_stat_dir_slash=no
34322 fi
34323 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34324   conftest.$ac_objext conftest.beam conftest.$ac_ext
34325 fi
34326
34327 fi
34328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5
34329 $as_echo "$gl_cv_func_stat_dir_slash" >&6; }
34330         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
34331 $as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
34332 if ${gl_cv_func_stat_file_slash+:} false; then :
34333   $as_echo_n "(cached) " >&6
34334 else
34335   touch conftest.tmp
34336        # Assume that if we have lstat, we can also check symlinks.
34337        if test $ac_cv_func_lstat = yes; then
34338          ln -s conftest.tmp conftest.lnk
34339        fi
34340        if test "$cross_compiling" = yes; then :
34341   case "$host_os" in
34342                     # Guess yes on glibc systems.
34343             *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
34344                     # If we don't know, assume the worst.
34345             *)      gl_cv_func_stat_file_slash="guessing no" ;;
34346           esac
34347
34348 else
34349   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34350 /* end confdefs.h.  */
34351 #include <sys/stat.h>
34352
34353 int
34354 main ()
34355 {
34356 int result = 0;
34357       struct stat st;
34358       if (!stat ("conftest.tmp/", &st))
34359         result |= 1;
34360 #if HAVE_LSTAT
34361       if (!stat ("conftest.lnk/", &st))
34362         result |= 2;
34363 #endif
34364       return result;
34365
34366   ;
34367   return 0;
34368 }
34369 _ACEOF
34370 if ac_fn_c_try_run "$LINENO"; then :
34371   gl_cv_func_stat_file_slash=yes
34372 else
34373   gl_cv_func_stat_file_slash=no
34374 fi
34375 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34376   conftest.$ac_objext conftest.beam conftest.$ac_ext
34377 fi
34378
34379        rm -f conftest.tmp conftest.lnk
34380 fi
34381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
34382 $as_echo "$gl_cv_func_stat_file_slash" >&6; }
34383   case $gl_cv_func_stat_dir_slash in
34384     *no) REPLACE_STAT=1
34385
34386 $as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h
34387 ;;
34388   esac
34389   case $gl_cv_func_stat_file_slash in
34390     *no) REPLACE_STAT=1
34391
34392 $as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
34393 ;;
34394   esac
34395
34396   if test $REPLACE_STAT = 1; then
34397
34398
34399
34400
34401
34402
34403
34404
34405   gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
34406
34407     :
34408   fi
34409
34410
34411
34412
34413
34414           GNULIB_STAT=1
34415
34416
34417
34418
34419
34420 $as_echo "#define GNULIB_TEST_STAT 1" >>confdefs.h
34421
34422
34423
34424
34425   # Don't call AC_STRUCT_ST_BLOCKS because it causes bugs.  Details at
34426   # http://lists.gnu.org/archive/html/bug-gnulib/2011-06/msg00051.html
34427
34428   :
34429
34430
34431
34432
34433
34434
34435
34436
34437
34438   :
34439
34440
34441
34442
34443
34444
34445   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>
34446      #include <sys/stat.h>
34447 "
34448 if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes; then :
34449
34450 cat >>confdefs.h <<_ACEOF
34451 #define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1
34452 _ACEOF
34453
34454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
34455 $as_echo_n "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
34456 if ${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+:} false; then :
34457   $as_echo_n "(cached) " >&6
34458 else
34459   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34460 /* end confdefs.h.  */
34461
34462             #include <sys/types.h>
34463             #include <sys/stat.h>
34464             #if HAVE_SYS_TIME_H
34465             # include <sys/time.h>
34466             #endif
34467             #include <time.h>
34468             struct timespec ts;
34469             struct stat st;
34470
34471 int
34472 main ()
34473 {
34474
34475             st.st_atim = ts;
34476
34477   ;
34478   return 0;
34479 }
34480 _ACEOF
34481 if ac_fn_c_try_compile "$LINENO"; then :
34482   ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
34483 else
34484   ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no
34485 fi
34486 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34487 fi
34488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
34489 $as_echo "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
34490      if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
34491
34492 $as_echo "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
34493
34494      fi
34495 else
34496   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>
34497         #include <sys/stat.h>
34498 "
34499 if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = xyes; then :
34500
34501 cat >>confdefs.h <<_ACEOF
34502 #define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1
34503 _ACEOF
34504
34505
34506 else
34507   ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
34508            #include <sys/stat.h>
34509 "
34510 if test "x$ac_cv_member_struct_stat_st_atimensec" = xyes; then :
34511
34512 cat >>confdefs.h <<_ACEOF
34513 #define HAVE_STRUCT_STAT_ST_ATIMENSEC 1
34514 _ACEOF
34515
34516
34517 else
34518   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>
34519               #include <sys/stat.h>
34520 "
34521 if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = xyes; then :
34522
34523 cat >>confdefs.h <<_ACEOF
34524 #define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1
34525 _ACEOF
34526
34527
34528 fi
34529
34530 fi
34531
34532 fi
34533
34534 fi
34535
34536
34537
34538
34539
34540   :
34541
34542
34543
34544
34545
34546   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>
34547      #include <sys/stat.h>
34548 "
34549 if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = xyes; then :
34550
34551 cat >>confdefs.h <<_ACEOF
34552 #define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1
34553 _ACEOF
34554
34555
34556 else
34557   ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h>
34558         #include <sys/stat.h>
34559 "
34560 if test "x$ac_cv_member_struct_stat_st_birthtimensec" = xyes; then :
34561
34562 cat >>confdefs.h <<_ACEOF
34563 #define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1
34564 _ACEOF
34565
34566
34567 else
34568   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>
34569           #include <sys/stat.h>
34570 "
34571 if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = xyes; then :
34572
34573 cat >>confdefs.h <<_ACEOF
34574 #define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1
34575 _ACEOF
34576
34577
34578 fi
34579
34580 fi
34581
34582 fi
34583
34584
34585
34586
34587 cat >>confdefs.h <<_ACEOF
34588 #define GNULIB_STATAT 1
34589 _ACEOF
34590
34591
34592   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stdalign.h" >&5
34593 $as_echo_n "checking for working stdalign.h... " >&6; }
34594 if ${gl_cv_header_working_stdalign_h+:} false; then :
34595   $as_echo_n "(cached) " >&6
34596 else
34597   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34598 /* end confdefs.h.  */
34599 #include <stdalign.h>
34600             #include <stddef.h>
34601
34602             /* Test that alignof yields a result consistent with offsetof.
34603                This catches GCC bug 52023
34604                <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>.  */
34605             #ifdef __cplusplus
34606                template <class t> struct alignof_helper { char a; t b; };
34607             # define ao(type) offsetof (alignof_helper<type>, b)
34608             #else
34609             # define ao(type) offsetof (struct { char a; type b; }, b)
34610             #endif
34611             char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1];
34612             char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1];
34613             char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1];
34614
34615             /* Test _Alignas only on platforms where gnulib can help.  */
34616             #if \
34617                 ((defined __cplusplus && 201103 <= __cplusplus) \
34618                  || __GNUC__ || __IBMC__ || __IBMCPP__ || __ICC \
34619                  || 0x5110 <= __SUNPRO_C || 1300 <= _MSC_VER)
34620               struct alignas_test { char c; char alignas (8) alignas_8; };
34621               char test_alignas[offsetof (struct alignas_test, alignas_8) == 8
34622                                 ? 1 : -1];
34623             #endif
34624
34625 int
34626 main ()
34627 {
34628
34629   ;
34630   return 0;
34631 }
34632 _ACEOF
34633 if ac_fn_c_try_compile "$LINENO"; then :
34634   gl_cv_header_working_stdalign_h=yes
34635 else
34636   gl_cv_header_working_stdalign_h=no
34637 fi
34638 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34639 fi
34640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdalign_h" >&5
34641 $as_echo "$gl_cv_header_working_stdalign_h" >&6; }
34642
34643   if test $gl_cv_header_working_stdalign_h = yes; then
34644     STDALIGN_H=''
34645   else
34646     STDALIGN_H='stdalign.h'
34647   fi
34648
34649
34650    if test -n "$STDALIGN_H"; then
34651   GL_GENERATE_STDALIGN_H_TRUE=
34652   GL_GENERATE_STDALIGN_H_FALSE='#'
34653 else
34654   GL_GENERATE_STDALIGN_H_TRUE='#'
34655   GL_GENERATE_STDALIGN_H_FALSE=
34656 fi
34657
34658
34659
34660   STDARG_H=''
34661   NEXT_STDARG_H='<stdarg.h>'
34662   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5
34663 $as_echo_n "checking for va_copy... " >&6; }
34664   if ${gl_cv_func_va_copy+:} false; then :
34665   $as_echo_n "(cached) " >&6
34666 else
34667
34668     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34669 /* end confdefs.h.  */
34670 #include <stdarg.h>
34671 int
34672 main ()
34673 {
34674
34675 #ifndef va_copy
34676 void (*func) (va_list, va_list) = va_copy;
34677 #endif
34678
34679   ;
34680   return 0;
34681 }
34682 _ACEOF
34683 if ac_fn_c_try_compile "$LINENO"; then :
34684   gl_cv_func_va_copy=yes
34685 else
34686   gl_cv_func_va_copy=no
34687 fi
34688 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34689 fi
34690
34691   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_va_copy" >&5
34692 $as_echo "$gl_cv_func_va_copy" >&6; }
34693   if test $gl_cv_func_va_copy = no; then
34694                                     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34695 /* end confdefs.h.  */
34696 #if defined _AIX && !defined __GNUC__
34697         AIX vaccine
34698        #endif
34699
34700 _ACEOF
34701 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
34702   $EGREP "vaccine" >/dev/null 2>&1; then :
34703   gl_aixcc=yes
34704 else
34705   gl_aixcc=no
34706 fi
34707 rm -f conftest*
34708
34709     if test $gl_aixcc = yes; then
34710             STDARG_H=stdarg.h
34711
34712
34713
34714
34715
34716
34717
34718
34719      if test $gl_cv_have_include_next = yes; then
34720        gl_cv_next_stdarg_h='<'stdarg.h'>'
34721      else
34722        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdarg.h>" >&5
34723 $as_echo_n "checking absolute name of <stdarg.h>... " >&6; }
34724 if ${gl_cv_next_stdarg_h+:} false; then :
34725   $as_echo_n "(cached) " >&6
34726 else
34727
34728
34729
34730   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34731 /* end confdefs.h.  */
34732 #include <stdarg.h>
34733 _ACEOF
34734                 case "$host_os" in
34735     aix*) gl_absname_cpp="$ac_cpp -C" ;;
34736     *)    gl_absname_cpp="$ac_cpp" ;;
34737   esac
34738
34739   case "$host_os" in
34740     mingw*)
34741                                           gl_dirsep_regex='[/\\]'
34742       ;;
34743     *)
34744       gl_dirsep_regex='\/'
34745       ;;
34746   esac
34747       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
34748   gl_header_literal_regex=`echo 'stdarg.h' \
34749                            | sed -e "$gl_make_literal_regex_sed"`
34750   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
34751       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
34752       s|^/[^/]|//&|
34753       p
34754       q
34755     }'
34756
34757         gl_cv_absolute_stdarg_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
34758   sed -n "$gl_absolute_header_sed"`
34759
34760            gl_header=$gl_cv_absolute_stdarg_h
34761            gl_cv_next_stdarg_h='"'$gl_header'"'
34762
34763
34764 fi
34765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdarg_h" >&5
34766 $as_echo "$gl_cv_next_stdarg_h" >&6; }
34767      fi
34768      NEXT_STDARG_H=$gl_cv_next_stdarg_h
34769
34770      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
34771        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
34772        gl_next_as_first_directive='<'stdarg.h'>'
34773      else
34774        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
34775        gl_next_as_first_directive=$gl_cv_next_stdarg_h
34776      fi
34777      NEXT_AS_FIRST_DIRECTIVE_STDARG_H=$gl_next_as_first_directive
34778
34779
34780
34781
34782             if test "$gl_cv_next_stdarg_h" = '""'; then
34783         gl_cv_next_stdarg_h='"///usr/include/stdarg.h"'
34784         NEXT_STDARG_H="$gl_cv_next_stdarg_h"
34785       fi
34786     else
34787
34788   saved_as_echo_n="$as_echo_n"
34789   as_echo_n=':'
34790   if ${gl_cv_func___va_copy+:} false; then :
34791   $as_echo_n "(cached) " >&6
34792 else
34793
34794         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34795 /* end confdefs.h.  */
34796 #include <stdarg.h>
34797 int
34798 main ()
34799 {
34800
34801 #ifndef __va_copy
34802 error, bail out
34803 #endif
34804
34805   ;
34806   return 0;
34807 }
34808 _ACEOF
34809 if ac_fn_c_try_compile "$LINENO"; then :
34810   gl_cv_func___va_copy=yes
34811 else
34812   gl_cv_func___va_copy=no
34813 fi
34814 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34815 fi
34816
34817   as_echo_n="$saved_as_echo_n"
34818
34819       if test $gl_cv_func___va_copy = yes; then
34820
34821 $as_echo "#define va_copy __va_copy" >>confdefs.h
34822
34823       else
34824
34825
34826 $as_echo "#define va_copy gl_va_copy" >>confdefs.h
34827
34828       fi
34829     fi
34830   fi
34831
34832    if test -n "$STDARG_H"; then
34833   GL_GENERATE_STDARG_H_TRUE=
34834   GL_GENERATE_STDARG_H_FALSE='#'
34835 else
34836   GL_GENERATE_STDARG_H_TRUE='#'
34837   GL_GENERATE_STDARG_H_FALSE=
34838 fi
34839
34840
34841
34842
34843
34844
34845   # Define two additional variables used in the Makefile substitution.
34846
34847   if test "$ac_cv_header_stdbool_h" = yes; then
34848     STDBOOL_H=''
34849   else
34850     STDBOOL_H='stdbool.h'
34851   fi
34852
34853    if test -n "$STDBOOL_H"; then
34854   GL_GENERATE_STDBOOL_H_TRUE=
34855   GL_GENERATE_STDBOOL_H_FALSE='#'
34856 else
34857   GL_GENERATE_STDBOOL_H_TRUE='#'
34858   GL_GENERATE_STDBOOL_H_FALSE=
34859 fi
34860
34861
34862   if test "$ac_cv_type__Bool" = yes; then
34863     HAVE__BOOL=1
34864   else
34865     HAVE__BOOL=0
34866   fi
34867
34868
34869
34870
34871
34872   STDDEF_H=
34873   if test $gt_cv_c_wchar_t = no; then
34874     HAVE_WCHAR_T=0
34875     STDDEF_H=stddef.h
34876   fi
34877   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
34878 $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
34879 if ${gl_cv_decl_null_works+:} false; then :
34880   $as_echo_n "(cached) " >&6
34881 else
34882   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34883 /* end confdefs.h.  */
34884 #include <stddef.h>
34885       int test[2 * (sizeof NULL == sizeof (void *)) -1];
34886
34887 int
34888 main ()
34889 {
34890
34891   ;
34892   return 0;
34893 }
34894 _ACEOF
34895 if ac_fn_c_try_compile "$LINENO"; then :
34896   gl_cv_decl_null_works=yes
34897 else
34898   gl_cv_decl_null_works=no
34899 fi
34900 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34901 fi
34902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
34903 $as_echo "$gl_cv_decl_null_works" >&6; }
34904   if test $gl_cv_decl_null_works = no; then
34905     REPLACE_NULL=1
34906     STDDEF_H=stddef.h
34907   fi
34908
34909    if test -n "$STDDEF_H"; then
34910   GL_GENERATE_STDDEF_H_TRUE=
34911   GL_GENERATE_STDDEF_H_FALSE='#'
34912 else
34913   GL_GENERATE_STDDEF_H_TRUE='#'
34914   GL_GENERATE_STDDEF_H_FALSE=
34915 fi
34916
34917   if test -n "$STDDEF_H"; then
34918
34919
34920
34921
34922
34923
34924
34925
34926      if test $gl_cv_have_include_next = yes; then
34927        gl_cv_next_stddef_h='<'stddef.h'>'
34928      else
34929        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
34930 $as_echo_n "checking absolute name of <stddef.h>... " >&6; }
34931 if ${gl_cv_next_stddef_h+:} false; then :
34932   $as_echo_n "(cached) " >&6
34933 else
34934
34935
34936
34937   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34938 /* end confdefs.h.  */
34939 #include <stddef.h>
34940 _ACEOF
34941                 case "$host_os" in
34942     aix*) gl_absname_cpp="$ac_cpp -C" ;;
34943     *)    gl_absname_cpp="$ac_cpp" ;;
34944   esac
34945
34946   case "$host_os" in
34947     mingw*)
34948                                           gl_dirsep_regex='[/\\]'
34949       ;;
34950     *)
34951       gl_dirsep_regex='\/'
34952       ;;
34953   esac
34954       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
34955   gl_header_literal_regex=`echo 'stddef.h' \
34956                            | sed -e "$gl_make_literal_regex_sed"`
34957   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
34958       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
34959       s|^/[^/]|//&|
34960       p
34961       q
34962     }'
34963
34964         gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
34965   sed -n "$gl_absolute_header_sed"`
34966
34967            gl_header=$gl_cv_absolute_stddef_h
34968            gl_cv_next_stddef_h='"'$gl_header'"'
34969
34970
34971 fi
34972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
34973 $as_echo "$gl_cv_next_stddef_h" >&6; }
34974      fi
34975      NEXT_STDDEF_H=$gl_cv_next_stddef_h
34976
34977      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
34978        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
34979        gl_next_as_first_directive='<'stddef.h'>'
34980      else
34981        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
34982        gl_next_as_first_directive=$gl_cv_next_stddef_h
34983      fi
34984      NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
34985
34986
34987
34988
34989   fi
34990
34991
34992
34993
34994
34995
34996
34997
34998
34999
35000
35001
35002      if test $gl_cv_have_include_next = yes; then
35003        gl_cv_next_stdio_h='<'stdio.h'>'
35004      else
35005        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
35006 $as_echo_n "checking absolute name of <stdio.h>... " >&6; }
35007 if ${gl_cv_next_stdio_h+:} false; then :
35008   $as_echo_n "(cached) " >&6
35009 else
35010
35011
35012
35013   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35014 /* end confdefs.h.  */
35015 #include <stdio.h>
35016 _ACEOF
35017                 case "$host_os" in
35018     aix*) gl_absname_cpp="$ac_cpp -C" ;;
35019     *)    gl_absname_cpp="$ac_cpp" ;;
35020   esac
35021
35022   case "$host_os" in
35023     mingw*)
35024                                           gl_dirsep_regex='[/\\]'
35025       ;;
35026     *)
35027       gl_dirsep_regex='\/'
35028       ;;
35029   esac
35030       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
35031   gl_header_literal_regex=`echo 'stdio.h' \
35032                            | sed -e "$gl_make_literal_regex_sed"`
35033   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
35034       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
35035       s|^/[^/]|//&|
35036       p
35037       q
35038     }'
35039
35040         gl_cv_absolute_stdio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
35041   sed -n "$gl_absolute_header_sed"`
35042
35043            gl_header=$gl_cv_absolute_stdio_h
35044            gl_cv_next_stdio_h='"'$gl_header'"'
35045
35046
35047 fi
35048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
35049 $as_echo "$gl_cv_next_stdio_h" >&6; }
35050      fi
35051      NEXT_STDIO_H=$gl_cv_next_stdio_h
35052
35053      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
35054        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
35055        gl_next_as_first_directive='<'stdio.h'>'
35056      else
35057        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
35058        gl_next_as_first_directive=$gl_cv_next_stdio_h
35059      fi
35060      NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
35061
35062
35063
35064
35065
35066       GNULIB_FSCANF=1
35067
35068
35069 cat >>confdefs.h <<_ACEOF
35070 #define GNULIB_FSCANF 1
35071 _ACEOF
35072
35073
35074   GNULIB_SCANF=1
35075
35076
35077 cat >>confdefs.h <<_ACEOF
35078 #define GNULIB_SCANF 1
35079 _ACEOF
35080
35081
35082   GNULIB_FGETC=1
35083   GNULIB_GETC=1
35084   GNULIB_GETCHAR=1
35085   GNULIB_FGETS=1
35086   GNULIB_FREAD=1
35087
35088
35089       GNULIB_FPRINTF=1
35090   GNULIB_PRINTF=1
35091   GNULIB_VFPRINTF=1
35092   GNULIB_VPRINTF=1
35093   GNULIB_FPUTC=1
35094   GNULIB_PUTC=1
35095   GNULIB_PUTCHAR=1
35096   GNULIB_FPUTS=1
35097   GNULIB_PUTS=1
35098   GNULIB_FWRITE=1
35099
35100
35101
35102
35103     for gl_func in dprintf fpurge fseeko ftello getdelim getline gets pclose popen     renameat snprintf tmpfile vdprintf vsnprintf; do
35104     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
35105     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
35106 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
35107 if eval \${$as_gl_Symbol+:} false; then :
35108   $as_echo_n "(cached) " >&6
35109 else
35110   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35111 /* end confdefs.h.  */
35112 #include <stdio.h>
35113
35114 int
35115 main ()
35116 {
35117 #undef $gl_func
35118   (void) $gl_func;
35119   ;
35120   return 0;
35121 }
35122 _ACEOF
35123 if ac_fn_c_try_compile "$LINENO"; then :
35124   eval "$as_gl_Symbol=yes"
35125 else
35126   eval "$as_gl_Symbol=no"
35127 fi
35128 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35129 fi
35130 eval ac_res=\$$as_gl_Symbol
35131                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
35132 $as_echo "$ac_res" >&6; }
35133     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
35134   cat >>confdefs.h <<_ACEOF
35135 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
35136 _ACEOF
35137
35138                      eval ac_cv_have_decl_$gl_func=yes
35139 fi
35140       done
35141
35142
35143
35144
35145
35146
35147
35148
35149
35150
35151
35152
35153      if test $gl_cv_have_include_next = yes; then
35154        gl_cv_next_stdlib_h='<'stdlib.h'>'
35155      else
35156        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
35157 $as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
35158 if ${gl_cv_next_stdlib_h+:} false; then :
35159   $as_echo_n "(cached) " >&6
35160 else
35161
35162
35163
35164   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35165 /* end confdefs.h.  */
35166 #include <stdlib.h>
35167 _ACEOF
35168                 case "$host_os" in
35169     aix*) gl_absname_cpp="$ac_cpp -C" ;;
35170     *)    gl_absname_cpp="$ac_cpp" ;;
35171   esac
35172
35173   case "$host_os" in
35174     mingw*)
35175                                           gl_dirsep_regex='[/\\]'
35176       ;;
35177     *)
35178       gl_dirsep_regex='\/'
35179       ;;
35180   esac
35181       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
35182   gl_header_literal_regex=`echo 'stdlib.h' \
35183                            | sed -e "$gl_make_literal_regex_sed"`
35184   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
35185       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
35186       s|^/[^/]|//&|
35187       p
35188       q
35189     }'
35190
35191         gl_cv_absolute_stdlib_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
35192   sed -n "$gl_absolute_header_sed"`
35193
35194            gl_header=$gl_cv_absolute_stdlib_h
35195            gl_cv_next_stdlib_h='"'$gl_header'"'
35196
35197
35198 fi
35199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
35200 $as_echo "$gl_cv_next_stdlib_h" >&6; }
35201      fi
35202      NEXT_STDLIB_H=$gl_cv_next_stdlib_h
35203
35204      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
35205        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
35206        gl_next_as_first_directive='<'stdlib.h'>'
35207      else
35208        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
35209        gl_next_as_first_directive=$gl_cv_next_stdlib_h
35210      fi
35211      NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
35212
35213
35214
35215
35216
35217
35218     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
35219     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
35220     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
35221 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
35222 if eval \${$as_gl_Symbol+:} false; then :
35223   $as_echo_n "(cached) " >&6
35224 else
35225   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35226 /* end confdefs.h.  */
35227 #include <stdlib.h>
35228 #if HAVE_SYS_LOADAVG_H
35229 # include <sys/loadavg.h>
35230 #endif
35231 #if HAVE_RANDOM_H
35232 # include <random.h>
35233 #endif
35234
35235 int
35236 main ()
35237 {
35238 #undef $gl_func
35239   (void) $gl_func;
35240   ;
35241   return 0;
35242 }
35243 _ACEOF
35244 if ac_fn_c_try_compile "$LINENO"; then :
35245   eval "$as_gl_Symbol=yes"
35246 else
35247   eval "$as_gl_Symbol=no"
35248 fi
35249 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35250 fi
35251 eval ac_res=\$$as_gl_Symbol
35252                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
35253 $as_echo "$ac_res" >&6; }
35254     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
35255   cat >>confdefs.h <<_ACEOF
35256 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
35257 _ACEOF
35258
35259                      eval ac_cv_have_decl_$gl_func=yes
35260 fi
35261       done
35262
35263
35264
35265
35266
35267
35268
35269
35270   for ac_func in stpcpy
35271 do :
35272   ac_fn_c_check_func "$LINENO" "stpcpy" "ac_cv_func_stpcpy"
35273 if test "x$ac_cv_func_stpcpy" = xyes; then :
35274   cat >>confdefs.h <<_ACEOF
35275 #define HAVE_STPCPY 1
35276 _ACEOF
35277
35278 fi
35279 done
35280
35281   if test $ac_cv_func_stpcpy = no; then
35282     HAVE_STPCPY=0
35283   fi
35284
35285   if test $HAVE_STPCPY = 0; then
35286
35287
35288
35289
35290
35291
35292
35293
35294   gl_LIBOBJS="$gl_LIBOBJS stpcpy.$ac_objext"
35295
35296
35297   :
35298
35299   fi
35300
35301
35302
35303
35304
35305           GNULIB_STPCPY=1
35306
35307
35308
35309
35310
35311 $as_echo "#define GNULIB_TEST_STPCPY 1" >>confdefs.h
35312
35313
35314
35315
35316
35317
35318   for ac_func in strcasecmp
35319 do :
35320   ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp"
35321 if test "x$ac_cv_func_strcasecmp" = xyes; then :
35322   cat >>confdefs.h <<_ACEOF
35323 #define HAVE_STRCASECMP 1
35324 _ACEOF
35325
35326 fi
35327 done
35328
35329   if test $ac_cv_func_strcasecmp = no; then
35330     HAVE_STRCASECMP=0
35331   fi
35332
35333
35334
35335   for ac_func in strncasecmp
35336 do :
35337   ac_fn_c_check_func "$LINENO" "strncasecmp" "ac_cv_func_strncasecmp"
35338 if test "x$ac_cv_func_strncasecmp" = xyes; then :
35339   cat >>confdefs.h <<_ACEOF
35340 #define HAVE_STRNCASECMP 1
35341 _ACEOF
35342
35343 fi
35344 done
35345
35346   if test $ac_cv_func_strncasecmp = yes; then
35347     HAVE_STRNCASECMP=1
35348   else
35349     HAVE_STRNCASECMP=0
35350   fi
35351   ac_fn_c_check_decl "$LINENO" "strncasecmp" "ac_cv_have_decl_strncasecmp" "$ac_includes_default"
35352 if test "x$ac_cv_have_decl_strncasecmp" = xyes; then :
35353   ac_have_decl=1
35354 else
35355   ac_have_decl=0
35356 fi
35357
35358 cat >>confdefs.h <<_ACEOF
35359 #define HAVE_DECL_STRNCASECMP $ac_have_decl
35360 _ACEOF
35361
35362   if test $ac_cv_have_decl_strncasecmp = no; then
35363     HAVE_DECL_STRNCASECMP=0
35364   fi
35365
35366
35367   if test $HAVE_STRCASECMP = 0; then
35368
35369
35370
35371
35372
35373
35374
35375
35376   gl_LIBOBJS="$gl_LIBOBJS strcasecmp.$ac_objext"
35377
35378
35379   :
35380
35381   fi
35382   if test $HAVE_STRNCASECMP = 0; then
35383
35384
35385
35386
35387
35388
35389
35390
35391   gl_LIBOBJS="$gl_LIBOBJS strncasecmp.$ac_objext"
35392
35393
35394   :
35395
35396   fi
35397
35398
35399   if test $HAVE_STRCASESTR = 1 && test $REPLACE_STRCASESTR = 0; then
35400     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strcasestr works in linear time" >&5
35401 $as_echo_n "checking whether strcasestr works in linear time... " >&6; }
35402 if ${gl_cv_func_strcasestr_linear+:} false; then :
35403   $as_echo_n "(cached) " >&6
35404 else
35405   if test "$cross_compiling" = yes; then :
35406                     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35407 /* end confdefs.h.  */
35408
35409 #include <features.h>
35410 #ifdef __GNU_LIBRARY__
35411  #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
35412      && !defined __UCLIBC__
35413   Lucky user
35414  #endif
35415 #endif
35416 #ifdef __CYGWIN__
35417  #include <cygwin/version.h>
35418  #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
35419   Lucky user
35420  #endif
35421 #endif
35422
35423 _ACEOF
35424 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
35425   $EGREP "Lucky user" >/dev/null 2>&1; then :
35426   gl_cv_func_strcasestr_linear="guessing yes"
35427 else
35428   gl_cv_func_strcasestr_linear="guessing no"
35429 fi
35430 rm -f conftest*
35431
35432
35433 else
35434   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35435 /* end confdefs.h.  */
35436
35437 #include <signal.h> /* for signal */
35438 #include <string.h> /* for strcasestr */
35439 #include <stdlib.h> /* for malloc */
35440 #include <unistd.h> /* for alarm */
35441 static void quit (int sig) { exit (sig + 128); }
35442
35443 int
35444 main ()
35445 {
35446
35447     int result = 0;
35448     size_t m = 1000000;
35449     char *haystack = (char *) malloc (2 * m + 2);
35450     char *needle = (char *) malloc (m + 2);
35451     /* Failure to compile this test due to missing alarm is okay,
35452        since all such platforms (mingw) also lack strcasestr.  */
35453     signal (SIGALRM, quit);
35454     alarm (5);
35455     /* Check for quadratic performance.  */
35456     if (haystack && needle)
35457       {
35458         memset (haystack, 'A', 2 * m);
35459         haystack[2 * m] = 'B';
35460         haystack[2 * m + 1] = 0;
35461         memset (needle, 'A', m);
35462         needle[m] = 'B';
35463         needle[m + 1] = 0;
35464         if (!strcasestr (haystack, needle))
35465           result |= 1;
35466       }
35467     return result;
35468
35469   ;
35470   return 0;
35471 }
35472 _ACEOF
35473 if ac_fn_c_try_run "$LINENO"; then :
35474   gl_cv_func_strcasestr_linear=yes
35475 else
35476   gl_cv_func_strcasestr_linear=no
35477 fi
35478 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35479   conftest.$ac_objext conftest.beam conftest.$ac_ext
35480 fi
35481
35482
35483 fi
35484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strcasestr_linear" >&5
35485 $as_echo "$gl_cv_func_strcasestr_linear" >&6; }
35486     case "$gl_cv_func_strcasestr_linear" in
35487       *yes) ;;
35488       *)
35489         REPLACE_STRCASESTR=1
35490         ;;
35491     esac
35492   fi
35493
35494   if test $HAVE_STRCASESTR = 0 || test $REPLACE_STRCASESTR = 1; then
35495
35496
35497
35498
35499
35500
35501
35502
35503   gl_LIBOBJS="$gl_LIBOBJS strcasestr.$ac_objext"
35504
35505
35506   :
35507
35508   fi
35509
35510
35511
35512
35513
35514
35515   for ac_func in strcasestr
35516 do :
35517   ac_fn_c_check_func "$LINENO" "strcasestr" "ac_cv_func_strcasestr"
35518 if test "x$ac_cv_func_strcasestr" = xyes; then :
35519   cat >>confdefs.h <<_ACEOF
35520 #define HAVE_STRCASESTR 1
35521 _ACEOF
35522
35523 fi
35524 done
35525
35526   if test $ac_cv_func_strcasestr = no; then
35527     HAVE_STRCASESTR=0
35528   else
35529     if test "$gl_cv_func_memchr_works" != yes; then
35530       REPLACE_STRCASESTR=1
35531     else
35532             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strcasestr works" >&5
35533 $as_echo_n "checking whether strcasestr works... " >&6; }
35534 if ${gl_cv_func_strcasestr_works_always+:} false; then :
35535   $as_echo_n "(cached) " >&6
35536 else
35537   if test "$cross_compiling" = yes; then :
35538                                                          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35539 /* end confdefs.h.  */
35540
35541 #ifdef __GNU_LIBRARY__
35542  #include <features.h>
35543  #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
35544      || defined __UCLIBC__
35545   Lucky user
35546  #endif
35547 #elif defined __CYGWIN__
35548  #include <cygwin/version.h>
35549  #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
35550   Lucky user
35551  #endif
35552 #else
35553   Lucky user
35554 #endif
35555
35556 _ACEOF
35557 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
35558   $EGREP "Lucky user" >/dev/null 2>&1; then :
35559   gl_cv_func_strcasestr_works_always="guessing yes"
35560 else
35561   gl_cv_func_strcasestr_works_always="guessing no"
35562 fi
35563 rm -f conftest*
35564
35565
35566 else
35567   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35568 /* end confdefs.h.  */
35569
35570 #include <string.h> /* for strcasestr */
35571 #define P "_EF_BF_BD"
35572 #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
35573 #define NEEDLE P P P P P
35574
35575 int
35576 main ()
35577 {
35578 return !!strcasestr (HAYSTACK, NEEDLE);
35579
35580   ;
35581   return 0;
35582 }
35583 _ACEOF
35584 if ac_fn_c_try_run "$LINENO"; then :
35585   gl_cv_func_strcasestr_works_always=yes
35586 else
35587   gl_cv_func_strcasestr_works_always=no
35588 fi
35589 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35590   conftest.$ac_objext conftest.beam conftest.$ac_ext
35591 fi
35592
35593
35594 fi
35595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strcasestr_works_always" >&5
35596 $as_echo "$gl_cv_func_strcasestr_works_always" >&6; }
35597       case "$gl_cv_func_strcasestr_works_always" in
35598         *yes) ;;
35599         *)
35600           REPLACE_STRCASESTR=1
35601           ;;
35602       esac
35603     fi
35604   fi
35605
35606   if test $HAVE_STRCASESTR = 0 || test $REPLACE_STRCASESTR = 1; then
35607
35608
35609
35610
35611
35612
35613
35614
35615   gl_LIBOBJS="$gl_LIBOBJS strcasestr.$ac_objext"
35616
35617
35618   :
35619
35620   fi
35621
35622
35623
35624
35625
35626           GNULIB_STRCASESTR=1
35627
35628
35629
35630
35631
35632 $as_echo "#define GNULIB_TEST_STRCASESTR 1" >>confdefs.h
35633
35634
35635
35636
35637
35638
35639
35640   :
35641
35642
35643
35644
35645
35646   if test $ac_cv_func_strdup = yes; then
35647     if test $gl_cv_func_malloc_posix != yes; then
35648       REPLACE_STRDUP=1
35649     fi
35650   fi
35651
35652   :
35653
35654
35655
35656
35657
35658   if test $ac_cv_have_decl_strdup = no; then
35659     HAVE_DECL_STRDUP=0
35660   fi
35661
35662   if test $ac_cv_func_strdup = no || test $REPLACE_STRDUP = 1; then
35663
35664
35665
35666
35667
35668
35669
35670
35671   gl_LIBOBJS="$gl_LIBOBJS strdup.$ac_objext"
35672
35673     :
35674   fi
35675
35676
35677
35678
35679
35680           GNULIB_STRDUP=1
35681
35682
35683
35684
35685
35686 $as_echo "#define GNULIB_TEST_STRDUP 1" >>confdefs.h
35687
35688
35689
35690
35691
35692
35693
35694
35695
35696
35697   if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
35698     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
35699 $as_echo_n "checking for working strerror function... " >&6; }
35700 if ${gl_cv_func_working_strerror+:} false; then :
35701   $as_echo_n "(cached) " >&6
35702 else
35703   if test "$cross_compiling" = yes; then :
35704   case "$host_os" in
35705                    # Guess yes on glibc systems.
35706            *-gnu*) gl_cv_func_working_strerror="guessing yes" ;;
35707                    # If we don't know, assume the worst.
35708            *)      gl_cv_func_working_strerror="guessing no" ;;
35709          esac
35710
35711 else
35712   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35713 /* end confdefs.h.  */
35714 #include <string.h>
35715
35716 int
35717 main ()
35718 {
35719 if (!*strerror (-2)) return 1;
35720   ;
35721   return 0;
35722 }
35723 _ACEOF
35724 if ac_fn_c_try_run "$LINENO"; then :
35725   gl_cv_func_working_strerror=yes
35726 else
35727   gl_cv_func_working_strerror=no
35728 fi
35729 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35730   conftest.$ac_objext conftest.beam conftest.$ac_ext
35731 fi
35732
35733
35734 fi
35735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
35736 $as_echo "$gl_cv_func_working_strerror" >&6; }
35737     case "$gl_cv_func_working_strerror" in
35738       *yes) ;;
35739       *)
35740                         REPLACE_STRERROR=1
35741         ;;
35742     esac
35743
35744                   case "$gl_cv_func_strerror_r_works" in
35745         *no) REPLACE_STRERROR=1 ;;
35746       esac
35747
35748   else
35749             REPLACE_STRERROR=1
35750   fi
35751
35752   if test $REPLACE_STRERROR = 1; then
35753
35754
35755
35756
35757
35758
35759
35760
35761   gl_LIBOBJS="$gl_LIBOBJS strerror.$ac_objext"
35762
35763   fi
35764
35765
35766 cat >>confdefs.h <<_ACEOF
35767 #define GNULIB_STRERROR 1
35768 _ACEOF
35769
35770
35771
35772
35773
35774
35775
35776           GNULIB_STRERROR=1
35777
35778
35779
35780
35781
35782 $as_echo "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
35783
35784
35785
35786
35787
35788   if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
35789
35790
35791
35792
35793
35794
35795
35796
35797   gl_LIBOBJS="$gl_LIBOBJS strerror-override.$ac_objext"
35798
35799
35800
35801
35802
35803   :
35804
35805
35806
35807
35808
35809   if test $ac_cv_header_sys_socket_h != yes; then
35810                     for ac_header in winsock2.h
35811 do :
35812   ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
35813 if test "x$ac_cv_header_winsock2_h" = xyes; then :
35814   cat >>confdefs.h <<_ACEOF
35815 #define HAVE_WINSOCK2_H 1
35816 _ACEOF
35817
35818 fi
35819
35820 done
35821
35822   fi
35823   if test "$ac_cv_header_winsock2_h" = yes; then
35824     HAVE_WINSOCK2_H=1
35825     UNISTD_H_HAVE_WINSOCK2_H=1
35826     SYS_IOCTL_H_HAVE_WINSOCK2_H=1
35827   else
35828     HAVE_WINSOCK2_H=0
35829   fi
35830
35831
35832   fi
35833
35834
35835
35836
35837
35838
35839
35840   :
35841
35842
35843
35844
35845
35846   if test $ac_cv_have_decl_strerror_r = no; then
35847     HAVE_DECL_STRERROR_R=0
35848   fi
35849
35850   if test $ac_cv_func_strerror_r = yes; then
35851     if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
35852       if test $gl_cv_func_strerror_r_posix_signature = yes; then
35853         case "$gl_cv_func_strerror_r_works" in
35854                     *no) REPLACE_STRERROR_R=1 ;;
35855         esac
35856       else
35857                 REPLACE_STRERROR_R=1
35858       fi
35859     else
35860                   REPLACE_STRERROR_R=1
35861     fi
35862   fi
35863
35864   if test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1; then
35865
35866
35867
35868
35869
35870
35871
35872
35873   gl_LIBOBJS="$gl_LIBOBJS strerror_r.$ac_objext"
35874
35875
35876
35877   :
35878
35879
35880
35881
35882
35883
35884   :
35885
35886
35887
35888
35889
35890
35891   :
35892
35893
35894
35895
35896
35897
35898   fi
35899
35900
35901
35902
35903
35904           GNULIB_STRERROR_R=1
35905
35906
35907
35908
35909
35910 $as_echo "#define GNULIB_TEST_STRERROR_R 1" >>confdefs.h
35911
35912
35913
35914
35915
35916  # This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE.
35917
35918
35919
35920
35921
35922   :
35923
35924
35925
35926
35927
35928
35929
35930 $as_echo "#define my_strftime nstrftime" >>confdefs.h
35931
35932
35933
35934
35935
35936
35937
35938
35939
35940
35941
35942
35943
35944
35945   :
35946
35947
35948
35949
35950
35951
35952   :
35953
35954
35955
35956
35957
35958   if test $ac_cv_have_decl_strndup = no; then
35959     HAVE_DECL_STRNDUP=0
35960   fi
35961
35962   if test $ac_cv_func_strndup = yes; then
35963     HAVE_STRNDUP=1
35964     # AIX 4.3.3, AIX 5.1 have a function that fails to add the terminating '\0'.
35965     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strndup" >&5
35966 $as_echo_n "checking for working strndup... " >&6; }
35967 if ${gl_cv_func_strndup_works+:} false; then :
35968   $as_echo_n "(cached) " >&6
35969 else
35970   if test "$cross_compiling" = yes; then :
35971
35972           case $host_os in
35973             aix | aix[3-6]*) gl_cv_func_strndup_works="guessing no";;
35974             *)               gl_cv_func_strndup_works="guessing yes";;
35975           esac
35976
35977 else
35978   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35979 /* end confdefs.h.  */
35980
35981          #include <string.h>
35982                            #include <stdlib.h>
35983 int
35984 main ()
35985 {
35986
35987 #if !HAVE_DECL_STRNDUP
35988   extern
35989   #ifdef __cplusplus
35990   "C"
35991   #endif
35992   char *strndup (const char *, size_t);
35993 #endif
35994   char *s;
35995   s = strndup ("some longer string", 15);
35996   free (s);
35997   s = strndup ("shorter string", 13);
35998   return s[13] != '\0';
35999   ;
36000   return 0;
36001 }
36002 _ACEOF
36003 if ac_fn_c_try_run "$LINENO"; then :
36004   gl_cv_func_strndup_works=yes
36005 else
36006   gl_cv_func_strndup_works=no
36007 fi
36008 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
36009   conftest.$ac_objext conftest.beam conftest.$ac_ext
36010 fi
36011
36012 fi
36013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strndup_works" >&5
36014 $as_echo "$gl_cv_func_strndup_works" >&6; }
36015     case $gl_cv_func_strndup_works in
36016       *no) REPLACE_STRNDUP=1 ;;
36017     esac
36018   else
36019     HAVE_STRNDUP=0
36020   fi
36021
36022   if test $HAVE_STRNDUP = 0 || test $REPLACE_STRNDUP = 1; then
36023
36024
36025
36026
36027
36028
36029
36030
36031   gl_LIBOBJS="$gl_LIBOBJS strndup.$ac_objext"
36032
36033   fi
36034
36035
36036
36037
36038
36039           GNULIB_STRNDUP=1
36040
36041
36042
36043
36044
36045 $as_echo "#define GNULIB_TEST_STRNDUP 1" >>confdefs.h
36046
36047
36048
36049
36050
36051
36052
36053
36054
36055   :
36056
36057
36058
36059
36060
36061   if test $ac_cv_have_decl_strnlen = no; then
36062     HAVE_DECL_STRNLEN=0
36063   else
36064
36065          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strnlen" >&5
36066 $as_echo_n "checking for working strnlen... " >&6; }
36067 if ${ac_cv_func_strnlen_working+:} false; then :
36068   $as_echo_n "(cached) " >&6
36069 else
36070   if test "$cross_compiling" = yes; then :
36071   # Guess no on AIX systems, yes otherwise.
36072                 case "$host_os" in
36073                   aix*) ac_cv_func_strnlen_working=no;;
36074                   *)    ac_cv_func_strnlen_working=yes;;
36075                 esac
36076 else
36077   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36078 /* end confdefs.h.  */
36079 $ac_includes_default
36080 int
36081 main ()
36082 {
36083
36084 #define S "foobar"
36085 #define S_LEN (sizeof S - 1)
36086
36087   /* At least one implementation is buggy: that of AIX 4.3 would
36088      give strnlen (S, 1) == 3.  */
36089
36090   int i;
36091   for (i = 0; i < S_LEN + 1; ++i)
36092     {
36093       int expected = i <= S_LEN ? i : S_LEN;
36094       if (strnlen (S, i) != expected)
36095         return 1;
36096     }
36097   return 0;
36098
36099   ;
36100   return 0;
36101 }
36102 _ACEOF
36103 if ac_fn_c_try_run "$LINENO"; then :
36104   ac_cv_func_strnlen_working=yes
36105 else
36106   ac_cv_func_strnlen_working=no
36107 fi
36108 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
36109   conftest.$ac_objext conftest.beam conftest.$ac_ext
36110 fi
36111
36112 fi
36113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strnlen_working" >&5
36114 $as_echo "$ac_cv_func_strnlen_working" >&6; }
36115 test $ac_cv_func_strnlen_working = no && :
36116
36117
36118     if test $ac_cv_func_strnlen_working = no; then
36119       REPLACE_STRNLEN=1
36120     fi
36121   fi
36122
36123   if test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1; then
36124
36125
36126
36127
36128
36129
36130
36131
36132   gl_LIBOBJS="$gl_LIBOBJS strnlen.$ac_objext"
36133
36134     :
36135   fi
36136
36137
36138
36139
36140
36141           GNULIB_STRNLEN=1
36142
36143
36144
36145
36146
36147 $as_echo "#define GNULIB_TEST_STRNLEN 1" >>confdefs.h
36148
36149
36150
36151
36152
36153   if test $REPLACE_STRSTR = 0; then
36154     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works in linear time" >&5
36155 $as_echo_n "checking whether strstr works in linear time... " >&6; }
36156 if ${gl_cv_func_strstr_linear+:} false; then :
36157   $as_echo_n "(cached) " >&6
36158 else
36159   if test "$cross_compiling" = yes; then :
36160                              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36161 /* end confdefs.h.  */
36162
36163 #include <features.h>
36164 #ifdef __GNU_LIBRARY__
36165  #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
36166      && !(defined __i386__ || defined __x86_64__) \
36167      && !defined __UCLIBC__
36168   Lucky user
36169  #endif
36170 #endif
36171 #ifdef __CYGWIN__
36172  #include <cygwin/version.h>
36173  #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
36174   Lucky user
36175  #endif
36176 #endif
36177
36178 _ACEOF
36179 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
36180   $EGREP "Lucky user" >/dev/null 2>&1; then :
36181   gl_cv_func_strstr_linear="guessing yes"
36182 else
36183   gl_cv_func_strstr_linear="guessing no"
36184 fi
36185 rm -f conftest*
36186
36187
36188 else
36189   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36190 /* end confdefs.h.  */
36191
36192 #include <signal.h> /* for signal */
36193 #include <string.h> /* for strstr */
36194 #include <stdlib.h> /* for malloc */
36195 #include <unistd.h> /* for alarm */
36196 static void quit (int sig) { exit (sig + 128); }
36197
36198 int
36199 main ()
36200 {
36201
36202     int result = 0;
36203     size_t m = 1000000;
36204     char *haystack = (char *) malloc (2 * m + 2);
36205     char *needle = (char *) malloc (m + 2);
36206     /* Failure to compile this test due to missing alarm is okay,
36207        since all such platforms (mingw) also have quadratic strstr.  */
36208     signal (SIGALRM, quit);
36209     alarm (5);
36210     /* Check for quadratic performance.  */
36211     if (haystack && needle)
36212       {
36213         memset (haystack, 'A', 2 * m);
36214         haystack[2 * m] = 'B';
36215         haystack[2 * m + 1] = 0;
36216         memset (needle, 'A', m);
36217         needle[m] = 'B';
36218         needle[m + 1] = 0;
36219         if (!strstr (haystack, needle))
36220           result |= 1;
36221       }
36222     return result;
36223
36224   ;
36225   return 0;
36226 }
36227 _ACEOF
36228 if ac_fn_c_try_run "$LINENO"; then :
36229   gl_cv_func_strstr_linear=yes
36230 else
36231   gl_cv_func_strstr_linear=no
36232 fi
36233 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
36234   conftest.$ac_objext conftest.beam conftest.$ac_ext
36235 fi
36236
36237
36238 fi
36239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_linear" >&5
36240 $as_echo "$gl_cv_func_strstr_linear" >&6; }
36241     case "$gl_cv_func_strstr_linear" in
36242       *yes) ;;
36243       *)
36244         REPLACE_STRSTR=1
36245         ;;
36246     esac
36247   fi
36248
36249   if test $REPLACE_STRSTR = 1; then
36250
36251
36252
36253
36254
36255
36256
36257
36258   gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext"
36259
36260   fi
36261
36262
36263
36264   if test "$gl_cv_func_memchr_works" != yes; then
36265     REPLACE_STRSTR=1
36266   else
36267         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
36268 $as_echo_n "checking whether strstr works... " >&6; }
36269 if ${gl_cv_func_strstr_works_always+:} false; then :
36270   $as_echo_n "(cached) " >&6
36271 else
36272   if test "$cross_compiling" = yes; then :
36273                                                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36274 /* end confdefs.h.  */
36275
36276 #ifdef __GNU_LIBRARY__
36277  #include <features.h>
36278  #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
36279      || defined __UCLIBC__
36280   Lucky user
36281  #endif
36282 #elif defined __CYGWIN__
36283  #include <cygwin/version.h>
36284  #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
36285   Lucky user
36286  #endif
36287 #else
36288   Lucky user
36289 #endif
36290
36291 _ACEOF
36292 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
36293   $EGREP "Lucky user" >/dev/null 2>&1; then :
36294   gl_cv_func_strstr_works_always="guessing yes"
36295 else
36296   gl_cv_func_strstr_works_always="guessing no"
36297 fi
36298 rm -f conftest*
36299
36300
36301 else
36302   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36303 /* end confdefs.h.  */
36304
36305 #include <string.h> /* for strstr */
36306 #define P "_EF_BF_BD"
36307 #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
36308 #define NEEDLE P P P P P
36309
36310 int
36311 main ()
36312 {
36313 return !!strstr (HAYSTACK, NEEDLE);
36314
36315   ;
36316   return 0;
36317 }
36318 _ACEOF
36319 if ac_fn_c_try_run "$LINENO"; then :
36320   gl_cv_func_strstr_works_always=yes
36321 else
36322   gl_cv_func_strstr_works_always=no
36323 fi
36324 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
36325   conftest.$ac_objext conftest.beam conftest.$ac_ext
36326 fi
36327
36328
36329 fi
36330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
36331 $as_echo "$gl_cv_func_strstr_works_always" >&6; }
36332     case "$gl_cv_func_strstr_works_always" in
36333       *yes) ;;
36334       *)
36335         REPLACE_STRSTR=1
36336         ;;
36337     esac
36338   fi
36339
36340   if test $REPLACE_STRSTR = 1; then
36341
36342
36343
36344
36345
36346
36347
36348
36349   gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext"
36350
36351   fi
36352
36353
36354
36355
36356
36357           GNULIB_STRSTR=1
36358
36359
36360
36361
36362
36363 $as_echo "#define GNULIB_TEST_STRSTR 1" >>confdefs.h
36364
36365
36366
36367
36368   for ac_func in strtol
36369 do :
36370   ac_fn_c_check_func "$LINENO" "strtol" "ac_cv_func_strtol"
36371 if test "x$ac_cv_func_strtol" = xyes; then :
36372   cat >>confdefs.h <<_ACEOF
36373 #define HAVE_STRTOL 1
36374 _ACEOF
36375
36376 fi
36377 done
36378
36379
36380   if test $ac_cv_func_strtol = no; then
36381
36382
36383
36384
36385
36386
36387
36388
36389   gl_LIBOBJS="$gl_LIBOBJS strtol.$ac_objext"
36390
36391   fi
36392
36393   for ac_func in strtoul
36394 do :
36395   ac_fn_c_check_func "$LINENO" "strtoul" "ac_cv_func_strtoul"
36396 if test "x$ac_cv_func_strtoul" = xyes; then :
36397   cat >>confdefs.h <<_ACEOF
36398 #define HAVE_STRTOUL 1
36399 _ACEOF
36400
36401 fi
36402 done
36403
36404
36405   if test $ac_cv_func_strtoul = no; then
36406
36407
36408
36409
36410
36411
36412
36413
36414   gl_LIBOBJS="$gl_LIBOBJS strtoul.$ac_objext"
36415
36416   fi
36417
36418
36419
36420   if test "$ac_cv_type_unsigned_long_long_int" = yes; then
36421     for ac_func in strtoull
36422 do :
36423   ac_fn_c_check_func "$LINENO" "strtoull" "ac_cv_func_strtoull"
36424 if test "x$ac_cv_func_strtoull" = xyes; then :
36425   cat >>confdefs.h <<_ACEOF
36426 #define HAVE_STRTOULL 1
36427 _ACEOF
36428
36429 fi
36430 done
36431
36432     if test $ac_cv_func_strtoull = no; then
36433       HAVE_STRTOULL=0
36434     fi
36435   fi
36436
36437   if test $HAVE_STRTOULL = 0; then
36438
36439
36440
36441
36442
36443
36444
36445
36446   gl_LIBOBJS="$gl_LIBOBJS strtoull.$ac_objext"
36447
36448
36449   :
36450
36451   fi
36452
36453
36454
36455
36456
36457           GNULIB_STRTOULL=1
36458
36459
36460
36461
36462
36463 $as_echo "#define GNULIB_TEST_STRTOULL 1" >>confdefs.h
36464
36465
36466
36467
36468
36469
36470
36471   :
36472
36473
36474
36475
36476
36477
36478   :
36479
36480
36481
36482
36483
36484   if test "$ac_cv_have_decl_strtoumax" = yes; then
36485     if test "$ac_cv_func_strtoumax" != yes; then
36486       # HP-UX 11.11 has "#define strtoimax(...) ..." but no function.
36487       REPLACE_STRTOUMAX=1
36488     fi
36489   else
36490     HAVE_DECL_STRTOUMAX=0
36491   fi
36492
36493   if test $HAVE_DECL_STRTOUMAX = 0 || test $REPLACE_STRTOUMAX = 1; then
36494
36495
36496
36497
36498
36499
36500
36501
36502   gl_LIBOBJS="$gl_LIBOBJS strtoumax.$ac_objext"
36503
36504
36505   ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
36506 if test "x$ac_cv_have_decl_strtoull" = xyes; then :
36507   ac_have_decl=1
36508 else
36509   ac_have_decl=0
36510 fi
36511
36512 cat >>confdefs.h <<_ACEOF
36513 #define HAVE_DECL_STRTOULL $ac_have_decl
36514 _ACEOF
36515
36516
36517
36518   fi
36519
36520
36521
36522
36523
36524           GNULIB_STRTOUMAX=1
36525
36526
36527
36528
36529
36530
36531
36532
36533         case "$host_os" in
36534     osf*)
36535
36536 $as_echo "#define _POSIX_PII_SOCKET 1" >>confdefs.h
36537
36538       ;;
36539   esac
36540
36541   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> is self-contained" >&5
36542 $as_echo_n "checking whether <sys/socket.h> is self-contained... " >&6; }
36543 if ${gl_cv_header_sys_socket_h_selfcontained+:} false; then :
36544   $as_echo_n "(cached) " >&6
36545 else
36546
36547       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36548 /* end confdefs.h.  */
36549 #include <sys/socket.h>
36550 int
36551 main ()
36552 {
36553
36554   ;
36555   return 0;
36556 }
36557 _ACEOF
36558 if ac_fn_c_try_compile "$LINENO"; then :
36559   gl_cv_header_sys_socket_h_selfcontained=yes
36560 else
36561   gl_cv_header_sys_socket_h_selfcontained=no
36562 fi
36563 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36564
36565 fi
36566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_selfcontained" >&5
36567 $as_echo "$gl_cv_header_sys_socket_h_selfcontained" >&6; }
36568   if test $gl_cv_header_sys_socket_h_selfcontained = yes; then
36569             for ac_func in shutdown
36570 do :
36571   ac_fn_c_check_func "$LINENO" "shutdown" "ac_cv_func_shutdown"
36572 if test "x$ac_cv_func_shutdown" = xyes; then :
36573   cat >>confdefs.h <<_ACEOF
36574 #define HAVE_SHUTDOWN 1
36575 _ACEOF
36576
36577 fi
36578 done
36579
36580     if test $ac_cv_func_shutdown = yes; then
36581       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> defines the SHUT_* macros" >&5
36582 $as_echo_n "checking whether <sys/socket.h> defines the SHUT_* macros... " >&6; }
36583 if ${gl_cv_header_sys_socket_h_shut+:} false; then :
36584   $as_echo_n "(cached) " >&6
36585 else
36586
36587           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36588 /* end confdefs.h.  */
36589 #include <sys/socket.h>
36590 int
36591 main ()
36592 {
36593 int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR };
36594   ;
36595   return 0;
36596 }
36597 _ACEOF
36598 if ac_fn_c_try_compile "$LINENO"; then :
36599   gl_cv_header_sys_socket_h_shut=yes
36600 else
36601   gl_cv_header_sys_socket_h_shut=no
36602 fi
36603 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36604
36605 fi
36606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_shut" >&5
36607 $as_echo "$gl_cv_header_sys_socket_h_shut" >&6; }
36608       if test $gl_cv_header_sys_socket_h_shut = no; then
36609         SYS_SOCKET_H='sys/socket.h'
36610       fi
36611     fi
36612   fi
36613   # We need to check for ws2tcpip.h now.
36614
36615
36616
36617
36618
36619
36620
36621
36622   :
36623
36624
36625
36626
36627
36628
36629
36630
36631      if test $gl_cv_have_include_next = yes; then
36632        gl_cv_next_sys_socket_h='<'sys/socket.h'>'
36633      else
36634        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/socket.h>" >&5
36635 $as_echo_n "checking absolute name of <sys/socket.h>... " >&6; }
36636 if ${gl_cv_next_sys_socket_h+:} false; then :
36637   $as_echo_n "(cached) " >&6
36638 else
36639
36640              if test $ac_cv_header_sys_socket_h = yes; then
36641
36642
36643
36644
36645   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36646 /* end confdefs.h.  */
36647 #include <sys/socket.h>
36648 _ACEOF
36649                 case "$host_os" in
36650     aix*) gl_absname_cpp="$ac_cpp -C" ;;
36651     *)    gl_absname_cpp="$ac_cpp" ;;
36652   esac
36653
36654   case "$host_os" in
36655     mingw*)
36656                                           gl_dirsep_regex='[/\\]'
36657       ;;
36658     *)
36659       gl_dirsep_regex='\/'
36660       ;;
36661   esac
36662       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
36663   gl_header_literal_regex=`echo 'sys/socket.h' \
36664                            | sed -e "$gl_make_literal_regex_sed"`
36665   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
36666       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
36667       s|^/[^/]|//&|
36668       p
36669       q
36670     }'
36671
36672         gl_cv_absolute_sys_socket_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
36673   sed -n "$gl_absolute_header_sed"`
36674
36675            gl_header=$gl_cv_absolute_sys_socket_h
36676            gl_cv_next_sys_socket_h='"'$gl_header'"'
36677           else
36678                gl_cv_next_sys_socket_h='<'sys/socket.h'>'
36679              fi
36680
36681
36682 fi
36683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_socket_h" >&5
36684 $as_echo "$gl_cv_next_sys_socket_h" >&6; }
36685      fi
36686      NEXT_SYS_SOCKET_H=$gl_cv_next_sys_socket_h
36687
36688      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
36689        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
36690        gl_next_as_first_directive='<'sys/socket.h'>'
36691      else
36692        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
36693        gl_next_as_first_directive=$gl_cv_next_sys_socket_h
36694      fi
36695      NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H=$gl_next_as_first_directive
36696
36697
36698
36699
36700   if test $ac_cv_header_sys_socket_h = yes; then
36701     HAVE_SYS_SOCKET_H=1
36702     HAVE_WS2TCPIP_H=0
36703   else
36704     HAVE_SYS_SOCKET_H=0
36705     if test $ac_cv_header_ws2tcpip_h = yes; then
36706       HAVE_WS2TCPIP_H=1
36707     else
36708       HAVE_WS2TCPIP_H=0
36709     fi
36710   fi
36711
36712
36713
36714   ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "
36715   /* sys/types.h is not needed according to POSIX, but the
36716      sys/socket.h in i386-unknown-freebsd4.10 and
36717      powerpc-apple-darwin5.5 required it. */
36718 #include <sys/types.h>
36719 #ifdef HAVE_SYS_SOCKET_H
36720 #include <sys/socket.h>
36721 #endif
36722 #ifdef HAVE_WS2TCPIP_H
36723 #include <ws2tcpip.h>
36724 #endif
36725
36726 "
36727 if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
36728
36729 cat >>confdefs.h <<_ACEOF
36730 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
36731 _ACEOF
36732
36733
36734 fi
36735 ac_fn_c_check_type "$LINENO" "sa_family_t" "ac_cv_type_sa_family_t" "
36736   /* sys/types.h is not needed according to POSIX, but the
36737      sys/socket.h in i386-unknown-freebsd4.10 and
36738      powerpc-apple-darwin5.5 required it. */
36739 #include <sys/types.h>
36740 #ifdef HAVE_SYS_SOCKET_H
36741 #include <sys/socket.h>
36742 #endif
36743 #ifdef HAVE_WS2TCPIP_H
36744 #include <ws2tcpip.h>
36745 #endif
36746
36747 "
36748 if test "x$ac_cv_type_sa_family_t" = xyes; then :
36749
36750 cat >>confdefs.h <<_ACEOF
36751 #define HAVE_SA_FAMILY_T 1
36752 _ACEOF
36753
36754
36755 fi
36756
36757   if test $ac_cv_type_struct_sockaddr_storage = no; then
36758     HAVE_STRUCT_SOCKADDR_STORAGE=0
36759   fi
36760   if test $ac_cv_type_sa_family_t = no; then
36761     HAVE_SA_FAMILY_T=0
36762   fi
36763   if test $ac_cv_type_struct_sockaddr_storage != no; then
36764     ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
36765        #ifdef HAVE_SYS_SOCKET_H
36766        #include <sys/socket.h>
36767        #endif
36768        #ifdef HAVE_WS2TCPIP_H
36769        #include <ws2tcpip.h>
36770        #endif
36771
36772 "
36773 if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then :
36774
36775 cat >>confdefs.h <<_ACEOF
36776 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
36777 _ACEOF
36778
36779
36780 else
36781   HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=0
36782 fi
36783
36784   fi
36785   if test $HAVE_STRUCT_SOCKADDR_STORAGE = 0 || test $HAVE_SA_FAMILY_T = 0 \
36786      || test $HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = 0; then
36787     SYS_SOCKET_H='sys/socket.h'
36788   fi
36789
36790
36791
36792
36793   :
36794
36795
36796
36797
36798
36799   if test $ac_cv_header_sys_socket_h != yes; then
36800                     for ac_header in winsock2.h
36801 do :
36802   ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
36803 if test "x$ac_cv_header_winsock2_h" = xyes; then :
36804   cat >>confdefs.h <<_ACEOF
36805 #define HAVE_WINSOCK2_H 1
36806 _ACEOF
36807
36808 fi
36809
36810 done
36811
36812   fi
36813   if test "$ac_cv_header_winsock2_h" = yes; then
36814     HAVE_WINSOCK2_H=1
36815     UNISTD_H_HAVE_WINSOCK2_H=1
36816     SYS_IOCTL_H_HAVE_WINSOCK2_H=1
36817   else
36818     HAVE_WINSOCK2_H=0
36819   fi
36820
36821
36822
36823
36824     for gl_func in socket connect accept bind getpeername getsockname getsockopt     listen recv send recvfrom sendto setsockopt shutdown accept4; do
36825     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
36826     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
36827 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
36828 if eval \${$as_gl_Symbol+:} false; then :
36829   $as_echo_n "(cached) " >&6
36830 else
36831   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36832 /* end confdefs.h.  */
36833
36834 /* Some systems require prerequisite headers.  */
36835 #include <sys/types.h>
36836 #include <sys/socket.h>
36837
36838 int
36839 main ()
36840 {
36841 #undef $gl_func
36842   (void) $gl_func;
36843   ;
36844   return 0;
36845 }
36846 _ACEOF
36847 if ac_fn_c_try_compile "$LINENO"; then :
36848   eval "$as_gl_Symbol=yes"
36849 else
36850   eval "$as_gl_Symbol=no"
36851 fi
36852 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36853 fi
36854 eval ac_res=\$$as_gl_Symbol
36855                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
36856 $as_echo "$ac_res" >&6; }
36857     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
36858   cat >>confdefs.h <<_ACEOF
36859 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
36860 _ACEOF
36861
36862                      eval ac_cv_have_decl_$gl_func=yes
36863 fi
36864       done
36865
36866
36867
36868
36869
36870
36871
36872
36873
36874
36875
36876
36877
36878
36879   :
36880
36881
36882
36883
36884
36885
36886
36887
36888      if test $gl_cv_have_include_next = yes; then
36889        gl_cv_next_sys_stat_h='<'sys/stat.h'>'
36890      else
36891        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
36892 $as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
36893 if ${gl_cv_next_sys_stat_h+:} false; then :
36894   $as_echo_n "(cached) " >&6
36895 else
36896
36897              if test $ac_cv_header_sys_stat_h = yes; then
36898
36899
36900
36901
36902   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36903 /* end confdefs.h.  */
36904 #include <sys/stat.h>
36905 _ACEOF
36906                 case "$host_os" in
36907     aix*) gl_absname_cpp="$ac_cpp -C" ;;
36908     *)    gl_absname_cpp="$ac_cpp" ;;
36909   esac
36910
36911   case "$host_os" in
36912     mingw*)
36913                                           gl_dirsep_regex='[/\\]'
36914       ;;
36915     *)
36916       gl_dirsep_regex='\/'
36917       ;;
36918   esac
36919       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
36920   gl_header_literal_regex=`echo 'sys/stat.h' \
36921                            | sed -e "$gl_make_literal_regex_sed"`
36922   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
36923       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
36924       s|^/[^/]|//&|
36925       p
36926       q
36927     }'
36928
36929         gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
36930   sed -n "$gl_absolute_header_sed"`
36931
36932            gl_header=$gl_cv_absolute_sys_stat_h
36933            gl_cv_next_sys_stat_h='"'$gl_header'"'
36934           else
36935                gl_cv_next_sys_stat_h='<'sys/stat.h'>'
36936              fi
36937
36938
36939 fi
36940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
36941 $as_echo "$gl_cv_next_sys_stat_h" >&6; }
36942      fi
36943      NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
36944
36945      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
36946        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
36947        gl_next_as_first_directive='<'sys/stat.h'>'
36948      else
36949        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
36950        gl_next_as_first_directive=$gl_cv_next_sys_stat_h
36951      fi
36952      NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
36953
36954
36955
36956
36957
36958
36959
36960
36961
36962
36963
36964   if test $WINDOWS_64_BIT_ST_SIZE = 1; then
36965
36966 $as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
36967
36968   fi
36969
36970       ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
36971      #include <sys/stat.h>
36972 "
36973 if test "x$ac_cv_type_nlink_t" = xyes; then :
36974
36975 else
36976
36977 $as_echo "#define nlink_t int" >>confdefs.h
36978
36979 fi
36980
36981
36982
36983     for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat     mknod mknodat stat utimensat; do
36984     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
36985     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
36986 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
36987 if eval \${$as_gl_Symbol+:} false; then :
36988   $as_echo_n "(cached) " >&6
36989 else
36990   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36991 /* end confdefs.h.  */
36992 #include <sys/stat.h>
36993
36994 int
36995 main ()
36996 {
36997 #undef $gl_func
36998   (void) $gl_func;
36999   ;
37000   return 0;
37001 }
37002 _ACEOF
37003 if ac_fn_c_try_compile "$LINENO"; then :
37004   eval "$as_gl_Symbol=yes"
37005 else
37006   eval "$as_gl_Symbol=no"
37007 fi
37008 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
37009 fi
37010 eval ac_res=\$$as_gl_Symbol
37011                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
37012 $as_echo "$ac_res" >&6; }
37013     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
37014   cat >>confdefs.h <<_ACEOF
37015 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
37016 _ACEOF
37017
37018                      eval ac_cv_have_decl_$gl_func=yes
37019 fi
37020       done
37021
37022
37023
37024
37025
37026
37027
37028
37029
37030
37031
37032
37033
37034
37035
37036
37037
37038   :
37039
37040
37041
37042
37043
37044
37045
37046
37047      if test $gl_cv_have_include_next = yes; then
37048        gl_cv_next_sys_uio_h='<'sys/uio.h'>'
37049      else
37050        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/uio.h>" >&5
37051 $as_echo_n "checking absolute name of <sys/uio.h>... " >&6; }
37052 if ${gl_cv_next_sys_uio_h+:} false; then :
37053   $as_echo_n "(cached) " >&6
37054 else
37055
37056              if test $ac_cv_header_sys_uio_h = yes; then
37057
37058
37059
37060
37061   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37062 /* end confdefs.h.  */
37063 #include <sys/uio.h>
37064 _ACEOF
37065                 case "$host_os" in
37066     aix*) gl_absname_cpp="$ac_cpp -C" ;;
37067     *)    gl_absname_cpp="$ac_cpp" ;;
37068   esac
37069
37070   case "$host_os" in
37071     mingw*)
37072                                           gl_dirsep_regex='[/\\]'
37073       ;;
37074     *)
37075       gl_dirsep_regex='\/'
37076       ;;
37077   esac
37078       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
37079   gl_header_literal_regex=`echo 'sys/uio.h' \
37080                            | sed -e "$gl_make_literal_regex_sed"`
37081   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
37082       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
37083       s|^/[^/]|//&|
37084       p
37085       q
37086     }'
37087
37088         gl_cv_absolute_sys_uio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
37089   sed -n "$gl_absolute_header_sed"`
37090
37091            gl_header=$gl_cv_absolute_sys_uio_h
37092            gl_cv_next_sys_uio_h='"'$gl_header'"'
37093           else
37094                gl_cv_next_sys_uio_h='<'sys/uio.h'>'
37095              fi
37096
37097
37098 fi
37099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_uio_h" >&5
37100 $as_echo "$gl_cv_next_sys_uio_h" >&6; }
37101      fi
37102      NEXT_SYS_UIO_H=$gl_cv_next_sys_uio_h
37103
37104      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
37105        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
37106        gl_next_as_first_directive='<'sys/uio.h'>'
37107      else
37108        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
37109        gl_next_as_first_directive=$gl_cv_next_sys_uio_h
37110      fi
37111      NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H=$gl_next_as_first_directive
37112
37113
37114
37115
37116   if test $ac_cv_header_sys_uio_h = yes; then
37117     HAVE_SYS_UIO_H=1
37118   else
37119     HAVE_SYS_UIO_H=0
37120   fi
37121
37122
37123
37124
37125
37126
37127
37128
37129
37130
37131
37132
37133   :
37134
37135
37136
37137
37138
37139
37140
37141
37142      if test $gl_cv_have_include_next = yes; then
37143        gl_cv_next_sys_utsname_h='<'sys/utsname.h'>'
37144      else
37145        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/utsname.h>" >&5
37146 $as_echo_n "checking absolute name of <sys/utsname.h>... " >&6; }
37147 if ${gl_cv_next_sys_utsname_h+:} false; then :
37148   $as_echo_n "(cached) " >&6
37149 else
37150
37151              if test $ac_cv_header_sys_utsname_h = yes; then
37152
37153
37154
37155
37156   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37157 /* end confdefs.h.  */
37158 #include <sys/utsname.h>
37159 _ACEOF
37160                 case "$host_os" in
37161     aix*) gl_absname_cpp="$ac_cpp -C" ;;
37162     *)    gl_absname_cpp="$ac_cpp" ;;
37163   esac
37164
37165   case "$host_os" in
37166     mingw*)
37167                                           gl_dirsep_regex='[/\\]'
37168       ;;
37169     *)
37170       gl_dirsep_regex='\/'
37171       ;;
37172   esac
37173       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
37174   gl_header_literal_regex=`echo 'sys/utsname.h' \
37175                            | sed -e "$gl_make_literal_regex_sed"`
37176   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
37177       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
37178       s|^/[^/]|//&|
37179       p
37180       q
37181     }'
37182
37183         gl_cv_absolute_sys_utsname_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
37184   sed -n "$gl_absolute_header_sed"`
37185
37186            gl_header=$gl_cv_absolute_sys_utsname_h
37187            gl_cv_next_sys_utsname_h='"'$gl_header'"'
37188           else
37189                gl_cv_next_sys_utsname_h='<'sys/utsname.h'>'
37190              fi
37191
37192
37193 fi
37194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_utsname_h" >&5
37195 $as_echo "$gl_cv_next_sys_utsname_h" >&6; }
37196      fi
37197      NEXT_SYS_UTSNAME_H=$gl_cv_next_sys_utsname_h
37198
37199      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
37200        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
37201        gl_next_as_first_directive='<'sys/utsname.h'>'
37202      else
37203        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
37204        gl_next_as_first_directive=$gl_cv_next_sys_utsname_h
37205      fi
37206      NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H=$gl_next_as_first_directive
37207
37208
37209
37210
37211   if test $ac_cv_header_sys_utsname_h != yes; then
37212     HAVE_SYS_UTSNAME_H=0
37213     HAVE_STRUCT_UTSNAME=0
37214   else
37215     HAVE_SYS_UTSNAME_H=1
37216     ac_fn_c_check_type "$LINENO" "struct utsname" "ac_cv_type_struct_utsname" "
37217 /* Minix 3.1.8 has a bug: <stddef.h> must be included before
37218    <sys/utsname.h>.  */
37219 #include <stddef.h>
37220 #include <sys/utsname.h>
37221
37222 "
37223 if test "x$ac_cv_type_struct_utsname" = xyes; then :
37224
37225 cat >>confdefs.h <<_ACEOF
37226 #define HAVE_STRUCT_UTSNAME 1
37227 _ACEOF
37228
37229
37230 else
37231   HAVE_STRUCT_UTSNAME=0
37232 fi
37233
37234   fi
37235
37236
37237
37238     for gl_func in uname; do
37239     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
37240     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
37241 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
37242 if eval \${$as_gl_Symbol+:} false; then :
37243   $as_echo_n "(cached) " >&6
37244 else
37245   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37246 /* end confdefs.h.  */
37247
37248     /* Minix 3.1.8 has a bug: <stddef.h> must be included before
37249        <sys/utsname.h>.  */
37250     #include <stddef.h>
37251     #include <sys/utsname.h>
37252
37253 int
37254 main ()
37255 {
37256 #undef $gl_func
37257   (void) $gl_func;
37258   ;
37259   return 0;
37260 }
37261 _ACEOF
37262 if ac_fn_c_try_compile "$LINENO"; then :
37263   eval "$as_gl_Symbol=yes"
37264 else
37265   eval "$as_gl_Symbol=no"
37266 fi
37267 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
37268 fi
37269 eval ac_res=\$$as_gl_Symbol
37270                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
37271 $as_echo "$ac_res" >&6; }
37272     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
37273   cat >>confdefs.h <<_ACEOF
37274 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
37275 _ACEOF
37276
37277                      eval ac_cv_have_decl_$gl_func=yes
37278 fi
37279       done
37280
37281
37282
37283
37284
37285
37286
37287
37288
37289
37290
37291
37292   :
37293
37294
37295
37296
37297
37298
37299
37300
37301      if test $gl_cv_have_include_next = yes; then
37302        gl_cv_next_sys_wait_h='<'sys/wait.h'>'
37303      else
37304        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/wait.h>" >&5
37305 $as_echo_n "checking absolute name of <sys/wait.h>... " >&6; }
37306 if ${gl_cv_next_sys_wait_h+:} false; then :
37307   $as_echo_n "(cached) " >&6
37308 else
37309
37310              if test $ac_cv_header_sys_wait_h = yes; then
37311
37312
37313
37314
37315   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37316 /* end confdefs.h.  */
37317 #include <sys/wait.h>
37318 _ACEOF
37319                 case "$host_os" in
37320     aix*) gl_absname_cpp="$ac_cpp -C" ;;
37321     *)    gl_absname_cpp="$ac_cpp" ;;
37322   esac
37323
37324   case "$host_os" in
37325     mingw*)
37326                                           gl_dirsep_regex='[/\\]'
37327       ;;
37328     *)
37329       gl_dirsep_regex='\/'
37330       ;;
37331   esac
37332       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
37333   gl_header_literal_regex=`echo 'sys/wait.h' \
37334                            | sed -e "$gl_make_literal_regex_sed"`
37335   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
37336       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
37337       s|^/[^/]|//&|
37338       p
37339       q
37340     }'
37341
37342         gl_cv_absolute_sys_wait_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
37343   sed -n "$gl_absolute_header_sed"`
37344
37345            gl_header=$gl_cv_absolute_sys_wait_h
37346            gl_cv_next_sys_wait_h='"'$gl_header'"'
37347           else
37348                gl_cv_next_sys_wait_h='<'sys/wait.h'>'
37349              fi
37350
37351
37352 fi
37353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_wait_h" >&5
37354 $as_echo "$gl_cv_next_sys_wait_h" >&6; }
37355      fi
37356      NEXT_SYS_WAIT_H=$gl_cv_next_sys_wait_h
37357
37358      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
37359        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
37360        gl_next_as_first_directive='<'sys/wait.h'>'
37361      else
37362        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
37363        gl_next_as_first_directive=$gl_cv_next_sys_wait_h
37364      fi
37365      NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H=$gl_next_as_first_directive
37366
37367
37368
37369
37370
37371
37372
37373
37374     for gl_func in waitpid; do
37375     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
37376     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
37377 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
37378 if eval \${$as_gl_Symbol+:} false; then :
37379   $as_echo_n "(cached) " >&6
37380 else
37381   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37382 /* end confdefs.h.  */
37383 #include <sys/wait.h>
37384 int
37385 main ()
37386 {
37387 #undef $gl_func
37388   (void) $gl_func;
37389   ;
37390   return 0;
37391 }
37392 _ACEOF
37393 if ac_fn_c_try_compile "$LINENO"; then :
37394   eval "$as_gl_Symbol=yes"
37395 else
37396   eval "$as_gl_Symbol=no"
37397 fi
37398 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
37399 fi
37400 eval ac_res=\$$as_gl_Symbol
37401                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
37402 $as_echo "$ac_res" >&6; }
37403     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
37404   cat >>confdefs.h <<_ACEOF
37405 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
37406 _ACEOF
37407
37408                      eval ac_cv_have_decl_$gl_func=yes
37409 fi
37410       done
37411
37412
37413
37414
37415
37416
37417
37418
37419
37420
37421
37422
37423
37424
37425
37426
37427       ac_fn_c_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "#include <time.h>
37428 "
37429 if test "x$ac_cv_have_decl_localtime_r" = xyes; then :
37430   ac_have_decl=1
37431 else
37432   ac_have_decl=0
37433 fi
37434
37435 cat >>confdefs.h <<_ACEOF
37436 #define HAVE_DECL_LOCALTIME_R $ac_have_decl
37437 _ACEOF
37438
37439   if test $ac_cv_have_decl_localtime_r = no; then
37440     HAVE_DECL_LOCALTIME_R=0
37441   fi
37442
37443
37444   :
37445
37446
37447
37448
37449
37450   if test $ac_cv_func_localtime_r = yes; then
37451     HAVE_LOCALTIME_R=1
37452     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5
37453 $as_echo_n "checking whether localtime_r is compatible with its POSIX signature... " >&6; }
37454 if ${gl_cv_time_r_posix+:} false; then :
37455   $as_echo_n "(cached) " >&6
37456 else
37457   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37458 /* end confdefs.h.  */
37459 #include <time.h>
37460 int
37461 main ()
37462 {
37463 /* We don't need to append 'restrict's to the argument types,
37464                  even though the POSIX signature has the 'restrict's,
37465                  since C99 says they can't affect type compatibility.  */
37466               struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r;
37467               if (ptr) return 0;
37468               /* Check the return type is a pointer.
37469                  On HP-UX 10 it is 'int'.  */
37470               *localtime_r (0, 0);
37471   ;
37472   return 0;
37473 }
37474
37475 _ACEOF
37476 if ac_fn_c_try_compile "$LINENO"; then :
37477   gl_cv_time_r_posix=yes
37478 else
37479   gl_cv_time_r_posix=no
37480 fi
37481 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
37482
37483 fi
37484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_r_posix" >&5
37485 $as_echo "$gl_cv_time_r_posix" >&6; }
37486     if test $gl_cv_time_r_posix = yes; then
37487       REPLACE_LOCALTIME_R=0
37488     else
37489       REPLACE_LOCALTIME_R=1
37490     fi
37491   else
37492     HAVE_LOCALTIME_R=0
37493   fi
37494
37495   if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
37496
37497
37498
37499
37500
37501
37502
37503
37504   gl_LIBOBJS="$gl_LIBOBJS time_r.$ac_objext"
37505
37506
37507   :
37508
37509   fi
37510
37511
37512
37513
37514
37515           GNULIB_TIME_R=1
37516
37517
37518
37519
37520
37521 $as_echo "#define GNULIB_TEST_TIME_R 1" >>confdefs.h
37522
37523
37524
37525   :
37526
37527
37528
37529
37530     ac_fn_c_check_decl "$LINENO" "trunc" "ac_cv_have_decl_trunc" "#include <math.h>
37531 "
37532 if test "x$ac_cv_have_decl_trunc" = xyes; then :
37533   ac_have_decl=1
37534 else
37535   ac_have_decl=0
37536 fi
37537
37538 cat >>confdefs.h <<_ACEOF
37539 #define HAVE_DECL_TRUNC $ac_have_decl
37540 _ACEOF
37541
37542   if test "$ac_cv_have_decl_trunc" = yes; then
37543         TRUNC_LIBM=?
37544     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37545 /* end confdefs.h.  */
37546 #ifndef __NO_MATH_INLINES
37547            # define __NO_MATH_INLINES 1 /* for glibc */
37548            #endif
37549            #include <math.h>
37550            double x;
37551 int
37552 main ()
37553 {
37554 x = trunc(x);
37555   ;
37556   return 0;
37557 }
37558 _ACEOF
37559 if ac_fn_c_try_link "$LINENO"; then :
37560   TRUNC_LIBM=
37561 fi
37562 rm -f core conftest.err conftest.$ac_objext \
37563     conftest$ac_exeext conftest.$ac_ext
37564     if test "$TRUNC_LIBM" = "?"; then
37565       save_LIBS="$LIBS"
37566       LIBS="$LIBS -lm"
37567       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37568 /* end confdefs.h.  */
37569 #ifndef __NO_MATH_INLINES
37570              # define __NO_MATH_INLINES 1 /* for glibc */
37571              #endif
37572              #include <math.h>
37573              double x;
37574 int
37575 main ()
37576 {
37577 x = trunc(x);
37578   ;
37579   return 0;
37580 }
37581 _ACEOF
37582 if ac_fn_c_try_link "$LINENO"; then :
37583   TRUNC_LIBM="-lm"
37584 fi
37585 rm -f core conftest.err conftest.$ac_objext \
37586     conftest$ac_exeext conftest.$ac_ext
37587       LIBS="$save_LIBS"
37588     fi
37589     if test "$TRUNC_LIBM" = "?"; then
37590       TRUNC_LIBM=
37591     fi
37592
37593   else
37594     HAVE_DECL_TRUNC=0
37595   fi
37596   if test $HAVE_DECL_TRUNC = 0 || test $REPLACE_TRUNC = 1; then
37597         TRUNC_LIBM=
37598   fi
37599
37600
37601   if test $HAVE_DECL_TRUNC = 0 || test $REPLACE_TRUNC = 1; then
37602
37603
37604
37605
37606
37607
37608
37609
37610   gl_LIBOBJS="$gl_LIBOBJS trunc.$ac_objext"
37611
37612   fi
37613
37614
37615
37616
37617
37618           GNULIB_TRUNC=1
37619
37620
37621
37622
37623
37624 $as_echo "#define GNULIB_TEST_TRUNC 1" >>confdefs.h
37625
37626
37627
37628
37629
37630   for ac_func in uname
37631 do :
37632   ac_fn_c_check_func "$LINENO" "uname" "ac_cv_func_uname"
37633 if test "x$ac_cv_func_uname" = xyes; then :
37634   cat >>confdefs.h <<_ACEOF
37635 #define HAVE_UNAME 1
37636 _ACEOF
37637
37638 fi
37639 done
37640
37641   if test $ac_cv_func_uname = no; then
37642     HAVE_UNAME=0
37643   fi
37644
37645   if test $HAVE_UNAME = 0; then
37646
37647
37648
37649
37650
37651
37652
37653
37654   gl_LIBOBJS="$gl_LIBOBJS uname.$ac_objext"
37655
37656
37657   :
37658
37659   fi
37660
37661
37662
37663
37664
37665           GNULIB_UNAME=1
37666
37667
37668
37669
37670
37671
37672
37673
37674
37675
37676
37677
37678
37679   :
37680
37681
37682
37683
37684
37685
37686
37687
37688      if test $gl_cv_have_include_next = yes; then
37689        gl_cv_next_unistd_h='<'unistd.h'>'
37690      else
37691        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
37692 $as_echo_n "checking absolute name of <unistd.h>... " >&6; }
37693 if ${gl_cv_next_unistd_h+:} false; then :
37694   $as_echo_n "(cached) " >&6
37695 else
37696
37697              if test $ac_cv_header_unistd_h = yes; then
37698
37699
37700
37701
37702   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37703 /* end confdefs.h.  */
37704 #include <unistd.h>
37705 _ACEOF
37706                 case "$host_os" in
37707     aix*) gl_absname_cpp="$ac_cpp -C" ;;
37708     *)    gl_absname_cpp="$ac_cpp" ;;
37709   esac
37710
37711   case "$host_os" in
37712     mingw*)
37713                                           gl_dirsep_regex='[/\\]'
37714       ;;
37715     *)
37716       gl_dirsep_regex='\/'
37717       ;;
37718   esac
37719       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
37720   gl_header_literal_regex=`echo 'unistd.h' \
37721                            | sed -e "$gl_make_literal_regex_sed"`
37722   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
37723       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
37724       s|^/[^/]|//&|
37725       p
37726       q
37727     }'
37728
37729         gl_cv_absolute_unistd_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
37730   sed -n "$gl_absolute_header_sed"`
37731
37732            gl_header=$gl_cv_absolute_unistd_h
37733            gl_cv_next_unistd_h='"'$gl_header'"'
37734           else
37735                gl_cv_next_unistd_h='<'unistd.h'>'
37736              fi
37737
37738
37739 fi
37740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
37741 $as_echo "$gl_cv_next_unistd_h" >&6; }
37742      fi
37743      NEXT_UNISTD_H=$gl_cv_next_unistd_h
37744
37745      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
37746        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
37747        gl_next_as_first_directive='<'unistd.h'>'
37748      else
37749        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
37750        gl_next_as_first_directive=$gl_cv_next_unistd_h
37751      fi
37752      NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
37753
37754
37755
37756
37757   if test $ac_cv_header_unistd_h = yes; then
37758     HAVE_UNISTD_H=1
37759   else
37760     HAVE_UNISTD_H=0
37761   fi
37762
37763
37764
37765
37766
37767
37768
37769     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
37770     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
37771     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
37772 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
37773 if eval \${$as_gl_Symbol+:} false; then :
37774   $as_echo_n "(cached) " >&6
37775 else
37776   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37777 /* end confdefs.h.  */
37778
37779 #if HAVE_UNISTD_H
37780 # include <unistd.h>
37781 #endif
37782 /* Some systems declare various items in the wrong headers.  */
37783 #if !(defined __GLIBC__ && !defined __UCLIBC__)
37784 # include <fcntl.h>
37785 # include <stdio.h>
37786 # include <stdlib.h>
37787 # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
37788 #  include <io.h>
37789 # endif
37790 #endif
37791
37792 int
37793 main ()
37794 {
37795 #undef $gl_func
37796   (void) $gl_func;
37797   ;
37798   return 0;
37799 }
37800 _ACEOF
37801 if ac_fn_c_try_compile "$LINENO"; then :
37802   eval "$as_gl_Symbol=yes"
37803 else
37804   eval "$as_gl_Symbol=no"
37805 fi
37806 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
37807 fi
37808 eval ac_res=\$$as_gl_Symbol
37809                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
37810 $as_echo "$ac_res" >&6; }
37811     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
37812   cat >>confdefs.h <<_ACEOF
37813 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
37814 _ACEOF
37815
37816                      eval ac_cv_have_decl_$gl_func=yes
37817 fi
37818       done
37819
37820
37821
37822
37823   :
37824
37825
37826
37827
37828
37829
37830
37831
37832       if  { test "$HAVE_LIBUNISTRING" != yes \
37833     || {
37834
37835
37836
37837             test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
37838             || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
37839                  && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
37840                       || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
37841                            && test $LIBUNISTRING_VERSION_SUBMINOR -lt 0
37842                          }
37843                     }
37844                }
37845
37846
37847
37848
37849        }
37850   }; then
37851     LIBUNISTRING_UNITYPES_H='unitypes.h'
37852   else
37853     LIBUNISTRING_UNITYPES_H=
37854   fi
37855
37856
37857
37858
37859       if  { test "$HAVE_LIBUNISTRING" != yes \
37860     || {
37861
37862
37863
37864             test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
37865             || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
37866                  && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
37867                       || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
37868                            && test $LIBUNISTRING_VERSION_SUBMINOR -lt 0
37869                          }
37870                     }
37871                }
37872
37873
37874
37875
37876        }
37877   }; then
37878     LIBUNISTRING_UNIWIDTH_H='uniwidth.h'
37879   else
37880     LIBUNISTRING_UNIWIDTH_H=
37881   fi
37882
37883
37884
37885
37886        if  { test "$HAVE_LIBUNISTRING" != yes \
37887     || {
37888
37889
37890
37891             test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
37892             || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
37893                  && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
37894                       || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
37895                            && test $LIBUNISTRING_VERSION_SUBMINOR -lt 4
37896                          }
37897                     }
37898                }
37899
37900
37901
37902
37903        }
37904   }; then
37905   LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE=
37906   LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE='#'
37907 else
37908   LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE='#'
37909   LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE=
37910 fi
37911
37912
37913
37914
37915
37916
37917   :
37918
37919
37920
37921
37922
37923
37924     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unlink honors trailing slashes" >&5
37925 $as_echo_n "checking whether unlink honors trailing slashes... " >&6; }
37926 if ${gl_cv_func_unlink_honors_slashes+:} false; then :
37927   $as_echo_n "(cached) " >&6
37928 else
37929   touch conftest.file
37930      # Assume that if we have lstat, we can also check symlinks.
37931      if test $ac_cv_func_lstat = yes; then
37932        ln -s conftest.file conftest.lnk
37933      fi
37934      if test "$cross_compiling" = yes; then :
37935   case "$host_os" in
37936                  # Guess yes on glibc systems.
37937          *-gnu*) gl_cv_func_unlink_honors_slashes="guessing yes" ;;
37938                  # If we don't know, assume the worst.
37939          *)      gl_cv_func_unlink_honors_slashes="guessing no" ;;
37940        esac
37941
37942 else
37943   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37944 /* end confdefs.h.  */
37945 #if HAVE_UNISTD_H
37946            # include <unistd.h>
37947            #else /* on Windows with MSVC */
37948            # include <io.h>
37949            #endif
37950            #include <errno.h>
37951
37952 int
37953 main ()
37954 {
37955 int result = 0;
37956            if (!unlink ("conftest.file/"))
37957              result |= 1;
37958            else if (errno != ENOTDIR)
37959              result |= 2;
37960 #if HAVE_LSTAT
37961            if (!unlink ("conftest.lnk/"))
37962              result |= 4;
37963            else if (errno != ENOTDIR)
37964              result |= 8;
37965 #endif
37966            return result;
37967
37968   ;
37969   return 0;
37970 }
37971 _ACEOF
37972 if ac_fn_c_try_run "$LINENO"; then :
37973   gl_cv_func_unlink_honors_slashes=yes
37974 else
37975   gl_cv_func_unlink_honors_slashes=no
37976 fi
37977 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
37978   conftest.$ac_objext conftest.beam conftest.$ac_ext
37979 fi
37980
37981      rm -f conftest.file conftest.lnk
37982 fi
37983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unlink_honors_slashes" >&5
37984 $as_echo "$gl_cv_func_unlink_honors_slashes" >&6; }
37985   case "$gl_cv_func_unlink_honors_slashes" in
37986     *no)
37987       REPLACE_UNLINK=1
37988       ;;
37989   esac
37990
37991       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unlink of a parent directory fails as it should" >&5
37992 $as_echo_n "checking whether unlink of a parent directory fails as it should... " >&6; }
37993 if ${gl_cv_func_unlink_parent_fails+:} false; then :
37994   $as_echo_n "(cached) " >&6
37995 else
37996   case "$host_os" in
37997        darwin*)
37998                                                       if {
37999               # Use the mktemp program if available. If not available, hide the error
38000               # message.
38001               tmp=`(umask 077 && mktemp -d /tmp/gtXXXXXX) 2>/dev/null` &&
38002               test -n "$tmp" && test -d "$tmp"
38003             } ||
38004             {
38005               # Use a simple mkdir command. It is guaranteed to fail if the directory
38006               # already exists.  $RANDOM is bash specific and expands to empty in shells
38007               # other than bash, ksh and zsh.  Its use does not increase security;
38008               # rather, it minimizes the probability of failure in a very cluttered /tmp
38009               # directory.
38010               tmp=/tmp/gt$$-$RANDOM
38011               (umask 077 && mkdir "$tmp")
38012             }; then
38013            mkdir "$tmp/subdir"
38014            GL_SUBDIR_FOR_UNLINK="$tmp/subdir"
38015            export GL_SUBDIR_FOR_UNLINK
38016            if test "$cross_compiling" = yes; then :
38017   # If we don't know, assume the worst.
38018               gl_cv_func_unlink_parent_fails="guessing no"
38019
38020 else
38021   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38022 /* end confdefs.h.  */
38023
38024                 #include <stdlib.h>
38025                 #if HAVE_UNISTD_H
38026                 # include <unistd.h>
38027                 #else /* on Windows with MSVC */
38028                 # include <direct.h>
38029                 # include <io.h>
38030                 #endif
38031                 int main ()
38032                 {
38033                   int result = 0;
38034                   if (chdir (getenv ("GL_SUBDIR_FOR_UNLINK")) != 0)
38035                     result |= 1;
38036                   else if (unlink ("..") == 0)
38037                     result |= 2;
38038                   return result;
38039                 }
38040
38041 _ACEOF
38042 if ac_fn_c_try_run "$LINENO"; then :
38043   gl_cv_func_unlink_parent_fails=yes
38044 else
38045   gl_cv_func_unlink_parent_fails=no
38046 fi
38047 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
38048   conftest.$ac_objext conftest.beam conftest.$ac_ext
38049 fi
38050
38051            unset GL_SUBDIR_FOR_UNLINK
38052            rm -rf "$tmp"
38053          else
38054            gl_cv_func_unlink_parent_fails="guessing no"
38055          fi
38056          ;;
38057        *)
38058          gl_cv_func_unlink_parent_fails="guessing yes"
38059          ;;
38060      esac
38061
38062 fi
38063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unlink_parent_fails" >&5
38064 $as_echo "$gl_cv_func_unlink_parent_fails" >&6; }
38065   case "$gl_cv_func_unlink_parent_fails" in
38066     *no)
38067       REPLACE_UNLINK=1
38068
38069 $as_echo "#define UNLINK_PARENT_BUG 1" >>confdefs.h
38070
38071       ;;
38072   esac
38073
38074   if test $REPLACE_UNLINK = 1; then
38075
38076
38077
38078
38079
38080
38081
38082
38083   gl_LIBOBJS="$gl_LIBOBJS unlink.$ac_objext"
38084
38085   fi
38086
38087
38088
38089
38090
38091           GNULIB_UNLINK=1
38092
38093
38094
38095
38096
38097 $as_echo "#define GNULIB_TEST_UNLINK 1" >>confdefs.h
38098
38099
38100
38101
38102
38103
38104
38105   :
38106
38107
38108
38109
38110
38111
38112
38113   if test $ac_cv_func_unlinkat = no; then
38114     HAVE_UNLINKAT=0
38115   else
38116     case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
38117       *no)
38118         # Solaris 9 has *at functions, but uniformly mishandles trailing
38119         # slash in all of them.
38120         REPLACE_UNLINKAT=1
38121         ;;
38122       *)
38123         # GNU/Hurd has unlinkat, but it has the same bug as unlink.
38124         if test $REPLACE_UNLINK = 1; then
38125           REPLACE_UNLINKAT=1
38126         fi
38127         ;;
38128     esac
38129   fi
38130
38131   if test $HAVE_UNLINKAT = 0 || test $REPLACE_UNLINKAT = 1; then
38132
38133
38134
38135
38136
38137
38138
38139
38140   gl_LIBOBJS="$gl_LIBOBJS unlinkat.$ac_objext"
38141
38142   fi
38143
38144
38145
38146
38147
38148           GNULIB_UNLINKAT=1
38149
38150
38151
38152
38153
38154 $as_echo "#define GNULIB_TEST_UNLINKAT 1" >>confdefs.h
38155
38156
38157
38158
38159
38160
38161   :
38162
38163
38164
38165
38166
38167   if test $ac_cv_have_decl_unsetenv = no; then
38168     HAVE_DECL_UNSETENV=0
38169   fi
38170   for ac_func in unsetenv
38171 do :
38172   ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
38173 if test "x$ac_cv_func_unsetenv" = xyes; then :
38174   cat >>confdefs.h <<_ACEOF
38175 #define HAVE_UNSETENV 1
38176 _ACEOF
38177
38178 fi
38179 done
38180
38181   if test $ac_cv_func_unsetenv = no; then
38182     HAVE_UNSETENV=0
38183   else
38184     HAVE_UNSETENV=1
38185         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5
38186 $as_echo_n "checking for unsetenv() return type... " >&6; }
38187 if ${gt_cv_func_unsetenv_ret+:} false; then :
38188   $as_echo_n "(cached) " >&6
38189 else
38190   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38191 /* end confdefs.h.  */
38192
38193 #undef _BSD
38194 #define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */
38195 #include <stdlib.h>
38196 extern
38197 #ifdef __cplusplus
38198 "C"
38199 #endif
38200 int unsetenv (const char *name);
38201
38202 int
38203 main ()
38204 {
38205
38206   ;
38207   return 0;
38208 }
38209 _ACEOF
38210 if ac_fn_c_try_compile "$LINENO"; then :
38211   gt_cv_func_unsetenv_ret='int'
38212 else
38213   gt_cv_func_unsetenv_ret='void'
38214 fi
38215 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
38216 fi
38217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5
38218 $as_echo "$gt_cv_func_unsetenv_ret" >&6; }
38219     if test $gt_cv_func_unsetenv_ret = 'void'; then
38220
38221 $as_echo "#define VOID_UNSETENV 1" >>confdefs.h
38222
38223       REPLACE_UNSETENV=1
38224     fi
38225
38226                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5
38227 $as_echo_n "checking whether unsetenv obeys POSIX... " >&6; }
38228 if ${gl_cv_func_unsetenv_works+:} false; then :
38229   $as_echo_n "(cached) " >&6
38230 else
38231   if test "$cross_compiling" = yes; then :
38232   case "$host_os" in
38233                  # Guess yes on glibc systems.
38234          *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
38235                  # If we don't know, assume the worst.
38236          *)      gl_cv_func_unsetenv_works="guessing no" ;;
38237        esac
38238
38239 else
38240   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38241 /* end confdefs.h.  */
38242
38243        #include <stdlib.h>
38244        #include <errno.h>
38245        extern char **environ;
38246
38247 int
38248 main ()
38249 {
38250
38251        char entry1[] = "a=1";
38252        char entry2[] = "b=2";
38253        char *env[] = { entry1, entry2, NULL };
38254        if (putenv ((char *) "a=1")) return 1;
38255        if (putenv (entry2)) return 2;
38256        entry2[0] = 'a';
38257        unsetenv ("a");
38258        if (getenv ("a")) return 3;
38259        if (!unsetenv ("") || errno != EINVAL) return 4;
38260        entry2[0] = 'b';
38261        environ = env;
38262        if (!getenv ("a")) return 5;
38263        entry2[0] = 'a';
38264        unsetenv ("a");
38265        if (getenv ("a")) return 6;
38266
38267   ;
38268   return 0;
38269 }
38270 _ACEOF
38271 if ac_fn_c_try_run "$LINENO"; then :
38272   gl_cv_func_unsetenv_works=yes
38273 else
38274   gl_cv_func_unsetenv_works=no
38275 fi
38276 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
38277   conftest.$ac_objext conftest.beam conftest.$ac_ext
38278 fi
38279
38280 fi
38281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
38282 $as_echo "$gl_cv_func_unsetenv_works" >&6; }
38283     case "$gl_cv_func_unsetenv_works" in
38284       *yes) ;;
38285       *)
38286         REPLACE_UNSETENV=1
38287         ;;
38288     esac
38289   fi
38290
38291   if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
38292
38293
38294
38295
38296
38297
38298
38299
38300   gl_LIBOBJS="$gl_LIBOBJS unsetenv.$ac_objext"
38301
38302
38303
38304
38305   :
38306
38307
38308
38309
38310
38311
38312   fi
38313
38314
38315
38316
38317
38318           GNULIB_UNSETENV=1
38319
38320
38321
38322
38323
38324 $as_echo "#define GNULIB_TEST_UNSETENV 1" >>confdefs.h
38325
38326
38327
38328
38329
38330   :
38331
38332
38333
38334
38335
38336   if test $ac_cv_func_vasnprintf = no; then
38337
38338
38339   :
38340
38341
38342
38343
38344
38345
38346
38347
38348
38349
38350
38351
38352
38353   gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
38354
38355
38356
38357
38358
38359
38360
38361
38362
38363   gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
38364
38365
38366
38367
38368
38369
38370
38371
38372
38373   gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
38374
38375
38376
38377
38378
38379
38380
38381
38382
38383   gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
38384
38385   if test $ac_cv_func_vasnprintf = yes; then
38386
38387 $as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h
38388
38389   fi
38390
38391
38392
38393
38394
38395
38396
38397
38398
38399
38400
38401   ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
38402 if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
38403
38404 else
38405
38406 $as_echo "#define ptrdiff_t long" >>confdefs.h
38407
38408
38409 fi
38410
38411
38412
38413
38414
38415
38416
38417   fi
38418
38419
38420 # Check whether --with-packager was given.
38421 if test "${with_packager+set}" = set; then :
38422   withval=$with_packager;       case $withval in
38423         yes|no) ;;
38424         *)
38425 cat >>confdefs.h <<_ACEOF
38426 #define PACKAGE_PACKAGER "$withval"
38427 _ACEOF
38428  ;;
38429       esac
38430
38431 fi
38432
38433
38434
38435 # Check whether --with-packager-version was given.
38436 if test "${with_packager_version+set}" = set; then :
38437   withval=$with_packager_version;       case $withval in
38438         yes|no) ;;
38439         *)
38440 cat >>confdefs.h <<_ACEOF
38441 #define PACKAGE_PACKAGER_VERSION "$withval"
38442 _ACEOF
38443  ;;
38444       esac
38445
38446 fi
38447
38448
38449
38450 # Check whether --with-packager-bug-reports was given.
38451 if test "${with_packager_bug_reports+set}" = set; then :
38452   withval=$with_packager_bug_reports;       case $withval in
38453         yes|no) ;;
38454         *)
38455 cat >>confdefs.h <<_ACEOF
38456 #define PACKAGE_PACKAGER_BUG_REPORTS "$withval"
38457 _ACEOF
38458  ;;
38459       esac
38460
38461 fi
38462
38463
38464   if test "X$with_packager" = "X" && \
38465      test "X$with_packager_version$with_packager_bug_reports" != "X"
38466   then
38467     as_fn_error $? "The --with-packager-{bug-reports,version} options require --with-packager" "$LINENO" 5
38468   fi
38469
38470
38471
38472
38473
38474
38475
38476
38477
38478
38479   :
38480
38481
38482
38483
38484
38485
38486
38487
38488      if test $gl_cv_have_include_next = yes; then
38489        gl_cv_next_wchar_h='<'wchar.h'>'
38490      else
38491        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
38492 $as_echo_n "checking absolute name of <wchar.h>... " >&6; }
38493 if ${gl_cv_next_wchar_h+:} false; then :
38494   $as_echo_n "(cached) " >&6
38495 else
38496
38497              if test $ac_cv_header_wchar_h = yes; then
38498
38499
38500
38501
38502   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38503 /* end confdefs.h.  */
38504 #include <wchar.h>
38505 _ACEOF
38506                 case "$host_os" in
38507     aix*) gl_absname_cpp="$ac_cpp -C" ;;
38508     *)    gl_absname_cpp="$ac_cpp" ;;
38509   esac
38510
38511   case "$host_os" in
38512     mingw*)
38513                                           gl_dirsep_regex='[/\\]'
38514       ;;
38515     *)
38516       gl_dirsep_regex='\/'
38517       ;;
38518   esac
38519       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
38520   gl_header_literal_regex=`echo 'wchar.h' \
38521                            | sed -e "$gl_make_literal_regex_sed"`
38522   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
38523       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
38524       s|^/[^/]|//&|
38525       p
38526       q
38527     }'
38528
38529         gl_cv_absolute_wchar_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
38530   sed -n "$gl_absolute_header_sed"`
38531
38532            gl_header=$gl_cv_absolute_wchar_h
38533            gl_cv_next_wchar_h='"'$gl_header'"'
38534           else
38535                gl_cv_next_wchar_h='<'wchar.h'>'
38536              fi
38537
38538
38539 fi
38540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
38541 $as_echo "$gl_cv_next_wchar_h" >&6; }
38542      fi
38543      NEXT_WCHAR_H=$gl_cv_next_wchar_h
38544
38545      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
38546        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
38547        gl_next_as_first_directive='<'wchar.h'>'
38548      else
38549        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
38550        gl_next_as_first_directive=$gl_cv_next_wchar_h
38551      fi
38552      NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
38553
38554
38555
38556
38557   if test $ac_cv_header_wchar_h = yes; then
38558     HAVE_WCHAR_H=1
38559   else
38560     HAVE_WCHAR_H=0
38561   fi
38562
38563
38564
38565
38566
38567   if test $gt_cv_c_wint_t = yes; then
38568     HAVE_WINT_T=1
38569   else
38570     HAVE_WINT_T=0
38571   fi
38572
38573
38574
38575     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
38576     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
38577     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
38578 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
38579 if eval \${$as_gl_Symbol+:} false; then :
38580   $as_echo_n "(cached) " >&6
38581 else
38582   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38583 /* end confdefs.h.  */
38584
38585 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
38586    <wchar.h>.
38587    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
38588    included before <wchar.h>.  */
38589 #if !(defined __GLIBC__ && !defined __UCLIBC__)
38590 # include <stddef.h>
38591 # include <stdio.h>
38592 # include <time.h>
38593 #endif
38594 #include <wchar.h>
38595
38596 int
38597 main ()
38598 {
38599 #undef $gl_func
38600   (void) $gl_func;
38601   ;
38602   return 0;
38603 }
38604 _ACEOF
38605 if ac_fn_c_try_compile "$LINENO"; then :
38606   eval "$as_gl_Symbol=yes"
38607 else
38608   eval "$as_gl_Symbol=no"
38609 fi
38610 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
38611 fi
38612 eval ac_res=\$$as_gl_Symbol
38613                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
38614 $as_echo "$ac_res" >&6; }
38615     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
38616   cat >>confdefs.h <<_ACEOF
38617 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
38618 _ACEOF
38619
38620                      eval ac_cv_have_decl_$gl_func=yes
38621 fi
38622       done
38623
38624
38625
38626
38627
38628
38629
38630
38631
38632
38633
38634   :
38635
38636
38637
38638
38639
38640
38641   :
38642
38643
38644
38645
38646
38647   if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
38648
38649
38650
38651      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
38652 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
38653 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
38654   $as_echo_n "(cached) " >&6
38655 else
38656
38657                   case "$host_os" in
38658                      # Guess no on AIX and OSF/1.
38659         aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
38660                      # Guess yes otherwise.
38661         *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
38662       esac
38663       if test $LOCALE_JA != none; then
38664         if test "$cross_compiling" = yes; then :
38665   :
38666 else
38667   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38668 /* end confdefs.h.  */
38669
38670 #include <locale.h>
38671 #include <string.h>
38672 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
38673    <wchar.h>.
38674    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
38675    included before <wchar.h>.  */
38676 #include <stddef.h>
38677 #include <stdio.h>
38678 #include <time.h>
38679 #include <wchar.h>
38680 int main ()
38681 {
38682   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
38683     {
38684       const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
38685       mbstate_t state;
38686       wchar_t wc;
38687
38688       memset (&state, '\0', sizeof (mbstate_t));
38689       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
38690         if (mbsinit (&state))
38691           return 1;
38692     }
38693   return 0;
38694 }
38695 _ACEOF
38696 if ac_fn_c_try_run "$LINENO"; then :
38697   gl_cv_func_mbrtowc_incomplete_state=yes
38698 else
38699   gl_cv_func_mbrtowc_incomplete_state=no
38700 fi
38701 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
38702   conftest.$ac_objext conftest.beam conftest.$ac_ext
38703 fi
38704
38705       fi
38706
38707 fi
38708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
38709 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
38710
38711
38712
38713
38714      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
38715 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
38716 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
38717   $as_echo_n "(cached) " >&6
38718 else
38719
38720                   case "$host_os" in
38721                     # Guess no on Solaris 8.
38722         solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
38723                     # Guess yes otherwise.
38724         *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
38725       esac
38726       if test $LOCALE_ZH_CN != none; then
38727         if test "$cross_compiling" = yes; then :
38728   :
38729 else
38730   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38731 /* end confdefs.h.  */
38732
38733 #include <locale.h>
38734 #include <stdlib.h>
38735 #include <string.h>
38736 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
38737    <wchar.h>.
38738    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
38739    included before <wchar.h>.  */
38740 #include <stddef.h>
38741 #include <stdio.h>
38742 #include <time.h>
38743 #include <wchar.h>
38744 int main ()
38745 {
38746   /* This fails on Solaris 8:
38747      mbrtowc returns 2, and sets wc to 0x00F0.
38748      mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
38749   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
38750     {
38751       char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
38752       mbstate_t state;
38753       wchar_t wc;
38754
38755       memset (&state, '\0', sizeof (mbstate_t));
38756       if (mbrtowc (&wc, input + 3, 6, &state) != 4
38757           && mbtowc (&wc, input + 3, 6) == 4)
38758         return 1;
38759     }
38760   return 0;
38761 }
38762 _ACEOF
38763 if ac_fn_c_try_run "$LINENO"; then :
38764   gl_cv_func_mbrtowc_sanitycheck=yes
38765 else
38766   gl_cv_func_mbrtowc_sanitycheck=no
38767 fi
38768 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
38769   conftest.$ac_objext conftest.beam conftest.$ac_ext
38770 fi
38771
38772       fi
38773
38774 fi
38775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
38776 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
38777
38778     REPLACE_MBSTATE_T=0
38779     case "$gl_cv_func_mbrtowc_incomplete_state" in
38780       *yes) ;;
38781       *) REPLACE_MBSTATE_T=1 ;;
38782     esac
38783     case "$gl_cv_func_mbrtowc_sanitycheck" in
38784       *yes) ;;
38785       *) REPLACE_MBSTATE_T=1 ;;
38786     esac
38787   else
38788     REPLACE_MBSTATE_T=1
38789   fi
38790
38791
38792
38793   :
38794
38795
38796
38797
38798
38799   if test $ac_cv_func_wcrtomb = no; then
38800     HAVE_WCRTOMB=0
38801     ac_fn_c_check_decl "$LINENO" "wcrtomb" "ac_cv_have_decl_wcrtomb" "
38802 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
38803    <wchar.h>.
38804    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
38805    included before <wchar.h>.  */
38806 #include <stddef.h>
38807 #include <stdio.h>
38808 #include <time.h>
38809 #include <wchar.h>
38810
38811 "
38812 if test "x$ac_cv_have_decl_wcrtomb" = xyes; then :
38813   ac_have_decl=1
38814 else
38815   ac_have_decl=0
38816 fi
38817
38818 cat >>confdefs.h <<_ACEOF
38819 #define HAVE_DECL_WCRTOMB $ac_have_decl
38820 _ACEOF
38821
38822     if test $ac_cv_have_decl_wcrtomb = yes; then
38823                         REPLACE_WCRTOMB=1
38824     fi
38825   else
38826     if test $REPLACE_MBSTATE_T = 1; then
38827       REPLACE_WCRTOMB=1
38828     else
38829
38830
38831
38832
38833
38834              { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wcrtomb return value is correct" >&5
38835 $as_echo_n "checking whether wcrtomb return value is correct... " >&6; }
38836 if ${gl_cv_func_wcrtomb_retval+:} false; then :
38837   $as_echo_n "(cached) " >&6
38838 else
38839
38840                               case "$host_os" in
38841                                      # Guess no on AIX 4, OSF/1 and Solaris.
38842             aix4* | osf* | solaris*) gl_cv_func_wcrtomb_retval="guessing no" ;;
38843                                      # Guess yes otherwise.
38844             *)                       gl_cv_func_wcrtomb_retval="guessing yes" ;;
38845           esac
38846           if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
38847             if test "$cross_compiling" = yes; then :
38848   :
38849 else
38850   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38851 /* end confdefs.h.  */
38852
38853 #include <locale.h>
38854 #include <string.h>
38855 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
38856    <wchar.h>.
38857    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
38858    included before <wchar.h>.  */
38859 #include <stddef.h>
38860 #include <stdio.h>
38861 #include <time.h>
38862 #include <wchar.h>
38863 int main ()
38864 {
38865   int result = 0;
38866   if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
38867     {
38868       if (wcrtomb (NULL, 0, NULL) != 1)
38869         result |= 1;
38870     }
38871   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
38872     {
38873       if (wcrtomb (NULL, 0, NULL) != 1)
38874         result |= 2;
38875     }
38876   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
38877     {
38878       if (wcrtomb (NULL, 0, NULL) != 1)
38879         result |= 4;
38880     }
38881   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
38882     {
38883       if (wcrtomb (NULL, 0, NULL) != 1)
38884         result |= 8;
38885     }
38886   return result;
38887 }
38888 _ACEOF
38889 if ac_fn_c_try_run "$LINENO"; then :
38890   gl_cv_func_wcrtomb_retval=yes
38891 else
38892   gl_cv_func_wcrtomb_retval=no
38893 fi
38894 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
38895   conftest.$ac_objext conftest.beam conftest.$ac_ext
38896 fi
38897
38898           fi
38899
38900 fi
38901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcrtomb_retval" >&5
38902 $as_echo "$gl_cv_func_wcrtomb_retval" >&6; }
38903       case "$gl_cv_func_wcrtomb_retval" in
38904         *yes) ;;
38905         *) REPLACE_WCRTOMB=1 ;;
38906       esac
38907     fi
38908   fi
38909
38910   if test $HAVE_WCRTOMB = 0 || test $REPLACE_WCRTOMB = 1; then
38911
38912
38913
38914
38915
38916
38917
38918
38919   gl_LIBOBJS="$gl_LIBOBJS wcrtomb.$ac_objext"
38920
38921
38922   :
38923
38924   fi
38925
38926
38927
38928
38929
38930           GNULIB_WCRTOMB=1
38931
38932
38933
38934
38935
38936 $as_echo "#define GNULIB_TEST_WCRTOMB 1" >>confdefs.h
38937
38938
38939
38940
38941
38942
38943
38944
38945   :
38946
38947
38948
38949
38950
38951   if test $ac_cv_func_iswcntrl = yes; then
38952     HAVE_ISWCNTRL=1
38953   else
38954     HAVE_ISWCNTRL=0
38955   fi
38956
38957
38958
38959   if test $gt_cv_c_wint_t = yes; then
38960     HAVE_WINT_T=1
38961   else
38962     HAVE_WINT_T=0
38963   fi
38964
38965
38966
38967
38968
38969
38970
38971
38972   :
38973
38974
38975
38976
38977
38978
38979
38980
38981      if test $gl_cv_have_include_next = yes; then
38982        gl_cv_next_wctype_h='<'wctype.h'>'
38983      else
38984        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
38985 $as_echo_n "checking absolute name of <wctype.h>... " >&6; }
38986 if ${gl_cv_next_wctype_h+:} false; then :
38987   $as_echo_n "(cached) " >&6
38988 else
38989
38990              if test $ac_cv_header_wctype_h = yes; then
38991
38992
38993
38994
38995   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38996 /* end confdefs.h.  */
38997 #include <wctype.h>
38998 _ACEOF
38999                 case "$host_os" in
39000     aix*) gl_absname_cpp="$ac_cpp -C" ;;
39001     *)    gl_absname_cpp="$ac_cpp" ;;
39002   esac
39003
39004   case "$host_os" in
39005     mingw*)
39006                                           gl_dirsep_regex='[/\\]'
39007       ;;
39008     *)
39009       gl_dirsep_regex='\/'
39010       ;;
39011   esac
39012       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
39013   gl_header_literal_regex=`echo 'wctype.h' \
39014                            | sed -e "$gl_make_literal_regex_sed"`
39015   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
39016       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
39017       s|^/[^/]|//&|
39018       p
39019       q
39020     }'
39021
39022         gl_cv_absolute_wctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
39023   sed -n "$gl_absolute_header_sed"`
39024
39025            gl_header=$gl_cv_absolute_wctype_h
39026            gl_cv_next_wctype_h='"'$gl_header'"'
39027           else
39028                gl_cv_next_wctype_h='<'wctype.h'>'
39029              fi
39030
39031
39032 fi
39033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
39034 $as_echo "$gl_cv_next_wctype_h" >&6; }
39035      fi
39036      NEXT_WCTYPE_H=$gl_cv_next_wctype_h
39037
39038      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
39039        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
39040        gl_next_as_first_directive='<'wctype.h'>'
39041      else
39042        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
39043        gl_next_as_first_directive=$gl_cv_next_wctype_h
39044      fi
39045      NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
39046
39047
39048
39049
39050   if test $ac_cv_header_wctype_h = yes; then
39051     if test $ac_cv_func_iswcntrl = yes; then
39052                   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
39053 $as_echo_n "checking whether iswcntrl works... " >&6; }
39054 if ${gl_cv_func_iswcntrl_works+:} false; then :
39055   $as_echo_n "(cached) " >&6
39056 else
39057
39058           if test "$cross_compiling" = yes; then :
39059   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39060 /* end confdefs.h.  */
39061 #include <stdlib.h>
39062                           #if __GNU_LIBRARY__ == 1
39063                           Linux libc5 i18n is broken.
39064                           #endif
39065 int
39066 main ()
39067 {
39068
39069   ;
39070   return 0;
39071 }
39072 _ACEOF
39073 if ac_fn_c_try_compile "$LINENO"; then :
39074   gl_cv_func_iswcntrl_works="guessing yes"
39075 else
39076   gl_cv_func_iswcntrl_works="guessing no"
39077 fi
39078 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
39079
39080 else
39081   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39082 /* end confdefs.h.  */
39083
39084                /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
39085                   included before <wchar.h>.
39086                   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
39087                   must be included before <wchar.h>.  */
39088                #include <stddef.h>
39089                #include <stdio.h>
39090                #include <time.h>
39091                #include <wchar.h>
39092                #include <wctype.h>
39093                int main () { return iswprint ('x') == 0; }
39094
39095 _ACEOF
39096 if ac_fn_c_try_run "$LINENO"; then :
39097   gl_cv_func_iswcntrl_works=yes
39098 else
39099   gl_cv_func_iswcntrl_works=no
39100 fi
39101 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
39102   conftest.$ac_objext conftest.beam conftest.$ac_ext
39103 fi
39104
39105
39106 fi
39107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
39108 $as_echo "$gl_cv_func_iswcntrl_works" >&6; }
39109     fi
39110     HAVE_WCTYPE_H=1
39111   else
39112     HAVE_WCTYPE_H=0
39113   fi
39114
39115
39116   case "$gl_cv_func_iswcntrl_works" in
39117     *yes) REPLACE_ISWCNTRL=0 ;;
39118     *)    REPLACE_ISWCNTRL=1 ;;
39119   esac
39120
39121
39122   if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
39123         :
39124   fi
39125
39126   if test $REPLACE_ISWCNTRL = 1; then
39127     REPLACE_TOWLOWER=1
39128   else
39129     for ac_func in towlower
39130 do :
39131   ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
39132 if test "x$ac_cv_func_towlower" = xyes; then :
39133   cat >>confdefs.h <<_ACEOF
39134 #define HAVE_TOWLOWER 1
39135 _ACEOF
39136
39137 fi
39138 done
39139
39140     if test $ac_cv_func_towlower = yes; then
39141       REPLACE_TOWLOWER=0
39142     else
39143       ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
39144              included before <wchar.h>.
39145              BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
39146              must be included before <wchar.h>.  */
39147           #include <stddef.h>
39148           #include <stdio.h>
39149           #include <time.h>
39150           #include <wchar.h>
39151           #if HAVE_WCTYPE_H
39152           # include <wctype.h>
39153           #endif
39154
39155 "
39156 if test "x$ac_cv_have_decl_towlower" = xyes; then :
39157   ac_have_decl=1
39158 else
39159   ac_have_decl=0
39160 fi
39161
39162 cat >>confdefs.h <<_ACEOF
39163 #define HAVE_DECL_TOWLOWER $ac_have_decl
39164 _ACEOF
39165
39166       if test $ac_cv_have_decl_towlower = yes; then
39167                                 REPLACE_TOWLOWER=1
39168       else
39169         REPLACE_TOWLOWER=0
39170       fi
39171     fi
39172   fi
39173
39174
39175   if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
39176         :
39177   fi
39178
39179           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
39180 $as_echo_n "checking for wctype_t... " >&6; }
39181 if ${gl_cv_type_wctype_t+:} false; then :
39182   $as_echo_n "(cached) " >&6
39183 else
39184   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39185 /* end confdefs.h.  */
39186 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
39187                included before <wchar.h>.
39188                BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
39189                must be included before <wchar.h>.  */
39190             #include <stddef.h>
39191             #include <stdio.h>
39192             #include <time.h>
39193             #include <wchar.h>
39194             #if HAVE_WCTYPE_H
39195             # include <wctype.h>
39196             #endif
39197             wctype_t a;
39198
39199 int
39200 main ()
39201 {
39202
39203   ;
39204   return 0;
39205 }
39206 _ACEOF
39207 if ac_fn_c_try_compile "$LINENO"; then :
39208   gl_cv_type_wctype_t=yes
39209 else
39210   gl_cv_type_wctype_t=no
39211 fi
39212 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
39213
39214 fi
39215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
39216 $as_echo "$gl_cv_type_wctype_t" >&6; }
39217   if test $gl_cv_type_wctype_t = no; then
39218     HAVE_WCTYPE_T=0
39219   fi
39220
39221       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
39222 $as_echo_n "checking for wctrans_t... " >&6; }
39223 if ${gl_cv_type_wctrans_t+:} false; then :
39224   $as_echo_n "(cached) " >&6
39225 else
39226   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39227 /* end confdefs.h.  */
39228 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
39229                included before <wchar.h>.
39230                BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
39231                must be included before <wchar.h>.  */
39232             #include <stddef.h>
39233             #include <stdio.h>
39234             #include <time.h>
39235             #include <wchar.h>
39236             #include <wctype.h>
39237             wctrans_t a;
39238
39239 int
39240 main ()
39241 {
39242
39243   ;
39244   return 0;
39245 }
39246 _ACEOF
39247 if ac_fn_c_try_compile "$LINENO"; then :
39248   gl_cv_type_wctrans_t=yes
39249 else
39250   gl_cv_type_wctrans_t=no
39251 fi
39252 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
39253
39254 fi
39255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
39256 $as_echo "$gl_cv_type_wctrans_t" >&6; }
39257   if test $gl_cv_type_wctrans_t = no; then
39258     HAVE_WCTRANS_T=0
39259   fi
39260
39261
39262     for gl_func in wctype iswctype wctrans towctrans     ; do
39263     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
39264     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
39265 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
39266 if eval \${$as_gl_Symbol+:} false; then :
39267   $as_echo_n "(cached) " >&6
39268 else
39269   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39270 /* end confdefs.h.  */
39271
39272 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
39273    <wchar.h>.
39274    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
39275    included before <wchar.h>.  */
39276 #if !(defined __GLIBC__ && !defined __UCLIBC__)
39277 # include <stddef.h>
39278 # include <stdio.h>
39279 # include <time.h>
39280 # include <wchar.h>
39281 #endif
39282 #include <wctype.h>
39283
39284 int
39285 main ()
39286 {
39287 #undef $gl_func
39288   (void) $gl_func;
39289   ;
39290   return 0;
39291 }
39292 _ACEOF
39293 if ac_fn_c_try_compile "$LINENO"; then :
39294   eval "$as_gl_Symbol=yes"
39295 else
39296   eval "$as_gl_Symbol=no"
39297 fi
39298 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
39299 fi
39300 eval ac_res=\$$as_gl_Symbol
39301                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
39302 $as_echo "$ac_res" >&6; }
39303     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
39304   cat >>confdefs.h <<_ACEOF
39305 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
39306 _ACEOF
39307
39308                      eval ac_cv_have_decl_$gl_func=yes
39309 fi
39310       done
39311
39312
39313
39314
39315
39316
39317
39318
39319
39320
39321
39322   :
39323
39324
39325
39326
39327
39328
39329   :
39330
39331
39332
39333
39334
39335
39336   ac_fn_c_check_decl "$LINENO" "wcwidth" "ac_cv_have_decl_wcwidth" "
39337 /* AIX 3.2.5 declares wcwidth in <string.h>. */
39338 #include <string.h>
39339 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
39340    <wchar.h>.
39341    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
39342    before <wchar.h>.  */
39343 #include <stddef.h>
39344 #include <stdio.h>
39345 #include <time.h>
39346 #include <wchar.h>
39347
39348 "
39349 if test "x$ac_cv_have_decl_wcwidth" = xyes; then :
39350   ac_have_decl=1
39351 else
39352   ac_have_decl=0
39353 fi
39354
39355 cat >>confdefs.h <<_ACEOF
39356 #define HAVE_DECL_WCWIDTH $ac_have_decl
39357 _ACEOF
39358
39359   if test $ac_cv_have_decl_wcwidth != yes; then
39360     HAVE_DECL_WCWIDTH=0
39361   fi
39362
39363   if test $ac_cv_func_wcwidth = yes; then
39364     HAVE_WCWIDTH=1
39365                     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wcwidth works reasonably in UTF-8 locales" >&5
39366 $as_echo_n "checking whether wcwidth works reasonably in UTF-8 locales... " >&6; }
39367 if ${gl_cv_func_wcwidth_works+:} false; then :
39368   $as_echo_n "(cached) " >&6
39369 else
39370
39371         if test "$cross_compiling" = yes; then :
39372
39373            case "$host_os" in
39374                      # Guess yes on glibc and AIX 7 systems.
39375              *-gnu* | aix[7-9]*) gl_cv_func_wcwidth_works="guessing yes";;
39376              *)                  gl_cv_func_wcwidth_works="guessing no";;
39377            esac
39378
39379 else
39380   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39381 /* end confdefs.h.  */
39382
39383 #include <locale.h>
39384 /* AIX 3.2.5 declares wcwidth in <string.h>. */
39385 #include <string.h>
39386 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
39387    <wchar.h>.
39388    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
39389    before <wchar.h>.  */
39390 #include <stddef.h>
39391 #include <stdio.h>
39392 #include <time.h>
39393 #include <wchar.h>
39394 #if !HAVE_DECL_WCWIDTH
39395 extern
39396 # ifdef __cplusplus
39397 "C"
39398 # endif
39399 int wcwidth (int);
39400 #endif
39401 int main ()
39402 {
39403   int result = 0;
39404   if (setlocale (LC_ALL, "fr_FR.UTF-8") != NULL)
39405     {
39406       if (wcwidth (0x0301) > 0)
39407         result |= 1;
39408       if (wcwidth (0x05B0) > 0)
39409         result |= 2;
39410       if (wcwidth (0x200B) > 0)
39411         result |= 4;
39412     }
39413   return result;
39414 }
39415 _ACEOF
39416 if ac_fn_c_try_run "$LINENO"; then :
39417   gl_cv_func_wcwidth_works=yes
39418 else
39419   gl_cv_func_wcwidth_works=no
39420 fi
39421 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
39422   conftest.$ac_objext conftest.beam conftest.$ac_ext
39423 fi
39424
39425
39426 fi
39427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcwidth_works" >&5
39428 $as_echo "$gl_cv_func_wcwidth_works" >&6; }
39429     case "$gl_cv_func_wcwidth_works" in
39430       *yes) ;;
39431       *no) REPLACE_WCWIDTH=1 ;;
39432     esac
39433   else
39434     HAVE_WCWIDTH=0
39435   fi
39436
39437   if test $HAVE_WCWIDTH = 0 || test $REPLACE_WCWIDTH = 1; then
39438
39439
39440
39441
39442
39443
39444
39445
39446   gl_LIBOBJS="$gl_LIBOBJS wcwidth.$ac_objext"
39447
39448   fi
39449
39450
39451
39452
39453
39454           GNULIB_WCWIDTH=1
39455
39456
39457
39458
39459
39460 $as_echo "#define GNULIB_TEST_WCWIDTH 1" >>confdefs.h
39461
39462
39463
39464   :
39465
39466   :
39467
39468
39469
39470   for ac_header in stdint.h
39471 do :
39472   ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
39473 if test "x$ac_cv_header_stdint_h" = xyes; then :
39474   cat >>confdefs.h <<_ACEOF
39475 #define HAVE_STDINT_H 1
39476 _ACEOF
39477
39478 fi
39479
39480 done
39481
39482
39483
39484
39485   :
39486
39487
39488
39489   :
39490
39491
39492   :
39493
39494
39495     :
39496
39497   # End of code from modules
39498
39499
39500
39501
39502
39503
39504
39505
39506
39507   gltests_libdeps=
39508   gltests_ltlibdeps=
39509
39510
39511
39512
39513
39514
39515
39516
39517
39518   gl_source_base='tests'
39519   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
39520
39521   gl_module_indicator_condition=$gltests_WITNESS
39522
39523
39524   if test "$ac_cv_header_winsock2_h" = yes; then
39525
39526
39527
39528
39529
39530
39531
39532
39533   gltests_LIBOBJS="$gltests_LIBOBJS accept.$ac_objext"
39534
39535   fi
39536
39537
39538
39539
39540
39541     if test "$GNULIB_ACCEPT" != 1; then
39542         if test "$GNULIB_ACCEPT" = 0; then
39543       GNULIB_ACCEPT=$gl_module_indicator_condition
39544     else
39545       GNULIB_ACCEPT="($GNULIB_ACCEPT || $gl_module_indicator_condition)"
39546     fi
39547   fi
39548
39549
39550
39551
39552
39553 $as_echo "#define GNULIB_TEST_ACCEPT 1" >>confdefs.h
39554
39555
39556
39557
39558
39559
39560
39561   :
39562
39563
39564
39565
39566
39567   if test $ac_cv_header_arpa_inet_h = yes; then
39568     HAVE_ARPA_INET_H=1
39569   else
39570     HAVE_ARPA_INET_H=0
39571   fi
39572
39573
39574
39575
39576
39577
39578
39579   :
39580
39581
39582
39583
39584
39585
39586
39587
39588      if test $gl_cv_have_include_next = yes; then
39589        gl_cv_next_arpa_inet_h='<'arpa/inet.h'>'
39590      else
39591        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <arpa/inet.h>" >&5
39592 $as_echo_n "checking absolute name of <arpa/inet.h>... " >&6; }
39593 if ${gl_cv_next_arpa_inet_h+:} false; then :
39594   $as_echo_n "(cached) " >&6
39595 else
39596
39597              if test $ac_cv_header_arpa_inet_h = yes; then
39598
39599
39600
39601
39602   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39603 /* end confdefs.h.  */
39604 #include <arpa/inet.h>
39605 _ACEOF
39606                 case "$host_os" in
39607     aix*) gl_absname_cpp="$ac_cpp -C" ;;
39608     *)    gl_absname_cpp="$ac_cpp" ;;
39609   esac
39610
39611   case "$host_os" in
39612     mingw*)
39613                                           gl_dirsep_regex='[/\\]'
39614       ;;
39615     *)
39616       gl_dirsep_regex='\/'
39617       ;;
39618   esac
39619       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
39620   gl_header_literal_regex=`echo 'arpa/inet.h' \
39621                            | sed -e "$gl_make_literal_regex_sed"`
39622   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
39623       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
39624       s|^/[^/]|//&|
39625       p
39626       q
39627     }'
39628
39629         gl_cv_absolute_arpa_inet_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
39630   sed -n "$gl_absolute_header_sed"`
39631
39632            gl_header=$gl_cv_absolute_arpa_inet_h
39633            gl_cv_next_arpa_inet_h='"'$gl_header'"'
39634           else
39635                gl_cv_next_arpa_inet_h='<'arpa/inet.h'>'
39636              fi
39637
39638
39639 fi
39640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_arpa_inet_h" >&5
39641 $as_echo "$gl_cv_next_arpa_inet_h" >&6; }
39642      fi
39643      NEXT_ARPA_INET_H=$gl_cv_next_arpa_inet_h
39644
39645      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
39646        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
39647        gl_next_as_first_directive='<'arpa/inet.h'>'
39648      else
39649        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
39650        gl_next_as_first_directive=$gl_cv_next_arpa_inet_h
39651      fi
39652      NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H=$gl_next_as_first_directive
39653
39654
39655
39656
39657
39658
39659
39660
39661     for gl_func in inet_ntop inet_pton; do
39662     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
39663     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
39664 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
39665 if eval \${$as_gl_Symbol+:} false; then :
39666   $as_echo_n "(cached) " >&6
39667 else
39668   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39669 /* end confdefs.h.  */
39670
39671 /* On some systems, this header is not self-consistent.  */
39672 #if !(defined __GLIBC__ || defined __UCLIBC__)
39673 # include <sys/socket.h>
39674 #endif
39675 #ifdef __TANDEM
39676 # include <netdb.h>
39677 #endif
39678 #include <arpa/inet.h>
39679
39680 int
39681 main ()
39682 {
39683 #undef $gl_func
39684   (void) $gl_func;
39685   ;
39686   return 0;
39687 }
39688 _ACEOF
39689 if ac_fn_c_try_compile "$LINENO"; then :
39690   eval "$as_gl_Symbol=yes"
39691 else
39692   eval "$as_gl_Symbol=no"
39693 fi
39694 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
39695 fi
39696 eval ac_res=\$$as_gl_Symbol
39697                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
39698 $as_echo "$ac_res" >&6; }
39699     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
39700   cat >>confdefs.h <<_ACEOF
39701 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
39702 _ACEOF
39703
39704                      eval ac_cv_have_decl_$gl_func=yes
39705 fi
39706       done
39707
39708
39709
39710
39711   if test "$ac_cv_header_winsock2_h" = yes; then
39712
39713
39714
39715
39716
39717
39718
39719
39720   gltests_LIBOBJS="$gltests_LIBOBJS bind.$ac_objext"
39721
39722   fi
39723
39724
39725
39726
39727
39728     if test "$GNULIB_BIND" != 1; then
39729         if test "$GNULIB_BIND" = 0; then
39730       GNULIB_BIND=$gl_module_indicator_condition
39731     else
39732       GNULIB_BIND="($GNULIB_BIND || $gl_module_indicator_condition)"
39733     fi
39734   fi
39735
39736
39737
39738
39739
39740 $as_echo "#define GNULIB_TEST_BIND 1" >>confdefs.h
39741
39742
39743
39744
39745
39746
39747   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
39748 $as_echo_n "checking for a traditional french locale... " >&6; }
39749 if ${gt_cv_locale_fr+:} false; then :
39750   $as_echo_n "(cached) " >&6
39751 else
39752
39753     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39754 /* end confdefs.h.  */
39755
39756 #include <locale.h>
39757 #include <time.h>
39758 #if HAVE_LANGINFO_CODESET
39759 # include <langinfo.h>
39760 #endif
39761 #include <stdlib.h>
39762 #include <string.h>
39763 struct tm t;
39764 char buf[16];
39765 int main () {
39766   /* Check whether the given locale name is recognized by the system.  */
39767 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
39768   /* On native Windows, setlocale(category, "") looks at the system settings,
39769      not at the environment variables.  Also, when an encoding suffix such
39770      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
39771      category of the locale to "C".  */
39772   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
39773       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
39774     return 1;
39775 #else
39776   if (setlocale (LC_ALL, "") == NULL) return 1;
39777 #endif
39778   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
39779      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
39780      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
39781      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
39782      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
39783      some unit tests fail.
39784      On MirBSD 10, when an unsupported locale is specified, setlocale()
39785      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
39786 #if HAVE_LANGINFO_CODESET
39787   {
39788     const char *cs = nl_langinfo (CODESET);
39789     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
39790         || strcmp (cs, "UTF-8") == 0)
39791       return 1;
39792   }
39793 #endif
39794 #ifdef __CYGWIN__
39795   /* On Cygwin, avoid locale names without encoding suffix, because the
39796      locale_charset() function relies on the encoding suffix.  Note that
39797      LC_ALL is set on the command line.  */
39798   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
39799 #endif
39800   /* Check whether in the abbreviation of the second month, the second
39801      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
39802      one byte long. This excludes the UTF-8 encoding.  */
39803   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
39804   if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
39805 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
39806   /* Check whether the decimal separator is a comma.
39807      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
39808      are nl_langinfo(RADIXCHAR) are both ".".  */
39809   if (localeconv () ->decimal_point[0] != ',') return 1;
39810 #endif
39811   return 0;
39812 }
39813
39814 _ACEOF
39815     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
39816   (eval $ac_link) 2>&5
39817   ac_status=$?
39818   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
39819   test $ac_status = 0; } && test -s conftest$ac_exeext; then
39820       case "$host_os" in
39821         # Handle native Windows specially, because there setlocale() interprets
39822         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
39823         # "fr" or "fra" as "French" or "French_France.1252",
39824         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
39825         # "ja" as "Japanese" or "Japanese_Japan.932",
39826         # and similar.
39827         mingw*)
39828           # Test for the native Windows locale name.
39829           if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
39830             gt_cv_locale_fr=French_France.1252
39831           else
39832             # None found.
39833             gt_cv_locale_fr=none
39834           fi
39835           ;;
39836         *)
39837           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
39838           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
39839           # configure script would override the LC_ALL setting. Likewise for
39840           # LC_CTYPE, which is also set at the beginning of the configure script.
39841           # Test for the usual locale name.
39842           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
39843             gt_cv_locale_fr=fr_FR
39844           else
39845             # Test for the locale name with explicit encoding suffix.
39846             if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
39847               gt_cv_locale_fr=fr_FR.ISO-8859-1
39848             else
39849               # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
39850               if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
39851                 gt_cv_locale_fr=fr_FR.ISO8859-1
39852               else
39853                 # Test for the HP-UX locale name.
39854                 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
39855                   gt_cv_locale_fr=fr_FR.iso88591
39856                 else
39857                   # Test for the Solaris 7 locale name.
39858                   if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
39859                     gt_cv_locale_fr=fr
39860                   else
39861                     # None found.
39862                     gt_cv_locale_fr=none
39863                   fi
39864                 fi
39865               fi
39866             fi
39867           fi
39868           ;;
39869       esac
39870     fi
39871     rm -fr conftest*
39872
39873 fi
39874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
39875 $as_echo "$gt_cv_locale_fr" >&6; }
39876   LOCALE_FR=$gt_cv_locale_fr
39877
39878
39879
39880
39881   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
39882 $as_echo_n "checking for a french Unicode locale... " >&6; }
39883 if ${gt_cv_locale_fr_utf8+:} false; then :
39884   $as_echo_n "(cached) " >&6
39885 else
39886
39887     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39888 /* end confdefs.h.  */
39889
39890 #include <locale.h>
39891 #include <time.h>
39892 #if HAVE_LANGINFO_CODESET
39893 # include <langinfo.h>
39894 #endif
39895 #include <stdlib.h>
39896 #include <string.h>
39897 struct tm t;
39898 char buf[16];
39899 int main () {
39900   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
39901      imitates locale dependent behaviour by looking at the environment
39902      variables, and all locales use the UTF-8 encoding.  */
39903 #if !(defined __BEOS__ || defined __HAIKU__)
39904   /* Check whether the given locale name is recognized by the system.  */
39905 # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
39906   /* On native Windows, setlocale(category, "") looks at the system settings,
39907      not at the environment variables.  Also, when an encoding suffix such
39908      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
39909      category of the locale to "C".  */
39910   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
39911       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
39912     return 1;
39913 # else
39914   if (setlocale (LC_ALL, "") == NULL) return 1;
39915 # endif
39916   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
39917      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
39918      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
39919      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
39920      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
39921      some unit tests fail.  */
39922 # if HAVE_LANGINFO_CODESET
39923   {
39924     const char *cs = nl_langinfo (CODESET);
39925     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
39926       return 1;
39927   }
39928 # endif
39929 # ifdef __CYGWIN__
39930   /* On Cygwin, avoid locale names without encoding suffix, because the
39931      locale_charset() function relies on the encoding suffix.  Note that
39932      LC_ALL is set on the command line.  */
39933   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
39934 # endif
39935   /* Check whether in the abbreviation of the second month, the second
39936      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
39937      two bytes long, with UTF-8 encoding.  */
39938   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
39939   if (strftime (buf, sizeof (buf), "%b", &t) < 4
39940       || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
39941     return 1;
39942 #endif
39943 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
39944   /* Check whether the decimal separator is a comma.
39945      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
39946      are nl_langinfo(RADIXCHAR) are both ".".  */
39947   if (localeconv () ->decimal_point[0] != ',') return 1;
39948 #endif
39949   return 0;
39950 }
39951
39952 _ACEOF
39953     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
39954   (eval $ac_link) 2>&5
39955   ac_status=$?
39956   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
39957   test $ac_status = 0; } && test -s conftest$ac_exeext; then
39958       case "$host_os" in
39959         # Handle native Windows specially, because there setlocale() interprets
39960         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
39961         # "fr" or "fra" as "French" or "French_France.1252",
39962         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
39963         # "ja" as "Japanese" or "Japanese_Japan.932",
39964         # and similar.
39965         mingw*)
39966           # Test for the hypothetical native Windows locale name.
39967           if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
39968             gt_cv_locale_fr_utf8=French_France.65001
39969           else
39970             # None found.
39971             gt_cv_locale_fr_utf8=none
39972           fi
39973           ;;
39974         *)
39975           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
39976           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
39977           # configure script would override the LC_ALL setting. Likewise for
39978           # LC_CTYPE, which is also set at the beginning of the configure script.
39979           # Test for the usual locale name.
39980           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
39981             gt_cv_locale_fr_utf8=fr_FR
39982           else
39983             # Test for the locale name with explicit encoding suffix.
39984             if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
39985               gt_cv_locale_fr_utf8=fr_FR.UTF-8
39986             else
39987               # Test for the Solaris 7 locale name.
39988               if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
39989                 gt_cv_locale_fr_utf8=fr.UTF-8
39990               else
39991                 # None found.
39992                 gt_cv_locale_fr_utf8=none
39993               fi
39994             fi
39995           fi
39996           ;;
39997       esac
39998     fi
39999     rm -fr conftest*
40000
40001 fi
40002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
40003 $as_echo "$gt_cv_locale_fr_utf8" >&6; }
40004   LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
40005
40006
40007
40008
40009
40010   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
40011 $as_echo_n "checking for a traditional french locale... " >&6; }
40012 if ${gt_cv_locale_fr+:} false; then :
40013   $as_echo_n "(cached) " >&6
40014 else
40015
40016     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40017 /* end confdefs.h.  */
40018
40019 #include <locale.h>
40020 #include <time.h>
40021 #if HAVE_LANGINFO_CODESET
40022 # include <langinfo.h>
40023 #endif
40024 #include <stdlib.h>
40025 #include <string.h>
40026 struct tm t;
40027 char buf[16];
40028 int main () {
40029   /* Check whether the given locale name is recognized by the system.  */
40030 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
40031   /* On native Windows, setlocale(category, "") looks at the system settings,
40032      not at the environment variables.  Also, when an encoding suffix such
40033      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
40034      category of the locale to "C".  */
40035   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
40036       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
40037     return 1;
40038 #else
40039   if (setlocale (LC_ALL, "") == NULL) return 1;
40040 #endif
40041   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
40042      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
40043      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
40044      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
40045      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
40046      some unit tests fail.
40047      On MirBSD 10, when an unsupported locale is specified, setlocale()
40048      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
40049 #if HAVE_LANGINFO_CODESET
40050   {
40051     const char *cs = nl_langinfo (CODESET);
40052     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
40053         || strcmp (cs, "UTF-8") == 0)
40054       return 1;
40055   }
40056 #endif
40057 #ifdef __CYGWIN__
40058   /* On Cygwin, avoid locale names without encoding suffix, because the
40059      locale_charset() function relies on the encoding suffix.  Note that
40060      LC_ALL is set on the command line.  */
40061   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
40062 #endif
40063   /* Check whether in the abbreviation of the second month, the second
40064      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
40065      one byte long. This excludes the UTF-8 encoding.  */
40066   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
40067   if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
40068 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
40069   /* Check whether the decimal separator is a comma.
40070      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
40071      are nl_langinfo(RADIXCHAR) are both ".".  */
40072   if (localeconv () ->decimal_point[0] != ',') return 1;
40073 #endif
40074   return 0;
40075 }
40076
40077 _ACEOF
40078     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
40079   (eval $ac_link) 2>&5
40080   ac_status=$?
40081   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
40082   test $ac_status = 0; } && test -s conftest$ac_exeext; then
40083       case "$host_os" in
40084         # Handle native Windows specially, because there setlocale() interprets
40085         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
40086         # "fr" or "fra" as "French" or "French_France.1252",
40087         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
40088         # "ja" as "Japanese" or "Japanese_Japan.932",
40089         # and similar.
40090         mingw*)
40091           # Test for the native Windows locale name.
40092           if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
40093             gt_cv_locale_fr=French_France.1252
40094           else
40095             # None found.
40096             gt_cv_locale_fr=none
40097           fi
40098           ;;
40099         *)
40100           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
40101           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
40102           # configure script would override the LC_ALL setting. Likewise for
40103           # LC_CTYPE, which is also set at the beginning of the configure script.
40104           # Test for the usual locale name.
40105           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
40106             gt_cv_locale_fr=fr_FR
40107           else
40108             # Test for the locale name with explicit encoding suffix.
40109             if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
40110               gt_cv_locale_fr=fr_FR.ISO-8859-1
40111             else
40112               # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
40113               if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
40114                 gt_cv_locale_fr=fr_FR.ISO8859-1
40115               else
40116                 # Test for the HP-UX locale name.
40117                 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
40118                   gt_cv_locale_fr=fr_FR.iso88591
40119                 else
40120                   # Test for the Solaris 7 locale name.
40121                   if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
40122                     gt_cv_locale_fr=fr
40123                   else
40124                     # None found.
40125                     gt_cv_locale_fr=none
40126                   fi
40127                 fi
40128               fi
40129             fi
40130           fi
40131           ;;
40132       esac
40133     fi
40134     rm -fr conftest*
40135
40136 fi
40137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
40138 $as_echo "$gt_cv_locale_fr" >&6; }
40139   LOCALE_FR=$gt_cv_locale_fr
40140
40141
40142
40143
40144
40145   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a turkish Unicode locale" >&5
40146 $as_echo_n "checking for a turkish Unicode locale... " >&6; }
40147 if ${gt_cv_locale_tr_utf8+:} false; then :
40148   $as_echo_n "(cached) " >&6
40149 else
40150
40151     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40152 /* end confdefs.h.  */
40153
40154 #include <locale.h>
40155 #include <time.h>
40156 #if HAVE_LANGINFO_CODESET
40157 # include <langinfo.h>
40158 #endif
40159 #include <stdlib.h>
40160 #include <string.h>
40161 struct tm t;
40162 char buf[16];
40163 int main () {
40164   /* On BeOS, locales are not implemented in libc.  Rather, libintl
40165      imitates locale dependent behaviour by looking at the environment
40166      variables, and all locales use the UTF-8 encoding.  But BeOS does not
40167      implement the Turkish upper-/lowercase mappings.  Therefore, let this
40168      program return 1 on BeOS.  */
40169   /* Check whether the given locale name is recognized by the system.  */
40170 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
40171   /* On native Windows, setlocale(category, "") looks at the system settings,
40172      not at the environment variables.  Also, when an encoding suffix such
40173      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
40174      category of the locale to "C".  */
40175   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
40176       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
40177     return 1;
40178 #else
40179   if (setlocale (LC_ALL, "") == NULL) return 1;
40180 #endif
40181   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
40182      On Mac OS X 10.3.5 (Darwin 7.5) in the tr_TR locale, nl_langinfo(CODESET)
40183      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
40184      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
40185      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
40186      some unit tests fail.  */
40187 #if HAVE_LANGINFO_CODESET
40188   {
40189     const char *cs = nl_langinfo (CODESET);
40190     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
40191       return 1;
40192   }
40193 #endif
40194 #ifdef __CYGWIN__
40195   /* On Cygwin, avoid locale names without encoding suffix, because the
40196      locale_charset() function relies on the encoding suffix.  Note that
40197      LC_ALL is set on the command line.  */
40198   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
40199 #endif
40200   /* Check whether in the abbreviation of the eighth month, the second
40201      character (should be U+011F: LATIN SMALL LETTER G WITH BREVE) is
40202      two bytes long, with UTF-8 encoding.  */
40203   t.tm_year = 1992 - 1900; t.tm_mon = 8 - 1; t.tm_mday = 19;
40204   if (strftime (buf, sizeof (buf), "%b", &t) < 4
40205       || buf[1] != (char) 0xc4 || buf[2] != (char) 0x9f)
40206     return 1;
40207   /* Check whether the upper-/lowercase mappings are as expected for
40208      Turkish.  */
40209   if (towupper ('i') != 0x0130 || towlower (0x0130) != 'i'
40210       || towupper(0x0131) != 'I' || towlower ('I') != 0x0131)
40211     return 1;
40212   return 0;
40213 }
40214
40215 _ACEOF
40216     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
40217   (eval $ac_link) 2>&5
40218   ac_status=$?
40219   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
40220   test $ac_status = 0; } && test -s conftest$ac_exeext; then
40221       case "$host_os" in
40222         # Handle native Windows specially, because there setlocale() interprets
40223         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
40224         # "fr" or "fra" as "French" or "French_France.1252",
40225         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
40226         # "ja" as "Japanese" or "Japanese_Japan.932",
40227         # and similar.
40228         mingw*)
40229           # Test for the hypothetical native Windows locale name.
40230           if (LC_ALL=Turkish_Turkey.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
40231             gt_cv_locale_tr_utf8=Turkish_Turkey.65001
40232           else
40233             # None found.
40234             gt_cv_locale_tr_utf8=none
40235           fi
40236           ;;
40237         *)
40238           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
40239           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
40240           # configure script would override the LC_ALL setting. Likewise for
40241           # LC_CTYPE, which is also set at the beginning of the configure script.
40242           # Test for the usual locale name.
40243           if (LC_ALL=tr_TR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
40244             gt_cv_locale_tr_utf8=tr_TR
40245           else
40246             # Test for the locale name with explicit encoding suffix.
40247             if (LC_ALL=tr_TR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
40248               gt_cv_locale_tr_utf8=tr_TR.UTF-8
40249             else
40250               # Test for the Solaris 7 locale name.
40251               if (LC_ALL=tr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
40252                 gt_cv_locale_tr_utf8=tr.UTF-8
40253               else
40254                 # None found.
40255                 gt_cv_locale_tr_utf8=none
40256               fi
40257             fi
40258           fi
40259           ;;
40260       esac
40261     else
40262       gt_cv_locale_tr_utf8=none
40263     fi
40264     rm -fr conftest*
40265
40266 fi
40267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_tr_utf8" >&5
40268 $as_echo "$gt_cv_locale_tr_utf8" >&6; }
40269   LOCALE_TR_UTF8=$gt_cv_locale_tr_utf8
40270
40271
40272
40273   if test "$ac_cv_header_winsock2_h" = yes; then
40274
40275
40276
40277
40278
40279
40280
40281
40282   gltests_LIBOBJS="$gltests_LIBOBJS connect.$ac_objext"
40283
40284   fi
40285
40286
40287
40288
40289
40290     if test "$GNULIB_CONNECT" != 1; then
40291         if test "$GNULIB_CONNECT" = 0; then
40292       GNULIB_CONNECT=$gl_module_indicator_condition
40293     else
40294       GNULIB_CONNECT="($GNULIB_CONNECT || $gl_module_indicator_condition)"
40295     fi
40296   fi
40297
40298
40299
40300
40301
40302 $as_echo "#define GNULIB_TEST_CONNECT 1" >>confdefs.h
40303
40304
40305
40306
40307
40308 cat >>confdefs.h <<_ACEOF
40309 #define GNULIB_FD_SAFER_FLAG $gl_module_indicator_condition
40310 _ACEOF
40311
40312
40313
40314
40315
40316   if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
40317     REPLACE_FDOPEN=1
40318   else
40319         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fdopen sets errno" >&5
40320 $as_echo_n "checking whether fdopen sets errno... " >&6; }
40321 if ${gl_cv_func_fdopen_works+:} false; then :
40322   $as_echo_n "(cached) " >&6
40323 else
40324
40325         if test "$cross_compiling" = yes; then :
40326   case "$host_os" in
40327              mingw*) gl_cv_func_fdopen_works="guessing no" ;;
40328              *)      gl_cv_func_fdopen_works="guessing yes" ;;
40329            esac
40330
40331 else
40332   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40333 /* end confdefs.h.  */
40334
40335 #include <stdio.h>
40336 #include <errno.h>
40337 int
40338 main (void)
40339 {
40340   FILE *fp;
40341   errno = 0;
40342   fp = fdopen (-1, "r");
40343   if (fp == NULL && errno == 0)
40344     return 1;
40345   return 0;
40346 }
40347 _ACEOF
40348 if ac_fn_c_try_run "$LINENO"; then :
40349   gl_cv_func_fdopen_works=yes
40350 else
40351   gl_cv_func_fdopen_works=no
40352 fi
40353 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
40354   conftest.$ac_objext conftest.beam conftest.$ac_ext
40355 fi
40356
40357
40358 fi
40359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopen_works" >&5
40360 $as_echo "$gl_cv_func_fdopen_works" >&6; }
40361     case "$gl_cv_func_fdopen_works" in
40362       *no) REPLACE_FDOPEN=1 ;;
40363     esac
40364   fi
40365
40366   if test $REPLACE_FDOPEN = 1; then
40367
40368
40369
40370
40371
40372
40373
40374
40375   gltests_LIBOBJS="$gltests_LIBOBJS fdopen.$ac_objext"
40376
40377
40378   fi
40379
40380
40381
40382
40383
40384     if test "$GNULIB_FDOPEN" != 1; then
40385         if test "$GNULIB_FDOPEN" = 0; then
40386       GNULIB_FDOPEN=$gl_module_indicator_condition
40387     else
40388       GNULIB_FDOPEN="($GNULIB_FDOPEN || $gl_module_indicator_condition)"
40389     fi
40390   fi
40391
40392
40393
40394
40395
40396 $as_echo "#define GNULIB_TEST_FDOPEN 1" >>confdefs.h
40397
40398
40399
40400
40401
40402
40403
40404
40405
40406
40407   :
40408
40409
40410
40411
40412
40413   if test $ac_cv_func_ftruncate = yes; then
40414
40415
40416       case "$host_os" in
40417         mingw*)
40418                                                                       REPLACE_FTRUNCATE=1
40419           ;;
40420       esac
40421
40422   else
40423     HAVE_FTRUNCATE=0
40424   fi
40425
40426   if test $HAVE_FTRUNCATE = 0 || test $REPLACE_FTRUNCATE = 1; then
40427
40428
40429
40430
40431
40432
40433
40434
40435   gltests_LIBOBJS="$gltests_LIBOBJS ftruncate.$ac_objext"
40436
40437
40438   for ac_func in chsize
40439 do :
40440   ac_fn_c_check_func "$LINENO" "chsize" "ac_cv_func_chsize"
40441 if test "x$ac_cv_func_chsize" = xyes; then :
40442   cat >>confdefs.h <<_ACEOF
40443 #define HAVE_CHSIZE 1
40444 _ACEOF
40445
40446 fi
40447 done
40448
40449
40450   fi
40451
40452
40453
40454
40455
40456     if test "$GNULIB_FTRUNCATE" != 1; then
40457         if test "$GNULIB_FTRUNCATE" = 0; then
40458       GNULIB_FTRUNCATE=$gl_module_indicator_condition
40459     else
40460       GNULIB_FTRUNCATE="($GNULIB_FTRUNCATE || $gl_module_indicator_condition)"
40461     fi
40462   fi
40463
40464
40465
40466
40467
40468 $as_echo "#define GNULIB_TEST_FTRUNCATE 1" >>confdefs.h
40469
40470
40471
40472
40473
40474
40475   for ac_func in getpagesize
40476 do :
40477   ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
40478 if test "x$ac_cv_func_getpagesize" = xyes; then :
40479   cat >>confdefs.h <<_ACEOF
40480 #define HAVE_GETPAGESIZE 1
40481 _ACEOF
40482
40483 fi
40484 done
40485
40486   if test $ac_cv_func_getpagesize = no; then
40487     HAVE_GETPAGESIZE=0
40488     for ac_header in OS.h
40489 do :
40490   ac_fn_c_check_header_mongrel "$LINENO" "OS.h" "ac_cv_header_OS_h" "$ac_includes_default"
40491 if test "x$ac_cv_header_OS_h" = xyes; then :
40492   cat >>confdefs.h <<_ACEOF
40493 #define HAVE_OS_H 1
40494 _ACEOF
40495
40496 fi
40497
40498 done
40499
40500     if test $ac_cv_header_OS_h = yes; then
40501       HAVE_OS_H=1
40502     fi
40503     for ac_header in sys/param.h
40504 do :
40505   ac_fn_c_check_header_mongrel "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default"
40506 if test "x$ac_cv_header_sys_param_h" = xyes; then :
40507   cat >>confdefs.h <<_ACEOF
40508 #define HAVE_SYS_PARAM_H 1
40509 _ACEOF
40510
40511 fi
40512
40513 done
40514
40515     if test $ac_cv_header_sys_param_h = yes; then
40516       HAVE_SYS_PARAM_H=1
40517     fi
40518   fi
40519   case "$host_os" in
40520     mingw*)
40521       REPLACE_GETPAGESIZE=1
40522       ;;
40523   esac
40524       ac_fn_c_check_decl "$LINENO" "getpagesize" "ac_cv_have_decl_getpagesize" "$ac_includes_default"
40525 if test "x$ac_cv_have_decl_getpagesize" = xyes; then :
40526
40527 else
40528   HAVE_DECL_GETPAGESIZE=0
40529 fi
40530
40531
40532   if test $REPLACE_GETPAGESIZE = 1; then
40533
40534
40535
40536
40537
40538
40539
40540
40541   gltests_LIBOBJS="$gltests_LIBOBJS getpagesize.$ac_objext"
40542
40543   fi
40544
40545
40546
40547
40548
40549     if test "$GNULIB_GETPAGESIZE" != 1; then
40550         if test "$GNULIB_GETPAGESIZE" = 0; then
40551       GNULIB_GETPAGESIZE=$gl_module_indicator_condition
40552     else
40553       GNULIB_GETPAGESIZE="($GNULIB_GETPAGESIZE || $gl_module_indicator_condition)"
40554     fi
40555   fi
40556
40557
40558
40559
40560
40561 $as_echo "#define GNULIB_TEST_GETPAGESIZE 1" >>confdefs.h
40562
40563
40564
40565
40566
40567
40568
40569
40570
40571
40572               HAVE_INET_PTON=1
40573   INET_PTON_LIB=
40574
40575
40576
40577
40578   :
40579
40580
40581
40582
40583
40584   if test $ac_cv_header_sys_socket_h != yes; then
40585                     for ac_header in winsock2.h
40586 do :
40587   ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
40588 if test "x$ac_cv_header_winsock2_h" = xyes; then :
40589   cat >>confdefs.h <<_ACEOF
40590 #define HAVE_WINSOCK2_H 1
40591 _ACEOF
40592
40593 fi
40594
40595 done
40596
40597   fi
40598   if test "$ac_cv_header_winsock2_h" = yes; then
40599     HAVE_WINSOCK2_H=1
40600     UNISTD_H_HAVE_WINSOCK2_H=1
40601     SYS_IOCTL_H_HAVE_WINSOCK2_H=1
40602   else
40603     HAVE_WINSOCK2_H=0
40604   fi
40605
40606
40607   if test $HAVE_WINSOCK2_H = 1; then
40608     ac_fn_c_check_decl "$LINENO" "inet_pton" "ac_cv_have_decl_inet_pton" "#include <ws2tcpip.h>
40609 "
40610 if test "x$ac_cv_have_decl_inet_pton" = xyes; then :
40611   ac_have_decl=1
40612 else
40613   ac_have_decl=0
40614 fi
40615
40616 cat >>confdefs.h <<_ACEOF
40617 #define HAVE_DECL_INET_PTON $ac_have_decl
40618 _ACEOF
40619
40620     if test $ac_cv_have_decl_inet_pton = yes; then
40621                   REPLACE_INET_PTON=1
40622       INET_PTON_LIB="-lws2_32"
40623     else
40624       HAVE_DECL_INET_PTON=0
40625       HAVE_INET_PTON=0
40626     fi
40627   else
40628     gl_save_LIBS=$LIBS
40629     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_pton" >&5
40630 $as_echo_n "checking for library containing inet_pton... " >&6; }
40631 if ${ac_cv_search_inet_pton+:} false; then :
40632   $as_echo_n "(cached) " >&6
40633 else
40634   ac_func_search_save_LIBS=$LIBS
40635 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40636 /* end confdefs.h.  */
40637
40638 /* Override any GCC internal prototype to avoid an error.
40639    Use char because int might match the return type of a GCC
40640    builtin and then its argument prototype would still apply.  */
40641 #ifdef __cplusplus
40642 extern "C"
40643 #endif
40644 char inet_pton ();
40645 int
40646 main ()
40647 {
40648 return inet_pton ();
40649   ;
40650   return 0;
40651 }
40652 _ACEOF
40653 for ac_lib in '' nsl resolv; do
40654   if test -z "$ac_lib"; then
40655     ac_res="none required"
40656   else
40657     ac_res=-l$ac_lib
40658     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
40659   fi
40660   if ac_fn_c_try_link "$LINENO"; then :
40661   ac_cv_search_inet_pton=$ac_res
40662 fi
40663 rm -f core conftest.err conftest.$ac_objext \
40664     conftest$ac_exeext
40665   if ${ac_cv_search_inet_pton+:} false; then :
40666   break
40667 fi
40668 done
40669 if ${ac_cv_search_inet_pton+:} false; then :
40670
40671 else
40672   ac_cv_search_inet_pton=no
40673 fi
40674 rm conftest.$ac_ext
40675 LIBS=$ac_func_search_save_LIBS
40676 fi
40677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_pton" >&5
40678 $as_echo "$ac_cv_search_inet_pton" >&6; }
40679 ac_res=$ac_cv_search_inet_pton
40680 if test "$ac_res" != no; then :
40681   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
40682
40683 else
40684   for ac_func in inet_pton
40685 do :
40686   ac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton"
40687 if test "x$ac_cv_func_inet_pton" = xyes; then :
40688   cat >>confdefs.h <<_ACEOF
40689 #define HAVE_INET_PTON 1
40690 _ACEOF
40691
40692 fi
40693 done
40694
40695        if test $ac_cv_func_inet_pton = no; then
40696          HAVE_INET_PTON=0
40697        fi
40698
40699 fi
40700
40701     LIBS=$gl_save_LIBS
40702
40703     if test "$ac_cv_search_inet_pton" != "no" \
40704        && test "$ac_cv_search_inet_pton" != "none required"; then
40705       INET_PTON_LIB="$ac_cv_search_inet_pton"
40706     fi
40707
40708
40709   :
40710
40711
40712
40713
40714
40715     ac_fn_c_check_decl "$LINENO" "inet_pton" "ac_cv_have_decl_inet_pton" "#include <arpa/inet.h>
40716         #if HAVE_NETDB_H
40717         # include <netdb.h>
40718         #endif
40719
40720 "
40721 if test "x$ac_cv_have_decl_inet_pton" = xyes; then :
40722   ac_have_decl=1
40723 else
40724   ac_have_decl=0
40725 fi
40726
40727 cat >>confdefs.h <<_ACEOF
40728 #define HAVE_DECL_INET_PTON $ac_have_decl
40729 _ACEOF
40730
40731     if test $ac_cv_have_decl_inet_pton = no; then
40732       HAVE_DECL_INET_PTON=0
40733     fi
40734   fi
40735
40736
40737   if test $HAVE_INET_PTON = 0 || test $REPLACE_INET_NTOP = 1; then
40738
40739
40740
40741
40742
40743
40744
40745
40746   gltests_LIBOBJS="$gltests_LIBOBJS inet_pton.$ac_objext"
40747
40748
40749
40750
40751   fi
40752
40753
40754
40755
40756
40757     if test "$GNULIB_INET_PTON" != 1; then
40758         if test "$GNULIB_INET_PTON" = 0; then
40759       GNULIB_INET_PTON=$gl_module_indicator_condition
40760     else
40761       GNULIB_INET_PTON="($GNULIB_INET_PTON || $gl_module_indicator_condition)"
40762     fi
40763   fi
40764
40765
40766
40767
40768    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
40769 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
40770 if ${ac_cv_c_bigendian+:} false; then :
40771   $as_echo_n "(cached) " >&6
40772 else
40773   ac_cv_c_bigendian=unknown
40774     # See if we're dealing with a universal compiler.
40775     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40776 /* end confdefs.h.  */
40777 #ifndef __APPLE_CC__
40778                not a universal capable compiler
40779              #endif
40780              typedef int dummy;
40781
40782 _ACEOF
40783 if ac_fn_c_try_compile "$LINENO"; then :
40784
40785         # Check for potential -arch flags.  It is not universal unless
40786         # there are at least two -arch flags with different values.
40787         ac_arch=
40788         ac_prev=
40789         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
40790          if test -n "$ac_prev"; then
40791            case $ac_word in
40792              i?86 | x86_64 | ppc | ppc64)
40793                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
40794                  ac_arch=$ac_word
40795                else
40796                  ac_cv_c_bigendian=universal
40797                  break
40798                fi
40799                ;;
40800            esac
40801            ac_prev=
40802          elif test "x$ac_word" = "x-arch"; then
40803            ac_prev=arch
40804          fi
40805        done
40806 fi
40807 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40808     if test $ac_cv_c_bigendian = unknown; then
40809       # See if sys/param.h defines the BYTE_ORDER macro.
40810       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40811 /* end confdefs.h.  */
40812 #include <sys/types.h>
40813              #include <sys/param.h>
40814
40815 int
40816 main ()
40817 {
40818 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
40819                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
40820                      && LITTLE_ENDIAN)
40821               bogus endian macros
40822              #endif
40823
40824   ;
40825   return 0;
40826 }
40827 _ACEOF
40828 if ac_fn_c_try_compile "$LINENO"; then :
40829   # It does; now see whether it defined to BIG_ENDIAN or not.
40830          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40831 /* end confdefs.h.  */
40832 #include <sys/types.h>
40833                 #include <sys/param.h>
40834
40835 int
40836 main ()
40837 {
40838 #if BYTE_ORDER != BIG_ENDIAN
40839                  not big endian
40840                 #endif
40841
40842   ;
40843   return 0;
40844 }
40845 _ACEOF
40846 if ac_fn_c_try_compile "$LINENO"; then :
40847   ac_cv_c_bigendian=yes
40848 else
40849   ac_cv_c_bigendian=no
40850 fi
40851 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40852 fi
40853 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40854     fi
40855     if test $ac_cv_c_bigendian = unknown; then
40856       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
40857       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40858 /* end confdefs.h.  */
40859 #include <limits.h>
40860
40861 int
40862 main ()
40863 {
40864 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
40865               bogus endian macros
40866              #endif
40867
40868   ;
40869   return 0;
40870 }
40871 _ACEOF
40872 if ac_fn_c_try_compile "$LINENO"; then :
40873   # It does; now see whether it defined to _BIG_ENDIAN or not.
40874          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40875 /* end confdefs.h.  */
40876 #include <limits.h>
40877
40878 int
40879 main ()
40880 {
40881 #ifndef _BIG_ENDIAN
40882                  not big endian
40883                 #endif
40884
40885   ;
40886   return 0;
40887 }
40888 _ACEOF
40889 if ac_fn_c_try_compile "$LINENO"; then :
40890   ac_cv_c_bigendian=yes
40891 else
40892   ac_cv_c_bigendian=no
40893 fi
40894 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40895 fi
40896 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40897     fi
40898     if test $ac_cv_c_bigendian = unknown; then
40899       # Compile a test program.
40900       if test "$cross_compiling" = yes; then :
40901   # Try to guess by grepping values from an object file.
40902          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40903 /* end confdefs.h.  */
40904 short int ascii_mm[] =
40905                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
40906                 short int ascii_ii[] =
40907                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
40908                 int use_ascii (int i) {
40909                   return ascii_mm[i] + ascii_ii[i];
40910                 }
40911                 short int ebcdic_ii[] =
40912                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
40913                 short int ebcdic_mm[] =
40914                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
40915                 int use_ebcdic (int i) {
40916                   return ebcdic_mm[i] + ebcdic_ii[i];
40917                 }
40918                 extern int foo;
40919
40920 int
40921 main ()
40922 {
40923 return use_ascii (foo) == use_ebcdic (foo);
40924   ;
40925   return 0;
40926 }
40927 _ACEOF
40928 if ac_fn_c_try_compile "$LINENO"; then :
40929   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
40930               ac_cv_c_bigendian=yes
40931             fi
40932             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
40933               if test "$ac_cv_c_bigendian" = unknown; then
40934                 ac_cv_c_bigendian=no
40935               else
40936                 # finding both strings is unlikely to happen, but who knows?
40937                 ac_cv_c_bigendian=unknown
40938               fi
40939             fi
40940 fi
40941 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40942 else
40943   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40944 /* end confdefs.h.  */
40945 $ac_includes_default
40946 int
40947 main ()
40948 {
40949
40950              /* Are we little or big endian?  From Harbison&Steele.  */
40951              union
40952              {
40953                long int l;
40954                char c[sizeof (long int)];
40955              } u;
40956              u.l = 1;
40957              return u.c[sizeof (long int) - 1] == 1;
40958
40959   ;
40960   return 0;
40961 }
40962 _ACEOF
40963 if ac_fn_c_try_run "$LINENO"; then :
40964   ac_cv_c_bigendian=no
40965 else
40966   ac_cv_c_bigendian=yes
40967 fi
40968 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
40969   conftest.$ac_objext conftest.beam conftest.$ac_ext
40970 fi
40971
40972     fi
40973 fi
40974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
40975 $as_echo "$ac_cv_c_bigendian" >&6; }
40976  case $ac_cv_c_bigendian in #(
40977    yes)
40978      $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
40979 ;; #(
40980    no)
40981       ;; #(
40982    universal)
40983
40984 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
40985
40986      ;; #(
40987    *)
40988      as_fn_error $? "unknown endianness
40989  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
40990  esac
40991
40992
40993
40994
40995   :
40996
40997   :
40998   :
40999   :
41000   :
41001
41002
41003
41004
41005   HAVE_IOCTL=1
41006   if test "$ac_cv_header_winsock2_h" = yes; then
41007                 HAVE_IOCTL=0
41008   else
41009     for ac_func in ioctl
41010 do :
41011   ac_fn_c_check_func "$LINENO" "ioctl" "ac_cv_func_ioctl"
41012 if test "x$ac_cv_func_ioctl" = xyes; then :
41013   cat >>confdefs.h <<_ACEOF
41014 #define HAVE_IOCTL 1
41015 _ACEOF
41016
41017 fi
41018 done
41019
41020                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ioctl with POSIX signature" >&5
41021 $as_echo_n "checking for ioctl with POSIX signature... " >&6; }
41022 if ${gl_cv_func_ioctl_posix_signature+:} false; then :
41023   $as_echo_n "(cached) " >&6
41024 else
41025   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41026 /* end confdefs.h.  */
41027 #include <sys/ioctl.h>
41028 int
41029 main ()
41030 {
41031 extern
41032               #ifdef __cplusplus
41033               "C"
41034               #endif
41035               int ioctl (int, int, ...);
41036
41037   ;
41038   return 0;
41039 }
41040
41041 _ACEOF
41042 if ac_fn_c_try_compile "$LINENO"; then :
41043   gl_cv_func_ioctl_posix_signature=yes
41044 else
41045   gl_cv_func_ioctl_posix_signature=no
41046 fi
41047 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41048
41049 fi
41050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ioctl_posix_signature" >&5
41051 $as_echo "$gl_cv_func_ioctl_posix_signature" >&6; }
41052     if test $gl_cv_func_ioctl_posix_signature != yes; then
41053       REPLACE_IOCTL=1
41054     fi
41055   fi
41056
41057   if test $HAVE_IOCTL = 0 || test $REPLACE_IOCTL = 1; then
41058
41059
41060
41061
41062
41063
41064
41065
41066   gltests_LIBOBJS="$gltests_LIBOBJS ioctl.$ac_objext"
41067
41068   fi
41069
41070
41071
41072
41073
41074     if test "$GNULIB_IOCTL" != 1; then
41075         if test "$GNULIB_IOCTL" = 0; then
41076       GNULIB_IOCTL=$gl_module_indicator_condition
41077     else
41078       GNULIB_IOCTL="($GNULIB_IOCTL || $gl_module_indicator_condition)"
41079     fi
41080   fi
41081
41082
41083
41084
41085
41086 $as_echo "#define GNULIB_TEST_IOCTL 1" >>confdefs.h
41087
41088
41089
41090
41091   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5
41092 $as_echo_n "checking where to find the exponent in a 'float'... " >&6; }
41093 if ${gl_cv_cc_float_expbit0+:} false; then :
41094   $as_echo_n "(cached) " >&6
41095 else
41096
41097       if test "$cross_compiling" = yes; then :
41098   gl_cv_cc_float_expbit0="word 0 bit 23"
41099 else
41100   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41101 /* end confdefs.h.  */
41102
41103 #include <float.h>
41104 #include <stddef.h>
41105 #include <stdio.h>
41106 #include <string.h>
41107 #define NWORDS \
41108   ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
41109 typedef union { float value; unsigned int word[NWORDS]; } memory_float;
41110 static unsigned int ored_words[NWORDS];
41111 static unsigned int anded_words[NWORDS];
41112 static void add_to_ored_words (float x)
41113 {
41114   memory_float m;
41115   size_t i;
41116   /* Clear it first, in case
41117      sizeof (float) < sizeof (memory_float).  */
41118   memset (&m, 0, sizeof (memory_float));
41119   m.value = x;
41120   for (i = 0; i < NWORDS; i++)
41121     {
41122       ored_words[i] |= m.word[i];
41123       anded_words[i] &= m.word[i];
41124     }
41125 }
41126 int main ()
41127 {
41128   size_t j;
41129   FILE *fp = fopen ("conftest.out", "w");
41130   if (fp == NULL)
41131     return 1;
41132   for (j = 0; j < NWORDS; j++)
41133     anded_words[j] = ~ (unsigned int) 0;
41134   add_to_ored_words (0.25f);
41135   add_to_ored_words (0.5f);
41136   add_to_ored_words (1.0f);
41137   add_to_ored_words (2.0f);
41138   add_to_ored_words (4.0f);
41139   /* Remove bits that are common (e.g. if representation of the first mantissa
41140      bit is explicit).  */
41141   for (j = 0; j < NWORDS; j++)
41142     ored_words[j] &= ~anded_words[j];
41143   /* Now find the nonzero word.  */
41144   for (j = 0; j < NWORDS; j++)
41145     if (ored_words[j] != 0)
41146       break;
41147   if (j < NWORDS)
41148     {
41149       size_t i;
41150       for (i = j + 1; i < NWORDS; i++)
41151         if (ored_words[i] != 0)
41152           {
41153             fprintf (fp, "unknown");
41154             return (fclose (fp) != 0);
41155           }
41156       for (i = 0; ; i++)
41157         if ((ored_words[j] >> i) & 1)
41158           {
41159             fprintf (fp, "word %d bit %d", (int) j, (int) i);
41160             return (fclose (fp) != 0);
41161           }
41162     }
41163   fprintf (fp, "unknown");
41164   return (fclose (fp) != 0);
41165 }
41166
41167 _ACEOF
41168 if ac_fn_c_try_run "$LINENO"; then :
41169   gl_cv_cc_float_expbit0=`cat conftest.out`
41170 else
41171   gl_cv_cc_float_expbit0="unknown"
41172 fi
41173 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41174   conftest.$ac_objext conftest.beam conftest.$ac_ext
41175 fi
41176
41177       rm -f conftest.out
41178
41179 fi
41180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5
41181 $as_echo "$gl_cv_cc_float_expbit0" >&6; }
41182   case "$gl_cv_cc_float_expbit0" in
41183     word*bit*)
41184       word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
41185       bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'`
41186
41187 cat >>confdefs.h <<_ACEOF
41188 #define FLT_EXPBIT0_WORD $word
41189 _ACEOF
41190
41191
41192 cat >>confdefs.h <<_ACEOF
41193 #define FLT_EXPBIT0_BIT $bit
41194 _ACEOF
41195
41196       ;;
41197   esac
41198
41199
41200   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
41201 $as_echo_n "checking where to find the exponent in a 'double'... " >&6; }
41202 if ${gl_cv_cc_double_expbit0+:} false; then :
41203   $as_echo_n "(cached) " >&6
41204 else
41205
41206       if test "$cross_compiling" = yes; then :
41207
41208                                                                       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41209 /* end confdefs.h.  */
41210
41211 #if defined arm || defined __arm || defined __arm__
41212   mixed_endianness
41213 #endif
41214
41215 _ACEOF
41216 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41217   $EGREP "mixed_endianness" >/dev/null 2>&1; then :
41218   gl_cv_cc_double_expbit0="unknown"
41219 else
41220
41221                                                          :
41222 if ${ac_cv_c_bigendian+:} false; then :
41223   $as_echo_n "(cached) " >&6
41224 else
41225   ac_cv_c_bigendian=unknown
41226     # See if we're dealing with a universal compiler.
41227     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41228 /* end confdefs.h.  */
41229 #ifndef __APPLE_CC__
41230                not a universal capable compiler
41231              #endif
41232              typedef int dummy;
41233
41234 _ACEOF
41235 if ac_fn_c_try_compile "$LINENO"; then :
41236
41237         # Check for potential -arch flags.  It is not universal unless
41238         # there are at least two -arch flags with different values.
41239         ac_arch=
41240         ac_prev=
41241         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
41242          if test -n "$ac_prev"; then
41243            case $ac_word in
41244              i?86 | x86_64 | ppc | ppc64)
41245                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
41246                  ac_arch=$ac_word
41247                else
41248                  ac_cv_c_bigendian=universal
41249                  break
41250                fi
41251                ;;
41252            esac
41253            ac_prev=
41254          elif test "x$ac_word" = "x-arch"; then
41255            ac_prev=arch
41256          fi
41257        done
41258 fi
41259 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41260     if test $ac_cv_c_bigendian = unknown; then
41261       # See if sys/param.h defines the BYTE_ORDER macro.
41262       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41263 /* end confdefs.h.  */
41264 #include <sys/types.h>
41265              #include <sys/param.h>
41266
41267 int
41268 main ()
41269 {
41270 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
41271                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
41272                      && LITTLE_ENDIAN)
41273               bogus endian macros
41274              #endif
41275
41276   ;
41277   return 0;
41278 }
41279 _ACEOF
41280 if ac_fn_c_try_compile "$LINENO"; then :
41281   # It does; now see whether it defined to BIG_ENDIAN or not.
41282          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41283 /* end confdefs.h.  */
41284 #include <sys/types.h>
41285                 #include <sys/param.h>
41286
41287 int
41288 main ()
41289 {
41290 #if BYTE_ORDER != BIG_ENDIAN
41291                  not big endian
41292                 #endif
41293
41294   ;
41295   return 0;
41296 }
41297 _ACEOF
41298 if ac_fn_c_try_compile "$LINENO"; then :
41299   ac_cv_c_bigendian=yes
41300 else
41301   ac_cv_c_bigendian=no
41302 fi
41303 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41304 fi
41305 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41306     fi
41307     if test $ac_cv_c_bigendian = unknown; then
41308       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
41309       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41310 /* end confdefs.h.  */
41311 #include <limits.h>
41312
41313 int
41314 main ()
41315 {
41316 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
41317               bogus endian macros
41318              #endif
41319
41320   ;
41321   return 0;
41322 }
41323 _ACEOF
41324 if ac_fn_c_try_compile "$LINENO"; then :
41325   # It does; now see whether it defined to _BIG_ENDIAN or not.
41326          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41327 /* end confdefs.h.  */
41328 #include <limits.h>
41329
41330 int
41331 main ()
41332 {
41333 #ifndef _BIG_ENDIAN
41334                  not big endian
41335                 #endif
41336
41337   ;
41338   return 0;
41339 }
41340 _ACEOF
41341 if ac_fn_c_try_compile "$LINENO"; then :
41342   ac_cv_c_bigendian=yes
41343 else
41344   ac_cv_c_bigendian=no
41345 fi
41346 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41347 fi
41348 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41349     fi
41350     if test $ac_cv_c_bigendian = unknown; then
41351       # Compile a test program.
41352       if test "$cross_compiling" = yes; then :
41353   # Try to guess by grepping values from an object file.
41354          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41355 /* end confdefs.h.  */
41356 short int ascii_mm[] =
41357                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
41358                 short int ascii_ii[] =
41359                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
41360                 int use_ascii (int i) {
41361                   return ascii_mm[i] + ascii_ii[i];
41362                 }
41363                 short int ebcdic_ii[] =
41364                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
41365                 short int ebcdic_mm[] =
41366                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
41367                 int use_ebcdic (int i) {
41368                   return ebcdic_mm[i] + ebcdic_ii[i];
41369                 }
41370                 extern int foo;
41371
41372 int
41373 main ()
41374 {
41375 return use_ascii (foo) == use_ebcdic (foo);
41376   ;
41377   return 0;
41378 }
41379 _ACEOF
41380 if ac_fn_c_try_compile "$LINENO"; then :
41381   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
41382               ac_cv_c_bigendian=yes
41383             fi
41384             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
41385               if test "$ac_cv_c_bigendian" = unknown; then
41386                 ac_cv_c_bigendian=no
41387               else
41388                 # finding both strings is unlikely to happen, but who knows?
41389                 ac_cv_c_bigendian=unknown
41390               fi
41391             fi
41392 fi
41393 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41394 else
41395   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41396 /* end confdefs.h.  */
41397 $ac_includes_default
41398 int
41399 main ()
41400 {
41401
41402              /* Are we little or big endian?  From Harbison&Steele.  */
41403              union
41404              {
41405                long int l;
41406                char c[sizeof (long int)];
41407              } u;
41408              u.l = 1;
41409              return u.c[sizeof (long int) - 1] == 1;
41410
41411   ;
41412   return 0;
41413 }
41414 _ACEOF
41415 if ac_fn_c_try_run "$LINENO"; then :
41416   ac_cv_c_bigendian=no
41417 else
41418   ac_cv_c_bigendian=yes
41419 fi
41420 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41421   conftest.$ac_objext conftest.beam conftest.$ac_ext
41422 fi
41423
41424     fi
41425 fi
41426 :
41427  case $ac_cv_c_bigendian in #(
41428    yes)
41429      gl_cv_cc_double_expbit0="word 0 bit 20";; #(
41430    no)
41431      gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
41432    universal)
41433
41434 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
41435
41436      ;; #(
41437    *)
41438      gl_cv_cc_double_expbit0="unknown" ;;
41439  esac
41440
41441
41442 fi
41443 rm -f conftest*
41444
41445
41446 else
41447   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41448 /* end confdefs.h.  */
41449
41450 #include <float.h>
41451 #include <stddef.h>
41452 #include <stdio.h>
41453 #include <string.h>
41454 #define NWORDS \
41455   ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
41456 typedef union { double value; unsigned int word[NWORDS]; } memory_double;
41457 static unsigned int ored_words[NWORDS];
41458 static unsigned int anded_words[NWORDS];
41459 static void add_to_ored_words (double x)
41460 {
41461   memory_double m;
41462   size_t i;
41463   /* Clear it first, in case sizeof (double) < sizeof (memory_double).  */
41464   memset (&m, 0, sizeof (memory_double));
41465   m.value = x;
41466   for (i = 0; i < NWORDS; i++)
41467     {
41468       ored_words[i] |= m.word[i];
41469       anded_words[i] &= m.word[i];
41470     }
41471 }
41472 int main ()
41473 {
41474   size_t j;
41475   FILE *fp = fopen ("conftest.out", "w");
41476   if (fp == NULL)
41477     return 1;
41478   for (j = 0; j < NWORDS; j++)
41479     anded_words[j] = ~ (unsigned int) 0;
41480   add_to_ored_words (0.25);
41481   add_to_ored_words (0.5);
41482   add_to_ored_words (1.0);
41483   add_to_ored_words (2.0);
41484   add_to_ored_words (4.0);
41485   /* Remove bits that are common (e.g. if representation of the first mantissa
41486      bit is explicit).  */
41487   for (j = 0; j < NWORDS; j++)
41488     ored_words[j] &= ~anded_words[j];
41489   /* Now find the nonzero word.  */
41490   for (j = 0; j < NWORDS; j++)
41491     if (ored_words[j] != 0)
41492       break;
41493   if (j < NWORDS)
41494     {
41495       size_t i;
41496       for (i = j + 1; i < NWORDS; i++)
41497         if (ored_words[i] != 0)
41498           {
41499             fprintf (fp, "unknown");
41500             return (fclose (fp) != 0);
41501           }
41502       for (i = 0; ; i++)
41503         if ((ored_words[j] >> i) & 1)
41504           {
41505             fprintf (fp, "word %d bit %d", (int) j, (int) i);
41506             return (fclose (fp) != 0);
41507           }
41508     }
41509   fprintf (fp, "unknown");
41510   return (fclose (fp) != 0);
41511 }
41512
41513 _ACEOF
41514 if ac_fn_c_try_run "$LINENO"; then :
41515   gl_cv_cc_double_expbit0=`cat conftest.out`
41516 else
41517   gl_cv_cc_double_expbit0="unknown"
41518 fi
41519 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41520   conftest.$ac_objext conftest.beam conftest.$ac_ext
41521 fi
41522
41523       rm -f conftest.out
41524
41525 fi
41526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
41527 $as_echo "$gl_cv_cc_double_expbit0" >&6; }
41528   case "$gl_cv_cc_double_expbit0" in
41529     word*bit*)
41530       word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
41531       bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
41532
41533 cat >>confdefs.h <<_ACEOF
41534 #define DBL_EXPBIT0_WORD $word
41535 _ACEOF
41536
41537
41538 cat >>confdefs.h <<_ACEOF
41539 #define DBL_EXPBIT0_BIT $bit
41540 _ACEOF
41541
41542       ;;
41543   esac
41544
41545
41546
41547   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5
41548 $as_echo_n "checking where to find the exponent in a 'long double'... " >&6; }
41549 if ${gl_cv_cc_long_double_expbit0+:} false; then :
41550   $as_echo_n "(cached) " >&6
41551 else
41552
41553       if test "$cross_compiling" = yes; then :
41554
41555                               gl_cv_cc_long_double_expbit0="unknown"
41556
41557 else
41558   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41559 /* end confdefs.h.  */
41560
41561 #include <float.h>
41562 #include <stddef.h>
41563 #include <stdio.h>
41564 #include <string.h>
41565 #define NWORDS \
41566   ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
41567 typedef union { long double value; unsigned int word[NWORDS]; }
41568         memory_long_double;
41569 static unsigned int ored_words[NWORDS];
41570 static unsigned int anded_words[NWORDS];
41571 static void add_to_ored_words (long double x)
41572 {
41573   memory_long_double m;
41574   size_t i;
41575   /* Clear it first, in case
41576      sizeof (long double) < sizeof (memory_long_double).  */
41577   memset (&m, 0, sizeof (memory_long_double));
41578   m.value = x;
41579   for (i = 0; i < NWORDS; i++)
41580     {
41581       ored_words[i] |= m.word[i];
41582       anded_words[i] &= m.word[i];
41583     }
41584 }
41585 int main ()
41586 {
41587   size_t j;
41588   FILE *fp = fopen ("conftest.out", "w");
41589   if (fp == NULL)
41590     return 1;
41591   for (j = 0; j < NWORDS; j++)
41592     anded_words[j] = ~ (unsigned int) 0;
41593   add_to_ored_words (0.25L);
41594   add_to_ored_words (0.5L);
41595   add_to_ored_words (1.0L);
41596   add_to_ored_words (2.0L);
41597   add_to_ored_words (4.0L);
41598   /* Remove bits that are common (e.g. if representation of the first mantissa
41599      bit is explicit).  */
41600   for (j = 0; j < NWORDS; j++)
41601     ored_words[j] &= ~anded_words[j];
41602   /* Now find the nonzero word.  */
41603   for (j = 0; j < NWORDS; j++)
41604     if (ored_words[j] != 0)
41605       break;
41606   if (j < NWORDS)
41607     {
41608       size_t i;
41609       for (i = j + 1; i < NWORDS; i++)
41610         if (ored_words[i] != 0)
41611           {
41612             fprintf (fp, "unknown");
41613             return (fclose (fp) != 0);
41614           }
41615       for (i = 0; ; i++)
41616         if ((ored_words[j] >> i) & 1)
41617           {
41618             fprintf (fp, "word %d bit %d", (int) j, (int) i);
41619             return (fclose (fp) != 0);
41620           }
41621     }
41622   fprintf (fp, "unknown");
41623   return (fclose (fp) != 0);
41624 }
41625
41626 _ACEOF
41627 if ac_fn_c_try_run "$LINENO"; then :
41628   gl_cv_cc_long_double_expbit0=`cat conftest.out`
41629 else
41630   gl_cv_cc_long_double_expbit0="unknown"
41631 fi
41632 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41633   conftest.$ac_objext conftest.beam conftest.$ac_ext
41634 fi
41635
41636       rm -f conftest.out
41637
41638 fi
41639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5
41640 $as_echo "$gl_cv_cc_long_double_expbit0" >&6; }
41641   case "$gl_cv_cc_long_double_expbit0" in
41642     word*bit*)
41643       word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
41644       bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'`
41645
41646 cat >>confdefs.h <<_ACEOF
41647 #define LDBL_EXPBIT0_WORD $word
41648 _ACEOF
41649
41650
41651 cat >>confdefs.h <<_ACEOF
41652 #define LDBL_EXPBIT0_BIT $bit
41653 _ACEOF
41654
41655       ;;
41656   esac
41657
41658
41659
41660   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5
41661 $as_echo_n "checking where to find the exponent in a 'float'... " >&6; }
41662 if ${gl_cv_cc_float_expbit0+:} false; then :
41663   $as_echo_n "(cached) " >&6
41664 else
41665
41666       if test "$cross_compiling" = yes; then :
41667   gl_cv_cc_float_expbit0="word 0 bit 23"
41668 else
41669   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41670 /* end confdefs.h.  */
41671
41672 #include <float.h>
41673 #include <stddef.h>
41674 #include <stdio.h>
41675 #include <string.h>
41676 #define NWORDS \
41677   ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
41678 typedef union { float value; unsigned int word[NWORDS]; } memory_float;
41679 static unsigned int ored_words[NWORDS];
41680 static unsigned int anded_words[NWORDS];
41681 static void add_to_ored_words (float x)
41682 {
41683   memory_float m;
41684   size_t i;
41685   /* Clear it first, in case
41686      sizeof (float) < sizeof (memory_float).  */
41687   memset (&m, 0, sizeof (memory_float));
41688   m.value = x;
41689   for (i = 0; i < NWORDS; i++)
41690     {
41691       ored_words[i] |= m.word[i];
41692       anded_words[i] &= m.word[i];
41693     }
41694 }
41695 int main ()
41696 {
41697   size_t j;
41698   FILE *fp = fopen ("conftest.out", "w");
41699   if (fp == NULL)
41700     return 1;
41701   for (j = 0; j < NWORDS; j++)
41702     anded_words[j] = ~ (unsigned int) 0;
41703   add_to_ored_words (0.25f);
41704   add_to_ored_words (0.5f);
41705   add_to_ored_words (1.0f);
41706   add_to_ored_words (2.0f);
41707   add_to_ored_words (4.0f);
41708   /* Remove bits that are common (e.g. if representation of the first mantissa
41709      bit is explicit).  */
41710   for (j = 0; j < NWORDS; j++)
41711     ored_words[j] &= ~anded_words[j];
41712   /* Now find the nonzero word.  */
41713   for (j = 0; j < NWORDS; j++)
41714     if (ored_words[j] != 0)
41715       break;
41716   if (j < NWORDS)
41717     {
41718       size_t i;
41719       for (i = j + 1; i < NWORDS; i++)
41720         if (ored_words[i] != 0)
41721           {
41722             fprintf (fp, "unknown");
41723             return (fclose (fp) != 0);
41724           }
41725       for (i = 0; ; i++)
41726         if ((ored_words[j] >> i) & 1)
41727           {
41728             fprintf (fp, "word %d bit %d", (int) j, (int) i);
41729             return (fclose (fp) != 0);
41730           }
41731     }
41732   fprintf (fp, "unknown");
41733   return (fclose (fp) != 0);
41734 }
41735
41736 _ACEOF
41737 if ac_fn_c_try_run "$LINENO"; then :
41738   gl_cv_cc_float_expbit0=`cat conftest.out`
41739 else
41740   gl_cv_cc_float_expbit0="unknown"
41741 fi
41742 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41743   conftest.$ac_objext conftest.beam conftest.$ac_ext
41744 fi
41745
41746       rm -f conftest.out
41747
41748 fi
41749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5
41750 $as_echo "$gl_cv_cc_float_expbit0" >&6; }
41751   case "$gl_cv_cc_float_expbit0" in
41752     word*bit*)
41753       word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
41754       bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'`
41755
41756 cat >>confdefs.h <<_ACEOF
41757 #define FLT_EXPBIT0_WORD $word
41758 _ACEOF
41759
41760
41761 cat >>confdefs.h <<_ACEOF
41762 #define FLT_EXPBIT0_BIT $bit
41763 _ACEOF
41764
41765       ;;
41766   esac
41767
41768
41769   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
41770 $as_echo_n "checking where to find the exponent in a 'double'... " >&6; }
41771 if ${gl_cv_cc_double_expbit0+:} false; then :
41772   $as_echo_n "(cached) " >&6
41773 else
41774
41775       if test "$cross_compiling" = yes; then :
41776
41777                                                                       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41778 /* end confdefs.h.  */
41779
41780 #if defined arm || defined __arm || defined __arm__
41781   mixed_endianness
41782 #endif
41783
41784 _ACEOF
41785 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41786   $EGREP "mixed_endianness" >/dev/null 2>&1; then :
41787   gl_cv_cc_double_expbit0="unknown"
41788 else
41789
41790                                                          :
41791 if ${ac_cv_c_bigendian+:} false; then :
41792   $as_echo_n "(cached) " >&6
41793 else
41794   ac_cv_c_bigendian=unknown
41795     # See if we're dealing with a universal compiler.
41796     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41797 /* end confdefs.h.  */
41798 #ifndef __APPLE_CC__
41799                not a universal capable compiler
41800              #endif
41801              typedef int dummy;
41802
41803 _ACEOF
41804 if ac_fn_c_try_compile "$LINENO"; then :
41805
41806         # Check for potential -arch flags.  It is not universal unless
41807         # there are at least two -arch flags with different values.
41808         ac_arch=
41809         ac_prev=
41810         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
41811          if test -n "$ac_prev"; then
41812            case $ac_word in
41813              i?86 | x86_64 | ppc | ppc64)
41814                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
41815                  ac_arch=$ac_word
41816                else
41817                  ac_cv_c_bigendian=universal
41818                  break
41819                fi
41820                ;;
41821            esac
41822            ac_prev=
41823          elif test "x$ac_word" = "x-arch"; then
41824            ac_prev=arch
41825          fi
41826        done
41827 fi
41828 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41829     if test $ac_cv_c_bigendian = unknown; then
41830       # See if sys/param.h defines the BYTE_ORDER macro.
41831       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41832 /* end confdefs.h.  */
41833 #include <sys/types.h>
41834              #include <sys/param.h>
41835
41836 int
41837 main ()
41838 {
41839 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
41840                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
41841                      && LITTLE_ENDIAN)
41842               bogus endian macros
41843              #endif
41844
41845   ;
41846   return 0;
41847 }
41848 _ACEOF
41849 if ac_fn_c_try_compile "$LINENO"; then :
41850   # It does; now see whether it defined to BIG_ENDIAN or not.
41851          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41852 /* end confdefs.h.  */
41853 #include <sys/types.h>
41854                 #include <sys/param.h>
41855
41856 int
41857 main ()
41858 {
41859 #if BYTE_ORDER != BIG_ENDIAN
41860                  not big endian
41861                 #endif
41862
41863   ;
41864   return 0;
41865 }
41866 _ACEOF
41867 if ac_fn_c_try_compile "$LINENO"; then :
41868   ac_cv_c_bigendian=yes
41869 else
41870   ac_cv_c_bigendian=no
41871 fi
41872 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41873 fi
41874 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41875     fi
41876     if test $ac_cv_c_bigendian = unknown; then
41877       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
41878       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41879 /* end confdefs.h.  */
41880 #include <limits.h>
41881
41882 int
41883 main ()
41884 {
41885 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
41886               bogus endian macros
41887              #endif
41888
41889   ;
41890   return 0;
41891 }
41892 _ACEOF
41893 if ac_fn_c_try_compile "$LINENO"; then :
41894   # It does; now see whether it defined to _BIG_ENDIAN or not.
41895          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41896 /* end confdefs.h.  */
41897 #include <limits.h>
41898
41899 int
41900 main ()
41901 {
41902 #ifndef _BIG_ENDIAN
41903                  not big endian
41904                 #endif
41905
41906   ;
41907   return 0;
41908 }
41909 _ACEOF
41910 if ac_fn_c_try_compile "$LINENO"; then :
41911   ac_cv_c_bigendian=yes
41912 else
41913   ac_cv_c_bigendian=no
41914 fi
41915 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41916 fi
41917 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41918     fi
41919     if test $ac_cv_c_bigendian = unknown; then
41920       # Compile a test program.
41921       if test "$cross_compiling" = yes; then :
41922   # Try to guess by grepping values from an object file.
41923          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41924 /* end confdefs.h.  */
41925 short int ascii_mm[] =
41926                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
41927                 short int ascii_ii[] =
41928                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
41929                 int use_ascii (int i) {
41930                   return ascii_mm[i] + ascii_ii[i];
41931                 }
41932                 short int ebcdic_ii[] =
41933                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
41934                 short int ebcdic_mm[] =
41935                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
41936                 int use_ebcdic (int i) {
41937                   return ebcdic_mm[i] + ebcdic_ii[i];
41938                 }
41939                 extern int foo;
41940
41941 int
41942 main ()
41943 {
41944 return use_ascii (foo) == use_ebcdic (foo);
41945   ;
41946   return 0;
41947 }
41948 _ACEOF
41949 if ac_fn_c_try_compile "$LINENO"; then :
41950   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
41951               ac_cv_c_bigendian=yes
41952             fi
41953             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
41954               if test "$ac_cv_c_bigendian" = unknown; then
41955                 ac_cv_c_bigendian=no
41956               else
41957                 # finding both strings is unlikely to happen, but who knows?
41958                 ac_cv_c_bigendian=unknown
41959               fi
41960             fi
41961 fi
41962 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41963 else
41964   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41965 /* end confdefs.h.  */
41966 $ac_includes_default
41967 int
41968 main ()
41969 {
41970
41971              /* Are we little or big endian?  From Harbison&Steele.  */
41972              union
41973              {
41974                long int l;
41975                char c[sizeof (long int)];
41976              } u;
41977              u.l = 1;
41978              return u.c[sizeof (long int) - 1] == 1;
41979
41980   ;
41981   return 0;
41982 }
41983 _ACEOF
41984 if ac_fn_c_try_run "$LINENO"; then :
41985   ac_cv_c_bigendian=no
41986 else
41987   ac_cv_c_bigendian=yes
41988 fi
41989 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41990   conftest.$ac_objext conftest.beam conftest.$ac_ext
41991 fi
41992
41993     fi
41994 fi
41995 :
41996  case $ac_cv_c_bigendian in #(
41997    yes)
41998      gl_cv_cc_double_expbit0="word 0 bit 20";; #(
41999    no)
42000      gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
42001    universal)
42002
42003 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
42004
42005      ;; #(
42006    *)
42007      gl_cv_cc_double_expbit0="unknown" ;;
42008  esac
42009
42010
42011 fi
42012 rm -f conftest*
42013
42014
42015 else
42016   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42017 /* end confdefs.h.  */
42018
42019 #include <float.h>
42020 #include <stddef.h>
42021 #include <stdio.h>
42022 #include <string.h>
42023 #define NWORDS \
42024   ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
42025 typedef union { double value; unsigned int word[NWORDS]; } memory_double;
42026 static unsigned int ored_words[NWORDS];
42027 static unsigned int anded_words[NWORDS];
42028 static void add_to_ored_words (double x)
42029 {
42030   memory_double m;
42031   size_t i;
42032   /* Clear it first, in case sizeof (double) < sizeof (memory_double).  */
42033   memset (&m, 0, sizeof (memory_double));
42034   m.value = x;
42035   for (i = 0; i < NWORDS; i++)
42036     {
42037       ored_words[i] |= m.word[i];
42038       anded_words[i] &= m.word[i];
42039     }
42040 }
42041 int main ()
42042 {
42043   size_t j;
42044   FILE *fp = fopen ("conftest.out", "w");
42045   if (fp == NULL)
42046     return 1;
42047   for (j = 0; j < NWORDS; j++)
42048     anded_words[j] = ~ (unsigned int) 0;
42049   add_to_ored_words (0.25);
42050   add_to_ored_words (0.5);
42051   add_to_ored_words (1.0);
42052   add_to_ored_words (2.0);
42053   add_to_ored_words (4.0);
42054   /* Remove bits that are common (e.g. if representation of the first mantissa
42055      bit is explicit).  */
42056   for (j = 0; j < NWORDS; j++)
42057     ored_words[j] &= ~anded_words[j];
42058   /* Now find the nonzero word.  */
42059   for (j = 0; j < NWORDS; j++)
42060     if (ored_words[j] != 0)
42061       break;
42062   if (j < NWORDS)
42063     {
42064       size_t i;
42065       for (i = j + 1; i < NWORDS; i++)
42066         if (ored_words[i] != 0)
42067           {
42068             fprintf (fp, "unknown");
42069             return (fclose (fp) != 0);
42070           }
42071       for (i = 0; ; i++)
42072         if ((ored_words[j] >> i) & 1)
42073           {
42074             fprintf (fp, "word %d bit %d", (int) j, (int) i);
42075             return (fclose (fp) != 0);
42076           }
42077     }
42078   fprintf (fp, "unknown");
42079   return (fclose (fp) != 0);
42080 }
42081
42082 _ACEOF
42083 if ac_fn_c_try_run "$LINENO"; then :
42084   gl_cv_cc_double_expbit0=`cat conftest.out`
42085 else
42086   gl_cv_cc_double_expbit0="unknown"
42087 fi
42088 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42089   conftest.$ac_objext conftest.beam conftest.$ac_ext
42090 fi
42091
42092       rm -f conftest.out
42093
42094 fi
42095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
42096 $as_echo "$gl_cv_cc_double_expbit0" >&6; }
42097   case "$gl_cv_cc_double_expbit0" in
42098     word*bit*)
42099       word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
42100       bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
42101
42102 cat >>confdefs.h <<_ACEOF
42103 #define DBL_EXPBIT0_WORD $word
42104 _ACEOF
42105
42106
42107 cat >>confdefs.h <<_ACEOF
42108 #define DBL_EXPBIT0_BIT $bit
42109 _ACEOF
42110
42111       ;;
42112   esac
42113
42114
42115
42116   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5
42117 $as_echo_n "checking where to find the exponent in a 'long double'... " >&6; }
42118 if ${gl_cv_cc_long_double_expbit0+:} false; then :
42119   $as_echo_n "(cached) " >&6
42120 else
42121
42122       if test "$cross_compiling" = yes; then :
42123
42124                               gl_cv_cc_long_double_expbit0="unknown"
42125
42126 else
42127   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42128 /* end confdefs.h.  */
42129
42130 #include <float.h>
42131 #include <stddef.h>
42132 #include <stdio.h>
42133 #include <string.h>
42134 #define NWORDS \
42135   ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
42136 typedef union { long double value; unsigned int word[NWORDS]; }
42137         memory_long_double;
42138 static unsigned int ored_words[NWORDS];
42139 static unsigned int anded_words[NWORDS];
42140 static void add_to_ored_words (long double x)
42141 {
42142   memory_long_double m;
42143   size_t i;
42144   /* Clear it first, in case
42145      sizeof (long double) < sizeof (memory_long_double).  */
42146   memset (&m, 0, sizeof (memory_long_double));
42147   m.value = x;
42148   for (i = 0; i < NWORDS; i++)
42149     {
42150       ored_words[i] |= m.word[i];
42151       anded_words[i] &= m.word[i];
42152     }
42153 }
42154 int main ()
42155 {
42156   size_t j;
42157   FILE *fp = fopen ("conftest.out", "w");
42158   if (fp == NULL)
42159     return 1;
42160   for (j = 0; j < NWORDS; j++)
42161     anded_words[j] = ~ (unsigned int) 0;
42162   add_to_ored_words (0.25L);
42163   add_to_ored_words (0.5L);
42164   add_to_ored_words (1.0L);
42165   add_to_ored_words (2.0L);
42166   add_to_ored_words (4.0L);
42167   /* Remove bits that are common (e.g. if representation of the first mantissa
42168      bit is explicit).  */
42169   for (j = 0; j < NWORDS; j++)
42170     ored_words[j] &= ~anded_words[j];
42171   /* Now find the nonzero word.  */
42172   for (j = 0; j < NWORDS; j++)
42173     if (ored_words[j] != 0)
42174       break;
42175   if (j < NWORDS)
42176     {
42177       size_t i;
42178       for (i = j + 1; i < NWORDS; i++)
42179         if (ored_words[i] != 0)
42180           {
42181             fprintf (fp, "unknown");
42182             return (fclose (fp) != 0);
42183           }
42184       for (i = 0; ; i++)
42185         if ((ored_words[j] >> i) & 1)
42186           {
42187             fprintf (fp, "word %d bit %d", (int) j, (int) i);
42188             return (fclose (fp) != 0);
42189           }
42190     }
42191   fprintf (fp, "unknown");
42192   return (fclose (fp) != 0);
42193 }
42194
42195 _ACEOF
42196 if ac_fn_c_try_run "$LINENO"; then :
42197   gl_cv_cc_long_double_expbit0=`cat conftest.out`
42198 else
42199   gl_cv_cc_long_double_expbit0="unknown"
42200 fi
42201 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42202   conftest.$ac_objext conftest.beam conftest.$ac_ext
42203 fi
42204
42205       rm -f conftest.out
42206
42207 fi
42208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5
42209 $as_echo "$gl_cv_cc_long_double_expbit0" >&6; }
42210   case "$gl_cv_cc_long_double_expbit0" in
42211     word*bit*)
42212       word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
42213       bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'`
42214
42215 cat >>confdefs.h <<_ACEOF
42216 #define LDBL_EXPBIT0_WORD $word
42217 _ACEOF
42218
42219
42220 cat >>confdefs.h <<_ACEOF
42221 #define LDBL_EXPBIT0_BIT $bit
42222 _ACEOF
42223
42224       ;;
42225   esac
42226
42227
42228
42229   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
42230 $as_echo_n "checking where to find the exponent in a 'double'... " >&6; }
42231 if ${gl_cv_cc_double_expbit0+:} false; then :
42232   $as_echo_n "(cached) " >&6
42233 else
42234
42235       if test "$cross_compiling" = yes; then :
42236
42237                                                                       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42238 /* end confdefs.h.  */
42239
42240 #if defined arm || defined __arm || defined __arm__
42241   mixed_endianness
42242 #endif
42243
42244 _ACEOF
42245 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
42246   $EGREP "mixed_endianness" >/dev/null 2>&1; then :
42247   gl_cv_cc_double_expbit0="unknown"
42248 else
42249
42250                                                          :
42251 if ${ac_cv_c_bigendian+:} false; then :
42252   $as_echo_n "(cached) " >&6
42253 else
42254   ac_cv_c_bigendian=unknown
42255     # See if we're dealing with a universal compiler.
42256     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42257 /* end confdefs.h.  */
42258 #ifndef __APPLE_CC__
42259                not a universal capable compiler
42260              #endif
42261              typedef int dummy;
42262
42263 _ACEOF
42264 if ac_fn_c_try_compile "$LINENO"; then :
42265
42266         # Check for potential -arch flags.  It is not universal unless
42267         # there are at least two -arch flags with different values.
42268         ac_arch=
42269         ac_prev=
42270         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
42271          if test -n "$ac_prev"; then
42272            case $ac_word in
42273              i?86 | x86_64 | ppc | ppc64)
42274                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
42275                  ac_arch=$ac_word
42276                else
42277                  ac_cv_c_bigendian=universal
42278                  break
42279                fi
42280                ;;
42281            esac
42282            ac_prev=
42283          elif test "x$ac_word" = "x-arch"; then
42284            ac_prev=arch
42285          fi
42286        done
42287 fi
42288 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42289     if test $ac_cv_c_bigendian = unknown; then
42290       # See if sys/param.h defines the BYTE_ORDER macro.
42291       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42292 /* end confdefs.h.  */
42293 #include <sys/types.h>
42294              #include <sys/param.h>
42295
42296 int
42297 main ()
42298 {
42299 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
42300                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
42301                      && LITTLE_ENDIAN)
42302               bogus endian macros
42303              #endif
42304
42305   ;
42306   return 0;
42307 }
42308 _ACEOF
42309 if ac_fn_c_try_compile "$LINENO"; then :
42310   # It does; now see whether it defined to BIG_ENDIAN or not.
42311          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42312 /* end confdefs.h.  */
42313 #include <sys/types.h>
42314                 #include <sys/param.h>
42315
42316 int
42317 main ()
42318 {
42319 #if BYTE_ORDER != BIG_ENDIAN
42320                  not big endian
42321                 #endif
42322
42323   ;
42324   return 0;
42325 }
42326 _ACEOF
42327 if ac_fn_c_try_compile "$LINENO"; then :
42328   ac_cv_c_bigendian=yes
42329 else
42330   ac_cv_c_bigendian=no
42331 fi
42332 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42333 fi
42334 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42335     fi
42336     if test $ac_cv_c_bigendian = unknown; then
42337       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
42338       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42339 /* end confdefs.h.  */
42340 #include <limits.h>
42341
42342 int
42343 main ()
42344 {
42345 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
42346               bogus endian macros
42347              #endif
42348
42349   ;
42350   return 0;
42351 }
42352 _ACEOF
42353 if ac_fn_c_try_compile "$LINENO"; then :
42354   # It does; now see whether it defined to _BIG_ENDIAN or not.
42355          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42356 /* end confdefs.h.  */
42357 #include <limits.h>
42358
42359 int
42360 main ()
42361 {
42362 #ifndef _BIG_ENDIAN
42363                  not big endian
42364                 #endif
42365
42366   ;
42367   return 0;
42368 }
42369 _ACEOF
42370 if ac_fn_c_try_compile "$LINENO"; then :
42371   ac_cv_c_bigendian=yes
42372 else
42373   ac_cv_c_bigendian=no
42374 fi
42375 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42376 fi
42377 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42378     fi
42379     if test $ac_cv_c_bigendian = unknown; then
42380       # Compile a test program.
42381       if test "$cross_compiling" = yes; then :
42382   # Try to guess by grepping values from an object file.
42383          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42384 /* end confdefs.h.  */
42385 short int ascii_mm[] =
42386                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
42387                 short int ascii_ii[] =
42388                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
42389                 int use_ascii (int i) {
42390                   return ascii_mm[i] + ascii_ii[i];
42391                 }
42392                 short int ebcdic_ii[] =
42393                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
42394                 short int ebcdic_mm[] =
42395                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
42396                 int use_ebcdic (int i) {
42397                   return ebcdic_mm[i] + ebcdic_ii[i];
42398                 }
42399                 extern int foo;
42400
42401 int
42402 main ()
42403 {
42404 return use_ascii (foo) == use_ebcdic (foo);
42405   ;
42406   return 0;
42407 }
42408 _ACEOF
42409 if ac_fn_c_try_compile "$LINENO"; then :
42410   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
42411               ac_cv_c_bigendian=yes
42412             fi
42413             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
42414               if test "$ac_cv_c_bigendian" = unknown; then
42415                 ac_cv_c_bigendian=no
42416               else
42417                 # finding both strings is unlikely to happen, but who knows?
42418                 ac_cv_c_bigendian=unknown
42419               fi
42420             fi
42421 fi
42422 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42423 else
42424   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42425 /* end confdefs.h.  */
42426 $ac_includes_default
42427 int
42428 main ()
42429 {
42430
42431              /* Are we little or big endian?  From Harbison&Steele.  */
42432              union
42433              {
42434                long int l;
42435                char c[sizeof (long int)];
42436              } u;
42437              u.l = 1;
42438              return u.c[sizeof (long int) - 1] == 1;
42439
42440   ;
42441   return 0;
42442 }
42443 _ACEOF
42444 if ac_fn_c_try_run "$LINENO"; then :
42445   ac_cv_c_bigendian=no
42446 else
42447   ac_cv_c_bigendian=yes
42448 fi
42449 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42450   conftest.$ac_objext conftest.beam conftest.$ac_ext
42451 fi
42452
42453     fi
42454 fi
42455 :
42456  case $ac_cv_c_bigendian in #(
42457    yes)
42458      gl_cv_cc_double_expbit0="word 0 bit 20";; #(
42459    no)
42460      gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
42461    universal)
42462
42463 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
42464
42465      ;; #(
42466    *)
42467      gl_cv_cc_double_expbit0="unknown" ;;
42468  esac
42469
42470
42471 fi
42472 rm -f conftest*
42473
42474
42475 else
42476   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42477 /* end confdefs.h.  */
42478
42479 #include <float.h>
42480 #include <stddef.h>
42481 #include <stdio.h>
42482 #include <string.h>
42483 #define NWORDS \
42484   ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
42485 typedef union { double value; unsigned int word[NWORDS]; } memory_double;
42486 static unsigned int ored_words[NWORDS];
42487 static unsigned int anded_words[NWORDS];
42488 static void add_to_ored_words (double x)
42489 {
42490   memory_double m;
42491   size_t i;
42492   /* Clear it first, in case sizeof (double) < sizeof (memory_double).  */
42493   memset (&m, 0, sizeof (memory_double));
42494   m.value = x;
42495   for (i = 0; i < NWORDS; i++)
42496     {
42497       ored_words[i] |= m.word[i];
42498       anded_words[i] &= m.word[i];
42499     }
42500 }
42501 int main ()
42502 {
42503   size_t j;
42504   FILE *fp = fopen ("conftest.out", "w");
42505   if (fp == NULL)
42506     return 1;
42507   for (j = 0; j < NWORDS; j++)
42508     anded_words[j] = ~ (unsigned int) 0;
42509   add_to_ored_words (0.25);
42510   add_to_ored_words (0.5);
42511   add_to_ored_words (1.0);
42512   add_to_ored_words (2.0);
42513   add_to_ored_words (4.0);
42514   /* Remove bits that are common (e.g. if representation of the first mantissa
42515      bit is explicit).  */
42516   for (j = 0; j < NWORDS; j++)
42517     ored_words[j] &= ~anded_words[j];
42518   /* Now find the nonzero word.  */
42519   for (j = 0; j < NWORDS; j++)
42520     if (ored_words[j] != 0)
42521       break;
42522   if (j < NWORDS)
42523     {
42524       size_t i;
42525       for (i = j + 1; i < NWORDS; i++)
42526         if (ored_words[i] != 0)
42527           {
42528             fprintf (fp, "unknown");
42529             return (fclose (fp) != 0);
42530           }
42531       for (i = 0; ; i++)
42532         if ((ored_words[j] >> i) & 1)
42533           {
42534             fprintf (fp, "word %d bit %d", (int) j, (int) i);
42535             return (fclose (fp) != 0);
42536           }
42537     }
42538   fprintf (fp, "unknown");
42539   return (fclose (fp) != 0);
42540 }
42541
42542 _ACEOF
42543 if ac_fn_c_try_run "$LINENO"; then :
42544   gl_cv_cc_double_expbit0=`cat conftest.out`
42545 else
42546   gl_cv_cc_double_expbit0="unknown"
42547 fi
42548 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42549   conftest.$ac_objext conftest.beam conftest.$ac_ext
42550 fi
42551
42552       rm -f conftest.out
42553
42554 fi
42555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
42556 $as_echo "$gl_cv_cc_double_expbit0" >&6; }
42557   case "$gl_cv_cc_double_expbit0" in
42558     word*bit*)
42559       word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
42560       bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
42561
42562 cat >>confdefs.h <<_ACEOF
42563 #define DBL_EXPBIT0_WORD $word
42564 _ACEOF
42565
42566
42567 cat >>confdefs.h <<_ACEOF
42568 #define DBL_EXPBIT0_BIT $bit
42569 _ACEOF
42570
42571       ;;
42572   esac
42573
42574
42575   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5
42576 $as_echo_n "checking where to find the exponent in a 'float'... " >&6; }
42577 if ${gl_cv_cc_float_expbit0+:} false; then :
42578   $as_echo_n "(cached) " >&6
42579 else
42580
42581       if test "$cross_compiling" = yes; then :
42582   gl_cv_cc_float_expbit0="word 0 bit 23"
42583 else
42584   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42585 /* end confdefs.h.  */
42586
42587 #include <float.h>
42588 #include <stddef.h>
42589 #include <stdio.h>
42590 #include <string.h>
42591 #define NWORDS \
42592   ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
42593 typedef union { float value; unsigned int word[NWORDS]; } memory_float;
42594 static unsigned int ored_words[NWORDS];
42595 static unsigned int anded_words[NWORDS];
42596 static void add_to_ored_words (float x)
42597 {
42598   memory_float m;
42599   size_t i;
42600   /* Clear it first, in case
42601      sizeof (float) < sizeof (memory_float).  */
42602   memset (&m, 0, sizeof (memory_float));
42603   m.value = x;
42604   for (i = 0; i < NWORDS; i++)
42605     {
42606       ored_words[i] |= m.word[i];
42607       anded_words[i] &= m.word[i];
42608     }
42609 }
42610 int main ()
42611 {
42612   size_t j;
42613   FILE *fp = fopen ("conftest.out", "w");
42614   if (fp == NULL)
42615     return 1;
42616   for (j = 0; j < NWORDS; j++)
42617     anded_words[j] = ~ (unsigned int) 0;
42618   add_to_ored_words (0.25f);
42619   add_to_ored_words (0.5f);
42620   add_to_ored_words (1.0f);
42621   add_to_ored_words (2.0f);
42622   add_to_ored_words (4.0f);
42623   /* Remove bits that are common (e.g. if representation of the first mantissa
42624      bit is explicit).  */
42625   for (j = 0; j < NWORDS; j++)
42626     ored_words[j] &= ~anded_words[j];
42627   /* Now find the nonzero word.  */
42628   for (j = 0; j < NWORDS; j++)
42629     if (ored_words[j] != 0)
42630       break;
42631   if (j < NWORDS)
42632     {
42633       size_t i;
42634       for (i = j + 1; i < NWORDS; i++)
42635         if (ored_words[i] != 0)
42636           {
42637             fprintf (fp, "unknown");
42638             return (fclose (fp) != 0);
42639           }
42640       for (i = 0; ; i++)
42641         if ((ored_words[j] >> i) & 1)
42642           {
42643             fprintf (fp, "word %d bit %d", (int) j, (int) i);
42644             return (fclose (fp) != 0);
42645           }
42646     }
42647   fprintf (fp, "unknown");
42648   return (fclose (fp) != 0);
42649 }
42650
42651 _ACEOF
42652 if ac_fn_c_try_run "$LINENO"; then :
42653   gl_cv_cc_float_expbit0=`cat conftest.out`
42654 else
42655   gl_cv_cc_float_expbit0="unknown"
42656 fi
42657 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42658   conftest.$ac_objext conftest.beam conftest.$ac_ext
42659 fi
42660
42661       rm -f conftest.out
42662
42663 fi
42664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5
42665 $as_echo "$gl_cv_cc_float_expbit0" >&6; }
42666   case "$gl_cv_cc_float_expbit0" in
42667     word*bit*)
42668       word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
42669       bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'`
42670
42671 cat >>confdefs.h <<_ACEOF
42672 #define FLT_EXPBIT0_WORD $word
42673 _ACEOF
42674
42675
42676 cat >>confdefs.h <<_ACEOF
42677 #define FLT_EXPBIT0_BIT $bit
42678 _ACEOF
42679
42680       ;;
42681   esac
42682
42683
42684
42685   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5
42686 $as_echo_n "checking where to find the exponent in a 'long double'... " >&6; }
42687 if ${gl_cv_cc_long_double_expbit0+:} false; then :
42688   $as_echo_n "(cached) " >&6
42689 else
42690
42691       if test "$cross_compiling" = yes; then :
42692
42693                               gl_cv_cc_long_double_expbit0="unknown"
42694
42695 else
42696   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42697 /* end confdefs.h.  */
42698
42699 #include <float.h>
42700 #include <stddef.h>
42701 #include <stdio.h>
42702 #include <string.h>
42703 #define NWORDS \
42704   ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
42705 typedef union { long double value; unsigned int word[NWORDS]; }
42706         memory_long_double;
42707 static unsigned int ored_words[NWORDS];
42708 static unsigned int anded_words[NWORDS];
42709 static void add_to_ored_words (long double x)
42710 {
42711   memory_long_double m;
42712   size_t i;
42713   /* Clear it first, in case
42714      sizeof (long double) < sizeof (memory_long_double).  */
42715   memset (&m, 0, sizeof (memory_long_double));
42716   m.value = x;
42717   for (i = 0; i < NWORDS; i++)
42718     {
42719       ored_words[i] |= m.word[i];
42720       anded_words[i] &= m.word[i];
42721     }
42722 }
42723 int main ()
42724 {
42725   size_t j;
42726   FILE *fp = fopen ("conftest.out", "w");
42727   if (fp == NULL)
42728     return 1;
42729   for (j = 0; j < NWORDS; j++)
42730     anded_words[j] = ~ (unsigned int) 0;
42731   add_to_ored_words (0.25L);
42732   add_to_ored_words (0.5L);
42733   add_to_ored_words (1.0L);
42734   add_to_ored_words (2.0L);
42735   add_to_ored_words (4.0L);
42736   /* Remove bits that are common (e.g. if representation of the first mantissa
42737      bit is explicit).  */
42738   for (j = 0; j < NWORDS; j++)
42739     ored_words[j] &= ~anded_words[j];
42740   /* Now find the nonzero word.  */
42741   for (j = 0; j < NWORDS; j++)
42742     if (ored_words[j] != 0)
42743       break;
42744   if (j < NWORDS)
42745     {
42746       size_t i;
42747       for (i = j + 1; i < NWORDS; i++)
42748         if (ored_words[i] != 0)
42749           {
42750             fprintf (fp, "unknown");
42751             return (fclose (fp) != 0);
42752           }
42753       for (i = 0; ; i++)
42754         if ((ored_words[j] >> i) & 1)
42755           {
42756             fprintf (fp, "word %d bit %d", (int) j, (int) i);
42757             return (fclose (fp) != 0);
42758           }
42759     }
42760   fprintf (fp, "unknown");
42761   return (fclose (fp) != 0);
42762 }
42763
42764 _ACEOF
42765 if ac_fn_c_try_run "$LINENO"; then :
42766   gl_cv_cc_long_double_expbit0=`cat conftest.out`
42767 else
42768   gl_cv_cc_long_double_expbit0="unknown"
42769 fi
42770 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42771   conftest.$ac_objext conftest.beam conftest.$ac_ext
42772 fi
42773
42774       rm -f conftest.out
42775
42776 fi
42777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5
42778 $as_echo "$gl_cv_cc_long_double_expbit0" >&6; }
42779   case "$gl_cv_cc_long_double_expbit0" in
42780     word*bit*)
42781       word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
42782       bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'`
42783
42784 cat >>confdefs.h <<_ACEOF
42785 #define LDBL_EXPBIT0_WORD $word
42786 _ACEOF
42787
42788
42789 cat >>confdefs.h <<_ACEOF
42790 #define LDBL_EXPBIT0_BIT $bit
42791 _ACEOF
42792
42793       ;;
42794   esac
42795
42796
42797
42798   if test "$ac_cv_header_winsock2_h" = yes; then
42799
42800
42801
42802
42803
42804
42805
42806
42807   gltests_LIBOBJS="$gltests_LIBOBJS listen.$ac_objext"
42808
42809   fi
42810
42811
42812
42813
42814
42815     if test "$GNULIB_LISTEN" != 1; then
42816         if test "$GNULIB_LISTEN" = 0; then
42817       GNULIB_LISTEN=$gl_module_indicator_condition
42818     else
42819       GNULIB_LISTEN="($GNULIB_LISTEN || $gl_module_indicator_condition)"
42820     fi
42821   fi
42822
42823
42824
42825
42826
42827 $as_echo "#define GNULIB_TEST_LISTEN 1" >>confdefs.h
42828
42829
42830
42831
42832   :
42833
42834
42835
42836
42837
42838
42839
42840
42841   for ac_func in setlocale uselocale
42842 do :
42843   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
42844 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
42845 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
42846   cat >>confdefs.h <<_ACEOF
42847 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
42848 _ACEOF
42849
42850 fi
42851 done
42852
42853
42854
42855   :
42856
42857
42858
42859
42860
42861
42862
42863
42864   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
42865 $as_echo_n "checking for a traditional french locale... " >&6; }
42866 if ${gt_cv_locale_fr+:} false; then :
42867   $as_echo_n "(cached) " >&6
42868 else
42869
42870     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42871 /* end confdefs.h.  */
42872
42873 #include <locale.h>
42874 #include <time.h>
42875 #if HAVE_LANGINFO_CODESET
42876 # include <langinfo.h>
42877 #endif
42878 #include <stdlib.h>
42879 #include <string.h>
42880 struct tm t;
42881 char buf[16];
42882 int main () {
42883   /* Check whether the given locale name is recognized by the system.  */
42884 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
42885   /* On native Windows, setlocale(category, "") looks at the system settings,
42886      not at the environment variables.  Also, when an encoding suffix such
42887      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
42888      category of the locale to "C".  */
42889   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
42890       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
42891     return 1;
42892 #else
42893   if (setlocale (LC_ALL, "") == NULL) return 1;
42894 #endif
42895   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
42896      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
42897      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
42898      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
42899      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
42900      some unit tests fail.
42901      On MirBSD 10, when an unsupported locale is specified, setlocale()
42902      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
42903 #if HAVE_LANGINFO_CODESET
42904   {
42905     const char *cs = nl_langinfo (CODESET);
42906     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
42907         || strcmp (cs, "UTF-8") == 0)
42908       return 1;
42909   }
42910 #endif
42911 #ifdef __CYGWIN__
42912   /* On Cygwin, avoid locale names without encoding suffix, because the
42913      locale_charset() function relies on the encoding suffix.  Note that
42914      LC_ALL is set on the command line.  */
42915   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
42916 #endif
42917   /* Check whether in the abbreviation of the second month, the second
42918      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
42919      one byte long. This excludes the UTF-8 encoding.  */
42920   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
42921   if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
42922 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
42923   /* Check whether the decimal separator is a comma.
42924      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
42925      are nl_langinfo(RADIXCHAR) are both ".".  */
42926   if (localeconv () ->decimal_point[0] != ',') return 1;
42927 #endif
42928   return 0;
42929 }
42930
42931 _ACEOF
42932     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
42933   (eval $ac_link) 2>&5
42934   ac_status=$?
42935   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
42936   test $ac_status = 0; } && test -s conftest$ac_exeext; then
42937       case "$host_os" in
42938         # Handle native Windows specially, because there setlocale() interprets
42939         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
42940         # "fr" or "fra" as "French" or "French_France.1252",
42941         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
42942         # "ja" as "Japanese" or "Japanese_Japan.932",
42943         # and similar.
42944         mingw*)
42945           # Test for the native Windows locale name.
42946           if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
42947             gt_cv_locale_fr=French_France.1252
42948           else
42949             # None found.
42950             gt_cv_locale_fr=none
42951           fi
42952           ;;
42953         *)
42954           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
42955           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
42956           # configure script would override the LC_ALL setting. Likewise for
42957           # LC_CTYPE, which is also set at the beginning of the configure script.
42958           # Test for the usual locale name.
42959           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
42960             gt_cv_locale_fr=fr_FR
42961           else
42962             # Test for the locale name with explicit encoding suffix.
42963             if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
42964               gt_cv_locale_fr=fr_FR.ISO-8859-1
42965             else
42966               # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
42967               if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
42968                 gt_cv_locale_fr=fr_FR.ISO8859-1
42969               else
42970                 # Test for the HP-UX locale name.
42971                 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
42972                   gt_cv_locale_fr=fr_FR.iso88591
42973                 else
42974                   # Test for the Solaris 7 locale name.
42975                   if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
42976                     gt_cv_locale_fr=fr
42977                   else
42978                     # None found.
42979                     gt_cv_locale_fr=none
42980                   fi
42981                 fi
42982               fi
42983             fi
42984           fi
42985           ;;
42986       esac
42987     fi
42988     rm -fr conftest*
42989
42990 fi
42991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
42992 $as_echo "$gt_cv_locale_fr" >&6; }
42993   LOCALE_FR=$gt_cv_locale_fr
42994
42995
42996
42997
42998   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
42999 $as_echo_n "checking for a french Unicode locale... " >&6; }
43000 if ${gt_cv_locale_fr_utf8+:} false; then :
43001   $as_echo_n "(cached) " >&6
43002 else
43003
43004     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43005 /* end confdefs.h.  */
43006
43007 #include <locale.h>
43008 #include <time.h>
43009 #if HAVE_LANGINFO_CODESET
43010 # include <langinfo.h>
43011 #endif
43012 #include <stdlib.h>
43013 #include <string.h>
43014 struct tm t;
43015 char buf[16];
43016 int main () {
43017   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
43018      imitates locale dependent behaviour by looking at the environment
43019      variables, and all locales use the UTF-8 encoding.  */
43020 #if !(defined __BEOS__ || defined __HAIKU__)
43021   /* Check whether the given locale name is recognized by the system.  */
43022 # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
43023   /* On native Windows, setlocale(category, "") looks at the system settings,
43024      not at the environment variables.  Also, when an encoding suffix such
43025      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
43026      category of the locale to "C".  */
43027   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
43028       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
43029     return 1;
43030 # else
43031   if (setlocale (LC_ALL, "") == NULL) return 1;
43032 # endif
43033   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
43034      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
43035      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
43036      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
43037      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
43038      some unit tests fail.  */
43039 # if HAVE_LANGINFO_CODESET
43040   {
43041     const char *cs = nl_langinfo (CODESET);
43042     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
43043       return 1;
43044   }
43045 # endif
43046 # ifdef __CYGWIN__
43047   /* On Cygwin, avoid locale names without encoding suffix, because the
43048      locale_charset() function relies on the encoding suffix.  Note that
43049      LC_ALL is set on the command line.  */
43050   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
43051 # endif
43052   /* Check whether in the abbreviation of the second month, the second
43053      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
43054      two bytes long, with UTF-8 encoding.  */
43055   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
43056   if (strftime (buf, sizeof (buf), "%b", &t) < 4
43057       || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
43058     return 1;
43059 #endif
43060 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
43061   /* Check whether the decimal separator is a comma.
43062      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
43063      are nl_langinfo(RADIXCHAR) are both ".".  */
43064   if (localeconv () ->decimal_point[0] != ',') return 1;
43065 #endif
43066   return 0;
43067 }
43068
43069 _ACEOF
43070     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
43071   (eval $ac_link) 2>&5
43072   ac_status=$?
43073   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43074   test $ac_status = 0; } && test -s conftest$ac_exeext; then
43075       case "$host_os" in
43076         # Handle native Windows specially, because there setlocale() interprets
43077         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
43078         # "fr" or "fra" as "French" or "French_France.1252",
43079         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
43080         # "ja" as "Japanese" or "Japanese_Japan.932",
43081         # and similar.
43082         mingw*)
43083           # Test for the hypothetical native Windows locale name.
43084           if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
43085             gt_cv_locale_fr_utf8=French_France.65001
43086           else
43087             # None found.
43088             gt_cv_locale_fr_utf8=none
43089           fi
43090           ;;
43091         *)
43092           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
43093           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
43094           # configure script would override the LC_ALL setting. Likewise for
43095           # LC_CTYPE, which is also set at the beginning of the configure script.
43096           # Test for the usual locale name.
43097           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
43098             gt_cv_locale_fr_utf8=fr_FR
43099           else
43100             # Test for the locale name with explicit encoding suffix.
43101             if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
43102               gt_cv_locale_fr_utf8=fr_FR.UTF-8
43103             else
43104               # Test for the Solaris 7 locale name.
43105               if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
43106                 gt_cv_locale_fr_utf8=fr.UTF-8
43107               else
43108                 # None found.
43109                 gt_cv_locale_fr_utf8=none
43110               fi
43111             fi
43112           fi
43113           ;;
43114       esac
43115     fi
43116     rm -fr conftest*
43117
43118 fi
43119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
43120 $as_echo "$gt_cv_locale_fr_utf8" >&6; }
43121   LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
43122
43123
43124
43125
43126
43127   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
43128 $as_echo_n "checking for a traditional japanese locale... " >&6; }
43129 if ${gt_cv_locale_ja+:} false; then :
43130   $as_echo_n "(cached) " >&6
43131 else
43132
43133     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43134 /* end confdefs.h.  */
43135
43136 #include <locale.h>
43137 #include <time.h>
43138 #if HAVE_LANGINFO_CODESET
43139 # include <langinfo.h>
43140 #endif
43141 #include <stdlib.h>
43142 #include <string.h>
43143 struct tm t;
43144 char buf[16];
43145 int main ()
43146 {
43147   const char *p;
43148   /* Check whether the given locale name is recognized by the system.  */
43149 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
43150   /* On native Windows, setlocale(category, "") looks at the system settings,
43151      not at the environment variables.  Also, when an encoding suffix such
43152      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
43153      category of the locale to "C".  */
43154   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
43155       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
43156     return 1;
43157 #else
43158   if (setlocale (LC_ALL, "") == NULL) return 1;
43159 #endif
43160   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
43161      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
43162      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
43163      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
43164      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
43165      some unit tests fail.
43166      On MirBSD 10, when an unsupported locale is specified, setlocale()
43167      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
43168 #if HAVE_LANGINFO_CODESET
43169   {
43170     const char *cs = nl_langinfo (CODESET);
43171     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
43172         || strcmp (cs, "UTF-8") == 0)
43173       return 1;
43174   }
43175 #endif
43176 #ifdef __CYGWIN__
43177   /* On Cygwin, avoid locale names without encoding suffix, because the
43178      locale_charset() function relies on the encoding suffix.  Note that
43179      LC_ALL is set on the command line.  */
43180   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
43181 #endif
43182   /* Check whether MB_CUR_MAX is > 1.  This excludes the dysfunctional locales
43183      on Cygwin 1.5.x.  */
43184   if (MB_CUR_MAX == 1)
43185     return 1;
43186   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
43187      This excludes the UTF-8 encoding (except on MirBSD).  */
43188   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
43189   if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
43190   for (p = buf; *p != '\0'; p++)
43191     if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
43192       return 1;
43193   return 0;
43194 }
43195
43196 _ACEOF
43197     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
43198   (eval $ac_link) 2>&5
43199   ac_status=$?
43200   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43201   test $ac_status = 0; } && test -s conftest$ac_exeext; then
43202       case "$host_os" in
43203         # Handle native Windows specially, because there setlocale() interprets
43204         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
43205         # "fr" or "fra" as "French" or "French_France.1252",
43206         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
43207         # "ja" as "Japanese" or "Japanese_Japan.932",
43208         # and similar.
43209         mingw*)
43210           # Note that on native Windows, the Japanese locale is
43211           # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
43212           # cannot use it here.
43213           gt_cv_locale_ja=none
43214           ;;
43215         *)
43216           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
43217           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
43218           # configure script would override the LC_ALL setting. Likewise for
43219           # LC_CTYPE, which is also set at the beginning of the configure script.
43220           # Test for the AIX locale name.
43221           if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
43222             gt_cv_locale_ja=ja_JP
43223           else
43224             # Test for the locale name with explicit encoding suffix.
43225             if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
43226               gt_cv_locale_ja=ja_JP.EUC-JP
43227             else
43228               # Test for the HP-UX, OSF/1, NetBSD locale name.
43229               if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
43230                 gt_cv_locale_ja=ja_JP.eucJP
43231               else
43232                 # Test for the IRIX, FreeBSD locale name.
43233                 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
43234                   gt_cv_locale_ja=ja_JP.EUC
43235                 else
43236                   # Test for the Solaris 7 locale name.
43237                   if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
43238                     gt_cv_locale_ja=ja
43239                   else
43240                     # Special test for NetBSD 1.6.
43241                     if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
43242                       gt_cv_locale_ja=ja_JP.eucJP
43243                     else
43244                       # None found.
43245                       gt_cv_locale_ja=none
43246                     fi
43247                   fi
43248                 fi
43249               fi
43250             fi
43251           fi
43252           ;;
43253       esac
43254     fi
43255     rm -fr conftest*
43256
43257 fi
43258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
43259 $as_echo "$gt_cv_locale_ja" >&6; }
43260   LOCALE_JA=$gt_cv_locale_ja
43261
43262
43263
43264
43265
43266   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
43267 $as_echo_n "checking for a transitional chinese locale... " >&6; }
43268 if ${gt_cv_locale_zh_CN+:} false; then :
43269   $as_echo_n "(cached) " >&6
43270 else
43271
43272     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43273 /* end confdefs.h.  */
43274
43275 #include <locale.h>
43276 #include <stdlib.h>
43277 #include <time.h>
43278 #if HAVE_LANGINFO_CODESET
43279 # include <langinfo.h>
43280 #endif
43281 #include <stdlib.h>
43282 #include <string.h>
43283 struct tm t;
43284 char buf[16];
43285 int main ()
43286 {
43287   const char *p;
43288   /* Check whether the given locale name is recognized by the system.  */
43289 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
43290   /* On native Windows, setlocale(category, "") looks at the system settings,
43291      not at the environment variables.  Also, when an encoding suffix such
43292      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
43293      category of the locale to "C".  */
43294   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
43295       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
43296     return 1;
43297 #else
43298   if (setlocale (LC_ALL, "") == NULL) return 1;
43299 #endif
43300   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
43301      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
43302      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
43303      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
43304      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
43305      some unit tests fail.
43306      On MirBSD 10, when an unsupported locale is specified, setlocale()
43307      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
43308 #if HAVE_LANGINFO_CODESET
43309   {
43310     const char *cs = nl_langinfo (CODESET);
43311     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
43312         || strcmp (cs, "UTF-8") == 0)
43313       return 1;
43314   }
43315 #endif
43316 #ifdef __CYGWIN__
43317   /* On Cygwin, avoid locale names without encoding suffix, because the
43318      locale_charset() function relies on the encoding suffix.  Note that
43319      LC_ALL is set on the command line.  */
43320   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
43321 #endif
43322   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
43323      This excludes the UTF-8 encoding (except on MirBSD).  */
43324   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
43325   if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
43326   for (p = buf; *p != '\0'; p++)
43327     if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
43328       return 1;
43329   /* Check whether a typical GB18030 multibyte sequence is recognized as a
43330      single wide character.  This excludes the GB2312 and GBK encodings.  */
43331   if (mblen ("\203\062\332\066", 5) != 4)
43332     return 1;
43333   return 0;
43334 }
43335
43336 _ACEOF
43337     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
43338   (eval $ac_link) 2>&5
43339   ac_status=$?
43340   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43341   test $ac_status = 0; } && test -s conftest$ac_exeext; then
43342       case "$host_os" in
43343         # Handle native Windows specially, because there setlocale() interprets
43344         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
43345         # "fr" or "fra" as "French" or "French_France.1252",
43346         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
43347         # "ja" as "Japanese" or "Japanese_Japan.932",
43348         # and similar.
43349         mingw*)
43350           # Test for the hypothetical native Windows locale name.
43351           if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
43352             gt_cv_locale_zh_CN=Chinese_China.54936
43353           else
43354             # None found.
43355             gt_cv_locale_zh_CN=none
43356           fi
43357           ;;
43358         solaris2.8)
43359           # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
43360           # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
43361           # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
43362           gt_cv_locale_zh_CN=none
43363           ;;
43364         *)
43365           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
43366           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
43367           # configure script would override the LC_ALL setting. Likewise for
43368           # LC_CTYPE, which is also set at the beginning of the configure script.
43369           # Test for the locale name without encoding suffix.
43370           if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
43371             gt_cv_locale_zh_CN=zh_CN
43372           else
43373             # Test for the locale name with explicit encoding suffix.
43374             if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
43375               gt_cv_locale_zh_CN=zh_CN.GB18030
43376             else
43377               # None found.
43378               gt_cv_locale_zh_CN=none
43379             fi
43380           fi
43381           ;;
43382       esac
43383     else
43384       # If there was a link error, due to mblen(), the system is so old that
43385       # it certainly doesn't have a chinese locale.
43386       gt_cv_locale_zh_CN=none
43387     fi
43388     rm -fr conftest*
43389
43390 fi
43391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
43392 $as_echo "$gt_cv_locale_zh_CN" >&6; }
43393   LOCALE_ZH_CN=$gt_cv_locale_zh_CN
43394
43395
43396
43397
43398   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
43399 $as_echo_n "checking for a french Unicode locale... " >&6; }
43400 if ${gt_cv_locale_fr_utf8+:} false; then :
43401   $as_echo_n "(cached) " >&6
43402 else
43403
43404     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43405 /* end confdefs.h.  */
43406
43407 #include <locale.h>
43408 #include <time.h>
43409 #if HAVE_LANGINFO_CODESET
43410 # include <langinfo.h>
43411 #endif
43412 #include <stdlib.h>
43413 #include <string.h>
43414 struct tm t;
43415 char buf[16];
43416 int main () {
43417   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
43418      imitates locale dependent behaviour by looking at the environment
43419      variables, and all locales use the UTF-8 encoding.  */
43420 #if !(defined __BEOS__ || defined __HAIKU__)
43421   /* Check whether the given locale name is recognized by the system.  */
43422 # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
43423   /* On native Windows, setlocale(category, "") looks at the system settings,
43424      not at the environment variables.  Also, when an encoding suffix such
43425      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
43426      category of the locale to "C".  */
43427   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
43428       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
43429     return 1;
43430 # else
43431   if (setlocale (LC_ALL, "") == NULL) return 1;
43432 # endif
43433   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
43434      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
43435      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
43436      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
43437      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
43438      some unit tests fail.  */
43439 # if HAVE_LANGINFO_CODESET
43440   {
43441     const char *cs = nl_langinfo (CODESET);
43442     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
43443       return 1;
43444   }
43445 # endif
43446 # ifdef __CYGWIN__
43447   /* On Cygwin, avoid locale names without encoding suffix, because the
43448      locale_charset() function relies on the encoding suffix.  Note that
43449      LC_ALL is set on the command line.  */
43450   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
43451 # endif
43452   /* Check whether in the abbreviation of the second month, the second
43453      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
43454      two bytes long, with UTF-8 encoding.  */
43455   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
43456   if (strftime (buf, sizeof (buf), "%b", &t) < 4
43457       || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
43458     return 1;
43459 #endif
43460 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
43461   /* Check whether the decimal separator is a comma.
43462      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
43463      are nl_langinfo(RADIXCHAR) are both ".".  */
43464   if (localeconv () ->decimal_point[0] != ',') return 1;
43465 #endif
43466   return 0;
43467 }
43468
43469 _ACEOF
43470     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
43471   (eval $ac_link) 2>&5
43472   ac_status=$?
43473   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43474   test $ac_status = 0; } && test -s conftest$ac_exeext; then
43475       case "$host_os" in
43476         # Handle native Windows specially, because there setlocale() interprets
43477         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
43478         # "fr" or "fra" as "French" or "French_France.1252",
43479         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
43480         # "ja" as "Japanese" or "Japanese_Japan.932",
43481         # and similar.
43482         mingw*)
43483           # Test for the hypothetical native Windows locale name.
43484           if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
43485             gt_cv_locale_fr_utf8=French_France.65001
43486           else
43487             # None found.
43488             gt_cv_locale_fr_utf8=none
43489           fi
43490           ;;
43491         *)
43492           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
43493           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
43494           # configure script would override the LC_ALL setting. Likewise for
43495           # LC_CTYPE, which is also set at the beginning of the configure script.
43496           # Test for the usual locale name.
43497           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
43498             gt_cv_locale_fr_utf8=fr_FR
43499           else
43500             # Test for the locale name with explicit encoding suffix.
43501             if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
43502               gt_cv_locale_fr_utf8=fr_FR.UTF-8
43503             else
43504               # Test for the Solaris 7 locale name.
43505               if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
43506                 gt_cv_locale_fr_utf8=fr.UTF-8
43507               else
43508                 # None found.
43509                 gt_cv_locale_fr_utf8=none
43510               fi
43511             fi
43512           fi
43513           ;;
43514       esac
43515     fi
43516     rm -fr conftest*
43517
43518 fi
43519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
43520 $as_echo "$gt_cv_locale_fr_utf8" >&6; }
43521   LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
43522
43523
43524
43525
43526
43527   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a turkish Unicode locale" >&5
43528 $as_echo_n "checking for a turkish Unicode locale... " >&6; }
43529 if ${gt_cv_locale_tr_utf8+:} false; then :
43530   $as_echo_n "(cached) " >&6
43531 else
43532
43533     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43534 /* end confdefs.h.  */
43535
43536 #include <locale.h>
43537 #include <time.h>
43538 #if HAVE_LANGINFO_CODESET
43539 # include <langinfo.h>
43540 #endif
43541 #include <stdlib.h>
43542 #include <string.h>
43543 struct tm t;
43544 char buf[16];
43545 int main () {
43546   /* On BeOS, locales are not implemented in libc.  Rather, libintl
43547      imitates locale dependent behaviour by looking at the environment
43548      variables, and all locales use the UTF-8 encoding.  But BeOS does not
43549      implement the Turkish upper-/lowercase mappings.  Therefore, let this
43550      program return 1 on BeOS.  */
43551   /* Check whether the given locale name is recognized by the system.  */
43552 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
43553   /* On native Windows, setlocale(category, "") looks at the system settings,
43554      not at the environment variables.  Also, when an encoding suffix such
43555      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
43556      category of the locale to "C".  */
43557   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
43558       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
43559     return 1;
43560 #else
43561   if (setlocale (LC_ALL, "") == NULL) return 1;
43562 #endif
43563   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
43564      On Mac OS X 10.3.5 (Darwin 7.5) in the tr_TR locale, nl_langinfo(CODESET)
43565      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
43566      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
43567      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
43568      some unit tests fail.  */
43569 #if HAVE_LANGINFO_CODESET
43570   {
43571     const char *cs = nl_langinfo (CODESET);
43572     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
43573       return 1;
43574   }
43575 #endif
43576 #ifdef __CYGWIN__
43577   /* On Cygwin, avoid locale names without encoding suffix, because the
43578      locale_charset() function relies on the encoding suffix.  Note that
43579      LC_ALL is set on the command line.  */
43580   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
43581 #endif
43582   /* Check whether in the abbreviation of the eighth month, the second
43583      character (should be U+011F: LATIN SMALL LETTER G WITH BREVE) is
43584      two bytes long, with UTF-8 encoding.  */
43585   t.tm_year = 1992 - 1900; t.tm_mon = 8 - 1; t.tm_mday = 19;
43586   if (strftime (buf, sizeof (buf), "%b", &t) < 4
43587       || buf[1] != (char) 0xc4 || buf[2] != (char) 0x9f)
43588     return 1;
43589   /* Check whether the upper-/lowercase mappings are as expected for
43590      Turkish.  */
43591   if (towupper ('i') != 0x0130 || towlower (0x0130) != 'i'
43592       || towupper(0x0131) != 'I' || towlower ('I') != 0x0131)
43593     return 1;
43594   return 0;
43595 }
43596
43597 _ACEOF
43598     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
43599   (eval $ac_link) 2>&5
43600   ac_status=$?
43601   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43602   test $ac_status = 0; } && test -s conftest$ac_exeext; then
43603       case "$host_os" in
43604         # Handle native Windows specially, because there setlocale() interprets
43605         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
43606         # "fr" or "fra" as "French" or "French_France.1252",
43607         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
43608         # "ja" as "Japanese" or "Japanese_Japan.932",
43609         # and similar.
43610         mingw*)
43611           # Test for the hypothetical native Windows locale name.
43612           if (LC_ALL=Turkish_Turkey.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
43613             gt_cv_locale_tr_utf8=Turkish_Turkey.65001
43614           else
43615             # None found.
43616             gt_cv_locale_tr_utf8=none
43617           fi
43618           ;;
43619         *)
43620           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
43621           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
43622           # configure script would override the LC_ALL setting. Likewise for
43623           # LC_CTYPE, which is also set at the beginning of the configure script.
43624           # Test for the usual locale name.
43625           if (LC_ALL=tr_TR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
43626             gt_cv_locale_tr_utf8=tr_TR
43627           else
43628             # Test for the locale name with explicit encoding suffix.
43629             if (LC_ALL=tr_TR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
43630               gt_cv_locale_tr_utf8=tr_TR.UTF-8
43631             else
43632               # Test for the Solaris 7 locale name.
43633               if (LC_ALL=tr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
43634                 gt_cv_locale_tr_utf8=tr.UTF-8
43635               else
43636                 # None found.
43637                 gt_cv_locale_tr_utf8=none
43638               fi
43639             fi
43640           fi
43641           ;;
43642       esac
43643     else
43644       gt_cv_locale_tr_utf8=none
43645     fi
43646     rm -fr conftest*
43647
43648 fi
43649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_tr_utf8" >&5
43650 $as_echo "$gt_cv_locale_tr_utf8" >&6; }
43651   LOCALE_TR_UTF8=$gt_cv_locale_tr_utf8
43652
43653
43654
43655
43656
43657   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
43658 $as_echo_n "checking for a transitional chinese locale... " >&6; }
43659 if ${gt_cv_locale_zh_CN+:} false; then :
43660   $as_echo_n "(cached) " >&6
43661 else
43662
43663     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43664 /* end confdefs.h.  */
43665
43666 #include <locale.h>
43667 #include <stdlib.h>
43668 #include <time.h>
43669 #if HAVE_LANGINFO_CODESET
43670 # include <langinfo.h>
43671 #endif
43672 #include <stdlib.h>
43673 #include <string.h>
43674 struct tm t;
43675 char buf[16];
43676 int main ()
43677 {
43678   const char *p;
43679   /* Check whether the given locale name is recognized by the system.  */
43680 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
43681   /* On native Windows, setlocale(category, "") looks at the system settings,
43682      not at the environment variables.  Also, when an encoding suffix such
43683      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
43684      category of the locale to "C".  */
43685   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
43686       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
43687     return 1;
43688 #else
43689   if (setlocale (LC_ALL, "") == NULL) return 1;
43690 #endif
43691   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
43692      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
43693      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
43694      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
43695      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
43696      some unit tests fail.
43697      On MirBSD 10, when an unsupported locale is specified, setlocale()
43698      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
43699 #if HAVE_LANGINFO_CODESET
43700   {
43701     const char *cs = nl_langinfo (CODESET);
43702     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
43703         || strcmp (cs, "UTF-8") == 0)
43704       return 1;
43705   }
43706 #endif
43707 #ifdef __CYGWIN__
43708   /* On Cygwin, avoid locale names without encoding suffix, because the
43709      locale_charset() function relies on the encoding suffix.  Note that
43710      LC_ALL is set on the command line.  */
43711   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
43712 #endif
43713   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
43714      This excludes the UTF-8 encoding (except on MirBSD).  */
43715   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
43716   if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
43717   for (p = buf; *p != '\0'; p++)
43718     if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
43719       return 1;
43720   /* Check whether a typical GB18030 multibyte sequence is recognized as a
43721      single wide character.  This excludes the GB2312 and GBK encodings.  */
43722   if (mblen ("\203\062\332\066", 5) != 4)
43723     return 1;
43724   return 0;
43725 }
43726
43727 _ACEOF
43728     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
43729   (eval $ac_link) 2>&5
43730   ac_status=$?
43731   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43732   test $ac_status = 0; } && test -s conftest$ac_exeext; then
43733       case "$host_os" in
43734         # Handle native Windows specially, because there setlocale() interprets
43735         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
43736         # "fr" or "fra" as "French" or "French_France.1252",
43737         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
43738         # "ja" as "Japanese" or "Japanese_Japan.932",
43739         # and similar.
43740         mingw*)
43741           # Test for the hypothetical native Windows locale name.
43742           if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
43743             gt_cv_locale_zh_CN=Chinese_China.54936
43744           else
43745             # None found.
43746             gt_cv_locale_zh_CN=none
43747           fi
43748           ;;
43749         solaris2.8)
43750           # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
43751           # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
43752           # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
43753           gt_cv_locale_zh_CN=none
43754           ;;
43755         *)
43756           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
43757           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
43758           # configure script would override the LC_ALL setting. Likewise for
43759           # LC_CTYPE, which is also set at the beginning of the configure script.
43760           # Test for the locale name without encoding suffix.
43761           if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
43762             gt_cv_locale_zh_CN=zh_CN
43763           else
43764             # Test for the locale name with explicit encoding suffix.
43765             if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
43766               gt_cv_locale_zh_CN=zh_CN.GB18030
43767             else
43768               # None found.
43769               gt_cv_locale_zh_CN=none
43770             fi
43771           fi
43772           ;;
43773       esac
43774     else
43775       # If there was a link error, due to mblen(), the system is so old that
43776       # it certainly doesn't have a chinese locale.
43777       gt_cv_locale_zh_CN=none
43778     fi
43779     rm -fr conftest*
43780
43781 fi
43782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
43783 $as_echo "$gt_cv_locale_zh_CN" >&6; }
43784   LOCALE_ZH_CN=$gt_cv_locale_zh_CN
43785
43786
43787
43788
43789   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
43790 $as_echo_n "checking for a french Unicode locale... " >&6; }
43791 if ${gt_cv_locale_fr_utf8+:} false; then :
43792   $as_echo_n "(cached) " >&6
43793 else
43794
43795     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43796 /* end confdefs.h.  */
43797
43798 #include <locale.h>
43799 #include <time.h>
43800 #if HAVE_LANGINFO_CODESET
43801 # include <langinfo.h>
43802 #endif
43803 #include <stdlib.h>
43804 #include <string.h>
43805 struct tm t;
43806 char buf[16];
43807 int main () {
43808   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
43809      imitates locale dependent behaviour by looking at the environment
43810      variables, and all locales use the UTF-8 encoding.  */
43811 #if !(defined __BEOS__ || defined __HAIKU__)
43812   /* Check whether the given locale name is recognized by the system.  */
43813 # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
43814   /* On native Windows, setlocale(category, "") looks at the system settings,
43815      not at the environment variables.  Also, when an encoding suffix such
43816      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
43817      category of the locale to "C".  */
43818   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
43819       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
43820     return 1;
43821 # else
43822   if (setlocale (LC_ALL, "") == NULL) return 1;
43823 # endif
43824   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
43825      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
43826      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
43827      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
43828      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
43829      some unit tests fail.  */
43830 # if HAVE_LANGINFO_CODESET
43831   {
43832     const char *cs = nl_langinfo (CODESET);
43833     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
43834       return 1;
43835   }
43836 # endif
43837 # ifdef __CYGWIN__
43838   /* On Cygwin, avoid locale names without encoding suffix, because the
43839      locale_charset() function relies on the encoding suffix.  Note that
43840      LC_ALL is set on the command line.  */
43841   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
43842 # endif
43843   /* Check whether in the abbreviation of the second month, the second
43844      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
43845      two bytes long, with UTF-8 encoding.  */
43846   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
43847   if (strftime (buf, sizeof (buf), "%b", &t) < 4
43848       || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
43849     return 1;
43850 #endif
43851 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
43852   /* Check whether the decimal separator is a comma.
43853      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
43854      are nl_langinfo(RADIXCHAR) are both ".".  */
43855   if (localeconv () ->decimal_point[0] != ',') return 1;
43856 #endif
43857   return 0;
43858 }
43859
43860 _ACEOF
43861     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
43862   (eval $ac_link) 2>&5
43863   ac_status=$?
43864   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43865   test $ac_status = 0; } && test -s conftest$ac_exeext; then
43866       case "$host_os" in
43867         # Handle native Windows specially, because there setlocale() interprets
43868         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
43869         # "fr" or "fra" as "French" or "French_France.1252",
43870         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
43871         # "ja" as "Japanese" or "Japanese_Japan.932",
43872         # and similar.
43873         mingw*)
43874           # Test for the hypothetical native Windows locale name.
43875           if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
43876             gt_cv_locale_fr_utf8=French_France.65001
43877           else
43878             # None found.
43879             gt_cv_locale_fr_utf8=none
43880           fi
43881           ;;
43882         *)
43883           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
43884           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
43885           # configure script would override the LC_ALL setting. Likewise for
43886           # LC_CTYPE, which is also set at the beginning of the configure script.
43887           # Test for the usual locale name.
43888           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
43889             gt_cv_locale_fr_utf8=fr_FR
43890           else
43891             # Test for the locale name with explicit encoding suffix.
43892             if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
43893               gt_cv_locale_fr_utf8=fr_FR.UTF-8
43894             else
43895               # Test for the Solaris 7 locale name.
43896               if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
43897                 gt_cv_locale_fr_utf8=fr.UTF-8
43898               else
43899                 # None found.
43900                 gt_cv_locale_fr_utf8=none
43901               fi
43902             fi
43903           fi
43904           ;;
43905       esac
43906     fi
43907     rm -fr conftest*
43908
43909 fi
43910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
43911 $as_echo "$gt_cv_locale_fr_utf8" >&6; }
43912   LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
43913
43914
43915
43916
43917
43918   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
43919 $as_echo_n "checking for a traditional french locale... " >&6; }
43920 if ${gt_cv_locale_fr+:} false; then :
43921   $as_echo_n "(cached) " >&6
43922 else
43923
43924     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43925 /* end confdefs.h.  */
43926
43927 #include <locale.h>
43928 #include <time.h>
43929 #if HAVE_LANGINFO_CODESET
43930 # include <langinfo.h>
43931 #endif
43932 #include <stdlib.h>
43933 #include <string.h>
43934 struct tm t;
43935 char buf[16];
43936 int main () {
43937   /* Check whether the given locale name is recognized by the system.  */
43938 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
43939   /* On native Windows, setlocale(category, "") looks at the system settings,
43940      not at the environment variables.  Also, when an encoding suffix such
43941      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
43942      category of the locale to "C".  */
43943   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
43944       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
43945     return 1;
43946 #else
43947   if (setlocale (LC_ALL, "") == NULL) return 1;
43948 #endif
43949   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
43950      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
43951      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
43952      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
43953      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
43954      some unit tests fail.
43955      On MirBSD 10, when an unsupported locale is specified, setlocale()
43956      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
43957 #if HAVE_LANGINFO_CODESET
43958   {
43959     const char *cs = nl_langinfo (CODESET);
43960     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
43961         || strcmp (cs, "UTF-8") == 0)
43962       return 1;
43963   }
43964 #endif
43965 #ifdef __CYGWIN__
43966   /* On Cygwin, avoid locale names without encoding suffix, because the
43967      locale_charset() function relies on the encoding suffix.  Note that
43968      LC_ALL is set on the command line.  */
43969   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
43970 #endif
43971   /* Check whether in the abbreviation of the second month, the second
43972      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
43973      one byte long. This excludes the UTF-8 encoding.  */
43974   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
43975   if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
43976 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
43977   /* Check whether the decimal separator is a comma.
43978      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
43979      are nl_langinfo(RADIXCHAR) are both ".".  */
43980   if (localeconv () ->decimal_point[0] != ',') return 1;
43981 #endif
43982   return 0;
43983 }
43984
43985 _ACEOF
43986     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
43987   (eval $ac_link) 2>&5
43988   ac_status=$?
43989   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43990   test $ac_status = 0; } && test -s conftest$ac_exeext; then
43991       case "$host_os" in
43992         # Handle native Windows specially, because there setlocale() interprets
43993         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
43994         # "fr" or "fra" as "French" or "French_France.1252",
43995         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
43996         # "ja" as "Japanese" or "Japanese_Japan.932",
43997         # and similar.
43998         mingw*)
43999           # Test for the native Windows locale name.
44000           if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44001             gt_cv_locale_fr=French_France.1252
44002           else
44003             # None found.
44004             gt_cv_locale_fr=none
44005           fi
44006           ;;
44007         *)
44008           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
44009           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
44010           # configure script would override the LC_ALL setting. Likewise for
44011           # LC_CTYPE, which is also set at the beginning of the configure script.
44012           # Test for the usual locale name.
44013           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44014             gt_cv_locale_fr=fr_FR
44015           else
44016             # Test for the locale name with explicit encoding suffix.
44017             if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44018               gt_cv_locale_fr=fr_FR.ISO-8859-1
44019             else
44020               # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
44021               if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44022                 gt_cv_locale_fr=fr_FR.ISO8859-1
44023               else
44024                 # Test for the HP-UX locale name.
44025                 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44026                   gt_cv_locale_fr=fr_FR.iso88591
44027                 else
44028                   # Test for the Solaris 7 locale name.
44029                   if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44030                     gt_cv_locale_fr=fr
44031                   else
44032                     # None found.
44033                     gt_cv_locale_fr=none
44034                   fi
44035                 fi
44036               fi
44037             fi
44038           fi
44039           ;;
44040       esac
44041     fi
44042     rm -fr conftest*
44043
44044 fi
44045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
44046 $as_echo "$gt_cv_locale_fr" >&6; }
44047   LOCALE_FR=$gt_cv_locale_fr
44048
44049
44050
44051
44052   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
44053 $as_echo_n "checking for a french Unicode locale... " >&6; }
44054 if ${gt_cv_locale_fr_utf8+:} false; then :
44055   $as_echo_n "(cached) " >&6
44056 else
44057
44058     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44059 /* end confdefs.h.  */
44060
44061 #include <locale.h>
44062 #include <time.h>
44063 #if HAVE_LANGINFO_CODESET
44064 # include <langinfo.h>
44065 #endif
44066 #include <stdlib.h>
44067 #include <string.h>
44068 struct tm t;
44069 char buf[16];
44070 int main () {
44071   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
44072      imitates locale dependent behaviour by looking at the environment
44073      variables, and all locales use the UTF-8 encoding.  */
44074 #if !(defined __BEOS__ || defined __HAIKU__)
44075   /* Check whether the given locale name is recognized by the system.  */
44076 # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
44077   /* On native Windows, setlocale(category, "") looks at the system settings,
44078      not at the environment variables.  Also, when an encoding suffix such
44079      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
44080      category of the locale to "C".  */
44081   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
44082       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
44083     return 1;
44084 # else
44085   if (setlocale (LC_ALL, "") == NULL) return 1;
44086 # endif
44087   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
44088      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
44089      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
44090      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
44091      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
44092      some unit tests fail.  */
44093 # if HAVE_LANGINFO_CODESET
44094   {
44095     const char *cs = nl_langinfo (CODESET);
44096     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
44097       return 1;
44098   }
44099 # endif
44100 # ifdef __CYGWIN__
44101   /* On Cygwin, avoid locale names without encoding suffix, because the
44102      locale_charset() function relies on the encoding suffix.  Note that
44103      LC_ALL is set on the command line.  */
44104   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
44105 # endif
44106   /* Check whether in the abbreviation of the second month, the second
44107      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
44108      two bytes long, with UTF-8 encoding.  */
44109   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
44110   if (strftime (buf, sizeof (buf), "%b", &t) < 4
44111       || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
44112     return 1;
44113 #endif
44114 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
44115   /* Check whether the decimal separator is a comma.
44116      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
44117      are nl_langinfo(RADIXCHAR) are both ".".  */
44118   if (localeconv () ->decimal_point[0] != ',') return 1;
44119 #endif
44120   return 0;
44121 }
44122
44123 _ACEOF
44124     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
44125   (eval $ac_link) 2>&5
44126   ac_status=$?
44127   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44128   test $ac_status = 0; } && test -s conftest$ac_exeext; then
44129       case "$host_os" in
44130         # Handle native Windows specially, because there setlocale() interprets
44131         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
44132         # "fr" or "fra" as "French" or "French_France.1252",
44133         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
44134         # "ja" as "Japanese" or "Japanese_Japan.932",
44135         # and similar.
44136         mingw*)
44137           # Test for the hypothetical native Windows locale name.
44138           if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44139             gt_cv_locale_fr_utf8=French_France.65001
44140           else
44141             # None found.
44142             gt_cv_locale_fr_utf8=none
44143           fi
44144           ;;
44145         *)
44146           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
44147           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
44148           # configure script would override the LC_ALL setting. Likewise for
44149           # LC_CTYPE, which is also set at the beginning of the configure script.
44150           # Test for the usual locale name.
44151           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44152             gt_cv_locale_fr_utf8=fr_FR
44153           else
44154             # Test for the locale name with explicit encoding suffix.
44155             if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44156               gt_cv_locale_fr_utf8=fr_FR.UTF-8
44157             else
44158               # Test for the Solaris 7 locale name.
44159               if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44160                 gt_cv_locale_fr_utf8=fr.UTF-8
44161               else
44162                 # None found.
44163                 gt_cv_locale_fr_utf8=none
44164               fi
44165             fi
44166           fi
44167           ;;
44168       esac
44169     fi
44170     rm -fr conftest*
44171
44172 fi
44173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
44174 $as_echo "$gt_cv_locale_fr_utf8" >&6; }
44175   LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
44176
44177
44178
44179
44180
44181   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
44182 $as_echo_n "checking for a traditional japanese locale... " >&6; }
44183 if ${gt_cv_locale_ja+:} false; then :
44184   $as_echo_n "(cached) " >&6
44185 else
44186
44187     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44188 /* end confdefs.h.  */
44189
44190 #include <locale.h>
44191 #include <time.h>
44192 #if HAVE_LANGINFO_CODESET
44193 # include <langinfo.h>
44194 #endif
44195 #include <stdlib.h>
44196 #include <string.h>
44197 struct tm t;
44198 char buf[16];
44199 int main ()
44200 {
44201   const char *p;
44202   /* Check whether the given locale name is recognized by the system.  */
44203 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
44204   /* On native Windows, setlocale(category, "") looks at the system settings,
44205      not at the environment variables.  Also, when an encoding suffix such
44206      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
44207      category of the locale to "C".  */
44208   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
44209       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
44210     return 1;
44211 #else
44212   if (setlocale (LC_ALL, "") == NULL) return 1;
44213 #endif
44214   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
44215      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
44216      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
44217      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
44218      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
44219      some unit tests fail.
44220      On MirBSD 10, when an unsupported locale is specified, setlocale()
44221      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
44222 #if HAVE_LANGINFO_CODESET
44223   {
44224     const char *cs = nl_langinfo (CODESET);
44225     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
44226         || strcmp (cs, "UTF-8") == 0)
44227       return 1;
44228   }
44229 #endif
44230 #ifdef __CYGWIN__
44231   /* On Cygwin, avoid locale names without encoding suffix, because the
44232      locale_charset() function relies on the encoding suffix.  Note that
44233      LC_ALL is set on the command line.  */
44234   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
44235 #endif
44236   /* Check whether MB_CUR_MAX is > 1.  This excludes the dysfunctional locales
44237      on Cygwin 1.5.x.  */
44238   if (MB_CUR_MAX == 1)
44239     return 1;
44240   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
44241      This excludes the UTF-8 encoding (except on MirBSD).  */
44242   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
44243   if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
44244   for (p = buf; *p != '\0'; p++)
44245     if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
44246       return 1;
44247   return 0;
44248 }
44249
44250 _ACEOF
44251     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
44252   (eval $ac_link) 2>&5
44253   ac_status=$?
44254   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44255   test $ac_status = 0; } && test -s conftest$ac_exeext; then
44256       case "$host_os" in
44257         # Handle native Windows specially, because there setlocale() interprets
44258         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
44259         # "fr" or "fra" as "French" or "French_France.1252",
44260         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
44261         # "ja" as "Japanese" or "Japanese_Japan.932",
44262         # and similar.
44263         mingw*)
44264           # Note that on native Windows, the Japanese locale is
44265           # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
44266           # cannot use it here.
44267           gt_cv_locale_ja=none
44268           ;;
44269         *)
44270           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
44271           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
44272           # configure script would override the LC_ALL setting. Likewise for
44273           # LC_CTYPE, which is also set at the beginning of the configure script.
44274           # Test for the AIX locale name.
44275           if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44276             gt_cv_locale_ja=ja_JP
44277           else
44278             # Test for the locale name with explicit encoding suffix.
44279             if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44280               gt_cv_locale_ja=ja_JP.EUC-JP
44281             else
44282               # Test for the HP-UX, OSF/1, NetBSD locale name.
44283               if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44284                 gt_cv_locale_ja=ja_JP.eucJP
44285               else
44286                 # Test for the IRIX, FreeBSD locale name.
44287                 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44288                   gt_cv_locale_ja=ja_JP.EUC
44289                 else
44290                   # Test for the Solaris 7 locale name.
44291                   if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44292                     gt_cv_locale_ja=ja
44293                   else
44294                     # Special test for NetBSD 1.6.
44295                     if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
44296                       gt_cv_locale_ja=ja_JP.eucJP
44297                     else
44298                       # None found.
44299                       gt_cv_locale_ja=none
44300                     fi
44301                   fi
44302                 fi
44303               fi
44304             fi
44305           fi
44306           ;;
44307       esac
44308     fi
44309     rm -fr conftest*
44310
44311 fi
44312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
44313 $as_echo "$gt_cv_locale_ja" >&6; }
44314   LOCALE_JA=$gt_cv_locale_ja
44315
44316
44317
44318
44319
44320   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
44321 $as_echo_n "checking for a transitional chinese locale... " >&6; }
44322 if ${gt_cv_locale_zh_CN+:} false; then :
44323   $as_echo_n "(cached) " >&6
44324 else
44325
44326     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44327 /* end confdefs.h.  */
44328
44329 #include <locale.h>
44330 #include <stdlib.h>
44331 #include <time.h>
44332 #if HAVE_LANGINFO_CODESET
44333 # include <langinfo.h>
44334 #endif
44335 #include <stdlib.h>
44336 #include <string.h>
44337 struct tm t;
44338 char buf[16];
44339 int main ()
44340 {
44341   const char *p;
44342   /* Check whether the given locale name is recognized by the system.  */
44343 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
44344   /* On native Windows, setlocale(category, "") looks at the system settings,
44345      not at the environment variables.  Also, when an encoding suffix such
44346      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
44347      category of the locale to "C".  */
44348   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
44349       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
44350     return 1;
44351 #else
44352   if (setlocale (LC_ALL, "") == NULL) return 1;
44353 #endif
44354   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
44355      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
44356      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
44357      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
44358      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
44359      some unit tests fail.
44360      On MirBSD 10, when an unsupported locale is specified, setlocale()
44361      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
44362 #if HAVE_LANGINFO_CODESET
44363   {
44364     const char *cs = nl_langinfo (CODESET);
44365     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
44366         || strcmp (cs, "UTF-8") == 0)
44367       return 1;
44368   }
44369 #endif
44370 #ifdef __CYGWIN__
44371   /* On Cygwin, avoid locale names without encoding suffix, because the
44372      locale_charset() function relies on the encoding suffix.  Note that
44373      LC_ALL is set on the command line.  */
44374   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
44375 #endif
44376   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
44377      This excludes the UTF-8 encoding (except on MirBSD).  */
44378   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
44379   if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
44380   for (p = buf; *p != '\0'; p++)
44381     if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
44382       return 1;
44383   /* Check whether a typical GB18030 multibyte sequence is recognized as a
44384      single wide character.  This excludes the GB2312 and GBK encodings.  */
44385   if (mblen ("\203\062\332\066", 5) != 4)
44386     return 1;
44387   return 0;
44388 }
44389
44390 _ACEOF
44391     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
44392   (eval $ac_link) 2>&5
44393   ac_status=$?
44394   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44395   test $ac_status = 0; } && test -s conftest$ac_exeext; then
44396       case "$host_os" in
44397         # Handle native Windows specially, because there setlocale() interprets
44398         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
44399         # "fr" or "fra" as "French" or "French_France.1252",
44400         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
44401         # "ja" as "Japanese" or "Japanese_Japan.932",
44402         # and similar.
44403         mingw*)
44404           # Test for the hypothetical native Windows locale name.
44405           if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44406             gt_cv_locale_zh_CN=Chinese_China.54936
44407           else
44408             # None found.
44409             gt_cv_locale_zh_CN=none
44410           fi
44411           ;;
44412         solaris2.8)
44413           # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
44414           # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
44415           # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
44416           gt_cv_locale_zh_CN=none
44417           ;;
44418         *)
44419           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
44420           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
44421           # configure script would override the LC_ALL setting. Likewise for
44422           # LC_CTYPE, which is also set at the beginning of the configure script.
44423           # Test for the locale name without encoding suffix.
44424           if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44425             gt_cv_locale_zh_CN=zh_CN
44426           else
44427             # Test for the locale name with explicit encoding suffix.
44428             if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44429               gt_cv_locale_zh_CN=zh_CN.GB18030
44430             else
44431               # None found.
44432               gt_cv_locale_zh_CN=none
44433             fi
44434           fi
44435           ;;
44436       esac
44437     else
44438       # If there was a link error, due to mblen(), the system is so old that
44439       # it certainly doesn't have a chinese locale.
44440       gt_cv_locale_zh_CN=none
44441     fi
44442     rm -fr conftest*
44443
44444 fi
44445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
44446 $as_echo "$gt_cv_locale_zh_CN" >&6; }
44447   LOCALE_ZH_CN=$gt_cv_locale_zh_CN
44448
44449
44450
44451
44452   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
44453 $as_echo_n "checking for a french Unicode locale... " >&6; }
44454 if ${gt_cv_locale_fr_utf8+:} false; then :
44455   $as_echo_n "(cached) " >&6
44456 else
44457
44458     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44459 /* end confdefs.h.  */
44460
44461 #include <locale.h>
44462 #include <time.h>
44463 #if HAVE_LANGINFO_CODESET
44464 # include <langinfo.h>
44465 #endif
44466 #include <stdlib.h>
44467 #include <string.h>
44468 struct tm t;
44469 char buf[16];
44470 int main () {
44471   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
44472      imitates locale dependent behaviour by looking at the environment
44473      variables, and all locales use the UTF-8 encoding.  */
44474 #if !(defined __BEOS__ || defined __HAIKU__)
44475   /* Check whether the given locale name is recognized by the system.  */
44476 # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
44477   /* On native Windows, setlocale(category, "") looks at the system settings,
44478      not at the environment variables.  Also, when an encoding suffix such
44479      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
44480      category of the locale to "C".  */
44481   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
44482       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
44483     return 1;
44484 # else
44485   if (setlocale (LC_ALL, "") == NULL) return 1;
44486 # endif
44487   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
44488      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
44489      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
44490      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
44491      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
44492      some unit tests fail.  */
44493 # if HAVE_LANGINFO_CODESET
44494   {
44495     const char *cs = nl_langinfo (CODESET);
44496     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
44497       return 1;
44498   }
44499 # endif
44500 # ifdef __CYGWIN__
44501   /* On Cygwin, avoid locale names without encoding suffix, because the
44502      locale_charset() function relies on the encoding suffix.  Note that
44503      LC_ALL is set on the command line.  */
44504   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
44505 # endif
44506   /* Check whether in the abbreviation of the second month, the second
44507      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
44508      two bytes long, with UTF-8 encoding.  */
44509   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
44510   if (strftime (buf, sizeof (buf), "%b", &t) < 4
44511       || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
44512     return 1;
44513 #endif
44514 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
44515   /* Check whether the decimal separator is a comma.
44516      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
44517      are nl_langinfo(RADIXCHAR) are both ".".  */
44518   if (localeconv () ->decimal_point[0] != ',') return 1;
44519 #endif
44520   return 0;
44521 }
44522
44523 _ACEOF
44524     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
44525   (eval $ac_link) 2>&5
44526   ac_status=$?
44527   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44528   test $ac_status = 0; } && test -s conftest$ac_exeext; then
44529       case "$host_os" in
44530         # Handle native Windows specially, because there setlocale() interprets
44531         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
44532         # "fr" or "fra" as "French" or "French_France.1252",
44533         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
44534         # "ja" as "Japanese" or "Japanese_Japan.932",
44535         # and similar.
44536         mingw*)
44537           # Test for the hypothetical native Windows locale name.
44538           if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44539             gt_cv_locale_fr_utf8=French_France.65001
44540           else
44541             # None found.
44542             gt_cv_locale_fr_utf8=none
44543           fi
44544           ;;
44545         *)
44546           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
44547           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
44548           # configure script would override the LC_ALL setting. Likewise for
44549           # LC_CTYPE, which is also set at the beginning of the configure script.
44550           # Test for the usual locale name.
44551           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44552             gt_cv_locale_fr_utf8=fr_FR
44553           else
44554             # Test for the locale name with explicit encoding suffix.
44555             if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44556               gt_cv_locale_fr_utf8=fr_FR.UTF-8
44557             else
44558               # Test for the Solaris 7 locale name.
44559               if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44560                 gt_cv_locale_fr_utf8=fr.UTF-8
44561               else
44562                 # None found.
44563                 gt_cv_locale_fr_utf8=none
44564               fi
44565             fi
44566           fi
44567           ;;
44568       esac
44569     fi
44570     rm -fr conftest*
44571
44572 fi
44573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
44574 $as_echo "$gt_cv_locale_fr_utf8" >&6; }
44575   LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
44576
44577
44578
44579
44580
44581   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
44582 $as_echo_n "checking for a transitional chinese locale... " >&6; }
44583 if ${gt_cv_locale_zh_CN+:} false; then :
44584   $as_echo_n "(cached) " >&6
44585 else
44586
44587     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44588 /* end confdefs.h.  */
44589
44590 #include <locale.h>
44591 #include <stdlib.h>
44592 #include <time.h>
44593 #if HAVE_LANGINFO_CODESET
44594 # include <langinfo.h>
44595 #endif
44596 #include <stdlib.h>
44597 #include <string.h>
44598 struct tm t;
44599 char buf[16];
44600 int main ()
44601 {
44602   const char *p;
44603   /* Check whether the given locale name is recognized by the system.  */
44604 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
44605   /* On native Windows, setlocale(category, "") looks at the system settings,
44606      not at the environment variables.  Also, when an encoding suffix such
44607      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
44608      category of the locale to "C".  */
44609   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
44610       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
44611     return 1;
44612 #else
44613   if (setlocale (LC_ALL, "") == NULL) return 1;
44614 #endif
44615   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
44616      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
44617      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
44618      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
44619      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
44620      some unit tests fail.
44621      On MirBSD 10, when an unsupported locale is specified, setlocale()
44622      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
44623 #if HAVE_LANGINFO_CODESET
44624   {
44625     const char *cs = nl_langinfo (CODESET);
44626     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
44627         || strcmp (cs, "UTF-8") == 0)
44628       return 1;
44629   }
44630 #endif
44631 #ifdef __CYGWIN__
44632   /* On Cygwin, avoid locale names without encoding suffix, because the
44633      locale_charset() function relies on the encoding suffix.  Note that
44634      LC_ALL is set on the command line.  */
44635   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
44636 #endif
44637   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
44638      This excludes the UTF-8 encoding (except on MirBSD).  */
44639   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
44640   if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
44641   for (p = buf; *p != '\0'; p++)
44642     if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
44643       return 1;
44644   /* Check whether a typical GB18030 multibyte sequence is recognized as a
44645      single wide character.  This excludes the GB2312 and GBK encodings.  */
44646   if (mblen ("\203\062\332\066", 5) != 4)
44647     return 1;
44648   return 0;
44649 }
44650
44651 _ACEOF
44652     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
44653   (eval $ac_link) 2>&5
44654   ac_status=$?
44655   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44656   test $ac_status = 0; } && test -s conftest$ac_exeext; then
44657       case "$host_os" in
44658         # Handle native Windows specially, because there setlocale() interprets
44659         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
44660         # "fr" or "fra" as "French" or "French_France.1252",
44661         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
44662         # "ja" as "Japanese" or "Japanese_Japan.932",
44663         # and similar.
44664         mingw*)
44665           # Test for the hypothetical native Windows locale name.
44666           if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44667             gt_cv_locale_zh_CN=Chinese_China.54936
44668           else
44669             # None found.
44670             gt_cv_locale_zh_CN=none
44671           fi
44672           ;;
44673         solaris2.8)
44674           # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
44675           # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
44676           # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
44677           gt_cv_locale_zh_CN=none
44678           ;;
44679         *)
44680           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
44681           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
44682           # configure script would override the LC_ALL setting. Likewise for
44683           # LC_CTYPE, which is also set at the beginning of the configure script.
44684           # Test for the locale name without encoding suffix.
44685           if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44686             gt_cv_locale_zh_CN=zh_CN
44687           else
44688             # Test for the locale name with explicit encoding suffix.
44689             if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44690               gt_cv_locale_zh_CN=zh_CN.GB18030
44691             else
44692               # None found.
44693               gt_cv_locale_zh_CN=none
44694             fi
44695           fi
44696           ;;
44697       esac
44698     else
44699       # If there was a link error, due to mblen(), the system is so old that
44700       # it certainly doesn't have a chinese locale.
44701       gt_cv_locale_zh_CN=none
44702     fi
44703     rm -fr conftest*
44704
44705 fi
44706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
44707 $as_echo "$gt_cv_locale_zh_CN" >&6; }
44708   LOCALE_ZH_CN=$gt_cv_locale_zh_CN
44709
44710
44711
44712
44713
44714   # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
44715   # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
44716   # irrelevant for anonymous mappings.
44717   ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
44718 if test "x$ac_cv_func_mmap" = xyes; then :
44719   gl_have_mmap=yes
44720 else
44721   gl_have_mmap=no
44722 fi
44723
44724
44725   # Try to allow MAP_ANONYMOUS.
44726   gl_have_mmap_anonymous=no
44727   if test $gl_have_mmap = yes; then
44728     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
44729 $as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
44730     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44731 /* end confdefs.h.  */
44732
44733 #include <sys/mman.h>
44734 #ifdef MAP_ANONYMOUS
44735     I cannot identify this map
44736 #endif
44737
44738 _ACEOF
44739 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
44740   $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
44741   gl_have_mmap_anonymous=yes
44742 fi
44743 rm -f conftest*
44744
44745     if test $gl_have_mmap_anonymous != yes; then
44746       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44747 /* end confdefs.h.  */
44748
44749 #include <sys/mman.h>
44750 #ifdef MAP_ANON
44751     I cannot identify this map
44752 #endif
44753
44754 _ACEOF
44755 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
44756   $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
44757
44758 $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
44759
44760          gl_have_mmap_anonymous=yes
44761 fi
44762 rm -f conftest*
44763
44764     fi
44765     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
44766 $as_echo "$gl_have_mmap_anonymous" >&6; }
44767     if test $gl_have_mmap_anonymous = yes; then
44768
44769 $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
44770
44771     fi
44772   fi
44773
44774
44775   :
44776
44777
44778
44779
44780
44781
44782   :
44783
44784
44785
44786
44787
44788
44789
44790
44791   # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
44792   # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
44793   # irrelevant for anonymous mappings.
44794   ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
44795 if test "x$ac_cv_func_mmap" = xyes; then :
44796   gl_have_mmap=yes
44797 else
44798   gl_have_mmap=no
44799 fi
44800
44801
44802   # Try to allow MAP_ANONYMOUS.
44803   gl_have_mmap_anonymous=no
44804   if test $gl_have_mmap = yes; then
44805     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
44806 $as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
44807     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44808 /* end confdefs.h.  */
44809
44810 #include <sys/mman.h>
44811 #ifdef MAP_ANONYMOUS
44812     I cannot identify this map
44813 #endif
44814
44815 _ACEOF
44816 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
44817   $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
44818   gl_have_mmap_anonymous=yes
44819 fi
44820 rm -f conftest*
44821
44822     if test $gl_have_mmap_anonymous != yes; then
44823       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44824 /* end confdefs.h.  */
44825
44826 #include <sys/mman.h>
44827 #ifdef MAP_ANON
44828     I cannot identify this map
44829 #endif
44830
44831 _ACEOF
44832 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
44833   $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
44834
44835 $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
44836
44837          gl_have_mmap_anonymous=yes
44838 fi
44839 rm -f conftest*
44840
44841     fi
44842     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
44843 $as_echo "$gl_have_mmap_anonymous" >&6; }
44844     if test $gl_have_mmap_anonymous = yes; then
44845
44846 $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
44847
44848     fi
44849   fi
44850
44851
44852   :
44853
44854
44855
44856
44857
44858
44859   :
44860
44861
44862
44863
44864
44865
44866
44867
44868
44869
44870
44871   :
44872
44873
44874
44875
44876
44877
44878
44879  nanosleep_save_libs=$LIBS
44880
44881  # Solaris 2.5.1 needs -lposix4 to get the nanosleep function.
44882  # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
44883  LIB_NANOSLEEP=
44884
44885  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing nanosleep" >&5
44886 $as_echo_n "checking for library containing nanosleep... " >&6; }
44887 if ${ac_cv_search_nanosleep+:} false; then :
44888   $as_echo_n "(cached) " >&6
44889 else
44890   ac_func_search_save_LIBS=$LIBS
44891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44892 /* end confdefs.h.  */
44893
44894 /* Override any GCC internal prototype to avoid an error.
44895    Use char because int might match the return type of a GCC
44896    builtin and then its argument prototype would still apply.  */
44897 #ifdef __cplusplus
44898 extern "C"
44899 #endif
44900 char nanosleep ();
44901 int
44902 main ()
44903 {
44904 return nanosleep ();
44905   ;
44906   return 0;
44907 }
44908 _ACEOF
44909 for ac_lib in '' rt posix4; do
44910   if test -z "$ac_lib"; then
44911     ac_res="none required"
44912   else
44913     ac_res=-l$ac_lib
44914     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
44915   fi
44916   if ac_fn_c_try_link "$LINENO"; then :
44917   ac_cv_search_nanosleep=$ac_res
44918 fi
44919 rm -f core conftest.err conftest.$ac_objext \
44920     conftest$ac_exeext
44921   if ${ac_cv_search_nanosleep+:} false; then :
44922   break
44923 fi
44924 done
44925 if ${ac_cv_search_nanosleep+:} false; then :
44926
44927 else
44928   ac_cv_search_nanosleep=no
44929 fi
44930 rm conftest.$ac_ext
44931 LIBS=$ac_func_search_save_LIBS
44932 fi
44933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_nanosleep" >&5
44934 $as_echo "$ac_cv_search_nanosleep" >&6; }
44935 ac_res=$ac_cv_search_nanosleep
44936 if test "$ac_res" != no; then :
44937   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
44938   test "$ac_cv_search_nanosleep" = "none required" ||
44939                  LIB_NANOSLEEP=$ac_cv_search_nanosleep
44940 fi
44941
44942  if test "x$ac_cv_search_nanosleep" != xno; then
44943
44944
44945    if test $APPLE_UNIVERSAL_BUILD = 1; then
44946      # A universal build on Apple Mac OS X platforms.
44947      # The test result would be 'no (mishandles large arguments)' in 64-bit
44948      # mode but 'yes' in 32-bit mode. But we need a configuration result that
44949      # is valid in both modes.
44950      gl_cv_func_nanosleep='no (mishandles large arguments)'
44951    fi
44952
44953    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working nanosleep" >&5
44954 $as_echo_n "checking for working nanosleep... " >&6; }
44955 if ${gl_cv_func_nanosleep+:} false; then :
44956   $as_echo_n "(cached) " >&6
44957 else
44958
44959      if test "$cross_compiling" = yes; then :
44960   case "$host_os" in           linux*) # Guess it halfway works when the kernel is Linux.
44961             gl_cv_func_nanosleep='guessing no (mishandles large arguments)' ;;
44962           *)      # If we don't know, assume the worst.
44963             gl_cv_func_nanosleep='guessing no' ;;
44964         esac
44965
44966 else
44967   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44968 /* end confdefs.h.  */
44969
44970           #include <errno.h>
44971           #include <limits.h>
44972           #include <signal.h>
44973           #if HAVE_SYS_TIME_H
44974            #include <sys/time.h>
44975           #endif
44976           #include <time.h>
44977           #include <unistd.h>
44978           #define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
44979           #define TYPE_MAXIMUM(t) \
44980             ((t) (! TYPE_SIGNED (t) \
44981                   ? (t) -1 \
44982                   : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
44983
44984           static void
44985           check_for_SIGALRM (int sig)
44986           {
44987             if (sig != SIGALRM)
44988               _exit (1);
44989           }
44990
44991           int
44992           main ()
44993           {
44994             static struct timespec ts_sleep;
44995             static struct timespec ts_remaining;
44996             static struct sigaction act;
44997             /* Test for major problems first.  */
44998             if (! nanosleep)
44999               return 2;
45000             act.sa_handler = check_for_SIGALRM;
45001             sigemptyset (&act.sa_mask);
45002             sigaction (SIGALRM, &act, NULL);
45003             ts_sleep.tv_sec = 0;
45004             ts_sleep.tv_nsec = 1;
45005             alarm (1);
45006             if (nanosleep (&ts_sleep, NULL) != 0)
45007               return 3;
45008             /* Test for a minor problem: the handling of large arguments.  */
45009             ts_sleep.tv_sec = TYPE_MAXIMUM (time_t);
45010             ts_sleep.tv_nsec = 999999999;
45011             alarm (1);
45012             if (nanosleep (&ts_sleep, &ts_remaining) != -1)
45013               return 4;
45014             if (errno != EINTR)
45015               return 5;
45016             if (ts_remaining.tv_sec <= TYPE_MAXIMUM (time_t) - 10)
45017               return 6;
45018             return 0;
45019           }
45020 _ACEOF
45021 if ac_fn_c_try_run "$LINENO"; then :
45022   gl_cv_func_nanosleep=yes
45023 else
45024   case $? in         4|5|6) gl_cv_func_nanosleep='no (mishandles large arguments)';;         *)   gl_cv_func_nanosleep=no;;
45025         esac
45026 fi
45027 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
45028   conftest.$ac_objext conftest.beam conftest.$ac_ext
45029 fi
45030
45031
45032 fi
45033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_nanosleep" >&5
45034 $as_echo "$gl_cv_func_nanosleep" >&6; }
45035    case "$gl_cv_func_nanosleep" in
45036      *yes)
45037        REPLACE_NANOSLEEP=0
45038        ;;
45039      *)
45040        REPLACE_NANOSLEEP=1
45041        case "$gl_cv_func_nanosleep" in
45042          *"mishandles large arguments"*)
45043
45044 $as_echo "#define HAVE_BUG_BIG_NANOSLEEP 1" >>confdefs.h
45045
45046            ;;
45047          *)
45048            # The replacement uses select(). Add $LIBSOCKET to $LIB_NANOSLEEP.
45049            for ac_lib in $LIBSOCKET; do
45050              case " $LIB_NANOSLEEP " in
45051                *" $ac_lib "*) ;;
45052                *) LIB_NANOSLEEP="$LIB_NANOSLEEP $ac_lib";;
45053              esac
45054            done
45055            ;;
45056        esac
45057        ;;
45058    esac
45059  else
45060    HAVE_NANOSLEEP=0
45061  fi
45062  LIBS=$nanosleep_save_libs
45063
45064   if test $HAVE_NANOSLEEP = 0 || test $REPLACE_NANOSLEEP = 1; then
45065
45066
45067
45068
45069
45070
45071
45072
45073   gltests_LIBOBJS="$gltests_LIBOBJS nanosleep.$ac_objext"
45074
45075
45076
45077   :
45078
45079
45080
45081
45082
45083   :
45084
45085   fi
45086
45087
45088
45089
45090
45091     if test "$GNULIB_NANOSLEEP" != 1; then
45092         if test "$GNULIB_NANOSLEEP" = 0; then
45093       GNULIB_NANOSLEEP=$gl_module_indicator_condition
45094     else
45095       GNULIB_NANOSLEEP="($GNULIB_NANOSLEEP || $gl_module_indicator_condition)"
45096     fi
45097   fi
45098
45099
45100
45101
45102
45103 $as_echo "#define GNULIB_TEST_NANOSLEEP 1" >>confdefs.h
45104
45105
45106
45107
45108   :
45109
45110
45111
45112
45113
45114
45115   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <netinet/in.h> is self-contained" >&5
45116 $as_echo_n "checking whether <netinet/in.h> is self-contained... " >&6; }
45117 if ${gl_cv_header_netinet_in_h_selfcontained+:} false; then :
45118   $as_echo_n "(cached) " >&6
45119 else
45120
45121       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45122 /* end confdefs.h.  */
45123 #include <netinet/in.h>
45124 int
45125 main ()
45126 {
45127
45128   ;
45129   return 0;
45130 }
45131 _ACEOF
45132 if ac_fn_c_try_compile "$LINENO"; then :
45133   gl_cv_header_netinet_in_h_selfcontained=yes
45134 else
45135   gl_cv_header_netinet_in_h_selfcontained=no
45136 fi
45137 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45138
45139 fi
45140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_netinet_in_h_selfcontained" >&5
45141 $as_echo "$gl_cv_header_netinet_in_h_selfcontained" >&6; }
45142   if test $gl_cv_header_netinet_in_h_selfcontained = yes; then
45143     NETINET_IN_H=''
45144   else
45145     NETINET_IN_H='netinet/in.h'
45146     for ac_header in netinet/in.h
45147 do :
45148   ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
45149 if test "x$ac_cv_header_netinet_in_h" = xyes; then :
45150   cat >>confdefs.h <<_ACEOF
45151 #define HAVE_NETINET_IN_H 1
45152 _ACEOF
45153
45154 fi
45155
45156 done
45157
45158
45159
45160
45161
45162
45163
45164   :
45165
45166
45167
45168
45169
45170
45171
45172
45173      if test $gl_cv_have_include_next = yes; then
45174        gl_cv_next_netinet_in_h='<'netinet/in.h'>'
45175      else
45176        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <netinet/in.h>" >&5
45177 $as_echo_n "checking absolute name of <netinet/in.h>... " >&6; }
45178 if ${gl_cv_next_netinet_in_h+:} false; then :
45179   $as_echo_n "(cached) " >&6
45180 else
45181
45182              if test $ac_cv_header_netinet_in_h = yes; then
45183
45184
45185
45186
45187   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45188 /* end confdefs.h.  */
45189 #include <netinet/in.h>
45190 _ACEOF
45191                 case "$host_os" in
45192     aix*) gl_absname_cpp="$ac_cpp -C" ;;
45193     *)    gl_absname_cpp="$ac_cpp" ;;
45194   esac
45195
45196   case "$host_os" in
45197     mingw*)
45198                                           gl_dirsep_regex='[/\\]'
45199       ;;
45200     *)
45201       gl_dirsep_regex='\/'
45202       ;;
45203   esac
45204       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
45205   gl_header_literal_regex=`echo 'netinet/in.h' \
45206                            | sed -e "$gl_make_literal_regex_sed"`
45207   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
45208       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
45209       s|^/[^/]|//&|
45210       p
45211       q
45212     }'
45213
45214         gl_cv_absolute_netinet_in_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
45215   sed -n "$gl_absolute_header_sed"`
45216
45217            gl_header=$gl_cv_absolute_netinet_in_h
45218            gl_cv_next_netinet_in_h='"'$gl_header'"'
45219           else
45220                gl_cv_next_netinet_in_h='<'netinet/in.h'>'
45221              fi
45222
45223
45224 fi
45225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_netinet_in_h" >&5
45226 $as_echo "$gl_cv_next_netinet_in_h" >&6; }
45227      fi
45228      NEXT_NETINET_IN_H=$gl_cv_next_netinet_in_h
45229
45230      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
45231        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
45232        gl_next_as_first_directive='<'netinet/in.h'>'
45233      else
45234        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
45235        gl_next_as_first_directive=$gl_cv_next_netinet_in_h
45236      fi
45237      NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H=$gl_next_as_first_directive
45238
45239
45240
45241
45242     if test $ac_cv_header_netinet_in_h = yes; then
45243       HAVE_NETINET_IN_H=1
45244     else
45245       HAVE_NETINET_IN_H=0
45246     fi
45247
45248   fi
45249
45250    if test -n "$NETINET_IN_H"; then
45251   GL_GENERATE_NETINET_IN_H_TRUE=
45252   GL_GENERATE_NETINET_IN_H_FALSE='#'
45253 else
45254   GL_GENERATE_NETINET_IN_H_TRUE='#'
45255   GL_GENERATE_NETINET_IN_H_FALSE=
45256 fi
45257
45258
45259
45260
45261
45262
45263   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
45264 $as_echo_n "checking for a traditional french locale... " >&6; }
45265 if ${gt_cv_locale_fr+:} false; then :
45266   $as_echo_n "(cached) " >&6
45267 else
45268
45269     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45270 /* end confdefs.h.  */
45271
45272 #include <locale.h>
45273 #include <time.h>
45274 #if HAVE_LANGINFO_CODESET
45275 # include <langinfo.h>
45276 #endif
45277 #include <stdlib.h>
45278 #include <string.h>
45279 struct tm t;
45280 char buf[16];
45281 int main () {
45282   /* Check whether the given locale name is recognized by the system.  */
45283 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
45284   /* On native Windows, setlocale(category, "") looks at the system settings,
45285      not at the environment variables.  Also, when an encoding suffix such
45286      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
45287      category of the locale to "C".  */
45288   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
45289       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
45290     return 1;
45291 #else
45292   if (setlocale (LC_ALL, "") == NULL) return 1;
45293 #endif
45294   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
45295      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
45296      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
45297      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
45298      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
45299      some unit tests fail.
45300      On MirBSD 10, when an unsupported locale is specified, setlocale()
45301      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
45302 #if HAVE_LANGINFO_CODESET
45303   {
45304     const char *cs = nl_langinfo (CODESET);
45305     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
45306         || strcmp (cs, "UTF-8") == 0)
45307       return 1;
45308   }
45309 #endif
45310 #ifdef __CYGWIN__
45311   /* On Cygwin, avoid locale names without encoding suffix, because the
45312      locale_charset() function relies on the encoding suffix.  Note that
45313      LC_ALL is set on the command line.  */
45314   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
45315 #endif
45316   /* Check whether in the abbreviation of the second month, the second
45317      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
45318      one byte long. This excludes the UTF-8 encoding.  */
45319   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
45320   if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
45321 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
45322   /* Check whether the decimal separator is a comma.
45323      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
45324      are nl_langinfo(RADIXCHAR) are both ".".  */
45325   if (localeconv () ->decimal_point[0] != ',') return 1;
45326 #endif
45327   return 0;
45328 }
45329
45330 _ACEOF
45331     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
45332   (eval $ac_link) 2>&5
45333   ac_status=$?
45334   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45335   test $ac_status = 0; } && test -s conftest$ac_exeext; then
45336       case "$host_os" in
45337         # Handle native Windows specially, because there setlocale() interprets
45338         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
45339         # "fr" or "fra" as "French" or "French_France.1252",
45340         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
45341         # "ja" as "Japanese" or "Japanese_Japan.932",
45342         # and similar.
45343         mingw*)
45344           # Test for the native Windows locale name.
45345           if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
45346             gt_cv_locale_fr=French_France.1252
45347           else
45348             # None found.
45349             gt_cv_locale_fr=none
45350           fi
45351           ;;
45352         *)
45353           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
45354           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
45355           # configure script would override the LC_ALL setting. Likewise for
45356           # LC_CTYPE, which is also set at the beginning of the configure script.
45357           # Test for the usual locale name.
45358           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
45359             gt_cv_locale_fr=fr_FR
45360           else
45361             # Test for the locale name with explicit encoding suffix.
45362             if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
45363               gt_cv_locale_fr=fr_FR.ISO-8859-1
45364             else
45365               # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
45366               if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
45367                 gt_cv_locale_fr=fr_FR.ISO8859-1
45368               else
45369                 # Test for the HP-UX locale name.
45370                 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
45371                   gt_cv_locale_fr=fr_FR.iso88591
45372                 else
45373                   # Test for the Solaris 7 locale name.
45374                   if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
45375                     gt_cv_locale_fr=fr
45376                   else
45377                     # None found.
45378                     gt_cv_locale_fr=none
45379                   fi
45380                 fi
45381               fi
45382             fi
45383           fi
45384           ;;
45385       esac
45386     fi
45387     rm -fr conftest*
45388
45389 fi
45390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
45391 $as_echo "$gt_cv_locale_fr" >&6; }
45392   LOCALE_FR=$gt_cv_locale_fr
45393
45394
45395
45396
45397   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
45398 $as_echo_n "checking for a french Unicode locale... " >&6; }
45399 if ${gt_cv_locale_fr_utf8+:} false; then :
45400   $as_echo_n "(cached) " >&6
45401 else
45402
45403     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45404 /* end confdefs.h.  */
45405
45406 #include <locale.h>
45407 #include <time.h>
45408 #if HAVE_LANGINFO_CODESET
45409 # include <langinfo.h>
45410 #endif
45411 #include <stdlib.h>
45412 #include <string.h>
45413 struct tm t;
45414 char buf[16];
45415 int main () {
45416   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
45417      imitates locale dependent behaviour by looking at the environment
45418      variables, and all locales use the UTF-8 encoding.  */
45419 #if !(defined __BEOS__ || defined __HAIKU__)
45420   /* Check whether the given locale name is recognized by the system.  */
45421 # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
45422   /* On native Windows, setlocale(category, "") looks at the system settings,
45423      not at the environment variables.  Also, when an encoding suffix such
45424      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
45425      category of the locale to "C".  */
45426   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
45427       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
45428     return 1;
45429 # else
45430   if (setlocale (LC_ALL, "") == NULL) return 1;
45431 # endif
45432   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
45433      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
45434      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
45435      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
45436      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
45437      some unit tests fail.  */
45438 # if HAVE_LANGINFO_CODESET
45439   {
45440     const char *cs = nl_langinfo (CODESET);
45441     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
45442       return 1;
45443   }
45444 # endif
45445 # ifdef __CYGWIN__
45446   /* On Cygwin, avoid locale names without encoding suffix, because the
45447      locale_charset() function relies on the encoding suffix.  Note that
45448      LC_ALL is set on the command line.  */
45449   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
45450 # endif
45451   /* Check whether in the abbreviation of the second month, the second
45452      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
45453      two bytes long, with UTF-8 encoding.  */
45454   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
45455   if (strftime (buf, sizeof (buf), "%b", &t) < 4
45456       || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
45457     return 1;
45458 #endif
45459 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
45460   /* Check whether the decimal separator is a comma.
45461      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
45462      are nl_langinfo(RADIXCHAR) are both ".".  */
45463   if (localeconv () ->decimal_point[0] != ',') return 1;
45464 #endif
45465   return 0;
45466 }
45467
45468 _ACEOF
45469     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
45470   (eval $ac_link) 2>&5
45471   ac_status=$?
45472   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45473   test $ac_status = 0; } && test -s conftest$ac_exeext; then
45474       case "$host_os" in
45475         # Handle native Windows specially, because there setlocale() interprets
45476         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
45477         # "fr" or "fra" as "French" or "French_France.1252",
45478         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
45479         # "ja" as "Japanese" or "Japanese_Japan.932",
45480         # and similar.
45481         mingw*)
45482           # Test for the hypothetical native Windows locale name.
45483           if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
45484             gt_cv_locale_fr_utf8=French_France.65001
45485           else
45486             # None found.
45487             gt_cv_locale_fr_utf8=none
45488           fi
45489           ;;
45490         *)
45491           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
45492           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
45493           # configure script would override the LC_ALL setting. Likewise for
45494           # LC_CTYPE, which is also set at the beginning of the configure script.
45495           # Test for the usual locale name.
45496           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
45497             gt_cv_locale_fr_utf8=fr_FR
45498           else
45499             # Test for the locale name with explicit encoding suffix.
45500             if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
45501               gt_cv_locale_fr_utf8=fr_FR.UTF-8
45502             else
45503               # Test for the Solaris 7 locale name.
45504               if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
45505                 gt_cv_locale_fr_utf8=fr.UTF-8
45506               else
45507                 # None found.
45508                 gt_cv_locale_fr_utf8=none
45509               fi
45510             fi
45511           fi
45512           ;;
45513       esac
45514     fi
45515     rm -fr conftest*
45516
45517 fi
45518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
45519 $as_echo "$gt_cv_locale_fr_utf8" >&6; }
45520   LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
45521
45522
45523
45524
45525
45526
45527   :
45528
45529
45530
45531
45532
45533   if test $ac_cv_func_pipe != yes; then
45534     HAVE_PIPE=0
45535   fi
45536
45537   if test $HAVE_PIPE = 0; then
45538
45539
45540
45541
45542
45543
45544
45545
45546   gltests_LIBOBJS="$gltests_LIBOBJS pipe.$ac_objext"
45547
45548   fi
45549
45550
45551
45552
45553
45554     if test "$GNULIB_PIPE" != 1; then
45555         if test "$GNULIB_PIPE" = 0; then
45556       GNULIB_PIPE=$gl_module_indicator_condition
45557     else
45558       GNULIB_PIPE="($GNULIB_PIPE || $gl_module_indicator_condition)"
45559     fi
45560   fi
45561
45562
45563
45564
45565
45566 $as_echo "#define GNULIB_TEST_PIPE 1" >>confdefs.h
45567
45568
45569
45570
45571   for ac_func in getppriv
45572 do :
45573   ac_fn_c_check_func "$LINENO" "getppriv" "ac_cv_func_getppriv"
45574 if test "x$ac_cv_func_getppriv" = xyes; then :
45575   cat >>confdefs.h <<_ACEOF
45576 #define HAVE_GETPPRIV 1
45577 _ACEOF
45578
45579 fi
45580 done
45581
45582
45583   :
45584
45585
45586
45587
45588
45589
45590
45591
45592      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for putenv compatible with GNU and SVID" >&5
45593 $as_echo_n "checking for putenv compatible with GNU and SVID... " >&6; }
45594 if ${gl_cv_func_svid_putenv+:} false; then :
45595   $as_echo_n "(cached) " >&6
45596 else
45597   if test "$cross_compiling" = yes; then :
45598                case "$host_os" in
45599                         # Guess yes on glibc systems.
45600                 *-gnu*) gl_cv_func_svid_putenv="guessing yes" ;;
45601                         # If we don't know, assume the worst.
45602                 *)      gl_cv_func_svid_putenv="guessing no" ;;
45603               esac
45604
45605 else
45606   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45607 /* end confdefs.h.  */
45608 $ac_includes_default
45609 int
45610 main ()
45611 {
45612
45613     /* Put it in env.  */
45614     if (putenv ("CONFTEST_putenv=val"))
45615       return 1;
45616
45617     /* Try to remove it.  */
45618     if (putenv ("CONFTEST_putenv"))
45619       return 2;
45620
45621     /* Make sure it was deleted.  */
45622     if (getenv ("CONFTEST_putenv") != 0)
45623       return 3;
45624
45625     return 0;
45626
45627   ;
45628   return 0;
45629 }
45630 _ACEOF
45631 if ac_fn_c_try_run "$LINENO"; then :
45632   gl_cv_func_svid_putenv=yes
45633 else
45634   gl_cv_func_svid_putenv=no
45635 fi
45636 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
45637   conftest.$ac_objext conftest.beam conftest.$ac_ext
45638 fi
45639
45640
45641 fi
45642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_svid_putenv" >&5
45643 $as_echo "$gl_cv_func_svid_putenv" >&6; }
45644   case "$gl_cv_func_svid_putenv" in
45645     *yes) ;;
45646     *)
45647       REPLACE_PUTENV=1
45648       ;;
45649   esac
45650
45651   if test $REPLACE_PUTENV = 1; then
45652
45653
45654
45655
45656
45657
45658
45659
45660   gltests_LIBOBJS="$gltests_LIBOBJS putenv.$ac_objext"
45661
45662
45663   ac_fn_c_check_decl "$LINENO" "_putenv" "ac_cv_have_decl__putenv" "$ac_includes_default"
45664 if test "x$ac_cv_have_decl__putenv" = xyes; then :
45665   ac_have_decl=1
45666 else
45667   ac_have_decl=0
45668 fi
45669
45670 cat >>confdefs.h <<_ACEOF
45671 #define HAVE_DECL__PUTENV $ac_have_decl
45672 _ACEOF
45673
45674
45675   fi
45676
45677
45678
45679
45680
45681     if test "$GNULIB_PUTENV" != 1; then
45682         if test "$GNULIB_PUTENV" = 0; then
45683       GNULIB_PUTENV=$gl_module_indicator_condition
45684     else
45685       GNULIB_PUTENV="($GNULIB_PUTENV || $gl_module_indicator_condition)"
45686     fi
45687   fi
45688
45689
45690
45691
45692
45693 $as_echo "#define GNULIB_TEST_PUTENV 1" >>confdefs.h
45694
45695
45696
45697
45698
45699
45700   # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
45701   # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
45702   # irrelevant for anonymous mappings.
45703   ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
45704 if test "x$ac_cv_func_mmap" = xyes; then :
45705   gl_have_mmap=yes
45706 else
45707   gl_have_mmap=no
45708 fi
45709
45710
45711   # Try to allow MAP_ANONYMOUS.
45712   gl_have_mmap_anonymous=no
45713   if test $gl_have_mmap = yes; then
45714     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
45715 $as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
45716     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45717 /* end confdefs.h.  */
45718
45719 #include <sys/mman.h>
45720 #ifdef MAP_ANONYMOUS
45721     I cannot identify this map
45722 #endif
45723
45724 _ACEOF
45725 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
45726   $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
45727   gl_have_mmap_anonymous=yes
45728 fi
45729 rm -f conftest*
45730
45731     if test $gl_have_mmap_anonymous != yes; then
45732       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45733 /* end confdefs.h.  */
45734
45735 #include <sys/mman.h>
45736 #ifdef MAP_ANON
45737     I cannot identify this map
45738 #endif
45739
45740 _ACEOF
45741 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
45742   $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
45743
45744 $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
45745
45746          gl_have_mmap_anonymous=yes
45747 fi
45748 rm -f conftest*
45749
45750     fi
45751     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
45752 $as_echo "$gl_have_mmap_anonymous" >&6; }
45753     if test $gl_have_mmap_anonymous = yes; then
45754
45755 $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
45756
45757     fi
45758   fi
45759
45760
45761   :
45762
45763
45764
45765
45766
45767
45768   :
45769
45770
45771
45772
45773
45774
45775
45776
45777
45778   for ac_func in raise
45779 do :
45780   ac_fn_c_check_func "$LINENO" "raise" "ac_cv_func_raise"
45781 if test "x$ac_cv_func_raise" = xyes; then :
45782   cat >>confdefs.h <<_ACEOF
45783 #define HAVE_RAISE 1
45784 _ACEOF
45785
45786 fi
45787 done
45788
45789   if test $ac_cv_func_raise = no; then
45790     HAVE_RAISE=0
45791   else
45792     if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
45793       REPLACE_RAISE=1
45794     fi
45795
45796
45797
45798
45799   if test $gl_cv_type_sigset_t = yes; then
45800     ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
45801 if test "x$ac_cv_func_sigprocmask" = xyes; then :
45802   gl_cv_func_sigprocmask=1
45803 fi
45804
45805   fi
45806   if test -z "$gl_cv_func_sigprocmask"; then
45807     HAVE_POSIX_SIGNALBLOCKING=0
45808   fi
45809
45810       if test $HAVE_POSIX_SIGNALBLOCKING = 0; then
45811         :
45812       fi
45813
45814   fi
45815
45816   if test $HAVE_RAISE = 0 || test $REPLACE_RAISE = 1; then
45817
45818
45819
45820
45821
45822
45823
45824
45825   gltests_LIBOBJS="$gltests_LIBOBJS raise.$ac_objext"
45826
45827     :
45828   fi
45829
45830
45831
45832
45833
45834     if test "$GNULIB_RAISE" != 1; then
45835         if test "$GNULIB_RAISE" = 0; then
45836       GNULIB_RAISE=$gl_module_indicator_condition
45837     else
45838       GNULIB_RAISE="($GNULIB_RAISE || $gl_module_indicator_condition)"
45839     fi
45840   fi
45841
45842
45843
45844
45845
45846 $as_echo "#define GNULIB_TEST_RAISE 1" >>confdefs.h
45847
45848
45849
45850
45851
45852
45853   if test "$ac_cv_header_winsock2_h" = yes; then
45854     REPLACE_SELECT=1
45855   else
45856
45857   :
45858
45859
45860
45861
45862
45863     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether select supports a 0 argument" >&5
45864 $as_echo_n "checking whether select supports a 0 argument... " >&6; }
45865 if ${gl_cv_func_select_supports0+:} false; then :
45866   $as_echo_n "(cached) " >&6
45867 else
45868
45869         if test "$cross_compiling" = yes; then :
45870
45871            case "$host_os" in
45872                        # Guess no on Interix.
45873              interix*) gl_cv_func_select_supports0="guessing no";;
45874                        # Guess yes otherwise.
45875              *)        gl_cv_func_select_supports0="guessing yes";;
45876            esac
45877
45878 else
45879   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45880 /* end confdefs.h.  */
45881
45882 #include <sys/types.h>
45883 #include <sys/time.h>
45884 #if HAVE_SYS_SELECT_H
45885 #include <sys/select.h>
45886 #endif
45887 int main ()
45888 {
45889   struct timeval timeout;
45890   timeout.tv_sec = 0;
45891   timeout.tv_usec = 5;
45892   return select (0, (fd_set *)0, (fd_set *)0, (fd_set *)0, &timeout) < 0;
45893 }
45894 _ACEOF
45895 if ac_fn_c_try_run "$LINENO"; then :
45896   gl_cv_func_select_supports0=yes
45897 else
45898   gl_cv_func_select_supports0=no
45899 fi
45900 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
45901   conftest.$ac_objext conftest.beam conftest.$ac_ext
45902 fi
45903
45904
45905 fi
45906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_select_supports0" >&5
45907 $as_echo "$gl_cv_func_select_supports0" >&6; }
45908     case "$gl_cv_func_select_supports0" in
45909       *yes) ;;
45910       *) REPLACE_SELECT=1 ;;
45911     esac
45912
45913         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether select detects invalid fds" >&5
45914 $as_echo_n "checking whether select detects invalid fds... " >&6; }
45915 if ${gl_cv_func_select_detects_ebadf+:} false; then :
45916   $as_echo_n "(cached) " >&6
45917 else
45918
45919         if test "$cross_compiling" = yes; then :
45920
45921            case "$host_os" in
45922                     # Guess yes on glibc systems.
45923             *-gnu*) gl_cv_func_select_detects_ebadf="guessing yes" ;;
45924                     # If we don't know, assume the worst.
45925             *)      gl_cv_func_select_detects_ebadf="guessing no" ;;
45926            esac
45927
45928 else
45929   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45930 /* end confdefs.h.  */
45931
45932 #include <sys/types.h>
45933 #include <sys/time.h>
45934 #if HAVE_SYS_SELECT_H
45935 # include <sys/select.h>
45936 #endif
45937 #include <unistd.h>
45938 #include <errno.h>
45939
45940 int
45941 main ()
45942 {
45943
45944   fd_set set;
45945   dup2(0, 16);
45946   FD_ZERO(&set);
45947   FD_SET(16, &set);
45948   close(16);
45949   struct timeval timeout;
45950   timeout.tv_sec = 0;
45951   timeout.tv_usec = 5;
45952   return select (17, &set, NULL, NULL, &timeout) != -1 || errno != EBADF;
45953
45954   ;
45955   return 0;
45956 }
45957 _ACEOF
45958 if ac_fn_c_try_run "$LINENO"; then :
45959   gl_cv_func_select_detects_ebadf=yes
45960 else
45961   gl_cv_func_select_detects_ebadf=no
45962 fi
45963 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
45964   conftest.$ac_objext conftest.beam conftest.$ac_ext
45965 fi
45966
45967
45968 fi
45969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_select_detects_ebadf" >&5
45970 $as_echo "$gl_cv_func_select_detects_ebadf" >&6; }
45971     case $gl_cv_func_select_detects_ebadf in
45972       *yes) ;;
45973       *) REPLACE_SELECT=1 ;;
45974     esac
45975   fi
45976
45977     LIB_SELECT="$LIBSOCKET"
45978   if test $REPLACE_SELECT = 1; then
45979     case "$host_os" in
45980       mingw*)
45981                                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45982 /* end confdefs.h.  */
45983
45984 #define WIN32_LEAN_AND_MEAN
45985 #include <windows.h>
45986 int
45987 main ()
45988 {
45989   MsgWaitForMultipleObjects (0, NULL, 0, 0, 0);
45990   return 0;
45991 }
45992 _ACEOF
45993 if ac_fn_c_try_link "$LINENO"; then :
45994
45995 else
45996   LIB_SELECT="$LIB_SELECT -luser32"
45997 fi
45998 rm -f core conftest.err conftest.$ac_objext \
45999     conftest$ac_exeext conftest.$ac_ext
46000         ;;
46001     esac
46002   fi
46003
46004
46005   if test $REPLACE_SELECT = 1; then
46006
46007
46008
46009
46010
46011
46012
46013
46014   gltests_LIBOBJS="$gltests_LIBOBJS select.$ac_objext"
46015
46016   fi
46017
46018
46019
46020
46021
46022     if test "$GNULIB_SELECT" != 1; then
46023         if test "$GNULIB_SELECT" = 0; then
46024       GNULIB_SELECT=$gl_module_indicator_condition
46025     else
46026       GNULIB_SELECT="($GNULIB_SELECT || $gl_module_indicator_condition)"
46027     fi
46028   fi
46029
46030
46031
46032
46033
46034 $as_echo "#define GNULIB_TEST_SELECT 1" >>confdefs.h
46035
46036
46037
46038
46039   :
46040
46041
46042
46043
46044
46045
46046
46047
46048   case "$host_os" in
46049             mingw*) REPLACE_SETLOCALE=1 ;;
46050             cygwin*)
46051       case `uname -r` in
46052         1.5.*) REPLACE_SETLOCALE=1 ;;
46053       esac
46054       ;;
46055   esac
46056
46057   if test $REPLACE_SETLOCALE = 1; then
46058
46059
46060
46061
46062
46063
46064
46065
46066   gltests_LIBOBJS="$gltests_LIBOBJS setlocale.$ac_objext"
46067
46068
46069   :
46070
46071   fi
46072
46073
46074
46075
46076
46077     if test "$GNULIB_SETLOCALE" != 1; then
46078         if test "$GNULIB_SETLOCALE" = 0; then
46079       GNULIB_SETLOCALE=$gl_module_indicator_condition
46080     else
46081       GNULIB_SETLOCALE="($GNULIB_SETLOCALE || $gl_module_indicator_condition)"
46082     fi
46083   fi
46084
46085
46086
46087
46088
46089 $as_echo "#define GNULIB_TEST_SETLOCALE 1" >>confdefs.h
46090
46091
46092
46093
46094
46095
46096   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
46097 $as_echo_n "checking for a traditional french locale... " >&6; }
46098 if ${gt_cv_locale_fr+:} false; then :
46099   $as_echo_n "(cached) " >&6
46100 else
46101
46102     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46103 /* end confdefs.h.  */
46104
46105 #include <locale.h>
46106 #include <time.h>
46107 #if HAVE_LANGINFO_CODESET
46108 # include <langinfo.h>
46109 #endif
46110 #include <stdlib.h>
46111 #include <string.h>
46112 struct tm t;
46113 char buf[16];
46114 int main () {
46115   /* Check whether the given locale name is recognized by the system.  */
46116 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
46117   /* On native Windows, setlocale(category, "") looks at the system settings,
46118      not at the environment variables.  Also, when an encoding suffix such
46119      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
46120      category of the locale to "C".  */
46121   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
46122       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
46123     return 1;
46124 #else
46125   if (setlocale (LC_ALL, "") == NULL) return 1;
46126 #endif
46127   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
46128      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
46129      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
46130      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
46131      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
46132      some unit tests fail.
46133      On MirBSD 10, when an unsupported locale is specified, setlocale()
46134      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
46135 #if HAVE_LANGINFO_CODESET
46136   {
46137     const char *cs = nl_langinfo (CODESET);
46138     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
46139         || strcmp (cs, "UTF-8") == 0)
46140       return 1;
46141   }
46142 #endif
46143 #ifdef __CYGWIN__
46144   /* On Cygwin, avoid locale names without encoding suffix, because the
46145      locale_charset() function relies on the encoding suffix.  Note that
46146      LC_ALL is set on the command line.  */
46147   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
46148 #endif
46149   /* Check whether in the abbreviation of the second month, the second
46150      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
46151      one byte long. This excludes the UTF-8 encoding.  */
46152   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
46153   if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
46154 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
46155   /* Check whether the decimal separator is a comma.
46156      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
46157      are nl_langinfo(RADIXCHAR) are both ".".  */
46158   if (localeconv () ->decimal_point[0] != ',') return 1;
46159 #endif
46160   return 0;
46161 }
46162
46163 _ACEOF
46164     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
46165   (eval $ac_link) 2>&5
46166   ac_status=$?
46167   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
46168   test $ac_status = 0; } && test -s conftest$ac_exeext; then
46169       case "$host_os" in
46170         # Handle native Windows specially, because there setlocale() interprets
46171         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
46172         # "fr" or "fra" as "French" or "French_France.1252",
46173         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
46174         # "ja" as "Japanese" or "Japanese_Japan.932",
46175         # and similar.
46176         mingw*)
46177           # Test for the native Windows locale name.
46178           if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
46179             gt_cv_locale_fr=French_France.1252
46180           else
46181             # None found.
46182             gt_cv_locale_fr=none
46183           fi
46184           ;;
46185         *)
46186           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
46187           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
46188           # configure script would override the LC_ALL setting. Likewise for
46189           # LC_CTYPE, which is also set at the beginning of the configure script.
46190           # Test for the usual locale name.
46191           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
46192             gt_cv_locale_fr=fr_FR
46193           else
46194             # Test for the locale name with explicit encoding suffix.
46195             if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
46196               gt_cv_locale_fr=fr_FR.ISO-8859-1
46197             else
46198               # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
46199               if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
46200                 gt_cv_locale_fr=fr_FR.ISO8859-1
46201               else
46202                 # Test for the HP-UX locale name.
46203                 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
46204                   gt_cv_locale_fr=fr_FR.iso88591
46205                 else
46206                   # Test for the Solaris 7 locale name.
46207                   if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
46208                     gt_cv_locale_fr=fr
46209                   else
46210                     # None found.
46211                     gt_cv_locale_fr=none
46212                   fi
46213                 fi
46214               fi
46215             fi
46216           fi
46217           ;;
46218       esac
46219     fi
46220     rm -fr conftest*
46221
46222 fi
46223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
46224 $as_echo "$gt_cv_locale_fr" >&6; }
46225   LOCALE_FR=$gt_cv_locale_fr
46226
46227
46228
46229
46230   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
46231 $as_echo_n "checking for a french Unicode locale... " >&6; }
46232 if ${gt_cv_locale_fr_utf8+:} false; then :
46233   $as_echo_n "(cached) " >&6
46234 else
46235
46236     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46237 /* end confdefs.h.  */
46238
46239 #include <locale.h>
46240 #include <time.h>
46241 #if HAVE_LANGINFO_CODESET
46242 # include <langinfo.h>
46243 #endif
46244 #include <stdlib.h>
46245 #include <string.h>
46246 struct tm t;
46247 char buf[16];
46248 int main () {
46249   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
46250      imitates locale dependent behaviour by looking at the environment
46251      variables, and all locales use the UTF-8 encoding.  */
46252 #if !(defined __BEOS__ || defined __HAIKU__)
46253   /* Check whether the given locale name is recognized by the system.  */
46254 # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
46255   /* On native Windows, setlocale(category, "") looks at the system settings,
46256      not at the environment variables.  Also, when an encoding suffix such
46257      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
46258      category of the locale to "C".  */
46259   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
46260       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
46261     return 1;
46262 # else
46263   if (setlocale (LC_ALL, "") == NULL) return 1;
46264 # endif
46265   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
46266      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
46267      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
46268      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
46269      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
46270      some unit tests fail.  */
46271 # if HAVE_LANGINFO_CODESET
46272   {
46273     const char *cs = nl_langinfo (CODESET);
46274     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
46275       return 1;
46276   }
46277 # endif
46278 # ifdef __CYGWIN__
46279   /* On Cygwin, avoid locale names without encoding suffix, because the
46280      locale_charset() function relies on the encoding suffix.  Note that
46281      LC_ALL is set on the command line.  */
46282   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
46283 # endif
46284   /* Check whether in the abbreviation of the second month, the second
46285      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
46286      two bytes long, with UTF-8 encoding.  */
46287   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
46288   if (strftime (buf, sizeof (buf), "%b", &t) < 4
46289       || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
46290     return 1;
46291 #endif
46292 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
46293   /* Check whether the decimal separator is a comma.
46294      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
46295      are nl_langinfo(RADIXCHAR) are both ".".  */
46296   if (localeconv () ->decimal_point[0] != ',') return 1;
46297 #endif
46298   return 0;
46299 }
46300
46301 _ACEOF
46302     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
46303   (eval $ac_link) 2>&5
46304   ac_status=$?
46305   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
46306   test $ac_status = 0; } && test -s conftest$ac_exeext; then
46307       case "$host_os" in
46308         # Handle native Windows specially, because there setlocale() interprets
46309         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
46310         # "fr" or "fra" as "French" or "French_France.1252",
46311         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
46312         # "ja" as "Japanese" or "Japanese_Japan.932",
46313         # and similar.
46314         mingw*)
46315           # Test for the hypothetical native Windows locale name.
46316           if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
46317             gt_cv_locale_fr_utf8=French_France.65001
46318           else
46319             # None found.
46320             gt_cv_locale_fr_utf8=none
46321           fi
46322           ;;
46323         *)
46324           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
46325           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
46326           # configure script would override the LC_ALL setting. Likewise for
46327           # LC_CTYPE, which is also set at the beginning of the configure script.
46328           # Test for the usual locale name.
46329           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
46330             gt_cv_locale_fr_utf8=fr_FR
46331           else
46332             # Test for the locale name with explicit encoding suffix.
46333             if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
46334               gt_cv_locale_fr_utf8=fr_FR.UTF-8
46335             else
46336               # Test for the Solaris 7 locale name.
46337               if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
46338                 gt_cv_locale_fr_utf8=fr.UTF-8
46339               else
46340                 # None found.
46341                 gt_cv_locale_fr_utf8=none
46342               fi
46343             fi
46344           fi
46345           ;;
46346       esac
46347     fi
46348     rm -fr conftest*
46349
46350 fi
46351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
46352 $as_echo "$gt_cv_locale_fr_utf8" >&6; }
46353   LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
46354
46355
46356
46357
46358
46359   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
46360 $as_echo_n "checking for a traditional japanese locale... " >&6; }
46361 if ${gt_cv_locale_ja+:} false; then :
46362   $as_echo_n "(cached) " >&6
46363 else
46364
46365     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46366 /* end confdefs.h.  */
46367
46368 #include <locale.h>
46369 #include <time.h>
46370 #if HAVE_LANGINFO_CODESET
46371 # include <langinfo.h>
46372 #endif
46373 #include <stdlib.h>
46374 #include <string.h>
46375 struct tm t;
46376 char buf[16];
46377 int main ()
46378 {
46379   const char *p;
46380   /* Check whether the given locale name is recognized by the system.  */
46381 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
46382   /* On native Windows, setlocale(category, "") looks at the system settings,
46383      not at the environment variables.  Also, when an encoding suffix such
46384      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
46385      category of the locale to "C".  */
46386   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
46387       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
46388     return 1;
46389 #else
46390   if (setlocale (LC_ALL, "") == NULL) return 1;
46391 #endif
46392   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
46393      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
46394      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
46395      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
46396      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
46397      some unit tests fail.
46398      On MirBSD 10, when an unsupported locale is specified, setlocale()
46399      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
46400 #if HAVE_LANGINFO_CODESET
46401   {
46402     const char *cs = nl_langinfo (CODESET);
46403     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
46404         || strcmp (cs, "UTF-8") == 0)
46405       return 1;
46406   }
46407 #endif
46408 #ifdef __CYGWIN__
46409   /* On Cygwin, avoid locale names without encoding suffix, because the
46410      locale_charset() function relies on the encoding suffix.  Note that
46411      LC_ALL is set on the command line.  */
46412   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
46413 #endif
46414   /* Check whether MB_CUR_MAX is > 1.  This excludes the dysfunctional locales
46415      on Cygwin 1.5.x.  */
46416   if (MB_CUR_MAX == 1)
46417     return 1;
46418   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
46419      This excludes the UTF-8 encoding (except on MirBSD).  */
46420   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
46421   if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
46422   for (p = buf; *p != '\0'; p++)
46423     if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
46424       return 1;
46425   return 0;
46426 }
46427
46428 _ACEOF
46429     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
46430   (eval $ac_link) 2>&5
46431   ac_status=$?
46432   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
46433   test $ac_status = 0; } && test -s conftest$ac_exeext; then
46434       case "$host_os" in
46435         # Handle native Windows specially, because there setlocale() interprets
46436         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
46437         # "fr" or "fra" as "French" or "French_France.1252",
46438         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
46439         # "ja" as "Japanese" or "Japanese_Japan.932",
46440         # and similar.
46441         mingw*)
46442           # Note that on native Windows, the Japanese locale is
46443           # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
46444           # cannot use it here.
46445           gt_cv_locale_ja=none
46446           ;;
46447         *)
46448           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
46449           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
46450           # configure script would override the LC_ALL setting. Likewise for
46451           # LC_CTYPE, which is also set at the beginning of the configure script.
46452           # Test for the AIX locale name.
46453           if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
46454             gt_cv_locale_ja=ja_JP
46455           else
46456             # Test for the locale name with explicit encoding suffix.
46457             if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
46458               gt_cv_locale_ja=ja_JP.EUC-JP
46459             else
46460               # Test for the HP-UX, OSF/1, NetBSD locale name.
46461               if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
46462                 gt_cv_locale_ja=ja_JP.eucJP
46463               else
46464                 # Test for the IRIX, FreeBSD locale name.
46465                 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
46466                   gt_cv_locale_ja=ja_JP.EUC
46467                 else
46468                   # Test for the Solaris 7 locale name.
46469                   if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
46470                     gt_cv_locale_ja=ja
46471                   else
46472                     # Special test for NetBSD 1.6.
46473                     if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
46474                       gt_cv_locale_ja=ja_JP.eucJP
46475                     else
46476                       # None found.
46477                       gt_cv_locale_ja=none
46478                     fi
46479                   fi
46480                 fi
46481               fi
46482             fi
46483           fi
46484           ;;
46485       esac
46486     fi
46487     rm -fr conftest*
46488
46489 fi
46490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
46491 $as_echo "$gt_cv_locale_ja" >&6; }
46492   LOCALE_JA=$gt_cv_locale_ja
46493
46494
46495
46496
46497
46498   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
46499 $as_echo_n "checking for a transitional chinese locale... " >&6; }
46500 if ${gt_cv_locale_zh_CN+:} false; then :
46501   $as_echo_n "(cached) " >&6
46502 else
46503
46504     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46505 /* end confdefs.h.  */
46506
46507 #include <locale.h>
46508 #include <stdlib.h>
46509 #include <time.h>
46510 #if HAVE_LANGINFO_CODESET
46511 # include <langinfo.h>
46512 #endif
46513 #include <stdlib.h>
46514 #include <string.h>
46515 struct tm t;
46516 char buf[16];
46517 int main ()
46518 {
46519   const char *p;
46520   /* Check whether the given locale name is recognized by the system.  */
46521 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
46522   /* On native Windows, setlocale(category, "") looks at the system settings,
46523      not at the environment variables.  Also, when an encoding suffix such
46524      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
46525      category of the locale to "C".  */
46526   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
46527       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
46528     return 1;
46529 #else
46530   if (setlocale (LC_ALL, "") == NULL) return 1;
46531 #endif
46532   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
46533      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
46534      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
46535      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
46536      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
46537      some unit tests fail.
46538      On MirBSD 10, when an unsupported locale is specified, setlocale()
46539      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
46540 #if HAVE_LANGINFO_CODESET
46541   {
46542     const char *cs = nl_langinfo (CODESET);
46543     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
46544         || strcmp (cs, "UTF-8") == 0)
46545       return 1;
46546   }
46547 #endif
46548 #ifdef __CYGWIN__
46549   /* On Cygwin, avoid locale names without encoding suffix, because the
46550      locale_charset() function relies on the encoding suffix.  Note that
46551      LC_ALL is set on the command line.  */
46552   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
46553 #endif
46554   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
46555      This excludes the UTF-8 encoding (except on MirBSD).  */
46556   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
46557   if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
46558   for (p = buf; *p != '\0'; p++)
46559     if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
46560       return 1;
46561   /* Check whether a typical GB18030 multibyte sequence is recognized as a
46562      single wide character.  This excludes the GB2312 and GBK encodings.  */
46563   if (mblen ("\203\062\332\066", 5) != 4)
46564     return 1;
46565   return 0;
46566 }
46567
46568 _ACEOF
46569     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
46570   (eval $ac_link) 2>&5
46571   ac_status=$?
46572   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
46573   test $ac_status = 0; } && test -s conftest$ac_exeext; then
46574       case "$host_os" in
46575         # Handle native Windows specially, because there setlocale() interprets
46576         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
46577         # "fr" or "fra" as "French" or "French_France.1252",
46578         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
46579         # "ja" as "Japanese" or "Japanese_Japan.932",
46580         # and similar.
46581         mingw*)
46582           # Test for the hypothetical native Windows locale name.
46583           if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
46584             gt_cv_locale_zh_CN=Chinese_China.54936
46585           else
46586             # None found.
46587             gt_cv_locale_zh_CN=none
46588           fi
46589           ;;
46590         solaris2.8)
46591           # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
46592           # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
46593           # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
46594           gt_cv_locale_zh_CN=none
46595           ;;
46596         *)
46597           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
46598           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
46599           # configure script would override the LC_ALL setting. Likewise for
46600           # LC_CTYPE, which is also set at the beginning of the configure script.
46601           # Test for the locale name without encoding suffix.
46602           if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
46603             gt_cv_locale_zh_CN=zh_CN
46604           else
46605             # Test for the locale name with explicit encoding suffix.
46606             if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
46607               gt_cv_locale_zh_CN=zh_CN.GB18030
46608             else
46609               # None found.
46610               gt_cv_locale_zh_CN=none
46611             fi
46612           fi
46613           ;;
46614       esac
46615     else
46616       # If there was a link error, due to mblen(), the system is so old that
46617       # it certainly doesn't have a chinese locale.
46618       gt_cv_locale_zh_CN=none
46619     fi
46620     rm -fr conftest*
46621
46622 fi
46623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
46624 $as_echo "$gt_cv_locale_zh_CN" >&6; }
46625   LOCALE_ZH_CN=$gt_cv_locale_zh_CN
46626
46627
46628
46629   if test "$ac_cv_header_winsock2_h" = yes; then
46630
46631
46632
46633
46634
46635
46636
46637
46638   gltests_LIBOBJS="$gltests_LIBOBJS setsockopt.$ac_objext"
46639
46640   fi
46641
46642
46643
46644
46645
46646     if test "$GNULIB_SETSOCKOPT" != 1; then
46647         if test "$GNULIB_SETSOCKOPT" = 0; then
46648       GNULIB_SETSOCKOPT=$gl_module_indicator_condition
46649     else
46650       GNULIB_SETSOCKOPT="($GNULIB_SETSOCKOPT || $gl_module_indicator_condition)"
46651     fi
46652   fi
46653
46654
46655
46656
46657
46658 $as_echo "#define GNULIB_TEST_SETSOCKOPT 1" >>confdefs.h
46659
46660
46661
46662
46663
46664
46665   :
46666
46667
46668
46669
46670
46671   if test $ac_cv_func_sigaction = yes; then
46672     ac_fn_c_check_member "$LINENO" "struct sigaction" "sa_sigaction" "ac_cv_member_struct_sigaction_sa_sigaction" "#include <signal.h>
46673 "
46674 if test "x$ac_cv_member_struct_sigaction_sa_sigaction" = xyes; then :
46675
46676 cat >>confdefs.h <<_ACEOF
46677 #define HAVE_STRUCT_SIGACTION_SA_SIGACTION 1
46678 _ACEOF
46679
46680
46681 fi
46682
46683     if test $ac_cv_member_struct_sigaction_sa_sigaction = no; then
46684       HAVE_STRUCT_SIGACTION_SA_SIGACTION=0
46685     fi
46686   else
46687     HAVE_SIGACTION=0
46688   fi
46689
46690   if test $HAVE_SIGACTION = 0; then
46691
46692
46693
46694
46695
46696
46697
46698
46699   gltests_LIBOBJS="$gltests_LIBOBJS sigaction.$ac_objext"
46700
46701
46702
46703
46704
46705
46706
46707   :
46708
46709
46710
46711
46712
46713
46714
46715
46716   ac_fn_c_check_type "$LINENO" "siginfo_t" "ac_cv_type_siginfo_t" "
46717 #include <signal.h>
46718
46719 "
46720 if test "x$ac_cv_type_siginfo_t" = xyes; then :
46721
46722 cat >>confdefs.h <<_ACEOF
46723 #define HAVE_SIGINFO_T 1
46724 _ACEOF
46725
46726
46727 fi
46728
46729   if test $ac_cv_type_siginfo_t = no; then
46730     HAVE_SIGINFO_T=0
46731   fi
46732
46733   fi
46734
46735
46736
46737
46738
46739     if test "$GNULIB_SIGACTION" != 1; then
46740         if test "$GNULIB_SIGACTION" = 0; then
46741       GNULIB_SIGACTION=$gl_module_indicator_condition
46742     else
46743       GNULIB_SIGACTION="($GNULIB_SIGACTION || $gl_module_indicator_condition)"
46744     fi
46745   fi
46746
46747
46748
46749
46750
46751 $as_echo "#define GNULIB_TEST_SIGACTION 1" >>confdefs.h
46752
46753
46754
46755
46756
46757
46758
46759
46760
46761
46762
46763
46764
46765
46766      if test $gl_cv_have_include_next = yes; then
46767        gl_cv_next_signal_h='<'signal.h'>'
46768      else
46769        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
46770 $as_echo_n "checking absolute name of <signal.h>... " >&6; }
46771 if ${gl_cv_next_signal_h+:} false; then :
46772   $as_echo_n "(cached) " >&6
46773 else
46774
46775
46776
46777   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46778 /* end confdefs.h.  */
46779 #include <signal.h>
46780 _ACEOF
46781                 case "$host_os" in
46782     aix*) gl_absname_cpp="$ac_cpp -C" ;;
46783     *)    gl_absname_cpp="$ac_cpp" ;;
46784   esac
46785
46786   case "$host_os" in
46787     mingw*)
46788                                           gl_dirsep_regex='[/\\]'
46789       ;;
46790     *)
46791       gl_dirsep_regex='\/'
46792       ;;
46793   esac
46794       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
46795   gl_header_literal_regex=`echo 'signal.h' \
46796                            | sed -e "$gl_make_literal_regex_sed"`
46797   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
46798       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
46799       s|^/[^/]|//&|
46800       p
46801       q
46802     }'
46803
46804         gl_cv_absolute_signal_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
46805   sed -n "$gl_absolute_header_sed"`
46806
46807            gl_header=$gl_cv_absolute_signal_h
46808            gl_cv_next_signal_h='"'$gl_header'"'
46809
46810
46811 fi
46812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
46813 $as_echo "$gl_cv_next_signal_h" >&6; }
46814      fi
46815      NEXT_SIGNAL_H=$gl_cv_next_signal_h
46816
46817      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
46818        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
46819        gl_next_as_first_directive='<'signal.h'>'
46820      else
46821        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
46822        gl_next_as_first_directive=$gl_cv_next_signal_h
46823      fi
46824      NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
46825
46826
46827
46828
46829
46830 # AIX declares sig_atomic_t to already include volatile, and C89 compilers
46831 # then choke on 'volatile sig_atomic_t'.  C99 requires that it compile.
46832   ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
46833 #include <signal.h>
46834
46835 "
46836 if test "x$ac_cv_type_volatile_sig_atomic_t" = xyes; then :
46837
46838 else
46839   HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
46840 fi
46841
46842
46843
46844
46845
46846
46847
46848   ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
46849 #include <signal.h>
46850
46851 "
46852 if test "x$ac_cv_type_sighandler_t" = xyes; then :
46853
46854 else
46855   HAVE_SIGHANDLER_T=0
46856 fi
46857
46858
46859
46860     for gl_func in pthread_sigmask sigaction     sigaddset sigdelset sigemptyset sigfillset sigismember     sigpending sigprocmask; do
46861     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
46862     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
46863 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
46864 if eval \${$as_gl_Symbol+:} false; then :
46865   $as_echo_n "(cached) " >&6
46866 else
46867   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46868 /* end confdefs.h.  */
46869 #include <signal.h>
46870
46871 int
46872 main ()
46873 {
46874 #undef $gl_func
46875   (void) $gl_func;
46876   ;
46877   return 0;
46878 }
46879 _ACEOF
46880 if ac_fn_c_try_compile "$LINENO"; then :
46881   eval "$as_gl_Symbol=yes"
46882 else
46883   eval "$as_gl_Symbol=no"
46884 fi
46885 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46886 fi
46887 eval ac_res=\$$as_gl_Symbol
46888                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
46889 $as_echo "$ac_res" >&6; }
46890     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
46891   cat >>confdefs.h <<_ACEOF
46892 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
46893 _ACEOF
46894
46895                      eval ac_cv_have_decl_$gl_func=yes
46896 fi
46897       done
46898
46899
46900
46901
46902
46903   if test $gl_cv_type_sigset_t = yes; then
46904     ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
46905 if test "x$ac_cv_func_sigprocmask" = xyes; then :
46906   gl_cv_func_sigprocmask=1
46907 fi
46908
46909   fi
46910   if test -z "$gl_cv_func_sigprocmask"; then
46911     HAVE_POSIX_SIGNALBLOCKING=0
46912   fi
46913
46914   if test $HAVE_POSIX_SIGNALBLOCKING = 0; then
46915
46916
46917
46918
46919
46920
46921
46922
46923   gltests_LIBOBJS="$gltests_LIBOBJS sigprocmask.$ac_objext"
46924
46925     :
46926   fi
46927
46928
46929
46930
46931
46932     if test "$GNULIB_SIGPROCMASK" != 1; then
46933         if test "$GNULIB_SIGPROCMASK" = 0; then
46934       GNULIB_SIGPROCMASK=$gl_module_indicator_condition
46935     else
46936       GNULIB_SIGPROCMASK="($GNULIB_SIGPROCMASK || $gl_module_indicator_condition)"
46937     fi
46938   fi
46939
46940
46941
46942
46943
46944 $as_echo "#define GNULIB_TEST_SIGPROCMASK 1" >>confdefs.h
46945
46946
46947
46948
46949
46950                ac_fn_c_check_decl "$LINENO" "sleep" "ac_cv_have_decl_sleep" "#include <unistd.h>
46951 "
46952 if test "x$ac_cv_have_decl_sleep" = xyes; then :
46953   ac_have_decl=1
46954 else
46955   ac_have_decl=0
46956 fi
46957
46958 cat >>confdefs.h <<_ACEOF
46959 #define HAVE_DECL_SLEEP $ac_have_decl
46960 _ACEOF
46961
46962
46963   :
46964
46965
46966
46967
46968
46969   if test $ac_cv_have_decl_sleep != yes; then
46970     HAVE_SLEEP=0
46971   else
46972         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working sleep" >&5
46973 $as_echo_n "checking for working sleep... " >&6; }
46974 if ${gl_cv_func_sleep_works+:} false; then :
46975   $as_echo_n "(cached) " >&6
46976 else
46977   if test "$cross_compiling" = yes; then :
46978   case "$host_os" in
46979                  # Guess yes on glibc systems.
46980          *-gnu*) gl_cv_func_sleep_works="guessing yes" ;;
46981                  # If we don't know, assume the worst.
46982          *)      gl_cv_func_sleep_works="guessing no" ;;
46983        esac
46984
46985 else
46986   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46987 /* end confdefs.h.  */
46988
46989 #include <errno.h>
46990 #include <unistd.h>
46991 #include <signal.h>
46992 static void
46993 handle_alarm (int sig)
46994 {
46995   if (sig != SIGALRM)
46996     _exit (2);
46997 }
46998
46999 int
47000 main ()
47001 {
47002
47003     /* Failure to compile this test due to missing alarm is okay,
47004        since all such platforms (mingw) also lack sleep.  */
47005     unsigned int pentecost = 50 * 24 * 60 * 60; /* 50 days.  */
47006     unsigned int remaining;
47007     signal (SIGALRM, handle_alarm);
47008     alarm (1);
47009     remaining = sleep (pentecost);
47010     if (remaining > pentecost)
47011       return 3;
47012     if (remaining <= pentecost - 10)
47013       return 4;
47014     return 0;
47015
47016   ;
47017   return 0;
47018 }
47019 _ACEOF
47020 if ac_fn_c_try_run "$LINENO"; then :
47021   gl_cv_func_sleep_works=yes
47022 else
47023   gl_cv_func_sleep_works=no
47024 fi
47025 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
47026   conftest.$ac_objext conftest.beam conftest.$ac_ext
47027 fi
47028
47029 fi
47030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_sleep_works" >&5
47031 $as_echo "$gl_cv_func_sleep_works" >&6; }
47032     case "$gl_cv_func_sleep_works" in
47033       *yes) ;;
47034       *)
47035         REPLACE_SLEEP=1
47036         ;;
47037     esac
47038   fi
47039
47040   if test $HAVE_SLEEP = 0 || test $REPLACE_SLEEP = 1; then
47041
47042
47043
47044
47045
47046
47047
47048
47049   gltests_LIBOBJS="$gltests_LIBOBJS sleep.$ac_objext"
47050
47051   fi
47052
47053
47054
47055
47056
47057     if test "$GNULIB_SLEEP" != 1; then
47058         if test "$GNULIB_SLEEP" = 0; then
47059       GNULIB_SLEEP=$gl_module_indicator_condition
47060     else
47061       GNULIB_SLEEP="($GNULIB_SLEEP || $gl_module_indicator_condition)"
47062     fi
47063   fi
47064
47065
47066
47067
47068
47069 $as_echo "#define GNULIB_TEST_SLEEP 1" >>confdefs.h
47070
47071
47072
47073
47074   :
47075
47076
47077
47078
47079
47080
47081   if test "$ac_cv_header_winsock2_h" = yes; then
47082
47083
47084
47085
47086
47087
47088
47089
47090   gltests_LIBOBJS="$gltests_LIBOBJS socket.$ac_objext"
47091
47092   fi
47093   # When this module is used, sockets may actually occur as file descriptors,
47094   # hence it is worth warning if the modules 'close' and 'ioctl' are not used.
47095
47096
47097
47098   if test "$ac_cv_header_winsock2_h" = yes; then
47099     UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1
47100     SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1
47101   fi
47102
47103
47104
47105
47106
47107     if test "$GNULIB_SOCKET" != 1; then
47108         if test "$GNULIB_SOCKET" = 0; then
47109       GNULIB_SOCKET=$gl_module_indicator_condition
47110     else
47111       GNULIB_SOCKET="($GNULIB_SOCKET || $gl_module_indicator_condition)"
47112     fi
47113   fi
47114
47115
47116
47117
47118
47119 $as_echo "#define GNULIB_TEST_SOCKET 1" >>confdefs.h
47120
47121
47122
47123
47124
47125
47126   :
47127
47128
47129
47130
47131
47132
47133
47134
47135   # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
47136   # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
47137   # irrelevant for anonymous mappings.
47138   ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
47139 if test "x$ac_cv_func_mmap" = xyes; then :
47140   gl_have_mmap=yes
47141 else
47142   gl_have_mmap=no
47143 fi
47144
47145
47146   # Try to allow MAP_ANONYMOUS.
47147   gl_have_mmap_anonymous=no
47148   if test $gl_have_mmap = yes; then
47149     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
47150 $as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
47151     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47152 /* end confdefs.h.  */
47153
47154 #include <sys/mman.h>
47155 #ifdef MAP_ANONYMOUS
47156     I cannot identify this map
47157 #endif
47158
47159 _ACEOF
47160 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
47161   $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
47162   gl_have_mmap_anonymous=yes
47163 fi
47164 rm -f conftest*
47165
47166     if test $gl_have_mmap_anonymous != yes; then
47167       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47168 /* end confdefs.h.  */
47169
47170 #include <sys/mman.h>
47171 #ifdef MAP_ANON
47172     I cannot identify this map
47173 #endif
47174
47175 _ACEOF
47176 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
47177   $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
47178
47179 $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
47180
47181          gl_have_mmap_anonymous=yes
47182 fi
47183 rm -f conftest*
47184
47185     fi
47186     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
47187 $as_echo "$gl_have_mmap_anonymous" >&6; }
47188     if test $gl_have_mmap_anonymous = yes; then
47189
47190 $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
47191
47192     fi
47193   fi
47194
47195
47196   :
47197
47198
47199
47200
47201
47202
47203   :
47204
47205
47206
47207
47208
47209
47210   :
47211
47212
47213
47214
47215
47216
47217
47218
47219   # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
47220   # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
47221   # irrelevant for anonymous mappings.
47222   ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
47223 if test "x$ac_cv_func_mmap" = xyes; then :
47224   gl_have_mmap=yes
47225 else
47226   gl_have_mmap=no
47227 fi
47228
47229
47230   # Try to allow MAP_ANONYMOUS.
47231   gl_have_mmap_anonymous=no
47232   if test $gl_have_mmap = yes; then
47233     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
47234 $as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
47235     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47236 /* end confdefs.h.  */
47237
47238 #include <sys/mman.h>
47239 #ifdef MAP_ANONYMOUS
47240     I cannot identify this map
47241 #endif
47242
47243 _ACEOF
47244 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
47245   $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
47246   gl_have_mmap_anonymous=yes
47247 fi
47248 rm -f conftest*
47249
47250     if test $gl_have_mmap_anonymous != yes; then
47251       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47252 /* end confdefs.h.  */
47253
47254 #include <sys/mman.h>
47255 #ifdef MAP_ANON
47256     I cannot identify this map
47257 #endif
47258
47259 _ACEOF
47260 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
47261   $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
47262
47263 $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
47264
47265          gl_have_mmap_anonymous=yes
47266 fi
47267 rm -f conftest*
47268
47269     fi
47270     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
47271 $as_echo "$gl_have_mmap_anonymous" >&6; }
47272     if test $gl_have_mmap_anonymous = yes; then
47273
47274 $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
47275
47276     fi
47277   fi
47278
47279
47280   :
47281
47282
47283
47284
47285
47286
47287   :
47288
47289
47290
47291
47292
47293
47294
47295
47296   :
47297
47298
47299
47300
47301
47302         if test $ac_cv_func_symlink = no; then
47303     HAVE_SYMLINK=0
47304   else
47305     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether symlink handles trailing slash correctly" >&5
47306 $as_echo_n "checking whether symlink handles trailing slash correctly... " >&6; }
47307 if ${gl_cv_func_symlink_works+:} false; then :
47308   $as_echo_n "(cached) " >&6
47309 else
47310   if test "$cross_compiling" = yes; then :
47311   case "$host_os" in
47312                     # Guess yes on glibc systems.
47313             *-gnu*) gl_cv_func_symlink_works="guessing yes" ;;
47314                     # If we don't know, assume the worst.
47315             *)      gl_cv_func_symlink_works="guessing no" ;;
47316           esac
47317
47318 else
47319   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47320 /* end confdefs.h.  */
47321 #include <unistd.h>
47322
47323 int
47324 main ()
47325 {
47326 int result = 0;
47327              if (!symlink ("a", "conftest.link/"))
47328                result |= 1;
47329              if (symlink ("conftest.f", "conftest.lnk2"))
47330                result |= 2;
47331              else if (!symlink ("a", "conftest.lnk2/"))
47332                result |= 4;
47333              return result;
47334
47335   ;
47336   return 0;
47337 }
47338 _ACEOF
47339 if ac_fn_c_try_run "$LINENO"; then :
47340   gl_cv_func_symlink_works=yes
47341 else
47342   gl_cv_func_symlink_works=no
47343 fi
47344 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
47345   conftest.$ac_objext conftest.beam conftest.$ac_ext
47346 fi
47347
47348       rm -f conftest.f conftest.link conftest.lnk2
47349 fi
47350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_symlink_works" >&5
47351 $as_echo "$gl_cv_func_symlink_works" >&6; }
47352     case "$gl_cv_func_symlink_works" in
47353       *yes) ;;
47354       *)
47355         REPLACE_SYMLINK=1
47356         ;;
47357     esac
47358   fi
47359
47360   if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then
47361
47362
47363
47364
47365
47366
47367
47368
47369   gltests_LIBOBJS="$gltests_LIBOBJS symlink.$ac_objext"
47370
47371   fi
47372
47373
47374
47375
47376
47377     if test "$GNULIB_SYMLINK" != 1; then
47378         if test "$GNULIB_SYMLINK" = 0; then
47379       GNULIB_SYMLINK=$gl_module_indicator_condition
47380     else
47381       GNULIB_SYMLINK="($GNULIB_SYMLINK || $gl_module_indicator_condition)"
47382     fi
47383   fi
47384
47385
47386
47387
47388
47389 $as_echo "#define GNULIB_TEST_SYMLINK 1" >>confdefs.h
47390
47391
47392
47393
47394
47395
47396
47397
47398   :
47399
47400
47401
47402
47403
47404   if test $ac_cv_func_symlinkat = no; then
47405     HAVE_SYMLINKAT=0
47406   fi
47407
47408   if test $HAVE_SYMLINKAT = 0; then
47409
47410
47411
47412
47413
47414
47415
47416
47417   gltests_LIBOBJS="$gltests_LIBOBJS symlinkat.$ac_objext"
47418
47419   fi
47420
47421
47422
47423
47424
47425     if test "$GNULIB_SYMLINKAT" != 1; then
47426         if test "$GNULIB_SYMLINKAT" = 0; then
47427       GNULIB_SYMLINKAT=$gl_module_indicator_condition
47428     else
47429       GNULIB_SYMLINKAT="($GNULIB_SYMLINKAT || $gl_module_indicator_condition)"
47430     fi
47431   fi
47432
47433
47434
47435
47436
47437 $as_echo "#define GNULIB_TEST_SYMLINKAT 1" >>confdefs.h
47438
47439
47440
47441
47442
47443
47444
47445   :
47446
47447
47448
47449
47450
47451   if test $ac_cv_header_sys_ioctl_h = yes; then
47452     HAVE_SYS_IOCTL_H=1
47453             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/ioctl.h> declares ioctl" >&5
47454 $as_echo_n "checking whether <sys/ioctl.h> declares ioctl... " >&6; }
47455 if ${gl_cv_decl_ioctl_in_sys_ioctl_h+:} false; then :
47456   $as_echo_n "(cached) " >&6
47457 else
47458          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47459 /* end confdefs.h.  */
47460 #include <sys/ioctl.h>
47461
47462 int
47463 main ()
47464 {
47465 (void) ioctl;
47466   ;
47467   return 0;
47468 }
47469 _ACEOF
47470 if ac_fn_c_try_compile "$LINENO"; then :
47471   gl_cv_decl_ioctl_in_sys_ioctl_h=yes
47472 else
47473   gl_cv_decl_ioctl_in_sys_ioctl_h=no
47474 fi
47475 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47476
47477 fi
47478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_ioctl_in_sys_ioctl_h" >&5
47479 $as_echo "$gl_cv_decl_ioctl_in_sys_ioctl_h" >&6; }
47480   else
47481     HAVE_SYS_IOCTL_H=0
47482   fi
47483
47484
47485
47486
47487
47488
47489
47490   :
47491
47492
47493
47494
47495
47496
47497
47498
47499      if test $gl_cv_have_include_next = yes; then
47500        gl_cv_next_sys_ioctl_h='<'sys/ioctl.h'>'
47501      else
47502        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/ioctl.h>" >&5
47503 $as_echo_n "checking absolute name of <sys/ioctl.h>... " >&6; }
47504 if ${gl_cv_next_sys_ioctl_h+:} false; then :
47505   $as_echo_n "(cached) " >&6
47506 else
47507
47508              if test $ac_cv_header_sys_ioctl_h = yes; then
47509
47510
47511
47512
47513   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47514 /* end confdefs.h.  */
47515 #include <sys/ioctl.h>
47516 _ACEOF
47517                 case "$host_os" in
47518     aix*) gl_absname_cpp="$ac_cpp -C" ;;
47519     *)    gl_absname_cpp="$ac_cpp" ;;
47520   esac
47521
47522   case "$host_os" in
47523     mingw*)
47524                                           gl_dirsep_regex='[/\\]'
47525       ;;
47526     *)
47527       gl_dirsep_regex='\/'
47528       ;;
47529   esac
47530       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
47531   gl_header_literal_regex=`echo 'sys/ioctl.h' \
47532                            | sed -e "$gl_make_literal_regex_sed"`
47533   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
47534       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
47535       s|^/[^/]|//&|
47536       p
47537       q
47538     }'
47539
47540         gl_cv_absolute_sys_ioctl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
47541   sed -n "$gl_absolute_header_sed"`
47542
47543            gl_header=$gl_cv_absolute_sys_ioctl_h
47544            gl_cv_next_sys_ioctl_h='"'$gl_header'"'
47545           else
47546                gl_cv_next_sys_ioctl_h='<'sys/ioctl.h'>'
47547              fi
47548
47549
47550 fi
47551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_ioctl_h" >&5
47552 $as_echo "$gl_cv_next_sys_ioctl_h" >&6; }
47553      fi
47554      NEXT_SYS_IOCTL_H=$gl_cv_next_sys_ioctl_h
47555
47556      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
47557        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
47558        gl_next_as_first_directive='<'sys/ioctl.h'>'
47559      else
47560        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
47561        gl_next_as_first_directive=$gl_cv_next_sys_ioctl_h
47562      fi
47563      NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H=$gl_next_as_first_directive
47564
47565
47566
47567
47568
47569
47570     for gl_func in ioctl; do
47571     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
47572     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
47573 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
47574 if eval \${$as_gl_Symbol+:} false; then :
47575   $as_echo_n "(cached) " >&6
47576 else
47577   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47578 /* end confdefs.h.  */
47579 #include <sys/ioctl.h>
47580 /* Some platforms declare ioctl in the wrong header.  */
47581 #if !(defined __GLIBC__ && !defined __UCLIBC__)
47582 # include <unistd.h>
47583 #endif
47584
47585 int
47586 main ()
47587 {
47588 #undef $gl_func
47589   (void) $gl_func;
47590   ;
47591   return 0;
47592 }
47593 _ACEOF
47594 if ac_fn_c_try_compile "$LINENO"; then :
47595   eval "$as_gl_Symbol=yes"
47596 else
47597   eval "$as_gl_Symbol=no"
47598 fi
47599 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47600 fi
47601 eval ac_res=\$$as_gl_Symbol
47602                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
47603 $as_echo "$ac_res" >&6; }
47604     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
47605   cat >>confdefs.h <<_ACEOF
47606 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
47607 _ACEOF
47608
47609                      eval ac_cv_have_decl_$gl_func=yes
47610 fi
47611       done
47612
47613
47614
47615
47616
47617
47618   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/select.h> is self-contained" >&5
47619 $as_echo_n "checking whether <sys/select.h> is self-contained... " >&6; }
47620 if ${gl_cv_header_sys_select_h_selfcontained+:} false; then :
47621   $as_echo_n "(cached) " >&6
47622 else
47623
47624                                     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47625 /* end confdefs.h.  */
47626 #include <sys/select.h>
47627 int
47628 main ()
47629 {
47630 struct timeval b;
47631   ;
47632   return 0;
47633 }
47634 _ACEOF
47635 if ac_fn_c_try_compile "$LINENO"; then :
47636   gl_cv_header_sys_select_h_selfcontained=yes
47637 else
47638   gl_cv_header_sys_select_h_selfcontained=no
47639 fi
47640 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47641                         if test $gl_cv_header_sys_select_h_selfcontained = yes; then
47642         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47643 /* end confdefs.h.  */
47644 #include <sys/select.h>
47645 int
47646 main ()
47647 {
47648 int memset; int bzero;
47649   ;
47650   return 0;
47651 }
47652
47653 _ACEOF
47654 if ac_fn_c_try_compile "$LINENO"; then :
47655   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47656 /* end confdefs.h.  */
47657 #include <sys/select.h>
47658 int
47659 main ()
47660 {
47661
47662                   #undef memset
47663                   #define memset nonexistent_memset
47664                   extern
47665                   #ifdef __cplusplus
47666                   "C"
47667                   #endif
47668                   void *memset (void *, int, unsigned long);
47669                   #undef bzero
47670                   #define bzero nonexistent_bzero
47671                   extern
47672                   #ifdef __cplusplus
47673                   "C"
47674                   #endif
47675                   void bzero (void *, unsigned long);
47676                   fd_set fds;
47677                   FD_ZERO (&fds);
47678
47679   ;
47680   return 0;
47681 }
47682
47683 _ACEOF
47684 if ac_fn_c_try_link "$LINENO"; then :
47685
47686 else
47687   gl_cv_header_sys_select_h_selfcontained=no
47688 fi
47689 rm -f core conftest.err conftest.$ac_objext \
47690     conftest$ac_exeext conftest.$ac_ext
47691
47692 fi
47693 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47694       fi
47695
47696 fi
47697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_select_h_selfcontained" >&5
47698 $as_echo "$gl_cv_header_sys_select_h_selfcontained" >&6; }
47699
47700
47701
47702
47703
47704
47705   :
47706
47707
47708
47709
47710
47711
47712
47713
47714      if test $gl_cv_have_include_next = yes; then
47715        gl_cv_next_sys_select_h='<'sys/select.h'>'
47716      else
47717        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/select.h>" >&5
47718 $as_echo_n "checking absolute name of <sys/select.h>... " >&6; }
47719 if ${gl_cv_next_sys_select_h+:} false; then :
47720   $as_echo_n "(cached) " >&6
47721 else
47722
47723              if test $ac_cv_header_sys_select_h = yes; then
47724
47725
47726
47727
47728   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47729 /* end confdefs.h.  */
47730 #include <sys/select.h>
47731 _ACEOF
47732                 case "$host_os" in
47733     aix*) gl_absname_cpp="$ac_cpp -C" ;;
47734     *)    gl_absname_cpp="$ac_cpp" ;;
47735   esac
47736
47737   case "$host_os" in
47738     mingw*)
47739                                           gl_dirsep_regex='[/\\]'
47740       ;;
47741     *)
47742       gl_dirsep_regex='\/'
47743       ;;
47744   esac
47745       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
47746   gl_header_literal_regex=`echo 'sys/select.h' \
47747                            | sed -e "$gl_make_literal_regex_sed"`
47748   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
47749       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
47750       s|^/[^/]|//&|
47751       p
47752       q
47753     }'
47754
47755         gl_cv_absolute_sys_select_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
47756   sed -n "$gl_absolute_header_sed"`
47757
47758            gl_header=$gl_cv_absolute_sys_select_h
47759            gl_cv_next_sys_select_h='"'$gl_header'"'
47760           else
47761                gl_cv_next_sys_select_h='<'sys/select.h'>'
47762              fi
47763
47764
47765 fi
47766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_select_h" >&5
47767 $as_echo "$gl_cv_next_sys_select_h" >&6; }
47768      fi
47769      NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h
47770
47771      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
47772        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
47773        gl_next_as_first_directive='<'sys/select.h'>'
47774      else
47775        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
47776        gl_next_as_first_directive=$gl_cv_next_sys_select_h
47777      fi
47778      NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive
47779
47780
47781
47782
47783   if test $ac_cv_header_sys_select_h = yes; then
47784     HAVE_SYS_SELECT_H=1
47785   else
47786     HAVE_SYS_SELECT_H=0
47787   fi
47788
47789
47790
47791
47792
47793   :
47794
47795
47796
47797
47798
47799   if test $ac_cv_header_sys_socket_h != yes; then
47800                     for ac_header in winsock2.h
47801 do :
47802   ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
47803 if test "x$ac_cv_header_winsock2_h" = xyes; then :
47804   cat >>confdefs.h <<_ACEOF
47805 #define HAVE_WINSOCK2_H 1
47806 _ACEOF
47807
47808 fi
47809
47810 done
47811
47812   fi
47813   if test "$ac_cv_header_winsock2_h" = yes; then
47814     HAVE_WINSOCK2_H=1
47815     UNISTD_H_HAVE_WINSOCK2_H=1
47816     SYS_IOCTL_H_HAVE_WINSOCK2_H=1
47817   else
47818     HAVE_WINSOCK2_H=0
47819   fi
47820
47821
47822
47823
47824     for gl_func in pselect select; do
47825     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
47826     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
47827 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
47828 if eval \${$as_gl_Symbol+:} false; then :
47829   $as_echo_n "(cached) " >&6
47830 else
47831   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47832 /* end confdefs.h.  */
47833
47834 /* Some systems require prerequisite headers.  */
47835 #include <sys/types.h>
47836 #if !(defined __GLIBC__ && !defined __UCLIBC__) && HAVE_SYS_TIME_H
47837 # include <sys/time.h>
47838 #endif
47839 #include <sys/select.h>
47840
47841 int
47842 main ()
47843 {
47844 #undef $gl_func
47845   (void) $gl_func;
47846   ;
47847   return 0;
47848 }
47849 _ACEOF
47850 if ac_fn_c_try_compile "$LINENO"; then :
47851   eval "$as_gl_Symbol=yes"
47852 else
47853   eval "$as_gl_Symbol=no"
47854 fi
47855 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47856 fi
47857 eval ac_res=\$$as_gl_Symbol
47858                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
47859 $as_echo "$ac_res" >&6; }
47860     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
47861   cat >>confdefs.h <<_ACEOF
47862 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
47863 _ACEOF
47864
47865                      eval ac_cv_have_decl_$gl_func=yes
47866 fi
47867       done
47868
47869
47870
47871
47872   :
47873
47874
47875
47876
47877
47878
47879
47880
47881   if test $gl_threads_api = posix; then
47882     gl_save_LIBS="$LIBS"
47883     LIBS="$LIBS $LIBMULTITHREAD"
47884     for ac_func in pthread_atfork
47885 do :
47886   ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
47887 if test "x$ac_cv_func_pthread_atfork" = xyes; then :
47888   cat >>confdefs.h <<_ACEOF
47889 #define HAVE_PTHREAD_ATFORK 1
47890 _ACEOF
47891
47892 fi
47893 done
47894
47895     LIBS="$gl_save_LIBS"
47896   fi
47897
47898
47899
47900
47901   :
47902
47903
47904
47905
47906
47907
47908   # The Hurd, the Linux kernel, the FreeBSD kernel version 2.2 and later,
47909   # Cygwin, and mingw never let anyone (even root) unlink directories.
47910   # If anyone knows of another system for which unlink can never
47911   # remove a directory, please report it to <bug-coreutils@gnu.org>.
47912   # Unfortunately this is difficult to test for, since it requires root access
47913   # and might create garbage in the file system,
47914   # so the code below simply relies on the kernel name and version number.
47915   case $host_os in
47916   gnu[0-9]* | \
47917   linux-* | linux | \
47918   freebsd2.2* | freebsd[3-9]* | freebsd[1-9][0-9]* | \
47919   cygwin | \
47920   mingw*)
47921
47922 $as_echo "#define UNLINK_CANNOT_UNLINK_DIR 1" >>confdefs.h
47923 ;;
47924   esac
47925
47926   abs_aux_dir=`cd "$ac_aux_dir"; pwd`
47927
47928   abs_aux_dir=`cd "$ac_aux_dir"; pwd`
47929
47930
47931
47932
47933   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
47934 $as_echo_n "checking for a traditional french locale... " >&6; }
47935 if ${gt_cv_locale_fr+:} false; then :
47936   $as_echo_n "(cached) " >&6
47937 else
47938
47939     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47940 /* end confdefs.h.  */
47941
47942 #include <locale.h>
47943 #include <time.h>
47944 #if HAVE_LANGINFO_CODESET
47945 # include <langinfo.h>
47946 #endif
47947 #include <stdlib.h>
47948 #include <string.h>
47949 struct tm t;
47950 char buf[16];
47951 int main () {
47952   /* Check whether the given locale name is recognized by the system.  */
47953 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
47954   /* On native Windows, setlocale(category, "") looks at the system settings,
47955      not at the environment variables.  Also, when an encoding suffix such
47956      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
47957      category of the locale to "C".  */
47958   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
47959       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
47960     return 1;
47961 #else
47962   if (setlocale (LC_ALL, "") == NULL) return 1;
47963 #endif
47964   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
47965      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
47966      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
47967      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
47968      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
47969      some unit tests fail.
47970      On MirBSD 10, when an unsupported locale is specified, setlocale()
47971      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
47972 #if HAVE_LANGINFO_CODESET
47973   {
47974     const char *cs = nl_langinfo (CODESET);
47975     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
47976         || strcmp (cs, "UTF-8") == 0)
47977       return 1;
47978   }
47979 #endif
47980 #ifdef __CYGWIN__
47981   /* On Cygwin, avoid locale names without encoding suffix, because the
47982      locale_charset() function relies on the encoding suffix.  Note that
47983      LC_ALL is set on the command line.  */
47984   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
47985 #endif
47986   /* Check whether in the abbreviation of the second month, the second
47987      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
47988      one byte long. This excludes the UTF-8 encoding.  */
47989   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
47990   if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
47991 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
47992   /* Check whether the decimal separator is a comma.
47993      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
47994      are nl_langinfo(RADIXCHAR) are both ".".  */
47995   if (localeconv () ->decimal_point[0] != ',') return 1;
47996 #endif
47997   return 0;
47998 }
47999
48000 _ACEOF
48001     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
48002   (eval $ac_link) 2>&5
48003   ac_status=$?
48004   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48005   test $ac_status = 0; } && test -s conftest$ac_exeext; then
48006       case "$host_os" in
48007         # Handle native Windows specially, because there setlocale() interprets
48008         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
48009         # "fr" or "fra" as "French" or "French_France.1252",
48010         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
48011         # "ja" as "Japanese" or "Japanese_Japan.932",
48012         # and similar.
48013         mingw*)
48014           # Test for the native Windows locale name.
48015           if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
48016             gt_cv_locale_fr=French_France.1252
48017           else
48018             # None found.
48019             gt_cv_locale_fr=none
48020           fi
48021           ;;
48022         *)
48023           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
48024           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
48025           # configure script would override the LC_ALL setting. Likewise for
48026           # LC_CTYPE, which is also set at the beginning of the configure script.
48027           # Test for the usual locale name.
48028           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
48029             gt_cv_locale_fr=fr_FR
48030           else
48031             # Test for the locale name with explicit encoding suffix.
48032             if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
48033               gt_cv_locale_fr=fr_FR.ISO-8859-1
48034             else
48035               # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
48036               if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
48037                 gt_cv_locale_fr=fr_FR.ISO8859-1
48038               else
48039                 # Test for the HP-UX locale name.
48040                 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
48041                   gt_cv_locale_fr=fr_FR.iso88591
48042                 else
48043                   # Test for the Solaris 7 locale name.
48044                   if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
48045                     gt_cv_locale_fr=fr
48046                   else
48047                     # None found.
48048                     gt_cv_locale_fr=none
48049                   fi
48050                 fi
48051               fi
48052             fi
48053           fi
48054           ;;
48055       esac
48056     fi
48057     rm -fr conftest*
48058
48059 fi
48060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
48061 $as_echo "$gt_cv_locale_fr" >&6; }
48062   LOCALE_FR=$gt_cv_locale_fr
48063
48064
48065
48066
48067   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
48068 $as_echo_n "checking for a french Unicode locale... " >&6; }
48069 if ${gt_cv_locale_fr_utf8+:} false; then :
48070   $as_echo_n "(cached) " >&6
48071 else
48072
48073     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48074 /* end confdefs.h.  */
48075
48076 #include <locale.h>
48077 #include <time.h>
48078 #if HAVE_LANGINFO_CODESET
48079 # include <langinfo.h>
48080 #endif
48081 #include <stdlib.h>
48082 #include <string.h>
48083 struct tm t;
48084 char buf[16];
48085 int main () {
48086   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
48087      imitates locale dependent behaviour by looking at the environment
48088      variables, and all locales use the UTF-8 encoding.  */
48089 #if !(defined __BEOS__ || defined __HAIKU__)
48090   /* Check whether the given locale name is recognized by the system.  */
48091 # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
48092   /* On native Windows, setlocale(category, "") looks at the system settings,
48093      not at the environment variables.  Also, when an encoding suffix such
48094      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
48095      category of the locale to "C".  */
48096   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
48097       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
48098     return 1;
48099 # else
48100   if (setlocale (LC_ALL, "") == NULL) return 1;
48101 # endif
48102   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
48103      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
48104      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
48105      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
48106      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
48107      some unit tests fail.  */
48108 # if HAVE_LANGINFO_CODESET
48109   {
48110     const char *cs = nl_langinfo (CODESET);
48111     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
48112       return 1;
48113   }
48114 # endif
48115 # ifdef __CYGWIN__
48116   /* On Cygwin, avoid locale names without encoding suffix, because the
48117      locale_charset() function relies on the encoding suffix.  Note that
48118      LC_ALL is set on the command line.  */
48119   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
48120 # endif
48121   /* Check whether in the abbreviation of the second month, the second
48122      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
48123      two bytes long, with UTF-8 encoding.  */
48124   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
48125   if (strftime (buf, sizeof (buf), "%b", &t) < 4
48126       || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
48127     return 1;
48128 #endif
48129 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
48130   /* Check whether the decimal separator is a comma.
48131      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
48132      are nl_langinfo(RADIXCHAR) are both ".".  */
48133   if (localeconv () ->decimal_point[0] != ',') return 1;
48134 #endif
48135   return 0;
48136 }
48137
48138 _ACEOF
48139     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
48140   (eval $ac_link) 2>&5
48141   ac_status=$?
48142   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48143   test $ac_status = 0; } && test -s conftest$ac_exeext; then
48144       case "$host_os" in
48145         # Handle native Windows specially, because there setlocale() interprets
48146         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
48147         # "fr" or "fra" as "French" or "French_France.1252",
48148         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
48149         # "ja" as "Japanese" or "Japanese_Japan.932",
48150         # and similar.
48151         mingw*)
48152           # Test for the hypothetical native Windows locale name.
48153           if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
48154             gt_cv_locale_fr_utf8=French_France.65001
48155           else
48156             # None found.
48157             gt_cv_locale_fr_utf8=none
48158           fi
48159           ;;
48160         *)
48161           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
48162           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
48163           # configure script would override the LC_ALL setting. Likewise for
48164           # LC_CTYPE, which is also set at the beginning of the configure script.
48165           # Test for the usual locale name.
48166           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
48167             gt_cv_locale_fr_utf8=fr_FR
48168           else
48169             # Test for the locale name with explicit encoding suffix.
48170             if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
48171               gt_cv_locale_fr_utf8=fr_FR.UTF-8
48172             else
48173               # Test for the Solaris 7 locale name.
48174               if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
48175                 gt_cv_locale_fr_utf8=fr.UTF-8
48176               else
48177                 # None found.
48178                 gt_cv_locale_fr_utf8=none
48179               fi
48180             fi
48181           fi
48182           ;;
48183       esac
48184     fi
48185     rm -fr conftest*
48186
48187 fi
48188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
48189 $as_echo "$gt_cv_locale_fr_utf8" >&6; }
48190   LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
48191
48192
48193
48194
48195
48196   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
48197 $as_echo_n "checking for a traditional japanese locale... " >&6; }
48198 if ${gt_cv_locale_ja+:} false; then :
48199   $as_echo_n "(cached) " >&6
48200 else
48201
48202     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48203 /* end confdefs.h.  */
48204
48205 #include <locale.h>
48206 #include <time.h>
48207 #if HAVE_LANGINFO_CODESET
48208 # include <langinfo.h>
48209 #endif
48210 #include <stdlib.h>
48211 #include <string.h>
48212 struct tm t;
48213 char buf[16];
48214 int main ()
48215 {
48216   const char *p;
48217   /* Check whether the given locale name is recognized by the system.  */
48218 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
48219   /* On native Windows, setlocale(category, "") looks at the system settings,
48220      not at the environment variables.  Also, when an encoding suffix such
48221      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
48222      category of the locale to "C".  */
48223   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
48224       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
48225     return 1;
48226 #else
48227   if (setlocale (LC_ALL, "") == NULL) return 1;
48228 #endif
48229   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
48230      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
48231      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
48232      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
48233      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
48234      some unit tests fail.
48235      On MirBSD 10, when an unsupported locale is specified, setlocale()
48236      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
48237 #if HAVE_LANGINFO_CODESET
48238   {
48239     const char *cs = nl_langinfo (CODESET);
48240     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
48241         || strcmp (cs, "UTF-8") == 0)
48242       return 1;
48243   }
48244 #endif
48245 #ifdef __CYGWIN__
48246   /* On Cygwin, avoid locale names without encoding suffix, because the
48247      locale_charset() function relies on the encoding suffix.  Note that
48248      LC_ALL is set on the command line.  */
48249   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
48250 #endif
48251   /* Check whether MB_CUR_MAX is > 1.  This excludes the dysfunctional locales
48252      on Cygwin 1.5.x.  */
48253   if (MB_CUR_MAX == 1)
48254     return 1;
48255   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
48256      This excludes the UTF-8 encoding (except on MirBSD).  */
48257   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
48258   if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
48259   for (p = buf; *p != '\0'; p++)
48260     if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
48261       return 1;
48262   return 0;
48263 }
48264
48265 _ACEOF
48266     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
48267   (eval $ac_link) 2>&5
48268   ac_status=$?
48269   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48270   test $ac_status = 0; } && test -s conftest$ac_exeext; then
48271       case "$host_os" in
48272         # Handle native Windows specially, because there setlocale() interprets
48273         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
48274         # "fr" or "fra" as "French" or "French_France.1252",
48275         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
48276         # "ja" as "Japanese" or "Japanese_Japan.932",
48277         # and similar.
48278         mingw*)
48279           # Note that on native Windows, the Japanese locale is
48280           # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
48281           # cannot use it here.
48282           gt_cv_locale_ja=none
48283           ;;
48284         *)
48285           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
48286           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
48287           # configure script would override the LC_ALL setting. Likewise for
48288           # LC_CTYPE, which is also set at the beginning of the configure script.
48289           # Test for the AIX locale name.
48290           if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
48291             gt_cv_locale_ja=ja_JP
48292           else
48293             # Test for the locale name with explicit encoding suffix.
48294             if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
48295               gt_cv_locale_ja=ja_JP.EUC-JP
48296             else
48297               # Test for the HP-UX, OSF/1, NetBSD locale name.
48298               if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
48299                 gt_cv_locale_ja=ja_JP.eucJP
48300               else
48301                 # Test for the IRIX, FreeBSD locale name.
48302                 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
48303                   gt_cv_locale_ja=ja_JP.EUC
48304                 else
48305                   # Test for the Solaris 7 locale name.
48306                   if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
48307                     gt_cv_locale_ja=ja
48308                   else
48309                     # Special test for NetBSD 1.6.
48310                     if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
48311                       gt_cv_locale_ja=ja_JP.eucJP
48312                     else
48313                       # None found.
48314                       gt_cv_locale_ja=none
48315                     fi
48316                   fi
48317                 fi
48318               fi
48319             fi
48320           fi
48321           ;;
48322       esac
48323     fi
48324     rm -fr conftest*
48325
48326 fi
48327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
48328 $as_echo "$gt_cv_locale_ja" >&6; }
48329   LOCALE_JA=$gt_cv_locale_ja
48330
48331
48332
48333
48334
48335   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
48336 $as_echo_n "checking for a transitional chinese locale... " >&6; }
48337 if ${gt_cv_locale_zh_CN+:} false; then :
48338   $as_echo_n "(cached) " >&6
48339 else
48340
48341     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48342 /* end confdefs.h.  */
48343
48344 #include <locale.h>
48345 #include <stdlib.h>
48346 #include <time.h>
48347 #if HAVE_LANGINFO_CODESET
48348 # include <langinfo.h>
48349 #endif
48350 #include <stdlib.h>
48351 #include <string.h>
48352 struct tm t;
48353 char buf[16];
48354 int main ()
48355 {
48356   const char *p;
48357   /* Check whether the given locale name is recognized by the system.  */
48358 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
48359   /* On native Windows, setlocale(category, "") looks at the system settings,
48360      not at the environment variables.  Also, when an encoding suffix such
48361      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
48362      category of the locale to "C".  */
48363   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
48364       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
48365     return 1;
48366 #else
48367   if (setlocale (LC_ALL, "") == NULL) return 1;
48368 #endif
48369   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
48370      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
48371      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
48372      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
48373      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
48374      some unit tests fail.
48375      On MirBSD 10, when an unsupported locale is specified, setlocale()
48376      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
48377 #if HAVE_LANGINFO_CODESET
48378   {
48379     const char *cs = nl_langinfo (CODESET);
48380     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
48381         || strcmp (cs, "UTF-8") == 0)
48382       return 1;
48383   }
48384 #endif
48385 #ifdef __CYGWIN__
48386   /* On Cygwin, avoid locale names without encoding suffix, because the
48387      locale_charset() function relies on the encoding suffix.  Note that
48388      LC_ALL is set on the command line.  */
48389   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
48390 #endif
48391   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
48392      This excludes the UTF-8 encoding (except on MirBSD).  */
48393   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
48394   if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
48395   for (p = buf; *p != '\0'; p++)
48396     if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
48397       return 1;
48398   /* Check whether a typical GB18030 multibyte sequence is recognized as a
48399      single wide character.  This excludes the GB2312 and GBK encodings.  */
48400   if (mblen ("\203\062\332\066", 5) != 4)
48401     return 1;
48402   return 0;
48403 }
48404
48405 _ACEOF
48406     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
48407   (eval $ac_link) 2>&5
48408   ac_status=$?
48409   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48410   test $ac_status = 0; } && test -s conftest$ac_exeext; then
48411       case "$host_os" in
48412         # Handle native Windows specially, because there setlocale() interprets
48413         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
48414         # "fr" or "fra" as "French" or "French_France.1252",
48415         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
48416         # "ja" as "Japanese" or "Japanese_Japan.932",
48417         # and similar.
48418         mingw*)
48419           # Test for the hypothetical native Windows locale name.
48420           if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
48421             gt_cv_locale_zh_CN=Chinese_China.54936
48422           else
48423             # None found.
48424             gt_cv_locale_zh_CN=none
48425           fi
48426           ;;
48427         solaris2.8)
48428           # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
48429           # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
48430           # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
48431           gt_cv_locale_zh_CN=none
48432           ;;
48433         *)
48434           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
48435           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
48436           # configure script would override the LC_ALL setting. Likewise for
48437           # LC_CTYPE, which is also set at the beginning of the configure script.
48438           # Test for the locale name without encoding suffix.
48439           if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
48440             gt_cv_locale_zh_CN=zh_CN
48441           else
48442             # Test for the locale name with explicit encoding suffix.
48443             if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
48444               gt_cv_locale_zh_CN=zh_CN.GB18030
48445             else
48446               # None found.
48447               gt_cv_locale_zh_CN=none
48448             fi
48449           fi
48450           ;;
48451       esac
48452     else
48453       # If there was a link error, due to mblen(), the system is so old that
48454       # it certainly doesn't have a chinese locale.
48455       gt_cv_locale_zh_CN=none
48456     fi
48457     rm -fr conftest*
48458
48459 fi
48460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
48461 $as_echo "$gt_cv_locale_zh_CN" >&6; }
48462   LOCALE_ZH_CN=$gt_cv_locale_zh_CN
48463
48464
48465
48466
48467
48468
48469   :
48470
48471
48472
48473
48474
48475   if test $ac_cv_func_wctob = no; then
48476     HAVE_WCTOB=0
48477     HAVE_DECL_WCTOB=0
48478   else
48479     HAVE_WCTOB=1
48480
48481
48482
48483          { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wctob works" >&5
48484 $as_echo_n "checking whether wctob works... " >&6; }
48485 if ${gl_cv_func_wctob_works+:} false; then :
48486   $as_echo_n "(cached) " >&6
48487 else
48488
48489                         case "$host_os" in
48490             # Guess no on Solaris <= 9 and Cygwin.
48491           solaris2.[1-9] | solaris2.[1-9].* | cygwin*)
48492             gl_cv_func_wctob_works="guessing no" ;;
48493             # Guess yes otherwise.
48494           *) gl_cv_func_wctob_works="guessing yes" ;;
48495         esac
48496         case "$host_os" in
48497           cygwin*)
48498             if test "$cross_compiling" = yes; then :
48499   :
48500 else
48501   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48502 /* end confdefs.h.  */
48503
48504 #include <locale.h>
48505 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
48506    <wchar.h>.
48507    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
48508    included before <wchar.h>.  */
48509 #include <stddef.h>
48510 #include <stdio.h>
48511 #include <time.h>
48512 #include <wchar.h>
48513
48514 register long global __asm__ ("%ebx");
48515
48516 int main ()
48517 {
48518   setlocale (LC_ALL, "en_US.UTF-8");
48519
48520   global = 0x12345678;
48521   if (wctob (0x00FC) != -1)
48522     return 1;
48523   if (global != 0x12345678)
48524     return 2;
48525   return 0;
48526 }
48527 _ACEOF
48528 if ac_fn_c_try_run "$LINENO"; then :
48529   :
48530 else
48531   gl_cv_func_wctob_works=no
48532 fi
48533 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48534   conftest.$ac_objext conftest.beam conftest.$ac_ext
48535 fi
48536
48537             ;;
48538         esac
48539         if test "$gl_cv_func_wctob_works" != no && test $LOCALE_FR != none; then
48540           if test "$cross_compiling" = yes; then :
48541   :
48542 else
48543   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48544 /* end confdefs.h.  */
48545
48546 #include <locale.h>
48547 #include <string.h>
48548 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
48549    <wchar.h>.
48550    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
48551    included before <wchar.h>.  */
48552 #include <stddef.h>
48553 #include <stdio.h>
48554 #include <time.h>
48555 #include <wchar.h>
48556 int main ()
48557 {
48558   if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
48559     {
48560       wchar_t wc;
48561
48562       if (mbtowc (&wc, "\374", 1) == 1)
48563         if (wctob (wc) != (unsigned char) '\374')
48564           return 1;
48565     }
48566   return 0;
48567 }
48568 _ACEOF
48569 if ac_fn_c_try_run "$LINENO"; then :
48570   gl_cv_func_wctob_works=yes
48571 else
48572   gl_cv_func_wctob_works=no
48573 fi
48574 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48575   conftest.$ac_objext conftest.beam conftest.$ac_ext
48576 fi
48577
48578         fi
48579
48580 fi
48581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wctob_works" >&5
48582 $as_echo "$gl_cv_func_wctob_works" >&6; }
48583     case "$gl_cv_func_wctob_works" in
48584       *yes) ;;
48585       *) REPLACE_WCTOB=1 ;;
48586     esac
48587     if test $REPLACE_WCTOB = 0; then
48588
48589             ac_fn_c_check_decl "$LINENO" "wctob" "ac_cv_have_decl_wctob" "
48590 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
48591    <wchar.h>.
48592    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
48593    before <wchar.h>.  */
48594 #include <stddef.h>
48595 #include <stdio.h>
48596 #include <time.h>
48597 #include <wchar.h>
48598
48599 "
48600 if test "x$ac_cv_have_decl_wctob" = xyes; then :
48601   ac_have_decl=1
48602 else
48603   ac_have_decl=0
48604 fi
48605
48606 cat >>confdefs.h <<_ACEOF
48607 #define HAVE_DECL_WCTOB $ac_have_decl
48608 _ACEOF
48609
48610       if test $ac_cv_have_decl_wctob != yes; then
48611         HAVE_DECL_WCTOB=0
48612       fi
48613     fi
48614   fi
48615
48616   if test $HAVE_WCTOB = 0 || test $REPLACE_WCTOB = 1; then
48617
48618
48619
48620
48621
48622
48623
48624
48625   gltests_LIBOBJS="$gltests_LIBOBJS wctob.$ac_objext"
48626
48627
48628   :
48629
48630   fi
48631
48632
48633
48634
48635
48636     if test "$GNULIB_WCTOB" != 1; then
48637         if test "$GNULIB_WCTOB" = 0; then
48638       GNULIB_WCTOB=$gl_module_indicator_condition
48639     else
48640       GNULIB_WCTOB="($GNULIB_WCTOB || $gl_module_indicator_condition)"
48641     fi
48642   fi
48643
48644
48645
48646
48647
48648 $as_echo "#define GNULIB_TEST_WCTOB 1" >>confdefs.h
48649
48650
48651
48652
48653
48654
48655   if false; then
48656     REPLACE_WCTOMB=1
48657   fi
48658
48659   if test $REPLACE_WCTOMB = 1; then
48660
48661
48662
48663
48664
48665
48666
48667
48668   gltests_LIBOBJS="$gltests_LIBOBJS wctomb.$ac_objext"
48669
48670
48671   :
48672
48673   fi
48674
48675
48676
48677
48678
48679     if test "$GNULIB_WCTOMB" != 1; then
48680         if test "$GNULIB_WCTOMB" = 0; then
48681       GNULIB_WCTOMB=$gl_module_indicator_condition
48682     else
48683       GNULIB_WCTOMB="($GNULIB_WCTOMB || $gl_module_indicator_condition)"
48684     fi
48685   fi
48686
48687
48688
48689
48690
48691 $as_echo "#define GNULIB_TEST_WCTOMB 1" >>confdefs.h
48692
48693
48694
48695
48696
48697     YIELD_LIB=
48698   if test $gl_threads_api = posix; then
48699         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
48700 $as_echo_n "checking for sched_yield in -lrt... " >&6; }
48701 if ${ac_cv_lib_rt_sched_yield+:} false; then :
48702   $as_echo_n "(cached) " >&6
48703 else
48704   ac_check_lib_save_LIBS=$LIBS
48705 LIBS="-lrt  $LIBS"
48706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48707 /* end confdefs.h.  */
48708
48709 /* Override any GCC internal prototype to avoid an error.
48710    Use char because int might match the return type of a GCC
48711    builtin and then its argument prototype would still apply.  */
48712 #ifdef __cplusplus
48713 extern "C"
48714 #endif
48715 char sched_yield ();
48716 int
48717 main ()
48718 {
48719 return sched_yield ();
48720   ;
48721   return 0;
48722 }
48723 _ACEOF
48724 if ac_fn_c_try_link "$LINENO"; then :
48725   ac_cv_lib_rt_sched_yield=yes
48726 else
48727   ac_cv_lib_rt_sched_yield=no
48728 fi
48729 rm -f core conftest.err conftest.$ac_objext \
48730     conftest$ac_exeext conftest.$ac_ext
48731 LIBS=$ac_check_lib_save_LIBS
48732 fi
48733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
48734 $as_echo "$ac_cv_lib_rt_sched_yield" >&6; }
48735 if test "x$ac_cv_lib_rt_sched_yield" = xyes; then :
48736   YIELD_LIB=-lrt
48737 else
48738          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5
48739 $as_echo_n "checking for sched_yield in -lposix4... " >&6; }
48740 if ${ac_cv_lib_posix4_sched_yield+:} false; then :
48741   $as_echo_n "(cached) " >&6
48742 else
48743   ac_check_lib_save_LIBS=$LIBS
48744 LIBS="-lposix4  $LIBS"
48745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48746 /* end confdefs.h.  */
48747
48748 /* Override any GCC internal prototype to avoid an error.
48749    Use char because int might match the return type of a GCC
48750    builtin and then its argument prototype would still apply.  */
48751 #ifdef __cplusplus
48752 extern "C"
48753 #endif
48754 char sched_yield ();
48755 int
48756 main ()
48757 {
48758 return sched_yield ();
48759   ;
48760   return 0;
48761 }
48762 _ACEOF
48763 if ac_fn_c_try_link "$LINENO"; then :
48764   ac_cv_lib_posix4_sched_yield=yes
48765 else
48766   ac_cv_lib_posix4_sched_yield=no
48767 fi
48768 rm -f core conftest.err conftest.$ac_objext \
48769     conftest$ac_exeext conftest.$ac_ext
48770 LIBS=$ac_check_lib_save_LIBS
48771 fi
48772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5
48773 $as_echo "$ac_cv_lib_posix4_sched_yield" >&6; }
48774 if test "x$ac_cv_lib_posix4_sched_yield" = xyes; then :
48775   YIELD_LIB=-lposix4
48776 fi
48777
48778 fi
48779
48780   fi
48781
48782
48783
48784
48785
48786
48787
48788
48789
48790
48791
48792
48793   LIBGNULIB_LIBDEPS="$gl_libdeps"
48794
48795   LIBGNULIB_LTLIBDEPS="$gl_ltlibdeps"
48796
48797   LIBTESTS_LIBDEPS="$gltests_libdeps"
48798
48799
48800
48801
48802
48803   if test -n "$GCC"; then
48804
48805             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is supported" >&5
48806 $as_echo_n "checking whether -Wno-missing-field-initializers is supported... " >&6; }
48807     if ${gl_cv_cc_nomfi_supported+:} false; then :
48808   $as_echo_n "(cached) " >&6
48809 else
48810
48811       gl_save_CFLAGS="$CFLAGS"
48812       CFLAGS="$CFLAGS -W -Werror -Wno-missing-field-initializers"
48813       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48814 /* end confdefs.h.  */
48815
48816 int
48817 main ()
48818 {
48819
48820   ;
48821   return 0;
48822 }
48823 _ACEOF
48824 if ac_fn_c_try_compile "$LINENO"; then :
48825   gl_cv_cc_nomfi_supported=yes
48826 else
48827   gl_cv_cc_nomfi_supported=no
48828 fi
48829 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48830       CFLAGS="$gl_save_CFLAGS"
48831 fi
48832
48833     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_supported" >&5
48834 $as_echo "$gl_cv_cc_nomfi_supported" >&6; }
48835
48836     if test "$gl_cv_cc_nomfi_supported" = yes; then
48837                   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is needed" >&5
48838 $as_echo_n "checking whether -Wno-missing-field-initializers is needed... " >&6; }
48839       if ${gl_cv_cc_nomfi_needed+:} false; then :
48840   $as_echo_n "(cached) " >&6
48841 else
48842
48843         gl_save_CFLAGS="$CFLAGS"
48844         CFLAGS="$CFLAGS -W -Werror"
48845         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48846 /* end confdefs.h.  */
48847 void f (void)
48848                {
48849                  typedef struct { int a; int b; } s_t;
48850                  s_t s1 = { 0, };
48851                }
48852
48853 int
48854 main ()
48855 {
48856
48857   ;
48858   return 0;
48859 }
48860 _ACEOF
48861 if ac_fn_c_try_compile "$LINENO"; then :
48862   gl_cv_cc_nomfi_needed=no
48863 else
48864   gl_cv_cc_nomfi_needed=yes
48865 fi
48866 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48867         CFLAGS="$gl_save_CFLAGS"
48868
48869 fi
48870
48871       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_needed" >&5
48872 $as_echo "$gl_cv_cc_nomfi_needed" >&6; }
48873     fi
48874
48875                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wuninitialized is supported" >&5
48876 $as_echo_n "checking whether -Wuninitialized is supported... " >&6; }
48877     if ${gl_cv_cc_uninitialized_supported+:} false; then :
48878   $as_echo_n "(cached) " >&6
48879 else
48880
48881       gl_save_CFLAGS="$CFLAGS"
48882       CFLAGS="$CFLAGS -Werror -Wuninitialized"
48883       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48884 /* end confdefs.h.  */
48885
48886 int
48887 main ()
48888 {
48889
48890   ;
48891   return 0;
48892 }
48893 _ACEOF
48894 if ac_fn_c_try_compile "$LINENO"; then :
48895   gl_cv_cc_uninitialized_supported=yes
48896 else
48897   gl_cv_cc_uninitialized_supported=no
48898 fi
48899 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48900       CFLAGS="$gl_save_CFLAGS"
48901 fi
48902
48903     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_uninitialized_supported" >&5
48904 $as_echo "$gl_cv_cc_uninitialized_supported" >&6; }
48905
48906   fi
48907
48908   # List all gcc warning categories.
48909   gl_manywarn_set=
48910   for gl_manywarn_item in \
48911     -W \
48912     -Wabi \
48913     -Waddress \
48914     -Waggressive-loop-optimizations \
48915     -Wall \
48916     -Warray-bounds \
48917     -Wattributes \
48918     -Wbad-function-cast \
48919     -Wbuiltin-macro-redefined \
48920     -Wcast-align \
48921     -Wchar-subscripts \
48922     -Wclobbered \
48923     -Wcomment \
48924     -Wcomments \
48925     -Wcoverage-mismatch \
48926     -Wcpp \
48927     -Wdeprecated \
48928     -Wdeprecated-declarations \
48929     -Wdisabled-optimization \
48930     -Wdiv-by-zero \
48931     -Wdouble-promotion \
48932     -Wempty-body \
48933     -Wendif-labels \
48934     -Wenum-compare \
48935     -Wextra \
48936     -Wformat-contains-nul \
48937     -Wformat-extra-args \
48938     -Wformat-nonliteral \
48939     -Wformat-security \
48940     -Wformat-y2k \
48941     -Wformat-zero-length \
48942     -Wfree-nonheap-object \
48943     -Wignored-qualifiers \
48944     -Wimplicit \
48945     -Wimplicit-function-declaration \
48946     -Wimplicit-int \
48947     -Winit-self \
48948     -Winline \
48949     -Wint-to-pointer-cast \
48950     -Winvalid-memory-model \
48951     -Winvalid-pch \
48952     -Wjump-misses-init \
48953     -Wlogical-op \
48954     -Wmain \
48955     -Wmaybe-uninitialized \
48956     -Wmissing-braces \
48957     -Wmissing-declarations \
48958     -Wmissing-field-initializers \
48959     -Wmissing-include-dirs \
48960     -Wmissing-parameter-type \
48961     -Wmissing-prototypes \
48962     -Wmultichar \
48963     -Wnarrowing \
48964     -Wnested-externs \
48965     -Wnonnull \
48966     -Wnormalized=nfc \
48967     -Wold-style-declaration \
48968     -Wold-style-definition \
48969     -Woverflow \
48970     -Woverlength-strings \
48971     -Woverride-init \
48972     -Wpacked \
48973     -Wpacked-bitfield-compat \
48974     -Wparentheses \
48975     -Wpointer-arith \
48976     -Wpointer-sign \
48977     -Wpointer-to-int-cast \
48978     -Wpragmas \
48979     -Wreturn-local-addr \
48980     -Wreturn-type \
48981     -Wsequence-point \
48982     -Wshadow \
48983     -Wsizeof-pointer-memaccess \
48984     -Wstack-protector \
48985     -Wstrict-aliasing \
48986     -Wstrict-overflow \
48987     -Wstrict-prototypes \
48988     -Wsuggest-attribute=const \
48989     -Wsuggest-attribute=format \
48990     -Wsuggest-attribute=noreturn \
48991     -Wsuggest-attribute=pure \
48992     -Wswitch \
48993     -Wswitch-default \
48994     -Wsync-nand \
48995     -Wsystem-headers \
48996     -Wtrampolines \
48997     -Wtrigraphs \
48998     -Wtype-limits \
48999     -Wuninitialized \
49000     -Wunknown-pragmas \
49001     -Wunsafe-loop-optimizations \
49002     -Wunused \
49003     -Wunused-but-set-parameter \
49004     -Wunused-but-set-variable \
49005     -Wunused-function \
49006     -Wunused-label \
49007     -Wunused-local-typedefs \
49008     -Wunused-macros \
49009     -Wunused-parameter \
49010     -Wunused-result \
49011     -Wunused-value \
49012     -Wunused-variable \
49013     -Wvarargs \
49014     -Wvariadic-macros \
49015     -Wvector-operation-performance \
49016     -Wvla \
49017     -Wvolatile-register-var \
49018     -Wwrite-strings \
49019     -fdiagnostics-show-option \
49020     -funit-at-a-time \
49021     \
49022     ; do
49023     gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
49024   done
49025
49026   # Disable specific options as needed.
49027   if test "$gl_cv_cc_nomfi_needed" = yes; then
49028     gl_manywarn_set="$gl_manywarn_set -Wno-missing-field-initializers"
49029   fi
49030
49031   if test "$gl_cv_cc_uninitialized_supported" = no; then
49032     gl_manywarn_set="$gl_manywarn_set -Wno-uninitialized"
49033   fi
49034
49035   warnings=$gl_manywarn_set
49036
49037 # Set up the list of the pointless, undesired warnings.
49038 nw=
49039 nw="$nw -Wsystem-headers"       # Don't let system headers trigger warnings
49040 nw="$nw -Wundef"                # All compiler preprocessors support #if UNDEF
49041 nw="$nw -Wtraditional"          # All compilers nowadays support ANSI C
49042 nw="$nw -Wconversion"           # These warnings usually don't point to mistakes.
49043 nw="$nw -Wsign-conversion"      # Likewise.
49044 nw="$nw -Wc++-compat"           # malloc returns void* and a cast would be ugly.
49045 # Warnings we might enable in the future, but not yet (because they generate a
49046 # lot of noise).
49047 marginal=""
49048 marginal="$marginal -Wtraditional-conversion"
49049 marginal="$marginal -Wpadded"
49050 marginal="$marginal -Wformat-nonliteral"
49051 marginal="$marginal -Wunreachable-code"
49052 marginal="$marginal -Wunused-parameter"
49053 excluded_warnings="$nw $marginal"
49054
49055 # Enable all GCC warnings not in this list.
49056
49057   gl_warn_set=
49058   set x $warnings; shift
49059   for gl_warn_item
49060   do
49061     case " $excluded_warnings " in
49062       *" $gl_warn_item "*)
49063         ;;
49064       *)
49065         gl_warn_set="$gl_warn_set $gl_warn_item"
49066         ;;
49067     esac
49068   done
49069   warnings=$gl_warn_set
49070
49071
49072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror -Wunknown-warning-option" >&5
49073 $as_echo_n "checking whether C compiler handles -Werror -Wunknown-warning-option... " >&6; }
49074 if ${gl_cv_warn_c__Werror__Wunknown_warning_option+:} false; then :
49075   $as_echo_n "(cached) " >&6
49076 else
49077
49078   gl_save_compiler_FLAGS="$CFLAGS"
49079   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror -Wunknown-warning-option"
49080   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49081 /* end confdefs.h.  */
49082
49083 int
49084 main ()
49085 {
49086
49087   ;
49088   return 0;
49089 }
49090 _ACEOF
49091 if ac_fn_c_try_link "$LINENO"; then :
49092   gl_cv_warn_c__Werror__Wunknown_warning_option=yes
49093 else
49094   gl_cv_warn_c__Werror__Wunknown_warning_option=no
49095 fi
49096 rm -f core conftest.err conftest.$ac_objext \
49097     conftest$ac_exeext conftest.$ac_ext
49098   CFLAGS="$gl_save_compiler_FLAGS"
49099
49100 fi
49101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror__Wunknown_warning_option" >&5
49102 $as_echo "$gl_cv_warn_c__Werror__Wunknown_warning_option" >&6; }
49103 if test "x$gl_cv_warn_c__Werror__Wunknown_warning_option" = xyes; then :
49104   gl_unknown_warnings_are_errors='-Wunknown-warning-option -Werror'
49105 else
49106   gl_unknown_warnings_are_errors=
49107 fi
49108
49109 # Check whether --enable-compiler-warnings was given.
49110 if test "${enable_compiler_warnings+set}" = set; then :
49111   enableval=$enable_compiler_warnings;
49112     for w in $warnings
49113     do
49114
49115 as_gl_Warn=`$as_echo "gl_cv_warn_c_$w" | $as_tr_sh`
49116 gl_positive="$w"
49117 case $gl_positive in
49118   -Wno-*) gl_positive=-W`expr "X$gl_positive" : 'X-Wno-\(.*\)'` ;;
49119 esac
49120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles $w" >&5
49121 $as_echo_n "checking whether C compiler handles $w... " >&6; }
49122 if eval \${$as_gl_Warn+:} false; then :
49123   $as_echo_n "(cached) " >&6
49124 else
49125
49126   gl_save_compiler_FLAGS="$CFLAGS"
49127   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors $gl_positive"
49128   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49129 /* end confdefs.h.  */
49130
49131 int
49132 main ()
49133 {
49134
49135   ;
49136   return 0;
49137 }
49138 _ACEOF
49139 if ac_fn_c_try_link "$LINENO"; then :
49140   eval "$as_gl_Warn=yes"
49141 else
49142   eval "$as_gl_Warn=no"
49143 fi
49144 rm -f core conftest.err conftest.$ac_objext \
49145     conftest$ac_exeext conftest.$ac_ext
49146   CFLAGS="$gl_save_compiler_FLAGS"
49147
49148 fi
49149 eval ac_res=\$$as_gl_Warn
49150                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
49151 $as_echo "$ac_res" >&6; }
49152 if eval test \"x\$"$as_gl_Warn"\" = x"yes"; then :
49153   as_fn_append WARN_CFLAGS " $w"
49154 fi
49155
49156
49157     done
49158
49159
49160 fi
49161
49162
49163
49164
49165         MKINSTALLDIRS=
49166   if test -n "$ac_aux_dir"; then
49167     case "$ac_aux_dir" in
49168       /*) MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" ;;
49169       *) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/mkinstalldirs" ;;
49170     esac
49171   fi
49172   if test -z "$MKINSTALLDIRS"; then
49173     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
49174   fi
49175
49176
49177
49178  if test "x$cross_compiling" = xyes; then
49179   CROSS_COMPILING_TRUE=
49180   CROSS_COMPILING_FALSE='#'
49181 else
49182   CROSS_COMPILING_TRUE='#'
49183   CROSS_COMPILING_FALSE=
49184 fi
49185
49186
49187
49188 ac_fn_c_check_func "$LINENO" "getpwnam" "ac_cv_func_getpwnam"
49189 if test "x$ac_cv_func_getpwnam" = xyes; then :
49190
49191 else
49192   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpwnam in -lsun" >&5
49193 $as_echo_n "checking for getpwnam in -lsun... " >&6; }
49194 if ${ac_cv_lib_sun_getpwnam+:} false; then :
49195   $as_echo_n "(cached) " >&6
49196 else
49197   ac_check_lib_save_LIBS=$LIBS
49198 LIBS="-lsun  $LIBS"
49199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49200 /* end confdefs.h.  */
49201
49202 /* Override any GCC internal prototype to avoid an error.
49203    Use char because int might match the return type of a GCC
49204    builtin and then its argument prototype would still apply.  */
49205 #ifdef __cplusplus
49206 extern "C"
49207 #endif
49208 char getpwnam ();
49209 int
49210 main ()
49211 {
49212 return getpwnam ();
49213   ;
49214   return 0;
49215 }
49216 _ACEOF
49217 if ac_fn_c_try_link "$LINENO"; then :
49218   ac_cv_lib_sun_getpwnam=yes
49219 else
49220   ac_cv_lib_sun_getpwnam=no
49221 fi
49222 rm -f core conftest.err conftest.$ac_objext \
49223     conftest$ac_exeext conftest.$ac_ext
49224 LIBS=$ac_check_lib_save_LIBS
49225 fi
49226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sun_getpwnam" >&5
49227 $as_echo "$ac_cv_lib_sun_getpwnam" >&6; }
49228 if test "x$ac_cv_lib_sun_getpwnam" = xyes; then :
49229   cat >>confdefs.h <<_ACEOF
49230 #define HAVE_LIBSUN 1
49231 _ACEOF
49232
49233   LIBS="-lsun $LIBS"
49234
49235 fi
49236
49237 fi
49238
49239
49240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for modf in -lm" >&5
49241 $as_echo_n "checking for modf in -lm... " >&6; }
49242 if ${ac_cv_lib_m_modf+:} false; then :
49243   $as_echo_n "(cached) " >&6
49244 else
49245   ac_check_lib_save_LIBS=$LIBS
49246 LIBS="-lm  $LIBS"
49247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49248 /* end confdefs.h.  */
49249
49250 /* Override any GCC internal prototype to avoid an error.
49251    Use char because int might match the return type of a GCC
49252    builtin and then its argument prototype would still apply.  */
49253 #ifdef __cplusplus
49254 extern "C"
49255 #endif
49256 char modf ();
49257 int
49258 main ()
49259 {
49260 return modf ();
49261   ;
49262   return 0;
49263 }
49264 _ACEOF
49265 if ac_fn_c_try_link "$LINENO"; then :
49266   ac_cv_lib_m_modf=yes
49267 else
49268   ac_cv_lib_m_modf=no
49269 fi
49270 rm -f core conftest.err conftest.$ac_objext \
49271     conftest$ac_exeext conftest.$ac_ext
49272 LIBS=$ac_check_lib_save_LIBS
49273 fi
49274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_modf" >&5
49275 $as_echo "$ac_cv_lib_m_modf" >&6; }
49276 if test "x$ac_cv_lib_m_modf" = xyes; then :
49277   FINDLIBS="-lm $FINDLIBS"
49278
49279 cat >>confdefs.h <<_ACEOF
49280 #define HAVE_MODF_IN_LIBM 1
49281 _ACEOF
49282
49283 fi
49284
49285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fabs in -lm" >&5
49286 $as_echo_n "checking for fabs in -lm... " >&6; }
49287 if ${ac_cv_lib_m_fabs+:} false; then :
49288   $as_echo_n "(cached) " >&6
49289 else
49290   ac_check_lib_save_LIBS=$LIBS
49291 LIBS="-lm  $LIBS"
49292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49293 /* end confdefs.h.  */
49294
49295 /* Override any GCC internal prototype to avoid an error.
49296    Use char because int might match the return type of a GCC
49297    builtin and then its argument prototype would still apply.  */
49298 #ifdef __cplusplus
49299 extern "C"
49300 #endif
49301 char fabs ();
49302 int
49303 main ()
49304 {
49305 return fabs ();
49306   ;
49307   return 0;
49308 }
49309 _ACEOF
49310 if ac_fn_c_try_link "$LINENO"; then :
49311   ac_cv_lib_m_fabs=yes
49312 else
49313   ac_cv_lib_m_fabs=no
49314 fi
49315 rm -f core conftest.err conftest.$ac_objext \
49316     conftest$ac_exeext conftest.$ac_ext
49317 LIBS=$ac_check_lib_save_LIBS
49318 fi
49319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_fabs" >&5
49320 $as_echo "$ac_cv_lib_m_fabs" >&6; }
49321 if test "x$ac_cv_lib_m_fabs" = xyes; then :
49322   FINDLIBS="-lm $FINDLIBS"
49323
49324 cat >>confdefs.h <<_ACEOF
49325 #define HAVE_FABS_IN_LIBM 1
49326 _ACEOF
49327
49328 fi
49329
49330
49331
49332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
49333 $as_echo_n "checking for ANSI C header files... " >&6; }
49334 if ${ac_cv_header_stdc+:} false; then :
49335   $as_echo_n "(cached) " >&6
49336 else
49337   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49338 /* end confdefs.h.  */
49339 #include <stdlib.h>
49340 #include <stdarg.h>
49341 #include <string.h>
49342 #include <float.h>
49343
49344 int
49345 main ()
49346 {
49347
49348   ;
49349   return 0;
49350 }
49351 _ACEOF
49352 if ac_fn_c_try_compile "$LINENO"; then :
49353   ac_cv_header_stdc=yes
49354 else
49355   ac_cv_header_stdc=no
49356 fi
49357 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49358
49359 if test $ac_cv_header_stdc = yes; then
49360   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
49361   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49362 /* end confdefs.h.  */
49363 #include <string.h>
49364
49365 _ACEOF
49366 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
49367   $EGREP "memchr" >/dev/null 2>&1; then :
49368
49369 else
49370   ac_cv_header_stdc=no
49371 fi
49372 rm -f conftest*
49373
49374 fi
49375
49376 if test $ac_cv_header_stdc = yes; then
49377   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
49378   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49379 /* end confdefs.h.  */
49380 #include <stdlib.h>
49381
49382 _ACEOF
49383 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
49384   $EGREP "free" >/dev/null 2>&1; then :
49385
49386 else
49387   ac_cv_header_stdc=no
49388 fi
49389 rm -f conftest*
49390
49391 fi
49392
49393 if test $ac_cv_header_stdc = yes; then
49394   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
49395   if test "$cross_compiling" = yes; then :
49396   :
49397 else
49398   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49399 /* end confdefs.h.  */
49400 #include <ctype.h>
49401 #include <stdlib.h>
49402 #if ((' ' & 0x0FF) == 0x020)
49403 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
49404 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
49405 #else
49406 # define ISLOWER(c) \
49407                    (('a' <= (c) && (c) <= 'i') \
49408                      || ('j' <= (c) && (c) <= 'r') \
49409                      || ('s' <= (c) && (c) <= 'z'))
49410 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
49411 #endif
49412
49413 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
49414 int
49415 main ()
49416 {
49417   int i;
49418   for (i = 0; i < 256; i++)
49419     if (XOR (islower (i), ISLOWER (i))
49420         || toupper (i) != TOUPPER (i))
49421       return 2;
49422   return 0;
49423 }
49424 _ACEOF
49425 if ac_fn_c_try_run "$LINENO"; then :
49426
49427 else
49428   ac_cv_header_stdc=no
49429 fi
49430 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49431   conftest.$ac_objext conftest.beam conftest.$ac_ext
49432 fi
49433
49434 fi
49435 fi
49436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
49437 $as_echo "$ac_cv_header_stdc" >&6; }
49438 if test $ac_cv_header_stdc = yes; then
49439
49440 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
49441
49442 fi
49443
49444 for ac_header in sys/param.h mntent.h sys/mnttab.h sys/mntio.h sys/mkdev.h
49445 do :
49446   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
49447 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
49448 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
49449   cat >>confdefs.h <<_ACEOF
49450 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
49451 _ACEOF
49452
49453 fi
49454
49455 done
49456
49457 for ac_header in sys/resource.h
49458 do :
49459   ac_fn_c_check_header_mongrel "$LINENO" "sys/resource.h" "ac_cv_header_sys_resource_h" "$ac_includes_default"
49460 if test "x$ac_cv_header_sys_resource_h" = xyes; then :
49461   cat >>confdefs.h <<_ACEOF
49462 #define HAVE_SYS_RESOURCE_H 1
49463 _ACEOF
49464
49465 fi
49466
49467 done
49468
49469 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
49470 $as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
49471 if ${ac_cv_header_sys_types_h_makedev+:} false; then :
49472   $as_echo_n "(cached) " >&6
49473 else
49474   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49475 /* end confdefs.h.  */
49476 #include <sys/types.h>
49477 int
49478 main ()
49479 {
49480 return makedev(0, 0);
49481   ;
49482   return 0;
49483 }
49484 _ACEOF
49485 if ac_fn_c_try_link "$LINENO"; then :
49486   ac_cv_header_sys_types_h_makedev=yes
49487 else
49488   ac_cv_header_sys_types_h_makedev=no
49489 fi
49490 rm -f core conftest.err conftest.$ac_objext \
49491     conftest$ac_exeext conftest.$ac_ext
49492
49493 fi
49494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
49495 $as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
49496
49497 if test $ac_cv_header_sys_types_h_makedev = no; then
49498 ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
49499 if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
49500
49501 $as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
49502
49503 fi
49504
49505
49506
49507   if test $ac_cv_header_sys_mkdev_h = no; then
49508     ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
49509 if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
49510
49511 $as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
49512
49513 fi
49514
49515
49516   fi
49517 fi
49518
49519 ac_header_dirent=no
49520 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
49521   as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
49522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
49523 $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
49524 if eval \${$as_ac_Header+:} false; then :
49525   $as_echo_n "(cached) " >&6
49526 else
49527   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49528 /* end confdefs.h.  */
49529 #include <sys/types.h>
49530 #include <$ac_hdr>
49531
49532 int
49533 main ()
49534 {
49535 if ((DIR *) 0)
49536 return 0;
49537   ;
49538   return 0;
49539 }
49540 _ACEOF
49541 if ac_fn_c_try_compile "$LINENO"; then :
49542   eval "$as_ac_Header=yes"
49543 else
49544   eval "$as_ac_Header=no"
49545 fi
49546 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49547 fi
49548 eval ac_res=\$$as_ac_Header
49549                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
49550 $as_echo "$ac_res" >&6; }
49551 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
49552   cat >>confdefs.h <<_ACEOF
49553 #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
49554 _ACEOF
49555
49556 ac_header_dirent=$ac_hdr; break
49557 fi
49558
49559 done
49560 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
49561 if test $ac_header_dirent = dirent.h; then
49562   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
49563 $as_echo_n "checking for library containing opendir... " >&6; }
49564 if ${ac_cv_search_opendir+:} false; then :
49565   $as_echo_n "(cached) " >&6
49566 else
49567   ac_func_search_save_LIBS=$LIBS
49568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49569 /* end confdefs.h.  */
49570
49571 /* Override any GCC internal prototype to avoid an error.
49572    Use char because int might match the return type of a GCC
49573    builtin and then its argument prototype would still apply.  */
49574 #ifdef __cplusplus
49575 extern "C"
49576 #endif
49577 char opendir ();
49578 int
49579 main ()
49580 {
49581 return opendir ();
49582   ;
49583   return 0;
49584 }
49585 _ACEOF
49586 for ac_lib in '' dir; do
49587   if test -z "$ac_lib"; then
49588     ac_res="none required"
49589   else
49590     ac_res=-l$ac_lib
49591     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
49592   fi
49593   if ac_fn_c_try_link "$LINENO"; then :
49594   ac_cv_search_opendir=$ac_res
49595 fi
49596 rm -f core conftest.err conftest.$ac_objext \
49597     conftest$ac_exeext
49598   if ${ac_cv_search_opendir+:} false; then :
49599   break
49600 fi
49601 done
49602 if ${ac_cv_search_opendir+:} false; then :
49603
49604 else
49605   ac_cv_search_opendir=no
49606 fi
49607 rm conftest.$ac_ext
49608 LIBS=$ac_func_search_save_LIBS
49609 fi
49610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
49611 $as_echo "$ac_cv_search_opendir" >&6; }
49612 ac_res=$ac_cv_search_opendir
49613 if test "$ac_res" != no; then :
49614   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
49615
49616 fi
49617
49618 else
49619   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
49620 $as_echo_n "checking for library containing opendir... " >&6; }
49621 if ${ac_cv_search_opendir+:} false; then :
49622   $as_echo_n "(cached) " >&6
49623 else
49624   ac_func_search_save_LIBS=$LIBS
49625 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49626 /* end confdefs.h.  */
49627
49628 /* Override any GCC internal prototype to avoid an error.
49629    Use char because int might match the return type of a GCC
49630    builtin and then its argument prototype would still apply.  */
49631 #ifdef __cplusplus
49632 extern "C"
49633 #endif
49634 char opendir ();
49635 int
49636 main ()
49637 {
49638 return opendir ();
49639   ;
49640   return 0;
49641 }
49642 _ACEOF
49643 for ac_lib in '' x; do
49644   if test -z "$ac_lib"; then
49645     ac_res="none required"
49646   else
49647     ac_res=-l$ac_lib
49648     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
49649   fi
49650   if ac_fn_c_try_link "$LINENO"; then :
49651   ac_cv_search_opendir=$ac_res
49652 fi
49653 rm -f core conftest.err conftest.$ac_objext \
49654     conftest$ac_exeext
49655   if ${ac_cv_search_opendir+:} false; then :
49656   break
49657 fi
49658 done
49659 if ${ac_cv_search_opendir+:} false; then :
49660
49661 else
49662   ac_cv_search_opendir=no
49663 fi
49664 rm conftest.$ac_ext
49665 LIBS=$ac_func_search_save_LIBS
49666 fi
49667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
49668 $as_echo "$ac_cv_search_opendir" >&6; }
49669 ac_res=$ac_cv_search_opendir
49670 if test "$ac_res" != no; then :
49671   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
49672
49673 fi
49674
49675 fi
49676
49677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
49678 $as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
49679 if ${ac_cv_header_stat_broken+:} false; then :
49680   $as_echo_n "(cached) " >&6
49681 else
49682   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49683 /* end confdefs.h.  */
49684 #include <sys/types.h>
49685 #include <sys/stat.h>
49686
49687 #if defined S_ISBLK && defined S_IFDIR
49688 extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
49689 #endif
49690
49691 #if defined S_ISBLK && defined S_IFCHR
49692 extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
49693 #endif
49694
49695 #if defined S_ISLNK && defined S_IFREG
49696 extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
49697 #endif
49698
49699 #if defined S_ISSOCK && defined S_IFREG
49700 extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
49701 #endif
49702
49703 _ACEOF
49704 if ac_fn_c_try_compile "$LINENO"; then :
49705   ac_cv_header_stat_broken=no
49706 else
49707   ac_cv_header_stat_broken=yes
49708 fi
49709 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49710 fi
49711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
49712 $as_echo "$ac_cv_header_stat_broken" >&6; }
49713 if test $ac_cv_header_stat_broken = yes; then
49714
49715 $as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
49716
49717 fi
49718
49719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
49720 $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
49721 if ${ac_cv_header_sys_wait_h+:} false; then :
49722   $as_echo_n "(cached) " >&6
49723 else
49724   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49725 /* end confdefs.h.  */
49726 #include <sys/types.h>
49727 #include <sys/wait.h>
49728 #ifndef WEXITSTATUS
49729 # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
49730 #endif
49731 #ifndef WIFEXITED
49732 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
49733 #endif
49734
49735 int
49736 main ()
49737 {
49738   int s;
49739   wait (&s);
49740   s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
49741   ;
49742   return 0;
49743 }
49744 _ACEOF
49745 if ac_fn_c_try_compile "$LINENO"; then :
49746   ac_cv_header_sys_wait_h=yes
49747 else
49748   ac_cv_header_sys_wait_h=no
49749 fi
49750 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49751 fi
49752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
49753 $as_echo "$ac_cv_header_sys_wait_h" >&6; }
49754 if test $ac_cv_header_sys_wait_h = yes; then
49755
49756 $as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
49757
49758 fi
49759
49760
49761
49762
49763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
49764 $as_echo_n "checking for uid_t in sys/types.h... " >&6; }
49765 if ${ac_cv_type_uid_t+:} false; then :
49766   $as_echo_n "(cached) " >&6
49767 else
49768   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49769 /* end confdefs.h.  */
49770 #include <sys/types.h>
49771
49772 _ACEOF
49773 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
49774   $EGREP "uid_t" >/dev/null 2>&1; then :
49775   ac_cv_type_uid_t=yes
49776 else
49777   ac_cv_type_uid_t=no
49778 fi
49779 rm -f conftest*
49780
49781 fi
49782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
49783 $as_echo "$ac_cv_type_uid_t" >&6; }
49784 if test $ac_cv_type_uid_t = no; then
49785
49786 $as_echo "#define uid_t int" >>confdefs.h
49787
49788
49789 $as_echo "#define gid_t int" >>confdefs.h
49790
49791 fi
49792
49793 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
49794 if test "x$ac_cv_type_size_t" = xyes; then :
49795
49796 else
49797
49798 cat >>confdefs.h <<_ACEOF
49799 #define size_t unsigned int
49800 _ACEOF
49801
49802 fi
49803
49804 ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
49805 if test "x$ac_cv_type_ssize_t" = xyes; then :
49806
49807 else
49808
49809 cat >>confdefs.h <<_ACEOF
49810 #define ssize_t int
49811 _ACEOF
49812
49813 fi
49814
49815 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
49816 if test "x$ac_cv_type_pid_t" = xyes; then :
49817
49818 else
49819
49820 cat >>confdefs.h <<_ACEOF
49821 #define pid_t int
49822 _ACEOF
49823
49824 fi
49825
49826 ac_fn_c_check_type "$LINENO" "ino_t" "ac_cv_type_ino_t" "$ac_includes_default"
49827 if test "x$ac_cv_type_ino_t" = xyes; then :
49828
49829 else
49830
49831 cat >>confdefs.h <<_ACEOF
49832 #define ino_t unsigned long
49833 _ACEOF
49834
49835 fi
49836
49837 ac_fn_c_check_type "$LINENO" "dev_t" "ac_cv_type_dev_t" "$ac_includes_default"
49838 if test "x$ac_cv_type_dev_t" = xyes; then :
49839
49840 else
49841
49842 cat >>confdefs.h <<_ACEOF
49843 #define dev_t unsigned long
49844 _ACEOF
49845
49846 fi
49847
49848 ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
49849 if test "x$ac_cv_type_mode_t" = xyes; then :
49850
49851 else
49852
49853 cat >>confdefs.h <<_ACEOF
49854 #define mode_t int
49855 _ACEOF
49856
49857 fi
49858
49859 ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
49860 if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
49861
49862 cat >>confdefs.h <<_ACEOF
49863 #define HAVE_STRUCT_STAT_ST_BLOCKS 1
49864 _ACEOF
49865
49866
49867 $as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
49868
49869 else
49870   case " $LIBOBJS " in
49871   *" fileblocks.$ac_objext "* ) ;;
49872   *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
49873  ;;
49874 esac
49875
49876 fi
49877
49878
49879 ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
49880 if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
49881
49882 cat >>confdefs.h <<_ACEOF
49883 #define HAVE_STRUCT_STAT_ST_RDEV 1
49884 _ACEOF
49885
49886
49887 fi
49888
49889
49890
49891
49892   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
49893 $as_echo_n "checking for promoted mode_t type... " >&6; }
49894 if ${gl_cv_promoted_mode_t+:} false; then :
49895   $as_echo_n "(cached) " >&6
49896 else
49897
49898                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49899 /* end confdefs.h.  */
49900 #include <sys/types.h>
49901 int
49902 main ()
49903 {
49904 typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
49905   ;
49906   return 0;
49907 }
49908 _ACEOF
49909 if ac_fn_c_try_compile "$LINENO"; then :
49910   gl_cv_promoted_mode_t='int'
49911 else
49912   gl_cv_promoted_mode_t='mode_t'
49913 fi
49914 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49915
49916 fi
49917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
49918 $as_echo "$gl_cv_promoted_mode_t" >&6; }
49919
49920 cat >>confdefs.h <<_ACEOF
49921 #define PROMOTED_MODE_T $gl_cv_promoted_mode_t
49922 _ACEOF
49923
49924
49925
49926
49927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
49928 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
49929 if ${ac_cv_struct_tm+:} false; then :
49930   $as_echo_n "(cached) " >&6
49931 else
49932   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49933 /* end confdefs.h.  */
49934 #include <sys/types.h>
49935 #include <time.h>
49936
49937 int
49938 main ()
49939 {
49940 struct tm tm;
49941                                      int *p = &tm.tm_sec;
49942                                      return !p;
49943   ;
49944   return 0;
49945 }
49946 _ACEOF
49947 if ac_fn_c_try_compile "$LINENO"; then :
49948   ac_cv_struct_tm=time.h
49949 else
49950   ac_cv_struct_tm=sys/time.h
49951 fi
49952 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49953 fi
49954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
49955 $as_echo "$ac_cv_struct_tm" >&6; }
49956 if test $ac_cv_struct_tm = sys/time.h; then
49957
49958 $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
49959
49960 fi
49961
49962 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
49963 #include <$ac_cv_struct_tm>
49964
49965 "
49966 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
49967
49968 cat >>confdefs.h <<_ACEOF
49969 #define HAVE_STRUCT_TM_TM_ZONE 1
49970 _ACEOF
49971
49972
49973 fi
49974
49975 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
49976
49977 $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
49978
49979 else
49980   ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
49981 "
49982 if test "x$ac_cv_have_decl_tzname" = xyes; then :
49983   ac_have_decl=1
49984 else
49985   ac_have_decl=0
49986 fi
49987
49988 cat >>confdefs.h <<_ACEOF
49989 #define HAVE_DECL_TZNAME $ac_have_decl
49990 _ACEOF
49991
49992   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
49993 $as_echo_n "checking for tzname... " >&6; }
49994 if ${ac_cv_var_tzname+:} false; then :
49995   $as_echo_n "(cached) " >&6
49996 else
49997   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49998 /* end confdefs.h.  */
49999 #include <time.h>
50000 #if !HAVE_DECL_TZNAME
50001 extern char *tzname[];
50002 #endif
50003
50004 int
50005 main ()
50006 {
50007 return tzname[0][0];
50008   ;
50009   return 0;
50010 }
50011 _ACEOF
50012 if ac_fn_c_try_link "$LINENO"; then :
50013   ac_cv_var_tzname=yes
50014 else
50015   ac_cv_var_tzname=no
50016 fi
50017 rm -f core conftest.err conftest.$ac_objext \
50018     conftest$ac_exeext conftest.$ac_ext
50019 fi
50020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
50021 $as_echo "$ac_cv_var_tzname" >&6; }
50022   if test $ac_cv_var_tzname = yes; then
50023
50024 $as_echo "#define HAVE_TZNAME 1" >>confdefs.h
50025
50026   fi
50027 fi
50028
50029
50030 for ac_func in strftime
50031 do :
50032   ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime"
50033 if test "x$ac_cv_func_strftime" = xyes; then :
50034   cat >>confdefs.h <<_ACEOF
50035 #define HAVE_STRFTIME 1
50036 _ACEOF
50037
50038 else
50039   # strftime is in -lintl on SCO UNIX.
50040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strftime in -lintl" >&5
50041 $as_echo_n "checking for strftime in -lintl... " >&6; }
50042 if ${ac_cv_lib_intl_strftime+:} false; then :
50043   $as_echo_n "(cached) " >&6
50044 else
50045   ac_check_lib_save_LIBS=$LIBS
50046 LIBS="-lintl  $LIBS"
50047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50048 /* end confdefs.h.  */
50049
50050 /* Override any GCC internal prototype to avoid an error.
50051    Use char because int might match the return type of a GCC
50052    builtin and then its argument prototype would still apply.  */
50053 #ifdef __cplusplus
50054 extern "C"
50055 #endif
50056 char strftime ();
50057 int
50058 main ()
50059 {
50060 return strftime ();
50061   ;
50062   return 0;
50063 }
50064 _ACEOF
50065 if ac_fn_c_try_link "$LINENO"; then :
50066   ac_cv_lib_intl_strftime=yes
50067 else
50068   ac_cv_lib_intl_strftime=no
50069 fi
50070 rm -f core conftest.err conftest.$ac_objext \
50071     conftest$ac_exeext conftest.$ac_ext
50072 LIBS=$ac_check_lib_save_LIBS
50073 fi
50074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_strftime" >&5
50075 $as_echo "$ac_cv_lib_intl_strftime" >&6; }
50076 if test "x$ac_cv_lib_intl_strftime" = xyes; then :
50077   $as_echo "#define HAVE_STRFTIME 1" >>confdefs.h
50078
50079 LIBS="-lintl $LIBS"
50080 fi
50081
50082 fi
50083 done
50084
50085 ac_fn_c_check_func "$LINENO" "memcmp" "ac_cv_func_memcmp"
50086 if test "x$ac_cv_func_memcmp" = xyes; then :
50087   $as_echo "#define HAVE_MEMCMP 1" >>confdefs.h
50088
50089 else
50090   case " $LIBOBJS " in
50091   *" memcmp.$ac_objext "* ) ;;
50092   *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
50093  ;;
50094 esac
50095
50096 fi
50097
50098 ac_fn_c_check_func "$LINENO" "memset" "ac_cv_func_memset"
50099 if test "x$ac_cv_func_memset" = xyes; then :
50100   $as_echo "#define HAVE_MEMSET 1" >>confdefs.h
50101
50102 else
50103   case " $LIBOBJS " in
50104   *" memset.$ac_objext "* ) ;;
50105   *) LIBOBJS="$LIBOBJS memset.$ac_objext"
50106  ;;
50107 esac
50108
50109 fi
50110
50111 ac_fn_c_check_func "$LINENO" "stpcpy" "ac_cv_func_stpcpy"
50112 if test "x$ac_cv_func_stpcpy" = xyes; then :
50113   $as_echo "#define HAVE_STPCPY 1" >>confdefs.h
50114
50115 else
50116   case " $LIBOBJS " in
50117   *" stpcpy.$ac_objext "* ) ;;
50118   *) LIBOBJS="$LIBOBJS stpcpy.$ac_objext"
50119  ;;
50120 esac
50121
50122 fi
50123
50124 ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
50125 if test "x$ac_cv_func_strdup" = xyes; then :
50126   $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
50127
50128 else
50129   case " $LIBOBJS " in
50130   *" strdup.$ac_objext "* ) ;;
50131   *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
50132  ;;
50133 esac
50134
50135 fi
50136
50137 ac_fn_c_check_func "$LINENO" "strstr" "ac_cv_func_strstr"
50138 if test "x$ac_cv_func_strstr" = xyes; then :
50139   $as_echo "#define HAVE_STRSTR 1" >>confdefs.h
50140
50141 else
50142   case " $LIBOBJS " in
50143   *" strstr.$ac_objext "* ) ;;
50144   *) LIBOBJS="$LIBOBJS strstr.$ac_objext"
50145  ;;
50146 esac
50147
50148 fi
50149
50150 ac_fn_c_check_func "$LINENO" "strtol" "ac_cv_func_strtol"
50151 if test "x$ac_cv_func_strtol" = xyes; then :
50152   $as_echo "#define HAVE_STRTOL 1" >>confdefs.h
50153
50154 else
50155   case " $LIBOBJS " in
50156   *" strtol.$ac_objext "* ) ;;
50157   *) LIBOBJS="$LIBOBJS strtol.$ac_objext"
50158  ;;
50159 esac
50160
50161 fi
50162
50163 ac_fn_c_check_func "$LINENO" "strtoul" "ac_cv_func_strtoul"
50164 if test "x$ac_cv_func_strtoul" = xyes; then :
50165   $as_echo "#define HAVE_STRTOUL 1" >>confdefs.h
50166
50167 else
50168   case " $LIBOBJS " in
50169   *" strtoul.$ac_objext "* ) ;;
50170   *) LIBOBJS="$LIBOBJS strtoul.$ac_objext"
50171  ;;
50172 esac
50173
50174 fi
50175
50176
50177 for ac_func in fchdir getcwd strerror endgrent endpwent setlocale
50178 do :
50179   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
50180 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
50181 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
50182   cat >>confdefs.h <<_ACEOF
50183 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
50184 _ACEOF
50185
50186 fi
50187 done
50188
50189 for ac_func in getrusage
50190 do :
50191   ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage"
50192 if test "x$ac_cv_func_getrusage" = xyes; then :
50193   cat >>confdefs.h <<_ACEOF
50194 #define HAVE_GETRUSAGE 1
50195 _ACEOF
50196
50197 fi
50198 done
50199
50200 for ac_func in vprintf
50201 do :
50202   ac_fn_c_check_func "$LINENO" "vprintf" "ac_cv_func_vprintf"
50203 if test "x$ac_cv_func_vprintf" = xyes; then :
50204   cat >>confdefs.h <<_ACEOF
50205 #define HAVE_VPRINTF 1
50206 _ACEOF
50207
50208 ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt"
50209 if test "x$ac_cv_func__doprnt" = xyes; then :
50210
50211 $as_echo "#define HAVE_DOPRNT 1" >>confdefs.h
50212
50213 fi
50214
50215 fi
50216 done
50217
50218
50219 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
50220 # for constant arguments.  Useless!
50221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
50222 $as_echo_n "checking for working alloca.h... " >&6; }
50223 if ${ac_cv_working_alloca_h+:} false; then :
50224   $as_echo_n "(cached) " >&6
50225 else
50226   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50227 /* end confdefs.h.  */
50228 #include <alloca.h>
50229 int
50230 main ()
50231 {
50232 char *p = (char *) alloca (2 * sizeof (int));
50233                           if (p) return 0;
50234   ;
50235   return 0;
50236 }
50237 _ACEOF
50238 if ac_fn_c_try_link "$LINENO"; then :
50239   ac_cv_working_alloca_h=yes
50240 else
50241   ac_cv_working_alloca_h=no
50242 fi
50243 rm -f core conftest.err conftest.$ac_objext \
50244     conftest$ac_exeext conftest.$ac_ext
50245 fi
50246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
50247 $as_echo "$ac_cv_working_alloca_h" >&6; }
50248 if test $ac_cv_working_alloca_h = yes; then
50249
50250 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
50251
50252 fi
50253
50254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
50255 $as_echo_n "checking for alloca... " >&6; }
50256 if ${ac_cv_func_alloca_works+:} false; then :
50257   $as_echo_n "(cached) " >&6
50258 else
50259   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50260 /* end confdefs.h.  */
50261 #ifdef __GNUC__
50262 # define alloca __builtin_alloca
50263 #else
50264 # ifdef _MSC_VER
50265 #  include <malloc.h>
50266 #  define alloca _alloca
50267 # else
50268 #  ifdef HAVE_ALLOCA_H
50269 #   include <alloca.h>
50270 #  else
50271 #   ifdef _AIX
50272  #pragma alloca
50273 #   else
50274 #    ifndef alloca /* predefined by HP cc +Olibcalls */
50275 void *alloca (size_t);
50276 #    endif
50277 #   endif
50278 #  endif
50279 # endif
50280 #endif
50281
50282 int
50283 main ()
50284 {
50285 char *p = (char *) alloca (1);
50286                                     if (p) return 0;
50287   ;
50288   return 0;
50289 }
50290 _ACEOF
50291 if ac_fn_c_try_link "$LINENO"; then :
50292   ac_cv_func_alloca_works=yes
50293 else
50294   ac_cv_func_alloca_works=no
50295 fi
50296 rm -f core conftest.err conftest.$ac_objext \
50297     conftest$ac_exeext conftest.$ac_ext
50298 fi
50299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
50300 $as_echo "$ac_cv_func_alloca_works" >&6; }
50301
50302 if test $ac_cv_func_alloca_works = yes; then
50303
50304 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
50305
50306 else
50307   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
50308 # that cause trouble.  Some versions do not even contain alloca or
50309 # contain a buggy version.  If you still want to use their alloca,
50310 # use ar to extract alloca.o from them instead of compiling alloca.c.
50311
50312 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
50313
50314 $as_echo "#define C_ALLOCA 1" >>confdefs.h
50315
50316
50317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
50318 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
50319 if ${ac_cv_os_cray+:} false; then :
50320   $as_echo_n "(cached) " >&6
50321 else
50322   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50323 /* end confdefs.h.  */
50324 #if defined CRAY && ! defined CRAY2
50325 webecray
50326 #else
50327 wenotbecray
50328 #endif
50329
50330 _ACEOF
50331 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
50332   $EGREP "webecray" >/dev/null 2>&1; then :
50333   ac_cv_os_cray=yes
50334 else
50335   ac_cv_os_cray=no
50336 fi
50337 rm -f conftest*
50338
50339 fi
50340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
50341 $as_echo "$ac_cv_os_cray" >&6; }
50342 if test $ac_cv_os_cray = yes; then
50343   for ac_func in _getb67 GETB67 getb67; do
50344     as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
50345 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
50346 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
50347
50348 cat >>confdefs.h <<_ACEOF
50349 #define CRAY_STACKSEG_END $ac_func
50350 _ACEOF
50351
50352     break
50353 fi
50354
50355   done
50356 fi
50357
50358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
50359 $as_echo_n "checking stack direction for C alloca... " >&6; }
50360 if ${ac_cv_c_stack_direction+:} false; then :
50361   $as_echo_n "(cached) " >&6
50362 else
50363   if test "$cross_compiling" = yes; then :
50364   ac_cv_c_stack_direction=0
50365 else
50366   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50367 /* end confdefs.h.  */
50368 $ac_includes_default
50369 int
50370 find_stack_direction (int *addr, int depth)
50371 {
50372   int dir, dummy = 0;
50373   if (! addr)
50374     addr = &dummy;
50375   *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
50376   dir = depth ? find_stack_direction (addr, depth - 1) : 0;
50377   return dir + dummy;
50378 }
50379
50380 int
50381 main (int argc, char **argv)
50382 {
50383   return find_stack_direction (0, argc + !argv + 20) < 0;
50384 }
50385 _ACEOF
50386 if ac_fn_c_try_run "$LINENO"; then :
50387   ac_cv_c_stack_direction=1
50388 else
50389   ac_cv_c_stack_direction=-1
50390 fi
50391 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
50392   conftest.$ac_objext conftest.beam conftest.$ac_ext
50393 fi
50394
50395 fi
50396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
50397 $as_echo "$ac_cv_c_stack_direction" >&6; }
50398 cat >>confdefs.h <<_ACEOF
50399 #define STACK_DIRECTION $ac_cv_c_stack_direction
50400 _ACEOF
50401
50402
50403 fi
50404
50405 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether closedir returns void" >&5
50406 $as_echo_n "checking whether closedir returns void... " >&6; }
50407 if ${ac_cv_func_closedir_void+:} false; then :
50408   $as_echo_n "(cached) " >&6
50409 else
50410   if test "$cross_compiling" = yes; then :
50411   ac_cv_func_closedir_void=yes
50412 else
50413   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50414 /* end confdefs.h.  */
50415 $ac_includes_default
50416 #include <$ac_header_dirent>
50417 #ifndef __cplusplus
50418 int closedir ();
50419 #endif
50420
50421 int
50422 main ()
50423 {
50424 return closedir (opendir (".")) != 0;
50425   ;
50426   return 0;
50427 }
50428 _ACEOF
50429 if ac_fn_c_try_run "$LINENO"; then :
50430   ac_cv_func_closedir_void=no
50431 else
50432   ac_cv_func_closedir_void=yes
50433 fi
50434 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
50435   conftest.$ac_objext conftest.beam conftest.$ac_ext
50436 fi
50437
50438 fi
50439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_closedir_void" >&5
50440 $as_echo "$ac_cv_func_closedir_void" >&6; }
50441 if test $ac_cv_func_closedir_void = yes; then
50442
50443 $as_echo "#define CLOSEDIR_VOID 1" >>confdefs.h
50444
50445 fi
50446
50447
50448 ac_fn_c_check_func "$LINENO" "getmntent" "ac_cv_func_getmntent"
50449 if test "x$ac_cv_func_getmntent" = xyes; then :
50450
50451 else
50452   # getmntent is in the standard C library on UNICOS, in -lsun on Irix 4,
50453 # -lseq on Dynix/PTX, -lgen on Unixware.
50454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getmntent" >&5
50455 $as_echo_n "checking for library containing getmntent... " >&6; }
50456 if ${ac_cv_search_getmntent+:} false; then :
50457   $as_echo_n "(cached) " >&6
50458 else
50459   ac_func_search_save_LIBS=$LIBS
50460 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50461 /* end confdefs.h.  */
50462
50463 /* Override any GCC internal prototype to avoid an error.
50464    Use char because int might match the return type of a GCC
50465    builtin and then its argument prototype would still apply.  */
50466 #ifdef __cplusplus
50467 extern "C"
50468 #endif
50469 char getmntent ();
50470 int
50471 main ()
50472 {
50473 return getmntent ();
50474   ;
50475   return 0;
50476 }
50477 _ACEOF
50478 for ac_lib in '' sun seq gen; do
50479   if test -z "$ac_lib"; then
50480     ac_res="none required"
50481   else
50482     ac_res=-l$ac_lib
50483     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
50484   fi
50485   if ac_fn_c_try_link "$LINENO"; then :
50486   ac_cv_search_getmntent=$ac_res
50487 fi
50488 rm -f core conftest.err conftest.$ac_objext \
50489     conftest$ac_exeext
50490   if ${ac_cv_search_getmntent+:} false; then :
50491   break
50492 fi
50493 done
50494 if ${ac_cv_search_getmntent+:} false; then :
50495
50496 else
50497   ac_cv_search_getmntent=no
50498 fi
50499 rm conftest.$ac_ext
50500 LIBS=$ac_func_search_save_LIBS
50501 fi
50502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getmntent" >&5
50503 $as_echo "$ac_cv_search_getmntent" >&6; }
50504 ac_res=$ac_cv_search_getmntent
50505 if test "$ac_res" != no; then :
50506   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
50507
50508 fi
50509
50510 for ac_func in getmntent
50511 do :
50512   ac_fn_c_check_func "$LINENO" "getmntent" "ac_cv_func_getmntent"
50513 if test "x$ac_cv_func_getmntent" = xyes; then :
50514   cat >>confdefs.h <<_ACEOF
50515 #define HAVE_GETMNTENT 1
50516 _ACEOF
50517
50518 fi
50519 done
50520
50521
50522 fi
50523
50524 for ac_func in getmntent
50525 do :
50526   ac_fn_c_check_func "$LINENO" "getmntent" "ac_cv_func_getmntent"
50527 if test "x$ac_cv_func_getmntent" = xyes; then :
50528   cat >>confdefs.h <<_ACEOF
50529 #define HAVE_GETMNTENT 1
50530 _ACEOF
50531
50532 fi
50533 done
50534
50535 for ac_func in setmntent endmntent
50536 do :
50537   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
50538 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
50539 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
50540   cat >>confdefs.h <<_ACEOF
50541 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
50542 _ACEOF
50543
50544 fi
50545 done
50546
50547
50548
50549 for ac_func in waitpid strspn
50550 do :
50551   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
50552 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
50553 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
50554   cat >>confdefs.h <<_ACEOF
50555 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
50556 _ACEOF
50557
50558 else
50559   case $FINDLIBOBJS in
50560     "$ac_func.$ac_objext"   | \
50561   *" $ac_func.$ac_objext"   | \
50562     "$ac_func.$ac_objext "* | \
50563   *" $ac_func.$ac_objext "* ) ;;
50564   *) FINDLIBOBJS="$FINDLIBOBJS $ac_func.$ac_objext" ;;
50565 esac
50566
50567 fi
50568 done
50569
50570
50571 for ac_func in forcefindlib
50572 do :
50573   ac_fn_c_check_func "$LINENO" "forcefindlib" "ac_cv_func_forcefindlib"
50574 if test "x$ac_cv_func_forcefindlib" = xyes; then :
50575   cat >>confdefs.h <<_ACEOF
50576 #define HAVE_FORCEFINDLIB 1
50577 _ACEOF
50578
50579 else
50580   case $FINDLIBOBJS in
50581     "$ac_func.$ac_objext"   | \
50582   *" $ac_func.$ac_objext"   | \
50583     "$ac_func.$ac_objext "* | \
50584   *" $ac_func.$ac_objext "* ) ;;
50585   *) FINDLIBOBJS="$FINDLIBOBJS $ac_func.$ac_objext" ;;
50586 esac
50587
50588 fi
50589 done
50590
50591
50592
50593
50594 # Check for common but not-POSIX functions.
50595 for ac_func in setgroups
50596 do :
50597   ac_fn_c_check_func "$LINENO" "setgroups" "ac_cv_func_setgroups"
50598 if test "x$ac_cv_func_setgroups" = xyes; then :
50599   cat >>confdefs.h <<_ACEOF
50600 #define HAVE_SETGROUPS 1
50601 _ACEOF
50602
50603 fi
50604 done
50605
50606
50607
50608
50609
50610   if test $ac_cv_func_alloca_works = no; then
50611     :
50612   fi
50613
50614   # Define an additional variable used in the Makefile substitution.
50615   if test $ac_cv_working_alloca_h = yes; then
50616     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
50617 $as_echo_n "checking for alloca as a compiler built-in... " >&6; }
50618 if ${gl_cv_rpl_alloca+:} false; then :
50619   $as_echo_n "(cached) " >&6
50620 else
50621
50622       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50623 /* end confdefs.h.  */
50624
50625 #if defined __GNUC__ || defined _AIX || defined _MSC_VER
50626         Need own alloca
50627 #endif
50628
50629 _ACEOF
50630 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
50631   $EGREP "Need own alloca" >/dev/null 2>&1; then :
50632   gl_cv_rpl_alloca=yes
50633 else
50634   gl_cv_rpl_alloca=no
50635 fi
50636 rm -f conftest*
50637
50638
50639 fi
50640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
50641 $as_echo "$gl_cv_rpl_alloca" >&6; }
50642     if test $gl_cv_rpl_alloca = yes; then
50643
50644 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
50645
50646       ALLOCA_H=alloca.h
50647     else
50648                   ALLOCA_H=
50649     fi
50650   else
50651     ALLOCA_H=alloca.h
50652   fi
50653
50654    if test -n "$ALLOCA_H"; then
50655   GL_GENERATE_ALLOCA_H_TRUE=
50656   GL_GENERATE_ALLOCA_H_FALSE='#'
50657 else
50658   GL_GENERATE_ALLOCA_H_TRUE='#'
50659   GL_GENERATE_ALLOCA_H_FALSE=
50660 fi
50661
50662
50663
50664
50665
50666 # Check whether --with-included-regex was given.
50667 if test "${with_included_regex+set}" = set; then :
50668   withval=$with_included_regex;
50669 fi
50670
50671
50672   case $with_included_regex in #(
50673   yes|no) ac_use_included_regex=$with_included_regex
50674         ;;
50675   '')
50676     # If the system regex support is good enough that it passes the
50677     # following run test, then default to *not* using the included regex.c.
50678     # If cross compiling, assume the test would fail and use the included
50679     # regex.c.
50680
50681   :
50682
50683
50684
50685
50686
50687
50688   :
50689
50690
50691
50692
50693
50694     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working re_compile_pattern" >&5
50695 $as_echo_n "checking for working re_compile_pattern... " >&6; }
50696 if ${gl_cv_func_re_compile_pattern_working+:} false; then :
50697   $as_echo_n "(cached) " >&6
50698 else
50699   if test "$cross_compiling" = yes; then :
50700          gl_cv_func_re_compile_pattern_working=no
50701 else
50702   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50703 /* end confdefs.h.  */
50704 #include <regex.h>
50705
50706             #include <locale.h>
50707             #include <limits.h>
50708             #include <string.h>
50709
50710             #if defined M_CHECK_ACTION || HAVE_DECL_ALARM
50711             # include <signal.h>
50712             # include <unistd.h>
50713             #endif
50714
50715             #if HAVE_MALLOC_H
50716             # include <malloc.h>
50717             #endif
50718
50719             #ifdef M_CHECK_ACTION
50720             /* Exit with distinguishable exit code.  */
50721             static void sigabrt_no_core (int sig) { raise (SIGTERM); }
50722             #endif
50723
50724 int
50725 main ()
50726 {
50727 int result = 0;
50728             static struct re_pattern_buffer regex;
50729             unsigned char folded_chars[UCHAR_MAX + 1];
50730             int i;
50731             const char *s;
50732             struct re_registers regs;
50733
50734             /* Some builds of glibc go into an infinite loop on this
50735                test.  Use alarm to force death, and mallopt to avoid
50736                malloc recursion in diagnosing the corrupted heap. */
50737 #if HAVE_DECL_ALARM
50738             signal (SIGALRM, SIG_DFL);
50739             alarm (2);
50740 #endif
50741 #ifdef M_CHECK_ACTION
50742             signal (SIGABRT, sigabrt_no_core);
50743             mallopt (M_CHECK_ACTION, 2);
50744 #endif
50745
50746             if (setlocale (LC_ALL, "en_US.UTF-8"))
50747               {
50748                 {
50749                   /* http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html
50750                      This test needs valgrind to catch the bug on Debian
50751                      GNU/Linux 3.1 x86, but it might catch the bug better
50752                      on other platforms and it shouldn't hurt to try the
50753                      test here.  */
50754                   static char const pat[] = "insert into";
50755                   static char const data[] =
50756                     "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK";
50757                   re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE
50758                                  | RE_ICASE);
50759                   memset (&regex, 0, sizeof regex);
50760                   s = re_compile_pattern (pat, sizeof pat - 1, &regex);
50761                   if (s)
50762                     result |= 1;
50763                   else if (re_search (&regex, data, sizeof data - 1,
50764                                       0, sizeof data - 1, &regs)
50765                            != -1)
50766                     result |= 1;
50767                 }
50768
50769                 {
50770                   /* This test is from glibc bug 15078.
50771                      The test case is from Andreas Schwab in
50772                      <http://www.sourceware.org/ml/libc-alpha/2013-01/msg00967.html>.
50773                      */
50774                   static char const pat[] = "[^x]x";
50775                   static char const data[] =
50776                     /* <U1000><U103B><U103D><U1014><U103A><U102F><U1015><U103A> */
50777                     "\xe1\x80\x80"
50778                     "\xe1\x80\xbb"
50779                     "\xe1\x80\xbd"
50780                     "\xe1\x80\x94"
50781                     "\xe1\x80\xba"
50782                     "\xe1\x80\xaf"
50783                     "\xe1\x80\x95"
50784                     "\xe1\x80\xba"
50785                     "x";
50786                   re_set_syntax (0);
50787                   memset (&regex, 0, sizeof regex);
50788                   s = re_compile_pattern (pat, sizeof pat - 1, &regex);
50789                   if (s)
50790                     result |= 1;
50791                   else
50792                     {
50793                       i = re_search (&regex, data, sizeof data - 1,
50794                                      0, sizeof data - 1, 0);
50795                       if (i != 0 && i != 21)
50796                         result |= 1;
50797                     }
50798                 }
50799
50800                 if (! setlocale (LC_ALL, "C"))
50801                   return 1;
50802               }
50803
50804             /* This test is from glibc bug 3957, reported by Andrew Mackey.  */
50805             re_set_syntax (RE_SYNTAX_EGREP | RE_HAT_LISTS_NOT_NEWLINE);
50806             memset (&regex, 0, sizeof regex);
50807             s = re_compile_pattern ("a[^x]b", 6, &regex);
50808             if (s)
50809               result |= 2;
50810             /* This should fail, but succeeds for glibc-2.5.  */
50811             else if (re_search (&regex, "a\nb", 3, 0, 3, &regs) != -1)
50812               result |= 2;
50813
50814             /* This regular expression is from Spencer ere test number 75
50815                in grep-2.3.  */
50816             re_set_syntax (RE_SYNTAX_POSIX_EGREP);
50817             memset (&regex, 0, sizeof regex);
50818             for (i = 0; i <= UCHAR_MAX; i++)
50819               folded_chars[i] = i;
50820             regex.translate = folded_chars;
50821             s = re_compile_pattern ("a[[:]:]]b\n", 11, &regex);
50822             /* This should fail with _Invalid character class name_ error.  */
50823             if (!s)
50824               result |= 4;
50825
50826             /* Ensure that [b-a] is diagnosed as invalid, when
50827                using RE_NO_EMPTY_RANGES. */
50828             re_set_syntax (RE_SYNTAX_POSIX_EGREP | RE_NO_EMPTY_RANGES);
50829             memset (&regex, 0, sizeof regex);
50830             s = re_compile_pattern ("a[b-a]", 6, &regex);
50831             if (s == 0)
50832               result |= 8;
50833
50834             /* This should succeed, but does not for glibc-2.1.3.  */
50835             memset (&regex, 0, sizeof regex);
50836             s = re_compile_pattern ("{1", 2, &regex);
50837             if (s)
50838               result |= 8;
50839
50840             /* The following example is derived from a problem report
50841                against gawk from Jorge Stolfi <stolfi@ic.unicamp.br>.  */
50842             memset (&regex, 0, sizeof regex);
50843             s = re_compile_pattern ("[an\371]*n", 7, &regex);
50844             if (s)
50845               result |= 8;
50846             /* This should match, but does not for glibc-2.2.1.  */
50847             else if (re_match (&regex, "an", 2, 0, &regs) != 2)
50848               result |= 8;
50849
50850             memset (&regex, 0, sizeof regex);
50851             s = re_compile_pattern ("x", 1, &regex);
50852             if (s)
50853               result |= 8;
50854             /* glibc-2.2.93 does not work with a negative RANGE argument.  */
50855             else if (re_search (&regex, "wxy", 3, 2, -2, &regs) != 1)
50856               result |= 8;
50857
50858             /* The version of regex.c in older versions of gnulib
50859                ignored RE_ICASE.  Detect that problem too.  */
50860             re_set_syntax (RE_SYNTAX_EMACS | RE_ICASE);
50861             memset (&regex, 0, sizeof regex);
50862             s = re_compile_pattern ("x", 1, &regex);
50863             if (s)
50864               result |= 16;
50865             else if (re_search (&regex, "WXY", 3, 0, 3, &regs) < 0)
50866               result |= 16;
50867
50868             /* Catch a bug reported by Vin Shelton in
50869                http://lists.gnu.org/archive/html/bug-coreutils/2007-06/msg00089.html
50870                */
50871             re_set_syntax (RE_SYNTAX_POSIX_BASIC
50872                            & ~RE_CONTEXT_INVALID_DUP
50873                            & ~RE_NO_EMPTY_RANGES);
50874             memset (&regex, 0, sizeof regex);
50875             s = re_compile_pattern ("[[:alnum:]_-]\\\\+$", 16, &regex);
50876             if (s)
50877               result |= 32;
50878
50879             /* REG_STARTEND was added to glibc on 2004-01-15.
50880                Reject older versions.  */
50881             if (! REG_STARTEND)
50882               result |= 64;
50883
50884 #if 0
50885             /* It would be nice to reject hosts whose regoff_t values are too
50886                narrow (including glibc on hosts with 64-bit ptrdiff_t and
50887                32-bit int), but we should wait until glibc implements this
50888                feature.  Otherwise, support for equivalence classes and
50889                multibyte collation symbols would always be broken except
50890                when compiling --without-included-regex.   */
50891             if (sizeof (regoff_t) < sizeof (ptrdiff_t)
50892                 || sizeof (regoff_t) < sizeof (ssize_t))
50893               result |= 64;
50894 #endif
50895
50896             return result;
50897
50898   ;
50899   return 0;
50900 }
50901 _ACEOF
50902 if ac_fn_c_try_run "$LINENO"; then :
50903   gl_cv_func_re_compile_pattern_working=yes
50904 else
50905   gl_cv_func_re_compile_pattern_working=no
50906 fi
50907 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
50908   conftest.$ac_objext conftest.beam conftest.$ac_ext
50909 fi
50910
50911 fi
50912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_re_compile_pattern_working" >&5
50913 $as_echo "$gl_cv_func_re_compile_pattern_working" >&6; }
50914     case $gl_cv_func_re_compile_pattern_working in #(
50915     yes) ac_use_included_regex=no;; #(
50916     no) ac_use_included_regex=yes;;
50917     esac
50918     ;;
50919   *) as_fn_error $? "Invalid value for --with-included-regex: $with_included_regex" "$LINENO" 5
50920     ;;
50921   esac
50922
50923   if test $ac_use_included_regex = yes; then
50924
50925 $as_echo "#define _REGEX_INCLUDE_LIMITS_H 1" >>confdefs.h
50926
50927
50928 $as_echo "#define _REGEX_LARGE_OFFSETS 1" >>confdefs.h
50929
50930
50931 $as_echo "#define re_syntax_options rpl_re_syntax_options" >>confdefs.h
50932
50933
50934 $as_echo "#define re_set_syntax rpl_re_set_syntax" >>confdefs.h
50935
50936
50937 $as_echo "#define re_compile_pattern rpl_re_compile_pattern" >>confdefs.h
50938
50939
50940 $as_echo "#define re_compile_fastmap rpl_re_compile_fastmap" >>confdefs.h
50941
50942
50943 $as_echo "#define re_search rpl_re_search" >>confdefs.h
50944
50945
50946 $as_echo "#define re_search_2 rpl_re_search_2" >>confdefs.h
50947
50948
50949 $as_echo "#define re_match rpl_re_match" >>confdefs.h
50950
50951
50952 $as_echo "#define re_match_2 rpl_re_match_2" >>confdefs.h
50953
50954
50955 $as_echo "#define re_set_registers rpl_re_set_registers" >>confdefs.h
50956
50957
50958 $as_echo "#define re_comp rpl_re_comp" >>confdefs.h
50959
50960
50961 $as_echo "#define re_exec rpl_re_exec" >>confdefs.h
50962
50963
50964 $as_echo "#define regcomp rpl_regcomp" >>confdefs.h
50965
50966
50967 $as_echo "#define regexec rpl_regexec" >>confdefs.h
50968
50969
50970 $as_echo "#define regerror rpl_regerror" >>confdefs.h
50971
50972
50973 $as_echo "#define regfree rpl_regfree" >>confdefs.h
50974
50975   fi
50976
50977
50978
50979
50980 # Extract the first word of "sort", so it can be a program name with args.
50981 set dummy sort; ac_word=$2
50982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
50983 $as_echo_n "checking for $ac_word... " >&6; }
50984 if ${ac_cv_path_SORT+:} false; then :
50985   $as_echo_n "(cached) " >&6
50986 else
50987   case $SORT in
50988   [\\/]* | ?:[\\/]*)
50989   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
50990   ;;
50991   *)
50992   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
50993 for as_dir in $PATH
50994 do
50995   IFS=$as_save_IFS
50996   test -z "$as_dir" && as_dir=.
50997     for ac_exec_ext in '' $ac_executable_extensions; do
50998   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
50999     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
51000     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
51001     break 2
51002   fi
51003 done
51004   done
51005 IFS=$as_save_IFS
51006
51007   test -z "$ac_cv_path_SORT" && ac_cv_path_SORT="sort"
51008   ;;
51009 esac
51010 fi
51011 SORT=$ac_cv_path_SORT
51012 if test -n "$SORT"; then
51013   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
51014 $as_echo "$SORT" >&6; }
51015 else
51016   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51017 $as_echo "no" >&6; }
51018 fi
51019
51020
51021   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $SORT supports the -z option" >&5
51022 $as_echo_n "checking if $SORT supports the -z option... " >&6; }
51023 if test "x$cross_compiling" = xyes
51024 then
51025         # We are cross-compiling, so cannot test the target's "sort".
51026         ac_sort_has_z=false
51027 else
51028     # find out if the sort command has a working -z option.
51029     if $SORT -z -c < "${srcdir:-.}/m4/order-good.bin" 2>/dev/null  >/dev/null
51030     then
51031         # sort has a -z option, but we have not yet established that
51032         # sort thinks there is more than one input line there.   We have
51033         # to make sort -c do its thing with the input lines in the wrong
51034         # order to determine that (we can't do it in one shot because
51035         # if sort returns nonzero we can't tell that it wasn't just
51036         # complaining about this unknown -z option.
51037         if $SORT -z -c < "${srcdir:-.}/m4/order-bad.bin" 2>/dev/null >/dev/null
51038         then
51039                 # sort likes -z but it doesn't seem to make \0
51040                 # a delimiter.
51041                 ac_sort_has_z=false
51042         else
51043                 ac_sort_has_z=true
51044         fi
51045     else
51046         # Doesn't like the z option.
51047         ac_sort_has_z=false
51048     fi
51049 fi
51050
51051 if test "x$cross_compiling" = xyes
51052 then
51053         { $as_echo "$as_me:${as_lineno-$LINENO}: result: assume no, since we are cross compiling" >&5
51054 $as_echo "assume no, since we are cross compiling" >&6; }
51055         SORT_SUPPORTS_Z=false
51056
51057 elif $ac_sort_has_z
51058 then
51059         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51060 $as_echo "yes" >&6; }
51061         SORT_SUPPORTS_Z=true
51062
51063 else
51064         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51065 $as_echo "no" >&6; }
51066         SORT_SUPPORTS_Z=false
51067
51068 fi
51069
51070
51071
51072 ac_fn_c_check_member "$LINENO" "struct dirent" "d_type" "ac_cv_member_struct_dirent_d_type" "
51073 #include <sys/types.h>
51074 #include <dirent.h>
51075 "
51076 if test "x$ac_cv_member_struct_dirent_d_type" = xyes; then :
51077
51078 fi
51079
51080
51081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__ ((__noreturn__)) support" >&5
51082 $as_echo_n "checking for __attribute__ ((__noreturn__)) support... " >&6; }
51083 if ${jy_cv_cc_attribute_noreturn+:} false; then :
51084   $as_echo_n "(cached) " >&6
51085 else
51086   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51087 /* end confdefs.h.  */
51088
51089 int
51090 main ()
51091 {
51092 void report_fatal_error(void) __attribute__ ((__noreturn__));
51093   ;
51094   return 0;
51095 }
51096 _ACEOF
51097 if ac_fn_c_try_compile "$LINENO"; then :
51098   jy_cv_cc_attribute_noreturn=yes
51099 else
51100   jy_cv_cc_attribute_noreturn=no
51101 fi
51102 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51103 fi
51104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $jy_cv_cc_attribute_noreturn" >&5
51105 $as_echo "$jy_cv_cc_attribute_noreturn" >&6; }
51106 if test $jy_cv_cc_attribute_noreturn = yes; then
51107   HAVE_ATTRIBUTE_NORETURN=1
51108 else
51109   HAVE_ATTRIBUTE_NORETURN=0
51110 fi
51111
51112
51113 cat >>confdefs.h <<_ACEOF
51114 #define HAVE_ATTRIBUTE_NORETURN $HAVE_ATTRIBUTE_NORETURN
51115 _ACEOF
51116
51117
51118
51119
51120   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
51121 $as_echo_n "checking whether NLS is requested... " >&6; }
51122     # Check whether --enable-nls was given.
51123 if test "${enable_nls+set}" = set; then :
51124   enableval=$enable_nls; USE_NLS=$enableval
51125 else
51126   USE_NLS=yes
51127 fi
51128
51129   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
51130 $as_echo "$USE_NLS" >&6; }
51131
51132
51133
51134
51135       GETTEXT_MACRO_VERSION=0.18
51136
51137
51138
51139
51140 # Prepare PATH_SEPARATOR.
51141 # The user is always right.
51142 if test "${PATH_SEPARATOR+set}" != set; then
51143   # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
51144   # contains only /bin. Note that ksh looks also at the FPATH variable,
51145   # so we have to set that as well for the test.
51146   PATH_SEPARATOR=:
51147   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
51148     && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
51149            || PATH_SEPARATOR=';'
51150        }
51151 fi
51152
51153 # Find out how to test for executable files. Don't use a zero-byte file,
51154 # as systems may use methods other than mode bits to determine executability.
51155 cat >conf$$.file <<_ASEOF
51156 #! /bin/sh
51157 exit 0
51158 _ASEOF
51159 chmod +x conf$$.file
51160 if test -x conf$$.file >/dev/null 2>&1; then
51161   ac_executable_p="test -x"
51162 else
51163   ac_executable_p="test -f"
51164 fi
51165 rm -f conf$$.file
51166
51167 # Extract the first word of "msgfmt", so it can be a program name with args.
51168 set dummy msgfmt; ac_word=$2
51169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
51170 $as_echo_n "checking for $ac_word... " >&6; }
51171 if ${ac_cv_path_MSGFMT+:} false; then :
51172   $as_echo_n "(cached) " >&6
51173 else
51174   case "$MSGFMT" in
51175   [\\/]* | ?:[\\/]*)
51176     ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
51177     ;;
51178   *)
51179     ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
51180     for ac_dir in $PATH; do
51181       IFS="$ac_save_IFS"
51182       test -z "$ac_dir" && ac_dir=.
51183       for ac_exec_ext in '' $ac_executable_extensions; do
51184         if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
51185           echo "$as_me: trying $ac_dir/$ac_word..." >&5
51186           if $ac_dir/$ac_word --statistics /dev/null >&5 2>&1 &&
51187      (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
51188             ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext"
51189             break 2
51190           fi
51191         fi
51192       done
51193     done
51194     IFS="$ac_save_IFS"
51195   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
51196     ;;
51197 esac
51198 fi
51199 MSGFMT="$ac_cv_path_MSGFMT"
51200 if test "$MSGFMT" != ":"; then
51201   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
51202 $as_echo "$MSGFMT" >&6; }
51203 else
51204   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51205 $as_echo "no" >&6; }
51206 fi
51207
51208   # Extract the first word of "gmsgfmt", so it can be a program name with args.
51209 set dummy gmsgfmt; ac_word=$2
51210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
51211 $as_echo_n "checking for $ac_word... " >&6; }
51212 if ${ac_cv_path_GMSGFMT+:} false; then :
51213   $as_echo_n "(cached) " >&6
51214 else
51215   case $GMSGFMT in
51216   [\\/]* | ?:[\\/]*)
51217   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
51218   ;;
51219   *)
51220   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
51221 for as_dir in $PATH
51222 do
51223   IFS=$as_save_IFS
51224   test -z "$as_dir" && as_dir=.
51225     for ac_exec_ext in '' $ac_executable_extensions; do
51226   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
51227     ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
51228     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
51229     break 2
51230   fi
51231 done
51232   done
51233 IFS=$as_save_IFS
51234
51235   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
51236   ;;
51237 esac
51238 fi
51239 GMSGFMT=$ac_cv_path_GMSGFMT
51240 if test -n "$GMSGFMT"; then
51241   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
51242 $as_echo "$GMSGFMT" >&6; }
51243 else
51244   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51245 $as_echo "no" >&6; }
51246 fi
51247
51248
51249
51250     case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
51251     '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
51252     *) MSGFMT_015=$MSGFMT ;;
51253   esac
51254
51255   case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
51256     '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
51257     *) GMSGFMT_015=$GMSGFMT ;;
51258   esac
51259
51260
51261
51262 # Prepare PATH_SEPARATOR.
51263 # The user is always right.
51264 if test "${PATH_SEPARATOR+set}" != set; then
51265   # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
51266   # contains only /bin. Note that ksh looks also at the FPATH variable,
51267   # so we have to set that as well for the test.
51268   PATH_SEPARATOR=:
51269   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
51270     && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
51271            || PATH_SEPARATOR=';'
51272        }
51273 fi
51274
51275 # Find out how to test for executable files. Don't use a zero-byte file,
51276 # as systems may use methods other than mode bits to determine executability.
51277 cat >conf$$.file <<_ASEOF
51278 #! /bin/sh
51279 exit 0
51280 _ASEOF
51281 chmod +x conf$$.file
51282 if test -x conf$$.file >/dev/null 2>&1; then
51283   ac_executable_p="test -x"
51284 else
51285   ac_executable_p="test -f"
51286 fi
51287 rm -f conf$$.file
51288
51289 # Extract the first word of "xgettext", so it can be a program name with args.
51290 set dummy xgettext; ac_word=$2
51291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
51292 $as_echo_n "checking for $ac_word... " >&6; }
51293 if ${ac_cv_path_XGETTEXT+:} false; then :
51294   $as_echo_n "(cached) " >&6
51295 else
51296   case "$XGETTEXT" in
51297   [\\/]* | ?:[\\/]*)
51298     ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
51299     ;;
51300   *)
51301     ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
51302     for ac_dir in $PATH; do
51303       IFS="$ac_save_IFS"
51304       test -z "$ac_dir" && ac_dir=.
51305       for ac_exec_ext in '' $ac_executable_extensions; do
51306         if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
51307           echo "$as_me: trying $ac_dir/$ac_word..." >&5
51308           if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&5 2>&1 &&
51309      (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
51310             ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext"
51311             break 2
51312           fi
51313         fi
51314       done
51315     done
51316     IFS="$ac_save_IFS"
51317   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
51318     ;;
51319 esac
51320 fi
51321 XGETTEXT="$ac_cv_path_XGETTEXT"
51322 if test "$XGETTEXT" != ":"; then
51323   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
51324 $as_echo "$XGETTEXT" >&6; }
51325 else
51326   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51327 $as_echo "no" >&6; }
51328 fi
51329
51330     rm -f messages.po
51331
51332     case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
51333     '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
51334     *) XGETTEXT_015=$XGETTEXT ;;
51335   esac
51336
51337
51338
51339 # Prepare PATH_SEPARATOR.
51340 # The user is always right.
51341 if test "${PATH_SEPARATOR+set}" != set; then
51342   # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
51343   # contains only /bin. Note that ksh looks also at the FPATH variable,
51344   # so we have to set that as well for the test.
51345   PATH_SEPARATOR=:
51346   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
51347     && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
51348            || PATH_SEPARATOR=';'
51349        }
51350 fi
51351
51352 # Find out how to test for executable files. Don't use a zero-byte file,
51353 # as systems may use methods other than mode bits to determine executability.
51354 cat >conf$$.file <<_ASEOF
51355 #! /bin/sh
51356 exit 0
51357 _ASEOF
51358 chmod +x conf$$.file
51359 if test -x conf$$.file >/dev/null 2>&1; then
51360   ac_executable_p="test -x"
51361 else
51362   ac_executable_p="test -f"
51363 fi
51364 rm -f conf$$.file
51365
51366 # Extract the first word of "msgmerge", so it can be a program name with args.
51367 set dummy msgmerge; ac_word=$2
51368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
51369 $as_echo_n "checking for $ac_word... " >&6; }
51370 if ${ac_cv_path_MSGMERGE+:} false; then :
51371   $as_echo_n "(cached) " >&6
51372 else
51373   case "$MSGMERGE" in
51374   [\\/]* | ?:[\\/]*)
51375     ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
51376     ;;
51377   *)
51378     ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
51379     for ac_dir in $PATH; do
51380       IFS="$ac_save_IFS"
51381       test -z "$ac_dir" && ac_dir=.
51382       for ac_exec_ext in '' $ac_executable_extensions; do
51383         if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
51384           echo "$as_me: trying $ac_dir/$ac_word..." >&5
51385           if $ac_dir/$ac_word --update -q /dev/null /dev/null >&5 2>&1; then
51386             ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext"
51387             break 2
51388           fi
51389         fi
51390       done
51391     done
51392     IFS="$ac_save_IFS"
51393   test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":"
51394     ;;
51395 esac
51396 fi
51397 MSGMERGE="$ac_cv_path_MSGMERGE"
51398 if test "$MSGMERGE" != ":"; then
51399   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
51400 $as_echo "$MSGMERGE" >&6; }
51401 else
51402   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51403 $as_echo "no" >&6; }
51404 fi
51405
51406
51407         test -n "$localedir" || localedir='${datadir}/locale'
51408
51409
51410     test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
51411
51412
51413   ac_config_commands="$ac_config_commands po-directories"
51414
51415
51416
51417
51418
51419
51420
51421
51422
51423
51424
51425
51426
51427     use_additional=yes
51428
51429   acl_save_prefix="$prefix"
51430   prefix="$acl_final_prefix"
51431   acl_save_exec_prefix="$exec_prefix"
51432   exec_prefix="$acl_final_exec_prefix"
51433
51434     eval additional_includedir=\"$includedir\"
51435     eval additional_libdir=\"$libdir\"
51436
51437   exec_prefix="$acl_save_exec_prefix"
51438   prefix="$acl_save_prefix"
51439
51440
51441 # Check whether --with-libiconv-prefix was given.
51442 if test "${with_libiconv_prefix+set}" = set; then :
51443   withval=$with_libiconv_prefix;
51444     if test "X$withval" = "Xno"; then
51445       use_additional=no
51446     else
51447       if test "X$withval" = "X"; then
51448
51449   acl_save_prefix="$prefix"
51450   prefix="$acl_final_prefix"
51451   acl_save_exec_prefix="$exec_prefix"
51452   exec_prefix="$acl_final_exec_prefix"
51453
51454           eval additional_includedir=\"$includedir\"
51455           eval additional_libdir=\"$libdir\"
51456
51457   exec_prefix="$acl_save_exec_prefix"
51458   prefix="$acl_save_prefix"
51459
51460       else
51461         additional_includedir="$withval/include"
51462         additional_libdir="$withval/$acl_libdirstem"
51463         if test "$acl_libdirstem2" != "$acl_libdirstem" \
51464            && ! test -d "$withval/$acl_libdirstem"; then
51465           additional_libdir="$withval/$acl_libdirstem2"
51466         fi
51467       fi
51468     fi
51469
51470 fi
51471
51472       LIBICONV=
51473   LTLIBICONV=
51474   INCICONV=
51475   LIBICONV_PREFIX=
51476       HAVE_LIBICONV=
51477   rpathdirs=
51478   ltrpathdirs=
51479   names_already_handled=
51480   names_next_round='iconv '
51481   while test -n "$names_next_round"; do
51482     names_this_round="$names_next_round"
51483     names_next_round=
51484     for name in $names_this_round; do
51485       already_handled=
51486       for n in $names_already_handled; do
51487         if test "$n" = "$name"; then
51488           already_handled=yes
51489           break
51490         fi
51491       done
51492       if test -z "$already_handled"; then
51493         names_already_handled="$names_already_handled $name"
51494                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
51495         eval value=\"\$HAVE_LIB$uppername\"
51496         if test -n "$value"; then
51497           if test "$value" = yes; then
51498             eval value=\"\$LIB$uppername\"
51499             test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
51500             eval value=\"\$LTLIB$uppername\"
51501             test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
51502           else
51503                                     :
51504           fi
51505         else
51506                               found_dir=
51507           found_la=
51508           found_so=
51509           found_a=
51510           eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
51511           if test -n "$acl_shlibext"; then
51512             shrext=".$acl_shlibext"             # typically: shrext=.so
51513           else
51514             shrext=
51515           fi
51516           if test $use_additional = yes; then
51517             dir="$additional_libdir"
51518                                     if test -n "$acl_shlibext"; then
51519               if test -f "$dir/$libname$shrext"; then
51520                 found_dir="$dir"
51521                 found_so="$dir/$libname$shrext"
51522               else
51523                 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
51524                   ver=`(cd "$dir" && \
51525                         for f in "$libname$shrext".*; do echo "$f"; done \
51526                         | sed -e "s,^$libname$shrext\\\\.,," \
51527                         | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
51528                         | sed 1q ) 2>/dev/null`
51529                   if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
51530                     found_dir="$dir"
51531                     found_so="$dir/$libname$shrext.$ver"
51532                   fi
51533                 else
51534                   eval library_names=\"$acl_library_names_spec\"
51535                   for f in $library_names; do
51536                     if test -f "$dir/$f"; then
51537                       found_dir="$dir"
51538                       found_so="$dir/$f"
51539                       break
51540                     fi
51541                   done
51542                 fi
51543               fi
51544             fi
51545                         if test "X$found_dir" = "X"; then
51546               if test -f "$dir/$libname.$acl_libext"; then
51547                 found_dir="$dir"
51548                 found_a="$dir/$libname.$acl_libext"
51549               fi
51550             fi
51551             if test "X$found_dir" != "X"; then
51552               if test -f "$dir/$libname.la"; then
51553                 found_la="$dir/$libname.la"
51554               fi
51555             fi
51556           fi
51557           if test "X$found_dir" = "X"; then
51558             for x in $LDFLAGS $LTLIBICONV; do
51559
51560   acl_save_prefix="$prefix"
51561   prefix="$acl_final_prefix"
51562   acl_save_exec_prefix="$exec_prefix"
51563   exec_prefix="$acl_final_exec_prefix"
51564   eval x=\"$x\"
51565   exec_prefix="$acl_save_exec_prefix"
51566   prefix="$acl_save_prefix"
51567
51568               case "$x" in
51569                 -L*)
51570                   dir=`echo "X$x" | sed -e 's/^X-L//'`
51571                                     if test -n "$acl_shlibext"; then
51572                     if test -f "$dir/$libname$shrext"; then
51573                       found_dir="$dir"
51574                       found_so="$dir/$libname$shrext"
51575                     else
51576                       if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
51577                         ver=`(cd "$dir" && \
51578                               for f in "$libname$shrext".*; do echo "$f"; done \
51579                               | sed -e "s,^$libname$shrext\\\\.,," \
51580                               | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
51581                               | sed 1q ) 2>/dev/null`
51582                         if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
51583                           found_dir="$dir"
51584                           found_so="$dir/$libname$shrext.$ver"
51585                         fi
51586                       else
51587                         eval library_names=\"$acl_library_names_spec\"
51588                         for f in $library_names; do
51589                           if test -f "$dir/$f"; then
51590                             found_dir="$dir"
51591                             found_so="$dir/$f"
51592                             break
51593                           fi
51594                         done
51595                       fi
51596                     fi
51597                   fi
51598                                     if test "X$found_dir" = "X"; then
51599                     if test -f "$dir/$libname.$acl_libext"; then
51600                       found_dir="$dir"
51601                       found_a="$dir/$libname.$acl_libext"
51602                     fi
51603                   fi
51604                   if test "X$found_dir" != "X"; then
51605                     if test -f "$dir/$libname.la"; then
51606                       found_la="$dir/$libname.la"
51607                     fi
51608                   fi
51609                   ;;
51610               esac
51611               if test "X$found_dir" != "X"; then
51612                 break
51613               fi
51614             done
51615           fi
51616           if test "X$found_dir" != "X"; then
51617                         LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
51618             if test "X$found_so" != "X"; then
51619                                                         if test "$enable_rpath" = no \
51620                  || test "X$found_dir" = "X/usr/$acl_libdirstem" \
51621                  || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
51622                                 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
51623               else
51624                                                                                 haveit=
51625                 for x in $ltrpathdirs; do
51626                   if test "X$x" = "X$found_dir"; then
51627                     haveit=yes
51628                     break
51629                   fi
51630                 done
51631                 if test -z "$haveit"; then
51632                   ltrpathdirs="$ltrpathdirs $found_dir"
51633                 fi
51634                                 if test "$acl_hardcode_direct" = yes; then
51635                                                       LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
51636                 else
51637                   if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
51638                                                             LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
51639                                                             haveit=
51640                     for x in $rpathdirs; do
51641                       if test "X$x" = "X$found_dir"; then
51642                         haveit=yes
51643                         break
51644                       fi
51645                     done
51646                     if test -z "$haveit"; then
51647                       rpathdirs="$rpathdirs $found_dir"
51648                     fi
51649                   else
51650                                                                                 haveit=
51651                     for x in $LDFLAGS $LIBICONV; do
51652
51653   acl_save_prefix="$prefix"
51654   prefix="$acl_final_prefix"
51655   acl_save_exec_prefix="$exec_prefix"
51656   exec_prefix="$acl_final_exec_prefix"
51657   eval x=\"$x\"
51658   exec_prefix="$acl_save_exec_prefix"
51659   prefix="$acl_save_prefix"
51660
51661                       if test "X$x" = "X-L$found_dir"; then
51662                         haveit=yes
51663                         break
51664                       fi
51665                     done
51666                     if test -z "$haveit"; then
51667                       LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
51668                     fi
51669                     if test "$acl_hardcode_minus_L" != no; then
51670                                                                                         LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
51671                     else
51672                                                                                                                                                                                 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
51673                     fi
51674                   fi
51675                 fi
51676               fi
51677             else
51678               if test "X$found_a" != "X"; then
51679                                 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
51680               else
51681                                                 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
51682               fi
51683             fi
51684                         additional_includedir=
51685             case "$found_dir" in
51686               */$acl_libdirstem | */$acl_libdirstem/)
51687                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
51688                 if test "$name" = 'iconv'; then
51689                   LIBICONV_PREFIX="$basedir"
51690                 fi
51691                 additional_includedir="$basedir/include"
51692                 ;;
51693               */$acl_libdirstem2 | */$acl_libdirstem2/)
51694                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
51695                 if test "$name" = 'iconv'; then
51696                   LIBICONV_PREFIX="$basedir"
51697                 fi
51698                 additional_includedir="$basedir/include"
51699                 ;;
51700             esac
51701             if test "X$additional_includedir" != "X"; then
51702                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
51703                 haveit=
51704                 if test "X$additional_includedir" = "X/usr/local/include"; then
51705                   if test -n "$GCC"; then
51706                     case $host_os in
51707                       linux* | gnu* | k*bsd*-gnu) haveit=yes;;
51708                     esac
51709                   fi
51710                 fi
51711                 if test -z "$haveit"; then
51712                   for x in $CPPFLAGS $INCICONV; do
51713
51714   acl_save_prefix="$prefix"
51715   prefix="$acl_final_prefix"
51716   acl_save_exec_prefix="$exec_prefix"
51717   exec_prefix="$acl_final_exec_prefix"
51718   eval x=\"$x\"
51719   exec_prefix="$acl_save_exec_prefix"
51720   prefix="$acl_save_prefix"
51721
51722                     if test "X$x" = "X-I$additional_includedir"; then
51723                       haveit=yes
51724                       break
51725                     fi
51726                   done
51727                   if test -z "$haveit"; then
51728                     if test -d "$additional_includedir"; then
51729                                             INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
51730                     fi
51731                   fi
51732                 fi
51733               fi
51734             fi
51735                         if test -n "$found_la"; then
51736                                                         save_libdir="$libdir"
51737               case "$found_la" in
51738                 */* | *\\*) . "$found_la" ;;
51739                 *) . "./$found_la" ;;
51740               esac
51741               libdir="$save_libdir"
51742                             for dep in $dependency_libs; do
51743                 case "$dep" in
51744                   -L*)
51745                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
51746                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
51747                        && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
51748                       haveit=
51749                       if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
51750                          || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
51751                         if test -n "$GCC"; then
51752                           case $host_os in
51753                             linux* | gnu* | k*bsd*-gnu) haveit=yes;;
51754                           esac
51755                         fi
51756                       fi
51757                       if test -z "$haveit"; then
51758                         haveit=
51759                         for x in $LDFLAGS $LIBICONV; do
51760
51761   acl_save_prefix="$prefix"
51762   prefix="$acl_final_prefix"
51763   acl_save_exec_prefix="$exec_prefix"
51764   exec_prefix="$acl_final_exec_prefix"
51765   eval x=\"$x\"
51766   exec_prefix="$acl_save_exec_prefix"
51767   prefix="$acl_save_prefix"
51768
51769                           if test "X$x" = "X-L$additional_libdir"; then
51770                             haveit=yes
51771                             break
51772                           fi
51773                         done
51774                         if test -z "$haveit"; then
51775                           if test -d "$additional_libdir"; then
51776                                                         LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
51777                           fi
51778                         fi
51779                         haveit=
51780                         for x in $LDFLAGS $LTLIBICONV; do
51781
51782   acl_save_prefix="$prefix"
51783   prefix="$acl_final_prefix"
51784   acl_save_exec_prefix="$exec_prefix"
51785   exec_prefix="$acl_final_exec_prefix"
51786   eval x=\"$x\"
51787   exec_prefix="$acl_save_exec_prefix"
51788   prefix="$acl_save_prefix"
51789
51790                           if test "X$x" = "X-L$additional_libdir"; then
51791                             haveit=yes
51792                             break
51793                           fi
51794                         done
51795                         if test -z "$haveit"; then
51796                           if test -d "$additional_libdir"; then
51797                                                         LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
51798                           fi
51799                         fi
51800                       fi
51801                     fi
51802                     ;;
51803                   -R*)
51804                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
51805                     if test "$enable_rpath" != no; then
51806                                                                   haveit=
51807                       for x in $rpathdirs; do
51808                         if test "X$x" = "X$dir"; then
51809                           haveit=yes
51810                           break
51811                         fi
51812                       done
51813                       if test -z "$haveit"; then
51814                         rpathdirs="$rpathdirs $dir"
51815                       fi
51816                                                                   haveit=
51817                       for x in $ltrpathdirs; do
51818                         if test "X$x" = "X$dir"; then
51819                           haveit=yes
51820                           break
51821                         fi
51822                       done
51823                       if test -z "$haveit"; then
51824                         ltrpathdirs="$ltrpathdirs $dir"
51825                       fi
51826                     fi
51827                     ;;
51828                   -l*)
51829                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
51830                     ;;
51831                   *.la)
51832                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
51833                     ;;
51834                   *)
51835                                         LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
51836                     LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
51837                     ;;
51838                 esac
51839               done
51840             fi
51841           else
51842                                                             LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
51843             LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
51844           fi
51845         fi
51846       fi
51847     done
51848   done
51849   if test "X$rpathdirs" != "X"; then
51850     if test -n "$acl_hardcode_libdir_separator"; then
51851                         alldirs=
51852       for found_dir in $rpathdirs; do
51853         alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
51854       done
51855             acl_save_libdir="$libdir"
51856       libdir="$alldirs"
51857       eval flag=\"$acl_hardcode_libdir_flag_spec\"
51858       libdir="$acl_save_libdir"
51859       LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
51860     else
51861             for found_dir in $rpathdirs; do
51862         acl_save_libdir="$libdir"
51863         libdir="$found_dir"
51864         eval flag=\"$acl_hardcode_libdir_flag_spec\"
51865         libdir="$acl_save_libdir"
51866         LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
51867       done
51868     fi
51869   fi
51870   if test "X$ltrpathdirs" != "X"; then
51871             for found_dir in $ltrpathdirs; do
51872       LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
51873     done
51874   fi
51875
51876
51877
51878
51879
51880
51881
51882
51883
51884
51885
51886
51887
51888
51889
51890
51891
51892
51893
51894
51895
51896
51897
51898
51899
51900
51901
51902
51903
51904
51905
51906     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5
51907 $as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; }
51908 if ${gt_cv_func_CFPreferencesCopyAppValue+:} false; then :
51909   $as_echo_n "(cached) " >&6
51910 else
51911   gt_save_LIBS="$LIBS"
51912      LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
51913      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51914 /* end confdefs.h.  */
51915 #include <CoreFoundation/CFPreferences.h>
51916 int
51917 main ()
51918 {
51919 CFPreferencesCopyAppValue(NULL, NULL)
51920   ;
51921   return 0;
51922 }
51923 _ACEOF
51924 if ac_fn_c_try_link "$LINENO"; then :
51925   gt_cv_func_CFPreferencesCopyAppValue=yes
51926 else
51927   gt_cv_func_CFPreferencesCopyAppValue=no
51928 fi
51929 rm -f core conftest.err conftest.$ac_objext \
51930     conftest$ac_exeext conftest.$ac_ext
51931      LIBS="$gt_save_LIBS"
51932 fi
51933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5
51934 $as_echo "$gt_cv_func_CFPreferencesCopyAppValue" >&6; }
51935   if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
51936
51937 $as_echo "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h
51938
51939   fi
51940     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5
51941 $as_echo_n "checking for CFLocaleCopyCurrent... " >&6; }
51942 if ${gt_cv_func_CFLocaleCopyCurrent+:} false; then :
51943   $as_echo_n "(cached) " >&6
51944 else
51945   gt_save_LIBS="$LIBS"
51946      LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
51947      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51948 /* end confdefs.h.  */
51949 #include <CoreFoundation/CFLocale.h>
51950 int
51951 main ()
51952 {
51953 CFLocaleCopyCurrent();
51954   ;
51955   return 0;
51956 }
51957 _ACEOF
51958 if ac_fn_c_try_link "$LINENO"; then :
51959   gt_cv_func_CFLocaleCopyCurrent=yes
51960 else
51961   gt_cv_func_CFLocaleCopyCurrent=no
51962 fi
51963 rm -f core conftest.err conftest.$ac_objext \
51964     conftest$ac_exeext conftest.$ac_ext
51965      LIBS="$gt_save_LIBS"
51966 fi
51967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5
51968 $as_echo "$gt_cv_func_CFLocaleCopyCurrent" >&6; }
51969   if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
51970
51971 $as_echo "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h
51972
51973   fi
51974   INTL_MACOSX_LIBS=
51975   if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
51976     INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
51977   fi
51978
51979
51980
51981
51982
51983
51984   LIBINTL=
51985   LTLIBINTL=
51986   POSUB=
51987
51988     case " $gt_needs " in
51989     *" need-formatstring-macros "*) gt_api_version=3 ;;
51990     *" need-ngettext "*) gt_api_version=2 ;;
51991     *) gt_api_version=1 ;;
51992   esac
51993   gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
51994   gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
51995
51996     if test "$USE_NLS" = "yes"; then
51997     gt_use_preinstalled_gnugettext=no
51998
51999
52000         if test $gt_api_version -ge 3; then
52001           gt_revision_test_code='
52002 #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
52003 #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
52004 #endif
52005 typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
52006 '
52007         else
52008           gt_revision_test_code=
52009         fi
52010         if test $gt_api_version -ge 2; then
52011           gt_expression_test_code=' + * ngettext ("", "", 0)'
52012         else
52013           gt_expression_test_code=
52014         fi
52015
52016         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5
52017 $as_echo_n "checking for GNU gettext in libc... " >&6; }
52018 if eval \${$gt_func_gnugettext_libc+:} false; then :
52019   $as_echo_n "(cached) " >&6
52020 else
52021   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52022 /* end confdefs.h.  */
52023
52024 #include <libintl.h>
52025 $gt_revision_test_code
52026 extern int _nl_msg_cat_cntr;
52027 extern int *_nl_domain_bindings;
52028
52029 int
52030 main ()
52031 {
52032
52033 bindtextdomain ("", "");
52034 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings
52035
52036   ;
52037   return 0;
52038 }
52039 _ACEOF
52040 if ac_fn_c_try_link "$LINENO"; then :
52041   eval "$gt_func_gnugettext_libc=yes"
52042 else
52043   eval "$gt_func_gnugettext_libc=no"
52044 fi
52045 rm -f core conftest.err conftest.$ac_objext \
52046     conftest$ac_exeext conftest.$ac_ext
52047 fi
52048 eval ac_res=\$$gt_func_gnugettext_libc
52049                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
52050 $as_echo "$ac_res" >&6; }
52051
52052         if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
52053
52054
52055
52056
52057
52058           am_save_CPPFLAGS="$CPPFLAGS"
52059
52060   for element in $INCICONV; do
52061     haveit=
52062     for x in $CPPFLAGS; do
52063
52064   acl_save_prefix="$prefix"
52065   prefix="$acl_final_prefix"
52066   acl_save_exec_prefix="$exec_prefix"
52067   exec_prefix="$acl_final_exec_prefix"
52068   eval x=\"$x\"
52069   exec_prefix="$acl_save_exec_prefix"
52070   prefix="$acl_save_prefix"
52071
52072       if test "X$x" = "X$element"; then
52073         haveit=yes
52074         break
52075       fi
52076     done
52077     if test -z "$haveit"; then
52078       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
52079     fi
52080   done
52081
52082
52083   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
52084 $as_echo_n "checking for iconv... " >&6; }
52085 if ${am_cv_func_iconv+:} false; then :
52086   $as_echo_n "(cached) " >&6
52087 else
52088
52089     am_cv_func_iconv="no, consider installing GNU libiconv"
52090     am_cv_lib_iconv=no
52091     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52092 /* end confdefs.h.  */
52093
52094 #include <stdlib.h>
52095 #include <iconv.h>
52096
52097 int
52098 main ()
52099 {
52100 iconv_t cd = iconv_open("","");
52101            iconv(cd,NULL,NULL,NULL,NULL);
52102            iconv_close(cd);
52103   ;
52104   return 0;
52105 }
52106 _ACEOF
52107 if ac_fn_c_try_link "$LINENO"; then :
52108   am_cv_func_iconv=yes
52109 fi
52110 rm -f core conftest.err conftest.$ac_objext \
52111     conftest$ac_exeext conftest.$ac_ext
52112     if test "$am_cv_func_iconv" != yes; then
52113       am_save_LIBS="$LIBS"
52114       LIBS="$LIBS $LIBICONV"
52115       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52116 /* end confdefs.h.  */
52117
52118 #include <stdlib.h>
52119 #include <iconv.h>
52120
52121 int
52122 main ()
52123 {
52124 iconv_t cd = iconv_open("","");
52125              iconv(cd,NULL,NULL,NULL,NULL);
52126              iconv_close(cd);
52127   ;
52128   return 0;
52129 }
52130 _ACEOF
52131 if ac_fn_c_try_link "$LINENO"; then :
52132   am_cv_lib_iconv=yes
52133         am_cv_func_iconv=yes
52134 fi
52135 rm -f core conftest.err conftest.$ac_objext \
52136     conftest$ac_exeext conftest.$ac_ext
52137       LIBS="$am_save_LIBS"
52138     fi
52139
52140 fi
52141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
52142 $as_echo "$am_cv_func_iconv" >&6; }
52143   if test "$am_cv_func_iconv" = yes; then
52144     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
52145 $as_echo_n "checking for working iconv... " >&6; }
52146 if ${am_cv_func_iconv_works+:} false; then :
52147   $as_echo_n "(cached) " >&6
52148 else
52149
52150                   am_save_LIBS="$LIBS"
52151       if test $am_cv_lib_iconv = yes; then
52152         LIBS="$LIBS $LIBICONV"
52153       fi
52154       if test "$cross_compiling" = yes; then :
52155
52156          case "$host_os" in
52157            aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
52158            *)            am_cv_func_iconv_works="guessing yes" ;;
52159          esac
52160
52161 else
52162   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52163 /* end confdefs.h.  */
52164
52165 #include <iconv.h>
52166 #include <string.h>
52167 int main ()
52168 {
52169   int result = 0;
52170   /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
52171      returns.  */
52172   {
52173     iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
52174     if (cd_utf8_to_88591 != (iconv_t)(-1))
52175       {
52176         static const char input[] = "\342\202\254"; /* EURO SIGN */
52177         char buf[10];
52178         const char *inptr = input;
52179         size_t inbytesleft = strlen (input);
52180         char *outptr = buf;
52181         size_t outbytesleft = sizeof (buf);
52182         size_t res = iconv (cd_utf8_to_88591,
52183                             (char **) &inptr, &inbytesleft,
52184                             &outptr, &outbytesleft);
52185         if (res == 0)
52186           result |= 1;
52187         iconv_close (cd_utf8_to_88591);
52188       }
52189   }
52190   /* Test against Solaris 10 bug: Failures are not distinguishable from
52191      successful returns.  */
52192   {
52193     iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
52194     if (cd_ascii_to_88591 != (iconv_t)(-1))
52195       {
52196         static const char input[] = "\263";
52197         char buf[10];
52198         const char *inptr = input;
52199         size_t inbytesleft = strlen (input);
52200         char *outptr = buf;
52201         size_t outbytesleft = sizeof (buf);
52202         size_t res = iconv (cd_ascii_to_88591,
52203                             (char **) &inptr, &inbytesleft,
52204                             &outptr, &outbytesleft);
52205         if (res == 0)
52206           result |= 2;
52207         iconv_close (cd_ascii_to_88591);
52208       }
52209   }
52210   /* Test against AIX 6.1..7.1 bug: Buffer overrun.  */
52211   {
52212     iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
52213     if (cd_88591_to_utf8 != (iconv_t)(-1))
52214       {
52215         static const char input[] = "\304";
52216         static char buf[2] = { (char)0xDE, (char)0xAD };
52217         const char *inptr = input;
52218         size_t inbytesleft = 1;
52219         char *outptr = buf;
52220         size_t outbytesleft = 1;
52221         size_t res = iconv (cd_88591_to_utf8,
52222                             (char **) &inptr, &inbytesleft,
52223                             &outptr, &outbytesleft);
52224         if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
52225           result |= 4;
52226         iconv_close (cd_88591_to_utf8);
52227       }
52228   }
52229 #if 0 /* This bug could be worked around by the caller.  */
52230   /* Test against HP-UX 11.11 bug: Positive return value instead of 0.  */
52231   {
52232     iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
52233     if (cd_88591_to_utf8 != (iconv_t)(-1))
52234       {
52235         static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
52236         char buf[50];
52237         const char *inptr = input;
52238         size_t inbytesleft = strlen (input);
52239         char *outptr = buf;
52240         size_t outbytesleft = sizeof (buf);
52241         size_t res = iconv (cd_88591_to_utf8,
52242                             (char **) &inptr, &inbytesleft,
52243                             &outptr, &outbytesleft);
52244         if ((int)res > 0)
52245           result |= 8;
52246         iconv_close (cd_88591_to_utf8);
52247       }
52248   }
52249 #endif
52250   /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
52251      provided.  */
52252   if (/* Try standardized names.  */
52253       iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
52254       /* Try IRIX, OSF/1 names.  */
52255       && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
52256       /* Try AIX names.  */
52257       && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
52258       /* Try HP-UX names.  */
52259       && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
52260     result |= 16;
52261   return result;
52262 }
52263 _ACEOF
52264 if ac_fn_c_try_run "$LINENO"; then :
52265   am_cv_func_iconv_works=yes
52266 else
52267   am_cv_func_iconv_works=no
52268 fi
52269 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
52270   conftest.$ac_objext conftest.beam conftest.$ac_ext
52271 fi
52272
52273       LIBS="$am_save_LIBS"
52274
52275 fi
52276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
52277 $as_echo "$am_cv_func_iconv_works" >&6; }
52278     case "$am_cv_func_iconv_works" in
52279       *no) am_func_iconv=no am_cv_lib_iconv=no ;;
52280       *)   am_func_iconv=yes ;;
52281     esac
52282   else
52283     am_func_iconv=no am_cv_lib_iconv=no
52284   fi
52285   if test "$am_func_iconv" = yes; then
52286
52287 $as_echo "#define HAVE_ICONV 1" >>confdefs.h
52288
52289   fi
52290   if test "$am_cv_lib_iconv" = yes; then
52291     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
52292 $as_echo_n "checking how to link with libiconv... " >&6; }
52293     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
52294 $as_echo "$LIBICONV" >&6; }
52295   else
52296             CPPFLAGS="$am_save_CPPFLAGS"
52297     LIBICONV=
52298     LTLIBICONV=
52299   fi
52300
52301
52302
52303
52304
52305
52306
52307
52308
52309
52310
52311     use_additional=yes
52312
52313   acl_save_prefix="$prefix"
52314   prefix="$acl_final_prefix"
52315   acl_save_exec_prefix="$exec_prefix"
52316   exec_prefix="$acl_final_exec_prefix"
52317
52318     eval additional_includedir=\"$includedir\"
52319     eval additional_libdir=\"$libdir\"
52320
52321   exec_prefix="$acl_save_exec_prefix"
52322   prefix="$acl_save_prefix"
52323
52324
52325 # Check whether --with-libintl-prefix was given.
52326 if test "${with_libintl_prefix+set}" = set; then :
52327   withval=$with_libintl_prefix;
52328     if test "X$withval" = "Xno"; then
52329       use_additional=no
52330     else
52331       if test "X$withval" = "X"; then
52332
52333   acl_save_prefix="$prefix"
52334   prefix="$acl_final_prefix"
52335   acl_save_exec_prefix="$exec_prefix"
52336   exec_prefix="$acl_final_exec_prefix"
52337
52338           eval additional_includedir=\"$includedir\"
52339           eval additional_libdir=\"$libdir\"
52340
52341   exec_prefix="$acl_save_exec_prefix"
52342   prefix="$acl_save_prefix"
52343
52344       else
52345         additional_includedir="$withval/include"
52346         additional_libdir="$withval/$acl_libdirstem"
52347         if test "$acl_libdirstem2" != "$acl_libdirstem" \
52348            && ! test -d "$withval/$acl_libdirstem"; then
52349           additional_libdir="$withval/$acl_libdirstem2"
52350         fi
52351       fi
52352     fi
52353
52354 fi
52355
52356       LIBINTL=
52357   LTLIBINTL=
52358   INCINTL=
52359   LIBINTL_PREFIX=
52360       HAVE_LIBINTL=
52361   rpathdirs=
52362   ltrpathdirs=
52363   names_already_handled=
52364   names_next_round='intl '
52365   while test -n "$names_next_round"; do
52366     names_this_round="$names_next_round"
52367     names_next_round=
52368     for name in $names_this_round; do
52369       already_handled=
52370       for n in $names_already_handled; do
52371         if test "$n" = "$name"; then
52372           already_handled=yes
52373           break
52374         fi
52375       done
52376       if test -z "$already_handled"; then
52377         names_already_handled="$names_already_handled $name"
52378                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
52379         eval value=\"\$HAVE_LIB$uppername\"
52380         if test -n "$value"; then
52381           if test "$value" = yes; then
52382             eval value=\"\$LIB$uppername\"
52383             test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value"
52384             eval value=\"\$LTLIB$uppername\"
52385             test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value"
52386           else
52387                                     :
52388           fi
52389         else
52390                               found_dir=
52391           found_la=
52392           found_so=
52393           found_a=
52394           eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
52395           if test -n "$acl_shlibext"; then
52396             shrext=".$acl_shlibext"             # typically: shrext=.so
52397           else
52398             shrext=
52399           fi
52400           if test $use_additional = yes; then
52401             dir="$additional_libdir"
52402                                     if test -n "$acl_shlibext"; then
52403               if test -f "$dir/$libname$shrext"; then
52404                 found_dir="$dir"
52405                 found_so="$dir/$libname$shrext"
52406               else
52407                 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
52408                   ver=`(cd "$dir" && \
52409                         for f in "$libname$shrext".*; do echo "$f"; done \
52410                         | sed -e "s,^$libname$shrext\\\\.,," \
52411                         | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
52412                         | sed 1q ) 2>/dev/null`
52413                   if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
52414                     found_dir="$dir"
52415                     found_so="$dir/$libname$shrext.$ver"
52416                   fi
52417                 else
52418                   eval library_names=\"$acl_library_names_spec\"
52419                   for f in $library_names; do
52420                     if test -f "$dir/$f"; then
52421                       found_dir="$dir"
52422                       found_so="$dir/$f"
52423                       break
52424                     fi
52425                   done
52426                 fi
52427               fi
52428             fi
52429                         if test "X$found_dir" = "X"; then
52430               if test -f "$dir/$libname.$acl_libext"; then
52431                 found_dir="$dir"
52432                 found_a="$dir/$libname.$acl_libext"
52433               fi
52434             fi
52435             if test "X$found_dir" != "X"; then
52436               if test -f "$dir/$libname.la"; then
52437                 found_la="$dir/$libname.la"
52438               fi
52439             fi
52440           fi
52441           if test "X$found_dir" = "X"; then
52442             for x in $LDFLAGS $LTLIBINTL; do
52443
52444   acl_save_prefix="$prefix"
52445   prefix="$acl_final_prefix"
52446   acl_save_exec_prefix="$exec_prefix"
52447   exec_prefix="$acl_final_exec_prefix"
52448   eval x=\"$x\"
52449   exec_prefix="$acl_save_exec_prefix"
52450   prefix="$acl_save_prefix"
52451
52452               case "$x" in
52453                 -L*)
52454                   dir=`echo "X$x" | sed -e 's/^X-L//'`
52455                                     if test -n "$acl_shlibext"; then
52456                     if test -f "$dir/$libname$shrext"; then
52457                       found_dir="$dir"
52458                       found_so="$dir/$libname$shrext"
52459                     else
52460                       if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
52461                         ver=`(cd "$dir" && \
52462                               for f in "$libname$shrext".*; do echo "$f"; done \
52463                               | sed -e "s,^$libname$shrext\\\\.,," \
52464                               | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
52465                               | sed 1q ) 2>/dev/null`
52466                         if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
52467                           found_dir="$dir"
52468                           found_so="$dir/$libname$shrext.$ver"
52469                         fi
52470                       else
52471                         eval library_names=\"$acl_library_names_spec\"
52472                         for f in $library_names; do
52473                           if test -f "$dir/$f"; then
52474                             found_dir="$dir"
52475                             found_so="$dir/$f"
52476                             break
52477                           fi
52478                         done
52479                       fi
52480                     fi
52481                   fi
52482                                     if test "X$found_dir" = "X"; then
52483                     if test -f "$dir/$libname.$acl_libext"; then
52484                       found_dir="$dir"
52485                       found_a="$dir/$libname.$acl_libext"
52486                     fi
52487                   fi
52488                   if test "X$found_dir" != "X"; then
52489                     if test -f "$dir/$libname.la"; then
52490                       found_la="$dir/$libname.la"
52491                     fi
52492                   fi
52493                   ;;
52494               esac
52495               if test "X$found_dir" != "X"; then
52496                 break
52497               fi
52498             done
52499           fi
52500           if test "X$found_dir" != "X"; then
52501                         LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name"
52502             if test "X$found_so" != "X"; then
52503                                                         if test "$enable_rpath" = no \
52504                  || test "X$found_dir" = "X/usr/$acl_libdirstem" \
52505                  || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
52506                                 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
52507               else
52508                                                                                 haveit=
52509                 for x in $ltrpathdirs; do
52510                   if test "X$x" = "X$found_dir"; then
52511                     haveit=yes
52512                     break
52513                   fi
52514                 done
52515                 if test -z "$haveit"; then
52516                   ltrpathdirs="$ltrpathdirs $found_dir"
52517                 fi
52518                                 if test "$acl_hardcode_direct" = yes; then
52519                                                       LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
52520                 else
52521                   if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
52522                                                             LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
52523                                                             haveit=
52524                     for x in $rpathdirs; do
52525                       if test "X$x" = "X$found_dir"; then
52526                         haveit=yes
52527                         break
52528                       fi
52529                     done
52530                     if test -z "$haveit"; then
52531                       rpathdirs="$rpathdirs $found_dir"
52532                     fi
52533                   else
52534                                                                                 haveit=
52535                     for x in $LDFLAGS $LIBINTL; do
52536
52537   acl_save_prefix="$prefix"
52538   prefix="$acl_final_prefix"
52539   acl_save_exec_prefix="$exec_prefix"
52540   exec_prefix="$acl_final_exec_prefix"
52541   eval x=\"$x\"
52542   exec_prefix="$acl_save_exec_prefix"
52543   prefix="$acl_save_prefix"
52544
52545                       if test "X$x" = "X-L$found_dir"; then
52546                         haveit=yes
52547                         break
52548                       fi
52549                     done
52550                     if test -z "$haveit"; then
52551                       LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir"
52552                     fi
52553                     if test "$acl_hardcode_minus_L" != no; then
52554                                                                                         LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
52555                     else
52556                                                                                                                                                                                 LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
52557                     fi
52558                   fi
52559                 fi
52560               fi
52561             else
52562               if test "X$found_a" != "X"; then
52563                                 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a"
52564               else
52565                                                 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name"
52566               fi
52567             fi
52568                         additional_includedir=
52569             case "$found_dir" in
52570               */$acl_libdirstem | */$acl_libdirstem/)
52571                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
52572                 if test "$name" = 'intl'; then
52573                   LIBINTL_PREFIX="$basedir"
52574                 fi
52575                 additional_includedir="$basedir/include"
52576                 ;;
52577               */$acl_libdirstem2 | */$acl_libdirstem2/)
52578                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
52579                 if test "$name" = 'intl'; then
52580                   LIBINTL_PREFIX="$basedir"
52581                 fi
52582                 additional_includedir="$basedir/include"
52583                 ;;
52584             esac
52585             if test "X$additional_includedir" != "X"; then
52586                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
52587                 haveit=
52588                 if test "X$additional_includedir" = "X/usr/local/include"; then
52589                   if test -n "$GCC"; then
52590                     case $host_os in
52591                       linux* | gnu* | k*bsd*-gnu) haveit=yes;;
52592                     esac
52593                   fi
52594                 fi
52595                 if test -z "$haveit"; then
52596                   for x in $CPPFLAGS $INCINTL; do
52597
52598   acl_save_prefix="$prefix"
52599   prefix="$acl_final_prefix"
52600   acl_save_exec_prefix="$exec_prefix"
52601   exec_prefix="$acl_final_exec_prefix"
52602   eval x=\"$x\"
52603   exec_prefix="$acl_save_exec_prefix"
52604   prefix="$acl_save_prefix"
52605
52606                     if test "X$x" = "X-I$additional_includedir"; then
52607                       haveit=yes
52608                       break
52609                     fi
52610                   done
52611                   if test -z "$haveit"; then
52612                     if test -d "$additional_includedir"; then
52613                                             INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir"
52614                     fi
52615                   fi
52616                 fi
52617               fi
52618             fi
52619                         if test -n "$found_la"; then
52620                                                         save_libdir="$libdir"
52621               case "$found_la" in
52622                 */* | *\\*) . "$found_la" ;;
52623                 *) . "./$found_la" ;;
52624               esac
52625               libdir="$save_libdir"
52626                             for dep in $dependency_libs; do
52627                 case "$dep" in
52628                   -L*)
52629                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
52630                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
52631                        && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
52632                       haveit=
52633                       if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
52634                          || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
52635                         if test -n "$GCC"; then
52636                           case $host_os in
52637                             linux* | gnu* | k*bsd*-gnu) haveit=yes;;
52638                           esac
52639                         fi
52640                       fi
52641                       if test -z "$haveit"; then
52642                         haveit=
52643                         for x in $LDFLAGS $LIBINTL; do
52644
52645   acl_save_prefix="$prefix"
52646   prefix="$acl_final_prefix"
52647   acl_save_exec_prefix="$exec_prefix"
52648   exec_prefix="$acl_final_exec_prefix"
52649   eval x=\"$x\"
52650   exec_prefix="$acl_save_exec_prefix"
52651   prefix="$acl_save_prefix"
52652
52653                           if test "X$x" = "X-L$additional_libdir"; then
52654                             haveit=yes
52655                             break
52656                           fi
52657                         done
52658                         if test -z "$haveit"; then
52659                           if test -d "$additional_libdir"; then
52660                                                         LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir"
52661                           fi
52662                         fi
52663                         haveit=
52664                         for x in $LDFLAGS $LTLIBINTL; do
52665
52666   acl_save_prefix="$prefix"
52667   prefix="$acl_final_prefix"
52668   acl_save_exec_prefix="$exec_prefix"
52669   exec_prefix="$acl_final_exec_prefix"
52670   eval x=\"$x\"
52671   exec_prefix="$acl_save_exec_prefix"
52672   prefix="$acl_save_prefix"
52673
52674                           if test "X$x" = "X-L$additional_libdir"; then
52675                             haveit=yes
52676                             break
52677                           fi
52678                         done
52679                         if test -z "$haveit"; then
52680                           if test -d "$additional_libdir"; then
52681                                                         LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir"
52682                           fi
52683                         fi
52684                       fi
52685                     fi
52686                     ;;
52687                   -R*)
52688                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
52689                     if test "$enable_rpath" != no; then
52690                                                                   haveit=
52691                       for x in $rpathdirs; do
52692                         if test "X$x" = "X$dir"; then
52693                           haveit=yes
52694                           break
52695                         fi
52696                       done
52697                       if test -z "$haveit"; then
52698                         rpathdirs="$rpathdirs $dir"
52699                       fi
52700                                                                   haveit=
52701                       for x in $ltrpathdirs; do
52702                         if test "X$x" = "X$dir"; then
52703                           haveit=yes
52704                           break
52705                         fi
52706                       done
52707                       if test -z "$haveit"; then
52708                         ltrpathdirs="$ltrpathdirs $dir"
52709                       fi
52710                     fi
52711                     ;;
52712                   -l*)
52713                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
52714                     ;;
52715                   *.la)
52716                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
52717                     ;;
52718                   *)
52719                                         LIBINTL="${LIBINTL}${LIBINTL:+ }$dep"
52720                     LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep"
52721                     ;;
52722                 esac
52723               done
52724             fi
52725           else
52726                                                             LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
52727             LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name"
52728           fi
52729         fi
52730       fi
52731     done
52732   done
52733   if test "X$rpathdirs" != "X"; then
52734     if test -n "$acl_hardcode_libdir_separator"; then
52735                         alldirs=
52736       for found_dir in $rpathdirs; do
52737         alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
52738       done
52739             acl_save_libdir="$libdir"
52740       libdir="$alldirs"
52741       eval flag=\"$acl_hardcode_libdir_flag_spec\"
52742       libdir="$acl_save_libdir"
52743       LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
52744     else
52745             for found_dir in $rpathdirs; do
52746         acl_save_libdir="$libdir"
52747         libdir="$found_dir"
52748         eval flag=\"$acl_hardcode_libdir_flag_spec\"
52749         libdir="$acl_save_libdir"
52750         LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
52751       done
52752     fi
52753   fi
52754   if test "X$ltrpathdirs" != "X"; then
52755             for found_dir in $ltrpathdirs; do
52756       LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir"
52757     done
52758   fi
52759
52760
52761
52762
52763
52764
52765           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5
52766 $as_echo_n "checking for GNU gettext in libintl... " >&6; }
52767 if eval \${$gt_func_gnugettext_libintl+:} false; then :
52768   $as_echo_n "(cached) " >&6
52769 else
52770   gt_save_CPPFLAGS="$CPPFLAGS"
52771             CPPFLAGS="$CPPFLAGS $INCINTL"
52772             gt_save_LIBS="$LIBS"
52773             LIBS="$LIBS $LIBINTL"
52774                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52775 /* end confdefs.h.  */
52776
52777 #include <libintl.h>
52778 $gt_revision_test_code
52779 extern int _nl_msg_cat_cntr;
52780 extern
52781 #ifdef __cplusplus
52782 "C"
52783 #endif
52784 const char *_nl_expand_alias (const char *);
52785
52786 int
52787 main ()
52788 {
52789
52790 bindtextdomain ("", "");
52791 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
52792
52793   ;
52794   return 0;
52795 }
52796 _ACEOF
52797 if ac_fn_c_try_link "$LINENO"; then :
52798   eval "$gt_func_gnugettext_libintl=yes"
52799 else
52800   eval "$gt_func_gnugettext_libintl=no"
52801 fi
52802 rm -f core conftest.err conftest.$ac_objext \
52803     conftest$ac_exeext conftest.$ac_ext
52804                         if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
52805               LIBS="$LIBS $LIBICONV"
52806               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52807 /* end confdefs.h.  */
52808
52809 #include <libintl.h>
52810 $gt_revision_test_code
52811 extern int _nl_msg_cat_cntr;
52812 extern
52813 #ifdef __cplusplus
52814 "C"
52815 #endif
52816 const char *_nl_expand_alias (const char *);
52817
52818 int
52819 main ()
52820 {
52821
52822 bindtextdomain ("", "");
52823 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
52824
52825   ;
52826   return 0;
52827 }
52828 _ACEOF
52829 if ac_fn_c_try_link "$LINENO"; then :
52830   LIBINTL="$LIBINTL $LIBICONV"
52831                  LTLIBINTL="$LTLIBINTL $LTLIBICONV"
52832                  eval "$gt_func_gnugettext_libintl=yes"
52833
52834 fi
52835 rm -f core conftest.err conftest.$ac_objext \
52836     conftest$ac_exeext conftest.$ac_ext
52837             fi
52838             CPPFLAGS="$gt_save_CPPFLAGS"
52839             LIBS="$gt_save_LIBS"
52840 fi
52841 eval ac_res=\$$gt_func_gnugettext_libintl
52842                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
52843 $as_echo "$ac_res" >&6; }
52844         fi
52845
52846                                         if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
52847            || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
52848                 && test "$PACKAGE" != gettext-runtime \
52849                 && test "$PACKAGE" != gettext-tools; }; then
52850           gt_use_preinstalled_gnugettext=yes
52851         else
52852                     LIBINTL=
52853           LTLIBINTL=
52854           INCINTL=
52855         fi
52856
52857
52858
52859     if test -n "$INTL_MACOSX_LIBS"; then
52860       if test "$gt_use_preinstalled_gnugettext" = "yes" \
52861          || test "$nls_cv_use_gnu_gettext" = "yes"; then
52862                 LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
52863         LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
52864       fi
52865     fi
52866
52867     if test "$gt_use_preinstalled_gnugettext" = "yes" \
52868        || test "$nls_cv_use_gnu_gettext" = "yes"; then
52869
52870 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
52871
52872     else
52873       USE_NLS=no
52874     fi
52875   fi
52876
52877   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5
52878 $as_echo_n "checking whether to use NLS... " >&6; }
52879   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
52880 $as_echo "$USE_NLS" >&6; }
52881   if test "$USE_NLS" = "yes"; then
52882     { $as_echo "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5
52883 $as_echo_n "checking where the gettext function comes from... " >&6; }
52884     if test "$gt_use_preinstalled_gnugettext" = "yes"; then
52885       if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
52886         gt_source="external libintl"
52887       else
52888         gt_source="libc"
52889       fi
52890     else
52891       gt_source="included intl directory"
52892     fi
52893     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5
52894 $as_echo "$gt_source" >&6; }
52895   fi
52896
52897   if test "$USE_NLS" = "yes"; then
52898
52899     if test "$gt_use_preinstalled_gnugettext" = "yes"; then
52900       if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
52901         { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5
52902 $as_echo_n "checking how to link with libintl... " >&6; }
52903         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5
52904 $as_echo "$LIBINTL" >&6; }
52905
52906   for element in $INCINTL; do
52907     haveit=
52908     for x in $CPPFLAGS; do
52909
52910   acl_save_prefix="$prefix"
52911   prefix="$acl_final_prefix"
52912   acl_save_exec_prefix="$exec_prefix"
52913   exec_prefix="$acl_final_exec_prefix"
52914   eval x=\"$x\"
52915   exec_prefix="$acl_save_exec_prefix"
52916   prefix="$acl_save_prefix"
52917
52918       if test "X$x" = "X$element"; then
52919         haveit=yes
52920         break
52921       fi
52922     done
52923     if test -z "$haveit"; then
52924       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
52925     fi
52926   done
52927
52928       fi
52929
52930
52931 $as_echo "#define HAVE_GETTEXT 1" >>confdefs.h
52932
52933
52934 $as_echo "#define HAVE_DCGETTEXT 1" >>confdefs.h
52935
52936     fi
52937
52938         POSUB=po
52939   fi
52940
52941
52942
52943     INTLLIBS="$LIBINTL"
52944
52945
52946
52947
52948
52949
52950
52951
52952
52953 $as_echo "#define FINDUTILS 1" >>confdefs.h
52954
52955
52956 $as_echo "#define ALREADY_INCLUDED_CONFIG_H 1" >>confdefs.h
52957
52958
52959
52960
52961
52962
52963
52964
52965         # Find any Python interpreter.
52966     if test -z "$PYTHON"; then
52967       for ac_prog in python python2 python3 python3.2 python3.1 python3.0 python2.7  python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0
52968 do
52969   # Extract the first word of "$ac_prog", so it can be a program name with args.
52970 set dummy $ac_prog; ac_word=$2
52971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
52972 $as_echo_n "checking for $ac_word... " >&6; }
52973 if ${ac_cv_path_PYTHON+:} false; then :
52974   $as_echo_n "(cached) " >&6
52975 else
52976   case $PYTHON in
52977   [\\/]* | ?:[\\/]*)
52978   ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
52979   ;;
52980   *)
52981   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
52982 for as_dir in $PATH
52983 do
52984   IFS=$as_save_IFS
52985   test -z "$as_dir" && as_dir=.
52986     for ac_exec_ext in '' $ac_executable_extensions; do
52987   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
52988     ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
52989     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
52990     break 2
52991   fi
52992 done
52993   done
52994 IFS=$as_save_IFS
52995
52996   ;;
52997 esac
52998 fi
52999 PYTHON=$ac_cv_path_PYTHON
53000 if test -n "$PYTHON"; then
53001   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
53002 $as_echo "$PYTHON" >&6; }
53003 else
53004   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53005 $as_echo "no" >&6; }
53006 fi
53007
53008
53009   test -n "$PYTHON" && break
53010 done
53011 test -n "$PYTHON" || PYTHON=":"
53012
53013     fi
53014     am_display_PYTHON=python
53015
53016
53017   if test "$PYTHON" = :; then
53018       :
53019   else
53020
53021
53022   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON version" >&5
53023 $as_echo_n "checking for $am_display_PYTHON version... " >&6; }
53024 if ${am_cv_python_version+:} false; then :
53025   $as_echo_n "(cached) " >&6
53026 else
53027   am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[:3])"`
53028 fi
53029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_version" >&5
53030 $as_echo "$am_cv_python_version" >&6; }
53031   PYTHON_VERSION=$am_cv_python_version
53032
53033
53034
53035   PYTHON_PREFIX='${prefix}'
53036
53037   PYTHON_EXEC_PREFIX='${exec_prefix}'
53038
53039
53040
53041   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON platform" >&5
53042 $as_echo_n "checking for $am_display_PYTHON platform... " >&6; }
53043 if ${am_cv_python_platform+:} false; then :
53044   $as_echo_n "(cached) " >&6
53045 else
53046   am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`
53047 fi
53048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_platform" >&5
53049 $as_echo "$am_cv_python_platform" >&6; }
53050   PYTHON_PLATFORM=$am_cv_python_platform
53051
53052
53053
53054
53055             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON script directory" >&5
53056 $as_echo_n "checking for $am_display_PYTHON script directory... " >&6; }
53057 if ${am_cv_python_pythondir+:} false; then :
53058   $as_echo_n "(cached) " >&6
53059 else
53060   if test "x$prefix" = xNONE
53061      then
53062        am_py_prefix=$ac_default_prefix
53063      else
53064        am_py_prefix=$prefix
53065      fi
53066      am_cv_python_pythondir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(0,0,prefix='$am_py_prefix'))" 2>/dev/null`
53067      case $am_cv_python_pythondir in
53068      $am_py_prefix*)
53069        am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'`
53070        am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"`
53071        ;;
53072      *)
53073        case $am_py_prefix in
53074          /usr|/System*) ;;
53075          *)
53076           am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages
53077           ;;
53078        esac
53079        ;;
53080      esac
53081
53082 fi
53083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_pythondir" >&5
53084 $as_echo "$am_cv_python_pythondir" >&6; }
53085   pythondir=$am_cv_python_pythondir
53086
53087
53088
53089   pkgpythondir=\${pythondir}/$PACKAGE
53090
53091
53092         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON extension module directory" >&5
53093 $as_echo_n "checking for $am_display_PYTHON extension module directory... " >&6; }
53094 if ${am_cv_python_pyexecdir+:} false; then :
53095   $as_echo_n "(cached) " >&6
53096 else
53097   if test "x$exec_prefix" = xNONE
53098      then
53099        am_py_exec_prefix=$am_py_prefix
53100      else
53101        am_py_exec_prefix=$exec_prefix
53102      fi
53103      am_cv_python_pyexecdir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(1,0,prefix='$am_py_exec_prefix'))" 2>/dev/null`
53104      case $am_cv_python_pyexecdir in
53105      $am_py_exec_prefix*)
53106        am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'`
53107        am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"`
53108        ;;
53109      *)
53110        case $am_py_exec_prefix in
53111          /usr|/System*) ;;
53112          *)
53113            am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages
53114            ;;
53115        esac
53116        ;;
53117      esac
53118
53119 fi
53120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_pyexecdir" >&5
53121 $as_echo "$am_cv_python_pyexecdir" >&6; }
53122   pyexecdir=$am_cv_python_pyexecdir
53123
53124
53125
53126   pkgpyexecdir=\${pyexecdir}/$PACKAGE
53127
53128
53129
53130   fi
53131
53132
53133  if test "$PYTHON" != :; then
53134   HAVE_PYTHON_TRUE=
53135   HAVE_PYTHON_FALSE='#'
53136 else
53137   HAVE_PYTHON_TRUE='#'
53138   HAVE_PYTHON_FALSE=
53139 fi
53140
53141 for ac_prog in faketime
53142 do
53143   # Extract the first word of "$ac_prog", so it can be a program name with args.
53144 set dummy $ac_prog; ac_word=$2
53145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
53146 $as_echo_n "checking for $ac_word... " >&6; }
53147 if ${ac_cv_prog_FAKETIME+:} false; then :
53148   $as_echo_n "(cached) " >&6
53149 else
53150   if test -n "$FAKETIME"; then
53151   ac_cv_prog_FAKETIME="$FAKETIME" # Let the user override the test.
53152 else
53153 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53154 for as_dir in $PATH
53155 do
53156   IFS=$as_save_IFS
53157   test -z "$as_dir" && as_dir=.
53158     for ac_exec_ext in '' $ac_executable_extensions; do
53159   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
53160     ac_cv_prog_FAKETIME="$ac_prog"
53161     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
53162     break 2
53163   fi
53164 done
53165   done
53166 IFS=$as_save_IFS
53167
53168 fi
53169 fi
53170 FAKETIME=$ac_cv_prog_FAKETIME
53171 if test -n "$FAKETIME"; then
53172   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FAKETIME" >&5
53173 $as_echo "$FAKETIME" >&6; }
53174 else
53175   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53176 $as_echo "no" >&6; }
53177 fi
53178
53179
53180   test -n "$FAKETIME" && break
53181 done
53182 test -n "$FAKETIME" || FAKETIME=":"
53183
53184  if test "$FAKETIME" != :; then
53185   HAVE_FAKETIME_TRUE=
53186   HAVE_FAKETIME_FALSE='#'
53187 else
53188   HAVE_FAKETIME_TRUE='#'
53189   HAVE_FAKETIME_FALSE=
53190 fi
53191
53192
53193 # This is necessary so that .o files in LIBOBJS are also built via
53194 # the ANSI2KNR-filtering rules.
53195 #LIBOBJS=`echo $LIBOBJS|sed 's/\.o /\$U.o /g;s/\.o$/\$U.o/'`
53196
53197 # Note that in the list below, po/Makefile.in should appear before
53198 # po/Makefile, so that po/Makefile can be created even if po/Makefile.in
53199 # starts off missing.
53200 ac_config_files="$ac_config_files Makefile build-aux/Makefile doc/Makefile find/Makefile find/testsuite/Makefile gl/Makefile gl/lib/Makefile lib/Makefile locate/Makefile locate/testsuite/Makefile m4/Makefile po/Makefile.in po/Makefile tests/Makefile xargs/Makefile xargs/testsuite/Makefile"
53201
53202 cat >confcache <<\_ACEOF
53203 # This file is a shell script that caches the results of configure
53204 # tests run on this system so they can be shared between configure
53205 # scripts and configure runs, see configure's option --config-cache.
53206 # It is not useful on other systems.  If it contains results you don't
53207 # want to keep, you may remove or edit it.
53208 #
53209 # config.status only pays attention to the cache file if you give it
53210 # the --recheck option to rerun configure.
53211 #
53212 # `ac_cv_env_foo' variables (set or unset) will be overridden when
53213 # loading this file, other *unset* `ac_cv_foo' will be assigned the
53214 # following values.
53215
53216 _ACEOF
53217
53218 # The following way of writing the cache mishandles newlines in values,
53219 # but we know of no workaround that is simple, portable, and efficient.
53220 # So, we kill variables containing newlines.
53221 # Ultrix sh set writes to stderr and can't be redirected directly,
53222 # and sets the high bit in the cache file unless we assign to the vars.
53223 (
53224   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
53225     eval ac_val=\$$ac_var
53226     case $ac_val in #(
53227     *${as_nl}*)
53228       case $ac_var in #(
53229       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
53230 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
53231       esac
53232       case $ac_var in #(
53233       _ | IFS | as_nl) ;; #(
53234       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
53235       *) { eval $ac_var=; unset $ac_var;} ;;
53236       esac ;;
53237     esac
53238   done
53239
53240   (set) 2>&1 |
53241     case $as_nl`(ac_space=' '; set) 2>&1` in #(
53242     *${as_nl}ac_space=\ *)
53243       # `set' does not quote correctly, so add quotes: double-quote
53244       # substitution turns \\\\ into \\, and sed turns \\ into \.
53245       sed -n \
53246         "s/'/'\\\\''/g;
53247           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
53248       ;; #(
53249     *)
53250       # `set' quotes correctly as required by POSIX, so do not add quotes.
53251       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
53252       ;;
53253     esac |
53254     sort
53255 ) |
53256   sed '
53257      /^ac_cv_env_/b end
53258      t clear
53259      :clear
53260      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
53261      t end
53262      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
53263      :end' >>confcache
53264 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
53265   if test -w "$cache_file"; then
53266     if test "x$cache_file" != "x/dev/null"; then
53267       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
53268 $as_echo "$as_me: updating cache $cache_file" >&6;}
53269       if test ! -f "$cache_file" || test -h "$cache_file"; then
53270         cat confcache >"$cache_file"
53271       else
53272         case $cache_file in #(
53273         */* | ?:*)
53274           mv -f confcache "$cache_file"$$ &&
53275           mv -f "$cache_file"$$ "$cache_file" ;; #(
53276         *)
53277           mv -f confcache "$cache_file" ;;
53278         esac
53279       fi
53280     fi
53281   else
53282     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
53283 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
53284   fi
53285 fi
53286 rm -f confcache
53287
53288 test "x$prefix" = xNONE && prefix=$ac_default_prefix
53289 # Let make expand exec_prefix.
53290 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
53291
53292 DEFS=-DHAVE_CONFIG_H
53293
53294 ac_libobjs=
53295 ac_ltlibobjs=
53296 U=
53297 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
53298   # 1. Remove the extension, and $U if already installed.
53299   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
53300   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
53301   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
53302   #    will be set to the directory where LIBOBJS objects are built.
53303   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
53304   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
53305 done
53306 LIBOBJS=$ac_libobjs
53307
53308 LTLIBOBJS=$ac_ltlibobjs
53309
53310
53311  if test -n "$EXEEXT"; then
53312   am__EXEEXT_TRUE=
53313   am__EXEEXT_FALSE='#'
53314 else
53315   am__EXEEXT_TRUE='#'
53316   am__EXEEXT_FALSE=
53317 fi
53318
53319 if test -z "${WITH_FTS_TRUE}" && test -z "${WITH_FTS_FALSE}"; then
53320   as_fn_error $? "conditional \"WITH_FTS\" was never defined.
53321 Usually this means the macro was only invoked conditionally." "$LINENO" 5
53322 fi
53323 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
53324   as_fn_error $? "conditional \"AMDEP\" was never defined.
53325 Usually this means the macro was only invoked conditionally." "$LINENO" 5
53326 fi
53327 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
53328   as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
53329 Usually this means the macro was only invoked conditionally." "$LINENO" 5
53330 fi
53331 if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
53332   as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined.
53333 Usually this means the macro was only invoked conditionally." "$LINENO" 5
53334 fi
53335 if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
53336   as_fn_error $? "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
53337 Usually this means the macro was only invoked conditionally." "$LINENO" 5
53338 fi
53339 if test -z "${GL_GENERATE_BYTESWAP_H_TRUE}" && test -z "${GL_GENERATE_BYTESWAP_H_FALSE}"; then
53340   as_fn_error $? "conditional \"GL_GENERATE_BYTESWAP_H\" was never defined.
53341 Usually this means the macro was only invoked conditionally." "$LINENO" 5
53342 fi
53343 if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
53344   as_fn_error $? "conditional \"GL_GENERATE_ERRNO_H\" was never defined.
53345 Usually this means the macro was only invoked conditionally." "$LINENO" 5
53346 fi
53347 if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then
53348   as_fn_error $? "conditional \"GL_GENERATE_FLOAT_H\" was never defined.
53349 Usually this means the macro was only invoked conditionally." "$LINENO" 5
53350 fi
53351 if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then
53352   as_fn_error $? "conditional \"GL_GENERATE_FNMATCH_H\" was never defined.
53353 Usually this means the macro was only invoked conditionally." "$LINENO" 5
53354 fi
53355 if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
53356   as_fn_error $? "conditional \"GL_GENERATE_STDINT_H\" was never defined.
53357 Usually this means the macro was only invoked conditionally." "$LINENO" 5
53358 fi
53359
53360
53361 if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
53362   as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
53363 Usually this means the macro was only invoked conditionally." "$LINENO" 5
53364 fi
53365 CONFIG_INCLUDE=config.h
53366
53367 if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
53368   as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
53369 Usually this means the macro was only invoked conditionally." "$LINENO" 5
53370 fi
53371 if test -z "${GL_GENERATE_SELINUX_CONTEXT_H_TRUE}" && test -z "${GL_GENERATE_SELINUX_CONTEXT_H_FALSE}"; then
53372   as_fn_error $? "conditional \"GL_GENERATE_SELINUX_CONTEXT_H\" was never defined.
53373 Usually this means the macro was only invoked conditionally." "$LINENO" 5
53374 fi
53375 if test -z "${GL_GENERATE_STDALIGN_H_TRUE}" && test -z "${GL_GENERATE_STDALIGN_H_FALSE}"; then
53376   as_fn_error $? "conditional \"GL_GENERATE_STDALIGN_H\" was never defined.
53377 Usually this means the macro was only invoked conditionally." "$LINENO" 5
53378 fi
53379 if test -z "${GL_GENERATE_STDARG_H_TRUE}" && test -z "${GL_GENERATE_STDARG_H_FALSE}"; then
53380   as_fn_error $? "conditional \"GL_GENERATE_STDARG_H\" was never defined.
53381 Usually this means the macro was only invoked conditionally." "$LINENO" 5
53382 fi
53383 if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
53384   as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
53385 Usually this means the macro was only invoked conditionally." "$LINENO" 5
53386 fi
53387 if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
53388   as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
53389 Usually this means the macro was only invoked conditionally." "$LINENO" 5
53390 fi
53391 if test -z "${LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE}"; then
53392   as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH\" was never defined.
53393 Usually this means the macro was only invoked conditionally." "$LINENO" 5
53394 fi
53395
53396     gl_libobjs=
53397     gl_ltlibobjs=
53398     if test -n "$gl_LIBOBJS"; then
53399       # Remove the extension.
53400       sed_drop_objext='s/\.o$//;s/\.obj$//'
53401       for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
53402         gl_libobjs="$gl_libobjs $i.$ac_objext"
53403         gl_ltlibobjs="$gl_ltlibobjs $i.lo"
53404       done
53405     fi
53406     gl_LIBOBJS=$gl_libobjs
53407
53408     gl_LTLIBOBJS=$gl_ltlibobjs
53409
53410
53411
53412
53413
53414
53415 if test -z "${GL_GENERATE_NETINET_IN_H_TRUE}" && test -z "${GL_GENERATE_NETINET_IN_H_FALSE}"; then
53416   as_fn_error $? "conditional \"GL_GENERATE_NETINET_IN_H\" was never defined.
53417 Usually this means the macro was only invoked conditionally." "$LINENO" 5
53418 fi
53419
53420     gltests_libobjs=
53421     gltests_ltlibobjs=
53422     if test -n "$gltests_LIBOBJS"; then
53423       # Remove the extension.
53424       sed_drop_objext='s/\.o$//;s/\.obj$//'
53425       for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
53426         gltests_libobjs="$gltests_libobjs $i.$ac_objext"
53427         gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
53428       done
53429     fi
53430     gltests_LIBOBJS=$gltests_libobjs
53431
53432     gltests_LTLIBOBJS=$gltests_ltlibobjs
53433
53434
53435 if test -z "${CROSS_COMPILING_TRUE}" && test -z "${CROSS_COMPILING_FALSE}"; then
53436   as_fn_error $? "conditional \"CROSS_COMPILING\" was never defined.
53437 Usually this means the macro was only invoked conditionally." "$LINENO" 5
53438 fi
53439 if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
53440   as_fn_error $? "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
53441 Usually this means the macro was only invoked conditionally." "$LINENO" 5
53442 fi
53443 if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then
53444   as_fn_error $? "conditional \"HAVE_PYTHON\" was never defined.
53445 Usually this means the macro was only invoked conditionally." "$LINENO" 5
53446 fi
53447 if test -z "${HAVE_FAKETIME_TRUE}" && test -z "${HAVE_FAKETIME_FALSE}"; then
53448   as_fn_error $? "conditional \"HAVE_FAKETIME\" was never defined.
53449 Usually this means the macro was only invoked conditionally." "$LINENO" 5
53450 fi
53451
53452 : "${CONFIG_STATUS=./config.status}"
53453 ac_write_fail=0
53454 ac_clean_files_save=$ac_clean_files
53455 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
53456 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
53457 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
53458 as_write_fail=0
53459 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
53460 #! $SHELL
53461 # Generated by $as_me.
53462 # Run this file to recreate the current configuration.
53463 # Compiler output produced by configure, useful for debugging
53464 # configure, is in config.log if it exists.
53465
53466 debug=false
53467 ac_cs_recheck=false
53468 ac_cs_silent=false
53469
53470 SHELL=\${CONFIG_SHELL-$SHELL}
53471 export SHELL
53472 _ASEOF
53473 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
53474 ## -------------------- ##
53475 ## M4sh Initialization. ##
53476 ## -------------------- ##
53477
53478 # Be more Bourne compatible
53479 DUALCASE=1; export DUALCASE # for MKS sh
53480 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
53481   emulate sh
53482   NULLCMD=:
53483   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
53484   # is contrary to our usage.  Disable this feature.
53485   alias -g '${1+"$@"}'='"$@"'
53486   setopt NO_GLOB_SUBST
53487 else
53488   case `(set -o) 2>/dev/null` in #(
53489   *posix*) :
53490     set -o posix ;; #(
53491   *) :
53492      ;;
53493 esac
53494 fi
53495
53496
53497 as_nl='
53498 '
53499 export as_nl
53500 # Printing a long string crashes Solaris 7 /usr/bin/printf.
53501 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
53502 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
53503 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
53504 # Prefer a ksh shell builtin over an external printf program on Solaris,
53505 # but without wasting forks for bash or zsh.
53506 if test -z "$BASH_VERSION$ZSH_VERSION" \
53507     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
53508   as_echo='print -r --'
53509   as_echo_n='print -rn --'
53510 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
53511   as_echo='printf %s\n'
53512   as_echo_n='printf %s'
53513 else
53514   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
53515     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53516     as_echo_n='/usr/ucb/echo -n'
53517   else
53518     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
53519     as_echo_n_body='eval
53520       arg=$1;
53521       case $arg in #(
53522       *"$as_nl"*)
53523         expr "X$arg" : "X\\(.*\\)$as_nl";
53524         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
53525       esac;
53526       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
53527     '
53528     export as_echo_n_body
53529     as_echo_n='sh -c $as_echo_n_body as_echo'
53530   fi
53531   export as_echo_body
53532   as_echo='sh -c $as_echo_body as_echo'
53533 fi
53534
53535 # The user is always right.
53536 if test "${PATH_SEPARATOR+set}" != set; then
53537   PATH_SEPARATOR=:
53538   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
53539     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
53540       PATH_SEPARATOR=';'
53541   }
53542 fi
53543
53544
53545 # IFS
53546 # We need space, tab and new line, in precisely that order.  Quoting is
53547 # there to prevent editors from complaining about space-tab.
53548 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
53549 # splitting by setting IFS to empty value.)
53550 IFS=" ""        $as_nl"
53551
53552 # Find who we are.  Look in the path if we contain no directory separator.
53553 as_myself=
53554 case $0 in #((
53555   *[\\/]* ) as_myself=$0 ;;
53556   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53557 for as_dir in $PATH
53558 do
53559   IFS=$as_save_IFS
53560   test -z "$as_dir" && as_dir=.
53561     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
53562   done
53563 IFS=$as_save_IFS
53564
53565      ;;
53566 esac
53567 # We did not find ourselves, most probably we were run as `sh COMMAND'
53568 # in which case we are not to be found in the path.
53569 if test "x$as_myself" = x; then
53570   as_myself=$0
53571 fi
53572 if test ! -f "$as_myself"; then
53573   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
53574   exit 1
53575 fi
53576
53577 # Unset variables that we do not need and which cause bugs (e.g. in
53578 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
53579 # suppresses any "Segmentation fault" message there.  '((' could
53580 # trigger a bug in pdksh 5.2.14.
53581 for as_var in BASH_ENV ENV MAIL MAILPATH
53582 do eval test x\${$as_var+set} = xset \
53583   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
53584 done
53585 PS1='$ '
53586 PS2='> '
53587 PS4='+ '
53588
53589 # NLS nuisances.
53590 LC_ALL=C
53591 export LC_ALL
53592 LANGUAGE=C
53593 export LANGUAGE
53594
53595 # CDPATH.
53596 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
53597
53598
53599 # as_fn_error STATUS ERROR [LINENO LOG_FD]
53600 # ----------------------------------------
53601 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
53602 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
53603 # script with STATUS, using 1 if that was 0.
53604 as_fn_error ()
53605 {
53606   as_status=$1; test $as_status -eq 0 && as_status=1
53607   if test "$4"; then
53608     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
53609     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
53610   fi
53611   $as_echo "$as_me: error: $2" >&2
53612   as_fn_exit $as_status
53613 } # as_fn_error
53614
53615
53616 # as_fn_set_status STATUS
53617 # -----------------------
53618 # Set $? to STATUS, without forking.
53619 as_fn_set_status ()
53620 {
53621   return $1
53622 } # as_fn_set_status
53623
53624 # as_fn_exit STATUS
53625 # -----------------
53626 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
53627 as_fn_exit ()
53628 {
53629   set +e
53630   as_fn_set_status $1
53631   exit $1
53632 } # as_fn_exit
53633
53634 # as_fn_unset VAR
53635 # ---------------
53636 # Portably unset VAR.
53637 as_fn_unset ()
53638 {
53639   { eval $1=; unset $1;}
53640 }
53641 as_unset=as_fn_unset
53642 # as_fn_append VAR VALUE
53643 # ----------------------
53644 # Append the text in VALUE to the end of the definition contained in VAR. Take
53645 # advantage of any shell optimizations that allow amortized linear growth over
53646 # repeated appends, instead of the typical quadratic growth present in naive
53647 # implementations.
53648 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
53649   eval 'as_fn_append ()
53650   {
53651     eval $1+=\$2
53652   }'
53653 else
53654   as_fn_append ()
53655   {
53656     eval $1=\$$1\$2
53657   }
53658 fi # as_fn_append
53659
53660 # as_fn_arith ARG...
53661 # ------------------
53662 # Perform arithmetic evaluation on the ARGs, and store the result in the
53663 # global $as_val. Take advantage of shells that can avoid forks. The arguments
53664 # must be portable across $(()) and expr.
53665 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
53666   eval 'as_fn_arith ()
53667   {
53668     as_val=$(( $* ))
53669   }'
53670 else
53671   as_fn_arith ()
53672   {
53673     as_val=`expr "$@" || test $? -eq 1`
53674   }
53675 fi # as_fn_arith
53676
53677
53678 if expr a : '\(a\)' >/dev/null 2>&1 &&
53679    test "X`expr 00001 : '.*\(...\)'`" = X001; then
53680   as_expr=expr
53681 else
53682   as_expr=false
53683 fi
53684
53685 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
53686   as_basename=basename
53687 else
53688   as_basename=false
53689 fi
53690
53691 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
53692   as_dirname=dirname
53693 else
53694   as_dirname=false
53695 fi
53696
53697 as_me=`$as_basename -- "$0" ||
53698 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
53699          X"$0" : 'X\(//\)$' \| \
53700          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
53701 $as_echo X/"$0" |
53702     sed '/^.*\/\([^/][^/]*\)\/*$/{
53703             s//\1/
53704             q
53705           }
53706           /^X\/\(\/\/\)$/{
53707             s//\1/
53708             q
53709           }
53710           /^X\/\(\/\).*/{
53711             s//\1/
53712             q
53713           }
53714           s/.*/./; q'`
53715
53716 # Avoid depending upon Character Ranges.
53717 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
53718 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
53719 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
53720 as_cr_digits='0123456789'
53721 as_cr_alnum=$as_cr_Letters$as_cr_digits
53722
53723 ECHO_C= ECHO_N= ECHO_T=
53724 case `echo -n x` in #(((((
53725 -n*)
53726   case `echo 'xy\c'` in
53727   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
53728   xy)  ECHO_C='\c';;
53729   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
53730        ECHO_T=' ';;
53731   esac;;
53732 *)
53733   ECHO_N='-n';;
53734 esac
53735
53736 rm -f conf$$ conf$$.exe conf$$.file
53737 if test -d conf$$.dir; then
53738   rm -f conf$$.dir/conf$$.file
53739 else
53740   rm -f conf$$.dir
53741   mkdir conf$$.dir 2>/dev/null
53742 fi
53743 if (echo >conf$$.file) 2>/dev/null; then
53744   if ln -s conf$$.file conf$$ 2>/dev/null; then
53745     as_ln_s='ln -s'
53746     # ... but there are two gotchas:
53747     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
53748     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
53749     # In both cases, we have to default to `cp -pR'.
53750     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
53751       as_ln_s='cp -pR'
53752   elif ln conf$$.file conf$$ 2>/dev/null; then
53753     as_ln_s=ln
53754   else
53755     as_ln_s='cp -pR'
53756   fi
53757 else
53758   as_ln_s='cp -pR'
53759 fi
53760 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
53761 rmdir conf$$.dir 2>/dev/null
53762
53763
53764 # as_fn_mkdir_p
53765 # -------------
53766 # Create "$as_dir" as a directory, including parents if necessary.
53767 as_fn_mkdir_p ()
53768 {
53769
53770   case $as_dir in #(
53771   -*) as_dir=./$as_dir;;
53772   esac
53773   test -d "$as_dir" || eval $as_mkdir_p || {
53774     as_dirs=
53775     while :; do
53776       case $as_dir in #(
53777       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
53778       *) as_qdir=$as_dir;;
53779       esac
53780       as_dirs="'$as_qdir' $as_dirs"
53781       as_dir=`$as_dirname -- "$as_dir" ||
53782 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
53783          X"$as_dir" : 'X\(//\)[^/]' \| \
53784          X"$as_dir" : 'X\(//\)$' \| \
53785          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
53786 $as_echo X"$as_dir" |
53787     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
53788             s//\1/
53789             q
53790           }
53791           /^X\(\/\/\)[^/].*/{
53792             s//\1/
53793             q
53794           }
53795           /^X\(\/\/\)$/{
53796             s//\1/
53797             q
53798           }
53799           /^X\(\/\).*/{
53800             s//\1/
53801             q
53802           }
53803           s/.*/./; q'`
53804       test -d "$as_dir" && break
53805     done
53806     test -z "$as_dirs" || eval "mkdir $as_dirs"
53807   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
53808
53809
53810 } # as_fn_mkdir_p
53811 if mkdir -p . 2>/dev/null; then
53812   as_mkdir_p='mkdir -p "$as_dir"'
53813 else
53814   test -d ./-p && rmdir ./-p
53815   as_mkdir_p=false
53816 fi
53817
53818
53819 # as_fn_executable_p FILE
53820 # -----------------------
53821 # Test if FILE is an executable regular file.
53822 as_fn_executable_p ()
53823 {
53824   test -f "$1" && test -x "$1"
53825 } # as_fn_executable_p
53826 as_test_x='test -x'
53827 as_executable_p=as_fn_executable_p
53828
53829 # Sed expression to map a string onto a valid CPP name.
53830 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
53831
53832 # Sed expression to map a string onto a valid variable name.
53833 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
53834
53835
53836 exec 6>&1
53837 ## ----------------------------------- ##
53838 ## Main body of $CONFIG_STATUS script. ##
53839 ## ----------------------------------- ##
53840 _ASEOF
53841 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
53842
53843 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53844 # Save the log message, to keep $0 and so on meaningful, and to
53845 # report actual input values of CONFIG_FILES etc. instead of their
53846 # values after options handling.
53847 ac_log="
53848 This file was extended by GNU findutils $as_me 4.5.14, which was
53849 generated by GNU Autoconf 2.69.  Invocation command line was
53850
53851   CONFIG_FILES    = $CONFIG_FILES
53852   CONFIG_HEADERS  = $CONFIG_HEADERS
53853   CONFIG_LINKS    = $CONFIG_LINKS
53854   CONFIG_COMMANDS = $CONFIG_COMMANDS
53855   $ $0 $@
53856
53857 on `(hostname || uname -n) 2>/dev/null | sed 1q`
53858 "
53859
53860 _ACEOF
53861
53862 case $ac_config_files in *"
53863 "*) set x $ac_config_files; shift; ac_config_files=$*;;
53864 esac
53865
53866 case $ac_config_headers in *"
53867 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
53868 esac
53869
53870
53871 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
53872 # Files that config.status was made for.
53873 config_files="$ac_config_files"
53874 config_headers="$ac_config_headers"
53875 config_links="$ac_config_links"
53876 config_commands="$ac_config_commands"
53877
53878 _ACEOF
53879
53880 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53881 ac_cs_usage="\
53882 \`$as_me' instantiates files and other configuration actions
53883 from templates according to the current configuration.  Unless the files
53884 and actions are specified as TAGs, all are instantiated by default.
53885
53886 Usage: $0 [OPTION]... [TAG]...
53887
53888   -h, --help       print this help, then exit
53889   -V, --version    print version number and configuration settings, then exit
53890       --config     print configuration, then exit
53891   -q, --quiet, --silent
53892                    do not print progress messages
53893   -d, --debug      don't remove temporary files
53894       --recheck    update $as_me by reconfiguring in the same conditions
53895       --file=FILE[:TEMPLATE]
53896                    instantiate the configuration file FILE
53897       --header=FILE[:TEMPLATE]
53898                    instantiate the configuration header FILE
53899
53900 Configuration files:
53901 $config_files
53902
53903 Configuration headers:
53904 $config_headers
53905
53906 Configuration links:
53907 $config_links
53908
53909 Configuration commands:
53910 $config_commands
53911
53912 Report bugs to <bug-findutils@gnu.org>.
53913 GNU findutils home page: <http://www.gnu.org/software/findutils/>.
53914 General help using GNU software: <http://www.gnu.org/gethelp/>."
53915
53916 _ACEOF
53917 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
53918 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
53919 ac_cs_version="\\
53920 GNU findutils config.status 4.5.14
53921 configured by $0, generated by GNU Autoconf 2.69,
53922   with options \\"\$ac_cs_config\\"
53923
53924 Copyright (C) 2012 Free Software Foundation, Inc.
53925 This config.status script is free software; the Free Software Foundation
53926 gives unlimited permission to copy, distribute and modify it."
53927
53928 ac_pwd='$ac_pwd'
53929 srcdir='$srcdir'
53930 INSTALL='$INSTALL'
53931 MKDIR_P='$MKDIR_P'
53932 AWK='$AWK'
53933 test -n "\$AWK" || AWK=awk
53934 _ACEOF
53935
53936 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53937 # The default lists apply if the user does not specify any file.
53938 ac_need_defaults=:
53939 while test $# != 0
53940 do
53941   case $1 in
53942   --*=?*)
53943     ac_option=`expr "X$1" : 'X\([^=]*\)='`
53944     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
53945     ac_shift=:
53946     ;;
53947   --*=)
53948     ac_option=`expr "X$1" : 'X\([^=]*\)='`
53949     ac_optarg=
53950     ac_shift=:
53951     ;;
53952   *)
53953     ac_option=$1
53954     ac_optarg=$2
53955     ac_shift=shift
53956     ;;
53957   esac
53958
53959   case $ac_option in
53960   # Handling of the options.
53961   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
53962     ac_cs_recheck=: ;;
53963   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
53964     $as_echo "$ac_cs_version"; exit ;;
53965   --config | --confi | --conf | --con | --co | --c )
53966     $as_echo "$ac_cs_config"; exit ;;
53967   --debug | --debu | --deb | --de | --d | -d )
53968     debug=: ;;
53969   --file | --fil | --fi | --f )
53970     $ac_shift
53971     case $ac_optarg in
53972     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
53973     '') as_fn_error $? "missing file argument" ;;
53974     esac
53975     as_fn_append CONFIG_FILES " '$ac_optarg'"
53976     ac_need_defaults=false;;
53977   --header | --heade | --head | --hea )
53978     $ac_shift
53979     case $ac_optarg in
53980     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
53981     esac
53982     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
53983     ac_need_defaults=false;;
53984   --he | --h)
53985     # Conflict between --help and --header
53986     as_fn_error $? "ambiguous option: \`$1'
53987 Try \`$0 --help' for more information.";;
53988   --help | --hel | -h )
53989     $as_echo "$ac_cs_usage"; exit ;;
53990   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
53991   | -silent | --silent | --silen | --sile | --sil | --si | --s)
53992     ac_cs_silent=: ;;
53993
53994   # This is an error.
53995   -*) as_fn_error $? "unrecognized option: \`$1'
53996 Try \`$0 --help' for more information." ;;
53997
53998   *) as_fn_append ac_config_targets " $1"
53999      ac_need_defaults=false ;;
54000
54001   esac
54002   shift
54003 done
54004
54005 ac_configure_extra_args=
54006
54007 if $ac_cs_silent; then
54008   exec 6>/dev/null
54009   ac_configure_extra_args="$ac_configure_extra_args --silent"
54010 fi
54011
54012 _ACEOF
54013 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54014 if \$ac_cs_recheck; then
54015   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
54016   shift
54017   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
54018   CONFIG_SHELL='$SHELL'
54019   export CONFIG_SHELL
54020   exec "\$@"
54021 fi
54022
54023 _ACEOF
54024 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54025 exec 5>>config.log
54026 {
54027   echo
54028   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
54029 ## Running $as_me. ##
54030 _ASBOX
54031   $as_echo "$ac_log"
54032 } >&5
54033
54034 _ACEOF
54035 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54036 #
54037 # INIT-COMMANDS
54038 #
54039 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
54040 GNUmakefile=$GNUmakefile
54041 # Capture the value of obsolete ALL_LINGUAS because we need it to compute
54042     # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
54043     # from automake < 1.5.
54044     eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
54045     # Capture the value of LINGUAS because we need it to compute CATALOGS.
54046     LINGUAS="${LINGUAS-%UNSET%}"
54047
54048
54049 _ACEOF
54050
54051 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54052
54053 # Handling of arguments.
54054 for ac_config_target in $ac_config_targets
54055 do
54056   case $ac_config_target in
54057     "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
54058     "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
54059     "$GNUmakefile") CONFIG_LINKS="$CONFIG_LINKS $GNUmakefile:$GNUmakefile" ;;
54060     "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;;
54061     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
54062     "build-aux/Makefile") CONFIG_FILES="$CONFIG_FILES build-aux/Makefile" ;;
54063     "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
54064     "find/Makefile") CONFIG_FILES="$CONFIG_FILES find/Makefile" ;;
54065     "find/testsuite/Makefile") CONFIG_FILES="$CONFIG_FILES find/testsuite/Makefile" ;;
54066     "gl/Makefile") CONFIG_FILES="$CONFIG_FILES gl/Makefile" ;;
54067     "gl/lib/Makefile") CONFIG_FILES="$CONFIG_FILES gl/lib/Makefile" ;;
54068     "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
54069     "locate/Makefile") CONFIG_FILES="$CONFIG_FILES locate/Makefile" ;;
54070     "locate/testsuite/Makefile") CONFIG_FILES="$CONFIG_FILES locate/testsuite/Makefile" ;;
54071     "m4/Makefile") CONFIG_FILES="$CONFIG_FILES m4/Makefile" ;;
54072     "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
54073     "po/Makefile") CONFIG_FILES="$CONFIG_FILES po/Makefile" ;;
54074     "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
54075     "xargs/Makefile") CONFIG_FILES="$CONFIG_FILES xargs/Makefile" ;;
54076     "xargs/testsuite/Makefile") CONFIG_FILES="$CONFIG_FILES xargs/testsuite/Makefile" ;;
54077
54078   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
54079   esac
54080 done
54081
54082
54083 # If the user did not use the arguments to specify the items to instantiate,
54084 # then the envvar interface is used.  Set only those that are not.
54085 # We use the long form for the default assignment because of an extremely
54086 # bizarre bug on SunOS 4.1.3.
54087 if $ac_need_defaults; then
54088   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
54089   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
54090   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
54091   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
54092 fi
54093
54094 # Have a temporary directory for convenience.  Make it in the build tree
54095 # simply because there is no reason against having it here, and in addition,
54096 # creating and moving files from /tmp can sometimes cause problems.
54097 # Hook for its removal unless debugging.
54098 # Note that there is a small window in which the directory will not be cleaned:
54099 # after its creation but before its name has been assigned to `$tmp'.
54100 $debug ||
54101 {
54102   tmp= ac_tmp=
54103   trap 'exit_status=$?
54104   : "${ac_tmp:=$tmp}"
54105   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
54106 ' 0
54107   trap 'as_fn_exit 1' 1 2 13 15
54108 }
54109 # Create a (secure) tmp directory for tmp files.
54110
54111 {
54112   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
54113   test -d "$tmp"
54114 }  ||
54115 {
54116   tmp=./conf$$-$RANDOM
54117   (umask 077 && mkdir "$tmp")
54118 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
54119 ac_tmp=$tmp
54120
54121 # Set up the scripts for CONFIG_FILES section.
54122 # No need to generate them if there are no CONFIG_FILES.
54123 # This happens for instance with `./config.status config.h'.
54124 if test -n "$CONFIG_FILES"; then
54125
54126
54127 ac_cr=`echo X | tr X '\015'`
54128 # On cygwin, bash can eat \r inside `` if the user requested igncr.
54129 # But we know of no other shell where ac_cr would be empty at this
54130 # point, so we can use a bashism as a fallback.
54131 if test "x$ac_cr" = x; then
54132   eval ac_cr=\$\'\\r\'
54133 fi
54134 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
54135 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
54136   ac_cs_awk_cr='\\r'
54137 else
54138   ac_cs_awk_cr=$ac_cr
54139 fi
54140
54141 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
54142 _ACEOF
54143
54144
54145 {
54146   echo "cat >conf$$subs.awk <<_ACEOF" &&
54147   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
54148   echo "_ACEOF"
54149 } >conf$$subs.sh ||
54150   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
54151 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
54152 ac_delim='%!_!# '
54153 for ac_last_try in false false false false false :; do
54154   . ./conf$$subs.sh ||
54155     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
54156
54157   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
54158   if test $ac_delim_n = $ac_delim_num; then
54159     break
54160   elif $ac_last_try; then
54161     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
54162   else
54163     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
54164   fi
54165 done
54166 rm -f conf$$subs.sh
54167
54168 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54169 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
54170 _ACEOF
54171 sed -n '
54172 h
54173 s/^/S["/; s/!.*/"]=/
54174 p
54175 g
54176 s/^[^!]*!//
54177 :repl
54178 t repl
54179 s/'"$ac_delim"'$//
54180 t delim
54181 :nl
54182 h
54183 s/\(.\{148\}\)..*/\1/
54184 t more1
54185 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
54186 p
54187 n
54188 b repl
54189 :more1
54190 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
54191 p
54192 g
54193 s/.\{148\}//
54194 t nl
54195 :delim
54196 h
54197 s/\(.\{148\}\)..*/\1/
54198 t more2
54199 s/["\\]/\\&/g; s/^/"/; s/$/"/
54200 p
54201 b
54202 :more2
54203 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
54204 p
54205 g
54206 s/.\{148\}//
54207 t delim
54208 ' <conf$$subs.awk | sed '
54209 /^[^""]/{
54210   N
54211   s/\n//
54212 }
54213 ' >>$CONFIG_STATUS || ac_write_fail=1
54214 rm -f conf$$subs.awk
54215 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54216 _ACAWK
54217 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
54218   for (key in S) S_is_set[key] = 1
54219   FS = "\a"
54220
54221 }
54222 {
54223   line = $ 0
54224   nfields = split(line, field, "@")
54225   substed = 0
54226   len = length(field[1])
54227   for (i = 2; i < nfields; i++) {
54228     key = field[i]
54229     keylen = length(key)
54230     if (S_is_set[key]) {
54231       value = S[key]
54232       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
54233       len += length(value) + length(field[++i])
54234       substed = 1
54235     } else
54236       len += 1 + keylen
54237   }
54238
54239   print line
54240 }
54241
54242 _ACAWK
54243 _ACEOF
54244 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54245 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
54246   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
54247 else
54248   cat
54249 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
54250   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
54251 _ACEOF
54252
54253 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
54254 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
54255 # trailing colons and then remove the whole line if VPATH becomes empty
54256 # (actually we leave an empty line to preserve line numbers).
54257 if test "x$srcdir" = x.; then
54258   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
54259 h
54260 s///
54261 s/^/:/
54262 s/[      ]*$/:/
54263 s/:\$(srcdir):/:/g
54264 s/:\${srcdir}:/:/g
54265 s/:@srcdir@:/:/g
54266 s/^:*//
54267 s/:*$//
54268 x
54269 s/\(=[   ]*\).*/\1/
54270 G
54271 s/\n//
54272 s/^[^=]*=[       ]*$//
54273 }'
54274 fi
54275
54276 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54277 fi # test -n "$CONFIG_FILES"
54278
54279 # Set up the scripts for CONFIG_HEADERS section.
54280 # No need to generate them if there are no CONFIG_HEADERS.
54281 # This happens for instance with `./config.status Makefile'.
54282 if test -n "$CONFIG_HEADERS"; then
54283 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
54284 BEGIN {
54285 _ACEOF
54286
54287 # Transform confdefs.h into an awk script `defines.awk', embedded as
54288 # here-document in config.status, that substitutes the proper values into
54289 # config.h.in to produce config.h.
54290
54291 # Create a delimiter string that does not exist in confdefs.h, to ease
54292 # handling of long lines.
54293 ac_delim='%!_!# '
54294 for ac_last_try in false false :; do
54295   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
54296   if test -z "$ac_tt"; then
54297     break
54298   elif $ac_last_try; then
54299     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
54300   else
54301     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
54302   fi
54303 done
54304
54305 # For the awk script, D is an array of macro values keyed by name,
54306 # likewise P contains macro parameters if any.  Preserve backslash
54307 # newline sequences.
54308
54309 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
54310 sed -n '
54311 s/.\{148\}/&'"$ac_delim"'/g
54312 t rset
54313 :rset
54314 s/^[     ]*#[    ]*define[       ][      ]*/ /
54315 t def
54316 d
54317 :def
54318 s/\\$//
54319 t bsnl
54320 s/["\\]/\\&/g
54321 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
54322 D["\1"]=" \3"/p
54323 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
54324 d
54325 :bsnl
54326 s/["\\]/\\&/g
54327 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
54328 D["\1"]=" \3\\\\\\n"\\/p
54329 t cont
54330 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
54331 t cont
54332 d
54333 :cont
54334 n
54335 s/.\{148\}/&'"$ac_delim"'/g
54336 t clear
54337 :clear
54338 s/\\$//
54339 t bsnlc
54340 s/["\\]/\\&/g; s/^/"/; s/$/"/p
54341 d
54342 :bsnlc
54343 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
54344 b cont
54345 ' <confdefs.h | sed '
54346 s/'"$ac_delim"'/"\\\
54347 "/g' >>$CONFIG_STATUS || ac_write_fail=1
54348
54349 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54350   for (key in D) D_is_set[key] = 1
54351   FS = "\a"
54352 }
54353 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
54354   line = \$ 0
54355   split(line, arg, " ")
54356   if (arg[1] == "#") {
54357     defundef = arg[2]
54358     mac1 = arg[3]
54359   } else {
54360     defundef = substr(arg[1], 2)
54361     mac1 = arg[2]
54362   }
54363   split(mac1, mac2, "(") #)
54364   macro = mac2[1]
54365   prefix = substr(line, 1, index(line, defundef) - 1)
54366   if (D_is_set[macro]) {
54367     # Preserve the white space surrounding the "#".
54368     print prefix "define", macro P[macro] D[macro]
54369     next
54370   } else {
54371     # Replace #undef with comments.  This is necessary, for example,
54372     # in the case of _POSIX_SOURCE, which is predefined and required
54373     # on some systems where configure will not decide to define it.
54374     if (defundef == "undef") {
54375       print "/*", prefix defundef, macro, "*/"
54376       next
54377     }
54378   }
54379 }
54380 { print }
54381 _ACAWK
54382 _ACEOF
54383 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54384   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
54385 fi # test -n "$CONFIG_HEADERS"
54386
54387
54388 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS  :L $CONFIG_LINKS  :C $CONFIG_COMMANDS"
54389 shift
54390 for ac_tag
54391 do
54392   case $ac_tag in
54393   :[FHLC]) ac_mode=$ac_tag; continue;;
54394   esac
54395   case $ac_mode$ac_tag in
54396   :[FHL]*:*);;
54397   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
54398   :[FH]-) ac_tag=-:-;;
54399   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
54400   esac
54401   ac_save_IFS=$IFS
54402   IFS=:
54403   set x $ac_tag
54404   IFS=$ac_save_IFS
54405   shift
54406   ac_file=$1
54407   shift
54408
54409   case $ac_mode in
54410   :L) ac_source=$1;;
54411   :[FH])
54412     ac_file_inputs=
54413     for ac_f
54414     do
54415       case $ac_f in
54416       -) ac_f="$ac_tmp/stdin";;
54417       *) # Look for the file first in the build tree, then in the source tree
54418          # (if the path is not absolute).  The absolute path cannot be DOS-style,
54419          # because $ac_f cannot contain `:'.
54420          test -f "$ac_f" ||
54421            case $ac_f in
54422            [\\/$]*) false;;
54423            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
54424            esac ||
54425            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
54426       esac
54427       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
54428       as_fn_append ac_file_inputs " '$ac_f'"
54429     done
54430
54431     # Let's still pretend it is `configure' which instantiates (i.e., don't
54432     # use $as_me), people would be surprised to read:
54433     #    /* config.h.  Generated by config.status.  */
54434     configure_input='Generated from '`
54435           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
54436         `' by configure.'
54437     if test x"$ac_file" != x-; then
54438       configure_input="$ac_file.  $configure_input"
54439       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
54440 $as_echo "$as_me: creating $ac_file" >&6;}
54441     fi
54442     # Neutralize special characters interpreted by sed in replacement strings.
54443     case $configure_input in #(
54444     *\&* | *\|* | *\\* )
54445        ac_sed_conf_input=`$as_echo "$configure_input" |
54446        sed 's/[\\\\&|]/\\\\&/g'`;; #(
54447     *) ac_sed_conf_input=$configure_input;;
54448     esac
54449
54450     case $ac_tag in
54451     *:-:* | *:-) cat >"$ac_tmp/stdin" \
54452       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
54453     esac
54454     ;;
54455   esac
54456
54457   ac_dir=`$as_dirname -- "$ac_file" ||
54458 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
54459          X"$ac_file" : 'X\(//\)[^/]' \| \
54460          X"$ac_file" : 'X\(//\)$' \| \
54461          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
54462 $as_echo X"$ac_file" |
54463     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
54464             s//\1/
54465             q
54466           }
54467           /^X\(\/\/\)[^/].*/{
54468             s//\1/
54469             q
54470           }
54471           /^X\(\/\/\)$/{
54472             s//\1/
54473             q
54474           }
54475           /^X\(\/\).*/{
54476             s//\1/
54477             q
54478           }
54479           s/.*/./; q'`
54480   as_dir="$ac_dir"; as_fn_mkdir_p
54481   ac_builddir=.
54482
54483 case "$ac_dir" in
54484 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
54485 *)
54486   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
54487   # A ".." for each directory in $ac_dir_suffix.
54488   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
54489   case $ac_top_builddir_sub in
54490   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
54491   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
54492   esac ;;
54493 esac
54494 ac_abs_top_builddir=$ac_pwd
54495 ac_abs_builddir=$ac_pwd$ac_dir_suffix
54496 # for backward compatibility:
54497 ac_top_builddir=$ac_top_build_prefix
54498
54499 case $srcdir in
54500   .)  # We are building in place.
54501     ac_srcdir=.
54502     ac_top_srcdir=$ac_top_builddir_sub
54503     ac_abs_top_srcdir=$ac_pwd ;;
54504   [\\/]* | ?:[\\/]* )  # Absolute name.
54505     ac_srcdir=$srcdir$ac_dir_suffix;
54506     ac_top_srcdir=$srcdir
54507     ac_abs_top_srcdir=$srcdir ;;
54508   *) # Relative name.
54509     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
54510     ac_top_srcdir=$ac_top_build_prefix$srcdir
54511     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
54512 esac
54513 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
54514
54515
54516   case $ac_mode in
54517   :F)
54518   #
54519   # CONFIG_FILE
54520   #
54521
54522   case $INSTALL in
54523   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
54524   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
54525   esac
54526   ac_MKDIR_P=$MKDIR_P
54527   case $MKDIR_P in
54528   [\\/$]* | ?:[\\/]* ) ;;
54529   */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
54530   esac
54531 _ACEOF
54532
54533 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54534 # If the template does not know about datarootdir, expand it.
54535 # FIXME: This hack should be removed a few years after 2.60.
54536 ac_datarootdir_hack=; ac_datarootdir_seen=
54537 ac_sed_dataroot='
54538 /datarootdir/ {
54539   p
54540   q
54541 }
54542 /@datadir@/p
54543 /@docdir@/p
54544 /@infodir@/p
54545 /@localedir@/p
54546 /@mandir@/p'
54547 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
54548 *datarootdir*) ac_datarootdir_seen=yes;;
54549 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
54550   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
54551 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
54552 _ACEOF
54553 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54554   ac_datarootdir_hack='
54555   s&@datadir@&$datadir&g
54556   s&@docdir@&$docdir&g
54557   s&@infodir@&$infodir&g
54558   s&@localedir@&$localedir&g
54559   s&@mandir@&$mandir&g
54560   s&\\\${datarootdir}&$datarootdir&g' ;;
54561 esac
54562 _ACEOF
54563
54564 # Neutralize VPATH when `$srcdir' = `.'.
54565 # Shell code in configure.ac might set extrasub.
54566 # FIXME: do we really want to maintain this feature?
54567 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54568 ac_sed_extra="$ac_vpsub
54569 $extrasub
54570 _ACEOF
54571 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54572 :t
54573 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
54574 s|@configure_input@|$ac_sed_conf_input|;t t
54575 s&@top_builddir@&$ac_top_builddir_sub&;t t
54576 s&@top_build_prefix@&$ac_top_build_prefix&;t t
54577 s&@srcdir@&$ac_srcdir&;t t
54578 s&@abs_srcdir@&$ac_abs_srcdir&;t t
54579 s&@top_srcdir@&$ac_top_srcdir&;t t
54580 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
54581 s&@builddir@&$ac_builddir&;t t
54582 s&@abs_builddir@&$ac_abs_builddir&;t t
54583 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
54584 s&@INSTALL@&$ac_INSTALL&;t t
54585 s&@MKDIR_P@&$ac_MKDIR_P&;t t
54586 $ac_datarootdir_hack
54587 "
54588 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
54589   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
54590
54591 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
54592   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
54593   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
54594       "$ac_tmp/out"`; test -z "$ac_out"; } &&
54595   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
54596 which seems to be undefined.  Please make sure it is defined" >&5
54597 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
54598 which seems to be undefined.  Please make sure it is defined" >&2;}
54599
54600   rm -f "$ac_tmp/stdin"
54601   case $ac_file in
54602   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
54603   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
54604   esac \
54605   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
54606  ;;
54607   :H)
54608   #
54609   # CONFIG_HEADER
54610   #
54611   if test x"$ac_file" != x-; then
54612     {
54613       $as_echo "/* $configure_input  */" \
54614       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
54615     } >"$ac_tmp/config.h" \
54616       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
54617     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
54618       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
54619 $as_echo "$as_me: $ac_file is unchanged" >&6;}
54620     else
54621       rm -f "$ac_file"
54622       mv "$ac_tmp/config.h" "$ac_file" \
54623         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
54624     fi
54625   else
54626     $as_echo "/* $configure_input  */" \
54627       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
54628       || as_fn_error $? "could not create -" "$LINENO" 5
54629   fi
54630 # Compute "$ac_file"'s index in $config_headers.
54631 _am_arg="$ac_file"
54632 _am_stamp_count=1
54633 for _am_header in $config_headers :; do
54634   case $_am_header in
54635     $_am_arg | $_am_arg:* )
54636       break ;;
54637     * )
54638       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
54639   esac
54640 done
54641 echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
54642 $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
54643          X"$_am_arg" : 'X\(//\)[^/]' \| \
54644          X"$_am_arg" : 'X\(//\)$' \| \
54645          X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
54646 $as_echo X"$_am_arg" |
54647     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
54648             s//\1/
54649             q
54650           }
54651           /^X\(\/\/\)[^/].*/{
54652             s//\1/
54653             q
54654           }
54655           /^X\(\/\/\)$/{
54656             s//\1/
54657             q
54658           }
54659           /^X\(\/\).*/{
54660             s//\1/
54661             q
54662           }
54663           s/.*/./; q'`/stamp-h$_am_stamp_count
54664  ;;
54665   :L)
54666   #
54667   # CONFIG_LINK
54668   #
54669
54670   if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
54671     :
54672   else
54673     # Prefer the file from the source tree if names are identical.
54674     if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
54675       ac_source=$srcdir/$ac_source
54676     fi
54677
54678     { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
54679 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
54680
54681     if test ! -r "$ac_source"; then
54682       as_fn_error $? "$ac_source: file not found" "$LINENO" 5
54683     fi
54684     rm -f "$ac_file"
54685
54686     # Try a relative symlink, then a hard link, then a copy.
54687     case $ac_source in
54688     [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
54689         *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
54690     esac
54691     ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
54692       ln "$ac_source" "$ac_file" 2>/dev/null ||
54693       cp -p "$ac_source" "$ac_file" ||
54694       as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
54695   fi
54696  ;;
54697   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
54698 $as_echo "$as_me: executing $ac_file commands" >&6;}
54699  ;;
54700   esac
54701
54702
54703   case $ac_file$ac_mode in
54704     "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
54705   # Autoconf 2.62 quotes --file arguments for eval, but not when files
54706   # are listed without --file.  Let's play safe and only enable the eval
54707   # if we detect the quoting.
54708   case $CONFIG_FILES in
54709   *\'*) eval set x "$CONFIG_FILES" ;;
54710   *)   set x $CONFIG_FILES ;;
54711   esac
54712   shift
54713   for mf
54714   do
54715     # Strip MF so we end up with the name of the file.
54716     mf=`echo "$mf" | sed -e 's/:.*$//'`
54717     # Check whether this is an Automake generated Makefile or not.
54718     # We used to match only the files named `Makefile.in', but
54719     # some people rename them; so instead we look at the file content.
54720     # Grep'ing the first line is not enough: some people post-process
54721     # each Makefile.in and add a new line on top of each file to say so.
54722     # Grep'ing the whole file is not good either: AIX grep has a line
54723     # limit of 2048, but all sed's we know have understand at least 4000.
54724     if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
54725       dirpart=`$as_dirname -- "$mf" ||
54726 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
54727          X"$mf" : 'X\(//\)[^/]' \| \
54728          X"$mf" : 'X\(//\)$' \| \
54729          X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
54730 $as_echo X"$mf" |
54731     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
54732             s//\1/
54733             q
54734           }
54735           /^X\(\/\/\)[^/].*/{
54736             s//\1/
54737             q
54738           }
54739           /^X\(\/\/\)$/{
54740             s//\1/
54741             q
54742           }
54743           /^X\(\/\).*/{
54744             s//\1/
54745             q
54746           }
54747           s/.*/./; q'`
54748     else
54749       continue
54750     fi
54751     # Extract the definition of DEPDIR, am__include, and am__quote
54752     # from the Makefile without running `make'.
54753     DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
54754     test -z "$DEPDIR" && continue
54755     am__include=`sed -n 's/^am__include = //p' < "$mf"`
54756     test -z "am__include" && continue
54757     am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
54758     # When using ansi2knr, U may be empty or an underscore; expand it
54759     U=`sed -n 's/^U = //p' < "$mf"`
54760     # Find all dependency output files, they are included files with
54761     # $(DEPDIR) in their names.  We invoke sed twice because it is the
54762     # simplest approach to changing $(DEPDIR) to its actual value in the
54763     # expansion.
54764     for file in `sed -n "
54765       s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
54766          sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
54767       # Make sure the directory exists.
54768       test -f "$dirpart/$file" && continue
54769       fdir=`$as_dirname -- "$file" ||
54770 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
54771          X"$file" : 'X\(//\)[^/]' \| \
54772          X"$file" : 'X\(//\)$' \| \
54773          X"$file" : 'X\(/\)' \| . 2>/dev/null ||
54774 $as_echo X"$file" |
54775     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
54776             s//\1/
54777             q
54778           }
54779           /^X\(\/\/\)[^/].*/{
54780             s//\1/
54781             q
54782           }
54783           /^X\(\/\/\)$/{
54784             s//\1/
54785             q
54786           }
54787           /^X\(\/\).*/{
54788             s//\1/
54789             q
54790           }
54791           s/.*/./; q'`
54792       as_dir=$dirpart/$fdir; as_fn_mkdir_p
54793       # echo "creating $dirpart/$file"
54794       echo '# dummy' > "$dirpart/$file"
54795     done
54796   done
54797 }
54798  ;;
54799     "po-directories":C)
54800     for ac_file in $CONFIG_FILES; do
54801       # Support "outfile[:infile[:infile...]]"
54802       case "$ac_file" in
54803         *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
54804       esac
54805       # PO directories have a Makefile.in generated from Makefile.in.in.
54806       case "$ac_file" in */Makefile.in)
54807         # Adjust a relative srcdir.
54808         ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
54809         ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
54810         ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
54811         # In autoconf-2.13 it is called $ac_given_srcdir.
54812         # In autoconf-2.50 it is called $srcdir.
54813         test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
54814         case "$ac_given_srcdir" in
54815           .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
54816           /*) top_srcdir="$ac_given_srcdir" ;;
54817           *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
54818         esac
54819         # Treat a directory as a PO directory if and only if it has a
54820         # POTFILES.in file. This allows packages to have multiple PO
54821         # directories under different names or in different locations.
54822         if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
54823           rm -f "$ac_dir/POTFILES"
54824           test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
54825           gt_tab=`printf '\t'`
54826           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"
54827           POMAKEFILEDEPS="POTFILES.in"
54828           # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
54829           # on $ac_dir but don't depend on user-specified configuration
54830           # parameters.
54831           if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
54832             # The LINGUAS file contains the set of available languages.
54833             if test -n "$OBSOLETE_ALL_LINGUAS"; then
54834               test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
54835             fi
54836             ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
54837             # Hide the ALL_LINGUAS assignment from automake < 1.5.
54838             eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
54839             POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
54840           else
54841             # The set of available languages was given in configure.in.
54842             # Hide the ALL_LINGUAS assignment from automake < 1.5.
54843             eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
54844           fi
54845           # Compute POFILES
54846           # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
54847           # Compute UPDATEPOFILES
54848           # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
54849           # Compute DUMMYPOFILES
54850           # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
54851           # Compute GMOFILES
54852           # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
54853           case "$ac_given_srcdir" in
54854             .) srcdirpre= ;;
54855             *) srcdirpre='$(srcdir)/' ;;
54856           esac
54857           POFILES=
54858           UPDATEPOFILES=
54859           DUMMYPOFILES=
54860           GMOFILES=
54861           for lang in $ALL_LINGUAS; do
54862             POFILES="$POFILES $srcdirpre$lang.po"
54863             UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
54864             DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
54865             GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
54866           done
54867           # CATALOGS depends on both $ac_dir and the user's LINGUAS
54868           # environment variable.
54869           INST_LINGUAS=
54870           if test -n "$ALL_LINGUAS"; then
54871             for presentlang in $ALL_LINGUAS; do
54872               useit=no
54873               if test "%UNSET%" != "$LINGUAS"; then
54874                 desiredlanguages="$LINGUAS"
54875               else
54876                 desiredlanguages="$ALL_LINGUAS"
54877               fi
54878               for desiredlang in $desiredlanguages; do
54879                 # Use the presentlang catalog if desiredlang is
54880                 #   a. equal to presentlang, or
54881                 #   b. a variant of presentlang (because in this case,
54882                 #      presentlang can be used as a fallback for messages
54883                 #      which are not translated in the desiredlang catalog).
54884                 case "$desiredlang" in
54885                   "$presentlang"*) useit=yes;;
54886                 esac
54887               done
54888               if test $useit = yes; then
54889                 INST_LINGUAS="$INST_LINGUAS $presentlang"
54890               fi
54891             done
54892           fi
54893           CATALOGS=
54894           if test -n "$INST_LINGUAS"; then
54895             for lang in $INST_LINGUAS; do
54896               CATALOGS="$CATALOGS $lang.gmo"
54897             done
54898           fi
54899           test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
54900           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"
54901           for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
54902             if test -f "$f"; then
54903               case "$f" in
54904                 *.orig | *.bak | *~) ;;
54905                 *) cat "$f" >> "$ac_dir/Makefile" ;;
54906               esac
54907             fi
54908           done
54909         fi
54910         ;;
54911       esac
54912     done ;;
54913
54914   esac
54915 done # for ac_tag
54916
54917
54918 as_fn_exit 0
54919 _ACEOF
54920 ac_clean_files=$ac_clean_files_save
54921
54922 test $ac_write_fail = 0 ||
54923   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
54924
54925
54926 # configure is writing to config.log, and then calls config.status.
54927 # config.status does its own redirection, appending to config.log.
54928 # Unfortunately, on DOS this fails, as config.log is still kept open
54929 # by configure, so config.status won't be able to write to it; its
54930 # output is simply discarded.  So we exec the FD to /dev/null,
54931 # effectively closing config.log, so it can be properly (re)opened and
54932 # appended to by config.status.  When coming back to configure, we
54933 # need to make the FD available again.
54934 if test "$no_create" != yes; then
54935   ac_cs_success=:
54936   ac_config_status_args=
54937   test "$silent" = yes &&
54938     ac_config_status_args="$ac_config_status_args --quiet"
54939   exec 5>/dev/null
54940   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
54941   exec 5>>config.log
54942   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
54943   # would make configure fail if this is the last instruction.
54944   $ac_cs_success || as_fn_exit 1
54945 fi
54946 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
54947   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
54948 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
54949 fi
54950