re-mark 1.29b-2 as not yet uploaded (merge madness!)
[debian/tar] / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69 for GNU tar 1.29.
4 #
5 # Report bugs to <bug-tar@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 bug-tar@gnu.org
270 $0: about your system, including any error possibly output
271 $0: before this message. Then install a modern shell, or
272 $0: manually run the script under such a shell if you do
273 $0: 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 tar'
582 PACKAGE_TARNAME='tar'
583 PACKAGE_VERSION='1.29'
584 PACKAGE_STRING='GNU tar 1.29'
585 PACKAGE_BUGREPORT='bug-tar@gnu.org'
586 PACKAGE_URL='http://www.gnu.org/software/tar/'
587
588 ac_unique_file="src/tar.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 ac_header_list=
626 ac_func_list=
627 gl_fnmatch_required=POSIX
628 gl_getopt_required=POSIX
629 gl_getopt_required=POSIX
630 gt_needs=
631 ac_subst_vars='gltests_LTLIBOBJS
632 gltests_LIBOBJS
633 gl_LTLIBOBJS
634 gl_LIBOBJS
635 am__EXEEXT_FALSE
636 am__EXEEXT_TRUE
637 LTLIBOBJS
638 BACKUP_SED_COND
639 BACKUP_SBIN_SCRIPTS
640 BACKUP_LIBEXEC_SCRIPTS
641 AUTOM4TE
642 POSUB
643 INTLLIBS
644 INTL_MACOSX_LIBS
645 XGETTEXT_EXTRA_OPTIONS
646 MSGMERGE
647 XGETTEXT_015
648 XGETTEXT
649 GMSGFMT_015
650 MSGFMT_015
651 GMSGFMT
652 MSGFMT
653 GETTEXT_MACRO_VERSION
654 USE_NLS
655 SED
656 LTLIBICONV
657 LIBICONV
658 DEFAULT_QUOTING_STYLE
659 DEFAULT_BLOCKING
660 DEFAULT_ARCHIVE
661 DEFAULT_ARCHIVE_FORMAT
662 RSH
663 LIBOBJS
664 TAR_COND_XATTR_H_FALSE
665 TAR_COND_XATTR_H_TRUE
666 GNULIB_TEST_WARN_CFLAGS
667 GNULIB_WARN_CFLAGS
668 WARN_CFLAGS
669 WERROR_CFLAGS
670 PU_RMT_COND_FALSE
671 PU_RMT_COND_TRUE
672 DEFAULT_RMT_COMMAND
673 DEFAULT_RMT_DIR
674 PU_RMT_PROG
675 LIB_SETSOCKOPT
676 LIBGNU_LTLIBDEPS
677 LIBGNU_LIBDEPS
678 gltests_WITNESS
679 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
680 NEXT_WCHAR_H
681 HAVE_FEATURES_H
682 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE
683 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE
684 LIBUNISTRING_UNIWIDTH_H
685 LIBUNISTRING_UNITYPES_H
686 HAVE_UNISTD_H
687 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
688 NEXT_UNISTD_H
689 UNISTD_H_DEFINES_STRUCT_TIMESPEC
690 PTHREAD_H_DEFINES_STRUCT_TIMESPEC
691 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
692 TIME_H_DEFINES_STRUCT_TIMESPEC
693 NEXT_AS_FIRST_DIRECTIVE_TIME_H
694 NEXT_TIME_H
695 GL_GENERATE_SYSEXITS_H_FALSE
696 GL_GENERATE_SYSEXITS_H_TRUE
697 SYSEXITS_H
698 HAVE_SYSEXITS_H
699 NEXT_AS_FIRST_DIRECTIVE_SYSEXITS_H
700 NEXT_SYSEXITS_H
701 HAVE_STRINGS_H
702 NEXT_AS_FIRST_DIRECTIVE_STRINGS_H
703 NEXT_STRINGS_H
704 NEXT_AS_FIRST_DIRECTIVE_STRING_H
705 NEXT_STRING_H
706 HAVE_DECL_STRNCASECMP
707 HAVE_STRCASECMP
708 HAVE_FFS
709 GNULIB_FFS
710 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
711 NEXT_STDLIB_H
712 NEXT_AS_FIRST_DIRECTIVE_STDIO_H
713 NEXT_STDIO_H
714 GL_GENERATE_STDARG_H_FALSE
715 GL_GENERATE_STDARG_H_TRUE
716 STDARG_H
717 NEXT_AS_FIRST_DIRECTIVE_STDARG_H
718 NEXT_STDARG_H
719 GL_GENERATE_STDALIGN_H_FALSE
720 GL_GENERATE_STDALIGN_H_TRUE
721 STDALIGN_H
722 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
723 NEXT_SIGNAL_H
724 GL_GENERATE_SELINUX_CONTEXT_H_FALSE
725 GL_GENERATE_SELINUX_CONTEXT_H_TRUE
726 SELINUX_CONTEXT_H
727 NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H
728 NEXT_SELINUX_SELINUX_H
729 LIB_SELINUX
730 REPLACE_RAISE
731 REPLACE_PTHREAD_SIGMASK
732 HAVE_SIGHANDLER_T
733 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
734 HAVE_STRUCT_SIGACTION_SA_SIGACTION
735 HAVE_SIGACTION
736 HAVE_SIGINFO_T
737 HAVE_SIGSET_T
738 HAVE_RAISE
739 HAVE_PTHREAD_SIGMASK
740 HAVE_POSIX_SIGNALBLOCKING
741 GNULIB_SIGACTION
742 GNULIB_SIGPROCMASK
743 GNULIB_SIGNAL_H_SIGPIPE
744 GNULIB_RAISE
745 GNULIB_PTHREAD_SIGMASK
746 HAVE__BOOL
747 GL_GENERATE_STDBOOL_H_FALSE
748 GL_GENERATE_STDBOOL_H_TRUE
749 STDBOOL_H
750 REPLACE_LOCALTIME
751 REPLACE_GMTIME
752 REPLACE_TIMEGM
753 REPLACE_NANOSLEEP
754 REPLACE_MKTIME
755 REPLACE_LOCALTIME_R
756 HAVE_TIMEGM
757 HAVE_STRPTIME
758 HAVE_NANOSLEEP
759 HAVE_DECL_LOCALTIME_R
760 GNULIB_TIME_RZ
761 GNULIB_TIME_R
762 GNULIB_TIMEGM
763 GNULIB_STRPTIME
764 GNULIB_NANOSLEEP
765 GNULIB_MKTIME
766 UNDEFINE_STRTOK_R
767 REPLACE_STRTOK_R
768 REPLACE_STRSIGNAL
769 REPLACE_STRNLEN
770 REPLACE_STRNDUP
771 REPLACE_STRNCAT
772 REPLACE_STRERROR_R
773 REPLACE_STRERROR
774 REPLACE_STRCHRNUL
775 REPLACE_STRCASESTR
776 REPLACE_STRSTR
777 REPLACE_STRDUP
778 REPLACE_STPNCPY
779 REPLACE_MEMMEM
780 REPLACE_MEMCHR
781 HAVE_STRVERSCMP
782 HAVE_DECL_STRSIGNAL
783 HAVE_DECL_STRERROR_R
784 HAVE_DECL_STRTOK_R
785 HAVE_STRCASESTR
786 HAVE_STRSEP
787 HAVE_STRPBRK
788 HAVE_DECL_STRNLEN
789 HAVE_DECL_STRNDUP
790 HAVE_DECL_STRDUP
791 HAVE_STRCHRNUL
792 HAVE_STPNCPY
793 HAVE_STPCPY
794 HAVE_RAWMEMCHR
795 HAVE_DECL_MEMRCHR
796 HAVE_MEMPCPY
797 HAVE_DECL_MEMMEM
798 HAVE_MEMCHR
799 HAVE_FFSLL
800 HAVE_FFSL
801 HAVE_MBSLEN
802 GNULIB_STRVERSCMP
803 GNULIB_STRSIGNAL
804 GNULIB_STRERROR_R
805 GNULIB_STRERROR
806 GNULIB_MBSTOK_R
807 GNULIB_MBSSEP
808 GNULIB_MBSSPN
809 GNULIB_MBSPBRK
810 GNULIB_MBSCSPN
811 GNULIB_MBSCASESTR
812 GNULIB_MBSPCASECMP
813 GNULIB_MBSNCASECMP
814 GNULIB_MBSCASECMP
815 GNULIB_MBSSTR
816 GNULIB_MBSRCHR
817 GNULIB_MBSCHR
818 GNULIB_MBSNLEN
819 GNULIB_MBSLEN
820 GNULIB_STRTOK_R
821 GNULIB_STRCASESTR
822 GNULIB_STRSTR
823 GNULIB_STRSEP
824 GNULIB_STRPBRK
825 GNULIB_STRNLEN
826 GNULIB_STRNDUP
827 GNULIB_STRNCAT
828 GNULIB_STRDUP
829 GNULIB_STRCHRNUL
830 GNULIB_STPNCPY
831 GNULIB_STPCPY
832 GNULIB_RAWMEMCHR
833 GNULIB_MEMRCHR
834 GNULIB_MEMPCPY
835 GNULIB_MEMMEM
836 GNULIB_MEMCHR
837 GNULIB_FFSLL
838 GNULIB_FFSL
839 LOCALE_FR_UTF8
840 LOCALE_ZH_CN
841 LOCALE_JA
842 NEXT_AS_FIRST_DIRECTIVE_LOCALE_H
843 NEXT_LOCALE_H
844 HAVE_XLOCALE_H
845 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
846 NEXT_STDDEF_H
847 GL_GENERATE_STDDEF_H_FALSE
848 GL_GENERATE_STDDEF_H_TRUE
849 STDDEF_H
850 HAVE_WCHAR_T
851 HAVE_MAX_ALIGN_T
852 REPLACE_NULL
853 REPLACE_STRUCT_LCONV
854 REPLACE_DUPLOCALE
855 REPLACE_SETLOCALE
856 REPLACE_LOCALECONV
857 HAVE_DUPLOCALE
858 GNULIB_DUPLOCALE
859 GNULIB_SETLOCALE
860 GNULIB_LOCALECONV
861 LOCALCHARSET_TESTS_ENVIRONMENT
862 GLIBC21
863 HAVE_LANGINFO_YESEXPR
864 HAVE_LANGINFO_ERA
865 HAVE_LANGINFO_T_FMT_AMPM
866 HAVE_LANGINFO_CODESET
867 HAVE_LANGINFO_H
868 NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H
869 NEXT_LANGINFO_H
870 REPLACE_NL_LANGINFO
871 HAVE_NL_LANGINFO
872 GNULIB_NL_LANGINFO
873 REPLACE_TOWLOWER
874 REPLACE_ISWCNTRL
875 HAVE_WCTYPE_H
876 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H
877 NEXT_WCTYPE_H
878 HAVE_WINT_T
879 HAVE_ISWCNTRL
880 REPLACE_ISWBLANK
881 HAVE_WCTRANS_T
882 HAVE_WCTYPE_T
883 HAVE_ISWBLANK
884 GNULIB_TOWCTRANS
885 GNULIB_WCTRANS
886 GNULIB_ISWCTYPE
887 GNULIB_WCTYPE
888 GNULIB_ISWBLANK
889 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
890 NEXT_INTTYPES_H
891 UINT64_MAX_EQ_ULONG_MAX
892 UINT32_MAX_LT_UINTMAX_MAX
893 PRIPTR_PREFIX
894 PRI_MACROS_BROKEN
895 INT64_MAX_EQ_LONG_MAX
896 INT32_MAX_LT_INTMAX_MAX
897 REPLACE_STRTOUMAX
898 REPLACE_STRTOIMAX
899 HAVE_DECL_STRTOUMAX
900 HAVE_DECL_STRTOIMAX
901 HAVE_DECL_IMAXDIV
902 HAVE_DECL_IMAXABS
903 GNULIB_STRTOUMAX
904 GNULIB_STRTOIMAX
905 GNULIB_IMAXDIV
906 GNULIB_IMAXABS
907 GL_GENERATE_STDINT_H_FALSE
908 GL_GENERATE_STDINT_H_TRUE
909 STDINT_H
910 WINT_T_SUFFIX
911 WCHAR_T_SUFFIX
912 SIG_ATOMIC_T_SUFFIX
913 SIZE_T_SUFFIX
914 PTRDIFF_T_SUFFIX
915 HAVE_SIGNED_WINT_T
916 HAVE_SIGNED_WCHAR_T
917 HAVE_SIGNED_SIG_ATOMIC_T
918 BITSIZEOF_WINT_T
919 BITSIZEOF_WCHAR_T
920 BITSIZEOF_SIG_ATOMIC_T
921 BITSIZEOF_SIZE_T
922 BITSIZEOF_PTRDIFF_T
923 APPLE_UNIVERSAL_BUILD
924 HAVE_SYS_BITYPES_H
925 HAVE_SYS_INTTYPES_H
926 HAVE_STDINT_H
927 NEXT_AS_FIRST_DIRECTIVE_STDINT_H
928 NEXT_STDINT_H
929 HAVE_SYS_TYPES_H
930 HAVE_INTTYPES_H
931 HAVE_WCHAR_H
932 HAVE_UNSIGNED_LONG_LONG_INT
933 HAVE_LONG_LONG_INT
934 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
935 NEXT_SYS_TIME_H
936 REPLACE_STRUCT_TIMEVAL
937 REPLACE_GETTIMEOFDAY
938 HAVE_TIMEZONE_T
939 HAVE_SYS_TIME_H
940 HAVE_STRUCT_TIMEVAL
941 HAVE_GETTIMEOFDAY
942 GNULIB_GETTIMEOFDAY
943 LTLIBINTL
944 LIBINTL
945 GNULIB_GL_UNISTD_H_GETOPT
946 GETOPT_H
947 HAVE_GETOPT_H
948 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H
949 NEXT_GETOPT_H
950 WINDOWS_64_BIT_ST_SIZE
951 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
952 NEXT_SYS_STAT_H
953 WINDOWS_64_BIT_OFF_T
954 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H
955 NEXT_SYS_TYPES_H
956 REPLACE_VSPRINTF
957 REPLACE_VSNPRINTF
958 REPLACE_VPRINTF
959 REPLACE_VFPRINTF
960 REPLACE_VDPRINTF
961 REPLACE_VASPRINTF
962 REPLACE_TMPFILE
963 REPLACE_STDIO_WRITE_FUNCS
964 REPLACE_STDIO_READ_FUNCS
965 REPLACE_SPRINTF
966 REPLACE_SNPRINTF
967 REPLACE_RENAMEAT
968 REPLACE_RENAME
969 REPLACE_REMOVE
970 REPLACE_PRINTF
971 REPLACE_POPEN
972 REPLACE_PERROR
973 REPLACE_OBSTACK_PRINTF
974 REPLACE_GETLINE
975 REPLACE_GETDELIM
976 REPLACE_FTELLO
977 REPLACE_FTELL
978 REPLACE_FSEEKO
979 REPLACE_FSEEK
980 REPLACE_FREOPEN
981 REPLACE_FPURGE
982 REPLACE_FPRINTF
983 REPLACE_FOPEN
984 REPLACE_FFLUSH
985 REPLACE_FDOPEN
986 REPLACE_FCLOSE
987 REPLACE_DPRINTF
988 HAVE_VDPRINTF
989 HAVE_VASPRINTF
990 HAVE_RENAMEAT
991 HAVE_POPEN
992 HAVE_PCLOSE
993 HAVE_FTELLO
994 HAVE_FSEEKO
995 HAVE_DPRINTF
996 HAVE_DECL_VSNPRINTF
997 HAVE_DECL_SNPRINTF
998 HAVE_DECL_OBSTACK_PRINTF
999 HAVE_DECL_GETLINE
1000 HAVE_DECL_GETDELIM
1001 HAVE_DECL_FTELLO
1002 HAVE_DECL_FSEEKO
1003 HAVE_DECL_FPURGE
1004 GNULIB_VSPRINTF_POSIX
1005 GNULIB_VSNPRINTF
1006 GNULIB_VPRINTF_POSIX
1007 GNULIB_VPRINTF
1008 GNULIB_VFPRINTF_POSIX
1009 GNULIB_VFPRINTF
1010 GNULIB_VDPRINTF
1011 GNULIB_VSCANF
1012 GNULIB_VFSCANF
1013 GNULIB_VASPRINTF
1014 GNULIB_TMPFILE
1015 GNULIB_STDIO_H_SIGPIPE
1016 GNULIB_STDIO_H_NONBLOCKING
1017 GNULIB_SPRINTF_POSIX
1018 GNULIB_SNPRINTF
1019 GNULIB_SCANF
1020 GNULIB_RENAMEAT
1021 GNULIB_RENAME
1022 GNULIB_REMOVE
1023 GNULIB_PUTS
1024 GNULIB_PUTCHAR
1025 GNULIB_PUTC
1026 GNULIB_PRINTF_POSIX
1027 GNULIB_PRINTF
1028 GNULIB_POPEN
1029 GNULIB_PERROR
1030 GNULIB_PCLOSE
1031 GNULIB_OBSTACK_PRINTF_POSIX
1032 GNULIB_OBSTACK_PRINTF
1033 GNULIB_GETLINE
1034 GNULIB_GETDELIM
1035 GNULIB_GETCHAR
1036 GNULIB_GETC
1037 GNULIB_FWRITE
1038 GNULIB_FTELLO
1039 GNULIB_FTELL
1040 GNULIB_FSEEKO
1041 GNULIB_FSEEK
1042 GNULIB_FSCANF
1043 GNULIB_FREOPEN
1044 GNULIB_FREAD
1045 GNULIB_FPUTS
1046 GNULIB_FPUTC
1047 GNULIB_FPURGE
1048 GNULIB_FPRINTF_POSIX
1049 GNULIB_FPRINTF
1050 GNULIB_FOPEN
1051 GNULIB_FGETS
1052 GNULIB_FGETC
1053 GNULIB_FFLUSH
1054 GNULIB_FDOPEN
1055 GNULIB_FCLOSE
1056 GNULIB_DPRINTF
1057 GL_GENERATE_FNMATCH_H_FALSE
1058 GL_GENERATE_FNMATCH_H_TRUE
1059 FNMATCH_H
1060 REPLACE_ITOLD
1061 GL_GENERATE_FLOAT_H_FALSE
1062 GL_GENERATE_FLOAT_H_TRUE
1063 FLOAT_H
1064 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H
1065 NEXT_FLOAT_H
1066 LIB_HAS_ACL
1067 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
1068 NEXT_FCNTL_H
1069 REPLACE_OPENAT
1070 REPLACE_OPEN
1071 REPLACE_FCNTL
1072 HAVE_OPENAT
1073 HAVE_FCNTL
1074 GNULIB_OPENAT
1075 GNULIB_OPEN
1076 GNULIB_NONBLOCKING
1077 GNULIB_FCNTL
1078 REPLACE_UTIMENSAT
1079 REPLACE_STAT
1080 REPLACE_MKNOD
1081 REPLACE_MKFIFO
1082 REPLACE_MKDIR
1083 REPLACE_LSTAT
1084 REPLACE_FUTIMENS
1085 REPLACE_FSTATAT
1086 REPLACE_FSTAT
1087 HAVE_UTIMENSAT
1088 HAVE_MKNODAT
1089 HAVE_MKNOD
1090 HAVE_MKFIFOAT
1091 HAVE_MKFIFO
1092 HAVE_MKDIRAT
1093 HAVE_LSTAT
1094 HAVE_LCHMOD
1095 HAVE_FUTIMENS
1096 HAVE_FSTATAT
1097 HAVE_FCHMODAT
1098 GNULIB_UTIMENSAT
1099 GNULIB_STAT
1100 GNULIB_MKNODAT
1101 GNULIB_MKNOD
1102 GNULIB_MKFIFOAT
1103 GNULIB_MKFIFO
1104 GNULIB_MKDIRAT
1105 GNULIB_LSTAT
1106 GNULIB_LCHMOD
1107 GNULIB_FUTIMENS
1108 GNULIB_FSTATAT
1109 GNULIB_FSTAT
1110 GNULIB_FCHMODAT
1111 LIB_EACCESS
1112 EOVERFLOW_VALUE
1113 EOVERFLOW_HIDDEN
1114 ENOLINK_VALUE
1115 ENOLINK_HIDDEN
1116 EMULTIHOP_VALUE
1117 EMULTIHOP_HIDDEN
1118 GL_GENERATE_ERRNO_H_FALSE
1119 GL_GENERATE_ERRNO_H_TRUE
1120 ERRNO_H
1121 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
1122 NEXT_ERRNO_H
1123 HAVE_DIRENT_H
1124 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H
1125 NEXT_DIRENT_H
1126 PRAGMA_COLUMNS
1127 PRAGMA_SYSTEM_HEADER
1128 INCLUDE_NEXT_AS_FIRST_DIRECTIVE
1129 INCLUDE_NEXT
1130 pkglibexecdir
1131 runstatedir
1132 lispdir
1133 REPLACE_FDOPENDIR
1134 REPLACE_DIRFD
1135 REPLACE_CLOSEDIR
1136 REPLACE_OPENDIR
1137 HAVE_ALPHASORT
1138 HAVE_SCANDIR
1139 HAVE_FDOPENDIR
1140 HAVE_DECL_FDOPENDIR
1141 HAVE_DECL_DIRFD
1142 HAVE_CLOSEDIR
1143 HAVE_REWINDDIR
1144 HAVE_READDIR
1145 HAVE_OPENDIR
1146 GNULIB_ALPHASORT
1147 GNULIB_SCANDIR
1148 GNULIB_FDOPENDIR
1149 GNULIB_DIRFD
1150 GNULIB_CLOSEDIR
1151 GNULIB_REWINDDIR
1152 GNULIB_READDIR
1153 GNULIB_OPENDIR
1154 HAVE_WINSOCK2_H
1155 HAVE_MSVC_INVALID_PARAMETER_HANDLER
1156 LIB_CLOCK_GETTIME
1157 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1158 UNISTD_H_HAVE_WINSOCK2_H
1159 REPLACE_WRITE
1160 REPLACE_USLEEP
1161 REPLACE_UNLINKAT
1162 REPLACE_UNLINK
1163 REPLACE_TTYNAME_R
1164 REPLACE_SYMLINKAT
1165 REPLACE_SYMLINK
1166 REPLACE_SLEEP
1167 REPLACE_RMDIR
1168 REPLACE_READLINKAT
1169 REPLACE_READLINK
1170 REPLACE_READ
1171 REPLACE_PWRITE
1172 REPLACE_PREAD
1173 REPLACE_LSEEK
1174 REPLACE_LINKAT
1175 REPLACE_LINK
1176 REPLACE_LCHOWN
1177 REPLACE_ISATTY
1178 REPLACE_GETPAGESIZE
1179 REPLACE_GETGROUPS
1180 REPLACE_GETLOGIN_R
1181 REPLACE_GETDTABLESIZE
1182 REPLACE_GETDOMAINNAME
1183 REPLACE_GETCWD
1184 REPLACE_FTRUNCATE
1185 REPLACE_FCHOWNAT
1186 REPLACE_DUP2
1187 REPLACE_DUP
1188 REPLACE_CLOSE
1189 REPLACE_CHOWN
1190 HAVE_SYS_PARAM_H
1191 HAVE_OS_H
1192 HAVE_DECL_TTYNAME_R
1193 HAVE_DECL_SETHOSTNAME
1194 HAVE_DECL_GETUSERSHELL
1195 HAVE_DECL_GETPAGESIZE
1196 HAVE_DECL_GETLOGIN_R
1197 HAVE_DECL_GETDOMAINNAME
1198 HAVE_DECL_FDATASYNC
1199 HAVE_DECL_FCHDIR
1200 HAVE_DECL_ENVIRON
1201 HAVE_USLEEP
1202 HAVE_UNLINKAT
1203 HAVE_SYMLINKAT
1204 HAVE_SYMLINK
1205 HAVE_SLEEP
1206 HAVE_SETHOSTNAME
1207 HAVE_READLINKAT
1208 HAVE_READLINK
1209 HAVE_PWRITE
1210 HAVE_PREAD
1211 HAVE_PIPE2
1212 HAVE_PIPE
1213 HAVE_LINKAT
1214 HAVE_LINK
1215 HAVE_LCHOWN
1216 HAVE_GROUP_MEMBER
1217 HAVE_GETPAGESIZE
1218 HAVE_GETLOGIN
1219 HAVE_GETHOSTNAME
1220 HAVE_GETGROUPS
1221 HAVE_GETDTABLESIZE
1222 HAVE_FTRUNCATE
1223 HAVE_FSYNC
1224 HAVE_FDATASYNC
1225 HAVE_FCHOWNAT
1226 HAVE_FCHDIR
1227 HAVE_FACCESSAT
1228 HAVE_EUIDACCESS
1229 HAVE_DUP3
1230 HAVE_DUP2
1231 HAVE_CHOWN
1232 GNULIB_WRITE
1233 GNULIB_USLEEP
1234 GNULIB_UNLINKAT
1235 GNULIB_UNLINK
1236 GNULIB_UNISTD_H_SIGPIPE
1237 GNULIB_UNISTD_H_NONBLOCKING
1238 GNULIB_TTYNAME_R
1239 GNULIB_SYMLINKAT
1240 GNULIB_SYMLINK
1241 GNULIB_SLEEP
1242 GNULIB_SETHOSTNAME
1243 GNULIB_RMDIR
1244 GNULIB_READLINKAT
1245 GNULIB_READLINK
1246 GNULIB_READ
1247 GNULIB_PWRITE
1248 GNULIB_PREAD
1249 GNULIB_PIPE2
1250 GNULIB_PIPE
1251 GNULIB_LSEEK
1252 GNULIB_LINKAT
1253 GNULIB_LINK
1254 GNULIB_LCHOWN
1255 GNULIB_ISATTY
1256 GNULIB_GROUP_MEMBER
1257 GNULIB_GETUSERSHELL
1258 GNULIB_GETPAGESIZE
1259 GNULIB_GETLOGIN_R
1260 GNULIB_GETLOGIN
1261 GNULIB_GETHOSTNAME
1262 GNULIB_GETGROUPS
1263 GNULIB_GETDTABLESIZE
1264 GNULIB_GETDOMAINNAME
1265 GNULIB_GETCWD
1266 GNULIB_FTRUNCATE
1267 GNULIB_FSYNC
1268 GNULIB_FDATASYNC
1269 GNULIB_FCHOWNAT
1270 GNULIB_FCHDIR
1271 GNULIB_FACCESSAT
1272 GNULIB_EUIDACCESS
1273 GNULIB_ENVIRON
1274 GNULIB_DUP3
1275 GNULIB_DUP2
1276 GNULIB_DUP
1277 GNULIB_CLOSE
1278 GNULIB_CHOWN
1279 GNULIB_CHDIR
1280 REPLACE_WCTOMB
1281 REPLACE_UNSETENV
1282 REPLACE_STRTOD
1283 REPLACE_SETENV
1284 REPLACE_REALPATH
1285 REPLACE_REALLOC
1286 REPLACE_RANDOM_R
1287 REPLACE_QSORT_R
1288 REPLACE_PUTENV
1289 REPLACE_PTSNAME_R
1290 REPLACE_PTSNAME
1291 REPLACE_MKSTEMP
1292 REPLACE_MBTOWC
1293 REPLACE_MALLOC
1294 REPLACE_CANONICALIZE_FILE_NAME
1295 REPLACE_CALLOC
1296 HAVE_DECL_UNSETENV
1297 HAVE_UNLOCKPT
1298 HAVE_SYS_LOADAVG_H
1299 HAVE_STRUCT_RANDOM_DATA
1300 HAVE_STRTOULL
1301 HAVE_STRTOLL
1302 HAVE_STRTOD
1303 HAVE_DECL_SETENV
1304 HAVE_SETENV
1305 HAVE_SECURE_GETENV
1306 HAVE_RPMATCH
1307 HAVE_REALPATH
1308 HAVE_RANDOM_R
1309 HAVE_RANDOM_H
1310 HAVE_RANDOM
1311 HAVE_PTSNAME_R
1312 HAVE_PTSNAME
1313 HAVE_POSIX_OPENPT
1314 HAVE_MKSTEMPS
1315 HAVE_MKSTEMP
1316 HAVE_MKOSTEMPS
1317 HAVE_MKOSTEMP
1318 HAVE_MKDTEMP
1319 HAVE_GRANTPT
1320 HAVE_GETSUBOPT
1321 HAVE_DECL_GETLOADAVG
1322 HAVE_CANONICALIZE_FILE_NAME
1323 HAVE_ATOLL
1324 HAVE__EXIT
1325 GNULIB_WCTOMB
1326 GNULIB_UNSETENV
1327 GNULIB_UNLOCKPT
1328 GNULIB_SYSTEM_POSIX
1329 GNULIB_STRTOULL
1330 GNULIB_STRTOLL
1331 GNULIB_STRTOD
1332 GNULIB_SETENV
1333 GNULIB_SECURE_GETENV
1334 GNULIB_RPMATCH
1335 GNULIB_REALPATH
1336 GNULIB_REALLOC_POSIX
1337 GNULIB_RANDOM_R
1338 GNULIB_RANDOM
1339 GNULIB_QSORT_R
1340 GNULIB_PUTENV
1341 GNULIB_PTSNAME_R
1342 GNULIB_PTSNAME
1343 GNULIB_POSIX_OPENPT
1344 GNULIB_MKSTEMPS
1345 GNULIB_MKSTEMP
1346 GNULIB_MKOSTEMPS
1347 GNULIB_MKOSTEMP
1348 GNULIB_MKDTEMP
1349 GNULIB_MBTOWC
1350 GNULIB_MALLOC_POSIX
1351 GNULIB_GRANTPT
1352 GNULIB_GETSUBOPT
1353 GNULIB_GETLOADAVG
1354 GNULIB_CANONICALIZE_FILE_NAME
1355 GNULIB_CALLOC_POSIX
1356 GNULIB_ATOLL
1357 GNULIB__EXIT
1358 LOCALE_FR
1359 REPLACE_WCSWIDTH
1360 REPLACE_WCWIDTH
1361 REPLACE_WCSNRTOMBS
1362 REPLACE_WCSRTOMBS
1363 REPLACE_WCRTOMB
1364 REPLACE_MBSNRTOWCS
1365 REPLACE_MBSRTOWCS
1366 REPLACE_MBRLEN
1367 REPLACE_MBRTOWC
1368 REPLACE_MBSINIT
1369 REPLACE_WCTOB
1370 REPLACE_BTOWC
1371 REPLACE_MBSTATE_T
1372 HAVE_DECL_WCWIDTH
1373 HAVE_DECL_WCTOB
1374 HAVE_WCSWIDTH
1375 HAVE_WCSTOK
1376 HAVE_WCSSTR
1377 HAVE_WCSPBRK
1378 HAVE_WCSSPN
1379 HAVE_WCSCSPN
1380 HAVE_WCSRCHR
1381 HAVE_WCSCHR
1382 HAVE_WCSDUP
1383 HAVE_WCSXFRM
1384 HAVE_WCSCOLL
1385 HAVE_WCSNCASECMP
1386 HAVE_WCSCASECMP
1387 HAVE_WCSNCMP
1388 HAVE_WCSCMP
1389 HAVE_WCSNCAT
1390 HAVE_WCSCAT
1391 HAVE_WCPNCPY
1392 HAVE_WCSNCPY
1393 HAVE_WCPCPY
1394 HAVE_WCSCPY
1395 HAVE_WCSNLEN
1396 HAVE_WCSLEN
1397 HAVE_WMEMSET
1398 HAVE_WMEMMOVE
1399 HAVE_WMEMCPY
1400 HAVE_WMEMCMP
1401 HAVE_WMEMCHR
1402 HAVE_WCSNRTOMBS
1403 HAVE_WCSRTOMBS
1404 HAVE_WCRTOMB
1405 HAVE_MBSNRTOWCS
1406 HAVE_MBSRTOWCS
1407 HAVE_MBRLEN
1408 HAVE_MBRTOWC
1409 HAVE_MBSINIT
1410 HAVE_BTOWC
1411 GNULIB_WCSWIDTH
1412 GNULIB_WCSTOK
1413 GNULIB_WCSSTR
1414 GNULIB_WCSPBRK
1415 GNULIB_WCSSPN
1416 GNULIB_WCSCSPN
1417 GNULIB_WCSRCHR
1418 GNULIB_WCSCHR
1419 GNULIB_WCSDUP
1420 GNULIB_WCSXFRM
1421 GNULIB_WCSCOLL
1422 GNULIB_WCSNCASECMP
1423 GNULIB_WCSCASECMP
1424 GNULIB_WCSNCMP
1425 GNULIB_WCSCMP
1426 GNULIB_WCSNCAT
1427 GNULIB_WCSCAT
1428 GNULIB_WCPNCPY
1429 GNULIB_WCSNCPY
1430 GNULIB_WCPCPY
1431 GNULIB_WCSCPY
1432 GNULIB_WCSNLEN
1433 GNULIB_WCSLEN
1434 GNULIB_WMEMSET
1435 GNULIB_WMEMMOVE
1436 GNULIB_WMEMCPY
1437 GNULIB_WMEMCMP
1438 GNULIB_WMEMCHR
1439 GNULIB_WCWIDTH
1440 GNULIB_WCSNRTOMBS
1441 GNULIB_WCSRTOMBS
1442 GNULIB_WCRTOMB
1443 GNULIB_MBSNRTOWCS
1444 GNULIB_MBSRTOWCS
1445 GNULIB_MBRLEN
1446 GNULIB_MBRTOWC
1447 GNULIB_MBSINIT
1448 GNULIB_WCTOB
1449 GNULIB_BTOWC
1450 host_os
1451 host_vendor
1452 host_cpu
1453 host
1454 build_os
1455 build_vendor
1456 build_cpu
1457 build
1458 GL_GENERATE_ALLOCA_H_FALSE
1459 GL_GENERATE_ALLOCA_H_TRUE
1460 ALLOCA_H
1461 ALLOCA
1462 USE_ACL
1463 LIB_ACL
1464 GL_COND_LIBTOOL_FALSE
1465 GL_COND_LIBTOOL_TRUE
1466 ac_ct_AR
1467 ARFLAGS
1468 AR
1469 EGREP
1470 GREP
1471 CPP
1472 YFLAGS
1473 YACC
1474 RANLIB
1475 am__fastdepCC_FALSE
1476 am__fastdepCC_TRUE
1477 CCDEPMODE
1478 am__nodep
1479 AMDEPBACKSLASH
1480 AMDEP_FALSE
1481 AMDEP_TRUE
1482 am__quote
1483 am__include
1484 DEPDIR
1485 OBJEXT
1486 EXEEXT
1487 ac_ct_CC
1488 CPPFLAGS
1489 LDFLAGS
1490 CFLAGS
1491 CC
1492 AM_BACKSLASH
1493 AM_DEFAULT_VERBOSITY
1494 AM_DEFAULT_V
1495 AM_V
1496 am__untar
1497 am__tar
1498 AMTAR
1499 am__leading_dot
1500 SET_MAKE
1501 AWK
1502 mkdir_p
1503 MKDIR_P
1504 INSTALL_STRIP_PROGRAM
1505 STRIP
1506 install_sh
1507 MAKEINFO
1508 AUTOHEADER
1509 AUTOMAKE
1510 AUTOCONF
1511 ACLOCAL
1512 VERSION
1513 PACKAGE
1514 CYGPATH_W
1515 am__isrc
1516 INSTALL_DATA
1517 INSTALL_SCRIPT
1518 INSTALL_PROGRAM
1519 target_alias
1520 host_alias
1521 build_alias
1522 LIBS
1523 ECHO_T
1524 ECHO_N
1525 ECHO_C
1526 DEFS
1527 mandir
1528 localedir
1529 libdir
1530 psdir
1531 pdfdir
1532 dvidir
1533 htmldir
1534 infodir
1535 docdir
1536 oldincludedir
1537 includedir
1538 localstatedir
1539 sharedstatedir
1540 sysconfdir
1541 datadir
1542 datarootdir
1543 libexecdir
1544 sbindir
1545 bindir
1546 program_transform_name
1547 prefix
1548 exec_prefix
1549 PACKAGE_URL
1550 PACKAGE_BUGREPORT
1551 PACKAGE_STRING
1552 PACKAGE_VERSION
1553 PACKAGE_TARNAME
1554 PACKAGE_NAME
1555 PATH_SEPARATOR
1556 SHELL'
1557 ac_subst_files=''
1558 ac_user_opts='
1559 enable_option_checking
1560 enable_silent_rules
1561 enable_dependency_tracking
1562 enable_largefile
1563 with_posix_acls
1564 enable_acl
1565 with_included_regex
1566 with_selinux
1567 with_packager
1568 with_packager_version
1569 with_packager_bug_reports
1570 with_rmt
1571 enable_gcc_warnings
1572 with_xattrs
1573 with_compress
1574 with_gzip
1575 with_bzip2
1576 with_lzip
1577 with_lzma
1578 with_lzop
1579 with_xz
1580 with_gnu_ld
1581 enable_rpath
1582 with_libiconv_prefix
1583 enable_nls
1584 with_libintl_prefix
1585 enable_backup_scripts
1586 '
1587       ac_precious_vars='build_alias
1588 host_alias
1589 target_alias
1590 CC
1591 CFLAGS
1592 LDFLAGS
1593 LIBS
1594 CPPFLAGS
1595 YACC
1596 YFLAGS
1597 CPP
1598 DEFAULT_RMT_DIR
1599 RSH
1600 DEFAULT_ARCHIVE_FORMAT
1601 DEFAULT_ARCHIVE
1602 DEFAULT_BLOCKING
1603 DEFAULT_QUOTING_STYLE'
1604
1605
1606 # Initialize some variables set by options.
1607 ac_init_help=
1608 ac_init_version=false
1609 ac_unrecognized_opts=
1610 ac_unrecognized_sep=
1611 # The variables have the same names as the options, with
1612 # dashes changed to underlines.
1613 cache_file=/dev/null
1614 exec_prefix=NONE
1615 no_create=
1616 no_recursion=
1617 prefix=NONE
1618 program_prefix=NONE
1619 program_suffix=NONE
1620 program_transform_name=s,x,x,
1621 silent=
1622 site=
1623 srcdir=
1624 verbose=
1625 x_includes=NONE
1626 x_libraries=NONE
1627
1628 # Installation directory options.
1629 # These are left unexpanded so users can "make install exec_prefix=/foo"
1630 # and all the variables that are supposed to be based on exec_prefix
1631 # by default will actually change.
1632 # Use braces instead of parens because sh, perl, etc. also accept them.
1633 # (The list follows the same order as the GNU Coding Standards.)
1634 bindir='${exec_prefix}/bin'
1635 sbindir='${exec_prefix}/sbin'
1636 libexecdir='${exec_prefix}/libexec'
1637 datarootdir='${prefix}/share'
1638 datadir='${datarootdir}'
1639 sysconfdir='${prefix}/etc'
1640 sharedstatedir='${prefix}/com'
1641 localstatedir='${prefix}/var'
1642 includedir='${prefix}/include'
1643 oldincludedir='/usr/include'
1644 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1645 infodir='${datarootdir}/info'
1646 htmldir='${docdir}'
1647 dvidir='${docdir}'
1648 pdfdir='${docdir}'
1649 psdir='${docdir}'
1650 libdir='${exec_prefix}/lib'
1651 localedir='${datarootdir}/locale'
1652 mandir='${datarootdir}/man'
1653
1654 ac_prev=
1655 ac_dashdash=
1656 for ac_option
1657 do
1658   # If the previous option needs an argument, assign it.
1659   if test -n "$ac_prev"; then
1660     eval $ac_prev=\$ac_option
1661     ac_prev=
1662     continue
1663   fi
1664
1665   case $ac_option in
1666   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1667   *=)   ac_optarg= ;;
1668   *)    ac_optarg=yes ;;
1669   esac
1670
1671   # Accept the important Cygnus configure options, so we can diagnose typos.
1672
1673   case $ac_dashdash$ac_option in
1674   --)
1675     ac_dashdash=yes ;;
1676
1677   -bindir | --bindir | --bindi | --bind | --bin | --bi)
1678     ac_prev=bindir ;;
1679   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1680     bindir=$ac_optarg ;;
1681
1682   -build | --build | --buil | --bui | --bu)
1683     ac_prev=build_alias ;;
1684   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1685     build_alias=$ac_optarg ;;
1686
1687   -cache-file | --cache-file | --cache-fil | --cache-fi \
1688   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1689     ac_prev=cache_file ;;
1690   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1691   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1692     cache_file=$ac_optarg ;;
1693
1694   --config-cache | -C)
1695     cache_file=config.cache ;;
1696
1697   -datadir | --datadir | --datadi | --datad)
1698     ac_prev=datadir ;;
1699   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1700     datadir=$ac_optarg ;;
1701
1702   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1703   | --dataroo | --dataro | --datar)
1704     ac_prev=datarootdir ;;
1705   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1706   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1707     datarootdir=$ac_optarg ;;
1708
1709   -disable-* | --disable-*)
1710     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1711     # Reject names that are not valid shell variable names.
1712     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1713       as_fn_error $? "invalid feature name: $ac_useropt"
1714     ac_useropt_orig=$ac_useropt
1715     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1716     case $ac_user_opts in
1717       *"
1718 "enable_$ac_useropt"
1719 "*) ;;
1720       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1721          ac_unrecognized_sep=', ';;
1722     esac
1723     eval enable_$ac_useropt=no ;;
1724
1725   -docdir | --docdir | --docdi | --doc | --do)
1726     ac_prev=docdir ;;
1727   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1728     docdir=$ac_optarg ;;
1729
1730   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1731     ac_prev=dvidir ;;
1732   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1733     dvidir=$ac_optarg ;;
1734
1735   -enable-* | --enable-*)
1736     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1737     # Reject names that are not valid shell variable names.
1738     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1739       as_fn_error $? "invalid feature name: $ac_useropt"
1740     ac_useropt_orig=$ac_useropt
1741     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1742     case $ac_user_opts in
1743       *"
1744 "enable_$ac_useropt"
1745 "*) ;;
1746       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1747          ac_unrecognized_sep=', ';;
1748     esac
1749     eval enable_$ac_useropt=\$ac_optarg ;;
1750
1751   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1752   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1753   | --exec | --exe | --ex)
1754     ac_prev=exec_prefix ;;
1755   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1756   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1757   | --exec=* | --exe=* | --ex=*)
1758     exec_prefix=$ac_optarg ;;
1759
1760   -gas | --gas | --ga | --g)
1761     # Obsolete; use --with-gas.
1762     with_gas=yes ;;
1763
1764   -help | --help | --hel | --he | -h)
1765     ac_init_help=long ;;
1766   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1767     ac_init_help=recursive ;;
1768   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1769     ac_init_help=short ;;
1770
1771   -host | --host | --hos | --ho)
1772     ac_prev=host_alias ;;
1773   -host=* | --host=* | --hos=* | --ho=*)
1774     host_alias=$ac_optarg ;;
1775
1776   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1777     ac_prev=htmldir ;;
1778   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1779   | --ht=*)
1780     htmldir=$ac_optarg ;;
1781
1782   -includedir | --includedir | --includedi | --included | --include \
1783   | --includ | --inclu | --incl | --inc)
1784     ac_prev=includedir ;;
1785   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1786   | --includ=* | --inclu=* | --incl=* | --inc=*)
1787     includedir=$ac_optarg ;;
1788
1789   -infodir | --infodir | --infodi | --infod | --info | --inf)
1790     ac_prev=infodir ;;
1791   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1792     infodir=$ac_optarg ;;
1793
1794   -libdir | --libdir | --libdi | --libd)
1795     ac_prev=libdir ;;
1796   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1797     libdir=$ac_optarg ;;
1798
1799   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1800   | --libexe | --libex | --libe)
1801     ac_prev=libexecdir ;;
1802   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1803   | --libexe=* | --libex=* | --libe=*)
1804     libexecdir=$ac_optarg ;;
1805
1806   -localedir | --localedir | --localedi | --localed | --locale)
1807     ac_prev=localedir ;;
1808   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1809     localedir=$ac_optarg ;;
1810
1811   -localstatedir | --localstatedir | --localstatedi | --localstated \
1812   | --localstate | --localstat | --localsta | --localst | --locals)
1813     ac_prev=localstatedir ;;
1814   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1815   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1816     localstatedir=$ac_optarg ;;
1817
1818   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1819     ac_prev=mandir ;;
1820   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1821     mandir=$ac_optarg ;;
1822
1823   -nfp | --nfp | --nf)
1824     # Obsolete; use --without-fp.
1825     with_fp=no ;;
1826
1827   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1828   | --no-cr | --no-c | -n)
1829     no_create=yes ;;
1830
1831   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1832   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1833     no_recursion=yes ;;
1834
1835   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1836   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1837   | --oldin | --oldi | --old | --ol | --o)
1838     ac_prev=oldincludedir ;;
1839   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1840   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1841   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1842     oldincludedir=$ac_optarg ;;
1843
1844   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1845     ac_prev=prefix ;;
1846   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1847     prefix=$ac_optarg ;;
1848
1849   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1850   | --program-pre | --program-pr | --program-p)
1851     ac_prev=program_prefix ;;
1852   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1853   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1854     program_prefix=$ac_optarg ;;
1855
1856   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1857   | --program-suf | --program-su | --program-s)
1858     ac_prev=program_suffix ;;
1859   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1860   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1861     program_suffix=$ac_optarg ;;
1862
1863   -program-transform-name | --program-transform-name \
1864   | --program-transform-nam | --program-transform-na \
1865   | --program-transform-n | --program-transform- \
1866   | --program-transform | --program-transfor \
1867   | --program-transfo | --program-transf \
1868   | --program-trans | --program-tran \
1869   | --progr-tra | --program-tr | --program-t)
1870     ac_prev=program_transform_name ;;
1871   -program-transform-name=* | --program-transform-name=* \
1872   | --program-transform-nam=* | --program-transform-na=* \
1873   | --program-transform-n=* | --program-transform-=* \
1874   | --program-transform=* | --program-transfor=* \
1875   | --program-transfo=* | --program-transf=* \
1876   | --program-trans=* | --program-tran=* \
1877   | --progr-tra=* | --program-tr=* | --program-t=*)
1878     program_transform_name=$ac_optarg ;;
1879
1880   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1881     ac_prev=pdfdir ;;
1882   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1883     pdfdir=$ac_optarg ;;
1884
1885   -psdir | --psdir | --psdi | --psd | --ps)
1886     ac_prev=psdir ;;
1887   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1888     psdir=$ac_optarg ;;
1889
1890   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1891   | -silent | --silent | --silen | --sile | --sil)
1892     silent=yes ;;
1893
1894   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1895     ac_prev=sbindir ;;
1896   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1897   | --sbi=* | --sb=*)
1898     sbindir=$ac_optarg ;;
1899
1900   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1901   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1902   | --sharedst | --shareds | --shared | --share | --shar \
1903   | --sha | --sh)
1904     ac_prev=sharedstatedir ;;
1905   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1906   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1907   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1908   | --sha=* | --sh=*)
1909     sharedstatedir=$ac_optarg ;;
1910
1911   -site | --site | --sit)
1912     ac_prev=site ;;
1913   -site=* | --site=* | --sit=*)
1914     site=$ac_optarg ;;
1915
1916   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1917     ac_prev=srcdir ;;
1918   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1919     srcdir=$ac_optarg ;;
1920
1921   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1922   | --syscon | --sysco | --sysc | --sys | --sy)
1923     ac_prev=sysconfdir ;;
1924   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1925   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1926     sysconfdir=$ac_optarg ;;
1927
1928   -target | --target | --targe | --targ | --tar | --ta | --t)
1929     ac_prev=target_alias ;;
1930   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1931     target_alias=$ac_optarg ;;
1932
1933   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1934     verbose=yes ;;
1935
1936   -version | --version | --versio | --versi | --vers | -V)
1937     ac_init_version=: ;;
1938
1939   -with-* | --with-*)
1940     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1941     # Reject names that are not valid shell variable names.
1942     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1943       as_fn_error $? "invalid package name: $ac_useropt"
1944     ac_useropt_orig=$ac_useropt
1945     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1946     case $ac_user_opts in
1947       *"
1948 "with_$ac_useropt"
1949 "*) ;;
1950       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1951          ac_unrecognized_sep=', ';;
1952     esac
1953     eval with_$ac_useropt=\$ac_optarg ;;
1954
1955   -without-* | --without-*)
1956     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1957     # Reject names that are not valid shell variable names.
1958     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1959       as_fn_error $? "invalid package name: $ac_useropt"
1960     ac_useropt_orig=$ac_useropt
1961     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1962     case $ac_user_opts in
1963       *"
1964 "with_$ac_useropt"
1965 "*) ;;
1966       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1967          ac_unrecognized_sep=', ';;
1968     esac
1969     eval with_$ac_useropt=no ;;
1970
1971   --x)
1972     # Obsolete; use --with-x.
1973     with_x=yes ;;
1974
1975   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1976   | --x-incl | --x-inc | --x-in | --x-i)
1977     ac_prev=x_includes ;;
1978   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1979   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1980     x_includes=$ac_optarg ;;
1981
1982   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1983   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1984     ac_prev=x_libraries ;;
1985   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1986   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1987     x_libraries=$ac_optarg ;;
1988
1989   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1990 Try \`$0 --help' for more information"
1991     ;;
1992
1993   *=*)
1994     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1995     # Reject names that are not valid shell variable names.
1996     case $ac_envvar in #(
1997       '' | [0-9]* | *[!_$as_cr_alnum]* )
1998       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1999     esac
2000     eval $ac_envvar=\$ac_optarg
2001     export $ac_envvar ;;
2002
2003   *)
2004     # FIXME: should be removed in autoconf 3.0.
2005     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
2006     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
2007       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
2008     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
2009     ;;
2010
2011   esac
2012 done
2013
2014 if test -n "$ac_prev"; then
2015   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
2016   as_fn_error $? "missing argument to $ac_option"
2017 fi
2018
2019 if test -n "$ac_unrecognized_opts"; then
2020   case $enable_option_checking in
2021     no) ;;
2022     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
2023     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
2024   esac
2025 fi
2026
2027 # Check all directory arguments for consistency.
2028 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
2029                 datadir sysconfdir sharedstatedir localstatedir includedir \
2030                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
2031                 libdir localedir mandir
2032 do
2033   eval ac_val=\$$ac_var
2034   # Remove trailing slashes.
2035   case $ac_val in
2036     */ )
2037       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
2038       eval $ac_var=\$ac_val;;
2039   esac
2040   # Be sure to have absolute directory names.
2041   case $ac_val in
2042     [\\/$]* | ?:[\\/]* )  continue;;
2043     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
2044   esac
2045   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
2046 done
2047
2048 # There might be people who depend on the old broken behavior: `$host'
2049 # used to hold the argument of --host etc.
2050 # FIXME: To remove some day.
2051 build=$build_alias
2052 host=$host_alias
2053 target=$target_alias
2054
2055 # FIXME: To remove some day.
2056 if test "x$host_alias" != x; then
2057   if test "x$build_alias" = x; then
2058     cross_compiling=maybe
2059   elif test "x$build_alias" != "x$host_alias"; then
2060     cross_compiling=yes
2061   fi
2062 fi
2063
2064 ac_tool_prefix=
2065 test -n "$host_alias" && ac_tool_prefix=$host_alias-
2066
2067 test "$silent" = yes && exec 6>/dev/null
2068
2069
2070 ac_pwd=`pwd` && test -n "$ac_pwd" &&
2071 ac_ls_di=`ls -di .` &&
2072 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
2073   as_fn_error $? "working directory cannot be determined"
2074 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
2075   as_fn_error $? "pwd does not report name of working directory"
2076
2077
2078 # Find the source files, if location was not specified.
2079 if test -z "$srcdir"; then
2080   ac_srcdir_defaulted=yes
2081   # Try the directory containing this script, then the parent directory.
2082   ac_confdir=`$as_dirname -- "$as_myself" ||
2083 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
2084          X"$as_myself" : 'X\(//\)[^/]' \| \
2085          X"$as_myself" : 'X\(//\)$' \| \
2086          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
2087 $as_echo X"$as_myself" |
2088     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
2089             s//\1/
2090             q
2091           }
2092           /^X\(\/\/\)[^/].*/{
2093             s//\1/
2094             q
2095           }
2096           /^X\(\/\/\)$/{
2097             s//\1/
2098             q
2099           }
2100           /^X\(\/\).*/{
2101             s//\1/
2102             q
2103           }
2104           s/.*/./; q'`
2105   srcdir=$ac_confdir
2106   if test ! -r "$srcdir/$ac_unique_file"; then
2107     srcdir=..
2108   fi
2109 else
2110   ac_srcdir_defaulted=no
2111 fi
2112 if test ! -r "$srcdir/$ac_unique_file"; then
2113   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
2114   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
2115 fi
2116 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
2117 ac_abs_confdir=`(
2118         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
2119         pwd)`
2120 # When building in place, set srcdir=.
2121 if test "$ac_abs_confdir" = "$ac_pwd"; then
2122   srcdir=.
2123 fi
2124 # Remove unnecessary trailing slashes from srcdir.
2125 # Double slashes in file names in object file debugging info
2126 # mess up M-x gdb in Emacs.
2127 case $srcdir in
2128 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
2129 esac
2130 for ac_var in $ac_precious_vars; do
2131   eval ac_env_${ac_var}_set=\${${ac_var}+set}
2132   eval ac_env_${ac_var}_value=\$${ac_var}
2133   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
2134   eval ac_cv_env_${ac_var}_value=\$${ac_var}
2135 done
2136
2137 #
2138 # Report the --help message.
2139 #
2140 if test "$ac_init_help" = "long"; then
2141   # Omit some internal or obsolete options to make the list less imposing.
2142   # This message is too long to be a string in the A/UX 3.1 sh.
2143   cat <<_ACEOF
2144 \`configure' configures GNU tar 1.29 to adapt to many kinds of systems.
2145
2146 Usage: $0 [OPTION]... [VAR=VALUE]...
2147
2148 To assign environment variables (e.g., CC, CFLAGS...), specify them as
2149 VAR=VALUE.  See below for descriptions of some of the useful variables.
2150
2151 Defaults for the options are specified in brackets.
2152
2153 Configuration:
2154   -h, --help              display this help and exit
2155       --help=short        display options specific to this package
2156       --help=recursive    display the short help of all the included packages
2157   -V, --version           display version information and exit
2158   -q, --quiet, --silent   do not print \`checking ...' messages
2159       --cache-file=FILE   cache test results in FILE [disabled]
2160   -C, --config-cache      alias for \`--cache-file=config.cache'
2161   -n, --no-create         do not create output files
2162       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
2163
2164 Installation directories:
2165   --prefix=PREFIX         install architecture-independent files in PREFIX
2166                           [$ac_default_prefix]
2167   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
2168                           [PREFIX]
2169
2170 By default, \`make install' will install all the files in
2171 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
2172 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
2173 for instance \`--prefix=\$HOME'.
2174
2175 For better control, use the options below.
2176
2177 Fine tuning of the installation directories:
2178   --bindir=DIR            user executables [EPREFIX/bin]
2179   --sbindir=DIR           system admin executables [EPREFIX/sbin]
2180   --libexecdir=DIR        program executables [EPREFIX/libexec]
2181   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
2182   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
2183   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
2184   --libdir=DIR            object code libraries [EPREFIX/lib]
2185   --includedir=DIR        C header files [PREFIX/include]
2186   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
2187   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
2188   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
2189   --infodir=DIR           info documentation [DATAROOTDIR/info]
2190   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
2191   --mandir=DIR            man documentation [DATAROOTDIR/man]
2192   --docdir=DIR            documentation root [DATAROOTDIR/doc/tar]
2193   --htmldir=DIR           html documentation [DOCDIR]
2194   --dvidir=DIR            dvi documentation [DOCDIR]
2195   --pdfdir=DIR            pdf documentation [DOCDIR]
2196   --psdir=DIR             ps documentation [DOCDIR]
2197 _ACEOF
2198
2199   cat <<\_ACEOF
2200
2201 Program names:
2202   --program-prefix=PREFIX            prepend PREFIX to installed program names
2203   --program-suffix=SUFFIX            append SUFFIX to installed program names
2204   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
2205
2206 System types:
2207   --build=BUILD     configure for building on BUILD [guessed]
2208   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
2209 _ACEOF
2210 fi
2211
2212 if test -n "$ac_init_help"; then
2213   case $ac_init_help in
2214      short | recursive ) echo "Configuration of GNU tar 1.29:";;
2215    esac
2216   cat <<\_ACEOF
2217
2218 Optional Features:
2219   --disable-option-checking  ignore unrecognized --enable/--with options
2220   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
2221   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
2222   --enable-silent-rules   less verbose build output (undo: "make V=1")
2223   --disable-silent-rules  verbose build output (undo: "make V=0")
2224   --enable-dependency-tracking
2225                           do not reject slow dependency extractors
2226   --disable-dependency-tracking
2227                           speeds up one-time build
2228   --disable-largefile     omit support for large files
2229   --disable-acl           do not support ACLs
2230   --enable-gcc-warnings   turn on many GCC warnings (for developers; best with
2231                           GNU make)
2232   --disable-rpath         do not hardcode runtime library paths
2233   --disable-nls           do not use Native Language Support
2234   --enable-backup-scripts Create and install backup and restore scripts
2235
2236 Optional Packages:
2237   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2238   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2239   --without-posix-acls    do not use POSIX.1e access control lists
2240   --without-included-regex
2241                           don't compile regex; this is the default on systems
2242                           with recent-enough versions of the GNU C Library
2243                           (use with caution on other systems).
2244   --without-selinux       do not use SELinux, even on systems with SELinux
2245   --with-packager         String identifying the packager of this software
2246   --with-packager-version Packager-specific version information
2247   --with-packager-bug-reports
2248                           Packager info for bug reports (URL/e-mail/...)
2249   --with-rmt=FILE         Use FILE as the default `rmt' program. Do not build
2250                           included copy of `rmt'.
2251   --without-xattrs        don't use linux extended attributes
2252   --with-compress=PROG    use PROG as compress compressor program
2253   --with-gzip=PROG        use PROG as gzip compressor program
2254   --with-bzip2=PROG       use PROG as bzip2 compressor program
2255   --with-lzip=PROG        use PROG as lzip compressor program
2256   --with-lzma=PROG        use PROG as lzma compressor program
2257   --with-lzop=PROG        use PROG as lzop compressor program
2258   --with-xz=PROG          use PROG as xz compressor program
2259   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
2260   --with-libiconv-prefix[=DIR]  search for libiconv in DIR/include and DIR/lib
2261   --without-libiconv-prefix     don't search for libiconv in includedir and libdir
2262   --with-libintl-prefix[=DIR]  search for libintl in DIR/include and DIR/lib
2263   --without-libintl-prefix     don't search for libintl in includedir and libdir
2264
2265 Some influential environment variables:
2266   CC          C compiler command
2267   CFLAGS      C compiler flags
2268   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2269               nonstandard directory <lib dir>
2270   LIBS        libraries to pass to the linker, e.g. -l<library>
2271   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2272               you have headers in a nonstandard directory <include dir>
2273   YACC        The `Yet Another Compiler Compiler' implementation to use.
2274               Defaults to the first program found out of: `bison -y', `byacc',
2275               `yacc'.
2276   YFLAGS      The list of arguments that will be passed by default to $YACC.
2277               This script will default YFLAGS to the empty string to avoid a
2278               default value of `-d' given by some make applications.
2279   CPP         C preprocessor
2280   DEFAULT_RMT_DIR
2281               Define full file name of the directory where to install `rmt'.
2282               (default: $(libexecdir))
2283   RSH         Configure absolute path to default remote shell binary
2284   DEFAULT_ARCHIVE_FORMAT
2285               Set the default archive format. Allowed values are: V7, OLDGNU,
2286               USTAR, POSIX, GNU. Default is GNU
2287   DEFAULT_ARCHIVE
2288               Set the name of the default archive (default: -)
2289   DEFAULT_BLOCKING
2290               Define default blocking factor (default: 20)
2291   DEFAULT_QUOTING_STYLE
2292               Set the default quoting style. Allowed values are: literal,
2293               shell, shell-always, c, escape, locale, clocale . Default is
2294               "escape".
2295
2296 Use these variables to override the choices made by `configure' or to help
2297 it to find libraries and programs with nonstandard names/locations.
2298
2299 Report bugs to <bug-tar@gnu.org>.
2300 GNU tar home page: <http://www.gnu.org/software/tar/>.
2301 General help using GNU software: <http://www.gnu.org/gethelp/>.
2302 _ACEOF
2303 ac_status=$?
2304 fi
2305
2306 if test "$ac_init_help" = "recursive"; then
2307   # If there are subdirs, report their specific --help.
2308   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2309     test -d "$ac_dir" ||
2310       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2311       continue
2312     ac_builddir=.
2313
2314 case "$ac_dir" in
2315 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2316 *)
2317   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2318   # A ".." for each directory in $ac_dir_suffix.
2319   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2320   case $ac_top_builddir_sub in
2321   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2322   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2323   esac ;;
2324 esac
2325 ac_abs_top_builddir=$ac_pwd
2326 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2327 # for backward compatibility:
2328 ac_top_builddir=$ac_top_build_prefix
2329
2330 case $srcdir in
2331   .)  # We are building in place.
2332     ac_srcdir=.
2333     ac_top_srcdir=$ac_top_builddir_sub
2334     ac_abs_top_srcdir=$ac_pwd ;;
2335   [\\/]* | ?:[\\/]* )  # Absolute name.
2336     ac_srcdir=$srcdir$ac_dir_suffix;
2337     ac_top_srcdir=$srcdir
2338     ac_abs_top_srcdir=$srcdir ;;
2339   *) # Relative name.
2340     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2341     ac_top_srcdir=$ac_top_build_prefix$srcdir
2342     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2343 esac
2344 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2345
2346     cd "$ac_dir" || { ac_status=$?; continue; }
2347     # Check for guested configure.
2348     if test -f "$ac_srcdir/configure.gnu"; then
2349       echo &&
2350       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2351     elif test -f "$ac_srcdir/configure"; then
2352       echo &&
2353       $SHELL "$ac_srcdir/configure" --help=recursive
2354     else
2355       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2356     fi || ac_status=$?
2357     cd "$ac_pwd" || { ac_status=$?; break; }
2358   done
2359 fi
2360
2361 test -n "$ac_init_help" && exit $ac_status
2362 if $ac_init_version; then
2363   cat <<\_ACEOF
2364 GNU tar configure 1.29
2365 generated by GNU Autoconf 2.69
2366
2367 Copyright (C) 2012 Free Software Foundation, Inc.
2368 This configure script is free software; the Free Software Foundation
2369 gives unlimited permission to copy, distribute and modify it.
2370 _ACEOF
2371   exit
2372 fi
2373
2374 ## ------------------------ ##
2375 ## Autoconf initialization. ##
2376 ## ------------------------ ##
2377
2378 # ac_fn_c_try_compile LINENO
2379 # --------------------------
2380 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2381 ac_fn_c_try_compile ()
2382 {
2383   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2384   rm -f conftest.$ac_objext
2385   if { { ac_try="$ac_compile"
2386 case "(($ac_try" in
2387   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2388   *) ac_try_echo=$ac_try;;
2389 esac
2390 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2391 $as_echo "$ac_try_echo"; } >&5
2392   (eval "$ac_compile") 2>conftest.err
2393   ac_status=$?
2394   if test -s conftest.err; then
2395     grep -v '^ *+' conftest.err >conftest.er1
2396     cat conftest.er1 >&5
2397     mv -f conftest.er1 conftest.err
2398   fi
2399   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2400   test $ac_status = 0; } && {
2401          test -z "$ac_c_werror_flag" ||
2402          test ! -s conftest.err
2403        } && test -s conftest.$ac_objext; then :
2404   ac_retval=0
2405 else
2406   $as_echo "$as_me: failed program was:" >&5
2407 sed 's/^/| /' conftest.$ac_ext >&5
2408
2409         ac_retval=1
2410 fi
2411   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2412   as_fn_set_status $ac_retval
2413
2414 } # ac_fn_c_try_compile
2415
2416 # ac_fn_c_try_cpp LINENO
2417 # ----------------------
2418 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2419 ac_fn_c_try_cpp ()
2420 {
2421   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2422   if { { ac_try="$ac_cpp conftest.$ac_ext"
2423 case "(($ac_try" in
2424   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2425   *) ac_try_echo=$ac_try;;
2426 esac
2427 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2428 $as_echo "$ac_try_echo"; } >&5
2429   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2430   ac_status=$?
2431   if test -s conftest.err; then
2432     grep -v '^ *+' conftest.err >conftest.er1
2433     cat conftest.er1 >&5
2434     mv -f conftest.er1 conftest.err
2435   fi
2436   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2437   test $ac_status = 0; } > conftest.i && {
2438          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2439          test ! -s conftest.err
2440        }; then :
2441   ac_retval=0
2442 else
2443   $as_echo "$as_me: failed program was:" >&5
2444 sed 's/^/| /' conftest.$ac_ext >&5
2445
2446     ac_retval=1
2447 fi
2448   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2449   as_fn_set_status $ac_retval
2450
2451 } # ac_fn_c_try_cpp
2452
2453 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
2454 # -------------------------------------------------------
2455 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2456 # the include files in INCLUDES and setting the cache variable VAR
2457 # accordingly.
2458 ac_fn_c_check_header_mongrel ()
2459 {
2460   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2461   if eval \${$3+:} false; then :
2462   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2463 $as_echo_n "checking for $2... " >&6; }
2464 if eval \${$3+:} false; then :
2465   $as_echo_n "(cached) " >&6
2466 fi
2467 eval ac_res=\$$3
2468                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2469 $as_echo "$ac_res" >&6; }
2470 else
2471   # Is the header compilable?
2472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2473 $as_echo_n "checking $2 usability... " >&6; }
2474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2475 /* end confdefs.h.  */
2476 $4
2477 #include <$2>
2478 _ACEOF
2479 if ac_fn_c_try_compile "$LINENO"; then :
2480   ac_header_compiler=yes
2481 else
2482   ac_header_compiler=no
2483 fi
2484 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2486 $as_echo "$ac_header_compiler" >&6; }
2487
2488 # Is the header present?
2489 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2490 $as_echo_n "checking $2 presence... " >&6; }
2491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2492 /* end confdefs.h.  */
2493 #include <$2>
2494 _ACEOF
2495 if ac_fn_c_try_cpp "$LINENO"; then :
2496   ac_header_preproc=yes
2497 else
2498   ac_header_preproc=no
2499 fi
2500 rm -f conftest.err conftest.i conftest.$ac_ext
2501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2502 $as_echo "$ac_header_preproc" >&6; }
2503
2504 # So?  What about this header?
2505 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2506   yes:no: )
2507     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2508 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2509     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2510 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2511     ;;
2512   no:yes:* )
2513     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2514 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2515     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2516 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2517     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2518 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2519     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2520 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2521     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2522 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2523 ( $as_echo "## ------------------------------ ##
2524 ## Report this to bug-tar@gnu.org ##
2525 ## ------------------------------ ##"
2526      ) | sed "s/^/$as_me: WARNING:     /" >&2
2527     ;;
2528 esac
2529   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2530 $as_echo_n "checking for $2... " >&6; }
2531 if eval \${$3+:} false; then :
2532   $as_echo_n "(cached) " >&6
2533 else
2534   eval "$3=\$ac_header_compiler"
2535 fi
2536 eval ac_res=\$$3
2537                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2538 $as_echo "$ac_res" >&6; }
2539 fi
2540   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2541
2542 } # ac_fn_c_check_header_mongrel
2543
2544 # ac_fn_c_try_run LINENO
2545 # ----------------------
2546 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2547 # that executables *can* be run.
2548 ac_fn_c_try_run ()
2549 {
2550   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2551   if { { ac_try="$ac_link"
2552 case "(($ac_try" in
2553   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2554   *) ac_try_echo=$ac_try;;
2555 esac
2556 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2557 $as_echo "$ac_try_echo"; } >&5
2558   (eval "$ac_link") 2>&5
2559   ac_status=$?
2560   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2561   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2562   { { case "(($ac_try" in
2563   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2564   *) ac_try_echo=$ac_try;;
2565 esac
2566 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2567 $as_echo "$ac_try_echo"; } >&5
2568   (eval "$ac_try") 2>&5
2569   ac_status=$?
2570   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2571   test $ac_status = 0; }; }; then :
2572   ac_retval=0
2573 else
2574   $as_echo "$as_me: program exited with status $ac_status" >&5
2575        $as_echo "$as_me: failed program was:" >&5
2576 sed 's/^/| /' conftest.$ac_ext >&5
2577
2578        ac_retval=$ac_status
2579 fi
2580   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2581   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2582   as_fn_set_status $ac_retval
2583
2584 } # ac_fn_c_try_run
2585
2586 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2587 # -------------------------------------------------------
2588 # Tests whether HEADER exists and can be compiled using the include files in
2589 # INCLUDES, setting the cache variable VAR accordingly.
2590 ac_fn_c_check_header_compile ()
2591 {
2592   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2593   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2594 $as_echo_n "checking for $2... " >&6; }
2595 if eval \${$3+:} false; then :
2596   $as_echo_n "(cached) " >&6
2597 else
2598   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2599 /* end confdefs.h.  */
2600 $4
2601 #include <$2>
2602 _ACEOF
2603 if ac_fn_c_try_compile "$LINENO"; then :
2604   eval "$3=yes"
2605 else
2606   eval "$3=no"
2607 fi
2608 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2609 fi
2610 eval ac_res=\$$3
2611                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2612 $as_echo "$ac_res" >&6; }
2613   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2614
2615 } # ac_fn_c_check_header_compile
2616
2617 # ac_fn_c_try_link LINENO
2618 # -----------------------
2619 # Try to link conftest.$ac_ext, and return whether this succeeded.
2620 ac_fn_c_try_link ()
2621 {
2622   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2623   rm -f conftest.$ac_objext conftest$ac_exeext
2624   if { { ac_try="$ac_link"
2625 case "(($ac_try" in
2626   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2627   *) ac_try_echo=$ac_try;;
2628 esac
2629 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2630 $as_echo "$ac_try_echo"; } >&5
2631   (eval "$ac_link") 2>conftest.err
2632   ac_status=$?
2633   if test -s conftest.err; then
2634     grep -v '^ *+' conftest.err >conftest.er1
2635     cat conftest.er1 >&5
2636     mv -f conftest.er1 conftest.err
2637   fi
2638   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2639   test $ac_status = 0; } && {
2640          test -z "$ac_c_werror_flag" ||
2641          test ! -s conftest.err
2642        } && test -s conftest$ac_exeext && {
2643          test "$cross_compiling" = yes ||
2644          test -x conftest$ac_exeext
2645        }; then :
2646   ac_retval=0
2647 else
2648   $as_echo "$as_me: failed program was:" >&5
2649 sed 's/^/| /' conftest.$ac_ext >&5
2650
2651         ac_retval=1
2652 fi
2653   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2654   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2655   # interfere with the next link command; also delete a directory that is
2656   # left behind by Apple's compiler.  We do this before executing the actions.
2657   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2658   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2659   as_fn_set_status $ac_retval
2660
2661 } # ac_fn_c_try_link
2662
2663 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2664 # -------------------------------------------
2665 # Tests whether TYPE exists after having included INCLUDES, setting cache
2666 # variable VAR accordingly.
2667 ac_fn_c_check_type ()
2668 {
2669   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2670   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2671 $as_echo_n "checking for $2... " >&6; }
2672 if eval \${$3+:} false; then :
2673   $as_echo_n "(cached) " >&6
2674 else
2675   eval "$3=no"
2676   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2677 /* end confdefs.h.  */
2678 $4
2679 int
2680 main ()
2681 {
2682 if (sizeof ($2))
2683          return 0;
2684   ;
2685   return 0;
2686 }
2687 _ACEOF
2688 if ac_fn_c_try_compile "$LINENO"; then :
2689   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2690 /* end confdefs.h.  */
2691 $4
2692 int
2693 main ()
2694 {
2695 if (sizeof (($2)))
2696             return 0;
2697   ;
2698   return 0;
2699 }
2700 _ACEOF
2701 if ac_fn_c_try_compile "$LINENO"; then :
2702
2703 else
2704   eval "$3=yes"
2705 fi
2706 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2707 fi
2708 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2709 fi
2710 eval ac_res=\$$3
2711                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2712 $as_echo "$ac_res" >&6; }
2713   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2714
2715 } # ac_fn_c_check_type
2716
2717 # ac_fn_c_check_func LINENO FUNC VAR
2718 # ----------------------------------
2719 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2720 ac_fn_c_check_func ()
2721 {
2722   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2723   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2724 $as_echo_n "checking for $2... " >&6; }
2725 if eval \${$3+:} false; then :
2726   $as_echo_n "(cached) " >&6
2727 else
2728   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2729 /* end confdefs.h.  */
2730 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2731    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2732 #define $2 innocuous_$2
2733
2734 /* System header to define __stub macros and hopefully few prototypes,
2735     which can conflict with char $2 (); below.
2736     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2737     <limits.h> exists even on freestanding compilers.  */
2738
2739 #ifdef __STDC__
2740 # include <limits.h>
2741 #else
2742 # include <assert.h>
2743 #endif
2744
2745 #undef $2
2746
2747 /* Override any GCC internal prototype to avoid an error.
2748    Use char because int might match the return type of a GCC
2749    builtin and then its argument prototype would still apply.  */
2750 #ifdef __cplusplus
2751 extern "C"
2752 #endif
2753 char $2 ();
2754 /* The GNU C library defines this for functions which it implements
2755     to always fail with ENOSYS.  Some functions are actually named
2756     something starting with __ and the normal name is an alias.  */
2757 #if defined __stub_$2 || defined __stub___$2
2758 choke me
2759 #endif
2760
2761 int
2762 main ()
2763 {
2764 return $2 ();
2765   ;
2766   return 0;
2767 }
2768 _ACEOF
2769 if ac_fn_c_try_link "$LINENO"; then :
2770   eval "$3=yes"
2771 else
2772   eval "$3=no"
2773 fi
2774 rm -f core conftest.err conftest.$ac_objext \
2775     conftest$ac_exeext conftest.$ac_ext
2776 fi
2777 eval ac_res=\$$3
2778                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2779 $as_echo "$ac_res" >&6; }
2780   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2781
2782 } # ac_fn_c_check_func
2783
2784 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2785 # ---------------------------------------------
2786 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2787 # accordingly.
2788 ac_fn_c_check_decl ()
2789 {
2790   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2791   as_decl_name=`echo $2|sed 's/ *(.*//'`
2792   as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2793   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2794 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2795 if eval \${$3+:} false; then :
2796   $as_echo_n "(cached) " >&6
2797 else
2798   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2799 /* end confdefs.h.  */
2800 $4
2801 int
2802 main ()
2803 {
2804 #ifndef $as_decl_name
2805 #ifdef __cplusplus
2806   (void) $as_decl_use;
2807 #else
2808   (void) $as_decl_name;
2809 #endif
2810 #endif
2811
2812   ;
2813   return 0;
2814 }
2815 _ACEOF
2816 if ac_fn_c_try_compile "$LINENO"; then :
2817   eval "$3=yes"
2818 else
2819   eval "$3=no"
2820 fi
2821 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2822 fi
2823 eval ac_res=\$$3
2824                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2825 $as_echo "$ac_res" >&6; }
2826   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2827
2828 } # ac_fn_c_check_decl
2829
2830 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2831 # --------------------------------------------
2832 # Tries to find the compile-time value of EXPR in a program that includes
2833 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2834 # computed
2835 ac_fn_c_compute_int ()
2836 {
2837   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2838   if test "$cross_compiling" = yes; then
2839     # Depending upon the size, compute the lo and hi bounds.
2840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2841 /* end confdefs.h.  */
2842 $4
2843 int
2844 main ()
2845 {
2846 static int test_array [1 - 2 * !(($2) >= 0)];
2847 test_array [0] = 0;
2848 return test_array [0];
2849
2850   ;
2851   return 0;
2852 }
2853 _ACEOF
2854 if ac_fn_c_try_compile "$LINENO"; then :
2855   ac_lo=0 ac_mid=0
2856   while :; do
2857     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2858 /* end confdefs.h.  */
2859 $4
2860 int
2861 main ()
2862 {
2863 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2864 test_array [0] = 0;
2865 return test_array [0];
2866
2867   ;
2868   return 0;
2869 }
2870 _ACEOF
2871 if ac_fn_c_try_compile "$LINENO"; then :
2872   ac_hi=$ac_mid; break
2873 else
2874   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2875                         if test $ac_lo -le $ac_mid; then
2876                           ac_lo= ac_hi=
2877                           break
2878                         fi
2879                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2880 fi
2881 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2882   done
2883 else
2884   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2885 /* end confdefs.h.  */
2886 $4
2887 int
2888 main ()
2889 {
2890 static int test_array [1 - 2 * !(($2) < 0)];
2891 test_array [0] = 0;
2892 return test_array [0];
2893
2894   ;
2895   return 0;
2896 }
2897 _ACEOF
2898 if ac_fn_c_try_compile "$LINENO"; then :
2899   ac_hi=-1 ac_mid=-1
2900   while :; do
2901     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2902 /* end confdefs.h.  */
2903 $4
2904 int
2905 main ()
2906 {
2907 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2908 test_array [0] = 0;
2909 return test_array [0];
2910
2911   ;
2912   return 0;
2913 }
2914 _ACEOF
2915 if ac_fn_c_try_compile "$LINENO"; then :
2916   ac_lo=$ac_mid; break
2917 else
2918   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2919                         if test $ac_mid -le $ac_hi; then
2920                           ac_lo= ac_hi=
2921                           break
2922                         fi
2923                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2924 fi
2925 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2926   done
2927 else
2928   ac_lo= ac_hi=
2929 fi
2930 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2931 fi
2932 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2933 # Binary search between lo and hi bounds.
2934 while test "x$ac_lo" != "x$ac_hi"; do
2935   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2936   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2937 /* end confdefs.h.  */
2938 $4
2939 int
2940 main ()
2941 {
2942 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2943 test_array [0] = 0;
2944 return test_array [0];
2945
2946   ;
2947   return 0;
2948 }
2949 _ACEOF
2950 if ac_fn_c_try_compile "$LINENO"; then :
2951   ac_hi=$ac_mid
2952 else
2953   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2954 fi
2955 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2956 done
2957 case $ac_lo in #((
2958 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2959 '') ac_retval=1 ;;
2960 esac
2961   else
2962     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2963 /* end confdefs.h.  */
2964 $4
2965 static long int longval () { return $2; }
2966 static unsigned long int ulongval () { return $2; }
2967 #include <stdio.h>
2968 #include <stdlib.h>
2969 int
2970 main ()
2971 {
2972
2973   FILE *f = fopen ("conftest.val", "w");
2974   if (! f)
2975     return 1;
2976   if (($2) < 0)
2977     {
2978       long int i = longval ();
2979       if (i != ($2))
2980         return 1;
2981       fprintf (f, "%ld", i);
2982     }
2983   else
2984     {
2985       unsigned long int i = ulongval ();
2986       if (i != ($2))
2987         return 1;
2988       fprintf (f, "%lu", i);
2989     }
2990   /* Do not output a trailing newline, as this causes \r\n confusion
2991      on some platforms.  */
2992   return ferror (f) || fclose (f) != 0;
2993
2994   ;
2995   return 0;
2996 }
2997 _ACEOF
2998 if ac_fn_c_try_run "$LINENO"; then :
2999   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
3000 else
3001   ac_retval=1
3002 fi
3003 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3004   conftest.$ac_objext conftest.beam conftest.$ac_ext
3005 rm -f conftest.val
3006
3007   fi
3008   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3009   as_fn_set_status $ac_retval
3010
3011 } # ac_fn_c_compute_int
3012
3013 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
3014 # ----------------------------------------------------
3015 # Tries to find if the field MEMBER exists in type AGGR, after including
3016 # INCLUDES, setting cache variable VAR accordingly.
3017 ac_fn_c_check_member ()
3018 {
3019   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3020   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
3021 $as_echo_n "checking for $2.$3... " >&6; }
3022 if eval \${$4+:} false; then :
3023   $as_echo_n "(cached) " >&6
3024 else
3025   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3026 /* end confdefs.h.  */
3027 $5
3028 int
3029 main ()
3030 {
3031 static $2 ac_aggr;
3032 if (ac_aggr.$3)
3033 return 0;
3034   ;
3035   return 0;
3036 }
3037 _ACEOF
3038 if ac_fn_c_try_compile "$LINENO"; then :
3039   eval "$4=yes"
3040 else
3041   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3042 /* end confdefs.h.  */
3043 $5
3044 int
3045 main ()
3046 {
3047 static $2 ac_aggr;
3048 if (sizeof ac_aggr.$3)
3049 return 0;
3050   ;
3051   return 0;
3052 }
3053 _ACEOF
3054 if ac_fn_c_try_compile "$LINENO"; then :
3055   eval "$4=yes"
3056 else
3057   eval "$4=no"
3058 fi
3059 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3060 fi
3061 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3062 fi
3063 eval ac_res=\$$4
3064                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3065 $as_echo "$ac_res" >&6; }
3066   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3067
3068 } # ac_fn_c_check_member
3069 cat >config.log <<_ACEOF
3070 This file contains any messages produced by compilers while
3071 running configure, to aid debugging if configure makes a mistake.
3072
3073 It was created by GNU tar $as_me 1.29, which was
3074 generated by GNU Autoconf 2.69.  Invocation command line was
3075
3076   $ $0 $@
3077
3078 _ACEOF
3079 exec 5>>config.log
3080 {
3081 cat <<_ASUNAME
3082 ## --------- ##
3083 ## Platform. ##
3084 ## --------- ##
3085
3086 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3087 uname -m = `(uname -m) 2>/dev/null || echo unknown`
3088 uname -r = `(uname -r) 2>/dev/null || echo unknown`
3089 uname -s = `(uname -s) 2>/dev/null || echo unknown`
3090 uname -v = `(uname -v) 2>/dev/null || echo unknown`
3091
3092 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3093 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3094
3095 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3096 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3097 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3098 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3099 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3100 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3101 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3102
3103 _ASUNAME
3104
3105 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3106 for as_dir in $PATH
3107 do
3108   IFS=$as_save_IFS
3109   test -z "$as_dir" && as_dir=.
3110     $as_echo "PATH: $as_dir"
3111   done
3112 IFS=$as_save_IFS
3113
3114 } >&5
3115
3116 cat >&5 <<_ACEOF
3117
3118
3119 ## ----------- ##
3120 ## Core tests. ##
3121 ## ----------- ##
3122
3123 _ACEOF
3124
3125
3126 # Keep a trace of the command line.
3127 # Strip out --no-create and --no-recursion so they do not pile up.
3128 # Strip out --silent because we don't want to record it for future runs.
3129 # Also quote any args containing shell meta-characters.
3130 # Make two passes to allow for proper duplicate-argument suppression.
3131 ac_configure_args=
3132 ac_configure_args0=
3133 ac_configure_args1=
3134 ac_must_keep_next=false
3135 for ac_pass in 1 2
3136 do
3137   for ac_arg
3138   do
3139     case $ac_arg in
3140     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3141     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3142     | -silent | --silent | --silen | --sile | --sil)
3143       continue ;;
3144     *\'*)
3145       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3146     esac
3147     case $ac_pass in
3148     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3149     2)
3150       as_fn_append ac_configure_args1 " '$ac_arg'"
3151       if test $ac_must_keep_next = true; then
3152         ac_must_keep_next=false # Got value, back to normal.
3153       else
3154         case $ac_arg in
3155           *=* | --config-cache | -C | -disable-* | --disable-* \
3156           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3157           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3158           | -with-* | --with-* | -without-* | --without-* | --x)
3159             case "$ac_configure_args0 " in
3160               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3161             esac
3162             ;;
3163           -* ) ac_must_keep_next=true ;;
3164         esac
3165       fi
3166       as_fn_append ac_configure_args " '$ac_arg'"
3167       ;;
3168     esac
3169   done
3170 done
3171 { ac_configure_args0=; unset ac_configure_args0;}
3172 { ac_configure_args1=; unset ac_configure_args1;}
3173
3174 # When interrupted or exit'd, cleanup temporary files, and complete
3175 # config.log.  We remove comments because anyway the quotes in there
3176 # would cause problems or look ugly.
3177 # WARNING: Use '\'' to represent an apostrophe within the trap.
3178 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3179 trap 'exit_status=$?
3180   # Save into config.log some information that might help in debugging.
3181   {
3182     echo
3183
3184     $as_echo "## ---------------- ##
3185 ## Cache variables. ##
3186 ## ---------------- ##"
3187     echo
3188     # The following way of writing the cache mishandles newlines in values,
3189 (
3190   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3191     eval ac_val=\$$ac_var
3192     case $ac_val in #(
3193     *${as_nl}*)
3194       case $ac_var in #(
3195       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3196 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3197       esac
3198       case $ac_var in #(
3199       _ | IFS | as_nl) ;; #(
3200       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3201       *) { eval $ac_var=; unset $ac_var;} ;;
3202       esac ;;
3203     esac
3204   done
3205   (set) 2>&1 |
3206     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3207     *${as_nl}ac_space=\ *)
3208       sed -n \
3209         "s/'\''/'\''\\\\'\'''\''/g;
3210           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3211       ;; #(
3212     *)
3213       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3214       ;;
3215     esac |
3216     sort
3217 )
3218     echo
3219
3220     $as_echo "## ----------------- ##
3221 ## Output variables. ##
3222 ## ----------------- ##"
3223     echo
3224     for ac_var in $ac_subst_vars
3225     do
3226       eval ac_val=\$$ac_var
3227       case $ac_val in
3228       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3229       esac
3230       $as_echo "$ac_var='\''$ac_val'\''"
3231     done | sort
3232     echo
3233
3234     if test -n "$ac_subst_files"; then
3235       $as_echo "## ------------------- ##
3236 ## File substitutions. ##
3237 ## ------------------- ##"
3238       echo
3239       for ac_var in $ac_subst_files
3240       do
3241         eval ac_val=\$$ac_var
3242         case $ac_val in
3243         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3244         esac
3245         $as_echo "$ac_var='\''$ac_val'\''"
3246       done | sort
3247       echo
3248     fi
3249
3250     if test -s confdefs.h; then
3251       $as_echo "## ----------- ##
3252 ## confdefs.h. ##
3253 ## ----------- ##"
3254       echo
3255       cat confdefs.h
3256       echo
3257     fi
3258     test "$ac_signal" != 0 &&
3259       $as_echo "$as_me: caught signal $ac_signal"
3260     $as_echo "$as_me: exit $exit_status"
3261   } >&5
3262   rm -f core *.core core.conftest.* &&
3263     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3264     exit $exit_status
3265 ' 0
3266 for ac_signal in 1 2 13 15; do
3267   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3268 done
3269 ac_signal=0
3270
3271 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3272 rm -f -r conftest* confdefs.h
3273
3274 $as_echo "/* confdefs.h */" > confdefs.h
3275
3276 # Predefined preprocessor variables.
3277
3278 cat >>confdefs.h <<_ACEOF
3279 #define PACKAGE_NAME "$PACKAGE_NAME"
3280 _ACEOF
3281
3282 cat >>confdefs.h <<_ACEOF
3283 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3284 _ACEOF
3285
3286 cat >>confdefs.h <<_ACEOF
3287 #define PACKAGE_VERSION "$PACKAGE_VERSION"
3288 _ACEOF
3289
3290 cat >>confdefs.h <<_ACEOF
3291 #define PACKAGE_STRING "$PACKAGE_STRING"
3292 _ACEOF
3293
3294 cat >>confdefs.h <<_ACEOF
3295 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3296 _ACEOF
3297
3298 cat >>confdefs.h <<_ACEOF
3299 #define PACKAGE_URL "$PACKAGE_URL"
3300 _ACEOF
3301
3302
3303 # Let the site file select an alternate cache file if it wants to.
3304 # Prefer an explicitly selected file to automatically selected ones.
3305 ac_site_file1=NONE
3306 ac_site_file2=NONE
3307 if test -n "$CONFIG_SITE"; then
3308   # We do not want a PATH search for config.site.
3309   case $CONFIG_SITE in #((
3310     -*)  ac_site_file1=./$CONFIG_SITE;;
3311     */*) ac_site_file1=$CONFIG_SITE;;
3312     *)   ac_site_file1=./$CONFIG_SITE;;
3313   esac
3314 elif test "x$prefix" != xNONE; then
3315   ac_site_file1=$prefix/share/config.site
3316   ac_site_file2=$prefix/etc/config.site
3317 else
3318   ac_site_file1=$ac_default_prefix/share/config.site
3319   ac_site_file2=$ac_default_prefix/etc/config.site
3320 fi
3321 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3322 do
3323   test "x$ac_site_file" = xNONE && continue
3324   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3325     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3326 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
3327     sed 's/^/| /' "$ac_site_file" >&5
3328     . "$ac_site_file" \
3329       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3330 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3331 as_fn_error $? "failed to load site script $ac_site_file
3332 See \`config.log' for more details" "$LINENO" 5; }
3333   fi
3334 done
3335
3336 if test -r "$cache_file"; then
3337   # Some versions of bash will fail to source /dev/null (special files
3338   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3339   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3340     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3341 $as_echo "$as_me: loading cache $cache_file" >&6;}
3342     case $cache_file in
3343       [\\/]* | ?:[\\/]* ) . "$cache_file";;
3344       *)                      . "./$cache_file";;
3345     esac
3346   fi
3347 else
3348   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3349 $as_echo "$as_me: creating cache $cache_file" >&6;}
3350   >$cache_file
3351 fi
3352
3353 as_fn_append ac_header_list " fcntl.h"
3354 as_fn_append ac_header_list " linux/fd.h"
3355 as_fn_append ac_header_list " memory.h"
3356 as_fn_append ac_header_list " net/errno.h"
3357 as_fn_append ac_header_list " sgtty.h"
3358 as_fn_append ac_header_list " string.h"
3359 as_fn_append ac_header_list " sys/param.h"
3360 as_fn_append ac_header_list " sys/device.h"
3361 as_fn_append ac_header_list " sys/gentape.h"
3362 as_fn_append ac_header_list " sys/inet.h"
3363 as_fn_append ac_header_list " sys/io/trioctl.h"
3364 as_fn_append ac_header_list " sys/mtio.h"
3365 as_fn_append ac_header_list " sys/time.h"
3366 as_fn_append ac_header_list " sys/tprintf.h"
3367 as_fn_append ac_header_list " sys/tape.h"
3368 as_fn_append ac_header_list " unistd.h"
3369 as_fn_append ac_header_list " locale.h"
3370 as_fn_append ac_func_list " fchmod"
3371 as_fn_append ac_func_list " flockfile"
3372 as_fn_append ac_func_list " funlockfile"
3373 as_fn_append ac_header_list " features.h"
3374 as_fn_append ac_header_list " linewrap.h"
3375 as_fn_append ac_func_list " pathconf"
3376 as_fn_append ac_func_list " btowc"
3377 as_fn_append ac_func_list " canonicalize_file_name"
3378 as_fn_append ac_func_list " getcwd"
3379 as_fn_append ac_func_list " readlink"
3380 as_fn_append ac_func_list " realpath"
3381 as_fn_append ac_func_list " readlinkat"
3382 as_fn_append ac_func_list " chown"
3383 as_fn_append ac_func_list " fchown"
3384 as_fn_append ac_func_list " _set_invalid_parameter_handler"
3385 as_fn_append ac_header_list " sys/socket.h"
3386 as_fn_append ac_func_list " fchdir"
3387 as_fn_append ac_header_list " dirent.h"
3388 as_fn_append ac_func_list " fdopendir"
3389 as_fn_append ac_func_list " faccessat"
3390 as_fn_append ac_func_list " fchmodat"
3391 as_fn_append ac_func_list " lchmod"
3392 as_fn_append ac_func_list " fcntl"
3393 as_fn_append ac_func_list " symlink"
3394 as_fn_append ac_func_list " mempcpy"
3395 as_fn_append ac_func_list " isblank"
3396 as_fn_append ac_func_list " iswctype"
3397 as_fn_append ac_func_list " mbsrtowcs"
3398 as_fn_append ac_func_list " wmemchr"
3399 as_fn_append ac_func_list " wmemcpy"
3400 as_fn_append ac_func_list " wmempcpy"
3401 as_fn_append ac_header_list " wctype.h"
3402 gl_fnmatch_required=GNU
3403 as_fn_append ac_header_list " stdio_ext.h"
3404 as_fn_append ac_header_list " sys/stat.h"
3405 as_fn_append ac_func_list " fstatat"
3406 as_fn_append ac_func_list " futimens"
3407 as_fn_append ac_func_list " getdelim"
3408 as_fn_append ac_func_list " getdtablesize"
3409 gl_getopt_required=GNU
3410 as_fn_append ac_header_list " getopt.h"
3411 as_fn_append ac_func_list " gettimeofday"
3412 as_fn_append ac_func_list " nanotime"
3413 as_fn_append ac_header_list " wchar.h"
3414 as_fn_append ac_header_list " stdint.h"
3415 as_fn_append ac_header_list " inttypes.h"
3416 as_fn_append ac_func_list " iswcntrl"
3417 as_fn_append ac_func_list " iswblank"
3418 as_fn_append ac_header_list " langinfo.h"
3419 as_fn_append ac_func_list " link"
3420 as_fn_append ac_func_list " openat"
3421 as_fn_append ac_func_list " linkat"
3422 as_fn_append ac_header_list " xlocale.h"
3423 as_fn_append ac_func_list " lstat"
3424 as_fn_append ac_func_list " mbsinit"
3425 as_fn_append ac_func_list " mbrtowc"
3426 as_fn_append ac_header_list " sys/mman.h"
3427 as_fn_append ac_func_list " mprotect"
3428 as_fn_append ac_func_list " mkdirat"
3429 as_fn_append ac_func_list " mkfifo"
3430 as_fn_append ac_func_list " mkfifoat"
3431 as_fn_append ac_func_list " mknodat"
3432 as_fn_append ac_func_list " mknod"
3433 as_fn_append ac_func_list " nl_langinfo"
3434 as_fn_append ac_header_list " priv.h"
3435 as_fn_append ac_header_list " malloc.h"
3436 as_fn_append ac_func_list " renameat"
3437 as_fn_append ac_func_list " secure_getenv"
3438 as_fn_append ac_header_list " selinux/selinux.h"
3439 as_fn_append ac_func_list " setenv"
3440 as_fn_append ac_func_list " sleep"
3441 as_fn_append ac_func_list " snprintf"
3442 as_fn_append ac_func_list " strdup"
3443 as_fn_append ac_func_list " tzset"
3444 as_fn_append ac_header_list " strings.h"
3445 as_fn_append ac_func_list " strndup"
3446 as_fn_append ac_func_list " strtoimax"
3447 as_fn_append ac_func_list " strtoumax"
3448 as_fn_append ac_func_list " symlinkat"
3449 as_fn_append ac_header_list " sysexits.h"
3450 as_fn_append ac_func_list " localtime_r"
3451 as_fn_append ac_func_list " timegm"
3452 as_fn_append ac_func_list " pipe"
3453 as_fn_append ac_func_list " unlinkat"
3454 as_fn_append ac_header_list " utime.h"
3455 as_fn_append ac_func_list " futimes"
3456 as_fn_append ac_func_list " futimesat"
3457 as_fn_append ac_func_list " utimensat"
3458 as_fn_append ac_func_list " lutimes"
3459 as_fn_append ac_func_list " vasnprintf"
3460 as_fn_append ac_func_list " wcrtomb"
3461 as_fn_append ac_func_list " wcwidth"
3462 as_fn_append ac_header_list " netdb.h"
3463 as_fn_append ac_header_list " sys/wait.h"
3464 as_fn_append ac_header_list " pwd.h"
3465 as_fn_append ac_header_list " grp.h"
3466 as_fn_append ac_func_list " setlocale"
3467 as_fn_append ac_func_list " fsync"
3468 gt_needs="$gt_needs need-formatstring-macros"
3469 # Check that the precious variables saved in the cache have kept the same
3470 # value.
3471 ac_cache_corrupted=false
3472 for ac_var in $ac_precious_vars; do
3473   eval ac_old_set=\$ac_cv_env_${ac_var}_set
3474   eval ac_new_set=\$ac_env_${ac_var}_set
3475   eval ac_old_val=\$ac_cv_env_${ac_var}_value
3476   eval ac_new_val=\$ac_env_${ac_var}_value
3477   case $ac_old_set,$ac_new_set in
3478     set,)
3479       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3480 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3481       ac_cache_corrupted=: ;;
3482     ,set)
3483       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3484 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3485       ac_cache_corrupted=: ;;
3486     ,);;
3487     *)
3488       if test "x$ac_old_val" != "x$ac_new_val"; then
3489         # differences in whitespace do not lead to failure.
3490         ac_old_val_w=`echo x $ac_old_val`
3491         ac_new_val_w=`echo x $ac_new_val`
3492         if test "$ac_old_val_w" != "$ac_new_val_w"; then
3493           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3494 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3495           ac_cache_corrupted=:
3496         else
3497           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3498 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3499           eval $ac_var=\$ac_old_val
3500         fi
3501         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3502 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3503         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3504 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3505       fi;;
3506   esac
3507   # Pass precious variables to config.status.
3508   if test "$ac_new_set" = set; then
3509     case $ac_new_val in
3510     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3511     *) ac_arg=$ac_var=$ac_new_val ;;
3512     esac
3513     case " $ac_configure_args " in
3514       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3515       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3516     esac
3517   fi
3518 done
3519 if $ac_cache_corrupted; then
3520   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3521 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3522   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3523 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3524   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3525 fi
3526 ## -------------------- ##
3527 ## Main body of script. ##
3528 ## -------------------- ##
3529
3530 ac_ext=c
3531 ac_cpp='$CPP $CPPFLAGS'
3532 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3533 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3534 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3535
3536
3537
3538 ac_aux_dir=
3539 for ac_dir in build-aux "$srcdir"/build-aux; do
3540   if test -f "$ac_dir/install-sh"; then
3541     ac_aux_dir=$ac_dir
3542     ac_install_sh="$ac_aux_dir/install-sh -c"
3543     break
3544   elif test -f "$ac_dir/install.sh"; then
3545     ac_aux_dir=$ac_dir
3546     ac_install_sh="$ac_aux_dir/install.sh -c"
3547     break
3548   elif test -f "$ac_dir/shtool"; then
3549     ac_aux_dir=$ac_dir
3550     ac_install_sh="$ac_aux_dir/shtool install -c"
3551     break
3552   fi
3553 done
3554 if test -z "$ac_aux_dir"; then
3555   as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
3556 fi
3557
3558 # These three variables are undocumented and unsupported,
3559 # and are intended to be withdrawn in a future Autoconf release.
3560 # They can cause serious problems if a builder's source tree is in a directory
3561 # whose full name contains unusual characters.
3562 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3563 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3564 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3565
3566
3567 ac_config_headers="$ac_config_headers config.h"
3568
3569
3570 am__api_version='1.14'
3571
3572 # Find a good install program.  We prefer a C program (faster),
3573 # so one script is as good as another.  But avoid the broken or
3574 # incompatible versions:
3575 # SysV /etc/install, /usr/sbin/install
3576 # SunOS /usr/etc/install
3577 # IRIX /sbin/install
3578 # AIX /bin/install
3579 # AmigaOS /C/install, which installs bootblocks on floppy discs
3580 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3581 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3582 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3583 # OS/2's system install, which has a completely different semantic
3584 # ./install, which can be erroneously created by make from ./install.sh.
3585 # Reject install programs that cannot install multiple files.
3586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
3587 $as_echo_n "checking for a BSD-compatible install... " >&6; }
3588 if test -z "$INSTALL"; then
3589 if ${ac_cv_path_install+:} false; then :
3590   $as_echo_n "(cached) " >&6
3591 else
3592   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3593 for as_dir in $PATH
3594 do
3595   IFS=$as_save_IFS
3596   test -z "$as_dir" && as_dir=.
3597     # Account for people who put trailing slashes in PATH elements.
3598 case $as_dir/ in #((
3599   ./ | .// | /[cC]/* | \
3600   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3601   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
3602   /usr/ucb/* ) ;;
3603   *)
3604     # OSF1 and SCO ODT 3.0 have their own names for install.
3605     # Don't use installbsd from OSF since it installs stuff as root
3606     # by default.
3607     for ac_prog in ginstall scoinst install; do
3608       for ac_exec_ext in '' $ac_executable_extensions; do
3609         if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3610           if test $ac_prog = install &&
3611             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3612             # AIX install.  It has an incompatible calling convention.
3613             :
3614           elif test $ac_prog = install &&
3615             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3616             # program-specific install script used by HP pwplus--don't use.
3617             :
3618           else
3619             rm -rf conftest.one conftest.two conftest.dir
3620             echo one > conftest.one
3621             echo two > conftest.two
3622             mkdir conftest.dir
3623             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
3624               test -s conftest.one && test -s conftest.two &&
3625               test -s conftest.dir/conftest.one &&
3626               test -s conftest.dir/conftest.two
3627             then
3628               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3629               break 3
3630             fi
3631           fi
3632         fi
3633       done
3634     done
3635     ;;
3636 esac
3637
3638   done
3639 IFS=$as_save_IFS
3640
3641 rm -rf conftest.one conftest.two conftest.dir
3642
3643 fi
3644   if test "${ac_cv_path_install+set}" = set; then
3645     INSTALL=$ac_cv_path_install
3646   else
3647     # As a last resort, use the slow shell script.  Don't cache a
3648     # value for INSTALL within a source directory, because that will
3649     # break other packages using the cache if that directory is
3650     # removed, or if the value is a relative name.
3651     INSTALL=$ac_install_sh
3652   fi
3653 fi
3654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
3655 $as_echo "$INSTALL" >&6; }
3656
3657 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3658 # It thinks the first close brace ends the variable substitution.
3659 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3660
3661 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3662
3663 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3664
3665 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
3666 $as_echo_n "checking whether build environment is sane... " >&6; }
3667 # Reject unsafe characters in $srcdir or the absolute working directory
3668 # name.  Accept space and tab only in the latter.
3669 am_lf='
3670 '
3671 case `pwd` in
3672   *[\\\"\#\$\&\'\`$am_lf]*)
3673     as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
3674 esac
3675 case $srcdir in
3676   *[\\\"\#\$\&\'\`$am_lf\ \     ]*)
3677     as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
3678 esac
3679
3680 # Do 'set' in a subshell so we don't clobber the current shell's
3681 # arguments.  Must try -L first in case configure is actually a
3682 # symlink; some systems play weird games with the mod time of symlinks
3683 # (eg FreeBSD returns the mod time of the symlink's containing
3684 # directory).
3685 if (
3686    am_has_slept=no
3687    for am_try in 1 2; do
3688      echo "timestamp, slept: $am_has_slept" > conftest.file
3689      set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
3690      if test "$*" = "X"; then
3691         # -L didn't work.
3692         set X `ls -t "$srcdir/configure" conftest.file`
3693      fi
3694      if test "$*" != "X $srcdir/configure conftest.file" \
3695         && test "$*" != "X conftest.file $srcdir/configure"; then
3696
3697         # If neither matched, then we have a broken ls.  This can happen
3698         # if, for instance, CONFIG_SHELL is bash and it inherits a
3699         # broken ls alias from the environment.  This has actually
3700         # happened.  Such a system could not be considered "sane".
3701         as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
3702   alias in your environment" "$LINENO" 5
3703      fi
3704      if test "$2" = conftest.file || test $am_try -eq 2; then
3705        break
3706      fi
3707      # Just in case.
3708      sleep 1
3709      am_has_slept=yes
3710    done
3711    test "$2" = conftest.file
3712    )
3713 then
3714    # Ok.
3715    :
3716 else
3717    as_fn_error $? "newly created file is older than distributed files!
3718 Check your system clock" "$LINENO" 5
3719 fi
3720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3721 $as_echo "yes" >&6; }
3722 # If we didn't sleep, we still need to ensure time stamps of config.status and
3723 # generated files are strictly newer.
3724 am_sleep_pid=
3725 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
3726   ( sleep 1 ) &
3727   am_sleep_pid=$!
3728 fi
3729
3730 rm -f conftest.file
3731
3732 test "$program_prefix" != NONE &&
3733   program_transform_name="s&^&$program_prefix&;$program_transform_name"
3734 # Use a double $ so make ignores it.
3735 test "$program_suffix" != NONE &&
3736   program_transform_name="s&\$&$program_suffix&;$program_transform_name"
3737 # Double any \ or $.
3738 # By default was `s,x,x', remove it if useless.
3739 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
3740 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
3741
3742 # expand $ac_aux_dir to an absolute path
3743 am_aux_dir=`cd $ac_aux_dir && pwd`
3744
3745 if test x"${MISSING+set}" != xset; then
3746   case $am_aux_dir in
3747   *\ * | *\     *)
3748     MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
3749   *)
3750     MISSING="\${SHELL} $am_aux_dir/missing" ;;
3751   esac
3752 fi
3753 # Use eval to expand $SHELL
3754 if eval "$MISSING --is-lightweight"; then
3755   am_missing_run="$MISSING "
3756 else
3757   am_missing_run=
3758   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
3759 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
3760 fi
3761
3762 if test x"${install_sh}" != xset; then
3763   case $am_aux_dir in
3764   *\ * | *\     *)
3765     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
3766   *)
3767     install_sh="\${SHELL} $am_aux_dir/install-sh"
3768   esac
3769 fi
3770
3771 # Installed binaries are usually stripped using 'strip' when the user
3772 # run "make install-strip".  However 'strip' might not be the right
3773 # tool to use in cross-compilation environments, therefore Automake
3774 # will honor the 'STRIP' environment variable to overrule this program.
3775 if test "$cross_compiling" != no; then
3776   if test -n "$ac_tool_prefix"; then
3777   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
3778 set dummy ${ac_tool_prefix}strip; ac_word=$2
3779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3780 $as_echo_n "checking for $ac_word... " >&6; }
3781 if ${ac_cv_prog_STRIP+:} false; then :
3782   $as_echo_n "(cached) " >&6
3783 else
3784   if test -n "$STRIP"; then
3785   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
3786 else
3787 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3788 for as_dir in $PATH
3789 do
3790   IFS=$as_save_IFS
3791   test -z "$as_dir" && as_dir=.
3792     for ac_exec_ext in '' $ac_executable_extensions; do
3793   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3794     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
3795     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3796     break 2
3797   fi
3798 done
3799   done
3800 IFS=$as_save_IFS
3801
3802 fi
3803 fi
3804 STRIP=$ac_cv_prog_STRIP
3805 if test -n "$STRIP"; then
3806   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
3807 $as_echo "$STRIP" >&6; }
3808 else
3809   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3810 $as_echo "no" >&6; }
3811 fi
3812
3813
3814 fi
3815 if test -z "$ac_cv_prog_STRIP"; then
3816   ac_ct_STRIP=$STRIP
3817   # Extract the first word of "strip", so it can be a program name with args.
3818 set dummy strip; ac_word=$2
3819 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3820 $as_echo_n "checking for $ac_word... " >&6; }
3821 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
3822   $as_echo_n "(cached) " >&6
3823 else
3824   if test -n "$ac_ct_STRIP"; then
3825   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
3826 else
3827 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3828 for as_dir in $PATH
3829 do
3830   IFS=$as_save_IFS
3831   test -z "$as_dir" && as_dir=.
3832     for ac_exec_ext in '' $ac_executable_extensions; do
3833   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3834     ac_cv_prog_ac_ct_STRIP="strip"
3835     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3836     break 2
3837   fi
3838 done
3839   done
3840 IFS=$as_save_IFS
3841
3842 fi
3843 fi
3844 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
3845 if test -n "$ac_ct_STRIP"; then
3846   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
3847 $as_echo "$ac_ct_STRIP" >&6; }
3848 else
3849   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3850 $as_echo "no" >&6; }
3851 fi
3852
3853   if test "x$ac_ct_STRIP" = x; then
3854     STRIP=":"
3855   else
3856     case $cross_compiling:$ac_tool_warned in
3857 yes:)
3858 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3859 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3860 ac_tool_warned=yes ;;
3861 esac
3862     STRIP=$ac_ct_STRIP
3863   fi
3864 else
3865   STRIP="$ac_cv_prog_STRIP"
3866 fi
3867
3868 fi
3869 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
3870
3871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
3872 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
3873 if test -z "$MKDIR_P"; then
3874   if ${ac_cv_path_mkdir+:} false; then :
3875   $as_echo_n "(cached) " >&6
3876 else
3877   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3878 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
3879 do
3880   IFS=$as_save_IFS
3881   test -z "$as_dir" && as_dir=.
3882     for ac_prog in mkdir gmkdir; do
3883          for ac_exec_ext in '' $ac_executable_extensions; do
3884            as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
3885            case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
3886              'mkdir (GNU coreutils) '* | \
3887              'mkdir (coreutils) '* | \
3888              'mkdir (fileutils) '4.1*)
3889                ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
3890                break 3;;
3891            esac
3892          done
3893        done
3894   done
3895 IFS=$as_save_IFS
3896
3897 fi
3898
3899   test -d ./--version && rmdir ./--version
3900   if test "${ac_cv_path_mkdir+set}" = set; then
3901     MKDIR_P="$ac_cv_path_mkdir -p"
3902   else
3903     # As a last resort, use the slow shell script.  Don't cache a
3904     # value for MKDIR_P within a source directory, because that will
3905     # break other packages using the cache if that directory is
3906     # removed, or if the value is a relative name.
3907     MKDIR_P="$ac_install_sh -d"
3908   fi
3909 fi
3910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
3911 $as_echo "$MKDIR_P" >&6; }
3912
3913 for ac_prog in gawk mawk nawk awk
3914 do
3915   # Extract the first word of "$ac_prog", so it can be a program name with args.
3916 set dummy $ac_prog; ac_word=$2
3917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3918 $as_echo_n "checking for $ac_word... " >&6; }
3919 if ${ac_cv_prog_AWK+:} false; then :
3920   $as_echo_n "(cached) " >&6
3921 else
3922   if test -n "$AWK"; then
3923   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3924 else
3925 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3926 for as_dir in $PATH
3927 do
3928   IFS=$as_save_IFS
3929   test -z "$as_dir" && as_dir=.
3930     for ac_exec_ext in '' $ac_executable_extensions; do
3931   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3932     ac_cv_prog_AWK="$ac_prog"
3933     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3934     break 2
3935   fi
3936 done
3937   done
3938 IFS=$as_save_IFS
3939
3940 fi
3941 fi
3942 AWK=$ac_cv_prog_AWK
3943 if test -n "$AWK"; then
3944   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
3945 $as_echo "$AWK" >&6; }
3946 else
3947   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3948 $as_echo "no" >&6; }
3949 fi
3950
3951
3952   test -n "$AWK" && break
3953 done
3954
3955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3956 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
3957 set x ${MAKE-make}
3958 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3959 if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
3960   $as_echo_n "(cached) " >&6
3961 else
3962   cat >conftest.make <<\_ACEOF
3963 SHELL = /bin/sh
3964 all:
3965         @echo '@@@%%%=$(MAKE)=@@@%%%'
3966 _ACEOF
3967 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
3968 case `${MAKE-make} -f conftest.make 2>/dev/null` in
3969   *@@@%%%=?*=@@@%%%*)
3970     eval ac_cv_prog_make_${ac_make}_set=yes;;
3971   *)
3972     eval ac_cv_prog_make_${ac_make}_set=no;;
3973 esac
3974 rm -f conftest.make
3975 fi
3976 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3977   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3978 $as_echo "yes" >&6; }
3979   SET_MAKE=
3980 else
3981   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3982 $as_echo "no" >&6; }
3983   SET_MAKE="MAKE=${MAKE-make}"
3984 fi
3985
3986 rm -rf .tst 2>/dev/null
3987 mkdir .tst 2>/dev/null
3988 if test -d .tst; then
3989   am__leading_dot=.
3990 else
3991   am__leading_dot=_
3992 fi
3993 rmdir .tst 2>/dev/null
3994
3995 # Check whether --enable-silent-rules was given.
3996 if test "${enable_silent_rules+set}" = set; then :
3997   enableval=$enable_silent_rules;
3998 fi
3999
4000 case $enable_silent_rules in # (((
4001   yes) AM_DEFAULT_VERBOSITY=0;;
4002    no) AM_DEFAULT_VERBOSITY=1;;
4003     *) AM_DEFAULT_VERBOSITY=1;;
4004 esac
4005 am_make=${MAKE-make}
4006 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
4007 $as_echo_n "checking whether $am_make supports nested variables... " >&6; }
4008 if ${am_cv_make_support_nested_variables+:} false; then :
4009   $as_echo_n "(cached) " >&6
4010 else
4011   if $as_echo 'TRUE=$(BAR$(V))
4012 BAR0=false
4013 BAR1=true
4014 V=1
4015 am__doit:
4016         @$(TRUE)
4017 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
4018   am_cv_make_support_nested_variables=yes
4019 else
4020   am_cv_make_support_nested_variables=no
4021 fi
4022 fi
4023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
4024 $as_echo "$am_cv_make_support_nested_variables" >&6; }
4025 if test $am_cv_make_support_nested_variables = yes; then
4026     AM_V='$(V)'
4027   AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
4028 else
4029   AM_V=$AM_DEFAULT_VERBOSITY
4030   AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
4031 fi
4032 AM_BACKSLASH='\'
4033
4034 if test "`cd $srcdir && pwd`" != "`pwd`"; then
4035   # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
4036   # is not polluted with repeated "-I."
4037   am__isrc=' -I$(srcdir)'
4038   # test to see if srcdir already configured
4039   if test -f $srcdir/config.status; then
4040     as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
4041   fi
4042 fi
4043
4044 # test whether we have cygpath
4045 if test -z "$CYGPATH_W"; then
4046   if (cygpath --version) >/dev/null 2>/dev/null; then
4047     CYGPATH_W='cygpath -w'
4048   else
4049     CYGPATH_W=echo
4050   fi
4051 fi
4052
4053
4054 # Define the identity of the package.
4055  PACKAGE='tar'
4056  VERSION='1.29'
4057
4058
4059 cat >>confdefs.h <<_ACEOF
4060 #define PACKAGE "$PACKAGE"
4061 _ACEOF
4062
4063
4064 cat >>confdefs.h <<_ACEOF
4065 #define VERSION "$VERSION"
4066 _ACEOF
4067
4068 # Some tools Automake needs.
4069
4070 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
4071
4072
4073 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
4074
4075
4076 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
4077
4078
4079 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
4080
4081
4082 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
4083
4084 # For better backward compatibility.  To be removed once Automake 1.9.x
4085 # dies out for good.  For more background, see:
4086 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
4087 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
4088 mkdir_p='$(MKDIR_P)'
4089
4090 # We need awk for the "check" target.  The system "awk" is bad on
4091 # some platforms.
4092 # Always define AMTAR for backward compatibility.  Yes, it's still used
4093 # in the wild :-(  We should find a proper way to deprecate it ...
4094 AMTAR='$${TAR-tar}'
4095
4096
4097 # We'll loop over all known methods to create a tar archive until one works.
4098 _am_tools='gnutar plaintar pax cpio none'
4099
4100 # The POSIX 1988 'ustar' format is defined with fixed-size fields.
4101       # There is notably a 21 bits limit for the UID and the GID.  In fact,
4102       # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
4103       # and bug#13588).
4104       am_max_uid=2097151 # 2^21 - 1
4105       am_max_gid=$am_max_uid
4106       # The $UID and $GID variables are not portable, so we need to resort
4107       # to the POSIX-mandated id(1) utility.  Errors in the 'id' calls
4108       # below are definitely unexpected, so allow the users to see them
4109       # (that is, avoid stderr redirection).
4110       am_uid=`id -u || echo unknown`
4111       am_gid=`id -g || echo unknown`
4112       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UID '$am_uid' is supported by ustar format" >&5
4113 $as_echo_n "checking whether UID '$am_uid' is supported by ustar format... " >&6; }
4114       if test $am_uid -le $am_max_uid; then
4115          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4116 $as_echo "yes" >&6; }
4117       else
4118          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4119 $as_echo "no" >&6; }
4120          _am_tools=none
4121       fi
4122       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether GID '$am_gid' is supported by ustar format" >&5
4123 $as_echo_n "checking whether GID '$am_gid' is supported by ustar format... " >&6; }
4124       if test $am_gid -le $am_max_gid; then
4125          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4126 $as_echo "yes" >&6; }
4127       else
4128         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4129 $as_echo "no" >&6; }
4130         _am_tools=none
4131       fi
4132
4133   { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create a ustar tar archive" >&5
4134 $as_echo_n "checking how to create a ustar tar archive... " >&6; }
4135
4136   # Go ahead even if we have the value already cached.  We do so because we
4137   # need to set the values for the 'am__tar' and 'am__untar' variables.
4138   _am_tools=${am_cv_prog_tar_ustar-$_am_tools}
4139
4140   for _am_tool in $_am_tools; do
4141     case $_am_tool in
4142     gnutar)
4143       for _am_tar in tar gnutar gtar; do
4144         { echo "$as_me:$LINENO: $_am_tar --version" >&5
4145    ($_am_tar --version) >&5 2>&5
4146    ac_status=$?
4147    echo "$as_me:$LINENO: \$? = $ac_status" >&5
4148    (exit $ac_status); } && break
4149       done
4150       am__tar="$_am_tar --format=ustar -chf - "'"$$tardir"'
4151       am__tar_="$_am_tar --format=ustar -chf - "'"$tardir"'
4152       am__untar="$_am_tar -xf -"
4153       ;;
4154     plaintar)
4155       # Must skip GNU tar: if it does not support --format= it doesn't create
4156       # ustar tarball either.
4157       (tar --version) >/dev/null 2>&1 && continue
4158       am__tar='tar chf - "$$tardir"'
4159       am__tar_='tar chf - "$tardir"'
4160       am__untar='tar xf -'
4161       ;;
4162     pax)
4163       am__tar='pax -L -x ustar -w "$$tardir"'
4164       am__tar_='pax -L -x ustar -w "$tardir"'
4165       am__untar='pax -r'
4166       ;;
4167     cpio)
4168       am__tar='find "$$tardir" -print | cpio -o -H ustar -L'
4169       am__tar_='find "$tardir" -print | cpio -o -H ustar -L'
4170       am__untar='cpio -i -H ustar -d'
4171       ;;
4172     none)
4173       am__tar=false
4174       am__tar_=false
4175       am__untar=false
4176       ;;
4177     esac
4178
4179     # If the value was cached, stop now.  We just wanted to have am__tar
4180     # and am__untar set.
4181     test -n "${am_cv_prog_tar_ustar}" && break
4182
4183     # tar/untar a dummy directory, and stop if the command works.
4184     rm -rf conftest.dir
4185     mkdir conftest.dir
4186     echo GrepMe > conftest.dir/file
4187     { echo "$as_me:$LINENO: tardir=conftest.dir && eval $am__tar_ >conftest.tar" >&5
4188    (tardir=conftest.dir && eval $am__tar_ >conftest.tar) >&5 2>&5
4189    ac_status=$?
4190    echo "$as_me:$LINENO: \$? = $ac_status" >&5
4191    (exit $ac_status); }
4192     rm -rf conftest.dir
4193     if test -s conftest.tar; then
4194       { echo "$as_me:$LINENO: $am__untar <conftest.tar" >&5
4195    ($am__untar <conftest.tar) >&5 2>&5
4196    ac_status=$?
4197    echo "$as_me:$LINENO: \$? = $ac_status" >&5
4198    (exit $ac_status); }
4199       { echo "$as_me:$LINENO: cat conftest.dir/file" >&5
4200    (cat conftest.dir/file) >&5 2>&5
4201    ac_status=$?
4202    echo "$as_me:$LINENO: \$? = $ac_status" >&5
4203    (exit $ac_status); }
4204       grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
4205     fi
4206   done
4207   rm -rf conftest.dir
4208
4209   if ${am_cv_prog_tar_ustar+:} false; then :
4210   $as_echo_n "(cached) " >&6
4211 else
4212   am_cv_prog_tar_ustar=$_am_tool
4213 fi
4214
4215   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_ustar" >&5
4216 $as_echo "$am_cv_prog_tar_ustar" >&6; }
4217
4218
4219
4220
4221
4222
4223 # POSIX will say in a future version that running "rm -f" with no argument
4224 # is OK; and we want to be able to make that assumption in our Makefile
4225 # recipes.  So use an aggressive probe to check that the usage we want is
4226 # actually supported "in the wild" to an acceptable degree.
4227 # See automake bug#10828.
4228 # To make any issue more visible, cause the running configure to be aborted
4229 # by default if the 'rm' program in use doesn't match our expectations; the
4230 # user can still override this though.
4231 if rm -f && rm -fr && rm -rf; then : OK; else
4232   cat >&2 <<'END'
4233 Oops!
4234
4235 Your 'rm' program seems unable to run without file operands specified
4236 on the command line, even when the '-f' option is present.  This is contrary
4237 to the behaviour of most rm programs out there, and not conforming with
4238 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
4239
4240 Please tell bug-automake@gnu.org about your system, including the value
4241 of your $PATH and any error possibly output before this message.  This
4242 can help us improve future automake versions.
4243
4244 END
4245   if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
4246     echo 'Configuration will proceed anyway, since you have set the' >&2
4247     echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
4248     echo >&2
4249   else
4250     cat >&2 <<'END'
4251 Aborting the configuration process, to ensure you take notice of the issue.
4252
4253 You can download and install GNU coreutils to get an 'rm' implementation
4254 that behaves properly: <http://www.gnu.org/software/coreutils/>.
4255
4256 If you want to complete the configuration process using your problematic
4257 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
4258 to "yes", and re-run configure.
4259
4260 END
4261     as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
4262   fi
4263 fi
4264
4265 # Enable silent rules by default:
4266 # Check whether --enable-silent-rules was given.
4267 if test "${enable_silent_rules+set}" = set; then :
4268   enableval=$enable_silent_rules;
4269 fi
4270
4271 case $enable_silent_rules in # (((
4272   yes) AM_DEFAULT_VERBOSITY=0;;
4273    no) AM_DEFAULT_VERBOSITY=1;;
4274     *) AM_DEFAULT_VERBOSITY=0;;
4275 esac
4276 am_make=${MAKE-make}
4277 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
4278 $as_echo_n "checking whether $am_make supports nested variables... " >&6; }
4279 if ${am_cv_make_support_nested_variables+:} false; then :
4280   $as_echo_n "(cached) " >&6
4281 else
4282   if $as_echo 'TRUE=$(BAR$(V))
4283 BAR0=false
4284 BAR1=true
4285 V=1
4286 am__doit:
4287         @$(TRUE)
4288 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
4289   am_cv_make_support_nested_variables=yes
4290 else
4291   am_cv_make_support_nested_variables=no
4292 fi
4293 fi
4294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
4295 $as_echo "$am_cv_make_support_nested_variables" >&6; }
4296 if test $am_cv_make_support_nested_variables = yes; then
4297     AM_V='$(V)'
4298   AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
4299 else
4300   AM_V=$AM_DEFAULT_VERBOSITY
4301   AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
4302 fi
4303 AM_BACKSLASH='\'
4304
4305
4306 DEPDIR="${am__leading_dot}deps"
4307
4308 ac_config_commands="$ac_config_commands depfiles"
4309
4310
4311 am_make=${MAKE-make}
4312 cat > confinc << 'END'
4313 am__doit:
4314         @echo this is the am__doit target
4315 .PHONY: am__doit
4316 END
4317 # If we don't find an include directive, just comment out the code.
4318 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
4319 $as_echo_n "checking for style of include used by $am_make... " >&6; }
4320 am__include="#"
4321 am__quote=
4322 _am_result=none
4323 # First try GNU make style include.
4324 echo "include confinc" > confmf
4325 # Ignore all kinds of additional output from 'make'.
4326 case `$am_make -s -f confmf 2> /dev/null` in #(
4327 *the\ am__doit\ target*)
4328   am__include=include
4329   am__quote=
4330   _am_result=GNU
4331   ;;
4332 esac
4333 # Now try BSD make style include.
4334 if test "$am__include" = "#"; then
4335    echo '.include "confinc"' > confmf
4336    case `$am_make -s -f confmf 2> /dev/null` in #(
4337    *the\ am__doit\ target*)
4338      am__include=.include
4339      am__quote="\""
4340      _am_result=BSD
4341      ;;
4342    esac
4343 fi
4344
4345
4346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
4347 $as_echo "$_am_result" >&6; }
4348 rm -f confinc confmf
4349
4350 # Check whether --enable-dependency-tracking was given.
4351 if test "${enable_dependency_tracking+set}" = set; then :
4352   enableval=$enable_dependency_tracking;
4353 fi
4354
4355 if test "x$enable_dependency_tracking" != xno; then
4356   am_depcomp="$ac_aux_dir/depcomp"
4357   AMDEPBACKSLASH='\'
4358   am__nodep='_no'
4359 fi
4360  if test "x$enable_dependency_tracking" != xno; then
4361   AMDEP_TRUE=
4362   AMDEP_FALSE='#'
4363 else
4364   AMDEP_TRUE='#'
4365   AMDEP_FALSE=
4366 fi
4367
4368
4369 ac_ext=c
4370 ac_cpp='$CPP $CPPFLAGS'
4371 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4372 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4373 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4374 if test -n "$ac_tool_prefix"; then
4375   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4376 set dummy ${ac_tool_prefix}gcc; ac_word=$2
4377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4378 $as_echo_n "checking for $ac_word... " >&6; }
4379 if ${ac_cv_prog_CC+:} false; then :
4380   $as_echo_n "(cached) " >&6
4381 else
4382   if test -n "$CC"; then
4383   ac_cv_prog_CC="$CC" # Let the user override the test.
4384 else
4385 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4386 for as_dir in $PATH
4387 do
4388   IFS=$as_save_IFS
4389   test -z "$as_dir" && as_dir=.
4390     for ac_exec_ext in '' $ac_executable_extensions; do
4391   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4392     ac_cv_prog_CC="${ac_tool_prefix}gcc"
4393     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4394     break 2
4395   fi
4396 done
4397   done
4398 IFS=$as_save_IFS
4399
4400 fi
4401 fi
4402 CC=$ac_cv_prog_CC
4403 if test -n "$CC"; then
4404   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4405 $as_echo "$CC" >&6; }
4406 else
4407   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4408 $as_echo "no" >&6; }
4409 fi
4410
4411
4412 fi
4413 if test -z "$ac_cv_prog_CC"; then
4414   ac_ct_CC=$CC
4415   # Extract the first word of "gcc", so it can be a program name with args.
4416 set dummy gcc; ac_word=$2
4417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4418 $as_echo_n "checking for $ac_word... " >&6; }
4419 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4420   $as_echo_n "(cached) " >&6
4421 else
4422   if test -n "$ac_ct_CC"; then
4423   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4424 else
4425 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4426 for as_dir in $PATH
4427 do
4428   IFS=$as_save_IFS
4429   test -z "$as_dir" && as_dir=.
4430     for ac_exec_ext in '' $ac_executable_extensions; do
4431   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4432     ac_cv_prog_ac_ct_CC="gcc"
4433     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4434     break 2
4435   fi
4436 done
4437   done
4438 IFS=$as_save_IFS
4439
4440 fi
4441 fi
4442 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4443 if test -n "$ac_ct_CC"; then
4444   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4445 $as_echo "$ac_ct_CC" >&6; }
4446 else
4447   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4448 $as_echo "no" >&6; }
4449 fi
4450
4451   if test "x$ac_ct_CC" = x; then
4452     CC=""
4453   else
4454     case $cross_compiling:$ac_tool_warned in
4455 yes:)
4456 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4457 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4458 ac_tool_warned=yes ;;
4459 esac
4460     CC=$ac_ct_CC
4461   fi
4462 else
4463   CC="$ac_cv_prog_CC"
4464 fi
4465
4466 if test -z "$CC"; then
4467           if test -n "$ac_tool_prefix"; then
4468     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4469 set dummy ${ac_tool_prefix}cc; ac_word=$2
4470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4471 $as_echo_n "checking for $ac_word... " >&6; }
4472 if ${ac_cv_prog_CC+:} false; then :
4473   $as_echo_n "(cached) " >&6
4474 else
4475   if test -n "$CC"; then
4476   ac_cv_prog_CC="$CC" # Let the user override the test.
4477 else
4478 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4479 for as_dir in $PATH
4480 do
4481   IFS=$as_save_IFS
4482   test -z "$as_dir" && as_dir=.
4483     for ac_exec_ext in '' $ac_executable_extensions; do
4484   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4485     ac_cv_prog_CC="${ac_tool_prefix}cc"
4486     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4487     break 2
4488   fi
4489 done
4490   done
4491 IFS=$as_save_IFS
4492
4493 fi
4494 fi
4495 CC=$ac_cv_prog_CC
4496 if test -n "$CC"; then
4497   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4498 $as_echo "$CC" >&6; }
4499 else
4500   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4501 $as_echo "no" >&6; }
4502 fi
4503
4504
4505   fi
4506 fi
4507 if test -z "$CC"; then
4508   # Extract the first word of "cc", so it can be a program name with args.
4509 set dummy cc; ac_word=$2
4510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4511 $as_echo_n "checking for $ac_word... " >&6; }
4512 if ${ac_cv_prog_CC+:} false; then :
4513   $as_echo_n "(cached) " >&6
4514 else
4515   if test -n "$CC"; then
4516   ac_cv_prog_CC="$CC" # Let the user override the test.
4517 else
4518   ac_prog_rejected=no
4519 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4520 for as_dir in $PATH
4521 do
4522   IFS=$as_save_IFS
4523   test -z "$as_dir" && as_dir=.
4524     for ac_exec_ext in '' $ac_executable_extensions; do
4525   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4526     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4527        ac_prog_rejected=yes
4528        continue
4529      fi
4530     ac_cv_prog_CC="cc"
4531     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4532     break 2
4533   fi
4534 done
4535   done
4536 IFS=$as_save_IFS
4537
4538 if test $ac_prog_rejected = yes; then
4539   # We found a bogon in the path, so make sure we never use it.
4540   set dummy $ac_cv_prog_CC
4541   shift
4542   if test $# != 0; then
4543     # We chose a different compiler from the bogus one.
4544     # However, it has the same basename, so the bogon will be chosen
4545     # first if we set CC to just the basename; use the full file name.
4546     shift
4547     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
4548   fi
4549 fi
4550 fi
4551 fi
4552 CC=$ac_cv_prog_CC
4553 if test -n "$CC"; then
4554   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4555 $as_echo "$CC" >&6; }
4556 else
4557   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4558 $as_echo "no" >&6; }
4559 fi
4560
4561
4562 fi
4563 if test -z "$CC"; then
4564   if test -n "$ac_tool_prefix"; then
4565   for ac_prog in cl.exe
4566   do
4567     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4568 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4569 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4570 $as_echo_n "checking for $ac_word... " >&6; }
4571 if ${ac_cv_prog_CC+:} false; then :
4572   $as_echo_n "(cached) " >&6
4573 else
4574   if test -n "$CC"; then
4575   ac_cv_prog_CC="$CC" # Let the user override the test.
4576 else
4577 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4578 for as_dir in $PATH
4579 do
4580   IFS=$as_save_IFS
4581   test -z "$as_dir" && as_dir=.
4582     for ac_exec_ext in '' $ac_executable_extensions; do
4583   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4584     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4585     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4586     break 2
4587   fi
4588 done
4589   done
4590 IFS=$as_save_IFS
4591
4592 fi
4593 fi
4594 CC=$ac_cv_prog_CC
4595 if test -n "$CC"; then
4596   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4597 $as_echo "$CC" >&6; }
4598 else
4599   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4600 $as_echo "no" >&6; }
4601 fi
4602
4603
4604     test -n "$CC" && break
4605   done
4606 fi
4607 if test -z "$CC"; then
4608   ac_ct_CC=$CC
4609   for ac_prog in cl.exe
4610 do
4611   # Extract the first word of "$ac_prog", so it can be a program name with args.
4612 set dummy $ac_prog; ac_word=$2
4613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4614 $as_echo_n "checking for $ac_word... " >&6; }
4615 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4616   $as_echo_n "(cached) " >&6
4617 else
4618   if test -n "$ac_ct_CC"; then
4619   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4620 else
4621 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4622 for as_dir in $PATH
4623 do
4624   IFS=$as_save_IFS
4625   test -z "$as_dir" && as_dir=.
4626     for ac_exec_ext in '' $ac_executable_extensions; do
4627   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4628     ac_cv_prog_ac_ct_CC="$ac_prog"
4629     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4630     break 2
4631   fi
4632 done
4633   done
4634 IFS=$as_save_IFS
4635
4636 fi
4637 fi
4638 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4639 if test -n "$ac_ct_CC"; then
4640   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4641 $as_echo "$ac_ct_CC" >&6; }
4642 else
4643   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4644 $as_echo "no" >&6; }
4645 fi
4646
4647
4648   test -n "$ac_ct_CC" && break
4649 done
4650
4651   if test "x$ac_ct_CC" = x; then
4652     CC=""
4653   else
4654     case $cross_compiling:$ac_tool_warned in
4655 yes:)
4656 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4657 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4658 ac_tool_warned=yes ;;
4659 esac
4660     CC=$ac_ct_CC
4661   fi
4662 fi
4663
4664 fi
4665
4666
4667 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4668 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4669 as_fn_error $? "no acceptable C compiler found in \$PATH
4670 See \`config.log' for more details" "$LINENO" 5; }
4671
4672 # Provide some information about the compiler.
4673 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4674 set X $ac_compile
4675 ac_compiler=$2
4676 for ac_option in --version -v -V -qversion; do
4677   { { ac_try="$ac_compiler $ac_option >&5"
4678 case "(($ac_try" in
4679   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4680   *) ac_try_echo=$ac_try;;
4681 esac
4682 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4683 $as_echo "$ac_try_echo"; } >&5
4684   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4685   ac_status=$?
4686   if test -s conftest.err; then
4687     sed '10a\
4688 ... rest of stderr output deleted ...
4689          10q' conftest.err >conftest.er1
4690     cat conftest.er1 >&5
4691   fi
4692   rm -f conftest.er1 conftest.err
4693   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4694   test $ac_status = 0; }
4695 done
4696
4697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4698 /* end confdefs.h.  */
4699
4700 int
4701 main ()
4702 {
4703
4704   ;
4705   return 0;
4706 }
4707 _ACEOF
4708 ac_clean_files_save=$ac_clean_files
4709 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
4710 # Try to create an executable without -o first, disregard a.out.
4711 # It will help us diagnose broken compilers, and finding out an intuition
4712 # of exeext.
4713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4714 $as_echo_n "checking whether the C compiler works... " >&6; }
4715 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4716
4717 # The possible output files:
4718 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4719
4720 ac_rmfiles=
4721 for ac_file in $ac_files
4722 do
4723   case $ac_file in
4724     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4725     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4726   esac
4727 done
4728 rm -f $ac_rmfiles
4729
4730 if { { ac_try="$ac_link_default"
4731 case "(($ac_try" in
4732   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4733   *) ac_try_echo=$ac_try;;
4734 esac
4735 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4736 $as_echo "$ac_try_echo"; } >&5
4737   (eval "$ac_link_default") 2>&5
4738   ac_status=$?
4739   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4740   test $ac_status = 0; }; then :
4741   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4742 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4743 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
4744 # so that the user can short-circuit this test for compilers unknown to
4745 # Autoconf.
4746 for ac_file in $ac_files ''
4747 do
4748   test -f "$ac_file" || continue
4749   case $ac_file in
4750     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4751         ;;
4752     [ab].out )
4753         # We found the default executable, but exeext='' is most
4754         # certainly right.
4755         break;;
4756     *.* )
4757         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4758         then :; else
4759            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4760         fi
4761         # We set ac_cv_exeext here because the later test for it is not
4762         # safe: cross compilers may not add the suffix if given an `-o'
4763         # argument, so we may need to know it at that point already.
4764         # Even if this section looks crufty: it has the advantage of
4765         # actually working.
4766         break;;
4767     * )
4768         break;;
4769   esac
4770 done
4771 test "$ac_cv_exeext" = no && ac_cv_exeext=
4772
4773 else
4774   ac_file=''
4775 fi
4776 if test -z "$ac_file"; then :
4777   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4778 $as_echo "no" >&6; }
4779 $as_echo "$as_me: failed program was:" >&5
4780 sed 's/^/| /' conftest.$ac_ext >&5
4781
4782 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4783 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4784 as_fn_error 77 "C compiler cannot create executables
4785 See \`config.log' for more details" "$LINENO" 5; }
4786 else
4787   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4788 $as_echo "yes" >&6; }
4789 fi
4790 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4791 $as_echo_n "checking for C compiler default output file name... " >&6; }
4792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4793 $as_echo "$ac_file" >&6; }
4794 ac_exeext=$ac_cv_exeext
4795
4796 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4797 ac_clean_files=$ac_clean_files_save
4798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4799 $as_echo_n "checking for suffix of executables... " >&6; }
4800 if { { ac_try="$ac_link"
4801 case "(($ac_try" in
4802   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4803   *) ac_try_echo=$ac_try;;
4804 esac
4805 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4806 $as_echo "$ac_try_echo"; } >&5
4807   (eval "$ac_link") 2>&5
4808   ac_status=$?
4809   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4810   test $ac_status = 0; }; then :
4811   # If both `conftest.exe' and `conftest' are `present' (well, observable)
4812 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
4813 # work properly (i.e., refer to `conftest.exe'), while it won't with
4814 # `rm'.
4815 for ac_file in conftest.exe conftest conftest.*; do
4816   test -f "$ac_file" || continue
4817   case $ac_file in
4818     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4819     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4820           break;;
4821     * ) break;;
4822   esac
4823 done
4824 else
4825   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4826 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4827 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4828 See \`config.log' for more details" "$LINENO" 5; }
4829 fi
4830 rm -f conftest conftest$ac_cv_exeext
4831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4832 $as_echo "$ac_cv_exeext" >&6; }
4833
4834 rm -f conftest.$ac_ext
4835 EXEEXT=$ac_cv_exeext
4836 ac_exeext=$EXEEXT
4837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4838 /* end confdefs.h.  */
4839 #include <stdio.h>
4840 int
4841 main ()
4842 {
4843 FILE *f = fopen ("conftest.out", "w");
4844  return ferror (f) || fclose (f) != 0;
4845
4846   ;
4847   return 0;
4848 }
4849 _ACEOF
4850 ac_clean_files="$ac_clean_files conftest.out"
4851 # Check that the compiler produces executables we can run.  If not, either
4852 # the compiler is broken, or we cross compile.
4853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4854 $as_echo_n "checking whether we are cross compiling... " >&6; }
4855 if test "$cross_compiling" != yes; then
4856   { { ac_try="$ac_link"
4857 case "(($ac_try" in
4858   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4859   *) ac_try_echo=$ac_try;;
4860 esac
4861 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4862 $as_echo "$ac_try_echo"; } >&5
4863   (eval "$ac_link") 2>&5
4864   ac_status=$?
4865   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4866   test $ac_status = 0; }
4867   if { ac_try='./conftest$ac_cv_exeext'
4868   { { case "(($ac_try" in
4869   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4870   *) ac_try_echo=$ac_try;;
4871 esac
4872 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4873 $as_echo "$ac_try_echo"; } >&5
4874   (eval "$ac_try") 2>&5
4875   ac_status=$?
4876   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4877   test $ac_status = 0; }; }; then
4878     cross_compiling=no
4879   else
4880     if test "$cross_compiling" = maybe; then
4881         cross_compiling=yes
4882     else
4883         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4884 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4885 as_fn_error $? "cannot run C compiled programs.
4886 If you meant to cross compile, use \`--host'.
4887 See \`config.log' for more details" "$LINENO" 5; }
4888     fi
4889   fi
4890 fi
4891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4892 $as_echo "$cross_compiling" >&6; }
4893
4894 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4895 ac_clean_files=$ac_clean_files_save
4896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4897 $as_echo_n "checking for suffix of object files... " >&6; }
4898 if ${ac_cv_objext+:} false; then :
4899   $as_echo_n "(cached) " >&6
4900 else
4901   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4902 /* end confdefs.h.  */
4903
4904 int
4905 main ()
4906 {
4907
4908   ;
4909   return 0;
4910 }
4911 _ACEOF
4912 rm -f conftest.o conftest.obj
4913 if { { ac_try="$ac_compile"
4914 case "(($ac_try" in
4915   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4916   *) ac_try_echo=$ac_try;;
4917 esac
4918 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4919 $as_echo "$ac_try_echo"; } >&5
4920   (eval "$ac_compile") 2>&5
4921   ac_status=$?
4922   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4923   test $ac_status = 0; }; then :
4924   for ac_file in conftest.o conftest.obj conftest.*; do
4925   test -f "$ac_file" || continue;
4926   case $ac_file in
4927     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4928     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4929        break;;
4930   esac
4931 done
4932 else
4933   $as_echo "$as_me: failed program was:" >&5
4934 sed 's/^/| /' conftest.$ac_ext >&5
4935
4936 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4937 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4938 as_fn_error $? "cannot compute suffix of object files: cannot compile
4939 See \`config.log' for more details" "$LINENO" 5; }
4940 fi
4941 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4942 fi
4943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4944 $as_echo "$ac_cv_objext" >&6; }
4945 OBJEXT=$ac_cv_objext
4946 ac_objext=$OBJEXT
4947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4948 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4949 if ${ac_cv_c_compiler_gnu+:} false; then :
4950   $as_echo_n "(cached) " >&6
4951 else
4952   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4953 /* end confdefs.h.  */
4954
4955 int
4956 main ()
4957 {
4958 #ifndef __GNUC__
4959        choke me
4960 #endif
4961
4962   ;
4963   return 0;
4964 }
4965 _ACEOF
4966 if ac_fn_c_try_compile "$LINENO"; then :
4967   ac_compiler_gnu=yes
4968 else
4969   ac_compiler_gnu=no
4970 fi
4971 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4972 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4973
4974 fi
4975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4976 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4977 if test $ac_compiler_gnu = yes; then
4978   GCC=yes
4979 else
4980   GCC=
4981 fi
4982 ac_test_CFLAGS=${CFLAGS+set}
4983 ac_save_CFLAGS=$CFLAGS
4984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4985 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4986 if ${ac_cv_prog_cc_g+:} false; then :
4987   $as_echo_n "(cached) " >&6
4988 else
4989   ac_save_c_werror_flag=$ac_c_werror_flag
4990    ac_c_werror_flag=yes
4991    ac_cv_prog_cc_g=no
4992    CFLAGS="-g"
4993    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4994 /* end confdefs.h.  */
4995
4996 int
4997 main ()
4998 {
4999
5000   ;
5001   return 0;
5002 }
5003 _ACEOF
5004 if ac_fn_c_try_compile "$LINENO"; then :
5005   ac_cv_prog_cc_g=yes
5006 else
5007   CFLAGS=""
5008       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5009 /* end confdefs.h.  */
5010
5011 int
5012 main ()
5013 {
5014
5015   ;
5016   return 0;
5017 }
5018 _ACEOF
5019 if ac_fn_c_try_compile "$LINENO"; then :
5020
5021 else
5022   ac_c_werror_flag=$ac_save_c_werror_flag
5023          CFLAGS="-g"
5024          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5025 /* end confdefs.h.  */
5026
5027 int
5028 main ()
5029 {
5030
5031   ;
5032   return 0;
5033 }
5034 _ACEOF
5035 if ac_fn_c_try_compile "$LINENO"; then :
5036   ac_cv_prog_cc_g=yes
5037 fi
5038 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5039 fi
5040 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5041 fi
5042 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5043    ac_c_werror_flag=$ac_save_c_werror_flag
5044 fi
5045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
5046 $as_echo "$ac_cv_prog_cc_g" >&6; }
5047 if test "$ac_test_CFLAGS" = set; then
5048   CFLAGS=$ac_save_CFLAGS
5049 elif test $ac_cv_prog_cc_g = yes; then
5050   if test "$GCC" = yes; then
5051     CFLAGS="-g -O2"
5052   else
5053     CFLAGS="-g"
5054   fi
5055 else
5056   if test "$GCC" = yes; then
5057     CFLAGS="-O2"
5058   else
5059     CFLAGS=
5060   fi
5061 fi
5062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
5063 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
5064 if ${ac_cv_prog_cc_c89+:} false; then :
5065   $as_echo_n "(cached) " >&6
5066 else
5067   ac_cv_prog_cc_c89=no
5068 ac_save_CC=$CC
5069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5070 /* end confdefs.h.  */
5071 #include <stdarg.h>
5072 #include <stdio.h>
5073 struct stat;
5074 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
5075 struct buf { int x; };
5076 FILE * (*rcsopen) (struct buf *, struct stat *, int);
5077 static char *e (p, i)
5078      char **p;
5079      int i;
5080 {
5081   return p[i];
5082 }
5083 static char *f (char * (*g) (char **, int), char **p, ...)
5084 {
5085   char *s;
5086   va_list v;
5087   va_start (v,p);
5088   s = g (p, va_arg (v,int));
5089   va_end (v);
5090   return s;
5091 }
5092
5093 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
5094    function prototypes and stuff, but not '\xHH' hex character constants.
5095    These don't provoke an error unfortunately, instead are silently treated
5096    as 'x'.  The following induces an error, until -std is added to get
5097    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
5098    array size at least.  It's necessary to write '\x00'==0 to get something
5099    that's true only with -std.  */
5100 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5101
5102 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5103    inside strings and character constants.  */
5104 #define FOO(x) 'x'
5105 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5106
5107 int test (int i, double x);
5108 struct s1 {int (*f) (int a);};
5109 struct s2 {int (*f) (double a);};
5110 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5111 int argc;
5112 char **argv;
5113 int
5114 main ()
5115 {
5116 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
5117   ;
5118   return 0;
5119 }
5120 _ACEOF
5121 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5122         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5123 do
5124   CC="$ac_save_CC $ac_arg"
5125   if ac_fn_c_try_compile "$LINENO"; then :
5126   ac_cv_prog_cc_c89=$ac_arg
5127 fi
5128 rm -f core conftest.err conftest.$ac_objext
5129   test "x$ac_cv_prog_cc_c89" != "xno" && break
5130 done
5131 rm -f conftest.$ac_ext
5132 CC=$ac_save_CC
5133
5134 fi
5135 # AC_CACHE_VAL
5136 case "x$ac_cv_prog_cc_c89" in
5137   x)
5138     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5139 $as_echo "none needed" >&6; } ;;
5140   xno)
5141     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5142 $as_echo "unsupported" >&6; } ;;
5143   *)
5144     CC="$CC $ac_cv_prog_cc_c89"
5145     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5146 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5147 esac
5148 if test "x$ac_cv_prog_cc_c89" != xno; then :
5149
5150 fi
5151
5152 ac_ext=c
5153 ac_cpp='$CPP $CPPFLAGS'
5154 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5155 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5156 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5157
5158 ac_ext=c
5159 ac_cpp='$CPP $CPPFLAGS'
5160 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5161 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5162 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
5164 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
5165 if ${am_cv_prog_cc_c_o+:} false; then :
5166   $as_echo_n "(cached) " >&6
5167 else
5168   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5169 /* end confdefs.h.  */
5170
5171 int
5172 main ()
5173 {
5174
5175   ;
5176   return 0;
5177 }
5178 _ACEOF
5179   # Make sure it works both with $CC and with simple cc.
5180   # Following AC_PROG_CC_C_O, we do the test twice because some
5181   # compilers refuse to overwrite an existing .o file with -o,
5182   # though they will create one.
5183   am_cv_prog_cc_c_o=yes
5184   for am_i in 1 2; do
5185     if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
5186    ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
5187    ac_status=$?
5188    echo "$as_me:$LINENO: \$? = $ac_status" >&5
5189    (exit $ac_status); } \
5190          && test -f conftest2.$ac_objext; then
5191       : OK
5192     else
5193       am_cv_prog_cc_c_o=no
5194       break
5195     fi
5196   done
5197   rm -f core conftest*
5198   unset am_i
5199 fi
5200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
5201 $as_echo "$am_cv_prog_cc_c_o" >&6; }
5202 if test "$am_cv_prog_cc_c_o" != yes; then
5203    # Losing compiler, so override with the script.
5204    # FIXME: It is wrong to rewrite CC.
5205    # But if we don't then we get into trouble of one sort or another.
5206    # A longer-term fix would be to have automake use am__CC in this case,
5207    # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
5208    CC="$am_aux_dir/compile $CC"
5209 fi
5210 ac_ext=c
5211 ac_cpp='$CPP $CPPFLAGS'
5212 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5213 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5214 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5215
5216
5217 depcc="$CC"   am_compiler_list=
5218
5219 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
5220 $as_echo_n "checking dependency style of $depcc... " >&6; }
5221 if ${am_cv_CC_dependencies_compiler_type+:} false; then :
5222   $as_echo_n "(cached) " >&6
5223 else
5224   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
5225   # We make a subdir and do the tests there.  Otherwise we can end up
5226   # making bogus files that we don't know about and never remove.  For
5227   # instance it was reported that on HP-UX the gcc test will end up
5228   # making a dummy file named 'D' -- because '-MD' means "put the output
5229   # in D".
5230   rm -rf conftest.dir
5231   mkdir conftest.dir
5232   # Copy depcomp to subdir because otherwise we won't find it if we're
5233   # using a relative directory.
5234   cp "$am_depcomp" conftest.dir
5235   cd conftest.dir
5236   # We will build objects and dependencies in a subdirectory because
5237   # it helps to detect inapplicable dependency modes.  For instance
5238   # both Tru64's cc and ICC support -MD to output dependencies as a
5239   # side effect of compilation, but ICC will put the dependencies in
5240   # the current directory while Tru64 will put them in the object
5241   # directory.
5242   mkdir sub
5243
5244   am_cv_CC_dependencies_compiler_type=none
5245   if test "$am_compiler_list" = ""; then
5246      am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5247   fi
5248   am__universal=false
5249   case " $depcc " in #(
5250      *\ -arch\ *\ -arch\ *) am__universal=true ;;
5251      esac
5252
5253   for depmode in $am_compiler_list; do
5254     # Setup a source with many dependencies, because some compilers
5255     # like to wrap large dependency lists on column 80 (with \), and
5256     # we should not choose a depcomp mode which is confused by this.
5257     #
5258     # We need to recreate these files for each test, as the compiler may
5259     # overwrite some of them when testing with obscure command lines.
5260     # This happens at least with the AIX C compiler.
5261     : > sub/conftest.c
5262     for i in 1 2 3 4 5 6; do
5263       echo '#include "conftst'$i'.h"' >> sub/conftest.c
5264       # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
5265       # Solaris 10 /bin/sh.
5266       echo '/* dummy */' > sub/conftst$i.h
5267     done
5268     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
5269
5270     # We check with '-c' and '-o' for the sake of the "dashmstdout"
5271     # mode.  It turns out that the SunPro C++ compiler does not properly
5272     # handle '-M -o', and we need to detect this.  Also, some Intel
5273     # versions had trouble with output in subdirs.
5274     am__obj=sub/conftest.${OBJEXT-o}
5275     am__minus_obj="-o $am__obj"
5276     case $depmode in
5277     gcc)
5278       # This depmode causes a compiler race in universal mode.
5279       test "$am__universal" = false || continue
5280       ;;
5281     nosideeffect)
5282       # After this tag, mechanisms are not by side-effect, so they'll
5283       # only be used when explicitly requested.
5284       if test "x$enable_dependency_tracking" = xyes; then
5285         continue
5286       else
5287         break
5288       fi
5289       ;;
5290     msvc7 | msvc7msys | msvisualcpp | msvcmsys)
5291       # This compiler won't grok '-c -o', but also, the minuso test has
5292       # not run yet.  These depmodes are late enough in the game, and
5293       # so weak that their functioning should not be impacted.
5294       am__obj=conftest.${OBJEXT-o}
5295       am__minus_obj=
5296       ;;
5297     none) break ;;
5298     esac
5299     if depmode=$depmode \
5300        source=sub/conftest.c object=$am__obj \
5301        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5302        $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
5303          >/dev/null 2>conftest.err &&
5304        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
5305        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
5306        grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
5307        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
5308       # icc doesn't choke on unknown options, it will just issue warnings
5309       # or remarks (even with -Werror).  So we grep stderr for any message
5310       # that says an option was ignored or not supported.
5311       # When given -MP, icc 7.0 and 7.1 complain thusly:
5312       #   icc: Command line warning: ignoring option '-M'; no argument required
5313       # The diagnosis changed in icc 8.0:
5314       #   icc: Command line remark: option '-MP' not supported
5315       if (grep 'ignoring option' conftest.err ||
5316           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
5317         am_cv_CC_dependencies_compiler_type=$depmode
5318         break
5319       fi
5320     fi
5321   done
5322
5323   cd ..
5324   rm -rf conftest.dir
5325 else
5326   am_cv_CC_dependencies_compiler_type=none
5327 fi
5328
5329 fi
5330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
5331 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
5332 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
5333
5334  if
5335   test "x$enable_dependency_tracking" != xno \
5336   && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
5337   am__fastdepCC_TRUE=
5338   am__fastdepCC_FALSE='#'
5339 else
5340   am__fastdepCC_TRUE='#'
5341   am__fastdepCC_FALSE=
5342 fi
5343
5344
5345    case $ac_cv_prog_cc_stdc in #(
5346   no) :
5347     ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #(
5348   *) :
5349     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
5350 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
5351 if ${ac_cv_prog_cc_c99+:} false; then :
5352   $as_echo_n "(cached) " >&6
5353 else
5354   ac_cv_prog_cc_c99=no
5355 ac_save_CC=$CC
5356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5357 /* end confdefs.h.  */
5358 #include <stdarg.h>
5359 #include <stdbool.h>
5360 #include <stdlib.h>
5361 #include <wchar.h>
5362 #include <stdio.h>
5363
5364 // Check varargs macros.  These examples are taken from C99 6.10.3.5.
5365 #define debug(...) fprintf (stderr, __VA_ARGS__)
5366 #define showlist(...) puts (#__VA_ARGS__)
5367 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
5368 static void
5369 test_varargs_macros (void)
5370 {
5371   int x = 1234;
5372   int y = 5678;
5373   debug ("Flag");
5374   debug ("X = %d\n", x);
5375   showlist (The first, second, and third items.);
5376   report (x>y, "x is %d but y is %d", x, y);
5377 }
5378
5379 // Check long long types.
5380 #define BIG64 18446744073709551615ull
5381 #define BIG32 4294967295ul
5382 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
5383 #if !BIG_OK
5384   your preprocessor is broken;
5385 #endif
5386 #if BIG_OK
5387 #else
5388   your preprocessor is broken;
5389 #endif
5390 static long long int bignum = -9223372036854775807LL;
5391 static unsigned long long int ubignum = BIG64;
5392
5393 struct incomplete_array
5394 {
5395   int datasize;
5396   double data[];
5397 };
5398
5399 struct named_init {
5400   int number;
5401   const wchar_t *name;
5402   double average;
5403 };
5404
5405 typedef const char *ccp;
5406
5407 static inline int
5408 test_restrict (ccp restrict text)
5409 {
5410   // See if C++-style comments work.
5411   // Iterate through items via the restricted pointer.
5412   // Also check for declarations in for loops.
5413   for (unsigned int i = 0; *(text+i) != '\0'; ++i)
5414     continue;
5415   return 0;
5416 }
5417
5418 // Check varargs and va_copy.
5419 static void
5420 test_varargs (const char *format, ...)
5421 {
5422   va_list args;
5423   va_start (args, format);
5424   va_list args_copy;
5425   va_copy (args_copy, args);
5426
5427   const char *str;
5428   int number;
5429   float fnumber;
5430
5431   while (*format)
5432     {
5433       switch (*format++)
5434         {
5435         case 's': // string
5436           str = va_arg (args_copy, const char *);
5437           break;
5438         case 'd': // int
5439           number = va_arg (args_copy, int);
5440           break;
5441         case 'f': // float
5442           fnumber = va_arg (args_copy, double);
5443           break;
5444         default:
5445           break;
5446         }
5447     }
5448   va_end (args_copy);
5449   va_end (args);
5450 }
5451
5452 int
5453 main ()
5454 {
5455
5456   // Check bool.
5457   _Bool success = false;
5458
5459   // Check restrict.
5460   if (test_restrict ("String literal") == 0)
5461     success = true;
5462   char *restrict newvar = "Another string";
5463
5464   // Check varargs.
5465   test_varargs ("s, d' f .", "string", 65, 34.234);
5466   test_varargs_macros ();
5467
5468   // Check flexible array members.
5469   struct incomplete_array *ia =
5470     malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
5471   ia->datasize = 10;
5472   for (int i = 0; i < ia->datasize; ++i)
5473     ia->data[i] = i * 1.234;
5474
5475   // Check named initializers.
5476   struct named_init ni = {
5477     .number = 34,
5478     .name = L"Test wide string",
5479     .average = 543.34343,
5480   };
5481
5482   ni.number = 58;
5483
5484   int dynamic_array[ni.number];
5485   dynamic_array[ni.number - 1] = 543;
5486
5487   // work around unused variable warnings
5488   return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
5489           || dynamic_array[ni.number - 1] != 543);
5490
5491   ;
5492   return 0;
5493 }
5494 _ACEOF
5495 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
5496 do
5497   CC="$ac_save_CC $ac_arg"
5498   if ac_fn_c_try_compile "$LINENO"; then :
5499   ac_cv_prog_cc_c99=$ac_arg
5500 fi
5501 rm -f core conftest.err conftest.$ac_objext
5502   test "x$ac_cv_prog_cc_c99" != "xno" && break
5503 done
5504 rm -f conftest.$ac_ext
5505 CC=$ac_save_CC
5506
5507 fi
5508 # AC_CACHE_VAL
5509 case "x$ac_cv_prog_cc_c99" in
5510   x)
5511     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5512 $as_echo "none needed" >&6; } ;;
5513   xno)
5514     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5515 $as_echo "unsupported" >&6; } ;;
5516   *)
5517     CC="$CC $ac_cv_prog_cc_c99"
5518     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
5519 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
5520 esac
5521 if test "x$ac_cv_prog_cc_c99" != xno; then :
5522   ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
5523 else
5524   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
5525 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
5526 if ${ac_cv_prog_cc_c89+:} false; then :
5527   $as_echo_n "(cached) " >&6
5528 else
5529   ac_cv_prog_cc_c89=no
5530 ac_save_CC=$CC
5531 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5532 /* end confdefs.h.  */
5533 #include <stdarg.h>
5534 #include <stdio.h>
5535 struct stat;
5536 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
5537 struct buf { int x; };
5538 FILE * (*rcsopen) (struct buf *, struct stat *, int);
5539 static char *e (p, i)
5540      char **p;
5541      int i;
5542 {
5543   return p[i];
5544 }
5545 static char *f (char * (*g) (char **, int), char **p, ...)
5546 {
5547   char *s;
5548   va_list v;
5549   va_start (v,p);
5550   s = g (p, va_arg (v,int));
5551   va_end (v);
5552   return s;
5553 }
5554
5555 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
5556    function prototypes and stuff, but not '\xHH' hex character constants.
5557    These don't provoke an error unfortunately, instead are silently treated
5558    as 'x'.  The following induces an error, until -std is added to get
5559    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
5560    array size at least.  It's necessary to write '\x00'==0 to get something
5561    that's true only with -std.  */
5562 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5563
5564 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5565    inside strings and character constants.  */
5566 #define FOO(x) 'x'
5567 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5568
5569 int test (int i, double x);
5570 struct s1 {int (*f) (int a);};
5571 struct s2 {int (*f) (double a);};
5572 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5573 int argc;
5574 char **argv;
5575 int
5576 main ()
5577 {
5578 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
5579   ;
5580   return 0;
5581 }
5582 _ACEOF
5583 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5584         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5585 do
5586   CC="$ac_save_CC $ac_arg"
5587   if ac_fn_c_try_compile "$LINENO"; then :
5588   ac_cv_prog_cc_c89=$ac_arg
5589 fi
5590 rm -f core conftest.err conftest.$ac_objext
5591   test "x$ac_cv_prog_cc_c89" != "xno" && break
5592 done
5593 rm -f conftest.$ac_ext
5594 CC=$ac_save_CC
5595
5596 fi
5597 # AC_CACHE_VAL
5598 case "x$ac_cv_prog_cc_c89" in
5599   x)
5600     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5601 $as_echo "none needed" >&6; } ;;
5602   xno)
5603     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5604 $as_echo "unsupported" >&6; } ;;
5605   *)
5606     CC="$CC $ac_cv_prog_cc_c89"
5607     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5608 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5609 esac
5610 if test "x$ac_cv_prog_cc_c89" != xno; then :
5611   ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
5612 else
5613   ac_cv_prog_cc_stdc=no
5614 fi
5615
5616 fi
5617  ;;
5618 esac
5619   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5
5620 $as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; }
5621   if ${ac_cv_prog_cc_stdc+:} false; then :
5622   $as_echo_n "(cached) " >&6
5623 fi
5624
5625   case $ac_cv_prog_cc_stdc in #(
5626   no) :
5627     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5628 $as_echo "unsupported" >&6; } ;; #(
5629   '') :
5630     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5631 $as_echo "none needed" >&6; } ;; #(
5632   *) :
5633     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5
5634 $as_echo "$ac_cv_prog_cc_stdc" >&6; } ;;
5635 esac
5636
5637
5638 if test -n "$ac_tool_prefix"; then
5639   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5640 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
5641 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5642 $as_echo_n "checking for $ac_word... " >&6; }
5643 if ${ac_cv_prog_RANLIB+:} false; then :
5644   $as_echo_n "(cached) " >&6
5645 else
5646   if test -n "$RANLIB"; then
5647   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5648 else
5649 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5650 for as_dir in $PATH
5651 do
5652   IFS=$as_save_IFS
5653   test -z "$as_dir" && as_dir=.
5654     for ac_exec_ext in '' $ac_executable_extensions; do
5655   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5656     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5657     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5658     break 2
5659   fi
5660 done
5661   done
5662 IFS=$as_save_IFS
5663
5664 fi
5665 fi
5666 RANLIB=$ac_cv_prog_RANLIB
5667 if test -n "$RANLIB"; then
5668   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5669 $as_echo "$RANLIB" >&6; }
5670 else
5671   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5672 $as_echo "no" >&6; }
5673 fi
5674
5675
5676 fi
5677 if test -z "$ac_cv_prog_RANLIB"; then
5678   ac_ct_RANLIB=$RANLIB
5679   # Extract the first word of "ranlib", so it can be a program name with args.
5680 set dummy ranlib; ac_word=$2
5681 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5682 $as_echo_n "checking for $ac_word... " >&6; }
5683 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
5684   $as_echo_n "(cached) " >&6
5685 else
5686   if test -n "$ac_ct_RANLIB"; then
5687   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5688 else
5689 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5690 for as_dir in $PATH
5691 do
5692   IFS=$as_save_IFS
5693   test -z "$as_dir" && as_dir=.
5694     for ac_exec_ext in '' $ac_executable_extensions; do
5695   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5696     ac_cv_prog_ac_ct_RANLIB="ranlib"
5697     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5698     break 2
5699   fi
5700 done
5701   done
5702 IFS=$as_save_IFS
5703
5704 fi
5705 fi
5706 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5707 if test -n "$ac_ct_RANLIB"; then
5708   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5709 $as_echo "$ac_ct_RANLIB" >&6; }
5710 else
5711   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5712 $as_echo "no" >&6; }
5713 fi
5714
5715   if test "x$ac_ct_RANLIB" = x; then
5716     RANLIB=":"
5717   else
5718     case $cross_compiling:$ac_tool_warned in
5719 yes:)
5720 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5721 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5722 ac_tool_warned=yes ;;
5723 esac
5724     RANLIB=$ac_ct_RANLIB
5725   fi
5726 else
5727   RANLIB="$ac_cv_prog_RANLIB"
5728 fi
5729
5730 for ac_prog in 'bison -y' byacc
5731 do
5732   # Extract the first word of "$ac_prog", so it can be a program name with args.
5733 set dummy $ac_prog; ac_word=$2
5734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5735 $as_echo_n "checking for $ac_word... " >&6; }
5736 if ${ac_cv_prog_YACC+:} false; then :
5737   $as_echo_n "(cached) " >&6
5738 else
5739   if test -n "$YACC"; then
5740   ac_cv_prog_YACC="$YACC" # Let the user override the test.
5741 else
5742 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5743 for as_dir in $PATH
5744 do
5745   IFS=$as_save_IFS
5746   test -z "$as_dir" && as_dir=.
5747     for ac_exec_ext in '' $ac_executable_extensions; do
5748   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5749     ac_cv_prog_YACC="$ac_prog"
5750     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5751     break 2
5752   fi
5753 done
5754   done
5755 IFS=$as_save_IFS
5756
5757 fi
5758 fi
5759 YACC=$ac_cv_prog_YACC
5760 if test -n "$YACC"; then
5761   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
5762 $as_echo "$YACC" >&6; }
5763 else
5764   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5765 $as_echo "no" >&6; }
5766 fi
5767
5768
5769   test -n "$YACC" && break
5770 done
5771 test -n "$YACC" || YACC="yacc"
5772
5773
5774 ac_ext=c
5775 ac_cpp='$CPP $CPPFLAGS'
5776 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5777 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5778 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5780 $as_echo_n "checking how to run the C preprocessor... " >&6; }
5781 # On Suns, sometimes $CPP names a directory.
5782 if test -n "$CPP" && test -d "$CPP"; then
5783   CPP=
5784 fi
5785 if test -z "$CPP"; then
5786   if ${ac_cv_prog_CPP+:} false; then :
5787   $as_echo_n "(cached) " >&6
5788 else
5789       # Double quotes because CPP needs to be expanded
5790     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5791     do
5792       ac_preproc_ok=false
5793 for ac_c_preproc_warn_flag in '' yes
5794 do
5795   # Use a header file that comes with gcc, so configuring glibc
5796   # with a fresh cross-compiler works.
5797   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5798   # <limits.h> exists even on freestanding compilers.
5799   # On the NeXT, cc -E runs the code through the compiler's parser,
5800   # not just through cpp. "Syntax error" is here to catch this case.
5801   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5802 /* end confdefs.h.  */
5803 #ifdef __STDC__
5804 # include <limits.h>
5805 #else
5806 # include <assert.h>
5807 #endif
5808                      Syntax error
5809 _ACEOF
5810 if ac_fn_c_try_cpp "$LINENO"; then :
5811
5812 else
5813   # Broken: fails on valid input.
5814 continue
5815 fi
5816 rm -f conftest.err conftest.i conftest.$ac_ext
5817
5818   # OK, works on sane cases.  Now check whether nonexistent headers
5819   # can be detected and how.
5820   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5821 /* end confdefs.h.  */
5822 #include <ac_nonexistent.h>
5823 _ACEOF
5824 if ac_fn_c_try_cpp "$LINENO"; then :
5825   # Broken: success on invalid input.
5826 continue
5827 else
5828   # Passes both tests.
5829 ac_preproc_ok=:
5830 break
5831 fi
5832 rm -f conftest.err conftest.i conftest.$ac_ext
5833
5834 done
5835 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5836 rm -f conftest.i conftest.err conftest.$ac_ext
5837 if $ac_preproc_ok; then :
5838   break
5839 fi
5840
5841     done
5842     ac_cv_prog_CPP=$CPP
5843
5844 fi
5845   CPP=$ac_cv_prog_CPP
5846 else
5847   ac_cv_prog_CPP=$CPP
5848 fi
5849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5850 $as_echo "$CPP" >&6; }
5851 ac_preproc_ok=false
5852 for ac_c_preproc_warn_flag in '' yes
5853 do
5854   # Use a header file that comes with gcc, so configuring glibc
5855   # with a fresh cross-compiler works.
5856   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5857   # <limits.h> exists even on freestanding compilers.
5858   # On the NeXT, cc -E runs the code through the compiler's parser,
5859   # not just through cpp. "Syntax error" is here to catch this case.
5860   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5861 /* end confdefs.h.  */
5862 #ifdef __STDC__
5863 # include <limits.h>
5864 #else
5865 # include <assert.h>
5866 #endif
5867                      Syntax error
5868 _ACEOF
5869 if ac_fn_c_try_cpp "$LINENO"; then :
5870
5871 else
5872   # Broken: fails on valid input.
5873 continue
5874 fi
5875 rm -f conftest.err conftest.i conftest.$ac_ext
5876
5877   # OK, works on sane cases.  Now check whether nonexistent headers
5878   # can be detected and how.
5879   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5880 /* end confdefs.h.  */
5881 #include <ac_nonexistent.h>
5882 _ACEOF
5883 if ac_fn_c_try_cpp "$LINENO"; then :
5884   # Broken: success on invalid input.
5885 continue
5886 else
5887   # Passes both tests.
5888 ac_preproc_ok=:
5889 break
5890 fi
5891 rm -f conftest.err conftest.i conftest.$ac_ext
5892
5893 done
5894 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5895 rm -f conftest.i conftest.err conftest.$ac_ext
5896 if $ac_preproc_ok; then :
5897
5898 else
5899   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5900 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5901 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
5902 See \`config.log' for more details" "$LINENO" 5; }
5903 fi
5904
5905 ac_ext=c
5906 ac_cpp='$CPP $CPPFLAGS'
5907 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5908 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5909 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5910
5911
5912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5913 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5914 if ${ac_cv_path_GREP+:} false; then :
5915   $as_echo_n "(cached) " >&6
5916 else
5917   if test -z "$GREP"; then
5918   ac_path_GREP_found=false
5919   # Loop through the user's path and test for each of PROGNAME-LIST
5920   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5921 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5922 do
5923   IFS=$as_save_IFS
5924   test -z "$as_dir" && as_dir=.
5925     for ac_prog in grep ggrep; do
5926     for ac_exec_ext in '' $ac_executable_extensions; do
5927       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5928       as_fn_executable_p "$ac_path_GREP" || continue
5929 # Check for GNU ac_path_GREP and select it if it is found.
5930   # Check for GNU $ac_path_GREP
5931 case `"$ac_path_GREP" --version 2>&1` in
5932 *GNU*)
5933   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5934 *)
5935   ac_count=0
5936   $as_echo_n 0123456789 >"conftest.in"
5937   while :
5938   do
5939     cat "conftest.in" "conftest.in" >"conftest.tmp"
5940     mv "conftest.tmp" "conftest.in"
5941     cp "conftest.in" "conftest.nl"
5942     $as_echo 'GREP' >> "conftest.nl"
5943     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5944     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5945     as_fn_arith $ac_count + 1 && ac_count=$as_val
5946     if test $ac_count -gt ${ac_path_GREP_max-0}; then
5947       # Best one so far, save it but keep looking for a better one
5948       ac_cv_path_GREP="$ac_path_GREP"
5949       ac_path_GREP_max=$ac_count
5950     fi
5951     # 10*(2^10) chars as input seems more than enough
5952     test $ac_count -gt 10 && break
5953   done
5954   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5955 esac
5956
5957       $ac_path_GREP_found && break 3
5958     done
5959   done
5960   done
5961 IFS=$as_save_IFS
5962   if test -z "$ac_cv_path_GREP"; then
5963     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5964   fi
5965 else
5966   ac_cv_path_GREP=$GREP
5967 fi
5968
5969 fi
5970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5971 $as_echo "$ac_cv_path_GREP" >&6; }
5972  GREP="$ac_cv_path_GREP"
5973
5974
5975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5976 $as_echo_n "checking for egrep... " >&6; }
5977 if ${ac_cv_path_EGREP+:} false; then :
5978   $as_echo_n "(cached) " >&6
5979 else
5980   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5981    then ac_cv_path_EGREP="$GREP -E"
5982    else
5983      if test -z "$EGREP"; then
5984   ac_path_EGREP_found=false
5985   # Loop through the user's path and test for each of PROGNAME-LIST
5986   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5987 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5988 do
5989   IFS=$as_save_IFS
5990   test -z "$as_dir" && as_dir=.
5991     for ac_prog in egrep; do
5992     for ac_exec_ext in '' $ac_executable_extensions; do
5993       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5994       as_fn_executable_p "$ac_path_EGREP" || continue
5995 # Check for GNU ac_path_EGREP and select it if it is found.
5996   # Check for GNU $ac_path_EGREP
5997 case `"$ac_path_EGREP" --version 2>&1` in
5998 *GNU*)
5999   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6000 *)
6001   ac_count=0
6002   $as_echo_n 0123456789 >"conftest.in"
6003   while :
6004   do
6005     cat "conftest.in" "conftest.in" >"conftest.tmp"
6006     mv "conftest.tmp" "conftest.in"
6007     cp "conftest.in" "conftest.nl"
6008     $as_echo 'EGREP' >> "conftest.nl"
6009     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6010     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6011     as_fn_arith $ac_count + 1 && ac_count=$as_val
6012     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6013       # Best one so far, save it but keep looking for a better one
6014       ac_cv_path_EGREP="$ac_path_EGREP"
6015       ac_path_EGREP_max=$ac_count
6016     fi
6017     # 10*(2^10) chars as input seems more than enough
6018     test $ac_count -gt 10 && break
6019   done
6020   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6021 esac
6022
6023       $ac_path_EGREP_found && break 3
6024     done
6025   done
6026   done
6027 IFS=$as_save_IFS
6028   if test -z "$ac_cv_path_EGREP"; then
6029     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6030   fi
6031 else
6032   ac_cv_path_EGREP=$EGREP
6033 fi
6034
6035    fi
6036 fi
6037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6038 $as_echo "$ac_cv_path_EGREP" >&6; }
6039  EGREP="$ac_cv_path_EGREP"
6040
6041
6042
6043
6044   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
6045 $as_echo_n "checking for Minix Amsterdam compiler... " >&6; }
6046 if ${gl_cv_c_amsterdam_compiler+:} false; then :
6047   $as_echo_n "(cached) " >&6
6048 else
6049
6050       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6051 /* end confdefs.h.  */
6052
6053 #ifdef __ACK__
6054 Amsterdam
6055 #endif
6056
6057 _ACEOF
6058 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6059   $EGREP "Amsterdam" >/dev/null 2>&1; then :
6060   gl_cv_c_amsterdam_compiler=yes
6061 else
6062   gl_cv_c_amsterdam_compiler=no
6063 fi
6064 rm -f conftest*
6065
6066
6067 fi
6068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
6069 $as_echo "$gl_cv_c_amsterdam_compiler" >&6; }
6070   if test -z "$AR"; then
6071     if test $gl_cv_c_amsterdam_compiler = yes; then
6072       AR='cc -c.a'
6073       if test -z "$ARFLAGS"; then
6074         ARFLAGS='-o'
6075       fi
6076     else
6077                   if test -n "$ac_tool_prefix"; then
6078   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6079 set dummy ${ac_tool_prefix}ar; ac_word=$2
6080 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6081 $as_echo_n "checking for $ac_word... " >&6; }
6082 if ${ac_cv_prog_AR+:} false; then :
6083   $as_echo_n "(cached) " >&6
6084 else
6085   if test -n "$AR"; then
6086   ac_cv_prog_AR="$AR" # Let the user override the test.
6087 else
6088 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6089 for as_dir in $PATH
6090 do
6091   IFS=$as_save_IFS
6092   test -z "$as_dir" && as_dir=.
6093     for ac_exec_ext in '' $ac_executable_extensions; do
6094   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6095     ac_cv_prog_AR="${ac_tool_prefix}ar"
6096     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6097     break 2
6098   fi
6099 done
6100   done
6101 IFS=$as_save_IFS
6102
6103 fi
6104 fi
6105 AR=$ac_cv_prog_AR
6106 if test -n "$AR"; then
6107   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6108 $as_echo "$AR" >&6; }
6109 else
6110   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6111 $as_echo "no" >&6; }
6112 fi
6113
6114
6115 fi
6116 if test -z "$ac_cv_prog_AR"; then
6117   ac_ct_AR=$AR
6118   # Extract the first word of "ar", so it can be a program name with args.
6119 set dummy ar; ac_word=$2
6120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6121 $as_echo_n "checking for $ac_word... " >&6; }
6122 if ${ac_cv_prog_ac_ct_AR+:} false; then :
6123   $as_echo_n "(cached) " >&6
6124 else
6125   if test -n "$ac_ct_AR"; then
6126   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6127 else
6128 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6129 for as_dir in $PATH
6130 do
6131   IFS=$as_save_IFS
6132   test -z "$as_dir" && as_dir=.
6133     for ac_exec_ext in '' $ac_executable_extensions; do
6134   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6135     ac_cv_prog_ac_ct_AR="ar"
6136     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6137     break 2
6138   fi
6139 done
6140   done
6141 IFS=$as_save_IFS
6142
6143 fi
6144 fi
6145 ac_ct_AR=$ac_cv_prog_ac_ct_AR
6146 if test -n "$ac_ct_AR"; then
6147   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6148 $as_echo "$ac_ct_AR" >&6; }
6149 else
6150   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6151 $as_echo "no" >&6; }
6152 fi
6153
6154   if test "x$ac_ct_AR" = x; then
6155     AR="ar"
6156   else
6157     case $cross_compiling:$ac_tool_warned in
6158 yes:)
6159 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6160 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6161 ac_tool_warned=yes ;;
6162 esac
6163     AR=$ac_ct_AR
6164   fi
6165 else
6166   AR="$ac_cv_prog_AR"
6167 fi
6168
6169       if test -z "$ARFLAGS"; then
6170         ARFLAGS='cr'
6171       fi
6172     fi
6173   else
6174     if test -z "$ARFLAGS"; then
6175       ARFLAGS='cr'
6176     fi
6177   fi
6178
6179
6180   if test -z "$RANLIB"; then
6181     if test $gl_cv_c_amsterdam_compiler = yes; then
6182       RANLIB=':'
6183     else
6184             if test -n "$ac_tool_prefix"; then
6185   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6186 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6188 $as_echo_n "checking for $ac_word... " >&6; }
6189 if ${ac_cv_prog_RANLIB+:} false; then :
6190   $as_echo_n "(cached) " >&6
6191 else
6192   if test -n "$RANLIB"; then
6193   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6194 else
6195 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6196 for as_dir in $PATH
6197 do
6198   IFS=$as_save_IFS
6199   test -z "$as_dir" && as_dir=.
6200     for ac_exec_ext in '' $ac_executable_extensions; do
6201   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6202     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6203     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6204     break 2
6205   fi
6206 done
6207   done
6208 IFS=$as_save_IFS
6209
6210 fi
6211 fi
6212 RANLIB=$ac_cv_prog_RANLIB
6213 if test -n "$RANLIB"; then
6214   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6215 $as_echo "$RANLIB" >&6; }
6216 else
6217   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6218 $as_echo "no" >&6; }
6219 fi
6220
6221
6222 fi
6223 if test -z "$ac_cv_prog_RANLIB"; then
6224   ac_ct_RANLIB=$RANLIB
6225   # Extract the first word of "ranlib", so it can be a program name with args.
6226 set dummy ranlib; ac_word=$2
6227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6228 $as_echo_n "checking for $ac_word... " >&6; }
6229 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
6230   $as_echo_n "(cached) " >&6
6231 else
6232   if test -n "$ac_ct_RANLIB"; then
6233   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6234 else
6235 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6236 for as_dir in $PATH
6237 do
6238   IFS=$as_save_IFS
6239   test -z "$as_dir" && as_dir=.
6240     for ac_exec_ext in '' $ac_executable_extensions; do
6241   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6242     ac_cv_prog_ac_ct_RANLIB="ranlib"
6243     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6244     break 2
6245   fi
6246 done
6247   done
6248 IFS=$as_save_IFS
6249
6250 fi
6251 fi
6252 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6253 if test -n "$ac_ct_RANLIB"; then
6254   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6255 $as_echo "$ac_ct_RANLIB" >&6; }
6256 else
6257   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6258 $as_echo "no" >&6; }
6259 fi
6260
6261   if test "x$ac_ct_RANLIB" = x; then
6262     RANLIB=":"
6263   else
6264     case $cross_compiling:$ac_tool_warned in
6265 yes:)
6266 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6267 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6268 ac_tool_warned=yes ;;
6269 esac
6270     RANLIB=$ac_ct_RANLIB
6271   fi
6272 else
6273   RANLIB="$ac_cv_prog_RANLIB"
6274 fi
6275
6276     fi
6277   fi
6278
6279
6280
6281 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6282 $as_echo_n "checking for ANSI C header files... " >&6; }
6283 if ${ac_cv_header_stdc+:} false; then :
6284   $as_echo_n "(cached) " >&6
6285 else
6286   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6287 /* end confdefs.h.  */
6288 #include <stdlib.h>
6289 #include <stdarg.h>
6290 #include <string.h>
6291 #include <float.h>
6292
6293 int
6294 main ()
6295 {
6296
6297   ;
6298   return 0;
6299 }
6300 _ACEOF
6301 if ac_fn_c_try_compile "$LINENO"; then :
6302   ac_cv_header_stdc=yes
6303 else
6304   ac_cv_header_stdc=no
6305 fi
6306 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6307
6308 if test $ac_cv_header_stdc = yes; then
6309   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6310   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6311 /* end confdefs.h.  */
6312 #include <string.h>
6313
6314 _ACEOF
6315 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6316   $EGREP "memchr" >/dev/null 2>&1; then :
6317
6318 else
6319   ac_cv_header_stdc=no
6320 fi
6321 rm -f conftest*
6322
6323 fi
6324
6325 if test $ac_cv_header_stdc = yes; then
6326   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6327   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6328 /* end confdefs.h.  */
6329 #include <stdlib.h>
6330
6331 _ACEOF
6332 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6333   $EGREP "free" >/dev/null 2>&1; then :
6334
6335 else
6336   ac_cv_header_stdc=no
6337 fi
6338 rm -f conftest*
6339
6340 fi
6341
6342 if test $ac_cv_header_stdc = yes; then
6343   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6344   if test "$cross_compiling" = yes; then :
6345   :
6346 else
6347   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6348 /* end confdefs.h.  */
6349 #include <ctype.h>
6350 #include <stdlib.h>
6351 #if ((' ' & 0x0FF) == 0x020)
6352 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6353 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6354 #else
6355 # define ISLOWER(c) \
6356                    (('a' <= (c) && (c) <= 'i') \
6357                      || ('j' <= (c) && (c) <= 'r') \
6358                      || ('s' <= (c) && (c) <= 'z'))
6359 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6360 #endif
6361
6362 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6363 int
6364 main ()
6365 {
6366   int i;
6367   for (i = 0; i < 256; i++)
6368     if (XOR (islower (i), ISLOWER (i))
6369         || toupper (i) != TOUPPER (i))
6370       return 2;
6371   return 0;
6372 }
6373 _ACEOF
6374 if ac_fn_c_try_run "$LINENO"; then :
6375
6376 else
6377   ac_cv_header_stdc=no
6378 fi
6379 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6380   conftest.$ac_objext conftest.beam conftest.$ac_ext
6381 fi
6382
6383 fi
6384 fi
6385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6386 $as_echo "$ac_cv_header_stdc" >&6; }
6387 if test $ac_cv_header_stdc = yes; then
6388
6389 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
6390
6391 fi
6392
6393 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
6394 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
6395                   inttypes.h stdint.h unistd.h
6396 do :
6397   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6398 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
6399 "
6400 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6401   cat >>confdefs.h <<_ACEOF
6402 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6403 _ACEOF
6404
6405 fi
6406
6407 done
6408
6409
6410
6411   ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
6412 if test "x$ac_cv_header_minix_config_h" = xyes; then :
6413   MINIX=yes
6414 else
6415   MINIX=
6416 fi
6417
6418
6419   if test "$MINIX" = yes; then
6420
6421 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
6422
6423
6424 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
6425
6426
6427 $as_echo "#define _MINIX 1" >>confdefs.h
6428
6429
6430 $as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
6431
6432   fi
6433
6434
6435   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
6436 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
6437 if ${ac_cv_safe_to_define___extensions__+:} false; then :
6438   $as_echo_n "(cached) " >&6
6439 else
6440   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6441 /* end confdefs.h.  */
6442
6443 #         define __EXTENSIONS__ 1
6444           $ac_includes_default
6445 int
6446 main ()
6447 {
6448
6449   ;
6450   return 0;
6451 }
6452 _ACEOF
6453 if ac_fn_c_try_compile "$LINENO"; then :
6454   ac_cv_safe_to_define___extensions__=yes
6455 else
6456   ac_cv_safe_to_define___extensions__=no
6457 fi
6458 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6459 fi
6460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
6461 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
6462   test $ac_cv_safe_to_define___extensions__ = yes &&
6463     $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
6464
6465   $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
6466
6467   $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
6468
6469   $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
6470
6471   $as_echo "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h
6472
6473   $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
6474
6475   $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
6476
6477   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
6478 $as_echo_n "checking whether _XOPEN_SOURCE should be defined... " >&6; }
6479 if ${ac_cv_should_define__xopen_source+:} false; then :
6480   $as_echo_n "(cached) " >&6
6481 else
6482   ac_cv_should_define__xopen_source=no
6483      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6484 /* end confdefs.h.  */
6485
6486           #include <wchar.h>
6487           mbstate_t x;
6488 int
6489 main ()
6490 {
6491
6492   ;
6493   return 0;
6494 }
6495 _ACEOF
6496 if ac_fn_c_try_compile "$LINENO"; then :
6497
6498 else
6499   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6500 /* end confdefs.h.  */
6501
6502              #define _XOPEN_SOURCE 500
6503              #include <wchar.h>
6504              mbstate_t x;
6505 int
6506 main ()
6507 {
6508
6509   ;
6510   return 0;
6511 }
6512 _ACEOF
6513 if ac_fn_c_try_compile "$LINENO"; then :
6514   ac_cv_should_define__xopen_source=yes
6515 fi
6516 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6517 fi
6518 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6519 fi
6520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
6521 $as_echo "$ac_cv_should_define__xopen_source" >&6; }
6522   test $ac_cv_should_define__xopen_source = yes &&
6523     $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
6524
6525
6526
6527
6528
6529
6530
6531
6532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
6533 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
6534 if ${ac_cv_sys_largefile_source+:} false; then :
6535   $as_echo_n "(cached) " >&6
6536 else
6537   while :; do
6538   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6539 /* end confdefs.h.  */
6540 #include <sys/types.h> /* for off_t */
6541      #include <stdio.h>
6542 int
6543 main ()
6544 {
6545 int (*fp) (FILE *, off_t, int) = fseeko;
6546      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
6547   ;
6548   return 0;
6549 }
6550 _ACEOF
6551 if ac_fn_c_try_link "$LINENO"; then :
6552   ac_cv_sys_largefile_source=no; break
6553 fi
6554 rm -f core conftest.err conftest.$ac_objext \
6555     conftest$ac_exeext conftest.$ac_ext
6556   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6557 /* end confdefs.h.  */
6558 #define _LARGEFILE_SOURCE 1
6559 #include <sys/types.h> /* for off_t */
6560      #include <stdio.h>
6561 int
6562 main ()
6563 {
6564 int (*fp) (FILE *, off_t, int) = fseeko;
6565      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
6566   ;
6567   return 0;
6568 }
6569 _ACEOF
6570 if ac_fn_c_try_link "$LINENO"; then :
6571   ac_cv_sys_largefile_source=1; break
6572 fi
6573 rm -f core conftest.err conftest.$ac_objext \
6574     conftest$ac_exeext conftest.$ac_ext
6575   ac_cv_sys_largefile_source=unknown
6576   break
6577 done
6578 fi
6579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
6580 $as_echo "$ac_cv_sys_largefile_source" >&6; }
6581 case $ac_cv_sys_largefile_source in #(
6582   no | unknown) ;;
6583   *)
6584 cat >>confdefs.h <<_ACEOF
6585 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
6586 _ACEOF
6587 ;;
6588 esac
6589 rm -rf conftest*
6590
6591 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
6592 # in glibc 2.1.3, but that breaks too many other things.
6593 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
6594 if test $ac_cv_sys_largefile_source != unknown; then
6595
6596 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
6597
6598 fi
6599
6600 # Check whether --enable-largefile was given.
6601 if test "${enable_largefile+set}" = set; then :
6602   enableval=$enable_largefile;
6603 fi
6604
6605 if test "$enable_largefile" != no; then
6606
6607   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
6608 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
6609 if ${ac_cv_sys_largefile_CC+:} false; then :
6610   $as_echo_n "(cached) " >&6
6611 else
6612   ac_cv_sys_largefile_CC=no
6613      if test "$GCC" != yes; then
6614        ac_save_CC=$CC
6615        while :; do
6616          # IRIX 6.2 and later do not support large files by default,
6617          # so use the C compiler's -n32 option if that helps.
6618          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6619 /* end confdefs.h.  */
6620 #include <sys/types.h>
6621  /* Check that off_t can represent 2**63 - 1 correctly.
6622     We can't simply define LARGE_OFF_T to be 9223372036854775807,
6623     since some C++ compilers masquerading as C compilers
6624     incorrectly reject 9223372036854775807.  */
6625 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6626   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6627                        && LARGE_OFF_T % 2147483647 == 1)
6628                       ? 1 : -1];
6629 int
6630 main ()
6631 {
6632
6633   ;
6634   return 0;
6635 }
6636 _ACEOF
6637          if ac_fn_c_try_compile "$LINENO"; then :
6638   break
6639 fi
6640 rm -f core conftest.err conftest.$ac_objext
6641          CC="$CC -n32"
6642          if ac_fn_c_try_compile "$LINENO"; then :
6643   ac_cv_sys_largefile_CC=' -n32'; break
6644 fi
6645 rm -f core conftest.err conftest.$ac_objext
6646          break
6647        done
6648        CC=$ac_save_CC
6649        rm -f conftest.$ac_ext
6650     fi
6651 fi
6652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
6653 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
6654   if test "$ac_cv_sys_largefile_CC" != no; then
6655     CC=$CC$ac_cv_sys_largefile_CC
6656   fi
6657
6658   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
6659 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
6660 if ${ac_cv_sys_file_offset_bits+:} false; then :
6661   $as_echo_n "(cached) " >&6
6662 else
6663   while :; do
6664   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6665 /* end confdefs.h.  */
6666 #include <sys/types.h>
6667  /* Check that off_t can represent 2**63 - 1 correctly.
6668     We can't simply define LARGE_OFF_T to be 9223372036854775807,
6669     since some C++ compilers masquerading as C compilers
6670     incorrectly reject 9223372036854775807.  */
6671 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6672   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6673                        && LARGE_OFF_T % 2147483647 == 1)
6674                       ? 1 : -1];
6675 int
6676 main ()
6677 {
6678
6679   ;
6680   return 0;
6681 }
6682 _ACEOF
6683 if ac_fn_c_try_compile "$LINENO"; then :
6684   ac_cv_sys_file_offset_bits=no; break
6685 fi
6686 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6687   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6688 /* end confdefs.h.  */
6689 #define _FILE_OFFSET_BITS 64
6690 #include <sys/types.h>
6691  /* Check that off_t can represent 2**63 - 1 correctly.
6692     We can't simply define LARGE_OFF_T to be 9223372036854775807,
6693     since some C++ compilers masquerading as C compilers
6694     incorrectly reject 9223372036854775807.  */
6695 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6696   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6697                        && LARGE_OFF_T % 2147483647 == 1)
6698                       ? 1 : -1];
6699 int
6700 main ()
6701 {
6702
6703   ;
6704   return 0;
6705 }
6706 _ACEOF
6707 if ac_fn_c_try_compile "$LINENO"; then :
6708   ac_cv_sys_file_offset_bits=64; break
6709 fi
6710 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6711   ac_cv_sys_file_offset_bits=unknown
6712   break
6713 done
6714 fi
6715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
6716 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
6717 case $ac_cv_sys_file_offset_bits in #(
6718   no | unknown) ;;
6719   *)
6720 cat >>confdefs.h <<_ACEOF
6721 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
6722 _ACEOF
6723 ;;
6724 esac
6725 rm -rf conftest*
6726   if test $ac_cv_sys_file_offset_bits = unknown; then
6727     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
6728 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
6729 if ${ac_cv_sys_large_files+:} false; then :
6730   $as_echo_n "(cached) " >&6
6731 else
6732   while :; do
6733   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6734 /* end confdefs.h.  */
6735 #include <sys/types.h>
6736  /* Check that off_t can represent 2**63 - 1 correctly.
6737     We can't simply define LARGE_OFF_T to be 9223372036854775807,
6738     since some C++ compilers masquerading as C compilers
6739     incorrectly reject 9223372036854775807.  */
6740 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6741   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6742                        && LARGE_OFF_T % 2147483647 == 1)
6743                       ? 1 : -1];
6744 int
6745 main ()
6746 {
6747
6748   ;
6749   return 0;
6750 }
6751 _ACEOF
6752 if ac_fn_c_try_compile "$LINENO"; then :
6753   ac_cv_sys_large_files=no; break
6754 fi
6755 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6756   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6757 /* end confdefs.h.  */
6758 #define _LARGE_FILES 1
6759 #include <sys/types.h>
6760  /* Check that off_t can represent 2**63 - 1 correctly.
6761     We can't simply define LARGE_OFF_T to be 9223372036854775807,
6762     since some C++ compilers masquerading as C compilers
6763     incorrectly reject 9223372036854775807.  */
6764 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6765   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6766                        && LARGE_OFF_T % 2147483647 == 1)
6767                       ? 1 : -1];
6768 int
6769 main ()
6770 {
6771
6772   ;
6773   return 0;
6774 }
6775 _ACEOF
6776 if ac_fn_c_try_compile "$LINENO"; then :
6777   ac_cv_sys_large_files=1; break
6778 fi
6779 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6780   ac_cv_sys_large_files=unknown
6781   break
6782 done
6783 fi
6784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
6785 $as_echo "$ac_cv_sys_large_files" >&6; }
6786 case $ac_cv_sys_large_files in #(
6787   no | unknown) ;;
6788   *)
6789 cat >>confdefs.h <<_ACEOF
6790 #define _LARGE_FILES $ac_cv_sys_large_files
6791 _ACEOF
6792 ;;
6793 esac
6794 rm -rf conftest*
6795   fi
6796
6797
6798 $as_echo "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h
6799
6800 fi
6801
6802
6803
6804
6805   # Code from module absolute-header:
6806   # Code from module acl-permissions:
6807   # Code from module alignof:
6808   # Code from module alloca:
6809   # Code from module alloca-opt:
6810   # Code from module allocator:
6811   # Code from module areadlink:
6812   # Code from module areadlink-with-size:
6813   # Code from module areadlinkat:
6814   # Code from module areadlinkat-with-size:
6815   # Code from module argmatch:
6816   # Code from module argp:
6817   # Code from module argp-version-etc:
6818   # Code from module assure:
6819   # Code from module at-internal:
6820   # Code from module backupfile:
6821   # Code from module bitrotate:
6822   # Code from module btowc:
6823   # Code from module c-ctype:
6824   # Code from module c-strcase:
6825   # Code from module c-strcaseeq:
6826   # Code from module canonicalize-lgpl:
6827   # Code from module careadlinkat:
6828   # Code from module chdir:
6829   # Code from module chdir-long:
6830   # Code from module chown:
6831   # Code from module clock-time:
6832   # Code from module cloexec:
6833   # Code from module close:
6834   # Code from module close-stream:
6835   # Code from module closedir:
6836   # Code from module closeout:
6837   # Code from module configmake:
6838   # Code from module d-ino:
6839   # Code from module dirent:
6840   # Code from module dirent-safer:
6841   # Code from module dirfd:
6842   # Code from module dirname:
6843   # Code from module dirname-lgpl:
6844   # Code from module dosname:
6845   # Code from module double-slash-root:
6846   # Code from module dup:
6847   # Code from module dup2:
6848   # Code from module environ:
6849   # Code from module errno:
6850   # Code from module error:
6851   # Code from module euidaccess:
6852   # Code from module exclude:
6853   # Code from module exitfail:
6854   # Code from module extensions:
6855
6856   # Code from module extern-inline:
6857   # Code from module faccessat:
6858   # Code from module fchdir:
6859   # Code from module fchmodat:
6860   # Code from module fchownat:
6861   # Code from module fcntl:
6862   # Code from module fcntl-h:
6863   # Code from module fd-hook:
6864   # Code from module fdopendir:
6865   # Code from module fdutimensat:
6866   # Code from module file-has-acl:
6867   # Code from module fileblocks:
6868   # Code from module filename:
6869   # Code from module filenamecat-lgpl:
6870   # Code from module flexmember:
6871   # Code from module float:
6872   # Code from module fnmatch:
6873   # Code from module fnmatch-gnu:
6874   # Code from module fpending:
6875   # Code from module fprintftime:
6876   # Code from module fseek:
6877   # Code from module fseeko:
6878
6879   # Code from module fstat:
6880   # Code from module fstatat:
6881   # Code from module full-write:
6882   # Code from module futimens:
6883   # Code from module getcwd:
6884   # Code from module getcwd-lgpl:
6885   # Code from module getdelim:
6886   # Code from module getdtablesize:
6887   # Code from module getgroups:
6888   # Code from module getline:
6889   # Code from module getopt-gnu:
6890   # Code from module getopt-posix:
6891   # Code from module getpagesize:
6892   # Code from module gettext:
6893   # Code from module gettext-h:
6894   # Code from module gettime:
6895   # Code from module gettimeofday:
6896   # Code from module gitlog-to-changelog:
6897   # Code from module group-member:
6898   # Code from module hash:
6899   # Code from module havelib:
6900   # Code from module human:
6901   # Code from module include_next:
6902   # Code from module intprops:
6903   # Code from module inttostr:
6904   # Code from module inttypes:
6905   # Code from module inttypes-incomplete:
6906   # Code from module iswblank:
6907   # Code from module langinfo:
6908   # Code from module largefile:
6909
6910   # Code from module lchown:
6911   # Code from module link:
6912   # Code from module link-follow:
6913   # Code from module linkat:
6914   # Code from module localcharset:
6915   # Code from module locale:
6916   # Code from module localeconv:
6917   # Code from module lseek:
6918   # Code from module lstat:
6919   # Code from module malloc-gnu:
6920   # Code from module malloc-posix:
6921   # Code from module malloca:
6922   # Code from module manywarnings:
6923   # Code from module mbchar:
6924   # Code from module mbrtowc:
6925   # Code from module mbscasecmp:
6926   # Code from module mbsinit:
6927   # Code from module mbsrtowcs:
6928   # Code from module mbtowc:
6929   # Code from module mbuiter:
6930   # Code from module memchr:
6931   # Code from module mempcpy:
6932   # Code from module memrchr:
6933   # Code from module mkdir:
6934   # Code from module mkdirat:
6935   # Code from module mkdtemp:
6936   # Code from module mkfifo:
6937   # Code from module mkfifoat:
6938   # Code from module mknod:
6939   # Code from module mktime:
6940   # Code from module mktime-internal:
6941   # Code from module modechange:
6942   # Code from module msvc-inval:
6943   # Code from module msvc-nothrow:
6944   # Code from module multiarch:
6945   # Code from module nl_langinfo:
6946   # Code from module nocrash:
6947   # Code from module obstack:
6948   # Code from module open:
6949   # Code from module openat:
6950   # Code from module openat-die:
6951   # Code from module openat-h:
6952   # Code from module opendir:
6953   # Code from module parse-datetime:
6954   # Code from module pathmax:
6955   # Code from module priv-set:
6956   # Code from module progname:
6957   # Code from module quote:
6958   # Code from module quotearg:
6959   # Code from module quotearg-simple:
6960   # Code from module raise:
6961   # Code from module rawmemchr:
6962   # Code from module read:
6963   # Code from module readdir:
6964   # Code from module readlink:
6965   # Code from module readlinkat:
6966   # Code from module realloc-posix:
6967   # Code from module regex:
6968   # Code from module rename:
6969   # Code from module renameat:
6970   # Code from module rewinddir:
6971   # Code from module rmdir:
6972   # Code from module root-uid:
6973   # Code from module rpmatch:
6974   # Code from module safe-read:
6975   # Code from module safe-write:
6976   # Code from module same-inode:
6977   # Code from module save-cwd:
6978   # Code from module savedir:
6979   # Code from module secure_getenv:
6980   # Code from module selinux-at:
6981   # Code from module selinux-h:
6982   # Code from module setenv:
6983   # Code from module signal-h:
6984   # Code from module size_max:
6985   # Code from module sleep:
6986   # Code from module snippet/_Noreturn:
6987   # Code from module snippet/arg-nonnull:
6988   # Code from module snippet/c++defs:
6989   # Code from module snippet/unused-parameter:
6990   # Code from module snippet/warn-on-use:
6991   # Code from module snprintf:
6992   # Code from module ssize_t:
6993   # Code from module stat:
6994   # Code from module stat-macros:
6995   # Code from module stat-time:
6996   # Code from module statat:
6997   # Code from module stdalign:
6998   # Code from module stdarg:
6999
7000
7001
7002   # Code from module stdbool:
7003   # Code from module stddef:
7004   # Code from module stdint:
7005   # Code from module stdio:
7006   # Code from module stdlib:
7007   # Code from module stpcpy:
7008   # Code from module strcase:
7009   # Code from module strchrnul:
7010   # Code from module strdup-posix:
7011   # Code from module streq:
7012   # Code from module strerror:
7013   # Code from module strerror-override:
7014   # Code from module strftime:
7015   # Code from module string:
7016   # Code from module strings:
7017   # Code from module strndup:
7018   # Code from module strnlen:
7019   # Code from module strnlen1:
7020   # Code from module strtoimax:
7021   # Code from module strtol:
7022   # Code from module strtoll:
7023   # Code from module strtoul:
7024   # Code from module strtoull:
7025   # Code from module strtoumax:
7026   # Code from module symlink:
7027   # Code from module symlinkat:
7028   # Code from module sys_stat:
7029   # Code from module sys_time:
7030   # Code from module sys_types:
7031   # Code from module sysexits:
7032   # Code from module tempname:
7033   # Code from module time:
7034   # Code from module time_r:
7035   # Code from module time_rz:
7036   # Code from module timegm:
7037   # Code from module timespec:
7038   # Code from module timespec-sub:
7039   # Code from module unistd:
7040   # Code from module unistd-safer:
7041   # Code from module unitypes:
7042   # Code from module uniwidth/base:
7043   # Code from module uniwidth/width:
7044   # Code from module unlink:
7045   # Code from module unlinkat:
7046   # Code from module unlinkdir:
7047   # Code from module unlocked-io:
7048   # Code from module unsetenv:
7049   # Code from module utimens:
7050   # Code from module utimensat:
7051   # Code from module vasnprintf:
7052   # Code from module vasprintf:
7053   # Code from module verify:
7054   # Code from module version-etc:
7055   # Code from module version-etc-fsf:
7056   # Code from module vsnprintf:
7057   # Code from module warnings:
7058   # Code from module wchar:
7059   # Code from module wcrtomb:
7060   # Code from module wctype-h:
7061   # Code from module wcwidth:
7062   # Code from module write:
7063   # Code from module xalloc:
7064   # Code from module xalloc-die:
7065   # Code from module xalloc-oversized:
7066   # Code from module xgetcwd:
7067   # Code from module xsize:
7068   # Code from module xstrndup:
7069   # Code from module xstrtol:
7070   # Code from module xstrtoumax:
7071   # Code from module xvasprintf:
7072
7073 if test -n "$ac_tool_prefix"; then
7074   for ac_prog in ar
7075   do
7076     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7077 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7079 $as_echo_n "checking for $ac_word... " >&6; }
7080 if ${ac_cv_prog_AR+:} false; then :
7081   $as_echo_n "(cached) " >&6
7082 else
7083   if test -n "$AR"; then
7084   ac_cv_prog_AR="$AR" # Let the user override the test.
7085 else
7086 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7087 for as_dir in $PATH
7088 do
7089   IFS=$as_save_IFS
7090   test -z "$as_dir" && as_dir=.
7091     for ac_exec_ext in '' $ac_executable_extensions; do
7092   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7093     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
7094     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7095     break 2
7096   fi
7097 done
7098   done
7099 IFS=$as_save_IFS
7100
7101 fi
7102 fi
7103 AR=$ac_cv_prog_AR
7104 if test -n "$AR"; then
7105   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7106 $as_echo "$AR" >&6; }
7107 else
7108   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7109 $as_echo "no" >&6; }
7110 fi
7111
7112
7113     test -n "$AR" && break
7114   done
7115 fi
7116 if test -z "$AR"; then
7117   ac_ct_AR=$AR
7118   for ac_prog in ar
7119 do
7120   # Extract the first word of "$ac_prog", so it can be a program name with args.
7121 set dummy $ac_prog; ac_word=$2
7122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7123 $as_echo_n "checking for $ac_word... " >&6; }
7124 if ${ac_cv_prog_ac_ct_AR+:} false; then :
7125   $as_echo_n "(cached) " >&6
7126 else
7127   if test -n "$ac_ct_AR"; then
7128   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7129 else
7130 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7131 for as_dir in $PATH
7132 do
7133   IFS=$as_save_IFS
7134   test -z "$as_dir" && as_dir=.
7135     for ac_exec_ext in '' $ac_executable_extensions; do
7136   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7137     ac_cv_prog_ac_ct_AR="$ac_prog"
7138     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7139     break 2
7140   fi
7141 done
7142   done
7143 IFS=$as_save_IFS
7144
7145 fi
7146 fi
7147 ac_ct_AR=$ac_cv_prog_ac_ct_AR
7148 if test -n "$ac_ct_AR"; then
7149   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
7150 $as_echo "$ac_ct_AR" >&6; }
7151 else
7152   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7153 $as_echo "no" >&6; }
7154 fi
7155
7156
7157   test -n "$ac_ct_AR" && break
7158 done
7159
7160   if test "x$ac_ct_AR" = x; then
7161     AR=""
7162   else
7163     case $cross_compiling:$ac_tool_warned in
7164 yes:)
7165 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7166 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7167 ac_tool_warned=yes ;;
7168 esac
7169     AR=$ac_ct_AR
7170   fi
7171 fi
7172
7173
7174 # Check whether --enable-largefile was given.
7175 if test "${enable_largefile+set}" = set; then :
7176   enableval=$enable_largefile;
7177 fi
7178
7179 if test "$enable_largefile" != no; then
7180
7181   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
7182 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
7183 if ${ac_cv_sys_largefile_CC+:} false; then :
7184   $as_echo_n "(cached) " >&6
7185 else
7186   ac_cv_sys_largefile_CC=no
7187      if test "$GCC" != yes; then
7188        ac_save_CC=$CC
7189        while :; do
7190          # IRIX 6.2 and later do not support large files by default,
7191          # so use the C compiler's -n32 option if that helps.
7192          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7193 /* end confdefs.h.  */
7194 #include <sys/types.h>
7195  /* Check that off_t can represent 2**63 - 1 correctly.
7196     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7197     since some C++ compilers masquerading as C compilers
7198     incorrectly reject 9223372036854775807.  */
7199 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7200   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7201                        && LARGE_OFF_T % 2147483647 == 1)
7202                       ? 1 : -1];
7203 int
7204 main ()
7205 {
7206
7207   ;
7208   return 0;
7209 }
7210 _ACEOF
7211          if ac_fn_c_try_compile "$LINENO"; then :
7212   break
7213 fi
7214 rm -f core conftest.err conftest.$ac_objext
7215          CC="$CC -n32"
7216          if ac_fn_c_try_compile "$LINENO"; then :
7217   ac_cv_sys_largefile_CC=' -n32'; break
7218 fi
7219 rm -f core conftest.err conftest.$ac_objext
7220          break
7221        done
7222        CC=$ac_save_CC
7223        rm -f conftest.$ac_ext
7224     fi
7225 fi
7226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
7227 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
7228   if test "$ac_cv_sys_largefile_CC" != no; then
7229     CC=$CC$ac_cv_sys_largefile_CC
7230   fi
7231
7232   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
7233 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
7234 if ${ac_cv_sys_file_offset_bits+:} false; then :
7235   $as_echo_n "(cached) " >&6
7236 else
7237   while :; do
7238   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7239 /* end confdefs.h.  */
7240 #include <sys/types.h>
7241  /* Check that off_t can represent 2**63 - 1 correctly.
7242     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7243     since some C++ compilers masquerading as C compilers
7244     incorrectly reject 9223372036854775807.  */
7245 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7246   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7247                        && LARGE_OFF_T % 2147483647 == 1)
7248                       ? 1 : -1];
7249 int
7250 main ()
7251 {
7252
7253   ;
7254   return 0;
7255 }
7256 _ACEOF
7257 if ac_fn_c_try_compile "$LINENO"; then :
7258   ac_cv_sys_file_offset_bits=no; break
7259 fi
7260 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7261   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7262 /* end confdefs.h.  */
7263 #define _FILE_OFFSET_BITS 64
7264 #include <sys/types.h>
7265  /* Check that off_t can represent 2**63 - 1 correctly.
7266     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7267     since some C++ compilers masquerading as C compilers
7268     incorrectly reject 9223372036854775807.  */
7269 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7270   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7271                        && LARGE_OFF_T % 2147483647 == 1)
7272                       ? 1 : -1];
7273 int
7274 main ()
7275 {
7276
7277   ;
7278   return 0;
7279 }
7280 _ACEOF
7281 if ac_fn_c_try_compile "$LINENO"; then :
7282   ac_cv_sys_file_offset_bits=64; break
7283 fi
7284 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7285   ac_cv_sys_file_offset_bits=unknown
7286   break
7287 done
7288 fi
7289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
7290 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
7291 case $ac_cv_sys_file_offset_bits in #(
7292   no | unknown) ;;
7293   *)
7294 cat >>confdefs.h <<_ACEOF
7295 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
7296 _ACEOF
7297 ;;
7298 esac
7299 rm -rf conftest*
7300   if test $ac_cv_sys_file_offset_bits = unknown; then
7301     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
7302 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
7303 if ${ac_cv_sys_large_files+:} false; then :
7304   $as_echo_n "(cached) " >&6
7305 else
7306   while :; do
7307   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7308 /* end confdefs.h.  */
7309 #include <sys/types.h>
7310  /* Check that off_t can represent 2**63 - 1 correctly.
7311     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7312     since some C++ compilers masquerading as C compilers
7313     incorrectly reject 9223372036854775807.  */
7314 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7315   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7316                        && LARGE_OFF_T % 2147483647 == 1)
7317                       ? 1 : -1];
7318 int
7319 main ()
7320 {
7321
7322   ;
7323   return 0;
7324 }
7325 _ACEOF
7326 if ac_fn_c_try_compile "$LINENO"; then :
7327   ac_cv_sys_large_files=no; break
7328 fi
7329 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7330   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7331 /* end confdefs.h.  */
7332 #define _LARGE_FILES 1
7333 #include <sys/types.h>
7334  /* Check that off_t can represent 2**63 - 1 correctly.
7335     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7336     since some C++ compilers masquerading as C compilers
7337     incorrectly reject 9223372036854775807.  */
7338 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7339   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7340                        && LARGE_OFF_T % 2147483647 == 1)
7341                       ? 1 : -1];
7342 int
7343 main ()
7344 {
7345
7346   ;
7347   return 0;
7348 }
7349 _ACEOF
7350 if ac_fn_c_try_compile "$LINENO"; then :
7351   ac_cv_sys_large_files=1; break
7352 fi
7353 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7354   ac_cv_sys_large_files=unknown
7355   break
7356 done
7357 fi
7358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
7359 $as_echo "$ac_cv_sys_large_files" >&6; }
7360 case $ac_cv_sys_large_files in #(
7361   no | unknown) ;;
7362   *)
7363 cat >>confdefs.h <<_ACEOF
7364 #define _LARGE_FILES $ac_cv_sys_large_files
7365 _ACEOF
7366 ;;
7367 esac
7368 rm -rf conftest*
7369   fi
7370
7371
7372 $as_echo "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h
7373
7374 fi
7375
7376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
7377 $as_echo_n "checking for inline... " >&6; }
7378 if ${ac_cv_c_inline+:} false; then :
7379   $as_echo_n "(cached) " >&6
7380 else
7381   ac_cv_c_inline=no
7382 for ac_kw in inline __inline__ __inline; do
7383   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7384 /* end confdefs.h.  */
7385 #ifndef __cplusplus
7386 typedef int foo_t;
7387 static $ac_kw foo_t static_foo () {return 0; }
7388 $ac_kw foo_t foo () {return 0; }
7389 #endif
7390
7391 _ACEOF
7392 if ac_fn_c_try_compile "$LINENO"; then :
7393   ac_cv_c_inline=$ac_kw
7394 fi
7395 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7396   test "$ac_cv_c_inline" != no && break
7397 done
7398
7399 fi
7400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
7401 $as_echo "$ac_cv_c_inline" >&6; }
7402
7403 case $ac_cv_c_inline in
7404   inline | yes) ;;
7405   *)
7406     case $ac_cv_c_inline in
7407       no) ac_val=;;
7408       *) ac_val=$ac_cv_c_inline;;
7409     esac
7410     cat >>confdefs.h <<_ACEOF
7411 #ifndef __cplusplus
7412 #define inline $ac_val
7413 #endif
7414 _ACEOF
7415     ;;
7416 esac
7417
7418
7419
7420
7421
7422   for ac_header in $ac_header_list
7423 do :
7424   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7425 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
7426 "
7427 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7428   cat >>confdefs.h <<_ACEOF
7429 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7430 _ACEOF
7431
7432 fi
7433
7434 done
7435
7436
7437
7438
7439
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462
7463
7464
7465
7466
7467
7468
7469
7470
7471
7472 for ac_header in sys/buf.h
7473 do :
7474   ac_fn_c_check_header_compile "$LINENO" "sys/buf.h" "ac_cv_header_sys_buf_h" "#if HAVE_SYS_PARAM_H
7475 #include <sys/param.h>
7476 #endif
7477 "
7478 if test "x$ac_cv_header_sys_buf_h" = xyes; then :
7479   cat >>confdefs.h <<_ACEOF
7480 #define HAVE_SYS_BUF_H 1
7481 _ACEOF
7482
7483 fi
7484
7485 done
7486
7487
7488 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7489 $as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
7490 if ${ac_cv_header_sys_types_h_makedev+:} false; then :
7491   $as_echo_n "(cached) " >&6
7492 else
7493   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7494 /* end confdefs.h.  */
7495 #include <sys/types.h>
7496 int
7497 main ()
7498 {
7499 return makedev(0, 0);
7500   ;
7501   return 0;
7502 }
7503 _ACEOF
7504 if ac_fn_c_try_link "$LINENO"; then :
7505   ac_cv_header_sys_types_h_makedev=yes
7506 else
7507   ac_cv_header_sys_types_h_makedev=no
7508 fi
7509 rm -f core conftest.err conftest.$ac_objext \
7510     conftest$ac_exeext conftest.$ac_ext
7511
7512 fi
7513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7514 $as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
7515
7516 if test $ac_cv_header_sys_types_h_makedev = no; then
7517 ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
7518 if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
7519
7520 $as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
7521
7522 fi
7523
7524
7525
7526   if test $ac_cv_header_sys_mkdev_h = no; then
7527     ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
7528 if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
7529
7530 $as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
7531
7532 fi
7533
7534
7535   fi
7536 fi
7537
7538
7539 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for st_fstype string in struct stat" >&5
7540 $as_echo_n "checking for st_fstype string in struct stat... " >&6; }
7541 if ${diff_cv_st_fstype_string+:} false; then :
7542   $as_echo_n "(cached) " >&6
7543 else
7544   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7545 /* end confdefs.h.  */
7546 #include <sys/types.h>
7547 #include <sys/stat.h>
7548 int
7549 main ()
7550 {
7551 struct stat s; s.st_fstype[0] = 'x';
7552   ;
7553   return 0;
7554 }
7555 _ACEOF
7556 if ac_fn_c_try_compile "$LINENO"; then :
7557   diff_cv_st_fstype_string=yes
7558 else
7559   diff_cv_st_fstype_string=no
7560 fi
7561 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7562 fi
7563
7564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $diff_cv_st_fstype_string" >&5
7565 $as_echo "$diff_cv_st_fstype_string" >&6; }
7566 if test $diff_cv_st_fstype_string = yes; then
7567
7568 $as_echo "#define HAVE_ST_FSTYPE_STRING 1" >>confdefs.h
7569
7570 fi
7571
7572 # even if we use gnulib's acl.h with integrated m4 file later on (used because
7573 # of very useful file_has_acl() function) we need following checks that restrict
7574 # tar to use POSIX.1e ACLs only.
7575
7576 # Check whether --with-posix-acls was given.
7577 if test "${with_posix_acls+set}" = set; then :
7578   withval=$with_posix_acls;
7579 else
7580   with_posix_acls=yes
7581 fi
7582
7583 if test "x$with_posix_acls" != "xno"; then
7584   for ac_header in sys/acl.h
7585 do :
7586   ac_fn_c_check_header_mongrel "$LINENO" "sys/acl.h" "ac_cv_header_sys_acl_h" "$ac_includes_default"
7587 if test "x$ac_cv_header_sys_acl_h" = xyes; then :
7588   cat >>confdefs.h <<_ACEOF
7589 #define HAVE_SYS_ACL_H 1
7590 _ACEOF
7591
7592 else
7593   with_posix_acls=no
7594 fi
7595
7596 done
7597
7598   for tar_acl_func in acl_get_file acl_get_fd acl_set_file acl_set_fd \
7599                       acl_to_text acl_from_text acl_delete_def_file \
7600                       acl_free; do \
7601     test "x$with_posix_acls" = xno && break
7602     as_ac_Search=`$as_echo "ac_cv_search_$tar_acl_func" | $as_tr_sh`
7603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing $tar_acl_func" >&5
7604 $as_echo_n "checking for library containing $tar_acl_func... " >&6; }
7605 if eval \${$as_ac_Search+:} false; then :
7606   $as_echo_n "(cached) " >&6
7607 else
7608   ac_func_search_save_LIBS=$LIBS
7609 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7610 /* end confdefs.h.  */
7611
7612 /* Override any GCC internal prototype to avoid an error.
7613    Use char because int might match the return type of a GCC
7614    builtin and then its argument prototype would still apply.  */
7615 #ifdef __cplusplus
7616 extern "C"
7617 #endif
7618 char $tar_acl_func ();
7619 int
7620 main ()
7621 {
7622 return $tar_acl_func ();
7623   ;
7624   return 0;
7625 }
7626 _ACEOF
7627 for ac_lib in '' acl pacl; do
7628   if test -z "$ac_lib"; then
7629     ac_res="none required"
7630   else
7631     ac_res=-l$ac_lib
7632     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7633   fi
7634   if ac_fn_c_try_link "$LINENO"; then :
7635   eval "$as_ac_Search=\$ac_res"
7636 fi
7637 rm -f core conftest.err conftest.$ac_objext \
7638     conftest$ac_exeext
7639   if eval \${$as_ac_Search+:} false; then :
7640   break
7641 fi
7642 done
7643 if eval \${$as_ac_Search+:} false; then :
7644
7645 else
7646   eval "$as_ac_Search=no"
7647 fi
7648 rm conftest.$ac_ext
7649 LIBS=$ac_func_search_save_LIBS
7650 fi
7651 eval ac_res=\$$as_ac_Search
7652                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7653 $as_echo "$ac_res" >&6; }
7654 eval ac_res=\$$as_ac_Search
7655 if test "$ac_res" != no; then :
7656   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7657
7658 else
7659   with_posix_acls=no
7660 fi
7661
7662   done
7663   if test "x$with_posix_acls" != xno; then
7664
7665 $as_echo "#define HAVE_POSIX_ACLS /**/" >>confdefs.h
7666
7667   fi
7668 else
7669   # disable acls in gnulib's checks
7670   export enable_acl=no
7671 fi
7672
7673 ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
7674 if test "x$ac_cv_type_mode_t" = xyes; then :
7675
7676 else
7677
7678 cat >>confdefs.h <<_ACEOF
7679 #define mode_t int
7680 _ACEOF
7681
7682 fi
7683
7684 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
7685 if test "x$ac_cv_type_pid_t" = xyes; then :
7686
7687 else
7688
7689 cat >>confdefs.h <<_ACEOF
7690 #define pid_t int
7691 _ACEOF
7692
7693 fi
7694
7695 ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
7696 if test "x$ac_cv_type_off_t" = xyes; then :
7697
7698 else
7699
7700 cat >>confdefs.h <<_ACEOF
7701 #define off_t long int
7702 _ACEOF
7703
7704 fi
7705
7706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7707 $as_echo_n "checking for uid_t in sys/types.h... " >&6; }
7708 if ${ac_cv_type_uid_t+:} false; then :
7709   $as_echo_n "(cached) " >&6
7710 else
7711   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7712 /* end confdefs.h.  */
7713 #include <sys/types.h>
7714
7715 _ACEOF
7716 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7717   $EGREP "uid_t" >/dev/null 2>&1; then :
7718   ac_cv_type_uid_t=yes
7719 else
7720   ac_cv_type_uid_t=no
7721 fi
7722 rm -f conftest*
7723
7724 fi
7725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7726 $as_echo "$ac_cv_type_uid_t" >&6; }
7727 if test $ac_cv_type_uid_t = no; then
7728
7729 $as_echo "#define uid_t int" >>confdefs.h
7730
7731
7732 $as_echo "#define gid_t int" >>confdefs.h
7733
7734 fi
7735
7736 ac_fn_c_check_type "$LINENO" "major_t" "ac_cv_type_major_t" "$ac_includes_default"
7737 if test "x$ac_cv_type_major_t" = xyes; then :
7738
7739 else
7740
7741 $as_echo "#define major_t int" >>confdefs.h
7742
7743 fi
7744
7745 ac_fn_c_check_type "$LINENO" "minor_t" "ac_cv_type_minor_t" "$ac_includes_default"
7746 if test "x$ac_cv_type_minor_t" = xyes; then :
7747
7748 else
7749
7750 $as_echo "#define minor_t int" >>confdefs.h
7751
7752 fi
7753
7754 ac_fn_c_check_type "$LINENO" "dev_t" "ac_cv_type_dev_t" "$ac_includes_default"
7755 if test "x$ac_cv_type_dev_t" = xyes; then :
7756
7757 else
7758
7759 cat >>confdefs.h <<_ACEOF
7760 #define dev_t unsigned
7761 _ACEOF
7762
7763 fi
7764
7765 ac_fn_c_check_type "$LINENO" "ino_t" "ac_cv_type_ino_t" "$ac_includes_default"
7766 if test "x$ac_cv_type_ino_t" = xyes; then :
7767
7768 else
7769
7770 cat >>confdefs.h <<_ACEOF
7771 #define ino_t unsigned
7772 _ACEOF
7773
7774 fi
7775
7776
7777
7778   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
7779 $as_echo_n "checking for ssize_t... " >&6; }
7780 if ${gt_cv_ssize_t+:} false; then :
7781   $as_echo_n "(cached) " >&6
7782 else
7783   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7784 /* end confdefs.h.  */
7785 #include <sys/types.h>
7786 int
7787 main ()
7788 {
7789 int x = sizeof (ssize_t *) + sizeof (ssize_t);
7790             return !x;
7791   ;
7792   return 0;
7793 }
7794 _ACEOF
7795 if ac_fn_c_try_compile "$LINENO"; then :
7796   gt_cv_ssize_t=yes
7797 else
7798   gt_cv_ssize_t=no
7799 fi
7800 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7801 fi
7802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
7803 $as_echo "$gt_cv_ssize_t" >&6; }
7804   if test $gt_cv_ssize_t = no; then
7805
7806 $as_echo "#define ssize_t int" >>confdefs.h
7807
7808   fi
7809
7810
7811 # gnulib modules
7812
7813
7814
7815
7816
7817           LIBC_FATAL_STDERR_=1
7818   export LIBC_FATAL_STDERR_
7819
7820
7821   gl_need_lib_has_acl=
7822   # Check whether --enable-acl was given.
7823 if test "${enable_acl+set}" = set; then :
7824   enableval=$enable_acl;
7825 else
7826   enable_acl=auto
7827 fi
7828
7829
7830
7831
7832
7833   for ac_func in $ac_func_list
7834 do :
7835   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7836 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7837 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
7838   cat >>confdefs.h <<_ACEOF
7839 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
7840 _ACEOF
7841
7842 fi
7843 done
7844
7845
7846
7847 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
7848 if test "x$ac_cv_type_size_t" = xyes; then :
7849
7850 else
7851
7852 cat >>confdefs.h <<_ACEOF
7853 #define size_t unsigned int
7854 _ACEOF
7855
7856 fi
7857
7858 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
7859 # for constant arguments.  Useless!
7860 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
7861 $as_echo_n "checking for working alloca.h... " >&6; }
7862 if ${ac_cv_working_alloca_h+:} false; then :
7863   $as_echo_n "(cached) " >&6
7864 else
7865   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7866 /* end confdefs.h.  */
7867 #include <alloca.h>
7868 int
7869 main ()
7870 {
7871 char *p = (char *) alloca (2 * sizeof (int));
7872                           if (p) return 0;
7873   ;
7874   return 0;
7875 }
7876 _ACEOF
7877 if ac_fn_c_try_link "$LINENO"; then :
7878   ac_cv_working_alloca_h=yes
7879 else
7880   ac_cv_working_alloca_h=no
7881 fi
7882 rm -f core conftest.err conftest.$ac_objext \
7883     conftest$ac_exeext conftest.$ac_ext
7884 fi
7885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
7886 $as_echo "$ac_cv_working_alloca_h" >&6; }
7887 if test $ac_cv_working_alloca_h = yes; then
7888
7889 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
7890
7891 fi
7892
7893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
7894 $as_echo_n "checking for alloca... " >&6; }
7895 if ${ac_cv_func_alloca_works+:} false; then :
7896   $as_echo_n "(cached) " >&6
7897 else
7898   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7899 /* end confdefs.h.  */
7900 #ifdef __GNUC__
7901 # define alloca __builtin_alloca
7902 #else
7903 # ifdef _MSC_VER
7904 #  include <malloc.h>
7905 #  define alloca _alloca
7906 # else
7907 #  ifdef HAVE_ALLOCA_H
7908 #   include <alloca.h>
7909 #  else
7910 #   ifdef _AIX
7911  #pragma alloca
7912 #   else
7913 #    ifndef alloca /* predefined by HP cc +Olibcalls */
7914 void *alloca (size_t);
7915 #    endif
7916 #   endif
7917 #  endif
7918 # endif
7919 #endif
7920
7921 int
7922 main ()
7923 {
7924 char *p = (char *) alloca (1);
7925                                     if (p) return 0;
7926   ;
7927   return 0;
7928 }
7929 _ACEOF
7930 if ac_fn_c_try_link "$LINENO"; then :
7931   ac_cv_func_alloca_works=yes
7932 else
7933   ac_cv_func_alloca_works=no
7934 fi
7935 rm -f core conftest.err conftest.$ac_objext \
7936     conftest$ac_exeext conftest.$ac_ext
7937 fi
7938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
7939 $as_echo "$ac_cv_func_alloca_works" >&6; }
7940
7941 if test $ac_cv_func_alloca_works = yes; then
7942
7943 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
7944
7945 else
7946   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
7947 # that cause trouble.  Some versions do not even contain alloca or
7948 # contain a buggy version.  If you still want to use their alloca,
7949 # use ar to extract alloca.o from them instead of compiling alloca.c.
7950
7951
7952
7953
7954
7955 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
7956
7957 $as_echo "#define C_ALLOCA 1" >>confdefs.h
7958
7959
7960 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
7961 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
7962 if ${ac_cv_os_cray+:} false; then :
7963   $as_echo_n "(cached) " >&6
7964 else
7965   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7966 /* end confdefs.h.  */
7967 #if defined CRAY && ! defined CRAY2
7968 webecray
7969 #else
7970 wenotbecray
7971 #endif
7972
7973 _ACEOF
7974 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7975   $EGREP "webecray" >/dev/null 2>&1; then :
7976   ac_cv_os_cray=yes
7977 else
7978   ac_cv_os_cray=no
7979 fi
7980 rm -f conftest*
7981
7982 fi
7983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
7984 $as_echo "$ac_cv_os_cray" >&6; }
7985 if test $ac_cv_os_cray = yes; then
7986   for ac_func in _getb67 GETB67 getb67; do
7987     as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7988 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7989 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
7990
7991 cat >>confdefs.h <<_ACEOF
7992 #define CRAY_STACKSEG_END $ac_func
7993 _ACEOF
7994
7995     break
7996 fi
7997
7998   done
7999 fi
8000
8001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
8002 $as_echo_n "checking stack direction for C alloca... " >&6; }
8003 if ${ac_cv_c_stack_direction+:} false; then :
8004   $as_echo_n "(cached) " >&6
8005 else
8006   if test "$cross_compiling" = yes; then :
8007   ac_cv_c_stack_direction=0
8008 else
8009   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8010 /* end confdefs.h.  */
8011 $ac_includes_default
8012 int
8013 find_stack_direction (int *addr, int depth)
8014 {
8015   int dir, dummy = 0;
8016   if (! addr)
8017     addr = &dummy;
8018   *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
8019   dir = depth ? find_stack_direction (addr, depth - 1) : 0;
8020   return dir + dummy;
8021 }
8022
8023 int
8024 main (int argc, char **argv)
8025 {
8026   return find_stack_direction (0, argc + !argv + 20) < 0;
8027 }
8028 _ACEOF
8029 if ac_fn_c_try_run "$LINENO"; then :
8030   ac_cv_c_stack_direction=1
8031 else
8032   ac_cv_c_stack_direction=-1
8033 fi
8034 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8035   conftest.$ac_objext conftest.beam conftest.$ac_ext
8036 fi
8037
8038 fi
8039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
8040 $as_echo "$ac_cv_c_stack_direction" >&6; }
8041 cat >>confdefs.h <<_ACEOF
8042 #define STACK_DIRECTION $ac_cv_c_stack_direction
8043 _ACEOF
8044
8045
8046 fi
8047
8048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
8049 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
8050 if ${ac_cv_c_restrict+:} false; then :
8051   $as_echo_n "(cached) " >&6
8052 else
8053   ac_cv_c_restrict=no
8054    # The order here caters to the fact that C++ does not require restrict.
8055    for ac_kw in __restrict __restrict__ _Restrict restrict; do
8056      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8057 /* end confdefs.h.  */
8058 typedef int *int_ptr;
8059            int foo (int_ptr $ac_kw ip) { return ip[0]; }
8060            int bar (int [$ac_kw]); /* Catch GCC bug 14050.  */
8061            int bar (int ip[$ac_kw]) { return ip[0]; }
8062
8063 int
8064 main ()
8065 {
8066 int s[1];
8067            int *$ac_kw t = s;
8068            t[0] = 0;
8069            return foo (t) + bar (t);
8070
8071   ;
8072   return 0;
8073 }
8074 _ACEOF
8075 if ac_fn_c_try_compile "$LINENO"; then :
8076   ac_cv_c_restrict=$ac_kw
8077 fi
8078 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8079      test "$ac_cv_c_restrict" != no && break
8080    done
8081
8082 fi
8083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
8084 $as_echo "$ac_cv_c_restrict" >&6; }
8085
8086  case $ac_cv_c_restrict in
8087    restrict) ;;
8088    no) $as_echo "#define restrict /**/" >>confdefs.h
8089  ;;
8090    *)  cat >>confdefs.h <<_ACEOF
8091 #define restrict $ac_cv_c_restrict
8092 _ACEOF
8093  ;;
8094  esac
8095
8096 ac_fn_c_check_decl "$LINENO" "clearerr_unlocked" "ac_cv_have_decl_clearerr_unlocked" "$ac_includes_default"
8097 if test "x$ac_cv_have_decl_clearerr_unlocked" = xyes; then :
8098   ac_have_decl=1
8099 else
8100   ac_have_decl=0
8101 fi
8102
8103 cat >>confdefs.h <<_ACEOF
8104 #define HAVE_DECL_CLEARERR_UNLOCKED $ac_have_decl
8105 _ACEOF
8106
8107 ac_fn_c_check_decl "$LINENO" "feof_unlocked" "ac_cv_have_decl_feof_unlocked" "$ac_includes_default"
8108 if test "x$ac_cv_have_decl_feof_unlocked" = xyes; then :
8109   ac_have_decl=1
8110 else
8111   ac_have_decl=0
8112 fi
8113
8114 cat >>confdefs.h <<_ACEOF
8115 #define HAVE_DECL_FEOF_UNLOCKED $ac_have_decl
8116 _ACEOF
8117
8118 ac_fn_c_check_decl "$LINENO" "ferror_unlocked" "ac_cv_have_decl_ferror_unlocked" "$ac_includes_default"
8119 if test "x$ac_cv_have_decl_ferror_unlocked" = xyes; then :
8120   ac_have_decl=1
8121 else
8122   ac_have_decl=0
8123 fi
8124
8125 cat >>confdefs.h <<_ACEOF
8126 #define HAVE_DECL_FERROR_UNLOCKED $ac_have_decl
8127 _ACEOF
8128
8129 ac_fn_c_check_decl "$LINENO" "fflush_unlocked" "ac_cv_have_decl_fflush_unlocked" "$ac_includes_default"
8130 if test "x$ac_cv_have_decl_fflush_unlocked" = xyes; then :
8131   ac_have_decl=1
8132 else
8133   ac_have_decl=0
8134 fi
8135
8136 cat >>confdefs.h <<_ACEOF
8137 #define HAVE_DECL_FFLUSH_UNLOCKED $ac_have_decl
8138 _ACEOF
8139
8140 ac_fn_c_check_decl "$LINENO" "fgets_unlocked" "ac_cv_have_decl_fgets_unlocked" "$ac_includes_default"
8141 if test "x$ac_cv_have_decl_fgets_unlocked" = xyes; then :
8142   ac_have_decl=1
8143 else
8144   ac_have_decl=0
8145 fi
8146
8147 cat >>confdefs.h <<_ACEOF
8148 #define HAVE_DECL_FGETS_UNLOCKED $ac_have_decl
8149 _ACEOF
8150
8151 ac_fn_c_check_decl "$LINENO" "fputc_unlocked" "ac_cv_have_decl_fputc_unlocked" "$ac_includes_default"
8152 if test "x$ac_cv_have_decl_fputc_unlocked" = xyes; then :
8153   ac_have_decl=1
8154 else
8155   ac_have_decl=0
8156 fi
8157
8158 cat >>confdefs.h <<_ACEOF
8159 #define HAVE_DECL_FPUTC_UNLOCKED $ac_have_decl
8160 _ACEOF
8161
8162 ac_fn_c_check_decl "$LINENO" "fputs_unlocked" "ac_cv_have_decl_fputs_unlocked" "$ac_includes_default"
8163 if test "x$ac_cv_have_decl_fputs_unlocked" = xyes; then :
8164   ac_have_decl=1
8165 else
8166   ac_have_decl=0
8167 fi
8168
8169 cat >>confdefs.h <<_ACEOF
8170 #define HAVE_DECL_FPUTS_UNLOCKED $ac_have_decl
8171 _ACEOF
8172
8173 ac_fn_c_check_decl "$LINENO" "fread_unlocked" "ac_cv_have_decl_fread_unlocked" "$ac_includes_default"
8174 if test "x$ac_cv_have_decl_fread_unlocked" = xyes; then :
8175   ac_have_decl=1
8176 else
8177   ac_have_decl=0
8178 fi
8179
8180 cat >>confdefs.h <<_ACEOF
8181 #define HAVE_DECL_FREAD_UNLOCKED $ac_have_decl
8182 _ACEOF
8183
8184 ac_fn_c_check_decl "$LINENO" "fwrite_unlocked" "ac_cv_have_decl_fwrite_unlocked" "$ac_includes_default"
8185 if test "x$ac_cv_have_decl_fwrite_unlocked" = xyes; then :
8186   ac_have_decl=1
8187 else
8188   ac_have_decl=0
8189 fi
8190
8191 cat >>confdefs.h <<_ACEOF
8192 #define HAVE_DECL_FWRITE_UNLOCKED $ac_have_decl
8193 _ACEOF
8194
8195 ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
8196 if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then :
8197   ac_have_decl=1
8198 else
8199   ac_have_decl=0
8200 fi
8201
8202 cat >>confdefs.h <<_ACEOF
8203 #define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
8204 _ACEOF
8205
8206 ac_fn_c_check_decl "$LINENO" "getchar_unlocked" "ac_cv_have_decl_getchar_unlocked" "$ac_includes_default"
8207 if test "x$ac_cv_have_decl_getchar_unlocked" = xyes; then :
8208   ac_have_decl=1
8209 else
8210   ac_have_decl=0
8211 fi
8212
8213 cat >>confdefs.h <<_ACEOF
8214 #define HAVE_DECL_GETCHAR_UNLOCKED $ac_have_decl
8215 _ACEOF
8216
8217 ac_fn_c_check_decl "$LINENO" "putc_unlocked" "ac_cv_have_decl_putc_unlocked" "$ac_includes_default"
8218 if test "x$ac_cv_have_decl_putc_unlocked" = xyes; then :
8219   ac_have_decl=1
8220 else
8221   ac_have_decl=0
8222 fi
8223
8224 cat >>confdefs.h <<_ACEOF
8225 #define HAVE_DECL_PUTC_UNLOCKED $ac_have_decl
8226 _ACEOF
8227
8228 ac_fn_c_check_decl "$LINENO" "putchar_unlocked" "ac_cv_have_decl_putchar_unlocked" "$ac_includes_default"
8229 if test "x$ac_cv_have_decl_putchar_unlocked" = xyes; then :
8230   ac_have_decl=1
8231 else
8232   ac_have_decl=0
8233 fi
8234
8235 cat >>confdefs.h <<_ACEOF
8236 #define HAVE_DECL_PUTCHAR_UNLOCKED $ac_have_decl
8237 _ACEOF
8238
8239
8240
8241
8242
8243
8244
8245
8246
8247
8248   XGETTEXT_EXTRA_OPTIONS=
8249
8250 # Make sure we can run config.sub.
8251 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
8252   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
8253
8254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
8255 $as_echo_n "checking build system type... " >&6; }
8256 if ${ac_cv_build+:} false; then :
8257   $as_echo_n "(cached) " >&6
8258 else
8259   ac_build_alias=$build_alias
8260 test "x$ac_build_alias" = x &&
8261   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
8262 test "x$ac_build_alias" = x &&
8263   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
8264 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
8265   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
8266
8267 fi
8268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
8269 $as_echo "$ac_cv_build" >&6; }
8270 case $ac_cv_build in
8271 *-*-*) ;;
8272 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
8273 esac
8274 build=$ac_cv_build
8275 ac_save_IFS=$IFS; IFS='-'
8276 set x $ac_cv_build
8277 shift
8278 build_cpu=$1
8279 build_vendor=$2
8280 shift; shift
8281 # Remember, the first character of IFS is used to create $*,
8282 # except with old shells:
8283 build_os=$*
8284 IFS=$ac_save_IFS
8285 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
8286
8287
8288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
8289 $as_echo_n "checking host system type... " >&6; }
8290 if ${ac_cv_host+:} false; then :
8291   $as_echo_n "(cached) " >&6
8292 else
8293   if test "x$host_alias" = x; then
8294   ac_cv_host=$ac_cv_build
8295 else
8296   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
8297     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
8298 fi
8299
8300 fi
8301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
8302 $as_echo "$ac_cv_host" >&6; }
8303 case $ac_cv_host in
8304 *-*-*) ;;
8305 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
8306 esac
8307 host=$ac_cv_host
8308 ac_save_IFS=$IFS; IFS='-'
8309 set x $ac_cv_host
8310 shift
8311 host_cpu=$1
8312 host_vendor=$2
8313 shift; shift
8314 # Remember, the first character of IFS is used to create $*,
8315 # except with old shells:
8316 host_os=$*
8317 IFS=$ac_save_IFS
8318 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
8319
8320
8321     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_ino member in directory struct" >&5
8322 $as_echo_n "checking for d_ino member in directory struct... " >&6; }
8323 if ${gl_cv_struct_dirent_d_ino+:} false; then :
8324   $as_echo_n "(cached) " >&6
8325 else
8326   if test "$cross_compiling" = yes; then :
8327   case "$host_os" in
8328                            # Guess yes on glibc systems with Linux kernel.
8329               linux*-gnu*) gl_cv_struct_dirent_d_ino="guessing yes" ;;
8330                            # If we don't know, assume the worst.
8331               *)           gl_cv_struct_dirent_d_ino="guessing no" ;;
8332             esac
8333
8334 else
8335   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8336 /* end confdefs.h.  */
8337 #include <sys/types.h>
8338              #include <sys/stat.h>
8339              #include <dirent.h>
8340
8341 int
8342 main ()
8343 {
8344 DIR *dp = opendir (".");
8345              struct dirent *e;
8346              struct stat st;
8347              if (! dp)
8348                return 1;
8349              e = readdir (dp);
8350              if (! e)
8351                return 2;
8352              if (lstat (e->d_name, &st) != 0)
8353                return 3;
8354              if (e->d_ino != st.st_ino)
8355                return 4;
8356              return 0;
8357
8358   ;
8359   return 0;
8360 }
8361 _ACEOF
8362 if ac_fn_c_try_run "$LINENO"; then :
8363   gl_cv_struct_dirent_d_ino=yes
8364 else
8365   gl_cv_struct_dirent_d_ino=no
8366 fi
8367 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8368   conftest.$ac_objext conftest.beam conftest.$ac_ext
8369 fi
8370
8371 fi
8372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_ino" >&5
8373 $as_echo "$gl_cv_struct_dirent_d_ino" >&6; }
8374    case "$gl_cv_struct_dirent_d_ino" in
8375      *yes)
8376
8377 $as_echo "#define D_INO_IN_DIRENT 1" >>confdefs.h
8378
8379        ;;
8380    esac
8381
8382
8383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long file names" >&5
8384 $as_echo_n "checking for long file names... " >&6; }
8385 if ${ac_cv_sys_long_file_names+:} false; then :
8386   $as_echo_n "(cached) " >&6
8387 else
8388   ac_cv_sys_long_file_names=yes
8389 # Test for long file names in all the places we know might matter:
8390 #      .                the current directory, where building will happen
8391 #      $prefix/lib      where we will be installing things
8392 #      $exec_prefix/lib likewise
8393 #      $TMPDIR          if set, where it might want to write temporary files
8394 #      /tmp             where it might want to write temporary files
8395 #      /var/tmp         likewise
8396 #      /usr/tmp         likewise
8397 for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do
8398   # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib
8399   # in the usual case where exec_prefix is '${prefix}'.
8400   case $ac_dir in #(
8401     . | /* | ?:[\\/]*) ;; #(
8402     *) continue;;
8403   esac
8404   test -w "$ac_dir/." || continue # It is less confusing to not echo anything here.
8405   ac_xdir=$ac_dir/cf$$
8406   (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
8407   ac_tf1=$ac_xdir/conftest9012345
8408   ac_tf2=$ac_xdir/conftest9012346
8409   touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" ||
8410     ac_cv_sys_long_file_names=no
8411   rm -f -r "$ac_xdir" 2>/dev/null
8412   test $ac_cv_sys_long_file_names = no && break
8413 done
8414 fi
8415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_long_file_names" >&5
8416 $as_echo "$ac_cv_sys_long_file_names" >&6; }
8417 if test $ac_cv_sys_long_file_names = yes; then
8418
8419 $as_echo "#define HAVE_LONG_FILE_NAMES 1" >>confdefs.h
8420
8421 fi
8422
8423
8424
8425
8426   GNULIB_BTOWC=0;
8427   GNULIB_WCTOB=0;
8428   GNULIB_MBSINIT=0;
8429   GNULIB_MBRTOWC=0;
8430   GNULIB_MBRLEN=0;
8431   GNULIB_MBSRTOWCS=0;
8432   GNULIB_MBSNRTOWCS=0;
8433   GNULIB_WCRTOMB=0;
8434   GNULIB_WCSRTOMBS=0;
8435   GNULIB_WCSNRTOMBS=0;
8436   GNULIB_WCWIDTH=0;
8437   GNULIB_WMEMCHR=0;
8438   GNULIB_WMEMCMP=0;
8439   GNULIB_WMEMCPY=0;
8440   GNULIB_WMEMMOVE=0;
8441   GNULIB_WMEMSET=0;
8442   GNULIB_WCSLEN=0;
8443   GNULIB_WCSNLEN=0;
8444   GNULIB_WCSCPY=0;
8445   GNULIB_WCPCPY=0;
8446   GNULIB_WCSNCPY=0;
8447   GNULIB_WCPNCPY=0;
8448   GNULIB_WCSCAT=0;
8449   GNULIB_WCSNCAT=0;
8450   GNULIB_WCSCMP=0;
8451   GNULIB_WCSNCMP=0;
8452   GNULIB_WCSCASECMP=0;
8453   GNULIB_WCSNCASECMP=0;
8454   GNULIB_WCSCOLL=0;
8455   GNULIB_WCSXFRM=0;
8456   GNULIB_WCSDUP=0;
8457   GNULIB_WCSCHR=0;
8458   GNULIB_WCSRCHR=0;
8459   GNULIB_WCSCSPN=0;
8460   GNULIB_WCSSPN=0;
8461   GNULIB_WCSPBRK=0;
8462   GNULIB_WCSSTR=0;
8463   GNULIB_WCSTOK=0;
8464   GNULIB_WCSWIDTH=0;
8465     HAVE_BTOWC=1;
8466   HAVE_MBSINIT=1;
8467   HAVE_MBRTOWC=1;
8468   HAVE_MBRLEN=1;
8469   HAVE_MBSRTOWCS=1;
8470   HAVE_MBSNRTOWCS=1;
8471   HAVE_WCRTOMB=1;
8472   HAVE_WCSRTOMBS=1;
8473   HAVE_WCSNRTOMBS=1;
8474   HAVE_WMEMCHR=1;
8475   HAVE_WMEMCMP=1;
8476   HAVE_WMEMCPY=1;
8477   HAVE_WMEMMOVE=1;
8478   HAVE_WMEMSET=1;
8479   HAVE_WCSLEN=1;
8480   HAVE_WCSNLEN=1;
8481   HAVE_WCSCPY=1;
8482   HAVE_WCPCPY=1;
8483   HAVE_WCSNCPY=1;
8484   HAVE_WCPNCPY=1;
8485   HAVE_WCSCAT=1;
8486   HAVE_WCSNCAT=1;
8487   HAVE_WCSCMP=1;
8488   HAVE_WCSNCMP=1;
8489   HAVE_WCSCASECMP=1;
8490   HAVE_WCSNCASECMP=1;
8491   HAVE_WCSCOLL=1;
8492   HAVE_WCSXFRM=1;
8493   HAVE_WCSDUP=1;
8494   HAVE_WCSCHR=1;
8495   HAVE_WCSRCHR=1;
8496   HAVE_WCSCSPN=1;
8497   HAVE_WCSSPN=1;
8498   HAVE_WCSPBRK=1;
8499   HAVE_WCSSTR=1;
8500   HAVE_WCSTOK=1;
8501   HAVE_WCSWIDTH=1;
8502   HAVE_DECL_WCTOB=1;
8503   HAVE_DECL_WCWIDTH=1;
8504   REPLACE_MBSTATE_T=0;
8505   REPLACE_BTOWC=0;
8506   REPLACE_WCTOB=0;
8507   REPLACE_MBSINIT=0;
8508   REPLACE_MBRTOWC=0;
8509   REPLACE_MBRLEN=0;
8510   REPLACE_MBSRTOWCS=0;
8511   REPLACE_MBSNRTOWCS=0;
8512   REPLACE_WCRTOMB=0;
8513   REPLACE_WCSRTOMBS=0;
8514   REPLACE_WCSNRTOMBS=0;
8515   REPLACE_WCWIDTH=0;
8516   REPLACE_WCSWIDTH=0;
8517
8518
8519             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
8520 $as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
8521 if ${gl_cv_header_wchar_h_correct_inline+:} false; then :
8522   $as_echo_n "(cached) " >&6
8523 else
8524   gl_cv_header_wchar_h_correct_inline=yes
8525      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8526 /* end confdefs.h.  */
8527
8528        #define wcstod renamed_wcstod
8529 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
8530    <wchar.h>.
8531    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
8532    included before <wchar.h>.  */
8533 #include <stddef.h>
8534 #include <stdio.h>
8535 #include <time.h>
8536 #include <wchar.h>
8537 extern int zero (void);
8538 int main () { return zero(); }
8539
8540 _ACEOF
8541      if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
8542   (eval $ac_compile) 2>&5
8543   ac_status=$?
8544   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8545   test $ac_status = 0; }; then
8546        mv conftest.$ac_objext conftest1.$ac_objext
8547        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8548 /* end confdefs.h.  */
8549
8550          #define wcstod renamed_wcstod
8551 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
8552    <wchar.h>.
8553    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
8554    included before <wchar.h>.  */
8555 #include <stddef.h>
8556 #include <stdio.h>
8557 #include <time.h>
8558 #include <wchar.h>
8559 int zero (void) { return 0; }
8560
8561 _ACEOF
8562        if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
8563   (eval $ac_compile) 2>&5
8564   ac_status=$?
8565   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8566   test $ac_status = 0; }; then
8567          mv conftest.$ac_objext conftest2.$ac_objext
8568          if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
8569            :
8570          else
8571            gl_cv_header_wchar_h_correct_inline=no
8572          fi
8573        fi
8574      fi
8575      rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext
8576
8577 fi
8578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
8579 $as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; }
8580   if test $gl_cv_header_wchar_h_correct_inline = no; then
8581     as_fn_error $? "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
8582 This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
8583 C99 mode. You have four options:
8584   - Add the flag -fgnu89-inline to CC and reconfigure, or
8585   - Fix your include files, using parts of
8586     <http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
8587   - Use a gcc version older than 4.3, or
8588   - Don't use the flags -std=c99 or -std=gnu99.
8589 Configuration aborted." "$LINENO" 5
8590   fi
8591
8592
8593
8594
8595   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
8596 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
8597 if ${am_cv_langinfo_codeset+:} false; then :
8598   $as_echo_n "(cached) " >&6
8599 else
8600   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8601 /* end confdefs.h.  */
8602 #include <langinfo.h>
8603 int
8604 main ()
8605 {
8606 char* cs = nl_langinfo(CODESET); return !cs;
8607   ;
8608   return 0;
8609 }
8610 _ACEOF
8611 if ac_fn_c_try_link "$LINENO"; then :
8612   am_cv_langinfo_codeset=yes
8613 else
8614   am_cv_langinfo_codeset=no
8615 fi
8616 rm -f core conftest.err conftest.$ac_objext \
8617     conftest$ac_exeext conftest.$ac_ext
8618
8619 fi
8620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
8621 $as_echo "$am_cv_langinfo_codeset" >&6; }
8622   if test $am_cv_langinfo_codeset = yes; then
8623
8624 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
8625
8626   fi
8627
8628
8629
8630
8631   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
8632 $as_echo_n "checking for a traditional french locale... " >&6; }
8633 if ${gt_cv_locale_fr+:} false; then :
8634   $as_echo_n "(cached) " >&6
8635 else
8636
8637     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8638 /* end confdefs.h.  */
8639
8640 #include <locale.h>
8641 #include <time.h>
8642 #if HAVE_LANGINFO_CODESET
8643 # include <langinfo.h>
8644 #endif
8645 #include <stdlib.h>
8646 #include <string.h>
8647 struct tm t;
8648 char buf[16];
8649 int main () {
8650   /* Check whether the given locale name is recognized by the system.  */
8651 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
8652   /* On native Windows, setlocale(category, "") looks at the system settings,
8653      not at the environment variables.  Also, when an encoding suffix such
8654      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
8655      category of the locale to "C".  */
8656   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
8657       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
8658     return 1;
8659 #else
8660   if (setlocale (LC_ALL, "") == NULL) return 1;
8661 #endif
8662   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
8663      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
8664      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
8665      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
8666      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
8667      some unit tests fail.
8668      On MirBSD 10, when an unsupported locale is specified, setlocale()
8669      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
8670 #if HAVE_LANGINFO_CODESET
8671   {
8672     const char *cs = nl_langinfo (CODESET);
8673     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
8674         || strcmp (cs, "UTF-8") == 0)
8675       return 1;
8676   }
8677 #endif
8678 #ifdef __CYGWIN__
8679   /* On Cygwin, avoid locale names without encoding suffix, because the
8680      locale_charset() function relies on the encoding suffix.  Note that
8681      LC_ALL is set on the command line.  */
8682   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
8683 #endif
8684   /* Check whether in the abbreviation of the second month, the second
8685      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
8686      one byte long. This excludes the UTF-8 encoding.  */
8687   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
8688   if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
8689 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
8690   /* Check whether the decimal separator is a comma.
8691      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
8692      are nl_langinfo(RADIXCHAR) are both ".".  */
8693   if (localeconv () ->decimal_point[0] != ',') return 1;
8694 #endif
8695   return 0;
8696 }
8697
8698 _ACEOF
8699     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
8700   (eval $ac_link) 2>&5
8701   ac_status=$?
8702   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8703   test $ac_status = 0; } && test -s conftest$ac_exeext; then
8704       case "$host_os" in
8705         # Handle native Windows specially, because there setlocale() interprets
8706         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
8707         # "fr" or "fra" as "French" or "French_France.1252",
8708         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
8709         # "ja" as "Japanese" or "Japanese_Japan.932",
8710         # and similar.
8711         mingw*)
8712           # Test for the native Windows locale name.
8713           if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8714             gt_cv_locale_fr=French_France.1252
8715           else
8716             # None found.
8717             gt_cv_locale_fr=none
8718           fi
8719           ;;
8720         *)
8721           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
8722           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
8723           # configure script would override the LC_ALL setting. Likewise for
8724           # LC_CTYPE, which is also set at the beginning of the configure script.
8725           # Test for the usual locale name.
8726           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8727             gt_cv_locale_fr=fr_FR
8728           else
8729             # Test for the locale name with explicit encoding suffix.
8730             if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8731               gt_cv_locale_fr=fr_FR.ISO-8859-1
8732             else
8733               # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
8734               if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8735                 gt_cv_locale_fr=fr_FR.ISO8859-1
8736               else
8737                 # Test for the HP-UX locale name.
8738                 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8739                   gt_cv_locale_fr=fr_FR.iso88591
8740                 else
8741                   # Test for the Solaris 7 locale name.
8742                   if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8743                     gt_cv_locale_fr=fr
8744                   else
8745                     # None found.
8746                     gt_cv_locale_fr=none
8747                   fi
8748                 fi
8749               fi
8750             fi
8751           fi
8752           ;;
8753       esac
8754     fi
8755     rm -fr conftest*
8756
8757 fi
8758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
8759 $as_echo "$gt_cv_locale_fr" >&6; }
8760   LOCALE_FR=$gt_cv_locale_fr
8761
8762
8763
8764   GNULIB__EXIT=0;
8765   GNULIB_ATOLL=0;
8766   GNULIB_CALLOC_POSIX=0;
8767   GNULIB_CANONICALIZE_FILE_NAME=0;
8768   GNULIB_GETLOADAVG=0;
8769   GNULIB_GETSUBOPT=0;
8770   GNULIB_GRANTPT=0;
8771   GNULIB_MALLOC_POSIX=0;
8772   GNULIB_MBTOWC=0;
8773   GNULIB_MKDTEMP=0;
8774   GNULIB_MKOSTEMP=0;
8775   GNULIB_MKOSTEMPS=0;
8776   GNULIB_MKSTEMP=0;
8777   GNULIB_MKSTEMPS=0;
8778   GNULIB_POSIX_OPENPT=0;
8779   GNULIB_PTSNAME=0;
8780   GNULIB_PTSNAME_R=0;
8781   GNULIB_PUTENV=0;
8782   GNULIB_QSORT_R=0;
8783   GNULIB_RANDOM=0;
8784   GNULIB_RANDOM_R=0;
8785   GNULIB_REALLOC_POSIX=0;
8786   GNULIB_REALPATH=0;
8787   GNULIB_RPMATCH=0;
8788   GNULIB_SECURE_GETENV=0;
8789   GNULIB_SETENV=0;
8790   GNULIB_STRTOD=0;
8791   GNULIB_STRTOLL=0;
8792   GNULIB_STRTOULL=0;
8793   GNULIB_SYSTEM_POSIX=0;
8794   GNULIB_UNLOCKPT=0;
8795   GNULIB_UNSETENV=0;
8796   GNULIB_WCTOMB=0;
8797     HAVE__EXIT=1;
8798   HAVE_ATOLL=1;
8799   HAVE_CANONICALIZE_FILE_NAME=1;
8800   HAVE_DECL_GETLOADAVG=1;
8801   HAVE_GETSUBOPT=1;
8802   HAVE_GRANTPT=1;
8803   HAVE_MKDTEMP=1;
8804   HAVE_MKOSTEMP=1;
8805   HAVE_MKOSTEMPS=1;
8806   HAVE_MKSTEMP=1;
8807   HAVE_MKSTEMPS=1;
8808   HAVE_POSIX_OPENPT=1;
8809   HAVE_PTSNAME=1;
8810   HAVE_PTSNAME_R=1;
8811   HAVE_RANDOM=1;
8812   HAVE_RANDOM_H=1;
8813   HAVE_RANDOM_R=1;
8814   HAVE_REALPATH=1;
8815   HAVE_RPMATCH=1;
8816   HAVE_SECURE_GETENV=1;
8817   HAVE_SETENV=1;
8818   HAVE_DECL_SETENV=1;
8819   HAVE_STRTOD=1;
8820   HAVE_STRTOLL=1;
8821   HAVE_STRTOULL=1;
8822   HAVE_STRUCT_RANDOM_DATA=1;
8823   HAVE_SYS_LOADAVG_H=0;
8824   HAVE_UNLOCKPT=1;
8825   HAVE_DECL_UNSETENV=1;
8826   REPLACE_CALLOC=0;
8827   REPLACE_CANONICALIZE_FILE_NAME=0;
8828   REPLACE_MALLOC=0;
8829   REPLACE_MBTOWC=0;
8830   REPLACE_MKSTEMP=0;
8831   REPLACE_PTSNAME=0;
8832   REPLACE_PTSNAME_R=0;
8833   REPLACE_PUTENV=0;
8834   REPLACE_QSORT_R=0;
8835   REPLACE_RANDOM_R=0;
8836   REPLACE_REALLOC=0;
8837   REPLACE_REALPATH=0;
8838   REPLACE_SETENV=0;
8839   REPLACE_STRTOD=0;
8840   REPLACE_UNSETENV=0;
8841   REPLACE_WCTOMB=0;
8842
8843
8844
8845
8846
8847
8848
8849
8850
8851   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
8852 $as_echo_n "checking whether // is distinct from /... " >&6; }
8853 if ${gl_cv_double_slash_root+:} false; then :
8854   $as_echo_n "(cached) " >&6
8855 else
8856    if test x"$cross_compiling" = xyes ; then
8857         # When cross-compiling, there is no way to tell whether // is special
8858         # short of a list of hosts.  However, the only known hosts to date
8859         # that have a distinct // are Apollo DomainOS (too old to port to),
8860         # Cygwin, and z/OS.  If anyone knows of another system for which // has
8861         # special semantics and is distinct from /, please report it to
8862         # <bug-gnulib@gnu.org>.
8863         case $host in
8864           *-cygwin | i370-ibm-openedition)
8865             gl_cv_double_slash_root=yes ;;
8866           *)
8867             # Be optimistic and assume that / and // are the same when we
8868             # don't know.
8869             gl_cv_double_slash_root='unknown, assuming no' ;;
8870         esac
8871       else
8872         set x `ls -di / // 2>/dev/null`
8873         if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
8874           gl_cv_double_slash_root=no
8875         else
8876           gl_cv_double_slash_root=yes
8877         fi
8878       fi
8879 fi
8880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
8881 $as_echo "$gl_cv_double_slash_root" >&6; }
8882   if test "$gl_cv_double_slash_root" = yes; then
8883
8884 $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
8885
8886   fi
8887
8888
8889
8890
8891
8892      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether realpath works" >&5
8893 $as_echo_n "checking whether realpath works... " >&6; }
8894 if ${gl_cv_func_realpath_works+:} false; then :
8895   $as_echo_n "(cached) " >&6
8896 else
8897
8898     touch conftest.a
8899     mkdir conftest.d
8900     if test "$cross_compiling" = yes; then :
8901   case "$host_os" in
8902                        # Guess yes on glibc systems.
8903         *-gnu* | gnu*) gl_cv_func_realpath_works="guessing yes" ;;
8904                        # If we don't know, assume the worst.
8905         *)             gl_cv_func_realpath_works="guessing no" ;;
8906       esac
8907
8908 else
8909   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8910 /* end confdefs.h.  */
8911
8912
8913
8914 #include <stdlib.h>
8915 #if defined __MACH__ && defined __APPLE__
8916 /* Avoid a crash on Mac OS X.  */
8917 #include <mach/mach.h>
8918 #include <mach/mach_error.h>
8919 #include <mach/thread_status.h>
8920 #include <mach/exception.h>
8921 #include <mach/task.h>
8922 #include <pthread.h>
8923 /* The exception port on which our thread listens.  */
8924 static mach_port_t our_exception_port;
8925 /* The main function of the thread listening for exceptions of type
8926    EXC_BAD_ACCESS.  */
8927 static void *
8928 mach_exception_thread (void *arg)
8929 {
8930   /* Buffer for a message to be received.  */
8931   struct {
8932     mach_msg_header_t head;
8933     mach_msg_body_t msgh_body;
8934     char data[1024];
8935   } msg;
8936   mach_msg_return_t retval;
8937   /* Wait for a message on the exception port.  */
8938   retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
8939                      our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
8940   if (retval != MACH_MSG_SUCCESS)
8941     abort ();
8942   exit (1);
8943 }
8944 static void
8945 nocrash_init (void)
8946 {
8947   mach_port_t self = mach_task_self ();
8948   /* Allocate a port on which the thread shall listen for exceptions.  */
8949   if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
8950       == KERN_SUCCESS) {
8951     /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html.  */
8952     if (mach_port_insert_right (self, our_exception_port, our_exception_port,
8953                                 MACH_MSG_TYPE_MAKE_SEND)
8954         == KERN_SUCCESS) {
8955       /* The exceptions we want to catch.  Only EXC_BAD_ACCESS is interesting
8956          for us.  */
8957       exception_mask_t mask = EXC_MASK_BAD_ACCESS;
8958       /* Create the thread listening on the exception port.  */
8959       pthread_attr_t attr;
8960       pthread_t thread;
8961       if (pthread_attr_init (&attr) == 0
8962           && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
8963           && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
8964         pthread_attr_destroy (&attr);
8965         /* Replace the exception port info for these exceptions with our own.
8966            Note that we replace the exception port for the entire task, not only
8967            for a particular thread.  This has the effect that when our exception
8968            port gets the message, the thread specific exception port has already
8969            been asked, and we don't need to bother about it.
8970            See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html.  */
8971         task_set_exception_ports (self, mask, our_exception_port,
8972                                   EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
8973       }
8974     }
8975   }
8976 }
8977 #elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
8978 /* Avoid a crash on native Windows.  */
8979 #define WIN32_LEAN_AND_MEAN
8980 #include <windows.h>
8981 #include <winerror.h>
8982 static LONG WINAPI
8983 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
8984 {
8985   switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
8986     {
8987     case EXCEPTION_ACCESS_VIOLATION:
8988     case EXCEPTION_IN_PAGE_ERROR:
8989     case EXCEPTION_STACK_OVERFLOW:
8990     case EXCEPTION_GUARD_PAGE:
8991     case EXCEPTION_PRIV_INSTRUCTION:
8992     case EXCEPTION_ILLEGAL_INSTRUCTION:
8993     case EXCEPTION_DATATYPE_MISALIGNMENT:
8994     case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
8995     case EXCEPTION_NONCONTINUABLE_EXCEPTION:
8996       exit (1);
8997     }
8998   return EXCEPTION_CONTINUE_SEARCH;
8999 }
9000 static void
9001 nocrash_init (void)
9002 {
9003   SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
9004 }
9005 #else
9006 /* Avoid a crash on POSIX systems.  */
9007 #include <signal.h>
9008 /* A POSIX signal handler.  */
9009 static void
9010 exception_handler (int sig)
9011 {
9012   exit (1);
9013 }
9014 static void
9015 nocrash_init (void)
9016 {
9017 #ifdef SIGSEGV
9018   signal (SIGSEGV, exception_handler);
9019 #endif
9020 #ifdef SIGBUS
9021   signal (SIGBUS, exception_handler);
9022 #endif
9023 }
9024 #endif
9025
9026         #include <stdlib.h>
9027         #include <string.h>
9028
9029 int
9030 main ()
9031 {
9032
9033         int result = 0;
9034         {
9035           char *name = realpath ("conftest.a", NULL);
9036           if (!(name && *name == '/'))
9037             result |= 1;
9038         }
9039         {
9040           char *name = realpath ("conftest.b/../conftest.a", NULL);
9041           if (name != NULL)
9042             result |= 2;
9043         }
9044         {
9045           char *name = realpath ("conftest.a/", NULL);
9046           if (name != NULL)
9047             result |= 4;
9048         }
9049         {
9050           char *name1 = realpath (".", NULL);
9051           char *name2 = realpath ("conftest.d//./..", NULL);
9052           if (strcmp (name1, name2) != 0)
9053             result |= 8;
9054         }
9055         return result;
9056
9057   ;
9058   return 0;
9059 }
9060
9061 _ACEOF
9062 if ac_fn_c_try_run "$LINENO"; then :
9063   gl_cv_func_realpath_works=yes
9064 else
9065   gl_cv_func_realpath_works=no
9066 fi
9067 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9068   conftest.$ac_objext conftest.beam conftest.$ac_ext
9069 fi
9070
9071     rm -rf conftest.a conftest.d
9072
9073 fi
9074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_realpath_works" >&5
9075 $as_echo "$gl_cv_func_realpath_works" >&6; }
9076   case "$gl_cv_func_realpath_works" in
9077     *yes)
9078
9079 $as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
9080
9081       ;;
9082   esac
9083
9084
9085
9086
9087
9088
9089
9090
9091
9092
9093
9094   GNULIB_CHDIR=0;
9095   GNULIB_CHOWN=0;
9096   GNULIB_CLOSE=0;
9097   GNULIB_DUP=0;
9098   GNULIB_DUP2=0;
9099   GNULIB_DUP3=0;
9100   GNULIB_ENVIRON=0;
9101   GNULIB_EUIDACCESS=0;
9102   GNULIB_FACCESSAT=0;
9103   GNULIB_FCHDIR=0;
9104   GNULIB_FCHOWNAT=0;
9105   GNULIB_FDATASYNC=0;
9106   GNULIB_FSYNC=0;
9107   GNULIB_FTRUNCATE=0;
9108   GNULIB_GETCWD=0;
9109   GNULIB_GETDOMAINNAME=0;
9110   GNULIB_GETDTABLESIZE=0;
9111   GNULIB_GETGROUPS=0;
9112   GNULIB_GETHOSTNAME=0;
9113   GNULIB_GETLOGIN=0;
9114   GNULIB_GETLOGIN_R=0;
9115   GNULIB_GETPAGESIZE=0;
9116   GNULIB_GETUSERSHELL=0;
9117   GNULIB_GROUP_MEMBER=0;
9118   GNULIB_ISATTY=0;
9119   GNULIB_LCHOWN=0;
9120   GNULIB_LINK=0;
9121   GNULIB_LINKAT=0;
9122   GNULIB_LSEEK=0;
9123   GNULIB_PIPE=0;
9124   GNULIB_PIPE2=0;
9125   GNULIB_PREAD=0;
9126   GNULIB_PWRITE=0;
9127   GNULIB_READ=0;
9128   GNULIB_READLINK=0;
9129   GNULIB_READLINKAT=0;
9130   GNULIB_RMDIR=0;
9131   GNULIB_SETHOSTNAME=0;
9132   GNULIB_SLEEP=0;
9133   GNULIB_SYMLINK=0;
9134   GNULIB_SYMLINKAT=0;
9135   GNULIB_TTYNAME_R=0;
9136   GNULIB_UNISTD_H_NONBLOCKING=0;
9137   GNULIB_UNISTD_H_SIGPIPE=0;
9138   GNULIB_UNLINK=0;
9139   GNULIB_UNLINKAT=0;
9140   GNULIB_USLEEP=0;
9141   GNULIB_WRITE=0;
9142     HAVE_CHOWN=1;
9143   HAVE_DUP2=1;
9144   HAVE_DUP3=1;
9145   HAVE_EUIDACCESS=1;
9146   HAVE_FACCESSAT=1;
9147   HAVE_FCHDIR=1;
9148   HAVE_FCHOWNAT=1;
9149   HAVE_FDATASYNC=1;
9150   HAVE_FSYNC=1;
9151   HAVE_FTRUNCATE=1;
9152   HAVE_GETDTABLESIZE=1;
9153   HAVE_GETGROUPS=1;
9154   HAVE_GETHOSTNAME=1;
9155   HAVE_GETLOGIN=1;
9156   HAVE_GETPAGESIZE=1;
9157   HAVE_GROUP_MEMBER=1;
9158   HAVE_LCHOWN=1;
9159   HAVE_LINK=1;
9160   HAVE_LINKAT=1;
9161   HAVE_PIPE=1;
9162   HAVE_PIPE2=1;
9163   HAVE_PREAD=1;
9164   HAVE_PWRITE=1;
9165   HAVE_READLINK=1;
9166   HAVE_READLINKAT=1;
9167   HAVE_SETHOSTNAME=1;
9168   HAVE_SLEEP=1;
9169   HAVE_SYMLINK=1;
9170   HAVE_SYMLINKAT=1;
9171   HAVE_UNLINKAT=1;
9172   HAVE_USLEEP=1;
9173   HAVE_DECL_ENVIRON=1;
9174   HAVE_DECL_FCHDIR=1;
9175   HAVE_DECL_FDATASYNC=1;
9176   HAVE_DECL_GETDOMAINNAME=1;
9177   HAVE_DECL_GETLOGIN_R=1;
9178   HAVE_DECL_GETPAGESIZE=1;
9179   HAVE_DECL_GETUSERSHELL=1;
9180   HAVE_DECL_SETHOSTNAME=1;
9181   HAVE_DECL_TTYNAME_R=1;
9182   HAVE_OS_H=0;
9183   HAVE_SYS_PARAM_H=0;
9184   REPLACE_CHOWN=0;
9185   REPLACE_CLOSE=0;
9186   REPLACE_DUP=0;
9187   REPLACE_DUP2=0;
9188   REPLACE_FCHOWNAT=0;
9189   REPLACE_FTRUNCATE=0;
9190   REPLACE_GETCWD=0;
9191   REPLACE_GETDOMAINNAME=0;
9192   REPLACE_GETDTABLESIZE=0;
9193   REPLACE_GETLOGIN_R=0;
9194   REPLACE_GETGROUPS=0;
9195   REPLACE_GETPAGESIZE=0;
9196   REPLACE_ISATTY=0;
9197   REPLACE_LCHOWN=0;
9198   REPLACE_LINK=0;
9199   REPLACE_LINKAT=0;
9200   REPLACE_LSEEK=0;
9201   REPLACE_PREAD=0;
9202   REPLACE_PWRITE=0;
9203   REPLACE_READ=0;
9204   REPLACE_READLINK=0;
9205   REPLACE_READLINKAT=0;
9206   REPLACE_RMDIR=0;
9207   REPLACE_SLEEP=0;
9208   REPLACE_SYMLINK=0;
9209   REPLACE_SYMLINKAT=0;
9210   REPLACE_TTYNAME_R=0;
9211   REPLACE_UNLINK=0;
9212   REPLACE_UNLINKAT=0;
9213   REPLACE_USLEEP=0;
9214   REPLACE_WRITE=0;
9215   UNISTD_H_HAVE_WINSOCK2_H=0;
9216   UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
9217
9218
9219
9220
9221
9222
9223       for ac_header in unistd.h
9224 do :
9225   ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
9226 if test "x$ac_cv_header_unistd_h" = xyes; then :
9227   cat >>confdefs.h <<_ACEOF
9228 #define HAVE_UNISTD_H 1
9229 _ACEOF
9230
9231 fi
9232
9233 done
9234
9235   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working chown" >&5
9236 $as_echo_n "checking for working chown... " >&6; }
9237 if ${ac_cv_func_chown_works+:} false; then :
9238   $as_echo_n "(cached) " >&6
9239 else
9240   if test "$cross_compiling" = yes; then :
9241   case "$host_os" in # ((
9242                   # Guess yes on glibc systems.
9243           *-gnu*) ac_cv_func_chown_works=yes ;;
9244                   # If we don't know, assume the worst.
9245           *)      ac_cv_func_chown_works=no ;;
9246         esac
9247
9248 else
9249   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9250 /* end confdefs.h.  */
9251 $ac_includes_default
9252            #include <fcntl.h>
9253
9254 int
9255 main ()
9256 {
9257
9258             char *f = "conftest.chown";
9259             struct stat before, after;
9260
9261             if (creat (f, 0600) < 0)
9262               return 1;
9263             if (stat (f, &before) < 0)
9264               return 1;
9265             if (chown (f, (uid_t) -1, (gid_t) -1) == -1)
9266               return 1;
9267             if (stat (f, &after) < 0)
9268               return 1;
9269             return ! (before.st_uid == after.st_uid && before.st_gid == after.st_gid);
9270
9271   ;
9272   return 0;
9273 }
9274
9275 _ACEOF
9276 if ac_fn_c_try_run "$LINENO"; then :
9277   ac_cv_func_chown_works=yes
9278 else
9279   ac_cv_func_chown_works=no
9280 fi
9281 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9282   conftest.$ac_objext conftest.beam conftest.$ac_ext
9283 fi
9284
9285      rm -f conftest.chown
9286
9287 fi
9288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_chown_works" >&5
9289 $as_echo "$ac_cv_func_chown_works" >&6; }
9290   if test $ac_cv_func_chown_works = yes; then
9291
9292 $as_echo "#define HAVE_CHOWN 1" >>confdefs.h
9293
9294   fi
9295
9296
9297   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether chown dereferences symlinks" >&5
9298 $as_echo_n "checking whether chown dereferences symlinks... " >&6; }
9299 if ${gl_cv_func_chown_follows_symlink+:} false; then :
9300   $as_echo_n "(cached) " >&6
9301 else
9302
9303       if test "$cross_compiling" = yes; then :
9304   gl_cv_func_chown_follows_symlink=yes
9305
9306 else
9307   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9308 /* end confdefs.h.  */
9309
9310 #include <unistd.h>
9311 #include <stdlib.h>
9312 #include <errno.h>
9313
9314         int
9315         main ()
9316         {
9317           int result = 0;
9318           char const *dangling_symlink = "conftest.dangle";
9319
9320           unlink (dangling_symlink);
9321           if (symlink ("conftest.no-such", dangling_symlink))
9322             abort ();
9323
9324           /* Exit successfully on a conforming system,
9325              i.e., where chown must fail with ENOENT.  */
9326           if (chown (dangling_symlink, getuid (), getgid ()) == 0)
9327             result |= 1;
9328           if (errno != ENOENT)
9329             result |= 2;
9330           return result;
9331         }
9332
9333 _ACEOF
9334 if ac_fn_c_try_run "$LINENO"; then :
9335   gl_cv_func_chown_follows_symlink=yes
9336 else
9337   gl_cv_func_chown_follows_symlink=no
9338 fi
9339 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9340   conftest.$ac_objext conftest.beam conftest.$ac_ext
9341 fi
9342
9343
9344
9345 fi
9346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_chown_follows_symlink" >&5
9347 $as_echo "$gl_cv_func_chown_follows_symlink" >&6; }
9348
9349   if test $gl_cv_func_chown_follows_symlink = no; then
9350
9351 $as_echo "#define CHOWN_MODIFIES_SYMLINK 1" >>confdefs.h
9352
9353   fi
9354
9355
9356
9357
9358
9359
9360
9361
9362
9363
9364
9365
9366     if test $ac_cv_func_chown = no; then
9367     HAVE_CHOWN=0
9368   else
9369         if test $gl_cv_func_chown_follows_symlink = no; then
9370       REPLACE_CHOWN=1
9371     fi
9372
9373         if test $ac_cv_func_chown_works = no; then
9374
9375 $as_echo "#define CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE 1" >>confdefs.h
9376
9377       REPLACE_CHOWN=1
9378     fi
9379
9380                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether chown honors trailing slash" >&5
9381 $as_echo_n "checking whether chown honors trailing slash... " >&6; }
9382 if ${gl_cv_func_chown_slash_works+:} false; then :
9383   $as_echo_n "(cached) " >&6
9384 else
9385   touch conftest.file && rm -f conftest.link
9386        if test "$cross_compiling" = yes; then :
9387   case "$host_os" in
9388                    # Guess yes on glibc systems.
9389            *-gnu*) gl_cv_func_chown_slash_works="guessing yes" ;;
9390                    # If we don't know, assume the worst.
9391            *)      gl_cv_func_chown_slash_works="guessing no" ;;
9392          esac
9393
9394 else
9395   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9396 /* end confdefs.h.  */
9397
9398 #include <unistd.h>
9399 #include <stdlib.h>
9400 #include <errno.h>
9401
9402 int
9403 main ()
9404 {
9405     if (symlink ("conftest.file", "conftest.link")) return 1;
9406           if (chown ("conftest.link/", getuid (), getgid ()) == 0) return 2;
9407
9408   ;
9409   return 0;
9410 }
9411 _ACEOF
9412 if ac_fn_c_try_run "$LINENO"; then :
9413   gl_cv_func_chown_slash_works=yes
9414 else
9415   gl_cv_func_chown_slash_works=no
9416 fi
9417 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9418   conftest.$ac_objext conftest.beam conftest.$ac_ext
9419 fi
9420
9421       rm -f conftest.link conftest.file
9422 fi
9423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_chown_slash_works" >&5
9424 $as_echo "$gl_cv_func_chown_slash_works" >&6; }
9425     case "$gl_cv_func_chown_slash_works" in
9426       *yes) ;;
9427       *)
9428
9429 $as_echo "#define CHOWN_TRAILING_SLASH_BUG 1" >>confdefs.h
9430
9431         REPLACE_CHOWN=1
9432         ;;
9433     esac
9434
9435         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether chown always updates ctime" >&5
9436 $as_echo_n "checking whether chown always updates ctime... " >&6; }
9437 if ${gl_cv_func_chown_ctime_works+:} false; then :
9438   $as_echo_n "(cached) " >&6
9439 else
9440   if test "$cross_compiling" = yes; then :
9441   case "$host_os" in
9442                    # Guess yes on glibc systems.
9443            *-gnu*) gl_cv_func_chown_ctime_works="guessing yes" ;;
9444                    # If we don't know, assume the worst.
9445            *)      gl_cv_func_chown_ctime_works="guessing no" ;;
9446          esac
9447
9448 else
9449   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9450 /* end confdefs.h.  */
9451
9452 #include <unistd.h>
9453 #include <stdlib.h>
9454 #include <errno.h>
9455 #include <fcntl.h>
9456 #include <sys/stat.h>
9457
9458 int
9459 main ()
9460 {
9461     struct stat st1, st2;
9462           if (close (creat ("conftest.file", 0600))) return 1;
9463           if (stat ("conftest.file", &st1)) return 2;
9464           sleep (1);
9465           if (chown ("conftest.file", st1.st_uid, st1.st_gid)) return 3;
9466           if (stat ("conftest.file", &st2)) return 4;
9467           if (st2.st_ctime <= st1.st_ctime) return 5;
9468
9469   ;
9470   return 0;
9471 }
9472 _ACEOF
9473 if ac_fn_c_try_run "$LINENO"; then :
9474   gl_cv_func_chown_ctime_works=yes
9475 else
9476   gl_cv_func_chown_ctime_works=no
9477 fi
9478 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9479   conftest.$ac_objext conftest.beam conftest.$ac_ext
9480 fi
9481
9482       rm -f conftest.file
9483 fi
9484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_chown_ctime_works" >&5
9485 $as_echo "$gl_cv_func_chown_ctime_works" >&6; }
9486     case "$gl_cv_func_chown_ctime_works" in
9487       *yes) ;;
9488       *)
9489
9490 $as_echo "#define CHOWN_CHANGE_TIME_BUG 1" >>confdefs.h
9491
9492         REPLACE_CHOWN=1
9493         ;;
9494     esac
9495   fi
9496
9497
9498
9499
9500
9501   if test $ac_cv_func__set_invalid_parameter_handler = yes; then
9502     HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
9503
9504 $as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
9505
9506   else
9507     HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
9508   fi
9509
9510
9511
9512
9513
9514
9515
9516      GNULIB_OPENDIR=0;
9517   GNULIB_READDIR=0;
9518   GNULIB_REWINDDIR=0;
9519   GNULIB_CLOSEDIR=0;
9520   GNULIB_DIRFD=0;
9521   GNULIB_FDOPENDIR=0;
9522   GNULIB_SCANDIR=0;
9523   GNULIB_ALPHASORT=0;
9524     HAVE_OPENDIR=1;
9525   HAVE_READDIR=1;
9526   HAVE_REWINDDIR=1;
9527   HAVE_CLOSEDIR=1;
9528   HAVE_DECL_DIRFD=1;
9529   HAVE_DECL_FDOPENDIR=1;
9530   HAVE_FDOPENDIR=1;
9531   HAVE_SCANDIR=1;
9532   HAVE_ALPHASORT=1;
9533   REPLACE_OPENDIR=0;
9534   REPLACE_CLOSEDIR=0;
9535   REPLACE_DIRFD=0;
9536   REPLACE_FDOPENDIR=0;
9537
9538
9539
9540   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
9541 $as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
9542 if ${gl_cv_have_include_next+:} false; then :
9543   $as_echo_n "(cached) " >&6
9544 else
9545   rm -rf conftestd1a conftestd1b conftestd2
9546      mkdir conftestd1a conftestd1b conftestd2
9547                                                   cat <<EOF > conftestd1a/conftest.h
9548 #define DEFINED_IN_CONFTESTD1
9549 #include_next <conftest.h>
9550 #ifdef DEFINED_IN_CONFTESTD2
9551 int foo;
9552 #else
9553 #error "include_next doesn't work"
9554 #endif
9555 EOF
9556      cat <<EOF > conftestd1b/conftest.h
9557 #define DEFINED_IN_CONFTESTD1
9558 #include <stdio.h>
9559 #include_next <conftest.h>
9560 #ifdef DEFINED_IN_CONFTESTD2
9561 int foo;
9562 #else
9563 #error "include_next doesn't work"
9564 #endif
9565 EOF
9566      cat <<EOF > conftestd2/conftest.h
9567 #ifndef DEFINED_IN_CONFTESTD1
9568 #error "include_next test doesn't work"
9569 #endif
9570 #define DEFINED_IN_CONFTESTD2
9571 EOF
9572      gl_save_CPPFLAGS="$CPPFLAGS"
9573      CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
9574      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9575 /* end confdefs.h.  */
9576 #include <conftest.h>
9577 _ACEOF
9578 if ac_fn_c_try_compile "$LINENO"; then :
9579   gl_cv_have_include_next=yes
9580 else
9581   CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
9582         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9583 /* end confdefs.h.  */
9584 #include <conftest.h>
9585 _ACEOF
9586 if ac_fn_c_try_compile "$LINENO"; then :
9587   gl_cv_have_include_next=buggy
9588 else
9589   gl_cv_have_include_next=no
9590 fi
9591 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9592
9593 fi
9594 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9595      CPPFLAGS="$gl_save_CPPFLAGS"
9596      rm -rf conftestd1a conftestd1b conftestd2
9597
9598 fi
9599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
9600 $as_echo "$gl_cv_have_include_next" >&6; }
9601   PRAGMA_SYSTEM_HEADER=
9602   if test $gl_cv_have_include_next = yes; then
9603     INCLUDE_NEXT=include_next
9604     INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
9605     if test -n "$GCC"; then
9606       PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
9607     fi
9608   else
9609     if test $gl_cv_have_include_next = buggy; then
9610       INCLUDE_NEXT=include
9611       INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
9612     else
9613       INCLUDE_NEXT=include
9614       INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
9615     fi
9616   fi
9617
9618
9619
9620   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5
9621 $as_echo_n "checking whether system header files limit the line length... " >&6; }
9622 if ${gl_cv_pragma_columns+:} false; then :
9623   $as_echo_n "(cached) " >&6
9624 else
9625        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9626 /* end confdefs.h.  */
9627
9628 #ifdef __TANDEM
9629 choke me
9630 #endif
9631
9632 _ACEOF
9633 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9634   $EGREP "choke me" >/dev/null 2>&1; then :
9635   gl_cv_pragma_columns=yes
9636 else
9637   gl_cv_pragma_columns=no
9638 fi
9639 rm -f conftest*
9640
9641
9642 fi
9643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5
9644 $as_echo "$gl_cv_pragma_columns" >&6; }
9645   if test $gl_cv_pragma_columns = yes; then
9646     PRAGMA_COLUMNS="#pragma COLUMNS 10000"
9647   else
9648     PRAGMA_COLUMNS=
9649   fi
9650
9651
9652
9653
9654
9655
9656
9657
9658
9659
9660
9661
9662
9663
9664
9665
9666
9667   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
9668 $as_echo_n "checking if environ is properly declared... " >&6; }
9669   if ${gt_cv_var_environ_declaration+:} false; then :
9670   $as_echo_n "(cached) " >&6
9671 else
9672
9673     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9674 /* end confdefs.h.  */
9675 #if HAVE_UNISTD_H
9676      #include <unistd.h>
9677      #endif
9678      /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>.  */
9679      #include <stdlib.h>
9680
9681            extern struct { int foo; } environ;
9682 int
9683 main ()
9684 {
9685 environ.foo = 1;
9686   ;
9687   return 0;
9688 }
9689 _ACEOF
9690 if ac_fn_c_try_compile "$LINENO"; then :
9691   gt_cv_var_environ_declaration=no
9692 else
9693   gt_cv_var_environ_declaration=yes
9694 fi
9695 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9696 fi
9697
9698   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
9699 $as_echo "$gt_cv_var_environ_declaration" >&6; }
9700   if test $gt_cv_var_environ_declaration = yes; then
9701
9702 $as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
9703
9704   fi
9705
9706
9707   if test $gt_cv_var_environ_declaration != yes; then
9708     HAVE_DECL_ENVIRON=0
9709   fi
9710
9711
9712
9713   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
9714 $as_echo_n "checking for complete errno.h... " >&6; }
9715 if ${gl_cv_header_errno_h_complete+:} false; then :
9716   $as_echo_n "(cached) " >&6
9717 else
9718
9719     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9720 /* end confdefs.h.  */
9721
9722 #include <errno.h>
9723 #if !defined ETXTBSY
9724 booboo
9725 #endif
9726 #if !defined ENOMSG
9727 booboo
9728 #endif
9729 #if !defined EIDRM
9730 booboo
9731 #endif
9732 #if !defined ENOLINK
9733 booboo
9734 #endif
9735 #if !defined EPROTO
9736 booboo
9737 #endif
9738 #if !defined EMULTIHOP
9739 booboo
9740 #endif
9741 #if !defined EBADMSG
9742 booboo
9743 #endif
9744 #if !defined EOVERFLOW
9745 booboo
9746 #endif
9747 #if !defined ENOTSUP
9748 booboo
9749 #endif
9750 #if !defined ENETRESET
9751 booboo
9752 #endif
9753 #if !defined ECONNABORTED
9754 booboo
9755 #endif
9756 #if !defined ESTALE
9757 booboo
9758 #endif
9759 #if !defined EDQUOT
9760 booboo
9761 #endif
9762 #if !defined ECANCELED
9763 booboo
9764 #endif
9765 #if !defined EOWNERDEAD
9766 booboo
9767 #endif
9768 #if !defined ENOTRECOVERABLE
9769 booboo
9770 #endif
9771 #if !defined EILSEQ
9772 booboo
9773 #endif
9774
9775 _ACEOF
9776 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9777   $EGREP "booboo" >/dev/null 2>&1; then :
9778   gl_cv_header_errno_h_complete=no
9779 else
9780   gl_cv_header_errno_h_complete=yes
9781 fi
9782 rm -f conftest*
9783
9784
9785 fi
9786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
9787 $as_echo "$gl_cv_header_errno_h_complete" >&6; }
9788   if test $gl_cv_header_errno_h_complete = yes; then
9789     ERRNO_H=''
9790   else
9791
9792
9793
9794
9795
9796
9797
9798
9799      if test $gl_cv_have_include_next = yes; then
9800        gl_cv_next_errno_h='<'errno.h'>'
9801      else
9802        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
9803 $as_echo_n "checking absolute name of <errno.h>... " >&6; }
9804 if ${gl_cv_next_errno_h+:} false; then :
9805   $as_echo_n "(cached) " >&6
9806 else
9807
9808
9809
9810   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9811 /* end confdefs.h.  */
9812 #include <errno.h>
9813 _ACEOF
9814                 case "$host_os" in
9815     aix*) gl_absname_cpp="$ac_cpp -C" ;;
9816     *)    gl_absname_cpp="$ac_cpp" ;;
9817   esac
9818
9819   case "$host_os" in
9820     mingw*)
9821                                           gl_dirsep_regex='[/\\]'
9822       ;;
9823     *)
9824       gl_dirsep_regex='\/'
9825       ;;
9826   esac
9827       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
9828   gl_header_literal_regex=`echo 'errno.h' \
9829                            | sed -e "$gl_make_literal_regex_sed"`
9830   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
9831       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
9832       s|^/[^/]|//&|
9833       p
9834       q
9835     }'
9836
9837         gl_cv_absolute_errno_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
9838   sed -n "$gl_absolute_header_sed"`
9839
9840            gl_header=$gl_cv_absolute_errno_h
9841            gl_cv_next_errno_h='"'$gl_header'"'
9842
9843
9844 fi
9845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
9846 $as_echo "$gl_cv_next_errno_h" >&6; }
9847      fi
9848      NEXT_ERRNO_H=$gl_cv_next_errno_h
9849
9850      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
9851        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
9852        gl_next_as_first_directive='<'errno.h'>'
9853      else
9854        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
9855        gl_next_as_first_directive=$gl_cv_next_errno_h
9856      fi
9857      NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
9858
9859
9860
9861
9862     ERRNO_H='errno.h'
9863   fi
9864
9865    if test -n "$ERRNO_H"; then
9866   GL_GENERATE_ERRNO_H_TRUE=
9867   GL_GENERATE_ERRNO_H_FALSE='#'
9868 else
9869   GL_GENERATE_ERRNO_H_TRUE='#'
9870   GL_GENERATE_ERRNO_H_FALSE=
9871 fi
9872
9873
9874   if test -n "$ERRNO_H"; then
9875     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
9876 $as_echo_n "checking for EMULTIHOP value... " >&6; }
9877 if ${gl_cv_header_errno_h_EMULTIHOP+:} false; then :
9878   $as_echo_n "(cached) " >&6
9879 else
9880
9881       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9882 /* end confdefs.h.  */
9883
9884 #include <errno.h>
9885 #ifdef EMULTIHOP
9886 yes
9887 #endif
9888
9889 _ACEOF
9890 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9891   $EGREP "yes" >/dev/null 2>&1; then :
9892   gl_cv_header_errno_h_EMULTIHOP=yes
9893 else
9894   gl_cv_header_errno_h_EMULTIHOP=no
9895 fi
9896 rm -f conftest*
9897
9898       if test $gl_cv_header_errno_h_EMULTIHOP = no; then
9899         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9900 /* end confdefs.h.  */
9901
9902 #define _XOPEN_SOURCE_EXTENDED 1
9903 #include <errno.h>
9904 #ifdef EMULTIHOP
9905 yes
9906 #endif
9907
9908 _ACEOF
9909 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9910   $EGREP "yes" >/dev/null 2>&1; then :
9911   gl_cv_header_errno_h_EMULTIHOP=hidden
9912 fi
9913 rm -f conftest*
9914
9915         if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
9916                               if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP"        "
9917 #define _XOPEN_SOURCE_EXTENDED 1
9918 #include <errno.h>
9919 /* The following two lines are a workaround against an autoconf-2.52 bug.  */
9920 #include <stdio.h>
9921 #include <stdlib.h>
9922 "; then :
9923
9924 fi
9925
9926         fi
9927       fi
9928
9929 fi
9930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
9931 $as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
9932     case $gl_cv_header_errno_h_EMULTIHOP in
9933       yes | no)
9934         EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
9935         ;;
9936       *)
9937         EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
9938         ;;
9939     esac
9940
9941
9942   fi
9943
9944
9945   if test -n "$ERRNO_H"; then
9946     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
9947 $as_echo_n "checking for ENOLINK value... " >&6; }
9948 if ${gl_cv_header_errno_h_ENOLINK+:} false; then :
9949   $as_echo_n "(cached) " >&6
9950 else
9951
9952       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9953 /* end confdefs.h.  */
9954
9955 #include <errno.h>
9956 #ifdef ENOLINK
9957 yes
9958 #endif
9959
9960 _ACEOF
9961 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9962   $EGREP "yes" >/dev/null 2>&1; then :
9963   gl_cv_header_errno_h_ENOLINK=yes
9964 else
9965   gl_cv_header_errno_h_ENOLINK=no
9966 fi
9967 rm -f conftest*
9968
9969       if test $gl_cv_header_errno_h_ENOLINK = no; then
9970         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9971 /* end confdefs.h.  */
9972
9973 #define _XOPEN_SOURCE_EXTENDED 1
9974 #include <errno.h>
9975 #ifdef ENOLINK
9976 yes
9977 #endif
9978
9979 _ACEOF
9980 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9981   $EGREP "yes" >/dev/null 2>&1; then :
9982   gl_cv_header_errno_h_ENOLINK=hidden
9983 fi
9984 rm -f conftest*
9985
9986         if test $gl_cv_header_errno_h_ENOLINK = hidden; then
9987                               if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK"        "
9988 #define _XOPEN_SOURCE_EXTENDED 1
9989 #include <errno.h>
9990 /* The following two lines are a workaround against an autoconf-2.52 bug.  */
9991 #include <stdio.h>
9992 #include <stdlib.h>
9993 "; then :
9994
9995 fi
9996
9997         fi
9998       fi
9999
10000 fi
10001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
10002 $as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; }
10003     case $gl_cv_header_errno_h_ENOLINK in
10004       yes | no)
10005         ENOLINK_HIDDEN=0; ENOLINK_VALUE=
10006         ;;
10007       *)
10008         ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
10009         ;;
10010     esac
10011
10012
10013   fi
10014
10015
10016   if test -n "$ERRNO_H"; then
10017     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
10018 $as_echo_n "checking for EOVERFLOW value... " >&6; }
10019 if ${gl_cv_header_errno_h_EOVERFLOW+:} false; then :
10020   $as_echo_n "(cached) " >&6
10021 else
10022
10023       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10024 /* end confdefs.h.  */
10025
10026 #include <errno.h>
10027 #ifdef EOVERFLOW
10028 yes
10029 #endif
10030
10031 _ACEOF
10032 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10033   $EGREP "yes" >/dev/null 2>&1; then :
10034   gl_cv_header_errno_h_EOVERFLOW=yes
10035 else
10036   gl_cv_header_errno_h_EOVERFLOW=no
10037 fi
10038 rm -f conftest*
10039
10040       if test $gl_cv_header_errno_h_EOVERFLOW = no; then
10041         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10042 /* end confdefs.h.  */
10043
10044 #define _XOPEN_SOURCE_EXTENDED 1
10045 #include <errno.h>
10046 #ifdef EOVERFLOW
10047 yes
10048 #endif
10049
10050 _ACEOF
10051 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10052   $EGREP "yes" >/dev/null 2>&1; then :
10053   gl_cv_header_errno_h_EOVERFLOW=hidden
10054 fi
10055 rm -f conftest*
10056
10057         if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
10058                               if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW"        "
10059 #define _XOPEN_SOURCE_EXTENDED 1
10060 #include <errno.h>
10061 /* The following two lines are a workaround against an autoconf-2.52 bug.  */
10062 #include <stdio.h>
10063 #include <stdlib.h>
10064 "; then :
10065
10066 fi
10067
10068         fi
10069       fi
10070
10071 fi
10072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
10073 $as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
10074     case $gl_cv_header_errno_h_EOVERFLOW in
10075       yes | no)
10076         EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
10077         ;;
10078       *)
10079         EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
10080         ;;
10081     esac
10082
10083
10084   fi
10085
10086
10087 ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
10088 if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
10089   ac_have_decl=1
10090 else
10091   ac_have_decl=0
10092 fi
10093
10094 cat >>confdefs.h <<_ACEOF
10095 #define HAVE_DECL_STRERROR_R $ac_have_decl
10096 _ACEOF
10097
10098 for ac_func in strerror_r
10099 do :
10100   ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
10101 if test "x$ac_cv_func_strerror_r" = xyes; then :
10102   cat >>confdefs.h <<_ACEOF
10103 #define HAVE_STRERROR_R 1
10104 _ACEOF
10105
10106 fi
10107 done
10108
10109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
10110 $as_echo_n "checking whether strerror_r returns char *... " >&6; }
10111 if ${ac_cv_func_strerror_r_char_p+:} false; then :
10112   $as_echo_n "(cached) " >&6
10113 else
10114
10115     ac_cv_func_strerror_r_char_p=no
10116     if test $ac_cv_have_decl_strerror_r = yes; then
10117       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10118 /* end confdefs.h.  */
10119 $ac_includes_default
10120 int
10121 main ()
10122 {
10123
10124           char buf[100];
10125           char x = *strerror_r (0, buf, sizeof buf);
10126           char *p = strerror_r (0, buf, sizeof buf);
10127           return !p || x;
10128
10129   ;
10130   return 0;
10131 }
10132 _ACEOF
10133 if ac_fn_c_try_compile "$LINENO"; then :
10134   ac_cv_func_strerror_r_char_p=yes
10135 fi
10136 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10137     else
10138       # strerror_r is not declared.  Choose between
10139       # systems that have relatively inaccessible declarations for the
10140       # function.  BeOS and DEC UNIX 4.0 fall in this category, but the
10141       # former has a strerror_r that returns char*, while the latter
10142       # has a strerror_r that returns `int'.
10143       # This test should segfault on the DEC system.
10144       if test "$cross_compiling" = yes; then :
10145   :
10146 else
10147   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10148 /* end confdefs.h.  */
10149 $ac_includes_default
10150         extern char *strerror_r ();
10151 int
10152 main ()
10153 {
10154 char buf[100];
10155           char x = *strerror_r (0, buf, sizeof buf);
10156           return ! isalpha (x);
10157   ;
10158   return 0;
10159 }
10160 _ACEOF
10161 if ac_fn_c_try_run "$LINENO"; then :
10162   ac_cv_func_strerror_r_char_p=yes
10163 fi
10164 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10165   conftest.$ac_objext conftest.beam conftest.$ac_ext
10166 fi
10167
10168     fi
10169
10170 fi
10171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
10172 $as_echo "$ac_cv_func_strerror_r_char_p" >&6; }
10173 if test $ac_cv_func_strerror_r_char_p = yes; then
10174
10175 $as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h
10176
10177 fi
10178
10179
10180
10181 { $as_echo "$as_me:${as_lineno-$LINENO}: checking type of array argument to getgroups" >&5
10182 $as_echo_n "checking type of array argument to getgroups... " >&6; }
10183 if ${ac_cv_type_getgroups+:} false; then :
10184   $as_echo_n "(cached) " >&6
10185 else
10186   if test "$cross_compiling" = yes; then :
10187   ac_cv_type_getgroups=cross
10188 else
10189   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10190 /* end confdefs.h.  */
10191 /* Thanks to Mike Rendell for this test.  */
10192 $ac_includes_default
10193 #define NGID 256
10194 #undef MAX
10195 #define MAX(x, y) ((x) > (y) ? (x) : (y))
10196
10197 int
10198 main ()
10199 {
10200   gid_t gidset[NGID];
10201   int i, n;
10202   union { gid_t gval; long int lval; }  val;
10203
10204   val.lval = -1;
10205   for (i = 0; i < NGID; i++)
10206     gidset[i] = val.gval;
10207   n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
10208                  gidset);
10209   /* Exit non-zero if getgroups seems to require an array of ints.  This
10210      happens when gid_t is short int but getgroups modifies an array
10211      of ints.  */
10212   return n > 0 && gidset[n] != val.gval;
10213 }
10214 _ACEOF
10215 if ac_fn_c_try_run "$LINENO"; then :
10216   ac_cv_type_getgroups=gid_t
10217 else
10218   ac_cv_type_getgroups=int
10219 fi
10220 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10221   conftest.$ac_objext conftest.beam conftest.$ac_ext
10222 fi
10223
10224 if test $ac_cv_type_getgroups = cross; then
10225         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10226 /* end confdefs.h.  */
10227 #include <unistd.h>
10228
10229 _ACEOF
10230 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10231   $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then :
10232   ac_cv_type_getgroups=gid_t
10233 else
10234   ac_cv_type_getgroups=int
10235 fi
10236 rm -f conftest*
10237
10238 fi
10239 fi
10240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_getgroups" >&5
10241 $as_echo "$ac_cv_type_getgroups" >&6; }
10242
10243 cat >>confdefs.h <<_ACEOF
10244 #define GETGROUPS_T $ac_cv_type_getgroups
10245 _ACEOF
10246
10247
10248
10249
10250
10251 ac_fn_c_check_decl "$LINENO" "fchdir" "ac_cv_have_decl_fchdir" "$ac_includes_default"
10252 if test "x$ac_cv_have_decl_fchdir" = xyes; then :
10253   ac_have_decl=1
10254 else
10255   ac_have_decl=0
10256 fi
10257
10258 cat >>confdefs.h <<_ACEOF
10259 #define HAVE_DECL_FCHDIR $ac_have_decl
10260 _ACEOF
10261
10262
10263      GNULIB_FCHMODAT=0;
10264   GNULIB_FSTAT=0;
10265   GNULIB_FSTATAT=0;
10266   GNULIB_FUTIMENS=0;
10267   GNULIB_LCHMOD=0;
10268   GNULIB_LSTAT=0;
10269   GNULIB_MKDIRAT=0;
10270   GNULIB_MKFIFO=0;
10271   GNULIB_MKFIFOAT=0;
10272   GNULIB_MKNOD=0;
10273   GNULIB_MKNODAT=0;
10274   GNULIB_STAT=0;
10275   GNULIB_UTIMENSAT=0;
10276     HAVE_FCHMODAT=1;
10277   HAVE_FSTATAT=1;
10278   HAVE_FUTIMENS=1;
10279   HAVE_LCHMOD=1;
10280   HAVE_LSTAT=1;
10281   HAVE_MKDIRAT=1;
10282   HAVE_MKFIFO=1;
10283   HAVE_MKFIFOAT=1;
10284   HAVE_MKNOD=1;
10285   HAVE_MKNODAT=1;
10286   HAVE_UTIMENSAT=1;
10287   REPLACE_FSTAT=0;
10288   REPLACE_FSTATAT=0;
10289   REPLACE_FUTIMENS=0;
10290   REPLACE_LSTAT=0;
10291   REPLACE_MKDIR=0;
10292   REPLACE_MKFIFO=0;
10293   REPLACE_MKNOD=0;
10294   REPLACE_STAT=0;
10295   REPLACE_UTIMENSAT=0;
10296
10297
10298
10299
10300
10301
10302   GNULIB_FCNTL=0;
10303   GNULIB_NONBLOCKING=0;
10304   GNULIB_OPEN=0;
10305   GNULIB_OPENAT=0;
10306     HAVE_FCNTL=1;
10307   HAVE_OPENAT=1;
10308   REPLACE_FCNTL=0;
10309   REPLACE_OPEN=0;
10310   REPLACE_OPENAT=0;
10311
10312
10313
10314
10315
10316
10317
10318
10319
10320
10321   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
10322 $as_echo_n "checking for working fcntl.h... " >&6; }
10323 if ${gl_cv_header_working_fcntl_h+:} false; then :
10324   $as_echo_n "(cached) " >&6
10325 else
10326   if test "$cross_compiling" = yes; then :
10327   gl_cv_header_working_fcntl_h=cross-compiling
10328 else
10329   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10330 /* end confdefs.h.  */
10331 #include <sys/types.h>
10332            #include <sys/stat.h>
10333            #if HAVE_UNISTD_H
10334            # include <unistd.h>
10335            #else /* on Windows with MSVC */
10336            # include <io.h>
10337            # include <stdlib.h>
10338            # defined sleep(n) _sleep ((n) * 1000)
10339            #endif
10340            #include <fcntl.h>
10341            #ifndef O_NOATIME
10342             #define O_NOATIME 0
10343            #endif
10344            #ifndef O_NOFOLLOW
10345             #define O_NOFOLLOW 0
10346            #endif
10347            static int const constants[] =
10348             {
10349               O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
10350               O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
10351             };
10352
10353 int
10354 main ()
10355 {
10356
10357             int result = !constants;
10358             #if HAVE_SYMLINK
10359             {
10360               static char const sym[] = "conftest.sym";
10361               if (symlink ("/dev/null", sym) != 0)
10362                 result |= 2;
10363               else
10364                 {
10365                   int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
10366                   if (fd >= 0)
10367                     {
10368                       close (fd);
10369                       result |= 4;
10370                     }
10371                 }
10372               if (unlink (sym) != 0 || symlink (".", sym) != 0)
10373                 result |= 2;
10374               else
10375                 {
10376                   int fd = open (sym, O_RDONLY | O_NOFOLLOW);
10377                   if (fd >= 0)
10378                     {
10379                       close (fd);
10380                       result |= 4;
10381                     }
10382                 }
10383               unlink (sym);
10384             }
10385             #endif
10386             {
10387               static char const file[] = "confdefs.h";
10388               int fd = open (file, O_RDONLY | O_NOATIME);
10389               if (fd < 0)
10390                 result |= 8;
10391               else
10392                 {
10393                   struct stat st0;
10394                   if (fstat (fd, &st0) != 0)
10395                     result |= 16;
10396                   else
10397                     {
10398                       char c;
10399                       sleep (1);
10400                       if (read (fd, &c, 1) != 1)
10401                         result |= 24;
10402                       else
10403                         {
10404                           if (close (fd) != 0)
10405                             result |= 32;
10406                           else
10407                             {
10408                               struct stat st1;
10409                               if (stat (file, &st1) != 0)
10410                                 result |= 40;
10411                               else
10412                                 if (st0.st_atime != st1.st_atime)
10413                                   result |= 64;
10414                             }
10415                         }
10416                     }
10417                 }
10418             }
10419             return result;
10420   ;
10421   return 0;
10422 }
10423 _ACEOF
10424 if ac_fn_c_try_run "$LINENO"; then :
10425   gl_cv_header_working_fcntl_h=yes
10426 else
10427   case $? in #(
10428         4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
10429         64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
10430         68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
10431          *) gl_cv_header_working_fcntl_h='no';;
10432         esac
10433 fi
10434 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10435   conftest.$ac_objext conftest.beam conftest.$ac_ext
10436 fi
10437
10438 fi
10439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
10440 $as_echo "$gl_cv_header_working_fcntl_h" >&6; }
10441
10442   case $gl_cv_header_working_fcntl_h in #(
10443   *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
10444   *) ac_val=1;;
10445   esac
10446
10447 cat >>confdefs.h <<_ACEOF
10448 #define HAVE_WORKING_O_NOATIME $ac_val
10449 _ACEOF
10450
10451
10452   case $gl_cv_header_working_fcntl_h in #(
10453   *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
10454   *) ac_val=1;;
10455   esac
10456
10457 cat >>confdefs.h <<_ACEOF
10458 #define HAVE_WORKING_O_NOFOLLOW $ac_val
10459 _ACEOF
10460
10461
10462
10463
10464
10465
10466    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
10467 $as_echo_n "checking for mbstate_t... " >&6; }
10468 if ${ac_cv_type_mbstate_t+:} false; then :
10469   $as_echo_n "(cached) " >&6
10470 else
10471   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10472 /* end confdefs.h.  */
10473 $ac_includes_default
10474 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
10475    <wchar.h>.
10476    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
10477    included before <wchar.h>.  */
10478 #include <stddef.h>
10479 #include <stdio.h>
10480 #include <time.h>
10481 #include <wchar.h>
10482 int
10483 main ()
10484 {
10485 mbstate_t x; return sizeof x;
10486   ;
10487   return 0;
10488 }
10489 _ACEOF
10490 if ac_fn_c_try_compile "$LINENO"; then :
10491   ac_cv_type_mbstate_t=yes
10492 else
10493   ac_cv_type_mbstate_t=no
10494 fi
10495 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10496 fi
10497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
10498 $as_echo "$ac_cv_type_mbstate_t" >&6; }
10499    if test $ac_cv_type_mbstate_t = yes; then
10500
10501 $as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
10502
10503    else
10504
10505 $as_echo "#define mbstate_t int" >>confdefs.h
10506
10507    fi
10508
10509
10510
10511
10512
10513
10514
10515
10516
10517
10518
10519
10520
10521
10522
10523
10524
10525
10526   GNULIB_DPRINTF=0;
10527   GNULIB_FCLOSE=0;
10528   GNULIB_FDOPEN=0;
10529   GNULIB_FFLUSH=0;
10530   GNULIB_FGETC=0;
10531   GNULIB_FGETS=0;
10532   GNULIB_FOPEN=0;
10533   GNULIB_FPRINTF=0;
10534   GNULIB_FPRINTF_POSIX=0;
10535   GNULIB_FPURGE=0;
10536   GNULIB_FPUTC=0;
10537   GNULIB_FPUTS=0;
10538   GNULIB_FREAD=0;
10539   GNULIB_FREOPEN=0;
10540   GNULIB_FSCANF=0;
10541   GNULIB_FSEEK=0;
10542   GNULIB_FSEEKO=0;
10543   GNULIB_FTELL=0;
10544   GNULIB_FTELLO=0;
10545   GNULIB_FWRITE=0;
10546   GNULIB_GETC=0;
10547   GNULIB_GETCHAR=0;
10548   GNULIB_GETDELIM=0;
10549   GNULIB_GETLINE=0;
10550   GNULIB_OBSTACK_PRINTF=0;
10551   GNULIB_OBSTACK_PRINTF_POSIX=0;
10552   GNULIB_PCLOSE=0;
10553   GNULIB_PERROR=0;
10554   GNULIB_POPEN=0;
10555   GNULIB_PRINTF=0;
10556   GNULIB_PRINTF_POSIX=0;
10557   GNULIB_PUTC=0;
10558   GNULIB_PUTCHAR=0;
10559   GNULIB_PUTS=0;
10560   GNULIB_REMOVE=0;
10561   GNULIB_RENAME=0;
10562   GNULIB_RENAMEAT=0;
10563   GNULIB_SCANF=0;
10564   GNULIB_SNPRINTF=0;
10565   GNULIB_SPRINTF_POSIX=0;
10566   GNULIB_STDIO_H_NONBLOCKING=0;
10567   GNULIB_STDIO_H_SIGPIPE=0;
10568   GNULIB_TMPFILE=0;
10569   GNULIB_VASPRINTF=0;
10570   GNULIB_VFSCANF=0;
10571   GNULIB_VSCANF=0;
10572   GNULIB_VDPRINTF=0;
10573   GNULIB_VFPRINTF=0;
10574   GNULIB_VFPRINTF_POSIX=0;
10575   GNULIB_VPRINTF=0;
10576   GNULIB_VPRINTF_POSIX=0;
10577   GNULIB_VSNPRINTF=0;
10578   GNULIB_VSPRINTF_POSIX=0;
10579     HAVE_DECL_FPURGE=1;
10580   HAVE_DECL_FSEEKO=1;
10581   HAVE_DECL_FTELLO=1;
10582   HAVE_DECL_GETDELIM=1;
10583   HAVE_DECL_GETLINE=1;
10584   HAVE_DECL_OBSTACK_PRINTF=1;
10585   HAVE_DECL_SNPRINTF=1;
10586   HAVE_DECL_VSNPRINTF=1;
10587   HAVE_DPRINTF=1;
10588   HAVE_FSEEKO=1;
10589   HAVE_FTELLO=1;
10590   HAVE_PCLOSE=1;
10591   HAVE_POPEN=1;
10592   HAVE_RENAMEAT=1;
10593   HAVE_VASPRINTF=1;
10594   HAVE_VDPRINTF=1;
10595   REPLACE_DPRINTF=0;
10596   REPLACE_FCLOSE=0;
10597   REPLACE_FDOPEN=0;
10598   REPLACE_FFLUSH=0;
10599   REPLACE_FOPEN=0;
10600   REPLACE_FPRINTF=0;
10601   REPLACE_FPURGE=0;
10602   REPLACE_FREOPEN=0;
10603   REPLACE_FSEEK=0;
10604   REPLACE_FSEEKO=0;
10605   REPLACE_FTELL=0;
10606   REPLACE_FTELLO=0;
10607   REPLACE_GETDELIM=0;
10608   REPLACE_GETLINE=0;
10609   REPLACE_OBSTACK_PRINTF=0;
10610   REPLACE_PERROR=0;
10611   REPLACE_POPEN=0;
10612   REPLACE_PRINTF=0;
10613   REPLACE_REMOVE=0;
10614   REPLACE_RENAME=0;
10615   REPLACE_RENAMEAT=0;
10616   REPLACE_SNPRINTF=0;
10617   REPLACE_SPRINTF=0;
10618   REPLACE_STDIO_READ_FUNCS=0;
10619   REPLACE_STDIO_WRITE_FUNCS=0;
10620   REPLACE_TMPFILE=0;
10621   REPLACE_VASPRINTF=0;
10622   REPLACE_VDPRINTF=0;
10623   REPLACE_VFPRINTF=0;
10624   REPLACE_VPRINTF=0;
10625   REPLACE_VSNPRINTF=0;
10626   REPLACE_VSPRINTF=0;
10627
10628
10629     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdin defaults to large file offsets" >&5
10630 $as_echo_n "checking whether stdin defaults to large file offsets... " >&6; }
10631 if ${gl_cv_var_stdin_large_offset+:} false; then :
10632   $as_echo_n "(cached) " >&6
10633 else
10634   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10635 /* end confdefs.h.  */
10636 #include <stdio.h>
10637 int
10638 main ()
10639 {
10640 #if defined __SL64 && defined __SCLE /* cygwin */
10641   /* Cygwin 1.5.24 and earlier fail to put stdin in 64-bit mode, making
10642      fseeko/ftello needlessly fail.  This bug was fixed in 1.5.25, and
10643      it is easier to do a version check than building a runtime test.  */
10644 # include <cygwin/version.h>
10645 # if CYGWIN_VERSION_DLL_COMBINED < CYGWIN_VERSION_DLL_MAKE_COMBINED (1005, 25)
10646   choke me
10647 # endif
10648 #endif
10649   ;
10650   return 0;
10651 }
10652 _ACEOF
10653 if ac_fn_c_try_link "$LINENO"; then :
10654   gl_cv_var_stdin_large_offset=yes
10655 else
10656   gl_cv_var_stdin_large_offset=no
10657 fi
10658 rm -f core conftest.err conftest.$ac_objext \
10659     conftest$ac_exeext conftest.$ac_ext
10660 fi
10661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var_stdin_large_offset" >&5
10662 $as_echo "$gl_cv_var_stdin_large_offset" >&6; }
10663
10664
10665
10666
10667
10668   case "$host_os" in
10669     mingw*)
10670                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
10671 $as_echo_n "checking for 64-bit off_t... " >&6; }
10672 if ${gl_cv_type_off_t_64+:} false; then :
10673   $as_echo_n "(cached) " >&6
10674 else
10675   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10676 /* end confdefs.h.  */
10677 #include <sys/types.h>
10678                 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
10679
10680 int
10681 main ()
10682 {
10683
10684   ;
10685   return 0;
10686 }
10687 _ACEOF
10688 if ac_fn_c_try_compile "$LINENO"; then :
10689   gl_cv_type_off_t_64=yes
10690 else
10691   gl_cv_type_off_t_64=no
10692 fi
10693 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10694
10695 fi
10696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
10697 $as_echo "$gl_cv_type_off_t_64" >&6; }
10698       if test $gl_cv_type_off_t_64 = no; then
10699         WINDOWS_64_BIT_OFF_T=1
10700       else
10701         WINDOWS_64_BIT_OFF_T=0
10702       fi
10703                   WINDOWS_64_BIT_ST_SIZE=1
10704       ;;
10705     *)
10706                                                       WINDOWS_64_BIT_OFF_T=0
10707       WINDOWS_64_BIT_ST_SIZE=0
10708       ;;
10709   esac
10710
10711
10712
10713
10714
10715
10716
10717
10718
10719
10720
10721
10722
10723
10724
10725
10726
10727      if test $gl_cv_have_include_next = yes; then
10728        gl_cv_next_sys_types_h='<'sys/types.h'>'
10729      else
10730        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
10731 $as_echo_n "checking absolute name of <sys/types.h>... " >&6; }
10732 if ${gl_cv_next_sys_types_h+:} false; then :
10733   $as_echo_n "(cached) " >&6
10734 else
10735
10736
10737
10738   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10739 /* end confdefs.h.  */
10740 #include <sys/types.h>
10741 _ACEOF
10742                 case "$host_os" in
10743     aix*) gl_absname_cpp="$ac_cpp -C" ;;
10744     *)    gl_absname_cpp="$ac_cpp" ;;
10745   esac
10746
10747   case "$host_os" in
10748     mingw*)
10749                                           gl_dirsep_regex='[/\\]'
10750       ;;
10751     *)
10752       gl_dirsep_regex='\/'
10753       ;;
10754   esac
10755       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
10756   gl_header_literal_regex=`echo 'sys/types.h' \
10757                            | sed -e "$gl_make_literal_regex_sed"`
10758   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10759       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10760       s|^/[^/]|//&|
10761       p
10762       q
10763     }'
10764
10765         gl_cv_absolute_sys_types_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10766   sed -n "$gl_absolute_header_sed"`
10767
10768            gl_header=$gl_cv_absolute_sys_types_h
10769            gl_cv_next_sys_types_h='"'$gl_header'"'
10770
10771
10772 fi
10773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
10774 $as_echo "$gl_cv_next_sys_types_h" >&6; }
10775      fi
10776      NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h
10777
10778      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10779        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10780        gl_next_as_first_directive='<'sys/types.h'>'
10781      else
10782        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10783        gl_next_as_first_directive=$gl_cv_next_sys_types_h
10784      fi
10785      NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
10786
10787
10788
10789
10790
10791
10792
10793
10794
10795
10796
10797 ac_fn_c_check_decl "$LINENO" "fseeko" "ac_cv_have_decl_fseeko" "$ac_includes_default"
10798 if test "x$ac_cv_have_decl_fseeko" = xyes; then :
10799   ac_have_decl=1
10800 else
10801   ac_have_decl=0
10802 fi
10803
10804 cat >>confdefs.h <<_ACEOF
10805 #define HAVE_DECL_FSEEKO $ac_have_decl
10806 _ACEOF
10807
10808
10809
10810
10811
10812
10813
10814
10815
10816   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fseeko" >&5
10817 $as_echo_n "checking for fseeko... " >&6; }
10818 if ${gl_cv_func_fseeko+:} false; then :
10819   $as_echo_n "(cached) " >&6
10820 else
10821
10822       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10823 /* end confdefs.h.  */
10824 #include <stdio.h>
10825
10826 int
10827 main ()
10828 {
10829 fseeko (stdin, 0, 0);
10830   ;
10831   return 0;
10832 }
10833 _ACEOF
10834 if ac_fn_c_try_link "$LINENO"; then :
10835   gl_cv_func_fseeko=yes
10836 else
10837   gl_cv_func_fseeko=no
10838 fi
10839 rm -f core conftest.err conftest.$ac_objext \
10840     conftest$ac_exeext conftest.$ac_ext
10841
10842 fi
10843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fseeko" >&5
10844 $as_echo "$gl_cv_func_fseeko" >&6; }
10845
10846
10847   if test $ac_cv_have_decl_fseeko = no; then
10848     HAVE_DECL_FSEEKO=0
10849   fi
10850
10851   if test $gl_cv_func_fseeko = no; then
10852     HAVE_FSEEKO=0
10853   else
10854     if test $WINDOWS_64_BIT_OFF_T = 1; then
10855       REPLACE_FSEEKO=1
10856     fi
10857     if test $gl_cv_var_stdin_large_offset = no; then
10858       REPLACE_FSEEKO=1
10859     fi
10860
10861   fi
10862
10863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
10864 $as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
10865 if ${ac_cv_header_stat_broken+:} false; then :
10866   $as_echo_n "(cached) " >&6
10867 else
10868   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10869 /* end confdefs.h.  */
10870 #include <sys/types.h>
10871 #include <sys/stat.h>
10872
10873 #if defined S_ISBLK && defined S_IFDIR
10874 extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
10875 #endif
10876
10877 #if defined S_ISBLK && defined S_IFCHR
10878 extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
10879 #endif
10880
10881 #if defined S_ISLNK && defined S_IFREG
10882 extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
10883 #endif
10884
10885 #if defined S_ISSOCK && defined S_IFREG
10886 extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
10887 #endif
10888
10889 _ACEOF
10890 if ac_fn_c_try_compile "$LINENO"; then :
10891   ac_cv_header_stat_broken=no
10892 else
10893   ac_cv_header_stat_broken=yes
10894 fi
10895 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10896 fi
10897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
10898 $as_echo "$ac_cv_header_stat_broken" >&6; }
10899 if test $ac_cv_header_stat_broken = yes; then
10900
10901 $as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
10902
10903 fi
10904
10905
10906
10907
10908
10909
10910
10911
10912
10913
10914
10915
10916
10917
10918
10919
10920
10921      if test $gl_cv_have_include_next = yes; then
10922        gl_cv_next_sys_stat_h='<'sys/stat.h'>'
10923      else
10924        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
10925 $as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
10926 if ${gl_cv_next_sys_stat_h+:} false; then :
10927   $as_echo_n "(cached) " >&6
10928 else
10929
10930              if test $ac_cv_header_sys_stat_h = yes; then
10931
10932
10933
10934
10935   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10936 /* end confdefs.h.  */
10937 #include <sys/stat.h>
10938 _ACEOF
10939                 case "$host_os" in
10940     aix*) gl_absname_cpp="$ac_cpp -C" ;;
10941     *)    gl_absname_cpp="$ac_cpp" ;;
10942   esac
10943
10944   case "$host_os" in
10945     mingw*)
10946                                           gl_dirsep_regex='[/\\]'
10947       ;;
10948     *)
10949       gl_dirsep_regex='\/'
10950       ;;
10951   esac
10952       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
10953   gl_header_literal_regex=`echo 'sys/stat.h' \
10954                            | sed -e "$gl_make_literal_regex_sed"`
10955   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10956       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10957       s|^/[^/]|//&|
10958       p
10959       q
10960     }'
10961
10962         gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10963   sed -n "$gl_absolute_header_sed"`
10964
10965            gl_header=$gl_cv_absolute_sys_stat_h
10966            gl_cv_next_sys_stat_h='"'$gl_header'"'
10967           else
10968                gl_cv_next_sys_stat_h='<'sys/stat.h'>'
10969              fi
10970
10971
10972 fi
10973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
10974 $as_echo "$gl_cv_next_sys_stat_h" >&6; }
10975      fi
10976      NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
10977
10978      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10979        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10980        gl_next_as_first_directive='<'sys/stat.h'>'
10981      else
10982        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10983        gl_next_as_first_directive=$gl_cv_next_sys_stat_h
10984      fi
10985      NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
10986
10987
10988
10989
10990
10991
10992
10993
10994
10995
10996
10997   if test $WINDOWS_64_BIT_ST_SIZE = 1; then
10998
10999 $as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
11000
11001   fi
11002
11003       ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
11004      #include <sys/stat.h>
11005 "
11006 if test "x$ac_cv_type_nlink_t" = xyes; then :
11007
11008 else
11009
11010 $as_echo "#define nlink_t int" >>confdefs.h
11011
11012 fi
11013
11014
11015
11016     for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat     mknod mknodat stat utimensat; do
11017     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
11018     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
11019 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
11020 if eval \${$as_gl_Symbol+:} false; then :
11021   $as_echo_n "(cached) " >&6
11022 else
11023   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11024 /* end confdefs.h.  */
11025 #include <sys/stat.h>
11026
11027 int
11028 main ()
11029 {
11030 #undef $gl_func
11031   (void) $gl_func;
11032   ;
11033   return 0;
11034 }
11035 _ACEOF
11036 if ac_fn_c_try_compile "$LINENO"; then :
11037   eval "$as_gl_Symbol=yes"
11038 else
11039   eval "$as_gl_Symbol=no"
11040 fi
11041 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11042 fi
11043 eval ac_res=\$$as_gl_Symbol
11044                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11045 $as_echo "$ac_res" >&6; }
11046     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
11047   cat >>confdefs.h <<_ACEOF
11048 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
11049 _ACEOF
11050
11051                      eval ac_cv_have_decl_$gl_func=yes
11052 fi
11053       done
11054
11055
11056
11057       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
11058 $as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
11059 if ${gl_cv_func_lstat_dereferences_slashed_symlink+:} false; then :
11060   $as_echo_n "(cached) " >&6
11061 else
11062   rm -f conftest.sym conftest.file
11063      echo >conftest.file
11064      if test "$cross_compiling" = yes; then :
11065   case "$host_os" in
11066           *-gnu*)
11067             # Guess yes on glibc systems.
11068             gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
11069           *)
11070             # If we don't know, assume the worst.
11071             gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
11072         esac
11073
11074 else
11075   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11076 /* end confdefs.h.  */
11077 $ac_includes_default
11078 int
11079 main ()
11080 {
11081 struct stat sbuf;
11082             if (symlink ("conftest.file", "conftest.sym") != 0)
11083               return 1;
11084             /* Linux will dereference the symlink and fail, as required by
11085                POSIX.  That is better in the sense that it means we will not
11086                have to compile and use the lstat wrapper.  */
11087             return lstat ("conftest.sym/", &sbuf) == 0;
11088
11089   ;
11090   return 0;
11091 }
11092 _ACEOF
11093 if ac_fn_c_try_run "$LINENO"; then :
11094   gl_cv_func_lstat_dereferences_slashed_symlink=yes
11095 else
11096   gl_cv_func_lstat_dereferences_slashed_symlink=no
11097 fi
11098 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11099   conftest.$ac_objext conftest.beam conftest.$ac_ext
11100 fi
11101
11102      rm -f conftest.sym conftest.file
11103
11104 fi
11105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
11106 $as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
11107   case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
11108     *yes)
11109
11110 cat >>confdefs.h <<_ACEOF
11111 #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
11112 _ACEOF
11113
11114       ;;
11115   esac
11116
11117
11118
11119
11120
11121
11122
11123    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5
11124 $as_echo_n "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; }
11125 if ${gl_cv_func_getcwd_null+:} false; then :
11126   $as_echo_n "(cached) " >&6
11127 else
11128   if test "$cross_compiling" = yes; then :
11129   case "$host_os" in
11130                      # Guess yes on glibc systems.
11131             *-gnu*)  gl_cv_func_getcwd_null="guessing yes";;
11132                      # Guess yes on Cygwin.
11133             cygwin*) gl_cv_func_getcwd_null="guessing yes";;
11134                      # If we don't know, assume the worst.
11135             *)       gl_cv_func_getcwd_null="guessing no";;
11136           esac
11137
11138 else
11139   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11140 /* end confdefs.h.  */
11141
11142 #        if HAVE_UNISTD_H
11143 #         include <unistd.h>
11144 #        else /* on Windows with MSVC */
11145 #         include <direct.h>
11146 #        endif
11147 #        ifndef getcwd
11148          char *getcwd ();
11149 #        endif
11150
11151 int
11152 main ()
11153 {
11154
11155 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
11156 /* mingw cwd does not start with '/', but getcwd does allocate.
11157    However, mingw fails to honor non-zero size.  */
11158 #else
11159            if (chdir ("/") != 0)
11160              return 1;
11161            else
11162              {
11163                char *f = getcwd (NULL, 0);
11164                if (! f)
11165                  return 2;
11166                if (f[0] != '/')
11167                  return 3;
11168                if (f[1] != '\0')
11169                  return 4;
11170                return 0;
11171              }
11172 #endif
11173
11174   ;
11175   return 0;
11176 }
11177 _ACEOF
11178 if ac_fn_c_try_run "$LINENO"; then :
11179   gl_cv_func_getcwd_null=yes
11180 else
11181   gl_cv_func_getcwd_null=no
11182 fi
11183 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11184   conftest.$ac_objext conftest.beam conftest.$ac_ext
11185 fi
11186
11187 fi
11188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_null" >&5
11189 $as_echo "$gl_cv_func_getcwd_null" >&6; }
11190
11191
11192   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getcwd with POSIX signature" >&5
11193 $as_echo_n "checking for getcwd with POSIX signature... " >&6; }
11194 if ${gl_cv_func_getcwd_posix_signature+:} false; then :
11195   $as_echo_n "(cached) " >&6
11196 else
11197   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11198 /* end confdefs.h.  */
11199 #include <unistd.h>
11200 int
11201 main ()
11202 {
11203 extern
11204            #ifdef __cplusplus
11205            "C"
11206            #endif
11207            char *getcwd (char *, size_t);
11208
11209   ;
11210   return 0;
11211 }
11212
11213 _ACEOF
11214 if ac_fn_c_try_compile "$LINENO"; then :
11215   gl_cv_func_getcwd_posix_signature=yes
11216 else
11217   gl_cv_func_getcwd_posix_signature=no
11218 fi
11219 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11220
11221 fi
11222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_posix_signature" >&5
11223 $as_echo "$gl_cv_func_getcwd_posix_signature" >&6; }
11224
11225 ac_fn_c_check_decl "$LINENO" "getcwd" "ac_cv_have_decl_getcwd" "$ac_includes_default"
11226 if test "x$ac_cv_have_decl_getcwd" = xyes; then :
11227   ac_have_decl=1
11228 else
11229   ac_have_decl=0
11230 fi
11231
11232 cat >>confdefs.h <<_ACEOF
11233 #define HAVE_DECL_GETCWD $ac_have_decl
11234 _ACEOF
11235
11236 ac_fn_c_check_decl "$LINENO" "getdelim" "ac_cv_have_decl_getdelim" "$ac_includes_default"
11237 if test "x$ac_cv_have_decl_getdelim" = xyes; then :
11238   ac_have_decl=1
11239 else
11240   ac_have_decl=0
11241 fi
11242
11243 cat >>confdefs.h <<_ACEOF
11244 #define HAVE_DECL_GETDELIM $ac_have_decl
11245 _ACEOF
11246
11247
11248
11249
11250
11251 ac_fn_c_check_decl "$LINENO" "getdtablesize" "ac_cv_have_decl_getdtablesize" "$ac_includes_default"
11252 if test "x$ac_cv_have_decl_getdtablesize" = xyes; then :
11253   ac_have_decl=1
11254 else
11255   ac_have_decl=0
11256 fi
11257
11258 cat >>confdefs.h <<_ACEOF
11259 #define HAVE_DECL_GETDTABLESIZE $ac_have_decl
11260 _ACEOF
11261
11262 ac_fn_c_check_decl "$LINENO" "getline" "ac_cv_have_decl_getline" "$ac_includes_default"
11263 if test "x$ac_cv_have_decl_getline" = xyes; then :
11264   ac_have_decl=1
11265 else
11266   ac_have_decl=0
11267 fi
11268
11269 cat >>confdefs.h <<_ACEOF
11270 #define HAVE_DECL_GETLINE $ac_have_decl
11271 _ACEOF
11272
11273
11274
11275
11276
11277
11278
11279
11280
11281
11282
11283
11284
11285
11286
11287
11288      if test $gl_cv_have_include_next = yes; then
11289        gl_cv_next_getopt_h='<'getopt.h'>'
11290      else
11291        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5
11292 $as_echo_n "checking absolute name of <getopt.h>... " >&6; }
11293 if ${gl_cv_next_getopt_h+:} false; then :
11294   $as_echo_n "(cached) " >&6
11295 else
11296
11297              if test $ac_cv_header_getopt_h = yes; then
11298
11299
11300
11301
11302   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11303 /* end confdefs.h.  */
11304 #include <getopt.h>
11305 _ACEOF
11306                 case "$host_os" in
11307     aix*) gl_absname_cpp="$ac_cpp -C" ;;
11308     *)    gl_absname_cpp="$ac_cpp" ;;
11309   esac
11310
11311   case "$host_os" in
11312     mingw*)
11313                                           gl_dirsep_regex='[/\\]'
11314       ;;
11315     *)
11316       gl_dirsep_regex='\/'
11317       ;;
11318   esac
11319       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11320   gl_header_literal_regex=`echo 'getopt.h' \
11321                            | sed -e "$gl_make_literal_regex_sed"`
11322   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11323       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11324       s|^/[^/]|//&|
11325       p
11326       q
11327     }'
11328
11329         gl_cv_absolute_getopt_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11330   sed -n "$gl_absolute_header_sed"`
11331
11332            gl_header=$gl_cv_absolute_getopt_h
11333            gl_cv_next_getopt_h='"'$gl_header'"'
11334           else
11335                gl_cv_next_getopt_h='<'getopt.h'>'
11336              fi
11337
11338
11339 fi
11340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5
11341 $as_echo "$gl_cv_next_getopt_h" >&6; }
11342      fi
11343      NEXT_GETOPT_H=$gl_cv_next_getopt_h
11344
11345      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11346        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11347        gl_next_as_first_directive='<'getopt.h'>'
11348      else
11349        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11350        gl_next_as_first_directive=$gl_cv_next_getopt_h
11351      fi
11352      NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive
11353
11354
11355
11356
11357   if test $ac_cv_header_getopt_h = yes; then
11358     HAVE_GETOPT_H=1
11359   else
11360     HAVE_GETOPT_H=0
11361   fi
11362
11363
11364   gl_replace_getopt=
11365
11366     if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
11367     for ac_header in getopt.h
11368 do :
11369   ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
11370 if test "x$ac_cv_header_getopt_h" = xyes; then :
11371   cat >>confdefs.h <<_ACEOF
11372 #define HAVE_GETOPT_H 1
11373 _ACEOF
11374
11375 else
11376   gl_replace_getopt=yes
11377 fi
11378
11379 done
11380
11381   fi
11382
11383     if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
11384     for ac_func in getopt_long_only
11385 do :
11386   ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
11387 if test "x$ac_cv_func_getopt_long_only" = xyes; then :
11388   cat >>confdefs.h <<_ACEOF
11389 #define HAVE_GETOPT_LONG_ONLY 1
11390 _ACEOF
11391
11392 else
11393   gl_replace_getopt=yes
11394 fi
11395 done
11396
11397   fi
11398
11399           if test -z "$gl_replace_getopt"; then
11400     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5
11401 $as_echo_n "checking whether getopt is POSIX compatible... " >&6; }
11402 if ${gl_cv_func_getopt_posix+:} false; then :
11403   $as_echo_n "(cached) " >&6
11404 else
11405
11406                                                 if test $cross_compiling = no; then
11407                               if test "$cross_compiling" = yes; then :
11408   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11409 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11410 as_fn_error $? "cannot run test program while cross compiling
11411 See \`config.log' for more details" "$LINENO" 5; }
11412 else
11413   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11414 /* end confdefs.h.  */
11415
11416 #include <unistd.h>
11417 #include <stdlib.h>
11418 #include <string.h>
11419
11420 int
11421 main ()
11422 {
11423   static char program[] = "program";
11424   static char a[] = "-a";
11425   static char foo[] = "foo";
11426   static char bar[] = "bar";
11427   char *argv[] = { program, a, foo, bar, NULL };
11428   int c;
11429
11430   c = getopt (4, argv, "ab");
11431   if (!(c == 'a'))
11432     return 1;
11433   c = getopt (4, argv, "ab");
11434   if (!(c == -1))
11435     return 2;
11436   if (!(optind == 2))
11437     return 3;
11438   return 0;
11439 }
11440
11441 _ACEOF
11442 if ac_fn_c_try_run "$LINENO"; then :
11443   gl_cv_func_getopt_posix=maybe
11444 else
11445   gl_cv_func_getopt_posix=no
11446 fi
11447 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11448   conftest.$ac_objext conftest.beam conftest.$ac_ext
11449 fi
11450
11451           if test $gl_cv_func_getopt_posix = maybe; then
11452                                     if test "$cross_compiling" = yes; then :
11453   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11454 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11455 as_fn_error $? "cannot run test program while cross compiling
11456 See \`config.log' for more details" "$LINENO" 5; }
11457 else
11458   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11459 /* end confdefs.h.  */
11460
11461 #include <unistd.h>
11462 #include <stdlib.h>
11463 #include <string.h>
11464
11465 int
11466 main ()
11467 {
11468   static char program[] = "program";
11469   static char donald[] = "donald";
11470   static char p[] = "-p";
11471   static char billy[] = "billy";
11472   static char duck[] = "duck";
11473   static char a[] = "-a";
11474   static char bar[] = "bar";
11475   char *argv[] = { program, donald, p, billy, duck, a, bar, NULL };
11476   int c;
11477
11478   c = getopt (7, argv, "+abp:q:");
11479   if (!(c == -1))
11480     return 4;
11481   if (!(strcmp (argv[0], "program") == 0))
11482     return 5;
11483   if (!(strcmp (argv[1], "donald") == 0))
11484     return 6;
11485   if (!(strcmp (argv[2], "-p") == 0))
11486     return 7;
11487   if (!(strcmp (argv[3], "billy") == 0))
11488     return 8;
11489   if (!(strcmp (argv[4], "duck") == 0))
11490     return 9;
11491   if (!(strcmp (argv[5], "-a") == 0))
11492     return 10;
11493   if (!(strcmp (argv[6], "bar") == 0))
11494     return 11;
11495   if (!(optind == 1))
11496     return 12;
11497   return 0;
11498 }
11499
11500 _ACEOF
11501 if ac_fn_c_try_run "$LINENO"; then :
11502   gl_cv_func_getopt_posix=maybe
11503 else
11504   gl_cv_func_getopt_posix=no
11505 fi
11506 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11507   conftest.$ac_objext conftest.beam conftest.$ac_ext
11508 fi
11509
11510           fi
11511           if test $gl_cv_func_getopt_posix = maybe; then
11512                         if test "$cross_compiling" = yes; then :
11513   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11514 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11515 as_fn_error $? "cannot run test program while cross compiling
11516 See \`config.log' for more details" "$LINENO" 5; }
11517 else
11518   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11519 /* end confdefs.h.  */
11520
11521 #include <unistd.h>
11522 #include <stdlib.h>
11523 #include <string.h>
11524
11525 int
11526 main ()
11527 {
11528   static char program[] = "program";
11529   static char ab[] = "-ab";
11530   char *argv[3] = { program, ab, NULL };
11531   if (getopt (2, argv, "ab:") != 'a')
11532     return 13;
11533   if (getopt (2, argv, "ab:") != '?')
11534     return 14;
11535   if (optopt != 'b')
11536     return 15;
11537   if (optind != 2)
11538     return 16;
11539   return 0;
11540 }
11541
11542 _ACEOF
11543 if ac_fn_c_try_run "$LINENO"; then :
11544   gl_cv_func_getopt_posix=yes
11545 else
11546   gl_cv_func_getopt_posix=no
11547 fi
11548 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11549   conftest.$ac_objext conftest.beam conftest.$ac_ext
11550 fi
11551
11552           fi
11553         else
11554           case "$host_os" in
11555             darwin* | aix* | mingw*) gl_cv_func_getopt_posix="guessing no";;
11556             *)                       gl_cv_func_getopt_posix="guessing yes";;
11557           esac
11558         fi
11559
11560 fi
11561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5
11562 $as_echo "$gl_cv_func_getopt_posix" >&6; }
11563     case "$gl_cv_func_getopt_posix" in
11564       *no) gl_replace_getopt=yes ;;
11565     esac
11566   fi
11567
11568   if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
11569     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
11570 $as_echo_n "checking for working GNU getopt function... " >&6; }
11571 if ${gl_cv_func_getopt_gnu+:} false; then :
11572   $as_echo_n "(cached) " >&6
11573 else
11574   # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the
11575        # optstring is necessary for programs like m4 that have POSIX-mandated
11576        # semantics for supporting options interspersed with files.
11577        # Also, since getopt_long is a GNU extension, we require optind=0.
11578        # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT;
11579        # so take care to revert to the correct (non-)export state.
11580        gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }'
11581        case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in
11582          xx) gl_had_POSIXLY_CORRECT=exported ;;
11583          x)  gl_had_POSIXLY_CORRECT=yes      ;;
11584          *)  gl_had_POSIXLY_CORRECT=         ;;
11585        esac
11586        POSIXLY_CORRECT=1
11587        export POSIXLY_CORRECT
11588        if test "$cross_compiling" = yes; then :
11589            gl_cv_func_getopt_gnu="guessing no"
11590
11591 else
11592   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11593 /* end confdefs.h.  */
11594 #include <getopt.h>
11595                            #include <stddef.h>
11596                            #include <string.h>
11597
11598 #include <stdlib.h>
11599 #if defined __MACH__ && defined __APPLE__
11600 /* Avoid a crash on Mac OS X.  */
11601 #include <mach/mach.h>
11602 #include <mach/mach_error.h>
11603 #include <mach/thread_status.h>
11604 #include <mach/exception.h>
11605 #include <mach/task.h>
11606 #include <pthread.h>
11607 /* The exception port on which our thread listens.  */
11608 static mach_port_t our_exception_port;
11609 /* The main function of the thread listening for exceptions of type
11610    EXC_BAD_ACCESS.  */
11611 static void *
11612 mach_exception_thread (void *arg)
11613 {
11614   /* Buffer for a message to be received.  */
11615   struct {
11616     mach_msg_header_t head;
11617     mach_msg_body_t msgh_body;
11618     char data[1024];
11619   } msg;
11620   mach_msg_return_t retval;
11621   /* Wait for a message on the exception port.  */
11622   retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
11623                      our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
11624   if (retval != MACH_MSG_SUCCESS)
11625     abort ();
11626   exit (1);
11627 }
11628 static void
11629 nocrash_init (void)
11630 {
11631   mach_port_t self = mach_task_self ();
11632   /* Allocate a port on which the thread shall listen for exceptions.  */
11633   if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
11634       == KERN_SUCCESS) {
11635     /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html.  */
11636     if (mach_port_insert_right (self, our_exception_port, our_exception_port,
11637                                 MACH_MSG_TYPE_MAKE_SEND)
11638         == KERN_SUCCESS) {
11639       /* The exceptions we want to catch.  Only EXC_BAD_ACCESS is interesting
11640          for us.  */
11641       exception_mask_t mask = EXC_MASK_BAD_ACCESS;
11642       /* Create the thread listening on the exception port.  */
11643       pthread_attr_t attr;
11644       pthread_t thread;
11645       if (pthread_attr_init (&attr) == 0
11646           && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
11647           && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
11648         pthread_attr_destroy (&attr);
11649         /* Replace the exception port info for these exceptions with our own.
11650            Note that we replace the exception port for the entire task, not only
11651            for a particular thread.  This has the effect that when our exception
11652            port gets the message, the thread specific exception port has already
11653            been asked, and we don't need to bother about it.
11654            See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html.  */
11655         task_set_exception_ports (self, mask, our_exception_port,
11656                                   EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
11657       }
11658     }
11659   }
11660 }
11661 #elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
11662 /* Avoid a crash on native Windows.  */
11663 #define WIN32_LEAN_AND_MEAN
11664 #include <windows.h>
11665 #include <winerror.h>
11666 static LONG WINAPI
11667 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
11668 {
11669   switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
11670     {
11671     case EXCEPTION_ACCESS_VIOLATION:
11672     case EXCEPTION_IN_PAGE_ERROR:
11673     case EXCEPTION_STACK_OVERFLOW:
11674     case EXCEPTION_GUARD_PAGE:
11675     case EXCEPTION_PRIV_INSTRUCTION:
11676     case EXCEPTION_ILLEGAL_INSTRUCTION:
11677     case EXCEPTION_DATATYPE_MISALIGNMENT:
11678     case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
11679     case EXCEPTION_NONCONTINUABLE_EXCEPTION:
11680       exit (1);
11681     }
11682   return EXCEPTION_CONTINUE_SEARCH;
11683 }
11684 static void
11685 nocrash_init (void)
11686 {
11687   SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
11688 }
11689 #else
11690 /* Avoid a crash on POSIX systems.  */
11691 #include <signal.h>
11692 /* A POSIX signal handler.  */
11693 static void
11694 exception_handler (int sig)
11695 {
11696   exit (1);
11697 }
11698 static void
11699 nocrash_init (void)
11700 {
11701 #ifdef SIGSEGV
11702   signal (SIGSEGV, exception_handler);
11703 #endif
11704 #ifdef SIGBUS
11705   signal (SIGBUS, exception_handler);
11706 #endif
11707 }
11708 #endif
11709
11710
11711 int
11712 main ()
11713 {
11714
11715              int result = 0;
11716
11717              nocrash_init();
11718
11719              /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
11720                 and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
11721                 OSF/1 5.1, Solaris 10.  */
11722              {
11723                static char conftest[] = "conftest";
11724                static char plus[] = "-+";
11725                char *argv[3] = { conftest, plus, NULL };
11726                opterr = 0;
11727                if (getopt (2, argv, "+a") != '?')
11728                  result |= 1;
11729              }
11730              /* This code succeeds on glibc 2.8, mingw,
11731                 and fails on Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
11732                 IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x.  */
11733              {
11734                static char program[] = "program";
11735                static char p[] = "-p";
11736                static char foo[] = "foo";
11737                static char bar[] = "bar";
11738                char *argv[] = { program, p, foo, bar, NULL };
11739
11740                optind = 1;
11741                if (getopt (4, argv, "p::") != 'p')
11742                  result |= 2;
11743                else if (optarg != NULL)
11744                  result |= 4;
11745                else if (getopt (4, argv, "p::") != -1)
11746                  result |= 6;
11747                else if (optind != 2)
11748                  result |= 8;
11749              }
11750              /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0.  */
11751              {
11752                static char program[] = "program";
11753                static char foo[] = "foo";
11754                static char p[] = "-p";
11755                char *argv[] = { program, foo, p, NULL };
11756                optind = 0;
11757                if (getopt (3, argv, "-p") != 1)
11758                  result |= 16;
11759                else if (getopt (3, argv, "-p") != 'p')
11760                  result |= 16;
11761              }
11762              /* This code fails on glibc 2.11.  */
11763              {
11764                static char program[] = "program";
11765                static char b[] = "-b";
11766                static char a[] = "-a";
11767                char *argv[] = { program, b, a, NULL };
11768                optind = opterr = 0;
11769                if (getopt (3, argv, "+:a:b") != 'b')
11770                  result |= 32;
11771                else if (getopt (3, argv, "+:a:b") != ':')
11772                  result |= 32;
11773              }
11774              /* This code dumps core on glibc 2.14.  */
11775              {
11776                static char program[] = "program";
11777                static char w[] = "-W";
11778                static char dummy[] = "dummy";
11779                char *argv[] = { program, w, dummy, NULL };
11780                optind = opterr = 1;
11781                if (getopt (3, argv, "W;") != 'W')
11782                  result |= 64;
11783              }
11784              return result;
11785
11786   ;
11787   return 0;
11788 }
11789 _ACEOF
11790 if ac_fn_c_try_run "$LINENO"; then :
11791   gl_cv_func_getopt_gnu=yes
11792 else
11793   gl_cv_func_getopt_gnu=no
11794 fi
11795 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11796   conftest.$ac_objext conftest.beam conftest.$ac_ext
11797 fi
11798
11799        case $gl_had_POSIXLY_CORRECT in
11800          exported) ;;
11801          yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;;
11802          *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;;
11803        esac
11804
11805 fi
11806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5
11807 $as_echo "$gl_cv_func_getopt_gnu" >&6; }
11808     if test "$gl_cv_func_getopt_gnu" != yes; then
11809       gl_replace_getopt=yes
11810     else
11811       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt_long function" >&5
11812 $as_echo_n "checking for working GNU getopt_long function... " >&6; }
11813 if ${gl_cv_func_getopt_long_gnu+:} false; then :
11814   $as_echo_n "(cached) " >&6
11815 else
11816   if test "$cross_compiling" = yes; then :
11817               case "$host_os" in
11818               openbsd*) gl_cv_func_getopt_long_gnu="guessing no";;
11819               *)        gl_cv_func_getopt_long_gnu="guessing yes";;
11820             esac
11821
11822 else
11823   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11824 /* end confdefs.h.  */
11825 #include <getopt.h>
11826                 #include <stddef.h>
11827                 #include <string.h>
11828
11829 int
11830 main ()
11831 {
11832 static const struct option long_options[] =
11833                   {
11834                     { "xtremely-",no_argument,       NULL, 1003 },
11835                     { "xtra",     no_argument,       NULL, 1001 },
11836                     { "xtreme",   no_argument,       NULL, 1002 },
11837                     { "xtremely", no_argument,       NULL, 1003 },
11838                     { NULL,       0,                 NULL, 0 }
11839                   };
11840                 /* This code fails on OpenBSD 5.0.  */
11841                 {
11842                   static char program[] = "program";
11843                   static char xtremel[] = "--xtremel";
11844                   char *argv[] = { program, xtremel, NULL };
11845                   int option_index;
11846                   optind = 1; opterr = 0;
11847                   if (getopt_long (2, argv, "", long_options, &option_index) != 1003)
11848                     return 1;
11849                 }
11850                 return 0;
11851
11852   ;
11853   return 0;
11854 }
11855 _ACEOF
11856 if ac_fn_c_try_run "$LINENO"; then :
11857   gl_cv_func_getopt_long_gnu=yes
11858 else
11859   gl_cv_func_getopt_long_gnu=no
11860 fi
11861 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11862   conftest.$ac_objext conftest.beam conftest.$ac_ext
11863 fi
11864
11865
11866 fi
11867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_long_gnu" >&5
11868 $as_echo "$gl_cv_func_getopt_long_gnu" >&6; }
11869       case "$gl_cv_func_getopt_long_gnu" in
11870         *yes) ;;
11871         *) gl_replace_getopt=yes ;;
11872       esac
11873     fi
11874   fi
11875
11876
11877
11878
11879
11880
11881     REPLACE_GETOPT=1
11882
11883   if test $REPLACE_GETOPT = 1; then
11884
11885   GETOPT_H=getopt.h
11886
11887 $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
11888
11889
11890
11891   fi
11892
11893 ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default"
11894 if test "x$ac_cv_have_decl_getenv" = xyes; then :
11895   ac_have_decl=1
11896 else
11897   ac_have_decl=0
11898 fi
11899
11900 cat >>confdefs.h <<_ACEOF
11901 #define HAVE_DECL_GETENV $ac_have_decl
11902 _ACEOF
11903
11904 :
11905
11906
11907
11908
11909
11910   GNULIB_GETTIMEOFDAY=0;
11911     HAVE_GETTIMEOFDAY=1;
11912   HAVE_STRUCT_TIMEVAL=1;
11913   HAVE_SYS_TIME_H=1;
11914   HAVE_TIMEZONE_T=0;
11915   REPLACE_GETTIMEOFDAY=0;
11916   REPLACE_STRUCT_TIMEVAL=0;
11917
11918
11919
11920
11921
11922
11923
11924
11925
11926
11927
11928
11929
11930
11931      if test $gl_cv_have_include_next = yes; then
11932        gl_cv_next_sys_time_h='<'sys/time.h'>'
11933      else
11934        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
11935 $as_echo_n "checking absolute name of <sys/time.h>... " >&6; }
11936 if ${gl_cv_next_sys_time_h+:} false; then :
11937   $as_echo_n "(cached) " >&6
11938 else
11939
11940              if test $ac_cv_header_sys_time_h = yes; then
11941
11942
11943
11944
11945   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11946 /* end confdefs.h.  */
11947 #include <sys/time.h>
11948 _ACEOF
11949                 case "$host_os" in
11950     aix*) gl_absname_cpp="$ac_cpp -C" ;;
11951     *)    gl_absname_cpp="$ac_cpp" ;;
11952   esac
11953
11954   case "$host_os" in
11955     mingw*)
11956                                           gl_dirsep_regex='[/\\]'
11957       ;;
11958     *)
11959       gl_dirsep_regex='\/'
11960       ;;
11961   esac
11962       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11963   gl_header_literal_regex=`echo 'sys/time.h' \
11964                            | sed -e "$gl_make_literal_regex_sed"`
11965   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11966       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11967       s|^/[^/]|//&|
11968       p
11969       q
11970     }'
11971
11972         gl_cv_absolute_sys_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11973   sed -n "$gl_absolute_header_sed"`
11974
11975            gl_header=$gl_cv_absolute_sys_time_h
11976            gl_cv_next_sys_time_h='"'$gl_header'"'
11977           else
11978                gl_cv_next_sys_time_h='<'sys/time.h'>'
11979              fi
11980
11981
11982 fi
11983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
11984 $as_echo "$gl_cv_next_sys_time_h" >&6; }
11985      fi
11986      NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
11987
11988      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11989        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11990        gl_next_as_first_directive='<'sys/time.h'>'
11991      else
11992        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11993        gl_next_as_first_directive=$gl_cv_next_sys_time_h
11994      fi
11995      NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
11996
11997
11998
11999
12000
12001   if test $ac_cv_header_sys_time_h != yes; then
12002     HAVE_SYS_TIME_H=0
12003   fi
12004
12005
12006
12007
12008
12009   if test $ac_cv_header_sys_socket_h != yes; then
12010                     for ac_header in winsock2.h
12011 do :
12012   ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
12013 if test "x$ac_cv_header_winsock2_h" = xyes; then :
12014   cat >>confdefs.h <<_ACEOF
12015 #define HAVE_WINSOCK2_H 1
12016 _ACEOF
12017
12018 fi
12019
12020 done
12021
12022   fi
12023   if test "$ac_cv_header_winsock2_h" = yes; then
12024     HAVE_WINSOCK2_H=1
12025     UNISTD_H_HAVE_WINSOCK2_H=1
12026     SYS_IOCTL_H_HAVE_WINSOCK2_H=1
12027   else
12028     HAVE_WINSOCK2_H=0
12029   fi
12030
12031
12032   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
12033 $as_echo_n "checking for struct timeval... " >&6; }
12034 if ${gl_cv_sys_struct_timeval+:} false; then :
12035   $as_echo_n "(cached) " >&6
12036 else
12037   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12038 /* end confdefs.h.  */
12039 #if HAVE_SYS_TIME_H
12040              #include <sys/time.h>
12041             #endif
12042             #include <time.h>
12043             #if HAVE_WINSOCK2_H
12044             # include <winsock2.h>
12045             #endif
12046
12047 int
12048 main ()
12049 {
12050 static struct timeval x; x.tv_sec = x.tv_usec;
12051   ;
12052   return 0;
12053 }
12054 _ACEOF
12055 if ac_fn_c_try_compile "$LINENO"; then :
12056   gl_cv_sys_struct_timeval=yes
12057 else
12058   gl_cv_sys_struct_timeval=no
12059 fi
12060 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12061
12062 fi
12063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
12064 $as_echo "$gl_cv_sys_struct_timeval" >&6; }
12065   if test $gl_cv_sys_struct_timeval != yes; then
12066     HAVE_STRUCT_TIMEVAL=0
12067   else
12068                             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
12069 $as_echo_n "checking for wide-enough struct timeval.tv_sec member... " >&6; }
12070 if ${gl_cv_sys_struct_timeval_tv_sec+:} false; then :
12071   $as_echo_n "(cached) " >&6
12072 else
12073   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12074 /* end confdefs.h.  */
12075 #if HAVE_SYS_TIME_H
12076                #include <sys/time.h>
12077               #endif
12078               #include <time.h>
12079               #if HAVE_WINSOCK2_H
12080               # include <winsock2.h>
12081               #endif
12082
12083 int
12084 main ()
12085 {
12086 static struct timeval x;
12087               typedef int verify_tv_sec_type[
12088                 sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
12089               ];
12090
12091   ;
12092   return 0;
12093 }
12094 _ACEOF
12095 if ac_fn_c_try_compile "$LINENO"; then :
12096   gl_cv_sys_struct_timeval_tv_sec=yes
12097 else
12098   gl_cv_sys_struct_timeval_tv_sec=no
12099 fi
12100 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12101
12102 fi
12103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
12104 $as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
12105     if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
12106       REPLACE_STRUCT_TIMEVAL=1
12107     fi
12108   fi
12109
12110
12111     for gl_func in gettimeofday; do
12112     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
12113     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
12114 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
12115 if eval \${$as_gl_Symbol+:} false; then :
12116   $as_echo_n "(cached) " >&6
12117 else
12118   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12119 /* end confdefs.h.  */
12120
12121 #if HAVE_SYS_TIME_H
12122 # include <sys/time.h>
12123 #endif
12124 #include <time.h>
12125
12126 int
12127 main ()
12128 {
12129 #undef $gl_func
12130   (void) $gl_func;
12131   ;
12132   return 0;
12133 }
12134 _ACEOF
12135 if ac_fn_c_try_compile "$LINENO"; then :
12136   eval "$as_gl_Symbol=yes"
12137 else
12138   eval "$as_gl_Symbol=no"
12139 fi
12140 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12141 fi
12142 eval ac_res=\$$as_gl_Symbol
12143                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12144 $as_echo "$ac_res" >&6; }
12145     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
12146   cat >>confdefs.h <<_ACEOF
12147 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
12148 _ACEOF
12149
12150                      eval ac_cv_have_decl_$gl_func=yes
12151 fi
12152       done
12153
12154
12155
12156
12157
12158
12159   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
12160 $as_echo_n "checking for unsigned long long int... " >&6; }
12161 if ${ac_cv_type_unsigned_long_long_int+:} false; then :
12162   $as_echo_n "(cached) " >&6
12163 else
12164   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12165 /* end confdefs.h.  */
12166 unsigned long long int ull = 18446744073709551615ULL;
12167             typedef int a[(18446744073709551615ULL <= (unsigned long long int) -1
12168                            ? 1 : -1)];
12169            int i = 63;
12170 int
12171 main ()
12172 {
12173 unsigned long long int ullmax = 18446744073709551615ull;
12174             return (ull << 63 | ull >> 63 | ull << i | ull >> i
12175                     | ullmax / ull | ullmax % ull);
12176   ;
12177   return 0;
12178 }
12179 _ACEOF
12180 if ac_fn_c_try_link "$LINENO"; then :
12181   ac_cv_type_unsigned_long_long_int=yes
12182 else
12183   ac_cv_type_unsigned_long_long_int=no
12184 fi
12185 rm -f core conftest.err conftest.$ac_objext \
12186     conftest$ac_exeext conftest.$ac_ext
12187 fi
12188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
12189 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
12190   if test $ac_cv_type_unsigned_long_long_int = yes; then
12191
12192 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
12193
12194   fi
12195
12196
12197
12198   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
12199 $as_echo_n "checking for long long int... " >&6; }
12200 if ${ac_cv_type_long_long_int+:} false; then :
12201   $as_echo_n "(cached) " >&6
12202 else
12203   ac_cv_type_long_long_int=yes
12204       if test "x${ac_cv_prog_cc_c99-no}" = xno; then
12205         ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
12206         if test $ac_cv_type_long_long_int = yes; then
12207                                         if test "$cross_compiling" = yes; then :
12208   :
12209 else
12210   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12211 /* end confdefs.h.  */
12212 #include <limits.h>
12213                  #ifndef LLONG_MAX
12214                  # define HALF \
12215                           (1LL << (sizeof (long long int) * CHAR_BIT - 2))
12216                  # define LLONG_MAX (HALF - 1 + HALF)
12217                  #endif
12218 int
12219 main ()
12220 {
12221 long long int n = 1;
12222                  int i;
12223                  for (i = 0; ; i++)
12224                    {
12225                      long long int m = n << i;
12226                      if (m >> i != n)
12227                        return 1;
12228                      if (LLONG_MAX / 2 < m)
12229                        break;
12230                    }
12231                  return 0;
12232   ;
12233   return 0;
12234 }
12235 _ACEOF
12236 if ac_fn_c_try_run "$LINENO"; then :
12237
12238 else
12239   ac_cv_type_long_long_int=no
12240 fi
12241 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12242   conftest.$ac_objext conftest.beam conftest.$ac_ext
12243 fi
12244
12245         fi
12246       fi
12247 fi
12248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
12249 $as_echo "$ac_cv_type_long_long_int" >&6; }
12250   if test $ac_cv_type_long_long_int = yes; then
12251
12252 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
12253
12254   fi
12255
12256
12257
12258
12259
12260
12261     gl_cv_c_multiarch=no
12262   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12263 /* end confdefs.h.  */
12264 #ifndef __APPLE_CC__
12265          not a universal capable compiler
12266         #endif
12267         typedef int dummy;
12268
12269 _ACEOF
12270 if ac_fn_c_try_compile "$LINENO"; then :
12271
12272                arch=
12273      prev=
12274      for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
12275        if test -n "$prev"; then
12276          case $word in
12277            i?86 | x86_64 | ppc | ppc64)
12278              if test -z "$arch" || test "$arch" = "$word"; then
12279                arch="$word"
12280              else
12281                gl_cv_c_multiarch=yes
12282              fi
12283              ;;
12284          esac
12285          prev=
12286        else
12287          if test "x$word" = "x-arch"; then
12288            prev=arch
12289          fi
12290        fi
12291      done
12292
12293 fi
12294 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12295   if test $gl_cv_c_multiarch = yes; then
12296     APPLE_UNIVERSAL_BUILD=1
12297   else
12298     APPLE_UNIVERSAL_BUILD=0
12299   fi
12300
12301
12302
12303
12304
12305   if test $ac_cv_type_long_long_int = yes; then
12306     HAVE_LONG_LONG_INT=1
12307   else
12308     HAVE_LONG_LONG_INT=0
12309   fi
12310
12311
12312   if test $ac_cv_type_unsigned_long_long_int = yes; then
12313     HAVE_UNSIGNED_LONG_LONG_INT=1
12314   else
12315     HAVE_UNSIGNED_LONG_LONG_INT=0
12316   fi
12317
12318
12319
12320   if test $ac_cv_header_wchar_h = yes; then
12321     HAVE_WCHAR_H=1
12322   else
12323     HAVE_WCHAR_H=0
12324   fi
12325
12326
12327       if test $ac_cv_header_inttypes_h = yes; then
12328     HAVE_INTTYPES_H=1
12329   else
12330     HAVE_INTTYPES_H=0
12331   fi
12332
12333
12334       if test $ac_cv_header_sys_types_h = yes; then
12335     HAVE_SYS_TYPES_H=1
12336   else
12337     HAVE_SYS_TYPES_H=0
12338   fi
12339
12340
12341
12342
12343
12344
12345
12346
12347
12348
12349
12350      if test $gl_cv_have_include_next = yes; then
12351        gl_cv_next_stdint_h='<'stdint.h'>'
12352      else
12353        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
12354 $as_echo_n "checking absolute name of <stdint.h>... " >&6; }
12355 if ${gl_cv_next_stdint_h+:} false; then :
12356   $as_echo_n "(cached) " >&6
12357 else
12358
12359              if test $ac_cv_header_stdint_h = yes; then
12360
12361
12362
12363
12364   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12365 /* end confdefs.h.  */
12366 #include <stdint.h>
12367 _ACEOF
12368                 case "$host_os" in
12369     aix*) gl_absname_cpp="$ac_cpp -C" ;;
12370     *)    gl_absname_cpp="$ac_cpp" ;;
12371   esac
12372
12373   case "$host_os" in
12374     mingw*)
12375                                           gl_dirsep_regex='[/\\]'
12376       ;;
12377     *)
12378       gl_dirsep_regex='\/'
12379       ;;
12380   esac
12381       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12382   gl_header_literal_regex=`echo 'stdint.h' \
12383                            | sed -e "$gl_make_literal_regex_sed"`
12384   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12385       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12386       s|^/[^/]|//&|
12387       p
12388       q
12389     }'
12390
12391         gl_cv_absolute_stdint_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12392   sed -n "$gl_absolute_header_sed"`
12393
12394            gl_header=$gl_cv_absolute_stdint_h
12395            gl_cv_next_stdint_h='"'$gl_header'"'
12396           else
12397                gl_cv_next_stdint_h='<'stdint.h'>'
12398              fi
12399
12400
12401 fi
12402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
12403 $as_echo "$gl_cv_next_stdint_h" >&6; }
12404      fi
12405      NEXT_STDINT_H=$gl_cv_next_stdint_h
12406
12407      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12408        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12409        gl_next_as_first_directive='<'stdint.h'>'
12410      else
12411        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12412        gl_next_as_first_directive=$gl_cv_next_stdint_h
12413      fi
12414      NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
12415
12416
12417
12418
12419   if test $ac_cv_header_stdint_h = yes; then
12420     HAVE_STDINT_H=1
12421   else
12422     HAVE_STDINT_H=0
12423   fi
12424
12425
12426     if test $ac_cv_header_stdint_h = yes; then
12427     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
12428 $as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
12429 if ${gl_cv_header_working_stdint_h+:} false; then :
12430   $as_echo_n "(cached) " >&6
12431 else
12432   gl_cv_header_working_stdint_h=no
12433        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12434 /* end confdefs.h.  */
12435
12436
12437 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
12438 #include <stdint.h>
12439 /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>.  */
12440 #if !(defined WCHAR_MIN && defined WCHAR_MAX)
12441 #error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
12442 #endif
12443
12444
12445   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12446      included before <wchar.h>.  */
12447   #include <stddef.h>
12448   #include <signal.h>
12449   #if HAVE_WCHAR_H
12450   # include <stdio.h>
12451   # include <time.h>
12452   # include <wchar.h>
12453   #endif
12454
12455
12456 #ifdef INT8_MAX
12457 int8_t a1 = INT8_MAX;
12458 int8_t a1min = INT8_MIN;
12459 #endif
12460 #ifdef INT16_MAX
12461 int16_t a2 = INT16_MAX;
12462 int16_t a2min = INT16_MIN;
12463 #endif
12464 #ifdef INT32_MAX
12465 int32_t a3 = INT32_MAX;
12466 int32_t a3min = INT32_MIN;
12467 #endif
12468 #ifdef INT64_MAX
12469 int64_t a4 = INT64_MAX;
12470 int64_t a4min = INT64_MIN;
12471 #endif
12472 #ifdef UINT8_MAX
12473 uint8_t b1 = UINT8_MAX;
12474 #else
12475 typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
12476 #endif
12477 #ifdef UINT16_MAX
12478 uint16_t b2 = UINT16_MAX;
12479 #endif
12480 #ifdef UINT32_MAX
12481 uint32_t b3 = UINT32_MAX;
12482 #endif
12483 #ifdef UINT64_MAX
12484 uint64_t b4 = UINT64_MAX;
12485 #endif
12486 int_least8_t c1 = INT8_C (0x7f);
12487 int_least8_t c1max = INT_LEAST8_MAX;
12488 int_least8_t c1min = INT_LEAST8_MIN;
12489 int_least16_t c2 = INT16_C (0x7fff);
12490 int_least16_t c2max = INT_LEAST16_MAX;
12491 int_least16_t c2min = INT_LEAST16_MIN;
12492 int_least32_t c3 = INT32_C (0x7fffffff);
12493 int_least32_t c3max = INT_LEAST32_MAX;
12494 int_least32_t c3min = INT_LEAST32_MIN;
12495 int_least64_t c4 = INT64_C (0x7fffffffffffffff);
12496 int_least64_t c4max = INT_LEAST64_MAX;
12497 int_least64_t c4min = INT_LEAST64_MIN;
12498 uint_least8_t d1 = UINT8_C (0xff);
12499 uint_least8_t d1max = UINT_LEAST8_MAX;
12500 uint_least16_t d2 = UINT16_C (0xffff);
12501 uint_least16_t d2max = UINT_LEAST16_MAX;
12502 uint_least32_t d3 = UINT32_C (0xffffffff);
12503 uint_least32_t d3max = UINT_LEAST32_MAX;
12504 uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
12505 uint_least64_t d4max = UINT_LEAST64_MAX;
12506 int_fast8_t e1 = INT_FAST8_MAX;
12507 int_fast8_t e1min = INT_FAST8_MIN;
12508 int_fast16_t e2 = INT_FAST16_MAX;
12509 int_fast16_t e2min = INT_FAST16_MIN;
12510 int_fast32_t e3 = INT_FAST32_MAX;
12511 int_fast32_t e3min = INT_FAST32_MIN;
12512 int_fast64_t e4 = INT_FAST64_MAX;
12513 int_fast64_t e4min = INT_FAST64_MIN;
12514 uint_fast8_t f1 = UINT_FAST8_MAX;
12515 uint_fast16_t f2 = UINT_FAST16_MAX;
12516 uint_fast32_t f3 = UINT_FAST32_MAX;
12517 uint_fast64_t f4 = UINT_FAST64_MAX;
12518 #ifdef INTPTR_MAX
12519 intptr_t g = INTPTR_MAX;
12520 intptr_t gmin = INTPTR_MIN;
12521 #endif
12522 #ifdef UINTPTR_MAX
12523 uintptr_t h = UINTPTR_MAX;
12524 #endif
12525 intmax_t i = INTMAX_MAX;
12526 uintmax_t j = UINTMAX_MAX;
12527
12528 #include <limits.h> /* for CHAR_BIT */
12529 #define TYPE_MINIMUM(t) \
12530   ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
12531 #define TYPE_MAXIMUM(t) \
12532   ((t) ((t) 0 < (t) -1 \
12533         ? (t) -1 \
12534         : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
12535 struct s {
12536   int check_PTRDIFF:
12537       PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
12538       && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
12539       ? 1 : -1;
12540   /* Detect bug in FreeBSD 6.0 / ia64.  */
12541   int check_SIG_ATOMIC:
12542       SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
12543       && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
12544       ? 1 : -1;
12545   int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
12546   int check_WCHAR:
12547       WCHAR_MIN == TYPE_MINIMUM (wchar_t)
12548       && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
12549       ? 1 : -1;
12550   /* Detect bug in mingw.  */
12551   int check_WINT:
12552       WINT_MIN == TYPE_MINIMUM (wint_t)
12553       && WINT_MAX == TYPE_MAXIMUM (wint_t)
12554       ? 1 : -1;
12555
12556   /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others.  */
12557   int check_UINT8_C:
12558         (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
12559   int check_UINT16_C:
12560         (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
12561
12562   /* Detect bugs in OpenBSD 3.9 stdint.h.  */
12563 #ifdef UINT8_MAX
12564   int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
12565 #endif
12566 #ifdef UINT16_MAX
12567   int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
12568 #endif
12569 #ifdef UINT32_MAX
12570   int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
12571 #endif
12572 #ifdef UINT64_MAX
12573   int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
12574 #endif
12575   int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
12576   int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
12577   int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
12578   int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
12579   int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
12580   int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
12581   int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
12582   int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
12583   int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
12584   int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
12585   int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
12586 };
12587
12588 int
12589 main ()
12590 {
12591
12592   ;
12593   return 0;
12594 }
12595 _ACEOF
12596 if ac_fn_c_try_compile "$LINENO"; then :
12597                                                     if test "$cross_compiling" = yes; then :
12598                  gl_cv_header_working_stdint_h=yes
12599
12600 else
12601   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12602 /* end confdefs.h.  */
12603
12604
12605 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
12606 #include <stdint.h>
12607
12608
12609   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12610      included before <wchar.h>.  */
12611   #include <stddef.h>
12612   #include <signal.h>
12613   #if HAVE_WCHAR_H
12614   # include <stdio.h>
12615   # include <time.h>
12616   # include <wchar.h>
12617   #endif
12618
12619
12620 #include <stdio.h>
12621 #include <string.h>
12622 #define MVAL(macro) MVAL1(macro)
12623 #define MVAL1(expression) #expression
12624 static const char *macro_values[] =
12625   {
12626 #ifdef INT8_MAX
12627     MVAL (INT8_MAX),
12628 #endif
12629 #ifdef INT16_MAX
12630     MVAL (INT16_MAX),
12631 #endif
12632 #ifdef INT32_MAX
12633     MVAL (INT32_MAX),
12634 #endif
12635 #ifdef INT64_MAX
12636     MVAL (INT64_MAX),
12637 #endif
12638 #ifdef UINT8_MAX
12639     MVAL (UINT8_MAX),
12640 #endif
12641 #ifdef UINT16_MAX
12642     MVAL (UINT16_MAX),
12643 #endif
12644 #ifdef UINT32_MAX
12645     MVAL (UINT32_MAX),
12646 #endif
12647 #ifdef UINT64_MAX
12648     MVAL (UINT64_MAX),
12649 #endif
12650     NULL
12651   };
12652
12653 int
12654 main ()
12655 {
12656
12657   const char **mv;
12658   for (mv = macro_values; *mv != NULL; mv++)
12659     {
12660       const char *value = *mv;
12661       /* Test whether it looks like a cast expression.  */
12662       if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
12663           || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
12664           || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
12665           || strncmp (value, "((int)"/*)*/, 6) == 0
12666           || strncmp (value, "((signed short)"/*)*/, 15) == 0
12667           || strncmp (value, "((signed char)"/*)*/, 14) == 0)
12668         return mv - macro_values + 1;
12669     }
12670   return 0;
12671
12672   ;
12673   return 0;
12674 }
12675 _ACEOF
12676 if ac_fn_c_try_run "$LINENO"; then :
12677   gl_cv_header_working_stdint_h=yes
12678 fi
12679 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12680   conftest.$ac_objext conftest.beam conftest.$ac_ext
12681 fi
12682
12683
12684 fi
12685 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12686
12687 fi
12688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
12689 $as_echo "$gl_cv_header_working_stdint_h" >&6; }
12690   fi
12691   if test "$gl_cv_header_working_stdint_h" = yes; then
12692     STDINT_H=
12693   else
12694             for ac_header in sys/inttypes.h sys/bitypes.h
12695 do :
12696   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12697 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12698 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12699   cat >>confdefs.h <<_ACEOF
12700 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12701 _ACEOF
12702
12703 fi
12704
12705 done
12706
12707     if test $ac_cv_header_sys_inttypes_h = yes; then
12708       HAVE_SYS_INTTYPES_H=1
12709     else
12710       HAVE_SYS_INTTYPES_H=0
12711     fi
12712
12713     if test $ac_cv_header_sys_bitypes_h = yes; then
12714       HAVE_SYS_BITYPES_H=1
12715     else
12716       HAVE_SYS_BITYPES_H=0
12717     fi
12718
12719
12720
12721
12722   if test $APPLE_UNIVERSAL_BUILD = 0; then
12723
12724
12725   for gltype in ptrdiff_t size_t ; do
12726     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
12727 $as_echo_n "checking for bit size of $gltype... " >&6; }
12728 if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
12729   $as_echo_n "(cached) " >&6
12730 else
12731   if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result"        "
12732   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12733      included before <wchar.h>.  */
12734   #include <stddef.h>
12735   #include <signal.h>
12736   #if HAVE_WCHAR_H
12737   # include <stdio.h>
12738   # include <time.h>
12739   # include <wchar.h>
12740   #endif
12741
12742 #include <limits.h>"; then :
12743
12744 else
12745   result=unknown
12746 fi
12747
12748        eval gl_cv_bitsizeof_${gltype}=\$result
12749
12750 fi
12751 eval ac_res=\$gl_cv_bitsizeof_${gltype}
12752                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12753 $as_echo "$ac_res" >&6; }
12754     eval result=\$gl_cv_bitsizeof_${gltype}
12755     if test $result = unknown; then
12756                                                 result=0
12757     fi
12758     GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
12759     cat >>confdefs.h <<_ACEOF
12760 #define BITSIZEOF_${GLTYPE} $result
12761 _ACEOF
12762
12763     eval BITSIZEOF_${GLTYPE}=\$result
12764   done
12765
12766
12767   fi
12768
12769
12770   for gltype in sig_atomic_t wchar_t wint_t ; do
12771     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
12772 $as_echo_n "checking for bit size of $gltype... " >&6; }
12773 if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
12774   $as_echo_n "(cached) " >&6
12775 else
12776   if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result"        "
12777   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12778      included before <wchar.h>.  */
12779   #include <stddef.h>
12780   #include <signal.h>
12781   #if HAVE_WCHAR_H
12782   # include <stdio.h>
12783   # include <time.h>
12784   # include <wchar.h>
12785   #endif
12786
12787 #include <limits.h>"; then :
12788
12789 else
12790   result=unknown
12791 fi
12792
12793        eval gl_cv_bitsizeof_${gltype}=\$result
12794
12795 fi
12796 eval ac_res=\$gl_cv_bitsizeof_${gltype}
12797                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12798 $as_echo "$ac_res" >&6; }
12799     eval result=\$gl_cv_bitsizeof_${gltype}
12800     if test $result = unknown; then
12801                                                 result=0
12802     fi
12803     GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
12804     cat >>confdefs.h <<_ACEOF
12805 #define BITSIZEOF_${GLTYPE} $result
12806 _ACEOF
12807
12808     eval BITSIZEOF_${GLTYPE}=\$result
12809   done
12810
12811
12812
12813
12814   for gltype in sig_atomic_t wchar_t wint_t ; do
12815     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
12816 $as_echo_n "checking whether $gltype is signed... " >&6; }
12817 if eval \${gl_cv_type_${gltype}_signed+:} false; then :
12818   $as_echo_n "(cached) " >&6
12819 else
12820   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12821 /* end confdefs.h.  */
12822
12823   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12824      included before <wchar.h>.  */
12825   #include <stddef.h>
12826   #include <signal.h>
12827   #if HAVE_WCHAR_H
12828   # include <stdio.h>
12829   # include <time.h>
12830   # include <wchar.h>
12831   #endif
12832
12833             int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
12834 int
12835 main ()
12836 {
12837
12838   ;
12839   return 0;
12840 }
12841 _ACEOF
12842 if ac_fn_c_try_compile "$LINENO"; then :
12843   result=yes
12844 else
12845   result=no
12846 fi
12847 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12848        eval gl_cv_type_${gltype}_signed=\$result
12849
12850 fi
12851 eval ac_res=\$gl_cv_type_${gltype}_signed
12852                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12853 $as_echo "$ac_res" >&6; }
12854     eval result=\$gl_cv_type_${gltype}_signed
12855     GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
12856     if test "$result" = yes; then
12857       cat >>confdefs.h <<_ACEOF
12858 #define HAVE_SIGNED_${GLTYPE} 1
12859 _ACEOF
12860
12861       eval HAVE_SIGNED_${GLTYPE}=1
12862     else
12863       eval HAVE_SIGNED_${GLTYPE}=0
12864     fi
12865   done
12866
12867
12868   gl_cv_type_ptrdiff_t_signed=yes
12869   gl_cv_type_size_t_signed=no
12870   if test $APPLE_UNIVERSAL_BUILD = 0; then
12871
12872
12873   for gltype in ptrdiff_t size_t ; do
12874     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
12875 $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
12876 if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
12877   $as_echo_n "(cached) " >&6
12878 else
12879   eval gl_cv_type_${gltype}_suffix=no
12880        eval result=\$gl_cv_type_${gltype}_signed
12881        if test "$result" = yes; then
12882          glsufu=
12883        else
12884          glsufu=u
12885        fi
12886        for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
12887          case $glsuf in
12888            '')  gltype1='int';;
12889            l)   gltype1='long int';;
12890            ll)  gltype1='long long int';;
12891            i64) gltype1='__int64';;
12892            u)   gltype1='unsigned int';;
12893            ul)  gltype1='unsigned long int';;
12894            ull) gltype1='unsigned long long int';;
12895            ui64)gltype1='unsigned __int64';;
12896          esac
12897          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12898 /* end confdefs.h.  */
12899
12900   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12901      included before <wchar.h>.  */
12902   #include <stddef.h>
12903   #include <signal.h>
12904   #if HAVE_WCHAR_H
12905   # include <stdio.h>
12906   # include <time.h>
12907   # include <wchar.h>
12908   #endif
12909
12910               extern $gltype foo;
12911               extern $gltype1 foo;
12912 int
12913 main ()
12914 {
12915
12916   ;
12917   return 0;
12918 }
12919 _ACEOF
12920 if ac_fn_c_try_compile "$LINENO"; then :
12921   eval gl_cv_type_${gltype}_suffix=\$glsuf
12922 fi
12923 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12924          eval result=\$gl_cv_type_${gltype}_suffix
12925          test "$result" != no && break
12926        done
12927 fi
12928 eval ac_res=\$gl_cv_type_${gltype}_suffix
12929                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12930 $as_echo "$ac_res" >&6; }
12931     GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
12932     eval result=\$gl_cv_type_${gltype}_suffix
12933     test "$result" = no && result=
12934     eval ${GLTYPE}_SUFFIX=\$result
12935     cat >>confdefs.h <<_ACEOF
12936 #define ${GLTYPE}_SUFFIX $result
12937 _ACEOF
12938
12939   done
12940
12941
12942   fi
12943
12944
12945   for gltype in sig_atomic_t wchar_t wint_t ; do
12946     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
12947 $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
12948 if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
12949   $as_echo_n "(cached) " >&6
12950 else
12951   eval gl_cv_type_${gltype}_suffix=no
12952        eval result=\$gl_cv_type_${gltype}_signed
12953        if test "$result" = yes; then
12954          glsufu=
12955        else
12956          glsufu=u
12957        fi
12958        for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
12959          case $glsuf in
12960            '')  gltype1='int';;
12961            l)   gltype1='long int';;
12962            ll)  gltype1='long long int';;
12963            i64) gltype1='__int64';;
12964            u)   gltype1='unsigned int';;
12965            ul)  gltype1='unsigned long int';;
12966            ull) gltype1='unsigned long long int';;
12967            ui64)gltype1='unsigned __int64';;
12968          esac
12969          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12970 /* end confdefs.h.  */
12971
12972   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12973      included before <wchar.h>.  */
12974   #include <stddef.h>
12975   #include <signal.h>
12976   #if HAVE_WCHAR_H
12977   # include <stdio.h>
12978   # include <time.h>
12979   # include <wchar.h>
12980   #endif
12981
12982               extern $gltype foo;
12983               extern $gltype1 foo;
12984 int
12985 main ()
12986 {
12987
12988   ;
12989   return 0;
12990 }
12991 _ACEOF
12992 if ac_fn_c_try_compile "$LINENO"; then :
12993   eval gl_cv_type_${gltype}_suffix=\$glsuf
12994 fi
12995 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12996          eval result=\$gl_cv_type_${gltype}_suffix
12997          test "$result" != no && break
12998        done
12999 fi
13000 eval ac_res=\$gl_cv_type_${gltype}_suffix
13001                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13002 $as_echo "$ac_res" >&6; }
13003     GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
13004     eval result=\$gl_cv_type_${gltype}_suffix
13005     test "$result" = no && result=
13006     eval ${GLTYPE}_SUFFIX=\$result
13007     cat >>confdefs.h <<_ACEOF
13008 #define ${GLTYPE}_SUFFIX $result
13009 _ACEOF
13010
13011   done
13012
13013
13014
13015           if test $BITSIZEOF_WINT_T -lt 32; then
13016     BITSIZEOF_WINT_T=32
13017   fi
13018
13019     STDINT_H=stdint.h
13020   fi
13021
13022    if test -n "$STDINT_H"; then
13023   GL_GENERATE_STDINT_H_TRUE=
13024   GL_GENERATE_STDINT_H_FALSE='#'
13025 else
13026   GL_GENERATE_STDINT_H_TRUE='#'
13027   GL_GENERATE_STDINT_H_FALSE=
13028 fi
13029
13030
13031
13032
13033
13034   GNULIB_IMAXABS=0;
13035   GNULIB_IMAXDIV=0;
13036   GNULIB_STRTOIMAX=0;
13037   GNULIB_STRTOUMAX=0;
13038     HAVE_DECL_IMAXABS=1;
13039   HAVE_DECL_IMAXDIV=1;
13040   HAVE_DECL_STRTOIMAX=1;
13041   HAVE_DECL_STRTOUMAX=1;
13042   REPLACE_STRTOIMAX=0;
13043   REPLACE_STRTOUMAX=0;
13044   INT32_MAX_LT_INTMAX_MAX=1;
13045   INT64_MAX_EQ_LONG_MAX='defined _LP64';
13046   PRI_MACROS_BROKEN=0;
13047   PRIPTR_PREFIX=__PRIPTR_PREFIX;
13048   UINT32_MAX_LT_UINTMAX_MAX=1;
13049   UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
13050
13051
13052
13053
13054
13055
13056
13057
13058
13059
13060
13061
13062
13063
13064
13065      if test $gl_cv_have_include_next = yes; then
13066        gl_cv_next_inttypes_h='<'inttypes.h'>'
13067      else
13068        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
13069 $as_echo_n "checking absolute name of <inttypes.h>... " >&6; }
13070 if ${gl_cv_next_inttypes_h+:} false; then :
13071   $as_echo_n "(cached) " >&6
13072 else
13073
13074              if test $ac_cv_header_inttypes_h = yes; then
13075
13076
13077
13078
13079   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13080 /* end confdefs.h.  */
13081 #include <inttypes.h>
13082 _ACEOF
13083                 case "$host_os" in
13084     aix*) gl_absname_cpp="$ac_cpp -C" ;;
13085     *)    gl_absname_cpp="$ac_cpp" ;;
13086   esac
13087
13088   case "$host_os" in
13089     mingw*)
13090                                           gl_dirsep_regex='[/\\]'
13091       ;;
13092     *)
13093       gl_dirsep_regex='\/'
13094       ;;
13095   esac
13096       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13097   gl_header_literal_regex=`echo 'inttypes.h' \
13098                            | sed -e "$gl_make_literal_regex_sed"`
13099   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13100       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13101       s|^/[^/]|//&|
13102       p
13103       q
13104     }'
13105
13106         gl_cv_absolute_inttypes_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13107   sed -n "$gl_absolute_header_sed"`
13108
13109            gl_header=$gl_cv_absolute_inttypes_h
13110            gl_cv_next_inttypes_h='"'$gl_header'"'
13111           else
13112                gl_cv_next_inttypes_h='<'inttypes.h'>'
13113              fi
13114
13115
13116 fi
13117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
13118 $as_echo "$gl_cv_next_inttypes_h" >&6; }
13119      fi
13120      NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
13121
13122      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13123        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13124        gl_next_as_first_directive='<'inttypes.h'>'
13125      else
13126        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13127        gl_next_as_first_directive=$gl_cv_next_inttypes_h
13128      fi
13129      NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
13130
13131
13132
13133
13134
13135
13136
13137
13138     for gl_func in imaxabs imaxdiv strtoimax strtoumax; do
13139     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
13140     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
13141 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
13142 if eval \${$as_gl_Symbol+:} false; then :
13143   $as_echo_n "(cached) " >&6
13144 else
13145   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13146 /* end confdefs.h.  */
13147 #include <inttypes.h>
13148
13149 int
13150 main ()
13151 {
13152 #undef $gl_func
13153   (void) $gl_func;
13154   ;
13155   return 0;
13156 }
13157 _ACEOF
13158 if ac_fn_c_try_compile "$LINENO"; then :
13159   eval "$as_gl_Symbol=yes"
13160 else
13161   eval "$as_gl_Symbol=no"
13162 fi
13163 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13164 fi
13165 eval ac_res=\$$as_gl_Symbol
13166                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13167 $as_echo "$ac_res" >&6; }
13168     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
13169   cat >>confdefs.h <<_ACEOF
13170 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
13171 _ACEOF
13172
13173                      eval ac_cv_have_decl_$gl_func=yes
13174 fi
13175       done
13176
13177
13178
13179   for ac_header in inttypes.h
13180 do :
13181   ac_fn_c_check_header_mongrel "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
13182 if test "x$ac_cv_header_inttypes_h" = xyes; then :
13183   cat >>confdefs.h <<_ACEOF
13184 #define HAVE_INTTYPES_H 1
13185 _ACEOF
13186
13187 fi
13188
13189 done
13190
13191   if test $ac_cv_header_inttypes_h = yes; then
13192     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the inttypes.h PRIxNN macros are broken" >&5
13193 $as_echo_n "checking whether the inttypes.h PRIxNN macros are broken... " >&6; }
13194 if ${gt_cv_inttypes_pri_broken+:} false; then :
13195   $as_echo_n "(cached) " >&6
13196 else
13197
13198         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13199 /* end confdefs.h.  */
13200
13201 #include <inttypes.h>
13202 #ifdef PRId32
13203 char *p = PRId32;
13204 #endif
13205
13206 int
13207 main ()
13208 {
13209
13210   ;
13211   return 0;
13212 }
13213 _ACEOF
13214 if ac_fn_c_try_compile "$LINENO"; then :
13215   gt_cv_inttypes_pri_broken=no
13216 else
13217   gt_cv_inttypes_pri_broken=yes
13218 fi
13219 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13220
13221 fi
13222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_inttypes_pri_broken" >&5
13223 $as_echo "$gt_cv_inttypes_pri_broken" >&6; }
13224   fi
13225   if test "$gt_cv_inttypes_pri_broken" = yes; then
13226
13227 cat >>confdefs.h <<_ACEOF
13228 #define PRI_MACROS_BROKEN 1
13229 _ACEOF
13230
13231     PRI_MACROS_BROKEN=1
13232   else
13233     PRI_MACROS_BROKEN=0
13234   fi
13235
13236
13237
13238   GNULIB_ISWBLANK=0;
13239   GNULIB_WCTYPE=0;
13240   GNULIB_ISWCTYPE=0;
13241   GNULIB_WCTRANS=0;
13242   GNULIB_TOWCTRANS=0;
13243     HAVE_ISWBLANK=1;
13244   HAVE_WCTYPE_T=1;
13245   HAVE_WCTRANS_T=1;
13246   REPLACE_ISWBLANK=0;
13247
13248
13249
13250
13251   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
13252 $as_echo_n "checking for wint_t... " >&6; }
13253 if ${gt_cv_c_wint_t+:} false; then :
13254   $as_echo_n "(cached) " >&6
13255 else
13256   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13257 /* end confdefs.h.  */
13258
13259 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
13260    <wchar.h>.
13261    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
13262    before <wchar.h>.  */
13263 #include <stddef.h>
13264 #include <stdio.h>
13265 #include <time.h>
13266 #include <wchar.h>
13267             wint_t foo = (wchar_t)'\0';
13268 int
13269 main ()
13270 {
13271
13272   ;
13273   return 0;
13274 }
13275 _ACEOF
13276 if ac_fn_c_try_compile "$LINENO"; then :
13277   gt_cv_c_wint_t=yes
13278 else
13279   gt_cv_c_wint_t=no
13280 fi
13281 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13282 fi
13283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
13284 $as_echo "$gt_cv_c_wint_t" >&6; }
13285   if test $gt_cv_c_wint_t = yes; then
13286
13287 $as_echo "#define HAVE_WINT_T 1" >>confdefs.h
13288
13289   fi
13290
13291
13292
13293
13294
13295
13296   if test $ac_cv_func_iswcntrl = yes; then
13297     HAVE_ISWCNTRL=1
13298   else
13299     HAVE_ISWCNTRL=0
13300   fi
13301
13302
13303
13304   if test $gt_cv_c_wint_t = yes; then
13305     HAVE_WINT_T=1
13306   else
13307     HAVE_WINT_T=0
13308   fi
13309
13310
13311
13312
13313
13314
13315
13316
13317
13318
13319
13320      if test $gl_cv_have_include_next = yes; then
13321        gl_cv_next_wctype_h='<'wctype.h'>'
13322      else
13323        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
13324 $as_echo_n "checking absolute name of <wctype.h>... " >&6; }
13325 if ${gl_cv_next_wctype_h+:} false; then :
13326   $as_echo_n "(cached) " >&6
13327 else
13328
13329              if test $ac_cv_header_wctype_h = yes; then
13330
13331
13332
13333
13334   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13335 /* end confdefs.h.  */
13336 #include <wctype.h>
13337 _ACEOF
13338                 case "$host_os" in
13339     aix*) gl_absname_cpp="$ac_cpp -C" ;;
13340     *)    gl_absname_cpp="$ac_cpp" ;;
13341   esac
13342
13343   case "$host_os" in
13344     mingw*)
13345                                           gl_dirsep_regex='[/\\]'
13346       ;;
13347     *)
13348       gl_dirsep_regex='\/'
13349       ;;
13350   esac
13351       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13352   gl_header_literal_regex=`echo 'wctype.h' \
13353                            | sed -e "$gl_make_literal_regex_sed"`
13354   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13355       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13356       s|^/[^/]|//&|
13357       p
13358       q
13359     }'
13360
13361         gl_cv_absolute_wctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13362   sed -n "$gl_absolute_header_sed"`
13363
13364            gl_header=$gl_cv_absolute_wctype_h
13365            gl_cv_next_wctype_h='"'$gl_header'"'
13366           else
13367                gl_cv_next_wctype_h='<'wctype.h'>'
13368              fi
13369
13370
13371 fi
13372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
13373 $as_echo "$gl_cv_next_wctype_h" >&6; }
13374      fi
13375      NEXT_WCTYPE_H=$gl_cv_next_wctype_h
13376
13377      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13378        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13379        gl_next_as_first_directive='<'wctype.h'>'
13380      else
13381        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13382        gl_next_as_first_directive=$gl_cv_next_wctype_h
13383      fi
13384      NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
13385
13386
13387
13388
13389   if test $ac_cv_header_wctype_h = yes; then
13390     if test $ac_cv_func_iswcntrl = yes; then
13391                   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
13392 $as_echo_n "checking whether iswcntrl works... " >&6; }
13393 if ${gl_cv_func_iswcntrl_works+:} false; then :
13394   $as_echo_n "(cached) " >&6
13395 else
13396
13397           if test "$cross_compiling" = yes; then :
13398   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13399 /* end confdefs.h.  */
13400 #include <stdlib.h>
13401                           #if __GNU_LIBRARY__ == 1
13402                           Linux libc5 i18n is broken.
13403                           #endif
13404 int
13405 main ()
13406 {
13407
13408   ;
13409   return 0;
13410 }
13411 _ACEOF
13412 if ac_fn_c_try_compile "$LINENO"; then :
13413   gl_cv_func_iswcntrl_works="guessing yes"
13414 else
13415   gl_cv_func_iswcntrl_works="guessing no"
13416 fi
13417 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13418
13419 else
13420   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13421 /* end confdefs.h.  */
13422
13423                /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
13424                   included before <wchar.h>.
13425                   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
13426                   must be included before <wchar.h>.  */
13427                #include <stddef.h>
13428                #include <stdio.h>
13429                #include <time.h>
13430                #include <wchar.h>
13431                #include <wctype.h>
13432                int main () { return iswprint ('x') == 0; }
13433
13434 _ACEOF
13435 if ac_fn_c_try_run "$LINENO"; then :
13436   gl_cv_func_iswcntrl_works=yes
13437 else
13438   gl_cv_func_iswcntrl_works=no
13439 fi
13440 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13441   conftest.$ac_objext conftest.beam conftest.$ac_ext
13442 fi
13443
13444
13445 fi
13446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
13447 $as_echo "$gl_cv_func_iswcntrl_works" >&6; }
13448     fi
13449     HAVE_WCTYPE_H=1
13450   else
13451     HAVE_WCTYPE_H=0
13452   fi
13453
13454
13455   case "$gl_cv_func_iswcntrl_works" in
13456     *yes) REPLACE_ISWCNTRL=0 ;;
13457     *)    REPLACE_ISWCNTRL=1 ;;
13458   esac
13459
13460
13461   if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
13462         :
13463   fi
13464
13465   if test $REPLACE_ISWCNTRL = 1; then
13466     REPLACE_TOWLOWER=1
13467   else
13468     for ac_func in towlower
13469 do :
13470   ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
13471 if test "x$ac_cv_func_towlower" = xyes; then :
13472   cat >>confdefs.h <<_ACEOF
13473 #define HAVE_TOWLOWER 1
13474 _ACEOF
13475
13476 fi
13477 done
13478
13479     if test $ac_cv_func_towlower = yes; then
13480       REPLACE_TOWLOWER=0
13481     else
13482       ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
13483              included before <wchar.h>.
13484              BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
13485              must be included before <wchar.h>.  */
13486           #include <stddef.h>
13487           #include <stdio.h>
13488           #include <time.h>
13489           #include <wchar.h>
13490           #if HAVE_WCTYPE_H
13491           # include <wctype.h>
13492           #endif
13493
13494 "
13495 if test "x$ac_cv_have_decl_towlower" = xyes; then :
13496   ac_have_decl=1
13497 else
13498   ac_have_decl=0
13499 fi
13500
13501 cat >>confdefs.h <<_ACEOF
13502 #define HAVE_DECL_TOWLOWER $ac_have_decl
13503 _ACEOF
13504
13505       if test $ac_cv_have_decl_towlower = yes; then
13506                                 REPLACE_TOWLOWER=1
13507       else
13508         REPLACE_TOWLOWER=0
13509       fi
13510     fi
13511   fi
13512
13513
13514   if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
13515         :
13516   fi
13517
13518           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
13519 $as_echo_n "checking for wctype_t... " >&6; }
13520 if ${gl_cv_type_wctype_t+:} false; then :
13521   $as_echo_n "(cached) " >&6
13522 else
13523   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13524 /* end confdefs.h.  */
13525 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
13526                included before <wchar.h>.
13527                BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
13528                must be included before <wchar.h>.  */
13529             #include <stddef.h>
13530             #include <stdio.h>
13531             #include <time.h>
13532             #include <wchar.h>
13533             #if HAVE_WCTYPE_H
13534             # include <wctype.h>
13535             #endif
13536             wctype_t a;
13537
13538 int
13539 main ()
13540 {
13541
13542   ;
13543   return 0;
13544 }
13545 _ACEOF
13546 if ac_fn_c_try_compile "$LINENO"; then :
13547   gl_cv_type_wctype_t=yes
13548 else
13549   gl_cv_type_wctype_t=no
13550 fi
13551 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13552
13553 fi
13554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
13555 $as_echo "$gl_cv_type_wctype_t" >&6; }
13556   if test $gl_cv_type_wctype_t = no; then
13557     HAVE_WCTYPE_T=0
13558   fi
13559
13560       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
13561 $as_echo_n "checking for wctrans_t... " >&6; }
13562 if ${gl_cv_type_wctrans_t+:} false; then :
13563   $as_echo_n "(cached) " >&6
13564 else
13565   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13566 /* end confdefs.h.  */
13567 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
13568                included before <wchar.h>.
13569                BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
13570                must be included before <wchar.h>.  */
13571             #include <stddef.h>
13572             #include <stdio.h>
13573             #include <time.h>
13574             #include <wchar.h>
13575             #include <wctype.h>
13576             wctrans_t a;
13577
13578 int
13579 main ()
13580 {
13581
13582   ;
13583   return 0;
13584 }
13585 _ACEOF
13586 if ac_fn_c_try_compile "$LINENO"; then :
13587   gl_cv_type_wctrans_t=yes
13588 else
13589   gl_cv_type_wctrans_t=no
13590 fi
13591 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13592
13593 fi
13594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
13595 $as_echo "$gl_cv_type_wctrans_t" >&6; }
13596   if test $gl_cv_type_wctrans_t = no; then
13597     HAVE_WCTRANS_T=0
13598   fi
13599
13600
13601     for gl_func in wctype iswctype wctrans towctrans     ; do
13602     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
13603     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
13604 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
13605 if eval \${$as_gl_Symbol+:} false; then :
13606   $as_echo_n "(cached) " >&6
13607 else
13608   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13609 /* end confdefs.h.  */
13610
13611 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
13612    <wchar.h>.
13613    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
13614    included before <wchar.h>.  */
13615 #if !(defined __GLIBC__ && !defined __UCLIBC__)
13616 # include <stddef.h>
13617 # include <stdio.h>
13618 # include <time.h>
13619 # include <wchar.h>
13620 #endif
13621 #include <wctype.h>
13622
13623 int
13624 main ()
13625 {
13626 #undef $gl_func
13627   (void) $gl_func;
13628   ;
13629   return 0;
13630 }
13631 _ACEOF
13632 if ac_fn_c_try_compile "$LINENO"; then :
13633   eval "$as_gl_Symbol=yes"
13634 else
13635   eval "$as_gl_Symbol=no"
13636 fi
13637 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13638 fi
13639 eval ac_res=\$$as_gl_Symbol
13640                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13641 $as_echo "$ac_res" >&6; }
13642     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
13643   cat >>confdefs.h <<_ACEOF
13644 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
13645 _ACEOF
13646
13647                      eval ac_cv_have_decl_$gl_func=yes
13648 fi
13649       done
13650
13651
13652
13653
13654
13655   GNULIB_NL_LANGINFO=0;
13656     HAVE_NL_LANGINFO=1;
13657   REPLACE_NL_LANGINFO=0;
13658
13659
13660
13661
13662
13663
13664
13665
13666
13667
13668
13669
13670   case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink in
13671   yes+*yes)
13672     ;;
13673   yes+*)
13674     # Solaris 9 has *at functions, but uniformly mishandles trailing
13675     # slash in all of them.
13676     REPLACE_OPENAT=1
13677     ;;
13678   *)
13679     HAVE_OPENAT=0
13680     ;;
13681   esac
13682
13683
13684
13685
13686     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library >= 2.1 or uClibc" >&5
13687 $as_echo_n "checking whether we are using the GNU C Library >= 2.1 or uClibc... " >&6; }
13688 if ${ac_cv_gnu_library_2_1+:} false; then :
13689   $as_echo_n "(cached) " >&6
13690 else
13691   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13692 /* end confdefs.h.  */
13693
13694 #include <features.h>
13695 #ifdef __GNU_LIBRARY__
13696  #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
13697   Lucky GNU user
13698  #endif
13699 #endif
13700 #ifdef __UCLIBC__
13701  Lucky user
13702 #endif
13703
13704 _ACEOF
13705 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13706   $EGREP "Lucky" >/dev/null 2>&1; then :
13707   ac_cv_gnu_library_2_1=yes
13708 else
13709   ac_cv_gnu_library_2_1=no
13710 fi
13711 rm -f conftest*
13712
13713
13714
13715 fi
13716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2_1" >&5
13717 $as_echo "$ac_cv_gnu_library_2_1" >&6; }
13718
13719     GLIBC21="$ac_cv_gnu_library_2_1"
13720
13721
13722
13723   GNULIB_LOCALECONV=0;
13724   GNULIB_SETLOCALE=0;
13725   GNULIB_DUPLOCALE=0;
13726     HAVE_DUPLOCALE=1;
13727   REPLACE_LOCALECONV=0;
13728   REPLACE_SETLOCALE=0;
13729   REPLACE_DUPLOCALE=0;
13730   REPLACE_STRUCT_LCONV=0;
13731
13732
13733     REPLACE_NULL=0;
13734   HAVE_MAX_ALIGN_T=1;
13735   HAVE_WCHAR_T=1;
13736
13737
13738   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
13739 $as_echo_n "checking for wchar_t... " >&6; }
13740 if ${gt_cv_c_wchar_t+:} false; then :
13741   $as_echo_n "(cached) " >&6
13742 else
13743   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13744 /* end confdefs.h.  */
13745 #include <stddef.h>
13746             wchar_t foo = (wchar_t)'\0';
13747 int
13748 main ()
13749 {
13750
13751   ;
13752   return 0;
13753 }
13754 _ACEOF
13755 if ac_fn_c_try_compile "$LINENO"; then :
13756   gt_cv_c_wchar_t=yes
13757 else
13758   gt_cv_c_wchar_t=no
13759 fi
13760 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13761 fi
13762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
13763 $as_echo "$gt_cv_c_wchar_t" >&6; }
13764   if test $gt_cv_c_wchar_t = yes; then
13765
13766 $as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
13767
13768   fi
13769
13770
13771
13772
13773   STDDEF_H=
13774   ac_fn_c_check_type "$LINENO" "max_align_t" "ac_cv_type_max_align_t" "#include <stddef.h>
13775
13776 "
13777 if test "x$ac_cv_type_max_align_t" = xyes; then :
13778
13779 else
13780   HAVE_MAX_ALIGN_T=0; STDDEF_H=stddef.h
13781 fi
13782
13783   if test $gt_cv_c_wchar_t = no; then
13784     HAVE_WCHAR_T=0
13785     STDDEF_H=stddef.h
13786   fi
13787   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
13788 $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
13789 if ${gl_cv_decl_null_works+:} false; then :
13790   $as_echo_n "(cached) " >&6
13791 else
13792   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13793 /* end confdefs.h.  */
13794 #include <stddef.h>
13795       int test[2 * (sizeof NULL == sizeof (void *)) -1];
13796
13797 int
13798 main ()
13799 {
13800
13801   ;
13802   return 0;
13803 }
13804 _ACEOF
13805 if ac_fn_c_try_compile "$LINENO"; then :
13806   gl_cv_decl_null_works=yes
13807 else
13808   gl_cv_decl_null_works=no
13809 fi
13810 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13811 fi
13812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
13813 $as_echo "$gl_cv_decl_null_works" >&6; }
13814   if test $gl_cv_decl_null_works = no; then
13815     REPLACE_NULL=1
13816     STDDEF_H=stddef.h
13817   fi
13818
13819    if test -n "$STDDEF_H"; then
13820   GL_GENERATE_STDDEF_H_TRUE=
13821   GL_GENERATE_STDDEF_H_FALSE='#'
13822 else
13823   GL_GENERATE_STDDEF_H_TRUE='#'
13824   GL_GENERATE_STDDEF_H_FALSE=
13825 fi
13826
13827   if test -n "$STDDEF_H"; then
13828
13829
13830
13831
13832
13833
13834
13835
13836      if test $gl_cv_have_include_next = yes; then
13837        gl_cv_next_stddef_h='<'stddef.h'>'
13838      else
13839        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
13840 $as_echo_n "checking absolute name of <stddef.h>... " >&6; }
13841 if ${gl_cv_next_stddef_h+:} false; then :
13842   $as_echo_n "(cached) " >&6
13843 else
13844
13845
13846
13847   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13848 /* end confdefs.h.  */
13849 #include <stddef.h>
13850 _ACEOF
13851                 case "$host_os" in
13852     aix*) gl_absname_cpp="$ac_cpp -C" ;;
13853     *)    gl_absname_cpp="$ac_cpp" ;;
13854   esac
13855
13856   case "$host_os" in
13857     mingw*)
13858                                           gl_dirsep_regex='[/\\]'
13859       ;;
13860     *)
13861       gl_dirsep_regex='\/'
13862       ;;
13863   esac
13864       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13865   gl_header_literal_regex=`echo 'stddef.h' \
13866                            | sed -e "$gl_make_literal_regex_sed"`
13867   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13868       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13869       s|^/[^/]|//&|
13870       p
13871       q
13872     }'
13873
13874         gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13875   sed -n "$gl_absolute_header_sed"`
13876
13877            gl_header=$gl_cv_absolute_stddef_h
13878            gl_cv_next_stddef_h='"'$gl_header'"'
13879
13880
13881 fi
13882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
13883 $as_echo "$gl_cv_next_stddef_h" >&6; }
13884      fi
13885      NEXT_STDDEF_H=$gl_cv_next_stddef_h
13886
13887      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13888        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13889        gl_next_as_first_directive='<'stddef.h'>'
13890      else
13891        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13892        gl_next_as_first_directive=$gl_cv_next_stddef_h
13893      fi
13894      NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
13895
13896
13897
13898
13899   fi
13900
13901
13902
13903
13904
13905
13906   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5
13907 $as_echo_n "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; }
13908 if ${gl_cv_func_malloc_posix+:} false; then :
13909   $as_echo_n "(cached) " >&6
13910 else
13911
13912                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13913 /* end confdefs.h.  */
13914
13915 int
13916 main ()
13917 {
13918 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
13919              choke me
13920              #endif
13921
13922   ;
13923   return 0;
13924 }
13925 _ACEOF
13926 if ac_fn_c_try_compile "$LINENO"; then :
13927   gl_cv_func_malloc_posix=yes
13928 else
13929   gl_cv_func_malloc_posix=no
13930 fi
13931 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13932
13933 fi
13934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
13935 $as_echo "$gl_cv_func_malloc_posix" >&6; }
13936
13937
13938
13939       for ac_header in stdlib.h
13940 do :
13941   ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
13942 if test "x$ac_cv_header_stdlib_h" = xyes; then :
13943   cat >>confdefs.h <<_ACEOF
13944 #define HAVE_STDLIB_H 1
13945 _ACEOF
13946
13947 fi
13948
13949 done
13950
13951   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
13952 $as_echo_n "checking for GNU libc compatible malloc... " >&6; }
13953 if ${ac_cv_func_malloc_0_nonnull+:} false; then :
13954   $as_echo_n "(cached) " >&6
13955 else
13956   if test "$cross_compiling" = yes; then :
13957   case "$host_os" in
13958           # Guess yes on platforms where we know the result.
13959           *-gnu* | freebsd* | netbsd* | openbsd* \
13960           | hpux* | solaris* | cygwin* | mingw*)
13961             ac_cv_func_malloc_0_nonnull=yes ;;
13962           # If we don't know, assume the worst.
13963           *) ac_cv_func_malloc_0_nonnull=no ;;
13964         esac
13965
13966 else
13967   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13968 /* end confdefs.h.  */
13969 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
13970             # include <stdlib.h>
13971             #else
13972             char *malloc ();
13973             #endif
13974
13975 int
13976 main ()
13977 {
13978 return ! malloc (0);
13979   ;
13980   return 0;
13981 }
13982
13983 _ACEOF
13984 if ac_fn_c_try_run "$LINENO"; then :
13985   ac_cv_func_malloc_0_nonnull=yes
13986 else
13987   ac_cv_func_malloc_0_nonnull=no
13988 fi
13989 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13990   conftest.$ac_objext conftest.beam conftest.$ac_ext
13991 fi
13992
13993
13994 fi
13995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
13996 $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
13997   if test $ac_cv_func_malloc_0_nonnull = yes; then :
13998   gl_cv_func_malloc_0_nonnull=1
13999 else
14000   gl_cv_func_malloc_0_nonnull=0
14001 fi
14002
14003
14004 cat >>confdefs.h <<_ACEOF
14005 #define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull
14006 _ACEOF
14007
14008
14009
14010
14011
14012
14013
14014
14015
14016   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
14017 $as_echo_n "checking for a traditional japanese locale... " >&6; }
14018 if ${gt_cv_locale_ja+:} false; then :
14019   $as_echo_n "(cached) " >&6
14020 else
14021
14022     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14023 /* end confdefs.h.  */
14024
14025 #include <locale.h>
14026 #include <time.h>
14027 #if HAVE_LANGINFO_CODESET
14028 # include <langinfo.h>
14029 #endif
14030 #include <stdlib.h>
14031 #include <string.h>
14032 struct tm t;
14033 char buf[16];
14034 int main ()
14035 {
14036   const char *p;
14037   /* Check whether the given locale name is recognized by the system.  */
14038 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
14039   /* On native Windows, setlocale(category, "") looks at the system settings,
14040      not at the environment variables.  Also, when an encoding suffix such
14041      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
14042      category of the locale to "C".  */
14043   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
14044       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
14045     return 1;
14046 #else
14047   if (setlocale (LC_ALL, "") == NULL) return 1;
14048 #endif
14049   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
14050      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
14051      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
14052      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
14053      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
14054      some unit tests fail.
14055      On MirBSD 10, when an unsupported locale is specified, setlocale()
14056      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
14057 #if HAVE_LANGINFO_CODESET
14058   {
14059     const char *cs = nl_langinfo (CODESET);
14060     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
14061         || strcmp (cs, "UTF-8") == 0)
14062       return 1;
14063   }
14064 #endif
14065 #ifdef __CYGWIN__
14066   /* On Cygwin, avoid locale names without encoding suffix, because the
14067      locale_charset() function relies on the encoding suffix.  Note that
14068      LC_ALL is set on the command line.  */
14069   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
14070 #endif
14071   /* Check whether MB_CUR_MAX is > 1.  This excludes the dysfunctional locales
14072      on Cygwin 1.5.x.  */
14073   if (MB_CUR_MAX == 1)
14074     return 1;
14075   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
14076      This excludes the UTF-8 encoding (except on MirBSD).  */
14077   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
14078   if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
14079   for (p = buf; *p != '\0'; p++)
14080     if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
14081       return 1;
14082   return 0;
14083 }
14084
14085 _ACEOF
14086     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14087   (eval $ac_link) 2>&5
14088   ac_status=$?
14089   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14090   test $ac_status = 0; } && test -s conftest$ac_exeext; then
14091       case "$host_os" in
14092         # Handle native Windows specially, because there setlocale() interprets
14093         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
14094         # "fr" or "fra" as "French" or "French_France.1252",
14095         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
14096         # "ja" as "Japanese" or "Japanese_Japan.932",
14097         # and similar.
14098         mingw*)
14099           # Note that on native Windows, the Japanese locale is
14100           # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
14101           # cannot use it here.
14102           gt_cv_locale_ja=none
14103           ;;
14104         *)
14105           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
14106           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
14107           # configure script would override the LC_ALL setting. Likewise for
14108           # LC_CTYPE, which is also set at the beginning of the configure script.
14109           # Test for the AIX locale name.
14110           if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14111             gt_cv_locale_ja=ja_JP
14112           else
14113             # Test for the locale name with explicit encoding suffix.
14114             if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14115               gt_cv_locale_ja=ja_JP.EUC-JP
14116             else
14117               # Test for the HP-UX, OSF/1, NetBSD locale name.
14118               if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14119                 gt_cv_locale_ja=ja_JP.eucJP
14120               else
14121                 # Test for the IRIX, FreeBSD locale name.
14122                 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14123                   gt_cv_locale_ja=ja_JP.EUC
14124                 else
14125                   # Test for the Solaris 7 locale name.
14126                   if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14127                     gt_cv_locale_ja=ja
14128                   else
14129                     # Special test for NetBSD 1.6.
14130                     if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
14131                       gt_cv_locale_ja=ja_JP.eucJP
14132                     else
14133                       # None found.
14134                       gt_cv_locale_ja=none
14135                     fi
14136                   fi
14137                 fi
14138               fi
14139             fi
14140           fi
14141           ;;
14142       esac
14143     fi
14144     rm -fr conftest*
14145
14146 fi
14147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
14148 $as_echo "$gt_cv_locale_ja" >&6; }
14149   LOCALE_JA=$gt_cv_locale_ja
14150
14151
14152
14153
14154
14155   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
14156 $as_echo_n "checking for a transitional chinese locale... " >&6; }
14157 if ${gt_cv_locale_zh_CN+:} false; then :
14158   $as_echo_n "(cached) " >&6
14159 else
14160
14161     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14162 /* end confdefs.h.  */
14163
14164 #include <locale.h>
14165 #include <stdlib.h>
14166 #include <time.h>
14167 #if HAVE_LANGINFO_CODESET
14168 # include <langinfo.h>
14169 #endif
14170 #include <stdlib.h>
14171 #include <string.h>
14172 struct tm t;
14173 char buf[16];
14174 int main ()
14175 {
14176   const char *p;
14177   /* Check whether the given locale name is recognized by the system.  */
14178 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
14179   /* On native Windows, setlocale(category, "") looks at the system settings,
14180      not at the environment variables.  Also, when an encoding suffix such
14181      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
14182      category of the locale to "C".  */
14183   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
14184       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
14185     return 1;
14186 #else
14187   if (setlocale (LC_ALL, "") == NULL) return 1;
14188 #endif
14189   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
14190      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
14191      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
14192      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
14193      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
14194      some unit tests fail.
14195      On MirBSD 10, when an unsupported locale is specified, setlocale()
14196      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
14197 #if HAVE_LANGINFO_CODESET
14198   {
14199     const char *cs = nl_langinfo (CODESET);
14200     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
14201         || strcmp (cs, "UTF-8") == 0)
14202       return 1;
14203   }
14204 #endif
14205 #ifdef __CYGWIN__
14206   /* On Cygwin, avoid locale names without encoding suffix, because the
14207      locale_charset() function relies on the encoding suffix.  Note that
14208      LC_ALL is set on the command line.  */
14209   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
14210 #endif
14211   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
14212      This excludes the UTF-8 encoding (except on MirBSD).  */
14213   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
14214   if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
14215   for (p = buf; *p != '\0'; p++)
14216     if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
14217       return 1;
14218   /* Check whether a typical GB18030 multibyte sequence is recognized as a
14219      single wide character.  This excludes the GB2312 and GBK encodings.  */
14220   if (mblen ("\203\062\332\066", 5) != 4)
14221     return 1;
14222   return 0;
14223 }
14224
14225 _ACEOF
14226     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14227   (eval $ac_link) 2>&5
14228   ac_status=$?
14229   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14230   test $ac_status = 0; } && test -s conftest$ac_exeext; then
14231       case "$host_os" in
14232         # Handle native Windows specially, because there setlocale() interprets
14233         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
14234         # "fr" or "fra" as "French" or "French_France.1252",
14235         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
14236         # "ja" as "Japanese" or "Japanese_Japan.932",
14237         # and similar.
14238         mingw*)
14239           # Test for the hypothetical native Windows locale name.
14240           if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14241             gt_cv_locale_zh_CN=Chinese_China.54936
14242           else
14243             # None found.
14244             gt_cv_locale_zh_CN=none
14245           fi
14246           ;;
14247         solaris2.8)
14248           # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
14249           # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
14250           # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
14251           gt_cv_locale_zh_CN=none
14252           ;;
14253         *)
14254           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
14255           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
14256           # configure script would override the LC_ALL setting. Likewise for
14257           # LC_CTYPE, which is also set at the beginning of the configure script.
14258           # Test for the locale name without encoding suffix.
14259           if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14260             gt_cv_locale_zh_CN=zh_CN
14261           else
14262             # Test for the locale name with explicit encoding suffix.
14263             if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14264               gt_cv_locale_zh_CN=zh_CN.GB18030
14265             else
14266               # None found.
14267               gt_cv_locale_zh_CN=none
14268             fi
14269           fi
14270           ;;
14271       esac
14272     else
14273       # If there was a link error, due to mblen(), the system is so old that
14274       # it certainly doesn't have a chinese locale.
14275       gt_cv_locale_zh_CN=none
14276     fi
14277     rm -fr conftest*
14278
14279 fi
14280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
14281 $as_echo "$gt_cv_locale_zh_CN" >&6; }
14282   LOCALE_ZH_CN=$gt_cv_locale_zh_CN
14283
14284
14285
14286
14287   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
14288 $as_echo_n "checking for a french Unicode locale... " >&6; }
14289 if ${gt_cv_locale_fr_utf8+:} false; then :
14290   $as_echo_n "(cached) " >&6
14291 else
14292
14293     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14294 /* end confdefs.h.  */
14295
14296 #include <locale.h>
14297 #include <time.h>
14298 #if HAVE_LANGINFO_CODESET
14299 # include <langinfo.h>
14300 #endif
14301 #include <stdlib.h>
14302 #include <string.h>
14303 struct tm t;
14304 char buf[16];
14305 int main () {
14306   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
14307      imitates locale dependent behaviour by looking at the environment
14308      variables, and all locales use the UTF-8 encoding.  */
14309 #if !(defined __BEOS__ || defined __HAIKU__)
14310   /* Check whether the given locale name is recognized by the system.  */
14311 # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
14312   /* On native Windows, setlocale(category, "") looks at the system settings,
14313      not at the environment variables.  Also, when an encoding suffix such
14314      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
14315      category of the locale to "C".  */
14316   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
14317       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
14318     return 1;
14319 # else
14320   if (setlocale (LC_ALL, "") == NULL) return 1;
14321 # endif
14322   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
14323      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
14324      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
14325      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
14326      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
14327      some unit tests fail.  */
14328 # if HAVE_LANGINFO_CODESET
14329   {
14330     const char *cs = nl_langinfo (CODESET);
14331     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
14332       return 1;
14333   }
14334 # endif
14335 # ifdef __CYGWIN__
14336   /* On Cygwin, avoid locale names without encoding suffix, because the
14337      locale_charset() function relies on the encoding suffix.  Note that
14338      LC_ALL is set on the command line.  */
14339   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
14340 # endif
14341   /* Check whether in the abbreviation of the second month, the second
14342      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
14343      two bytes long, with UTF-8 encoding.  */
14344   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
14345   if (strftime (buf, sizeof (buf), "%b", &t) < 4
14346       || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
14347     return 1;
14348 #endif
14349 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
14350   /* Check whether the decimal separator is a comma.
14351      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
14352      are nl_langinfo(RADIXCHAR) are both ".".  */
14353   if (localeconv () ->decimal_point[0] != ',') return 1;
14354 #endif
14355   return 0;
14356 }
14357
14358 _ACEOF
14359     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14360   (eval $ac_link) 2>&5
14361   ac_status=$?
14362   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14363   test $ac_status = 0; } && test -s conftest$ac_exeext; then
14364       case "$host_os" in
14365         # Handle native Windows specially, because there setlocale() interprets
14366         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
14367         # "fr" or "fra" as "French" or "French_France.1252",
14368         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
14369         # "ja" as "Japanese" or "Japanese_Japan.932",
14370         # and similar.
14371         mingw*)
14372           # Test for the hypothetical native Windows locale name.
14373           if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14374             gt_cv_locale_fr_utf8=French_France.65001
14375           else
14376             # None found.
14377             gt_cv_locale_fr_utf8=none
14378           fi
14379           ;;
14380         *)
14381           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
14382           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
14383           # configure script would override the LC_ALL setting. Likewise for
14384           # LC_CTYPE, which is also set at the beginning of the configure script.
14385           # Test for the usual locale name.
14386           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14387             gt_cv_locale_fr_utf8=fr_FR
14388           else
14389             # Test for the locale name with explicit encoding suffix.
14390             if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14391               gt_cv_locale_fr_utf8=fr_FR.UTF-8
14392             else
14393               # Test for the Solaris 7 locale name.
14394               if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14395                 gt_cv_locale_fr_utf8=fr.UTF-8
14396               else
14397                 # None found.
14398                 gt_cv_locale_fr_utf8=none
14399               fi
14400             fi
14401           fi
14402           ;;
14403       esac
14404     fi
14405     rm -fr conftest*
14406
14407 fi
14408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
14409 $as_echo "$gt_cv_locale_fr_utf8" >&6; }
14410   LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
14411
14412
14413
14414   GNULIB_FFSL=0;
14415   GNULIB_FFSLL=0;
14416   GNULIB_MEMCHR=0;
14417   GNULIB_MEMMEM=0;
14418   GNULIB_MEMPCPY=0;
14419   GNULIB_MEMRCHR=0;
14420   GNULIB_RAWMEMCHR=0;
14421   GNULIB_STPCPY=0;
14422   GNULIB_STPNCPY=0;
14423   GNULIB_STRCHRNUL=0;
14424   GNULIB_STRDUP=0;
14425   GNULIB_STRNCAT=0;
14426   GNULIB_STRNDUP=0;
14427   GNULIB_STRNLEN=0;
14428   GNULIB_STRPBRK=0;
14429   GNULIB_STRSEP=0;
14430   GNULIB_STRSTR=0;
14431   GNULIB_STRCASESTR=0;
14432   GNULIB_STRTOK_R=0;
14433   GNULIB_MBSLEN=0;
14434   GNULIB_MBSNLEN=0;
14435   GNULIB_MBSCHR=0;
14436   GNULIB_MBSRCHR=0;
14437   GNULIB_MBSSTR=0;
14438   GNULIB_MBSCASECMP=0;
14439   GNULIB_MBSNCASECMP=0;
14440   GNULIB_MBSPCASECMP=0;
14441   GNULIB_MBSCASESTR=0;
14442   GNULIB_MBSCSPN=0;
14443   GNULIB_MBSPBRK=0;
14444   GNULIB_MBSSPN=0;
14445   GNULIB_MBSSEP=0;
14446   GNULIB_MBSTOK_R=0;
14447   GNULIB_STRERROR=0;
14448   GNULIB_STRERROR_R=0;
14449   GNULIB_STRSIGNAL=0;
14450   GNULIB_STRVERSCMP=0;
14451   HAVE_MBSLEN=0;
14452     HAVE_FFSL=1;
14453   HAVE_FFSLL=1;
14454   HAVE_MEMCHR=1;
14455   HAVE_DECL_MEMMEM=1;
14456   HAVE_MEMPCPY=1;
14457   HAVE_DECL_MEMRCHR=1;
14458   HAVE_RAWMEMCHR=1;
14459   HAVE_STPCPY=1;
14460   HAVE_STPNCPY=1;
14461   HAVE_STRCHRNUL=1;
14462   HAVE_DECL_STRDUP=1;
14463   HAVE_DECL_STRNDUP=1;
14464   HAVE_DECL_STRNLEN=1;
14465   HAVE_STRPBRK=1;
14466   HAVE_STRSEP=1;
14467   HAVE_STRCASESTR=1;
14468   HAVE_DECL_STRTOK_R=1;
14469   HAVE_DECL_STRERROR_R=1;
14470   HAVE_DECL_STRSIGNAL=1;
14471   HAVE_STRVERSCMP=1;
14472   REPLACE_MEMCHR=0;
14473   REPLACE_MEMMEM=0;
14474   REPLACE_STPNCPY=0;
14475   REPLACE_STRDUP=0;
14476   REPLACE_STRSTR=0;
14477   REPLACE_STRCASESTR=0;
14478   REPLACE_STRCHRNUL=0;
14479   REPLACE_STRERROR=0;
14480   REPLACE_STRERROR_R=0;
14481   REPLACE_STRNCAT=0;
14482   REPLACE_STRNDUP=0;
14483   REPLACE_STRNLEN=0;
14484   REPLACE_STRSIGNAL=0;
14485   REPLACE_STRTOK_R=0;
14486   UNDEFINE_STRTOK_R=0;
14487
14488
14489
14490
14491
14492
14493
14494
14495
14496   # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
14497   # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
14498   # irrelevant for anonymous mappings.
14499   ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
14500 if test "x$ac_cv_func_mmap" = xyes; then :
14501   gl_have_mmap=yes
14502 else
14503   gl_have_mmap=no
14504 fi
14505
14506
14507   # Try to allow MAP_ANONYMOUS.
14508   gl_have_mmap_anonymous=no
14509   if test $gl_have_mmap = yes; then
14510     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
14511 $as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
14512     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14513 /* end confdefs.h.  */
14514
14515 #include <sys/mman.h>
14516 #ifdef MAP_ANONYMOUS
14517     I cannot identify this map
14518 #endif
14519
14520 _ACEOF
14521 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14522   $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
14523   gl_have_mmap_anonymous=yes
14524 fi
14525 rm -f conftest*
14526
14527     if test $gl_have_mmap_anonymous != yes; then
14528       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14529 /* end confdefs.h.  */
14530
14531 #include <sys/mman.h>
14532 #ifdef MAP_ANON
14533     I cannot identify this map
14534 #endif
14535
14536 _ACEOF
14537 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14538   $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
14539
14540 $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
14541
14542          gl_have_mmap_anonymous=yes
14543 fi
14544 rm -f conftest*
14545
14546     fi
14547     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
14548 $as_echo "$gl_have_mmap_anonymous" >&6; }
14549     if test $gl_have_mmap_anonymous = yes; then
14550
14551 $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
14552
14553     fi
14554   fi
14555
14556
14557
14558
14559
14560
14561   if test $HAVE_MEMCHR = 1; then
14562     # Detect platform-specific bugs in some versions of glibc:
14563     # memchr should not dereference anything with length 0
14564     #   http://bugzilla.redhat.com/499689
14565     # memchr should not dereference overestimated length after a match
14566     #   http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
14567     #   http://sourceware.org/bugzilla/show_bug.cgi?id=10162
14568     # Assume that memchr works on platforms that lack mprotect.
14569     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
14570 $as_echo_n "checking whether memchr works... " >&6; }
14571 if ${gl_cv_func_memchr_works+:} false; then :
14572   $as_echo_n "(cached) " >&6
14573 else
14574   if test "$cross_compiling" = yes; then :
14575          gl_cv_func_memchr_works="guessing no"
14576 else
14577   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14578 /* end confdefs.h.  */
14579
14580 #include <string.h>
14581 #if HAVE_SYS_MMAN_H
14582 # include <fcntl.h>
14583 # include <unistd.h>
14584 # include <sys/types.h>
14585 # include <sys/mman.h>
14586 # ifndef MAP_FILE
14587 #  define MAP_FILE 0
14588 # endif
14589 #endif
14590
14591 int
14592 main ()
14593 {
14594
14595   int result = 0;
14596   char *fence = NULL;
14597 #if HAVE_SYS_MMAN_H && HAVE_MPROTECT
14598 # if HAVE_MAP_ANONYMOUS
14599   const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
14600   const int fd = -1;
14601 # else /* !HAVE_MAP_ANONYMOUS */
14602   const int flags = MAP_FILE | MAP_PRIVATE;
14603   int fd = open ("/dev/zero", O_RDONLY, 0666);
14604   if (fd >= 0)
14605 # endif
14606     {
14607       int pagesize = getpagesize ();
14608       char *two_pages =
14609         (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
14610                        flags, fd, 0);
14611       if (two_pages != (char *)(-1)
14612           && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
14613         fence = two_pages + pagesize;
14614     }
14615 #endif
14616   if (fence)
14617     {
14618       if (memchr (fence, 0, 0))
14619         result |= 1;
14620       strcpy (fence - 9, "12345678");
14621       if (memchr (fence - 9, 0, 79) != fence - 1)
14622         result |= 2;
14623       if (memchr (fence - 1, 0, 3) != fence - 1)
14624         result |= 4;
14625     }
14626   return result;
14627
14628   ;
14629   return 0;
14630 }
14631 _ACEOF
14632 if ac_fn_c_try_run "$LINENO"; then :
14633   gl_cv_func_memchr_works=yes
14634 else
14635   gl_cv_func_memchr_works=no
14636 fi
14637 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14638   conftest.$ac_objext conftest.beam conftest.$ac_ext
14639 fi
14640
14641 fi
14642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
14643 $as_echo "$gl_cv_func_memchr_works" >&6; }
14644     if test "$gl_cv_func_memchr_works" != yes; then
14645       REPLACE_MEMCHR=1
14646     fi
14647   fi
14648
14649 ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default"
14650 if test "x$ac_cv_have_decl_memrchr" = xyes; then :
14651   ac_have_decl=1
14652 else
14653   ac_have_decl=0
14654 fi
14655
14656 cat >>confdefs.h <<_ACEOF
14657 #define HAVE_DECL_MEMRCHR $ac_have_decl
14658 _ACEOF
14659
14660
14661
14662
14663
14664
14665
14666
14667
14668
14669
14670
14671   GNULIB_MKTIME=0;
14672   GNULIB_NANOSLEEP=0;
14673   GNULIB_STRPTIME=0;
14674   GNULIB_TIMEGM=0;
14675   GNULIB_TIME_R=0;
14676   GNULIB_TIME_RZ=0;
14677     HAVE_DECL_LOCALTIME_R=1;
14678   HAVE_NANOSLEEP=1;
14679   HAVE_STRPTIME=1;
14680   HAVE_TIMEGM=1;
14681         REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
14682   REPLACE_MKTIME=GNULIB_PORTCHECK;
14683   REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
14684   REPLACE_TIMEGM=GNULIB_PORTCHECK;
14685
14686       : ${GNULIB_GETTIMEOFDAY=0};
14687         REPLACE_GMTIME=0;
14688   REPLACE_LOCALTIME=0;
14689
14690 ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
14691 if test "x$ac_cv_have_decl_alarm" = xyes; then :
14692   ac_have_decl=1
14693 else
14694   ac_have_decl=0
14695 fi
14696
14697 cat >>confdefs.h <<_ACEOF
14698 #define HAVE_DECL_ALARM $ac_have_decl
14699 _ACEOF
14700
14701
14702
14703
14704
14705   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
14706 $as_echo_n "checking for promoted mode_t type... " >&6; }
14707 if ${gl_cv_promoted_mode_t+:} false; then :
14708   $as_echo_n "(cached) " >&6
14709 else
14710
14711                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14712 /* end confdefs.h.  */
14713 #include <sys/types.h>
14714 int
14715 main ()
14716 {
14717 typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
14718   ;
14719   return 0;
14720 }
14721 _ACEOF
14722 if ac_fn_c_try_compile "$LINENO"; then :
14723   gl_cv_promoted_mode_t='int'
14724 else
14725   gl_cv_promoted_mode_t='mode_t'
14726 fi
14727 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14728
14729 fi
14730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
14731 $as_echo "$gl_cv_promoted_mode_t" >&6; }
14732
14733 cat >>confdefs.h <<_ACEOF
14734 #define PROMOTED_MODE_T $gl_cv_promoted_mode_t
14735 _ACEOF
14736
14737
14738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
14739 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
14740 if ${ac_cv_header_stdbool_h+:} false; then :
14741   $as_echo_n "(cached) " >&6
14742 else
14743   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14744 /* end confdefs.h.  */
14745
14746              #include <stdbool.h>
14747              #ifndef bool
14748               "error: bool is not defined"
14749              #endif
14750              #ifndef false
14751               "error: false is not defined"
14752              #endif
14753              #if false
14754               "error: false is not 0"
14755              #endif
14756              #ifndef true
14757               "error: true is not defined"
14758              #endif
14759              #if true != 1
14760               "error: true is not 1"
14761              #endif
14762              #ifndef __bool_true_false_are_defined
14763               "error: __bool_true_false_are_defined is not defined"
14764              #endif
14765
14766              struct s { _Bool s: 1; _Bool t; } s;
14767
14768              char a[true == 1 ? 1 : -1];
14769              char b[false == 0 ? 1 : -1];
14770              char c[__bool_true_false_are_defined == 1 ? 1 : -1];
14771              char d[(bool) 0.5 == true ? 1 : -1];
14772              /* See body of main program for 'e'.  */
14773              char f[(_Bool) 0.0 == false ? 1 : -1];
14774              char g[true];
14775              char h[sizeof (_Bool)];
14776              char i[sizeof s.t];
14777              enum { j = false, k = true, l = false * true, m = true * 256 };
14778              /* The following fails for
14779                 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
14780              _Bool n[m];
14781              char o[sizeof n == m * sizeof n[0] ? 1 : -1];
14782              char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
14783              /* Catch a bug in an HP-UX C compiler.  See
14784                 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
14785                 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
14786               */
14787              _Bool q = true;
14788              _Bool *pq = &q;
14789
14790 int
14791 main ()
14792 {
14793
14794              bool e = &s;
14795              *pq |= q;
14796              *pq |= ! q;
14797              /* Refer to every declared value, to avoid compiler optimizations.  */
14798              return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
14799                      + !m + !n + !o + !p + !q + !pq);
14800
14801   ;
14802   return 0;
14803 }
14804 _ACEOF
14805 if ac_fn_c_try_compile "$LINENO"; then :
14806   ac_cv_header_stdbool_h=yes
14807 else
14808   ac_cv_header_stdbool_h=no
14809 fi
14810 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14811 fi
14812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
14813 $as_echo "$ac_cv_header_stdbool_h" >&6; }
14814    ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
14815 if test "x$ac_cv_type__Bool" = xyes; then :
14816
14817 cat >>confdefs.h <<_ACEOF
14818 #define HAVE__BOOL 1
14819 _ACEOF
14820
14821
14822 fi
14823
14824
14825
14826
14827
14828   # Define two additional variables used in the Makefile substitution.
14829
14830   if test "$ac_cv_header_stdbool_h" = yes; then
14831     STDBOOL_H=''
14832   else
14833     STDBOOL_H='stdbool.h'
14834   fi
14835
14836    if test -n "$STDBOOL_H"; then
14837   GL_GENERATE_STDBOOL_H_TRUE=
14838   GL_GENERATE_STDBOOL_H_FALSE='#'
14839 else
14840   GL_GENERATE_STDBOOL_H_TRUE='#'
14841   GL_GENERATE_STDBOOL_H_FALSE=
14842 fi
14843
14844
14845   if test "$ac_cv_type__Bool" = yes; then
14846     HAVE__BOOL=1
14847   else
14848     HAVE__BOOL=0
14849   fi
14850
14851
14852
14853   # parse-datetime.y works with bison only.
14854   : ${YACC='bison -y'}
14855
14856
14857   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compound literals" >&5
14858 $as_echo_n "checking for compound literals... " >&6; }
14859 if ${gl_cv_compound_literals+:} false; then :
14860   $as_echo_n "(cached) " >&6
14861 else
14862   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14863 /* end confdefs.h.  */
14864 struct s { int i, j; };
14865 int
14866 main ()
14867 {
14868 struct s t = (struct s) { 3, 4 };
14869         if (t.i != 0) return 0;
14870   ;
14871   return 0;
14872 }
14873 _ACEOF
14874 if ac_fn_c_try_compile "$LINENO"; then :
14875   gl_cv_compound_literals=yes
14876 else
14877   gl_cv_compound_literals=no
14878 fi
14879 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14880 fi
14881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compound_literals" >&5
14882 $as_echo "$gl_cv_compound_literals" >&6; }
14883   if test $gl_cv_compound_literals = yes; then
14884
14885 $as_echo "#define HAVE_COMPOUND_LITERALS 1" >>confdefs.h
14886
14887   fi
14888
14889 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
14890 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
14891 if ${ac_cv_struct_tm+:} false; then :
14892   $as_echo_n "(cached) " >&6
14893 else
14894   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14895 /* end confdefs.h.  */
14896 #include <sys/types.h>
14897 #include <time.h>
14898
14899 int
14900 main ()
14901 {
14902 struct tm tm;
14903                                      int *p = &tm.tm_sec;
14904                                      return !p;
14905   ;
14906   return 0;
14907 }
14908 _ACEOF
14909 if ac_fn_c_try_compile "$LINENO"; then :
14910   ac_cv_struct_tm=time.h
14911 else
14912   ac_cv_struct_tm=sys/time.h
14913 fi
14914 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14915 fi
14916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
14917 $as_echo "$ac_cv_struct_tm" >&6; }
14918 if test $ac_cv_struct_tm = sys/time.h; then
14919
14920 $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
14921
14922 fi
14923
14924
14925  ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include <time.h>
14926 "
14927 if test "x$ac_cv_member_struct_tm_tm_gmtoff" = xyes; then :
14928
14929 $as_echo "#define HAVE_TM_GMTOFF 1" >>confdefs.h
14930
14931 fi
14932
14933
14934
14935
14936
14937   GNULIB_PTHREAD_SIGMASK=0;
14938   GNULIB_RAISE=0;
14939   GNULIB_SIGNAL_H_SIGPIPE=0;
14940   GNULIB_SIGPROCMASK=0;
14941   GNULIB_SIGACTION=0;
14942     HAVE_POSIX_SIGNALBLOCKING=1;
14943   HAVE_PTHREAD_SIGMASK=1;
14944   HAVE_RAISE=1;
14945   HAVE_SIGSET_T=1;
14946   HAVE_SIGINFO_T=1;
14947   HAVE_SIGACTION=1;
14948   HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
14949
14950   HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
14951
14952   HAVE_SIGHANDLER_T=1;
14953   REPLACE_PTHREAD_SIGMASK=0;
14954   REPLACE_RAISE=0;
14955
14956
14957
14958
14959
14960
14961
14962
14963
14964
14965
14966
14967 # Check whether --with-selinux was given.
14968 if test "${with_selinux+set}" = set; then :
14969   withval=$with_selinux;
14970 else
14971   with_selinux=maybe
14972 fi
14973
14974
14975   LIB_SELINUX=
14976   if test "$with_selinux" != no; then
14977     gl_save_LIBS=$LIBS
14978     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setfilecon" >&5
14979 $as_echo_n "checking for library containing setfilecon... " >&6; }
14980 if ${ac_cv_search_setfilecon+:} false; then :
14981   $as_echo_n "(cached) " >&6
14982 else
14983   ac_func_search_save_LIBS=$LIBS
14984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14985 /* end confdefs.h.  */
14986
14987 /* Override any GCC internal prototype to avoid an error.
14988    Use char because int might match the return type of a GCC
14989    builtin and then its argument prototype would still apply.  */
14990 #ifdef __cplusplus
14991 extern "C"
14992 #endif
14993 char setfilecon ();
14994 int
14995 main ()
14996 {
14997 return setfilecon ();
14998   ;
14999   return 0;
15000 }
15001 _ACEOF
15002 for ac_lib in '' selinux; do
15003   if test -z "$ac_lib"; then
15004     ac_res="none required"
15005   else
15006     ac_res=-l$ac_lib
15007     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
15008   fi
15009   if ac_fn_c_try_link "$LINENO"; then :
15010   ac_cv_search_setfilecon=$ac_res
15011 fi
15012 rm -f core conftest.err conftest.$ac_objext \
15013     conftest$ac_exeext
15014   if ${ac_cv_search_setfilecon+:} false; then :
15015   break
15016 fi
15017 done
15018 if ${ac_cv_search_setfilecon+:} false; then :
15019
15020 else
15021   ac_cv_search_setfilecon=no
15022 fi
15023 rm conftest.$ac_ext
15024 LIBS=$ac_func_search_save_LIBS
15025 fi
15026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setfilecon" >&5
15027 $as_echo "$ac_cv_search_setfilecon" >&6; }
15028 ac_res=$ac_cv_search_setfilecon
15029 if test "$ac_res" != no; then :
15030   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15031   test "$ac_cv_search_setfilecon" = "none required" ||
15032                     LIB_SELINUX=$ac_cv_search_setfilecon
15033 fi
15034
15035     LIBS=$gl_save_LIBS
15036   fi
15037
15038
15039   # Warn if SELinux is found but libselinux is absent;
15040   if test "$ac_cv_search_setfilecon" = no; then
15041     if test "$host" = "$build" && test -d /selinux; then
15042       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This system supports SELinux but libselinux is missing." >&5
15043 $as_echo "$as_me: WARNING: This system supports SELinux but libselinux is missing." >&2;}
15044       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GNU tar will be compiled without SELinux support." >&5
15045 $as_echo "$as_me: WARNING: GNU tar will be compiled without SELinux support." >&2;}
15046     fi
15047     with_selinux=no
15048   fi
15049
15050
15051
15052 ac_fn_c_check_decl "$LINENO" "setenv" "ac_cv_have_decl_setenv" "$ac_includes_default"
15053 if test "x$ac_cv_have_decl_setenv" = xyes; then :
15054   ac_have_decl=1
15055 else
15056   ac_have_decl=0
15057 fi
15058
15059 cat >>confdefs.h <<_ACEOF
15060 #define HAVE_DECL_SETENV $ac_have_decl
15061 _ACEOF
15062
15063
15064
15065
15066
15067
15068   if test $ac_cv_have_decl_setenv = no; then
15069     HAVE_DECL_SETENV=0
15070   fi
15071
15072
15073
15074
15075
15076   for ac_header in search.h
15077 do :
15078   ac_fn_c_check_header_mongrel "$LINENO" "search.h" "ac_cv_header_search_h" "$ac_includes_default"
15079 if test "x$ac_cv_header_search_h" = xyes; then :
15080   cat >>confdefs.h <<_ACEOF
15081 #define HAVE_SEARCH_H 1
15082 _ACEOF
15083
15084 fi
15085
15086 done
15087
15088   for ac_func in tsearch
15089 do :
15090   ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch"
15091 if test "x$ac_cv_func_tsearch" = xyes; then :
15092   cat >>confdefs.h <<_ACEOF
15093 #define HAVE_TSEARCH 1
15094 _ACEOF
15095
15096 fi
15097 done
15098
15099
15100
15101
15102   ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
15103       #include <signal.h>
15104       /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>.  */
15105       #include <sys/types.h>
15106
15107 "
15108 if test "x$ac_cv_type_sigset_t" = xyes; then :
15109
15110 cat >>confdefs.h <<_ACEOF
15111 #define HAVE_SIGSET_T 1
15112 _ACEOF
15113
15114 gl_cv_type_sigset_t=yes
15115 else
15116   gl_cv_type_sigset_t=no
15117 fi
15118
15119   if test $gl_cv_type_sigset_t != yes; then
15120     HAVE_SIGSET_T=0
15121   fi
15122
15123
15124
15125
15126
15127
15128
15129
15130
15131
15132
15133   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf returns a byte count as in C99" >&5
15134 $as_echo_n "checking whether snprintf returns a byte count as in C99... " >&6; }
15135 if ${gl_cv_func_snprintf_retval_c99+:} false; then :
15136   $as_echo_n "(cached) " >&6
15137 else
15138
15139       if test "$cross_compiling" = yes; then :
15140
15141          case "$host_os" in
15142                                  # Guess yes on glibc systems.
15143            *-gnu*)               gl_cv_func_snprintf_retval_c99="guessing yes";;
15144                                  # Guess yes on FreeBSD >= 5.
15145            freebsd[1-4].*)       gl_cv_func_snprintf_retval_c99="guessing no";;
15146            freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
15147                                  # Guess yes on Mac OS X >= 10.3.
15148            darwin[1-6].*)        gl_cv_func_snprintf_retval_c99="guessing no";;
15149            darwin*)              gl_cv_func_snprintf_retval_c99="guessing yes";;
15150                                  # Guess yes on OpenBSD >= 3.9.
15151            openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
15152                                  gl_cv_func_snprintf_retval_c99="guessing no";;
15153            openbsd*)             gl_cv_func_snprintf_retval_c99="guessing yes";;
15154                                  # Guess yes on Solaris >= 2.10.
15155            solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";;
15156            solaris*)             gl_cv_func_printf_sizes_c99="guessing no";;
15157                                  # Guess yes on AIX >= 4.
15158            aix[1-3]*)            gl_cv_func_snprintf_retval_c99="guessing no";;
15159            aix*)                 gl_cv_func_snprintf_retval_c99="guessing yes";;
15160                                  # Guess yes on NetBSD >= 3.
15161            netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
15162                                  gl_cv_func_snprintf_retval_c99="guessing no";;
15163            netbsd*)              gl_cv_func_snprintf_retval_c99="guessing yes";;
15164                                  # Guess yes on BeOS.
15165            beos*)                gl_cv_func_snprintf_retval_c99="guessing yes";;
15166                                  # If we don't know, assume the worst.
15167            *)                    gl_cv_func_snprintf_retval_c99="guessing no";;
15168          esac
15169
15170 else
15171   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15172 /* end confdefs.h.  */
15173
15174 #include <stdio.h>
15175 #include <string.h>
15176 #if HAVE_SNPRINTF
15177 # define my_snprintf snprintf
15178 #else
15179 # include <stdarg.h>
15180 static int my_snprintf (char *buf, int size, const char *format, ...)
15181 {
15182   va_list args;
15183   int ret;
15184   va_start (args, format);
15185   ret = vsnprintf (buf, size, format, args);
15186   va_end (args);
15187   return ret;
15188 }
15189 #endif
15190 static char buf[100];
15191 int main ()
15192 {
15193   strcpy (buf, "ABCDEF");
15194   if (my_snprintf (buf, 3, "%d %d", 4567, 89) != 7)
15195     return 1;
15196   if (my_snprintf (buf, 0, "%d %d", 4567, 89) != 7)
15197     return 2;
15198   if (my_snprintf (NULL, 0, "%d %d", 4567, 89) != 7)
15199     return 3;
15200   return 0;
15201 }
15202 _ACEOF
15203 if ac_fn_c_try_run "$LINENO"; then :
15204   gl_cv_func_snprintf_retval_c99=yes
15205 else
15206   gl_cv_func_snprintf_retval_c99=no
15207 fi
15208 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15209   conftest.$ac_objext conftest.beam conftest.$ac_ext
15210 fi
15211
15212
15213 fi
15214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_retval_c99" >&5
15215 $as_echo "$gl_cv_func_snprintf_retval_c99" >&6; }
15216
15217 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
15218 if test "x$ac_cv_have_decl_snprintf" = xyes; then :
15219   ac_have_decl=1
15220 else
15221   ac_have_decl=0
15222 fi
15223
15224 cat >>confdefs.h <<_ACEOF
15225 #define HAVE_DECL_SNPRINTF $ac_have_decl
15226 _ACEOF
15227
15228
15229   GNULIB_FFS=0;
15230     HAVE_FFS=1;
15231   HAVE_STRCASECMP=1;
15232   HAVE_DECL_STRNCASECMP=1;
15233
15234
15235
15236 ac_fn_c_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default"
15237 if test "x$ac_cv_have_decl_strdup" = xyes; then :
15238   ac_have_decl=1
15239 else
15240   ac_have_decl=0
15241 fi
15242
15243 cat >>confdefs.h <<_ACEOF
15244 #define HAVE_DECL_STRDUP $ac_have_decl
15245 _ACEOF
15246
15247
15248      REPLACE_STRERROR_0=0
15249   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5
15250 $as_echo_n "checking whether strerror(0) succeeds... " >&6; }
15251 if ${gl_cv_func_strerror_0_works+:} false; then :
15252   $as_echo_n "(cached) " >&6
15253 else
15254   if test "$cross_compiling" = yes; then :
15255   case "$host_os" in
15256                  # Guess yes on glibc systems.
15257          *-gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
15258                  # If we don't know, assume the worst.
15259          *)      gl_cv_func_strerror_0_works="guessing no" ;;
15260        esac
15261
15262 else
15263   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15264 /* end confdefs.h.  */
15265 #include <string.h>
15266            #include <errno.h>
15267
15268 int
15269 main ()
15270 {
15271 int result = 0;
15272            char *str;
15273            errno = 0;
15274            str = strerror (0);
15275            if (!*str) result |= 1;
15276            if (errno) result |= 2;
15277            if (strstr (str, "nknown") || strstr (str, "ndefined"))
15278              result |= 4;
15279            return result;
15280   ;
15281   return 0;
15282 }
15283 _ACEOF
15284 if ac_fn_c_try_run "$LINENO"; then :
15285   gl_cv_func_strerror_0_works=yes
15286 else
15287   gl_cv_func_strerror_0_works=no
15288 fi
15289 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15290   conftest.$ac_objext conftest.beam conftest.$ac_ext
15291 fi
15292
15293
15294 fi
15295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5
15296 $as_echo "$gl_cv_func_strerror_0_works" >&6; }
15297   case "$gl_cv_func_strerror_0_works" in
15298     *yes) ;;
15299     *)
15300       REPLACE_STRERROR_0=1
15301
15302 $as_echo "#define REPLACE_STRERROR_0 1" >>confdefs.h
15303
15304       ;;
15305   esac
15306
15307
15308
15309
15310
15311
15312
15313
15314
15315
15316
15317
15318
15319
15320      if test $gl_cv_have_include_next = yes; then
15321        gl_cv_next_string_h='<'string.h'>'
15322      else
15323        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
15324 $as_echo_n "checking absolute name of <string.h>... " >&6; }
15325 if ${gl_cv_next_string_h+:} false; then :
15326   $as_echo_n "(cached) " >&6
15327 else
15328
15329
15330
15331   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15332 /* end confdefs.h.  */
15333 #include <string.h>
15334 _ACEOF
15335                 case "$host_os" in
15336     aix*) gl_absname_cpp="$ac_cpp -C" ;;
15337     *)    gl_absname_cpp="$ac_cpp" ;;
15338   esac
15339
15340   case "$host_os" in
15341     mingw*)
15342                                           gl_dirsep_regex='[/\\]'
15343       ;;
15344     *)
15345       gl_dirsep_regex='\/'
15346       ;;
15347   esac
15348       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
15349   gl_header_literal_regex=`echo 'string.h' \
15350                            | sed -e "$gl_make_literal_regex_sed"`
15351   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
15352       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
15353       s|^/[^/]|//&|
15354       p
15355       q
15356     }'
15357
15358         gl_cv_absolute_string_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
15359   sed -n "$gl_absolute_header_sed"`
15360
15361            gl_header=$gl_cv_absolute_string_h
15362            gl_cv_next_string_h='"'$gl_header'"'
15363
15364
15365 fi
15366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
15367 $as_echo "$gl_cv_next_string_h" >&6; }
15368      fi
15369      NEXT_STRING_H=$gl_cv_next_string_h
15370
15371      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
15372        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
15373        gl_next_as_first_directive='<'string.h'>'
15374      else
15375        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
15376        gl_next_as_first_directive=$gl_cv_next_string_h
15377      fi
15378      NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
15379
15380
15381
15382
15383
15384
15385     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
15386     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
15387     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
15388 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
15389 if eval \${$as_gl_Symbol+:} false; then :
15390   $as_echo_n "(cached) " >&6
15391 else
15392   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15393 /* end confdefs.h.  */
15394 #include <string.h>
15395
15396 int
15397 main ()
15398 {
15399 #undef $gl_func
15400   (void) $gl_func;
15401   ;
15402   return 0;
15403 }
15404 _ACEOF
15405 if ac_fn_c_try_compile "$LINENO"; then :
15406   eval "$as_gl_Symbol=yes"
15407 else
15408   eval "$as_gl_Symbol=no"
15409 fi
15410 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15411 fi
15412 eval ac_res=\$$as_gl_Symbol
15413                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15414 $as_echo "$ac_res" >&6; }
15415     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
15416   cat >>confdefs.h <<_ACEOF
15417 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
15418 _ACEOF
15419
15420                      eval ac_cv_have_decl_$gl_func=yes
15421 fi
15422       done
15423
15424
15425
15426
15427
15428
15429
15430
15431
15432
15433
15434
15435
15436
15437
15438
15439      if test $gl_cv_have_include_next = yes; then
15440        gl_cv_next_strings_h='<'strings.h'>'
15441      else
15442        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <strings.h>" >&5
15443 $as_echo_n "checking absolute name of <strings.h>... " >&6; }
15444 if ${gl_cv_next_strings_h+:} false; then :
15445   $as_echo_n "(cached) " >&6
15446 else
15447
15448              if test $ac_cv_header_strings_h = yes; then
15449
15450
15451
15452
15453   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15454 /* end confdefs.h.  */
15455 #include <strings.h>
15456 _ACEOF
15457                 case "$host_os" in
15458     aix*) gl_absname_cpp="$ac_cpp -C" ;;
15459     *)    gl_absname_cpp="$ac_cpp" ;;
15460   esac
15461
15462   case "$host_os" in
15463     mingw*)
15464                                           gl_dirsep_regex='[/\\]'
15465       ;;
15466     *)
15467       gl_dirsep_regex='\/'
15468       ;;
15469   esac
15470       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
15471   gl_header_literal_regex=`echo 'strings.h' \
15472                            | sed -e "$gl_make_literal_regex_sed"`
15473   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
15474       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
15475       s|^/[^/]|//&|
15476       p
15477       q
15478     }'
15479
15480         gl_cv_absolute_strings_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
15481   sed -n "$gl_absolute_header_sed"`
15482
15483            gl_header=$gl_cv_absolute_strings_h
15484            gl_cv_next_strings_h='"'$gl_header'"'
15485           else
15486                gl_cv_next_strings_h='<'strings.h'>'
15487              fi
15488
15489
15490 fi
15491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_strings_h" >&5
15492 $as_echo "$gl_cv_next_strings_h" >&6; }
15493      fi
15494      NEXT_STRINGS_H=$gl_cv_next_strings_h
15495
15496      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
15497        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
15498        gl_next_as_first_directive='<'strings.h'>'
15499      else
15500        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
15501        gl_next_as_first_directive=$gl_cv_next_strings_h
15502      fi
15503      NEXT_AS_FIRST_DIRECTIVE_STRINGS_H=$gl_next_as_first_directive
15504
15505
15506
15507
15508   if test $ac_cv_header_strings_h = yes; then
15509     HAVE_STRINGS_H=1
15510   else
15511     HAVE_STRINGS_H=0
15512   fi
15513
15514
15515
15516     for gl_func in ffs strcasecmp strncasecmp; do
15517     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
15518     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
15519 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
15520 if eval \${$as_gl_Symbol+:} false; then :
15521   $as_echo_n "(cached) " >&6
15522 else
15523   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15524 /* end confdefs.h.  */
15525
15526     /* Minix 3.1.8 has a bug: <sys/types.h> must be included before
15527        <strings.h>.  */
15528     #include <sys/types.h>
15529     #include <strings.h>
15530
15531 int
15532 main ()
15533 {
15534 #undef $gl_func
15535   (void) $gl_func;
15536   ;
15537   return 0;
15538 }
15539 _ACEOF
15540 if ac_fn_c_try_compile "$LINENO"; then :
15541   eval "$as_gl_Symbol=yes"
15542 else
15543   eval "$as_gl_Symbol=no"
15544 fi
15545 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15546 fi
15547 eval ac_res=\$$as_gl_Symbol
15548                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15549 $as_echo "$ac_res" >&6; }
15550     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
15551   cat >>confdefs.h <<_ACEOF
15552 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
15553 _ACEOF
15554
15555                      eval ac_cv_have_decl_$gl_func=yes
15556 fi
15557       done
15558
15559
15560 ac_fn_c_check_decl "$LINENO" "strndup" "ac_cv_have_decl_strndup" "$ac_includes_default"
15561 if test "x$ac_cv_have_decl_strndup" = xyes; then :
15562   ac_have_decl=1
15563 else
15564   ac_have_decl=0
15565 fi
15566
15567 cat >>confdefs.h <<_ACEOF
15568 #define HAVE_DECL_STRNDUP $ac_have_decl
15569 _ACEOF
15570
15571
15572
15573 ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
15574 if test "x$ac_cv_have_decl_strnlen" = xyes; then :
15575   ac_have_decl=1
15576 else
15577   ac_have_decl=0
15578 fi
15579
15580 cat >>confdefs.h <<_ACEOF
15581 #define HAVE_DECL_STRNLEN $ac_have_decl
15582 _ACEOF
15583
15584
15585
15586 ac_fn_c_check_decl "$LINENO" "strtoimax" "ac_cv_have_decl_strtoimax" "$ac_includes_default"
15587 if test "x$ac_cv_have_decl_strtoimax" = xyes; then :
15588   ac_have_decl=1
15589 else
15590   ac_have_decl=0
15591 fi
15592
15593 cat >>confdefs.h <<_ACEOF
15594 #define HAVE_DECL_STRTOIMAX $ac_have_decl
15595 _ACEOF
15596
15597
15598
15599 ac_fn_c_check_decl "$LINENO" "strtoumax" "ac_cv_have_decl_strtoumax" "$ac_includes_default"
15600 if test "x$ac_cv_have_decl_strtoumax" = xyes; then :
15601   ac_have_decl=1
15602 else
15603   ac_have_decl=0
15604 fi
15605
15606 cat >>confdefs.h <<_ACEOF
15607 #define HAVE_DECL_STRTOUMAX $ac_have_decl
15608 _ACEOF
15609
15610
15611
15612
15613
15614
15615
15616   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
15617 $as_echo_n "checking for struct timespec in <time.h>... " >&6; }
15618 if ${gl_cv_sys_struct_timespec_in_time_h+:} false; then :
15619   $as_echo_n "(cached) " >&6
15620 else
15621   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15622 /* end confdefs.h.  */
15623 #include <time.h>
15624
15625 int
15626 main ()
15627 {
15628 static struct timespec x; x.tv_sec = x.tv_nsec;
15629   ;
15630   return 0;
15631 }
15632 _ACEOF
15633 if ac_fn_c_try_compile "$LINENO"; then :
15634   gl_cv_sys_struct_timespec_in_time_h=yes
15635 else
15636   gl_cv_sys_struct_timespec_in_time_h=no
15637 fi
15638 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15639 fi
15640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
15641 $as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
15642
15643   TIME_H_DEFINES_STRUCT_TIMESPEC=0
15644   SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
15645   PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
15646   UNISTD_H_DEFINES_STRUCT_TIMESPEC=0
15647   if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
15648     TIME_H_DEFINES_STRUCT_TIMESPEC=1
15649   else
15650     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
15651 $as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
15652 if ${gl_cv_sys_struct_timespec_in_sys_time_h+:} false; then :
15653   $as_echo_n "(cached) " >&6
15654 else
15655   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15656 /* end confdefs.h.  */
15657 #include <sys/time.h>
15658
15659 int
15660 main ()
15661 {
15662 static struct timespec x; x.tv_sec = x.tv_nsec;
15663   ;
15664   return 0;
15665 }
15666 _ACEOF
15667 if ac_fn_c_try_compile "$LINENO"; then :
15668   gl_cv_sys_struct_timespec_in_sys_time_h=yes
15669 else
15670   gl_cv_sys_struct_timespec_in_sys_time_h=no
15671 fi
15672 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15673 fi
15674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
15675 $as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
15676     if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
15677       SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
15678     else
15679       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
15680 $as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
15681 if ${gl_cv_sys_struct_timespec_in_pthread_h+:} false; then :
15682   $as_echo_n "(cached) " >&6
15683 else
15684   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15685 /* end confdefs.h.  */
15686 #include <pthread.h>
15687
15688 int
15689 main ()
15690 {
15691 static struct timespec x; x.tv_sec = x.tv_nsec;
15692   ;
15693   return 0;
15694 }
15695 _ACEOF
15696 if ac_fn_c_try_compile "$LINENO"; then :
15697   gl_cv_sys_struct_timespec_in_pthread_h=yes
15698 else
15699   gl_cv_sys_struct_timespec_in_pthread_h=no
15700 fi
15701 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15702 fi
15703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
15704 $as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
15705       if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
15706         PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
15707       else
15708         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <unistd.h>" >&5
15709 $as_echo_n "checking for struct timespec in <unistd.h>... " >&6; }
15710 if ${gl_cv_sys_struct_timespec_in_unistd_h+:} false; then :
15711   $as_echo_n "(cached) " >&6
15712 else
15713   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15714 /* end confdefs.h.  */
15715 #include <unistd.h>
15716
15717 int
15718 main ()
15719 {
15720 static struct timespec x; x.tv_sec = x.tv_nsec;
15721   ;
15722   return 0;
15723 }
15724 _ACEOF
15725 if ac_fn_c_try_compile "$LINENO"; then :
15726   gl_cv_sys_struct_timespec_in_unistd_h=yes
15727 else
15728   gl_cv_sys_struct_timespec_in_unistd_h=no
15729 fi
15730 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15731 fi
15732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_unistd_h" >&5
15733 $as_echo "$gl_cv_sys_struct_timespec_in_unistd_h" >&6; }
15734         if test $gl_cv_sys_struct_timespec_in_unistd_h = yes; then
15735           UNISTD_H_DEFINES_STRUCT_TIMESPEC=1
15736         fi
15737       fi
15738     fi
15739   fi
15740
15741
15742
15743
15744
15745
15746
15747
15748
15749
15750
15751
15752
15753
15754
15755
15756      if test $gl_cv_have_include_next = yes; then
15757        gl_cv_next_time_h='<'time.h'>'
15758      else
15759        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
15760 $as_echo_n "checking absolute name of <time.h>... " >&6; }
15761 if ${gl_cv_next_time_h+:} false; then :
15762   $as_echo_n "(cached) " >&6
15763 else
15764
15765
15766
15767   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15768 /* end confdefs.h.  */
15769 #include <time.h>
15770 _ACEOF
15771                 case "$host_os" in
15772     aix*) gl_absname_cpp="$ac_cpp -C" ;;
15773     *)    gl_absname_cpp="$ac_cpp" ;;
15774   esac
15775
15776   case "$host_os" in
15777     mingw*)
15778                                           gl_dirsep_regex='[/\\]'
15779       ;;
15780     *)
15781       gl_dirsep_regex='\/'
15782       ;;
15783   esac
15784       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
15785   gl_header_literal_regex=`echo 'time.h' \
15786                            | sed -e "$gl_make_literal_regex_sed"`
15787   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
15788       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
15789       s|^/[^/]|//&|
15790       p
15791       q
15792     }'
15793
15794         gl_cv_absolute_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
15795   sed -n "$gl_absolute_header_sed"`
15796
15797            gl_header=$gl_cv_absolute_time_h
15798            gl_cv_next_time_h='"'$gl_header'"'
15799
15800
15801 fi
15802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
15803 $as_echo "$gl_cv_next_time_h" >&6; }
15804      fi
15805      NEXT_TIME_H=$gl_cv_next_time_h
15806
15807      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
15808        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
15809        gl_next_as_first_directive='<'time.h'>'
15810      else
15811        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
15812        gl_next_as_first_directive=$gl_cv_next_time_h
15813      fi
15814      NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
15815
15816
15817
15818
15819
15820
15821
15822
15823
15824
15825
15826
15827
15828
15829
15830
15831
15832
15833 gl_libunistring_sed_extract_major='/^[0-9]/{s/^\([0-9]*\).*/\1/p;q;}
15834 i\
15835 0
15836 q
15837 '
15838 gl_libunistring_sed_extract_minor='/^[0-9][0-9]*[.][0-9]/{s/^[0-9]*[.]\([0-9]*\).*/\1/p;q;}
15839 i\
15840 0
15841 q
15842 '
15843 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;}
15844 i\
15845 0
15846 q
15847 '
15848
15849
15850   if test "$HAVE_LIBUNISTRING" = yes; then
15851     LIBUNISTRING_VERSION_MAJOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_major"`
15852     LIBUNISTRING_VERSION_MINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_minor"`
15853     LIBUNISTRING_VERSION_SUBMINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_subminor"`
15854   fi
15855
15856
15857
15858 ac_fn_c_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default"
15859 if test "x$ac_cv_have_decl_unsetenv" = xyes; then :
15860   ac_have_decl=1
15861 else
15862   ac_have_decl=0
15863 fi
15864
15865 cat >>confdefs.h <<_ACEOF
15866 #define HAVE_DECL_UNSETENV $ac_have_decl
15867 _ACEOF
15868
15869
15870   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the utimes function works" >&5
15871 $as_echo_n "checking whether the utimes function works... " >&6; }
15872 if ${gl_cv_func_working_utimes+:} false; then :
15873   $as_echo_n "(cached) " >&6
15874 else
15875
15876   if test "$cross_compiling" = yes; then :
15877   gl_cv_func_working_utimes=no
15878 else
15879   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15880 /* end confdefs.h.  */
15881
15882 #include <sys/types.h>
15883 #include <sys/stat.h>
15884 #include <fcntl.h>
15885 #include <sys/time.h>
15886 #include <time.h>
15887 #include <unistd.h>
15888 #include <stdlib.h>
15889 #include <stdio.h>
15890 #include <utime.h>
15891
15892 static int
15893 inorder (time_t a, time_t b, time_t c)
15894 {
15895   return a <= b && b <= c;
15896 }
15897
15898 int
15899 main ()
15900 {
15901   int result = 0;
15902   char const *file = "conftest.utimes";
15903   static struct timeval timeval[2] = {{9, 10}, {999999, 999999}};
15904
15905   /* Test whether utimes() essentially works.  */
15906   {
15907     struct stat sbuf;
15908     FILE *f = fopen (file, "w");
15909     if (f == NULL)
15910       result |= 1;
15911     else if (fclose (f) != 0)
15912       result |= 1;
15913     else if (utimes (file, timeval) != 0)
15914       result |= 2;
15915     else if (lstat (file, &sbuf) != 0)
15916       result |= 1;
15917     else if (!(sbuf.st_atime == timeval[0].tv_sec
15918                && sbuf.st_mtime == timeval[1].tv_sec))
15919       result |= 4;
15920     if (unlink (file) != 0)
15921       result |= 1;
15922   }
15923
15924   /* Test whether utimes() with a NULL argument sets the file's timestamp
15925      to the current time.  Use 'fstat' as well as 'time' to
15926      determine the "current" time, to accommodate NFS file systems
15927      if there is a time skew between the host and the NFS server.  */
15928   {
15929     int fd = open (file, O_WRONLY|O_CREAT, 0644);
15930     if (fd < 0)
15931       result |= 1;
15932     else
15933       {
15934         time_t t0, t2;
15935         struct stat st0, st1, st2;
15936         if (time (&t0) == (time_t) -1)
15937           result |= 1;
15938         else if (fstat (fd, &st0) != 0)
15939           result |= 1;
15940         else if (utimes (file, timeval) != 0)
15941           result |= 2;
15942         else if (utimes (file, NULL) != 0)
15943           result |= 8;
15944         else if (fstat (fd, &st1) != 0)
15945           result |= 1;
15946         else if (write (fd, "\n", 1) != 1)
15947           result |= 1;
15948         else if (fstat (fd, &st2) != 0)
15949           result |= 1;
15950         else if (time (&t2) == (time_t) -1)
15951           result |= 1;
15952         else
15953           {
15954             int m_ok_POSIX = inorder (t0, st1.st_mtime, t2);
15955             int m_ok_NFS = inorder (st0.st_mtime, st1.st_mtime, st2.st_mtime);
15956             if (! (st1.st_atime == st1.st_mtime))
15957               result |= 16;
15958             if (! (m_ok_POSIX || m_ok_NFS))
15959               result |= 32;
15960           }
15961         if (close (fd) != 0)
15962           result |= 1;
15963       }
15964     if (unlink (file) != 0)
15965       result |= 1;
15966   }
15967
15968   /* Test whether utimes() with a NULL argument works on read-only files.  */
15969   {
15970     int fd = open (file, O_WRONLY|O_CREAT, 0444);
15971     if (fd < 0)
15972       result |= 1;
15973     else if (close (fd) != 0)
15974       result |= 1;
15975     else if (utimes (file, NULL) != 0)
15976       result |= 64;
15977     if (unlink (file) != 0)
15978       result |= 1;
15979   }
15980
15981   return result;
15982 }
15983
15984 _ACEOF
15985 if ac_fn_c_try_run "$LINENO"; then :
15986   gl_cv_func_working_utimes=yes
15987 else
15988   gl_cv_func_working_utimes=no
15989 fi
15990 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15991   conftest.$ac_objext conftest.beam conftest.$ac_ext
15992 fi
15993
15994 fi
15995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_utimes" >&5
15996 $as_echo "$gl_cv_func_working_utimes" >&6; }
15997
15998   if test $gl_cv_func_working_utimes = yes; then
15999
16000 $as_echo "#define HAVE_WORKING_UTIMES 1" >>confdefs.h
16001
16002   fi
16003
16004
16005
16006
16007
16008   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct utimbuf" >&5
16009 $as_echo_n "checking for struct utimbuf... " >&6; }
16010 if ${gl_cv_sys_struct_utimbuf+:} false; then :
16011   $as_echo_n "(cached) " >&6
16012 else
16013   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16014 /* end confdefs.h.  */
16015 #if HAVE_SYS_TIME_H
16016              #include <sys/time.h>
16017             #endif
16018             #include <time.h>
16019             #ifdef HAVE_UTIME_H
16020              #include <utime.h>
16021             #endif
16022
16023 int
16024 main ()
16025 {
16026 static struct utimbuf x; x.actime = x.modtime;
16027   ;
16028   return 0;
16029 }
16030 _ACEOF
16031 if ac_fn_c_try_compile "$LINENO"; then :
16032   gl_cv_sys_struct_utimbuf=yes
16033 else
16034   gl_cv_sys_struct_utimbuf=no
16035 fi
16036 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16037 fi
16038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_utimbuf" >&5
16039 $as_echo "$gl_cv_sys_struct_utimbuf" >&6; }
16040
16041   if test $gl_cv_sys_struct_utimbuf = yes; then
16042
16043 $as_echo "#define HAVE_STRUCT_UTIMBUF 1" >>confdefs.h
16044
16045   fi
16046
16047
16048
16049
16050
16051
16052
16053
16054
16055
16056
16057
16058
16059   if test $ac_cv_header_features_h = yes; then
16060     HAVE_FEATURES_H=1
16061   else
16062     HAVE_FEATURES_H=0
16063   fi
16064
16065
16066
16067   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5
16068 $as_echo_n "checking for inttypes.h... " >&6; }
16069 if ${gl_cv_header_inttypes_h+:} false; then :
16070   $as_echo_n "(cached) " >&6
16071 else
16072   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16073 /* end confdefs.h.  */
16074
16075 #include <sys/types.h>
16076 #include <inttypes.h>
16077
16078 int
16079 main ()
16080 {
16081 uintmax_t i = (uintmax_t) -1; return !i;
16082   ;
16083   return 0;
16084 }
16085 _ACEOF
16086 if ac_fn_c_try_compile "$LINENO"; then :
16087   gl_cv_header_inttypes_h=yes
16088 else
16089   gl_cv_header_inttypes_h=no
16090 fi
16091 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16092 fi
16093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_inttypes_h" >&5
16094 $as_echo "$gl_cv_header_inttypes_h" >&6; }
16095   if test $gl_cv_header_inttypes_h = yes; then
16096
16097 cat >>confdefs.h <<_ACEOF
16098 #define HAVE_INTTYPES_H_WITH_UINTMAX 1
16099 _ACEOF
16100
16101   fi
16102
16103
16104   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint.h" >&5
16105 $as_echo_n "checking for stdint.h... " >&6; }
16106 if ${gl_cv_header_stdint_h+:} false; then :
16107   $as_echo_n "(cached) " >&6
16108 else
16109   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16110 /* end confdefs.h.  */
16111 #include <sys/types.h>
16112             #include <stdint.h>
16113 int
16114 main ()
16115 {
16116 uintmax_t i = (uintmax_t) -1; return !i;
16117   ;
16118   return 0;
16119 }
16120 _ACEOF
16121 if ac_fn_c_try_compile "$LINENO"; then :
16122   gl_cv_header_stdint_h=yes
16123 else
16124   gl_cv_header_stdint_h=no
16125 fi
16126 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16127 fi
16128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_h" >&5
16129 $as_echo "$gl_cv_header_stdint_h" >&6; }
16130   if test $gl_cv_header_stdint_h = yes; then
16131
16132 cat >>confdefs.h <<_ACEOF
16133 #define HAVE_STDINT_H_WITH_UINTMAX 1
16134 _ACEOF
16135
16136   fi
16137
16138
16139
16140
16141   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intmax_t" >&5
16142 $as_echo_n "checking for intmax_t... " >&6; }
16143 if ${gt_cv_c_intmax_t+:} false; then :
16144   $as_echo_n "(cached) " >&6
16145 else
16146   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16147 /* end confdefs.h.  */
16148
16149 #include <stddef.h>
16150 #include <stdlib.h>
16151 #if HAVE_STDINT_H_WITH_UINTMAX
16152 #include <stdint.h>
16153 #endif
16154 #if HAVE_INTTYPES_H_WITH_UINTMAX
16155 #include <inttypes.h>
16156 #endif
16157
16158 int
16159 main ()
16160 {
16161 intmax_t x = -1; return !x;
16162   ;
16163   return 0;
16164 }
16165 _ACEOF
16166 if ac_fn_c_try_compile "$LINENO"; then :
16167   gt_cv_c_intmax_t=yes
16168 else
16169   gt_cv_c_intmax_t=no
16170 fi
16171 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16172 fi
16173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_intmax_t" >&5
16174 $as_echo "$gt_cv_c_intmax_t" >&6; }
16175   if test $gt_cv_c_intmax_t = yes; then
16176
16177 $as_echo "#define HAVE_INTMAX_T 1" >>confdefs.h
16178
16179   else
16180
16181     test $ac_cv_type_long_long_int = yes \
16182       && ac_type='long long' \
16183       || ac_type='long'
16184
16185 cat >>confdefs.h <<_ACEOF
16186 #define intmax_t $ac_type
16187 _ACEOF
16188
16189   fi
16190
16191
16192   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
16193 $as_echo_n "checking where to find the exponent in a 'double'... " >&6; }
16194 if ${gl_cv_cc_double_expbit0+:} false; then :
16195   $as_echo_n "(cached) " >&6
16196 else
16197
16198       if test "$cross_compiling" = yes; then :
16199
16200                                                                       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16201 /* end confdefs.h.  */
16202
16203 #if defined arm || defined __arm || defined __arm__
16204   mixed_endianness
16205 #endif
16206
16207 _ACEOF
16208 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16209   $EGREP "mixed_endianness" >/dev/null 2>&1; then :
16210   gl_cv_cc_double_expbit0="unknown"
16211 else
16212
16213                                                          :
16214 if ${ac_cv_c_bigendian+:} false; then :
16215   $as_echo_n "(cached) " >&6
16216 else
16217   ac_cv_c_bigendian=unknown
16218     # See if we're dealing with a universal compiler.
16219     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16220 /* end confdefs.h.  */
16221 #ifndef __APPLE_CC__
16222                not a universal capable compiler
16223              #endif
16224              typedef int dummy;
16225
16226 _ACEOF
16227 if ac_fn_c_try_compile "$LINENO"; then :
16228
16229         # Check for potential -arch flags.  It is not universal unless
16230         # there are at least two -arch flags with different values.
16231         ac_arch=
16232         ac_prev=
16233         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
16234          if test -n "$ac_prev"; then
16235            case $ac_word in
16236              i?86 | x86_64 | ppc | ppc64)
16237                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
16238                  ac_arch=$ac_word
16239                else
16240                  ac_cv_c_bigendian=universal
16241                  break
16242                fi
16243                ;;
16244            esac
16245            ac_prev=
16246          elif test "x$ac_word" = "x-arch"; then
16247            ac_prev=arch
16248          fi
16249        done
16250 fi
16251 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16252     if test $ac_cv_c_bigendian = unknown; then
16253       # See if sys/param.h defines the BYTE_ORDER macro.
16254       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16255 /* end confdefs.h.  */
16256 #include <sys/types.h>
16257              #include <sys/param.h>
16258
16259 int
16260 main ()
16261 {
16262 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
16263                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
16264                      && LITTLE_ENDIAN)
16265               bogus endian macros
16266              #endif
16267
16268   ;
16269   return 0;
16270 }
16271 _ACEOF
16272 if ac_fn_c_try_compile "$LINENO"; then :
16273   # It does; now see whether it defined to BIG_ENDIAN or not.
16274          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16275 /* end confdefs.h.  */
16276 #include <sys/types.h>
16277                 #include <sys/param.h>
16278
16279 int
16280 main ()
16281 {
16282 #if BYTE_ORDER != BIG_ENDIAN
16283                  not big endian
16284                 #endif
16285
16286   ;
16287   return 0;
16288 }
16289 _ACEOF
16290 if ac_fn_c_try_compile "$LINENO"; then :
16291   ac_cv_c_bigendian=yes
16292 else
16293   ac_cv_c_bigendian=no
16294 fi
16295 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16296 fi
16297 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16298     fi
16299     if test $ac_cv_c_bigendian = unknown; then
16300       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
16301       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16302 /* end confdefs.h.  */
16303 #include <limits.h>
16304
16305 int
16306 main ()
16307 {
16308 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
16309               bogus endian macros
16310              #endif
16311
16312   ;
16313   return 0;
16314 }
16315 _ACEOF
16316 if ac_fn_c_try_compile "$LINENO"; then :
16317   # It does; now see whether it defined to _BIG_ENDIAN or not.
16318          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16319 /* end confdefs.h.  */
16320 #include <limits.h>
16321
16322 int
16323 main ()
16324 {
16325 #ifndef _BIG_ENDIAN
16326                  not big endian
16327                 #endif
16328
16329   ;
16330   return 0;
16331 }
16332 _ACEOF
16333 if ac_fn_c_try_compile "$LINENO"; then :
16334   ac_cv_c_bigendian=yes
16335 else
16336   ac_cv_c_bigendian=no
16337 fi
16338 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16339 fi
16340 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16341     fi
16342     if test $ac_cv_c_bigendian = unknown; then
16343       # Compile a test program.
16344       if test "$cross_compiling" = yes; then :
16345   # Try to guess by grepping values from an object file.
16346          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16347 /* end confdefs.h.  */
16348 short int ascii_mm[] =
16349                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
16350                 short int ascii_ii[] =
16351                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
16352                 int use_ascii (int i) {
16353                   return ascii_mm[i] + ascii_ii[i];
16354                 }
16355                 short int ebcdic_ii[] =
16356                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
16357                 short int ebcdic_mm[] =
16358                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
16359                 int use_ebcdic (int i) {
16360                   return ebcdic_mm[i] + ebcdic_ii[i];
16361                 }
16362                 extern int foo;
16363
16364 int
16365 main ()
16366 {
16367 return use_ascii (foo) == use_ebcdic (foo);
16368   ;
16369   return 0;
16370 }
16371 _ACEOF
16372 if ac_fn_c_try_compile "$LINENO"; then :
16373   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
16374               ac_cv_c_bigendian=yes
16375             fi
16376             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
16377               if test "$ac_cv_c_bigendian" = unknown; then
16378                 ac_cv_c_bigendian=no
16379               else
16380                 # finding both strings is unlikely to happen, but who knows?
16381                 ac_cv_c_bigendian=unknown
16382               fi
16383             fi
16384 fi
16385 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16386 else
16387   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16388 /* end confdefs.h.  */
16389 $ac_includes_default
16390 int
16391 main ()
16392 {
16393
16394              /* Are we little or big endian?  From Harbison&Steele.  */
16395              union
16396              {
16397                long int l;
16398                char c[sizeof (long int)];
16399              } u;
16400              u.l = 1;
16401              return u.c[sizeof (long int) - 1] == 1;
16402
16403   ;
16404   return 0;
16405 }
16406 _ACEOF
16407 if ac_fn_c_try_run "$LINENO"; then :
16408   ac_cv_c_bigendian=no
16409 else
16410   ac_cv_c_bigendian=yes
16411 fi
16412 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16413   conftest.$ac_objext conftest.beam conftest.$ac_ext
16414 fi
16415
16416     fi
16417 fi
16418 :
16419  case $ac_cv_c_bigendian in #(
16420    yes)
16421      gl_cv_cc_double_expbit0="word 0 bit 20";; #(
16422    no)
16423      gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
16424    universal)
16425
16426 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
16427
16428      ;; #(
16429    *)
16430      gl_cv_cc_double_expbit0="unknown" ;;
16431  esac
16432
16433
16434 fi
16435 rm -f conftest*
16436
16437
16438 else
16439   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16440 /* end confdefs.h.  */
16441
16442 #include <float.h>
16443 #include <stddef.h>
16444 #include <stdio.h>
16445 #include <string.h>
16446 #define NWORDS \
16447   ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
16448 typedef union { double value; unsigned int word[NWORDS]; } memory_double;
16449 static unsigned int ored_words[NWORDS];
16450 static unsigned int anded_words[NWORDS];
16451 static void add_to_ored_words (double x)
16452 {
16453   memory_double m;
16454   size_t i;
16455   /* Clear it first, in case sizeof (double) < sizeof (memory_double).  */
16456   memset (&m, 0, sizeof (memory_double));
16457   m.value = x;
16458   for (i = 0; i < NWORDS; i++)
16459     {
16460       ored_words[i] |= m.word[i];
16461       anded_words[i] &= m.word[i];
16462     }
16463 }
16464 int main ()
16465 {
16466   size_t j;
16467   FILE *fp = fopen ("conftest.out", "w");
16468   if (fp == NULL)
16469     return 1;
16470   for (j = 0; j < NWORDS; j++)
16471     anded_words[j] = ~ (unsigned int) 0;
16472   add_to_ored_words (0.25);
16473   add_to_ored_words (0.5);
16474   add_to_ored_words (1.0);
16475   add_to_ored_words (2.0);
16476   add_to_ored_words (4.0);
16477   /* Remove bits that are common (e.g. if representation of the first mantissa
16478      bit is explicit).  */
16479   for (j = 0; j < NWORDS; j++)
16480     ored_words[j] &= ~anded_words[j];
16481   /* Now find the nonzero word.  */
16482   for (j = 0; j < NWORDS; j++)
16483     if (ored_words[j] != 0)
16484       break;
16485   if (j < NWORDS)
16486     {
16487       size_t i;
16488       for (i = j + 1; i < NWORDS; i++)
16489         if (ored_words[i] != 0)
16490           {
16491             fprintf (fp, "unknown");
16492             return (fclose (fp) != 0);
16493           }
16494       for (i = 0; ; i++)
16495         if ((ored_words[j] >> i) & 1)
16496           {
16497             fprintf (fp, "word %d bit %d", (int) j, (int) i);
16498             return (fclose (fp) != 0);
16499           }
16500     }
16501   fprintf (fp, "unknown");
16502   return (fclose (fp) != 0);
16503 }
16504
16505 _ACEOF
16506 if ac_fn_c_try_run "$LINENO"; then :
16507   gl_cv_cc_double_expbit0=`cat conftest.out`
16508 else
16509   gl_cv_cc_double_expbit0="unknown"
16510 fi
16511 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16512   conftest.$ac_objext conftest.beam conftest.$ac_ext
16513 fi
16514
16515       rm -f conftest.out
16516
16517 fi
16518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
16519 $as_echo "$gl_cv_cc_double_expbit0" >&6; }
16520   case "$gl_cv_cc_double_expbit0" in
16521     word*bit*)
16522       word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
16523       bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
16524
16525 cat >>confdefs.h <<_ACEOF
16526 #define DBL_EXPBIT0_WORD $word
16527 _ACEOF
16528
16529
16530 cat >>confdefs.h <<_ACEOF
16531 #define DBL_EXPBIT0_BIT $bit
16532 _ACEOF
16533
16534       ;;
16535   esac
16536
16537
16538
16539
16540
16541
16542   for ac_func in snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb
16543 do :
16544   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16545 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16546 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16547   cat >>confdefs.h <<_ACEOF
16548 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16549 _ACEOF
16550
16551 fi
16552 done
16553
16554       ac_fn_c_check_decl "$LINENO" "_snprintf" "ac_cv_have_decl__snprintf" "#include <stdio.h>
16555 "
16556 if test "x$ac_cv_have_decl__snprintf" = xyes; then :
16557   ac_have_decl=1
16558 else
16559   ac_have_decl=0
16560 fi
16561
16562 cat >>confdefs.h <<_ACEOF
16563 #define HAVE_DECL__SNPRINTF $ac_have_decl
16564 _ACEOF
16565
16566
16567
16568   case "$gl_cv_func_snprintf_retval_c99" in
16569     *yes)
16570
16571 $as_echo "#define HAVE_SNPRINTF_RETVAL_C99 1" >>confdefs.h
16572
16573       ;;
16574   esac
16575
16576 ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
16577 if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
16578   ac_have_decl=1
16579 else
16580   ac_have_decl=0
16581 fi
16582
16583 cat >>confdefs.h <<_ACEOF
16584 #define HAVE_DECL_VSNPRINTF $ac_have_decl
16585 _ACEOF
16586
16587
16588
16589
16590
16591
16592    if false; then
16593   GL_COND_LIBTOOL_TRUE=
16594   GL_COND_LIBTOOL_FALSE='#'
16595 else
16596   GL_COND_LIBTOOL_TRUE='#'
16597   GL_COND_LIBTOOL_FALSE=
16598 fi
16599
16600   gl_cond_libtool=false
16601   gl_libdeps=
16602   gl_ltlibdeps=
16603   gl_m4_base='m4'
16604
16605
16606
16607
16608
16609
16610
16611
16612
16613   gl_source_base='gnu'
16614
16615
16616
16617   LIB_ACL=
16618   use_acl=0
16619   if test "$enable_acl" != no; then
16620         for ac_header in sys/acl.h
16621 do :
16622   ac_fn_c_check_header_mongrel "$LINENO" "sys/acl.h" "ac_cv_header_sys_acl_h" "$ac_includes_default"
16623 if test "x$ac_cv_header_sys_acl_h" = xyes; then :
16624   cat >>confdefs.h <<_ACEOF
16625 #define HAVE_SYS_ACL_H 1
16626 _ACEOF
16627
16628 fi
16629
16630 done
16631
16632     if test $ac_cv_header_sys_acl_h = yes; then
16633       ac_save_LIBS=$LIBS
16634
16635                   if test $use_acl = 0; then
16636         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing acl_get_file" >&5
16637 $as_echo_n "checking for library containing acl_get_file... " >&6; }
16638 if ${ac_cv_search_acl_get_file+:} false; then :
16639   $as_echo_n "(cached) " >&6
16640 else
16641   ac_func_search_save_LIBS=$LIBS
16642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16643 /* end confdefs.h.  */
16644
16645 /* Override any GCC internal prototype to avoid an error.
16646    Use char because int might match the return type of a GCC
16647    builtin and then its argument prototype would still apply.  */
16648 #ifdef __cplusplus
16649 extern "C"
16650 #endif
16651 char acl_get_file ();
16652 int
16653 main ()
16654 {
16655 return acl_get_file ();
16656   ;
16657   return 0;
16658 }
16659 _ACEOF
16660 for ac_lib in '' acl pacl; do
16661   if test -z "$ac_lib"; then
16662     ac_res="none required"
16663   else
16664     ac_res=-l$ac_lib
16665     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
16666   fi
16667   if ac_fn_c_try_link "$LINENO"; then :
16668   ac_cv_search_acl_get_file=$ac_res
16669 fi
16670 rm -f core conftest.err conftest.$ac_objext \
16671     conftest$ac_exeext
16672   if ${ac_cv_search_acl_get_file+:} false; then :
16673   break
16674 fi
16675 done
16676 if ${ac_cv_search_acl_get_file+:} false; then :
16677
16678 else
16679   ac_cv_search_acl_get_file=no
16680 fi
16681 rm conftest.$ac_ext
16682 LIBS=$ac_func_search_save_LIBS
16683 fi
16684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_acl_get_file" >&5
16685 $as_echo "$ac_cv_search_acl_get_file" >&6; }
16686 ac_res=$ac_cv_search_acl_get_file
16687 if test "$ac_res" != no; then :
16688   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
16689   if test "$ac_cv_search_acl_get_file" != "none required"; then
16690              LIB_ACL=$ac_cv_search_acl_get_file
16691            fi
16692            for ac_func in acl_get_file acl_get_fd acl_set_file acl_set_fd \
16693               acl_free acl_from_mode acl_from_text \
16694               acl_delete_def_file acl_extended_file \
16695               acl_delete_fd_np acl_delete_file_np \
16696               acl_copy_ext_native acl_create_entry_np \
16697               acl_to_short_text acl_free_text
16698 do :
16699   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16700 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16701 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16702   cat >>confdefs.h <<_ACEOF
16703 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16704 _ACEOF
16705
16706 fi
16707 done
16708
16709            # If the acl_get_file bug is detected, don't enable the ACL support.
16710
16711   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working acl_get_file" >&5
16712 $as_echo_n "checking for working acl_get_file... " >&6; }
16713 if ${gl_cv_func_working_acl_get_file+:} false; then :
16714   $as_echo_n "(cached) " >&6
16715 else
16716   gl_cv_func_working_acl_get_file=no
16717      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16718 /* end confdefs.h.  */
16719 #include <sys/types.h>
16720            #include <sys/acl.h>
16721            #include <errno.h>
16722
16723 int
16724 main ()
16725 {
16726 if (!acl_get_file (".", ACL_TYPE_ACCESS) && errno == ENOENT)
16727               return 1;
16728             return 0;
16729
16730   ;
16731   return 0;
16732 }
16733 _ACEOF
16734 if ac_fn_c_try_link "$LINENO"; then :
16735   if test $cross_compiling = yes; then
16736           gl_cv_func_working_acl_get_file="guessing yes"
16737         elif ./conftest$ac_exeext; then
16738           gl_cv_func_working_acl_get_file=yes
16739         fi
16740 fi
16741 rm -f core conftest.err conftest.$ac_objext \
16742     conftest$ac_exeext conftest.$ac_ext
16743 fi
16744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_acl_get_file" >&5
16745 $as_echo "$gl_cv_func_working_acl_get_file" >&6; }
16746   if test "$gl_cv_func_working_acl_get_file" != no; then :
16747   use_acl=1
16748 fi
16749
16750            if test $use_acl = 1; then
16751                           for ac_header in acl/libacl.h
16752 do :
16753   ac_fn_c_check_header_mongrel "$LINENO" "acl/libacl.h" "ac_cv_header_acl_libacl_h" "$ac_includes_default"
16754 if test "x$ac_cv_header_acl_libacl_h" = xyes; then :
16755   cat >>confdefs.h <<_ACEOF
16756 #define HAVE_ACL_LIBACL_H 1
16757 _ACEOF
16758
16759 fi
16760
16761 done
16762
16763
16764
16765
16766
16767
16768
16769
16770
16771   for ac_func in acl_entries
16772 do :
16773   ac_fn_c_check_func "$LINENO" "acl_entries" "ac_cv_func_acl_entries"
16774 if test "x$ac_cv_func_acl_entries" = xyes; then :
16775   cat >>confdefs.h <<_ACEOF
16776 #define HAVE_ACL_ENTRIES 1
16777 _ACEOF
16778
16779 else
16780
16781     gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
16782
16783 fi
16784 done
16785
16786
16787              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ACL_FIRST_ENTRY" >&5
16788 $as_echo_n "checking for ACL_FIRST_ENTRY... " >&6; }
16789 if ${gl_cv_acl_ACL_FIRST_ENTRY+:} false; then :
16790   $as_echo_n "(cached) " >&6
16791 else
16792   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16793 /* end confdefs.h.  */
16794 #include <sys/types.h>
16795 #include <sys/acl.h>
16796 int type = ACL_FIRST_ENTRY;
16797 int
16798 main ()
16799 {
16800
16801   ;
16802   return 0;
16803 }
16804 _ACEOF
16805 if ac_fn_c_try_compile "$LINENO"; then :
16806   gl_cv_acl_ACL_FIRST_ENTRY=yes
16807 else
16808   gl_cv_acl_ACL_FIRST_ENTRY=no
16809 fi
16810 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16811 fi
16812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_acl_ACL_FIRST_ENTRY" >&5
16813 $as_echo "$gl_cv_acl_ACL_FIRST_ENTRY" >&6; }
16814              if test $gl_cv_acl_ACL_FIRST_ENTRY = yes; then
16815
16816 $as_echo "#define HAVE_ACL_FIRST_ENTRY 1" >>confdefs.h
16817
16818              fi
16819                           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ACL_TYPE_EXTENDED" >&5
16820 $as_echo_n "checking for ACL_TYPE_EXTENDED... " >&6; }
16821 if ${gl_cv_acl_ACL_TYPE_EXTENDED+:} false; then :
16822   $as_echo_n "(cached) " >&6
16823 else
16824   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16825 /* end confdefs.h.  */
16826 #include <sys/types.h>
16827 #include <sys/acl.h>
16828 int type = ACL_TYPE_EXTENDED;
16829 int
16830 main ()
16831 {
16832
16833   ;
16834   return 0;
16835 }
16836 _ACEOF
16837 if ac_fn_c_try_compile "$LINENO"; then :
16838   gl_cv_acl_ACL_TYPE_EXTENDED=yes
16839 else
16840   gl_cv_acl_ACL_TYPE_EXTENDED=no
16841 fi
16842 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16843 fi
16844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_acl_ACL_TYPE_EXTENDED" >&5
16845 $as_echo "$gl_cv_acl_ACL_TYPE_EXTENDED" >&6; }
16846              if test $gl_cv_acl_ACL_TYPE_EXTENDED = yes; then
16847
16848 $as_echo "#define HAVE_ACL_TYPE_EXTENDED 1" >>confdefs.h
16849
16850              fi
16851            else
16852              LIB_ACL=
16853            fi
16854
16855 fi
16856
16857       fi
16858
16859             if test $use_acl = 0; then
16860         for ac_func in facl
16861 do :
16862   ac_fn_c_check_func "$LINENO" "facl" "ac_cv_func_facl"
16863 if test "x$ac_cv_func_facl" = xyes; then :
16864   cat >>confdefs.h <<_ACEOF
16865 #define HAVE_FACL 1
16866 _ACEOF
16867
16868 fi
16869 done
16870
16871         if test $ac_cv_func_facl = yes; then
16872           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing acl_trivial" >&5
16873 $as_echo_n "checking for library containing acl_trivial... " >&6; }
16874 if ${ac_cv_search_acl_trivial+:} false; then :
16875   $as_echo_n "(cached) " >&6
16876 else
16877   ac_func_search_save_LIBS=$LIBS
16878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16879 /* end confdefs.h.  */
16880
16881 /* Override any GCC internal prototype to avoid an error.
16882    Use char because int might match the return type of a GCC
16883    builtin and then its argument prototype would still apply.  */
16884 #ifdef __cplusplus
16885 extern "C"
16886 #endif
16887 char acl_trivial ();
16888 int
16889 main ()
16890 {
16891 return acl_trivial ();
16892   ;
16893   return 0;
16894 }
16895 _ACEOF
16896 for ac_lib in '' sec; do
16897   if test -z "$ac_lib"; then
16898     ac_res="none required"
16899   else
16900     ac_res=-l$ac_lib
16901     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
16902   fi
16903   if ac_fn_c_try_link "$LINENO"; then :
16904   ac_cv_search_acl_trivial=$ac_res
16905 fi
16906 rm -f core conftest.err conftest.$ac_objext \
16907     conftest$ac_exeext
16908   if ${ac_cv_search_acl_trivial+:} false; then :
16909   break
16910 fi
16911 done
16912 if ${ac_cv_search_acl_trivial+:} false; then :
16913
16914 else
16915   ac_cv_search_acl_trivial=no
16916 fi
16917 rm conftest.$ac_ext
16918 LIBS=$ac_func_search_save_LIBS
16919 fi
16920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_acl_trivial" >&5
16921 $as_echo "$ac_cv_search_acl_trivial" >&6; }
16922 ac_res=$ac_cv_search_acl_trivial
16923 if test "$ac_res" != no; then :
16924   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
16925   if test "$ac_cv_search_acl_trivial" != "none required"; then
16926                LIB_ACL=$ac_cv_search_acl_trivial
16927              fi
16928
16929 fi
16930
16931           for ac_func in acl_trivial
16932 do :
16933   ac_fn_c_check_func "$LINENO" "acl_trivial" "ac_cv_func_acl_trivial"
16934 if test "x$ac_cv_func_acl_trivial" = xyes; then :
16935   cat >>confdefs.h <<_ACEOF
16936 #define HAVE_ACL_TRIVIAL 1
16937 _ACEOF
16938
16939 fi
16940 done
16941
16942           use_acl=1
16943         fi
16944       fi
16945
16946             if test $use_acl = 0; then
16947         for ac_func in getacl
16948 do :
16949   ac_fn_c_check_func "$LINENO" "getacl" "ac_cv_func_getacl"
16950 if test "x$ac_cv_func_getacl" = xyes; then :
16951   cat >>confdefs.h <<_ACEOF
16952 #define HAVE_GETACL 1
16953 _ACEOF
16954
16955 fi
16956 done
16957
16958         if test $ac_cv_func_getacl = yes; then
16959           use_acl=1
16960         fi
16961                 for ac_header in aclv.h
16962 do :
16963   ac_fn_c_check_header_compile "$LINENO" "aclv.h" "ac_cv_header_aclv_h" "#include <sys/types.h>
16964 "
16965 if test "x$ac_cv_header_aclv_h" = xyes; then :
16966   cat >>confdefs.h <<_ACEOF
16967 #define HAVE_ACLV_H 1
16968 _ACEOF
16969
16970 fi
16971
16972 done
16973
16974       fi
16975
16976             if test $use_acl = 0; then
16977         for ac_func in aclx_get
16978 do :
16979   ac_fn_c_check_func "$LINENO" "aclx_get" "ac_cv_func_aclx_get"
16980 if test "x$ac_cv_func_aclx_get" = xyes; then :
16981   cat >>confdefs.h <<_ACEOF
16982 #define HAVE_ACLX_GET 1
16983 _ACEOF
16984
16985 fi
16986 done
16987
16988         if test $ac_cv_func_aclx_get = yes; then
16989           use_acl=1
16990         fi
16991       fi
16992
16993             if test $use_acl = 0 || test "$ac_cv_func_aclx_get" = yes; then
16994         for ac_func in statacl
16995 do :
16996   ac_fn_c_check_func "$LINENO" "statacl" "ac_cv_func_statacl"
16997 if test "x$ac_cv_func_statacl" = xyes; then :
16998   cat >>confdefs.h <<_ACEOF
16999 #define HAVE_STATACL 1
17000 _ACEOF
17001
17002 fi
17003 done
17004
17005         if test $ac_cv_func_statacl = yes; then
17006           use_acl=1
17007         fi
17008       fi
17009
17010             if test $use_acl = 0; then
17011         for ac_func in aclsort
17012 do :
17013   ac_fn_c_check_func "$LINENO" "aclsort" "ac_cv_func_aclsort"
17014 if test "x$ac_cv_func_aclsort" = xyes; then :
17015   cat >>confdefs.h <<_ACEOF
17016 #define HAVE_ACLSORT 1
17017 _ACEOF
17018
17019 fi
17020 done
17021
17022         if test $ac_cv_func_aclsort = yes; then
17023           use_acl=1
17024         fi
17025       fi
17026
17027       LIBS=$ac_save_LIBS
17028     fi
17029
17030     if test "$enable_acl$use_acl" = yes0; then
17031       as_fn_error $? "ACLs enabled but support not detected" "$LINENO" 5
17032     elif test "$enable_acl$use_acl" = auto0; then
17033       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libacl development library was not found or not usable." >&5
17034 $as_echo "$as_me: WARNING: libacl development library was not found or not usable." >&2;}
17035       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GNU tar will be built without ACL support." >&5
17036 $as_echo "$as_me: WARNING: GNU tar will be built without ACL support." >&2;}
17037     fi
17038   fi
17039   test $gl_need_lib_has_acl && LIB_HAS_ACL=$LIB_ACL
17040
17041
17042 cat >>confdefs.h <<_ACEOF
17043 #define USE_ACL $use_acl
17044 _ACEOF
17045
17046   USE_ACL=$use_acl
17047
17048
17049
17050
17051   if test $ac_cv_func_alloca_works = no; then
17052     :
17053   fi
17054
17055   # Define an additional variable used in the Makefile substitution.
17056   if test $ac_cv_working_alloca_h = yes; then
17057     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
17058 $as_echo_n "checking for alloca as a compiler built-in... " >&6; }
17059 if ${gl_cv_rpl_alloca+:} false; then :
17060   $as_echo_n "(cached) " >&6
17061 else
17062
17063       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17064 /* end confdefs.h.  */
17065
17066 #if defined __GNUC__ || defined _AIX || defined _MSC_VER
17067         Need own alloca
17068 #endif
17069
17070 _ACEOF
17071 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17072   $EGREP "Need own alloca" >/dev/null 2>&1; then :
17073   gl_cv_rpl_alloca=yes
17074 else
17075   gl_cv_rpl_alloca=no
17076 fi
17077 rm -f conftest*
17078
17079
17080 fi
17081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
17082 $as_echo "$gl_cv_rpl_alloca" >&6; }
17083     if test $gl_cv_rpl_alloca = yes; then
17084
17085 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
17086
17087       ALLOCA_H=alloca.h
17088     else
17089                   ALLOCA_H=
17090     fi
17091   else
17092     ALLOCA_H=alloca.h
17093   fi
17094
17095    if test -n "$ALLOCA_H"; then
17096   GL_GENERATE_ALLOCA_H_TRUE=
17097   GL_GENERATE_ALLOCA_H_FALSE='#'
17098 else
17099   GL_GENERATE_ALLOCA_H_TRUE='#'
17100   GL_GENERATE_ALLOCA_H_FALSE=
17101 fi
17102
17103
17104
17105
17106 cat >>confdefs.h <<_ACEOF
17107 #define GNULIB_AREADLINKAT 1
17108 _ACEOF
17109
17110
17111
17112
17113 cat >>confdefs.h <<_ACEOF
17114 #define GNULIB_AREADLINKAT_WITH_SIZE 1
17115 _ACEOF
17116
17117
17118
17119
17120
17121
17122
17123   ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
17124 "
17125 if test "x$ac_cv_have_decl_program_invocation_name" = xyes; then :
17126   ac_have_decl=1
17127 else
17128   ac_have_decl=0
17129 fi
17130
17131 cat >>confdefs.h <<_ACEOF
17132 #define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl
17133 _ACEOF
17134 if test $ac_have_decl = 1; then :
17135
17136 else
17137
17138 $as_echo "#define GNULIB_PROGRAM_INVOCATION_NAME 1" >>confdefs.h
17139
17140 fi
17141
17142   ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
17143 "
17144 if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes; then :
17145   ac_have_decl=1
17146 else
17147   ac_have_decl=0
17148 fi
17149
17150 cat >>confdefs.h <<_ACEOF
17151 #define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl
17152 _ACEOF
17153 if test $ac_have_decl = 1; then :
17154
17155 else
17156
17157 $as_echo "#define GNULIB_PROGRAM_INVOCATION_SHORT_NAME 1" >>confdefs.h
17158
17159 fi
17160
17161
17162   # Check if program_invocation_name and program_invocation_short_name
17163   # are defined elsewhere. It is improbable that only one of them will
17164   # be defined and other not, I prefer to stay on the safe side and to
17165   # test each one separately.
17166   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether program_invocation_name is defined" >&5
17167 $as_echo_n "checking whether program_invocation_name is defined... " >&6; }
17168   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17169 /* end confdefs.h.  */
17170 #include <argp.h>
17171 int
17172 main ()
17173 {
17174 program_invocation_name = "test";
17175   ;
17176   return 0;
17177 }
17178 _ACEOF
17179 if ac_fn_c_try_link "$LINENO"; then :
17180
17181 $as_echo "#define HAVE_PROGRAM_INVOCATION_NAME 1" >>confdefs.h
17182
17183                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17184 $as_echo "yes" >&6; }
17185 else
17186   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17187 $as_echo "no" >&6; }
17188 fi
17189 rm -f core conftest.err conftest.$ac_objext \
17190     conftest$ac_exeext conftest.$ac_ext
17191
17192   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether program_invocation_short_name is defined" >&5
17193 $as_echo_n "checking whether program_invocation_short_name is defined... " >&6; }
17194   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17195 /* end confdefs.h.  */
17196 #include <argp.h>
17197 int
17198 main ()
17199 {
17200 program_invocation_short_name = "test";
17201   ;
17202   return 0;
17203 }
17204 _ACEOF
17205 if ac_fn_c_try_link "$LINENO"; then :
17206
17207 $as_echo "#define HAVE_PROGRAM_INVOCATION_SHORT_NAME 1" >>confdefs.h
17208
17209                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17210 $as_echo "yes" >&6; }
17211 else
17212   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17213 $as_echo "no" >&6; }
17214 fi
17215 rm -f core conftest.err conftest.$ac_objext \
17216     conftest$ac_exeext conftest.$ac_ext
17217
17218
17219
17220
17221
17222
17223
17224
17225
17226
17227
17228
17229
17230
17231
17232
17233
17234
17235
17236   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=argp_error:2:c-format"
17237
17238
17239
17240   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=argp_failure:4:c-format"
17241
17242
17243
17244
17245
17246
17247
17248
17249
17250   gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext"
17251
17252
17253
17254
17255
17256
17257
17258
17259
17260
17261
17262
17263   if test $ac_cv_func_btowc = no; then
17264     HAVE_BTOWC=0
17265   else
17266
17267
17268
17269
17270         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(0) is correct" >&5
17271 $as_echo_n "checking whether btowc(0) is correct... " >&6; }
17272 if ${gl_cv_func_btowc_nul+:} false; then :
17273   $as_echo_n "(cached) " >&6
17274 else
17275
17276         if test "$cross_compiling" = yes; then :
17277
17278            case "$host_os" in
17279                       # Guess no on Cygwin.
17280              cygwin*) gl_cv_func_btowc_nul="guessing no" ;;
17281                       # Guess yes otherwise.
17282              *)       gl_cv_func_btowc_nul="guessing yes" ;;
17283            esac
17284
17285 else
17286   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17287 /* end confdefs.h.  */
17288
17289 #include <string.h>
17290 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
17291    <wchar.h>.
17292    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
17293    included before <wchar.h>.  */
17294 #include <stddef.h>
17295 #include <stdio.h>
17296 #include <time.h>
17297 #include <wchar.h>
17298 int main ()
17299 {
17300   if (btowc ('\0') != 0)
17301     return 1;
17302   return 0;
17303 }
17304 _ACEOF
17305 if ac_fn_c_try_run "$LINENO"; then :
17306   gl_cv_func_btowc_nul=yes
17307 else
17308   gl_cv_func_btowc_nul=no
17309 fi
17310 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17311   conftest.$ac_objext conftest.beam conftest.$ac_ext
17312 fi
17313
17314
17315 fi
17316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_nul" >&5
17317 $as_echo "$gl_cv_func_btowc_nul" >&6; }
17318
17319         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(EOF) is correct" >&5
17320 $as_echo_n "checking whether btowc(EOF) is correct... " >&6; }
17321 if ${gl_cv_func_btowc_eof+:} false; then :
17322   $as_echo_n "(cached) " >&6
17323 else
17324
17325                         case "$host_os" in
17326                  # Guess no on IRIX.
17327           irix*) gl_cv_func_btowc_eof="guessing no" ;;
17328                  # Guess yes otherwise.
17329           *)     gl_cv_func_btowc_eof="guessing yes" ;;
17330         esac
17331         if test $LOCALE_FR != none; then
17332           if test "$cross_compiling" = yes; then :
17333   :
17334 else
17335   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17336 /* end confdefs.h.  */
17337
17338 #include <locale.h>
17339 #include <string.h>
17340 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
17341    <wchar.h>.
17342    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
17343    included before <wchar.h>.  */
17344 #include <stddef.h>
17345 #include <stdio.h>
17346 #include <time.h>
17347 #include <wchar.h>
17348 int main ()
17349 {
17350   if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
17351     {
17352       if (btowc (EOF) != WEOF)
17353         return 1;
17354     }
17355   return 0;
17356 }
17357 _ACEOF
17358 if ac_fn_c_try_run "$LINENO"; then :
17359   gl_cv_func_btowc_eof=yes
17360 else
17361   gl_cv_func_btowc_eof=no
17362 fi
17363 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17364   conftest.$ac_objext conftest.beam conftest.$ac_ext
17365 fi
17366
17367         fi
17368
17369 fi
17370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_eof" >&5
17371 $as_echo "$gl_cv_func_btowc_eof" >&6; }
17372
17373     case "$gl_cv_func_btowc_nul" in
17374       *yes) ;;
17375       *) REPLACE_BTOWC=1 ;;
17376     esac
17377     case "$gl_cv_func_btowc_eof" in
17378       *yes) ;;
17379       *) REPLACE_BTOWC=1 ;;
17380     esac
17381   fi
17382
17383   if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then
17384
17385
17386
17387
17388
17389
17390
17391
17392   gl_LIBOBJS="$gl_LIBOBJS btowc.$ac_objext"
17393
17394
17395   :
17396
17397   fi
17398
17399
17400
17401
17402
17403           GNULIB_BTOWC=1
17404
17405
17406
17407
17408
17409 $as_echo "#define GNULIB_TEST_BTOWC 1" >>confdefs.h
17410
17411
17412
17413
17414
17415
17416   if test $ac_cv_func_canonicalize_file_name = no; then
17417     HAVE_CANONICALIZE_FILE_NAME=0
17418     if test $ac_cv_func_realpath = no; then
17419       HAVE_REALPATH=0
17420     else
17421       case "$gl_cv_func_realpath_works" in
17422         *yes) ;;
17423         *)    REPLACE_REALPATH=1 ;;
17424       esac
17425     fi
17426   else
17427     case "$gl_cv_func_realpath_works" in
17428       *yes)
17429         ;;
17430       *)
17431         REPLACE_CANONICALIZE_FILE_NAME=1
17432         REPLACE_REALPATH=1
17433         ;;
17434     esac
17435   fi
17436
17437   if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then
17438
17439
17440
17441
17442
17443
17444
17445
17446   gl_LIBOBJS="$gl_LIBOBJS canonicalize-lgpl.$ac_objext"
17447
17448   fi
17449
17450
17451 cat >>confdefs.h <<_ACEOF
17452 #define GNULIB_CANONICALIZE_LGPL 1
17453 _ACEOF
17454
17455
17456
17457
17458
17459
17460
17461           GNULIB_CANONICALIZE_FILE_NAME=1
17462
17463
17464
17465
17466
17467 $as_echo "#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1" >>confdefs.h
17468
17469
17470
17471
17472
17473
17474
17475
17476           GNULIB_REALPATH=1
17477
17478
17479
17480
17481
17482 $as_echo "#define GNULIB_TEST_REALPATH 1" >>confdefs.h
17483
17484
17485
17486
17487
17488
17489
17490
17491
17492           GNULIB_CHDIR=1
17493
17494
17495
17496
17497
17498 $as_echo "#define GNULIB_TEST_CHDIR 1" >>confdefs.h
17499
17500
17501
17502
17503
17504   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether this system has an arbitrary file name length limit" >&5
17505 $as_echo_n "checking whether this system has an arbitrary file name length limit... " >&6; }
17506 if ${gl_cv_have_arbitrary_file_name_length_limit+:} false; then :
17507   $as_echo_n "(cached) " >&6
17508 else
17509   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17510 /* end confdefs.h.  */
17511
17512 /* Arrange to define PATH_MAX, like "pathmax.h" does. */
17513 #if HAVE_UNISTD_H
17514 # include <unistd.h>
17515 #endif
17516 #include <limits.h>
17517 #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
17518 # include <sys/param.h>
17519 #endif
17520 #if !defined PATH_MAX && defined MAXPATHLEN
17521 # define PATH_MAX MAXPATHLEN
17522 #endif
17523 #ifdef __hpux
17524 # undef PATH_MAX
17525 # define PATH_MAX 1024
17526 #endif
17527 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
17528 # undef PATH_MAX
17529 # define PATH_MAX 260
17530 #endif
17531
17532 #ifdef PATH_MAX
17533 have_arbitrary_file_name_length_limit
17534 #endif
17535 _ACEOF
17536 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17537   $EGREP "have_arbitrary_file_name_length_limit" >/dev/null 2>&1; then :
17538   gl_cv_have_arbitrary_file_name_length_limit=yes
17539 else
17540   gl_cv_have_arbitrary_file_name_length_limit=no
17541 fi
17542 rm -f conftest*
17543
17544 fi
17545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_arbitrary_file_name_length_limit" >&5
17546 $as_echo "$gl_cv_have_arbitrary_file_name_length_limit" >&6; }
17547
17548   if test $gl_cv_have_arbitrary_file_name_length_limit = yes; then
17549
17550
17551
17552
17553
17554
17555
17556
17557   gl_LIBOBJS="$gl_LIBOBJS chdir-long.$ac_objext"
17558
17559     :
17560   fi
17561
17562   if test $HAVE_CHOWN = 0 || test $REPLACE_CHOWN = 1; then
17563
17564
17565
17566
17567
17568
17569
17570
17571   gl_LIBOBJS="$gl_LIBOBJS chown.$ac_objext"
17572
17573   fi
17574   if test $REPLACE_CHOWN = 1 && test $ac_cv_func_fchown = no; then
17575
17576
17577
17578
17579
17580
17581
17582
17583   gl_LIBOBJS="$gl_LIBOBJS fchown-stub.$ac_objext"
17584
17585   fi
17586
17587
17588
17589
17590
17591           GNULIB_CHOWN=1
17592
17593
17594
17595
17596
17597 $as_echo "#define GNULIB_TEST_CHOWN 1" >>confdefs.h
17598
17599
17600
17601
17602
17603
17604   # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
17605   # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
17606
17607   # Save and restore LIBS so e.g., -lrt, isn't added to it.  Otherwise, *all*
17608   # programs in the package would end up linked with that potentially-shared
17609   # library, inducing unnecessary run-time overhead.
17610   LIB_CLOCK_GETTIME=
17611
17612   gl_saved_libs=$LIBS
17613     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
17614 $as_echo_n "checking for library containing clock_gettime... " >&6; }
17615 if ${ac_cv_search_clock_gettime+:} false; then :
17616   $as_echo_n "(cached) " >&6
17617 else
17618   ac_func_search_save_LIBS=$LIBS
17619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17620 /* end confdefs.h.  */
17621
17622 /* Override any GCC internal prototype to avoid an error.
17623    Use char because int might match the return type of a GCC
17624    builtin and then its argument prototype would still apply.  */
17625 #ifdef __cplusplus
17626 extern "C"
17627 #endif
17628 char clock_gettime ();
17629 int
17630 main ()
17631 {
17632 return clock_gettime ();
17633   ;
17634   return 0;
17635 }
17636 _ACEOF
17637 for ac_lib in '' rt posix4; do
17638   if test -z "$ac_lib"; then
17639     ac_res="none required"
17640   else
17641     ac_res=-l$ac_lib
17642     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17643   fi
17644   if ac_fn_c_try_link "$LINENO"; then :
17645   ac_cv_search_clock_gettime=$ac_res
17646 fi
17647 rm -f core conftest.err conftest.$ac_objext \
17648     conftest$ac_exeext
17649   if ${ac_cv_search_clock_gettime+:} false; then :
17650   break
17651 fi
17652 done
17653 if ${ac_cv_search_clock_gettime+:} false; then :
17654
17655 else
17656   ac_cv_search_clock_gettime=no
17657 fi
17658 rm conftest.$ac_ext
17659 LIBS=$ac_func_search_save_LIBS
17660 fi
17661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
17662 $as_echo "$ac_cv_search_clock_gettime" >&6; }
17663 ac_res=$ac_cv_search_clock_gettime
17664 if test "$ac_res" != no; then :
17665   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17666   test "$ac_cv_search_clock_gettime" = "none required" ||
17667                     LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime
17668 fi
17669
17670     for ac_func in clock_gettime clock_settime
17671 do :
17672   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17673 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17674 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17675   cat >>confdefs.h <<_ACEOF
17676 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17677 _ACEOF
17678
17679 fi
17680 done
17681
17682   LIBS=$gl_saved_libs
17683
17684
17685
17686 $as_echo "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h
17687
17688
17689
17690
17691
17692   if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
17693     REPLACE_CLOSE=1
17694   fi
17695
17696
17697
17698
17699
17700   if test $ac_cv_header_sys_socket_h != yes; then
17701                     for ac_header in winsock2.h
17702 do :
17703   ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
17704 if test "x$ac_cv_header_winsock2_h" = xyes; then :
17705   cat >>confdefs.h <<_ACEOF
17706 #define HAVE_WINSOCK2_H 1
17707 _ACEOF
17708
17709 fi
17710
17711 done
17712
17713   fi
17714   if test "$ac_cv_header_winsock2_h" = yes; then
17715     HAVE_WINSOCK2_H=1
17716     UNISTD_H_HAVE_WINSOCK2_H=1
17717     SYS_IOCTL_H_HAVE_WINSOCK2_H=1
17718   else
17719     HAVE_WINSOCK2_H=0
17720   fi
17721
17722
17723     if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
17724                         REPLACE_CLOSE=1
17725     fi
17726
17727
17728     if test $REPLACE_CLOSE = 0; then
17729
17730
17731
17732   if test $ac_cv_func_fchdir = no; then
17733     HAVE_FCHDIR=0
17734   fi
17735
17736       if test $HAVE_FCHDIR = 0; then
17737         REPLACE_CLOSE=1
17738       fi
17739     fi
17740
17741
17742   if test $REPLACE_CLOSE = 1; then
17743
17744
17745
17746
17747
17748
17749
17750
17751   gl_LIBOBJS="$gl_LIBOBJS close.$ac_objext"
17752
17753   fi
17754
17755
17756
17757
17758
17759           GNULIB_CLOSE=1
17760
17761
17762
17763
17764
17765 $as_echo "#define GNULIB_TEST_CLOSE 1" >>confdefs.h
17766
17767
17768
17769
17770   :
17771
17772
17773
17774 cat >>confdefs.h <<_ACEOF
17775 #define GNULIB_CLOSE_STREAM 1
17776 _ACEOF
17777
17778
17779
17780
17781
17782   for ac_func in closedir
17783 do :
17784   ac_fn_c_check_func "$LINENO" "closedir" "ac_cv_func_closedir"
17785 if test "x$ac_cv_func_closedir" = xyes; then :
17786   cat >>confdefs.h <<_ACEOF
17787 #define HAVE_CLOSEDIR 1
17788 _ACEOF
17789
17790 fi
17791 done
17792
17793   if test $ac_cv_func_closedir = no; then
17794     HAVE_CLOSEDIR=0
17795   fi
17796
17797
17798
17799
17800   if test $ac_cv_func_fchdir = no; then
17801     HAVE_FCHDIR=0
17802   fi
17803
17804     if test $HAVE_FCHDIR = 0; then
17805       if test $HAVE_CLOSEDIR = 1; then
17806         REPLACE_CLOSEDIR=1
17807       fi
17808     fi
17809
17810
17811   if test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1; then
17812
17813
17814
17815
17816
17817
17818
17819
17820   gl_LIBOBJS="$gl_LIBOBJS closedir.$ac_objext"
17821
17822   fi
17823
17824
17825
17826
17827
17828           GNULIB_CLOSEDIR=1
17829
17830
17831
17832
17833
17834 $as_echo "#define GNULIB_TEST_CLOSEDIR 1" >>confdefs.h
17835
17836
17837
17838
17839   :
17840
17841
17842           if test "x$datarootdir" = x; then
17843     datarootdir='${datadir}'
17844
17845   fi
17846     if test "x$docdir" = x; then
17847     docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
17848
17849   fi
17850     if test "x$htmldir" = x; then
17851     htmldir='${docdir}'
17852
17853   fi
17854   if test "x$dvidir" = x; then
17855     dvidir='${docdir}'
17856
17857   fi
17858   if test "x$pdfdir" = x; then
17859     pdfdir='${docdir}'
17860
17861   fi
17862   if test "x$psdir" = x; then
17863     psdir='${docdir}'
17864
17865   fi
17866   if test "x$lispdir" = x; then
17867     lispdir='${datarootdir}/emacs/site-lisp'
17868
17869   fi
17870   if test "x$localedir" = x; then
17871     localedir='${datarootdir}/locale'
17872
17873   fi
17874     if test "x$runstatedir" = x; then
17875     runstatedir='${localstatedir}/run'
17876
17877   fi
17878
17879       pkglibexecdir='${libexecdir}/${PACKAGE}'
17880
17881
17882       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_ino member in directory struct" >&5
17883 $as_echo_n "checking for d_ino member in directory struct... " >&6; }
17884 if ${gl_cv_struct_dirent_d_ino+:} false; then :
17885   $as_echo_n "(cached) " >&6
17886 else
17887   if test "$cross_compiling" = yes; then :
17888   case "$host_os" in
17889                            # Guess yes on glibc systems with Linux kernel.
17890               linux*-gnu*) gl_cv_struct_dirent_d_ino="guessing yes" ;;
17891                            # If we don't know, assume the worst.
17892               *)           gl_cv_struct_dirent_d_ino="guessing no" ;;
17893             esac
17894
17895 else
17896   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17897 /* end confdefs.h.  */
17898 #include <sys/types.h>
17899              #include <sys/stat.h>
17900              #include <dirent.h>
17901
17902 int
17903 main ()
17904 {
17905 DIR *dp = opendir (".");
17906              struct dirent *e;
17907              struct stat st;
17908              if (! dp)
17909                return 1;
17910              e = readdir (dp);
17911              if (! e)
17912                return 2;
17913              if (lstat (e->d_name, &st) != 0)
17914                return 3;
17915              if (e->d_ino != st.st_ino)
17916                return 4;
17917              return 0;
17918
17919   ;
17920   return 0;
17921 }
17922 _ACEOF
17923 if ac_fn_c_try_run "$LINENO"; then :
17924   gl_cv_struct_dirent_d_ino=yes
17925 else
17926   gl_cv_struct_dirent_d_ino=no
17927 fi
17928 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17929   conftest.$ac_objext conftest.beam conftest.$ac_ext
17930 fi
17931
17932 fi
17933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_ino" >&5
17934 $as_echo "$gl_cv_struct_dirent_d_ino" >&6; }
17935    case "$gl_cv_struct_dirent_d_ino" in
17936      *yes)
17937
17938 $as_echo "#define D_INO_IN_DIRENT 1" >>confdefs.h
17939
17940        ;;
17941    esac
17942
17943
17944
17945
17946
17947
17948
17949
17950
17951
17952
17953
17954
17955
17956      if test $gl_cv_have_include_next = yes; then
17957        gl_cv_next_dirent_h='<'dirent.h'>'
17958      else
17959        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
17960 $as_echo_n "checking absolute name of <dirent.h>... " >&6; }
17961 if ${gl_cv_next_dirent_h+:} false; then :
17962   $as_echo_n "(cached) " >&6
17963 else
17964
17965              if test $ac_cv_header_dirent_h = yes; then
17966
17967
17968
17969
17970   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17971 /* end confdefs.h.  */
17972 #include <dirent.h>
17973 _ACEOF
17974                 case "$host_os" in
17975     aix*) gl_absname_cpp="$ac_cpp -C" ;;
17976     *)    gl_absname_cpp="$ac_cpp" ;;
17977   esac
17978
17979   case "$host_os" in
17980     mingw*)
17981                                           gl_dirsep_regex='[/\\]'
17982       ;;
17983     *)
17984       gl_dirsep_regex='\/'
17985       ;;
17986   esac
17987       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17988   gl_header_literal_regex=`echo 'dirent.h' \
17989                            | sed -e "$gl_make_literal_regex_sed"`
17990   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17991       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17992       s|^/[^/]|//&|
17993       p
17994       q
17995     }'
17996
17997         gl_cv_absolute_dirent_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17998   sed -n "$gl_absolute_header_sed"`
17999
18000            gl_header=$gl_cv_absolute_dirent_h
18001            gl_cv_next_dirent_h='"'$gl_header'"'
18002           else
18003                gl_cv_next_dirent_h='<'dirent.h'>'
18004              fi
18005
18006
18007 fi
18008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
18009 $as_echo "$gl_cv_next_dirent_h" >&6; }
18010      fi
18011      NEXT_DIRENT_H=$gl_cv_next_dirent_h
18012
18013      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18014        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18015        gl_next_as_first_directive='<'dirent.h'>'
18016      else
18017        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18018        gl_next_as_first_directive=$gl_cv_next_dirent_h
18019      fi
18020      NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive
18021
18022
18023
18024
18025   if test $ac_cv_header_dirent_h = yes; then
18026     HAVE_DIRENT_H=1
18027   else
18028     HAVE_DIRENT_H=0
18029   fi
18030
18031
18032
18033     for gl_func in alphasort closedir dirfd fdopendir opendir readdir rewinddir scandir; do
18034     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
18035     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
18036 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
18037 if eval \${$as_gl_Symbol+:} false; then :
18038   $as_echo_n "(cached) " >&6
18039 else
18040   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18041 /* end confdefs.h.  */
18042 #include <dirent.h>
18043
18044 int
18045 main ()
18046 {
18047 #undef $gl_func
18048   (void) $gl_func;
18049   ;
18050   return 0;
18051 }
18052 _ACEOF
18053 if ac_fn_c_try_compile "$LINENO"; then :
18054   eval "$as_gl_Symbol=yes"
18055 else
18056   eval "$as_gl_Symbol=no"
18057 fi
18058 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18059 fi
18060 eval ac_res=\$$as_gl_Symbol
18061                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18062 $as_echo "$ac_res" >&6; }
18063     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
18064   cat >>confdefs.h <<_ACEOF
18065 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
18066 _ACEOF
18067
18068                      eval ac_cv_have_decl_$gl_func=yes
18069 fi
18070       done
18071
18072
18073
18074
18075
18076
18077
18078 cat >>confdefs.h <<_ACEOF
18079 #define GNULIB_DIRENT_SAFER 1
18080 _ACEOF
18081
18082
18083
18084
18085
18086
18087
18088   for ac_func in dirfd
18089 do :
18090   ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd"
18091 if test "x$ac_cv_func_dirfd" = xyes; then :
18092   cat >>confdefs.h <<_ACEOF
18093 #define HAVE_DIRFD 1
18094 _ACEOF
18095
18096 fi
18097 done
18098
18099   ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
18100       #include <dirent.h>
18101 "
18102 if test "x$ac_cv_have_decl_dirfd" = xyes; then :
18103   ac_have_decl=1
18104 else
18105   ac_have_decl=0
18106 fi
18107
18108 cat >>confdefs.h <<_ACEOF
18109 #define HAVE_DECL_DIRFD $ac_have_decl
18110 _ACEOF
18111
18112   if test $ac_cv_have_decl_dirfd = no; then
18113     HAVE_DECL_DIRFD=0
18114   fi
18115
18116   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dirfd is a macro" >&5
18117 $as_echo_n "checking whether dirfd is a macro... " >&6; }
18118 if ${gl_cv_func_dirfd_macro+:} false; then :
18119   $as_echo_n "(cached) " >&6
18120 else
18121   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18122 /* end confdefs.h.  */
18123
18124 #include <sys/types.h>
18125 #include <dirent.h>
18126 #ifdef dirfd
18127  dirent_header_defines_dirfd
18128 #endif
18129 _ACEOF
18130 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18131   $EGREP "dirent_header_defines_dirfd" >/dev/null 2>&1; then :
18132   gl_cv_func_dirfd_macro=yes
18133 else
18134   gl_cv_func_dirfd_macro=no
18135 fi
18136 rm -f conftest*
18137
18138 fi
18139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dirfd_macro" >&5
18140 $as_echo "$gl_cv_func_dirfd_macro" >&6; }
18141
18142   # Use the replacement only if we have no function or macro with that name.
18143   if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no; then
18144     if test $ac_cv_have_decl_dirfd = yes; then
18145       # If the system declares dirfd already, let's declare rpl_dirfd instead.
18146       REPLACE_DIRFD=1
18147     fi
18148   fi
18149
18150   if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no; then
18151
18152
18153
18154
18155
18156
18157
18158
18159   gl_LIBOBJS="$gl_LIBOBJS dirfd.$ac_objext"
18160
18161
18162   { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get the file descriptor associated with an open DIR*" >&5
18163 $as_echo_n "checking how to get the file descriptor associated with an open DIR*... " >&6; }
18164 if ${gl_cv_sys_dir_fd_member_name+:} false; then :
18165   $as_echo_n "(cached) " >&6
18166 else
18167
18168       dirfd_save_CFLAGS=$CFLAGS
18169       for ac_expr in d_fd dd_fd; do
18170
18171         CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr"
18172         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18173 /* end confdefs.h.  */
18174
18175            #include <sys/types.h>
18176            #include <dirent.h>
18177 int
18178 main ()
18179 {
18180 DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;
18181   ;
18182   return 0;
18183 }
18184 _ACEOF
18185 if ac_fn_c_try_compile "$LINENO"; then :
18186   dir_fd_found=yes
18187
18188 fi
18189 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18190         CFLAGS=$dirfd_save_CFLAGS
18191         test "$dir_fd_found" = yes && break
18192       done
18193       test "$dir_fd_found" = yes || ac_expr=no_such_member
18194
18195       gl_cv_sys_dir_fd_member_name=$ac_expr
18196
18197
18198 fi
18199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_dir_fd_member_name" >&5
18200 $as_echo "$gl_cv_sys_dir_fd_member_name" >&6; }
18201   if test $gl_cv_sys_dir_fd_member_name != no_such_member; then
18202
18203 cat >>confdefs.h <<_ACEOF
18204 #define DIR_FD_MEMBER_NAME $gl_cv_sys_dir_fd_member_name
18205 _ACEOF
18206
18207   fi
18208
18209
18210   fi
18211
18212
18213
18214
18215
18216           GNULIB_DIRFD=1
18217
18218
18219
18220
18221
18222 $as_echo "#define GNULIB_TEST_DIRFD 1" >>confdefs.h
18223
18224
18225
18226
18227
18228
18229
18230
18231 cat >>confdefs.h <<_ACEOF
18232 #define GNULIB_DIRNAME 1
18233 _ACEOF
18234
18235
18236
18237
18238
18239
18240
18241
18242   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
18243 $as_echo_n "checking whether // is distinct from /... " >&6; }
18244 if ${gl_cv_double_slash_root+:} false; then :
18245   $as_echo_n "(cached) " >&6
18246 else
18247    if test x"$cross_compiling" = xyes ; then
18248         # When cross-compiling, there is no way to tell whether // is special
18249         # short of a list of hosts.  However, the only known hosts to date
18250         # that have a distinct // are Apollo DomainOS (too old to port to),
18251         # Cygwin, and z/OS.  If anyone knows of another system for which // has
18252         # special semantics and is distinct from /, please report it to
18253         # <bug-gnulib@gnu.org>.
18254         case $host in
18255           *-cygwin | i370-ibm-openedition)
18256             gl_cv_double_slash_root=yes ;;
18257           *)
18258             # Be optimistic and assume that / and // are the same when we
18259             # don't know.
18260             gl_cv_double_slash_root='unknown, assuming no' ;;
18261         esac
18262       else
18263         set x `ls -di / // 2>/dev/null`
18264         if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
18265           gl_cv_double_slash_root=no
18266         else
18267           gl_cv_double_slash_root=yes
18268         fi
18269       fi
18270 fi
18271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
18272 $as_echo "$gl_cv_double_slash_root" >&6; }
18273   if test "$gl_cv_double_slash_root" = yes; then
18274
18275 $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
18276
18277   fi
18278
18279
18280
18281
18282   if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
18283     REPLACE_DUP=1
18284   fi
18285
18286
18287
18288
18289   if test $ac_cv_func_fchdir = no; then
18290     HAVE_FCHDIR=0
18291   fi
18292
18293     if test $HAVE_FCHDIR = 0; then
18294       REPLACE_DUP=1
18295     fi
18296
18297
18298   if test $REPLACE_DUP = 1; then
18299
18300
18301
18302
18303
18304
18305
18306
18307   gl_LIBOBJS="$gl_LIBOBJS dup.$ac_objext"
18308
18309     :
18310   fi
18311
18312
18313
18314
18315
18316           GNULIB_DUP=1
18317
18318
18319
18320
18321
18322 $as_echo "#define GNULIB_TEST_DUP 1" >>confdefs.h
18323
18324
18325
18326
18327
18328
18329
18330
18331 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
18332
18333
18334   if test $HAVE_DUP2 = 1; then
18335     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
18336 $as_echo_n "checking whether dup2 works... " >&6; }
18337 if ${gl_cv_func_dup2_works+:} false; then :
18338   $as_echo_n "(cached) " >&6
18339 else
18340   if test "$cross_compiling" = yes; then :
18341   case "$host_os" in
18342            mingw*) # on this platform, dup2 always returns 0 for success
18343              gl_cv_func_dup2_works="guessing no" ;;
18344            cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
18345              gl_cv_func_dup2_works="guessing no" ;;
18346            aix* | freebsd*)
18347                    # on AIX 7.1 and FreeBSD 6.1, dup2 (1,toobig) gives EMFILE,
18348                    # not EBADF.
18349              gl_cv_func_dup2_works="guessing no" ;;
18350            haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
18351              gl_cv_func_dup2_works="guessing no" ;;
18352            *-android*) # implemented using dup3(), which fails if oldfd == newfd
18353              gl_cv_func_dup2_works="guessing no" ;;
18354            *) gl_cv_func_dup2_works="guessing yes" ;;
18355          esac
18356 else
18357   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18358 /* end confdefs.h.  */
18359
18360          #include <errno.h>
18361              #include <fcntl.h>
18362              #include <limits.h>
18363              #include <sys/resource.h>
18364              #include <unistd.h>
18365              #ifndef RLIM_SAVED_CUR
18366              # define RLIM_SAVED_CUR RLIM_INFINITY
18367              #endif
18368              #ifndef RLIM_SAVED_MAX
18369              # define RLIM_SAVED_MAX RLIM_INFINITY
18370              #endif
18371
18372 int
18373 main ()
18374 {
18375 int result = 0;
18376              int bad_fd = INT_MAX;
18377              struct rlimit rlim;
18378              if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
18379                  && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
18380                  && rlim.rlim_cur != RLIM_INFINITY
18381                  && rlim.rlim_cur != RLIM_SAVED_MAX
18382                  && rlim.rlim_cur != RLIM_SAVED_CUR)
18383                bad_fd = rlim.rlim_cur;
18384              #ifdef FD_CLOEXEC
18385                if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
18386                  result |= 1;
18387              #endif
18388              if (dup2 (1, 1) != 1)
18389                result |= 2;
18390              #ifdef FD_CLOEXEC
18391                if (fcntl (1, F_GETFD) != FD_CLOEXEC)
18392                  result |= 4;
18393              #endif
18394              close (0);
18395              if (dup2 (0, 0) != -1)
18396                result |= 8;
18397              /* Many gnulib modules require POSIX conformance of EBADF.  */
18398              if (dup2 (2, bad_fd) == -1 && errno != EBADF)
18399                result |= 16;
18400              /* Flush out some cygwin core dumps.  */
18401              if (dup2 (2, -1) != -1 || errno != EBADF)
18402                result |= 32;
18403              dup2 (2, 255);
18404              dup2 (2, 256);
18405              return result;
18406   ;
18407   return 0;
18408 }
18409
18410 _ACEOF
18411 if ac_fn_c_try_run "$LINENO"; then :
18412   gl_cv_func_dup2_works=yes
18413 else
18414   gl_cv_func_dup2_works=no
18415 fi
18416 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18417   conftest.$ac_objext conftest.beam conftest.$ac_ext
18418 fi
18419
18420
18421 fi
18422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
18423 $as_echo "$gl_cv_func_dup2_works" >&6; }
18424     case "$gl_cv_func_dup2_works" in
18425       *yes) ;;
18426       *)
18427         REPLACE_DUP2=1
18428         for ac_func in setdtablesize
18429 do :
18430   ac_fn_c_check_func "$LINENO" "setdtablesize" "ac_cv_func_setdtablesize"
18431 if test "x$ac_cv_func_setdtablesize" = xyes; then :
18432   cat >>confdefs.h <<_ACEOF
18433 #define HAVE_SETDTABLESIZE 1
18434 _ACEOF
18435
18436 fi
18437 done
18438
18439         ;;
18440     esac
18441   fi
18442
18443
18444
18445
18446   if test $ac_cv_func_fchdir = no; then
18447     HAVE_FCHDIR=0
18448   fi
18449
18450     if test $HAVE_FCHDIR = 0; then
18451       if test $HAVE_DUP2 = 1; then
18452         REPLACE_DUP2=1
18453       fi
18454     fi
18455
18456
18457   if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
18458
18459
18460
18461
18462
18463
18464
18465
18466   gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
18467
18468
18469   fi
18470
18471
18472
18473
18474
18475           GNULIB_DUP2=1
18476
18477
18478
18479
18480
18481 $as_echo "#define GNULIB_TEST_DUP2 1" >>confdefs.h
18482
18483
18484
18485
18486
18487
18488
18489
18490
18491           GNULIB_ENVIRON=1
18492
18493
18494
18495
18496
18497 $as_echo "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h
18498
18499
18500
18501
18502
18503       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
18504 $as_echo_n "checking for error_at_line... " >&6; }
18505 if ${ac_cv_lib_error_at_line+:} false; then :
18506   $as_echo_n "(cached) " >&6
18507 else
18508   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18509 /* end confdefs.h.  */
18510 #include <error.h>
18511 int
18512 main ()
18513 {
18514 error_at_line (0, 0, "", 0, "an error occurred");
18515   ;
18516   return 0;
18517 }
18518 _ACEOF
18519 if ac_fn_c_try_link "$LINENO"; then :
18520   ac_cv_lib_error_at_line=yes
18521 else
18522   ac_cv_lib_error_at_line=no
18523 fi
18524 rm -f core conftest.err conftest.$ac_objext \
18525     conftest$ac_exeext conftest.$ac_ext
18526 fi
18527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
18528 $as_echo "$ac_cv_lib_error_at_line" >&6; }
18529
18530   if test $ac_cv_lib_error_at_line = no; then
18531
18532
18533
18534
18535
18536
18537
18538
18539   gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext"
18540
18541
18542
18543   :
18544
18545   fi
18546
18547
18548   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error:3:c-format"
18549
18550
18551
18552   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error_at_line:5:c-format"
18553
18554
18555
18556
18557
18558
18559   for ac_func in euidaccess
18560 do :
18561   ac_fn_c_check_func "$LINENO" "euidaccess" "ac_cv_func_euidaccess"
18562 if test "x$ac_cv_func_euidaccess" = xyes; then :
18563   cat >>confdefs.h <<_ACEOF
18564 #define HAVE_EUIDACCESS 1
18565 _ACEOF
18566
18567 fi
18568 done
18569
18570   if test $ac_cv_func_euidaccess = no; then
18571     HAVE_EUIDACCESS=0
18572   fi
18573
18574   if test $HAVE_EUIDACCESS = 0; then
18575
18576
18577
18578
18579
18580
18581
18582
18583   gl_LIBOBJS="$gl_LIBOBJS euidaccess.$ac_objext"
18584
18585
18586
18587     for ac_header in libgen.h
18588 do :
18589   ac_fn_c_check_header_mongrel "$LINENO" "libgen.h" "ac_cv_header_libgen_h" "$ac_includes_default"
18590 if test "x$ac_cv_header_libgen_h" = xyes; then :
18591   cat >>confdefs.h <<_ACEOF
18592 #define HAVE_LIBGEN_H 1
18593 _ACEOF
18594
18595 fi
18596
18597 done
18598
18599
18600         ac_fn_c_check_func "$LINENO" "getgroups" "ac_cv_func_getgroups"
18601 if test "x$ac_cv_func_getgroups" = xyes; then :
18602
18603 fi
18604
18605
18606   # If we don't yet have getgroups, see if it's in -lbsd.
18607   # This is reported to be necessary on an ITOS 3000WS running SEIUX 3.1.
18608   ac_save_LIBS=$LIBS
18609   if test $ac_cv_func_getgroups = no; then
18610     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getgroups in -lbsd" >&5
18611 $as_echo_n "checking for getgroups in -lbsd... " >&6; }
18612 if ${ac_cv_lib_bsd_getgroups+:} false; then :
18613   $as_echo_n "(cached) " >&6
18614 else
18615   ac_check_lib_save_LIBS=$LIBS
18616 LIBS="-lbsd  $LIBS"
18617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18618 /* end confdefs.h.  */
18619
18620 /* Override any GCC internal prototype to avoid an error.
18621    Use char because int might match the return type of a GCC
18622    builtin and then its argument prototype would still apply.  */
18623 #ifdef __cplusplus
18624 extern "C"
18625 #endif
18626 char getgroups ();
18627 int
18628 main ()
18629 {
18630 return getgroups ();
18631   ;
18632   return 0;
18633 }
18634 _ACEOF
18635 if ac_fn_c_try_link "$LINENO"; then :
18636   ac_cv_lib_bsd_getgroups=yes
18637 else
18638   ac_cv_lib_bsd_getgroups=no
18639 fi
18640 rm -f core conftest.err conftest.$ac_objext \
18641     conftest$ac_exeext conftest.$ac_ext
18642 LIBS=$ac_check_lib_save_LIBS
18643 fi
18644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_getgroups" >&5
18645 $as_echo "$ac_cv_lib_bsd_getgroups" >&6; }
18646 if test "x$ac_cv_lib_bsd_getgroups" = xyes; then :
18647   GETGROUPS_LIB=-lbsd
18648 fi
18649
18650   fi
18651
18652   # Run the program to test the functionality of the system-supplied
18653   # getgroups function only if there is such a function.
18654   if test $ac_cv_func_getgroups = yes; then
18655     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getgroups" >&5
18656 $as_echo_n "checking for working getgroups... " >&6; }
18657 if ${ac_cv_func_getgroups_works+:} false; then :
18658   $as_echo_n "(cached) " >&6
18659 else
18660   if test "$cross_compiling" = yes; then :
18661   case "$host_os" in # ((
18662                     # Guess yes on glibc systems.
18663             *-gnu*) ac_cv_func_getgroups_works="guessing yes" ;;
18664                     # If we don't know, assume the worst.
18665             *)      ac_cv_func_getgroups_works="guessing no" ;;
18666           esac
18667
18668 else
18669   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18670 /* end confdefs.h.  */
18671 $ac_includes_default
18672 int
18673 main ()
18674 {
18675 /* On Ultrix 4.3, getgroups (0, 0) always fails.  */
18676               return getgroups (0, 0) == -1;
18677   ;
18678   return 0;
18679 }
18680
18681 _ACEOF
18682 if ac_fn_c_try_run "$LINENO"; then :
18683   ac_cv_func_getgroups_works=yes
18684 else
18685   ac_cv_func_getgroups_works=no
18686 fi
18687 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18688   conftest.$ac_objext conftest.beam conftest.$ac_ext
18689 fi
18690
18691
18692 fi
18693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getgroups_works" >&5
18694 $as_echo "$ac_cv_func_getgroups_works" >&6; }
18695   else
18696     ac_cv_func_getgroups_works=no
18697   fi
18698   case "$ac_cv_func_getgroups_works" in
18699     *yes)
18700
18701 $as_echo "#define HAVE_GETGROUPS 1" >>confdefs.h
18702
18703       ;;
18704   esac
18705   LIBS=$ac_save_LIBS
18706
18707
18708   # Solaris 9 and 10 need -lgen to get the eaccess function.
18709   # Save and restore LIBS so -lgen isn't added to it.  Otherwise, *all*
18710   # programs in the package would end up linked with that potentially-shared
18711   # library, inducing unnecessary run-time overhead.
18712   LIB_EACCESS=
18713
18714   gl_saved_libs=$LIBS
18715     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing eaccess" >&5
18716 $as_echo_n "checking for library containing eaccess... " >&6; }
18717 if ${ac_cv_search_eaccess+:} false; then :
18718   $as_echo_n "(cached) " >&6
18719 else
18720   ac_func_search_save_LIBS=$LIBS
18721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18722 /* end confdefs.h.  */
18723
18724 /* Override any GCC internal prototype to avoid an error.
18725    Use char because int might match the return type of a GCC
18726    builtin and then its argument prototype would still apply.  */
18727 #ifdef __cplusplus
18728 extern "C"
18729 #endif
18730 char eaccess ();
18731 int
18732 main ()
18733 {
18734 return eaccess ();
18735   ;
18736   return 0;
18737 }
18738 _ACEOF
18739 for ac_lib in '' gen; do
18740   if test -z "$ac_lib"; then
18741     ac_res="none required"
18742   else
18743     ac_res=-l$ac_lib
18744     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
18745   fi
18746   if ac_fn_c_try_link "$LINENO"; then :
18747   ac_cv_search_eaccess=$ac_res
18748 fi
18749 rm -f core conftest.err conftest.$ac_objext \
18750     conftest$ac_exeext
18751   if ${ac_cv_search_eaccess+:} false; then :
18752   break
18753 fi
18754 done
18755 if ${ac_cv_search_eaccess+:} false; then :
18756
18757 else
18758   ac_cv_search_eaccess=no
18759 fi
18760 rm conftest.$ac_ext
18761 LIBS=$ac_func_search_save_LIBS
18762 fi
18763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_eaccess" >&5
18764 $as_echo "$ac_cv_search_eaccess" >&6; }
18765 ac_res=$ac_cv_search_eaccess
18766 if test "$ac_res" != no; then :
18767   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18768   test "$ac_cv_search_eaccess" = "none required" ||
18769                     LIB_EACCESS=$ac_cv_search_eaccess
18770 fi
18771
18772     for ac_func in eaccess
18773 do :
18774   ac_fn_c_check_func "$LINENO" "eaccess" "ac_cv_func_eaccess"
18775 if test "x$ac_cv_func_eaccess" = xyes; then :
18776   cat >>confdefs.h <<_ACEOF
18777 #define HAVE_EACCESS 1
18778 _ACEOF
18779
18780 fi
18781 done
18782
18783   LIBS=$gl_saved_libs
18784
18785   fi
18786
18787
18788
18789
18790
18791           GNULIB_EUIDACCESS=1
18792
18793
18794
18795
18796
18797 $as_echo "#define GNULIB_TEST_EUIDACCESS 1" >>confdefs.h
18798
18799
18800
18801
18802
18803
18804
18805
18806
18807
18808   if test $ac_cv_func_faccessat = no; then
18809     HAVE_FACCESSAT=0
18810   fi
18811
18812   if test $HAVE_FACCESSAT = 0; then
18813
18814
18815
18816
18817
18818
18819
18820
18821   gl_LIBOBJS="$gl_LIBOBJS faccessat.$ac_objext"
18822
18823
18824   for ac_func in access
18825 do :
18826   ac_fn_c_check_func "$LINENO" "access" "ac_cv_func_access"
18827 if test "x$ac_cv_func_access" = xyes; then :
18828   cat >>confdefs.h <<_ACEOF
18829 #define HAVE_ACCESS 1
18830 _ACEOF
18831
18832 fi
18833 done
18834
18835
18836   fi
18837
18838
18839 cat >>confdefs.h <<_ACEOF
18840 #define GNULIB_FACCESSAT 1
18841 _ACEOF
18842
18843
18844
18845
18846
18847
18848
18849           GNULIB_FACCESSAT=1
18850
18851
18852
18853
18854
18855 $as_echo "#define GNULIB_TEST_FACCESSAT 1" >>confdefs.h
18856
18857
18858
18859
18860
18861
18862
18863
18864   if test $ac_cv_have_decl_fchdir = no; then
18865     HAVE_DECL_FCHDIR=0
18866   fi
18867
18868
18869   if test $HAVE_FCHDIR = 0; then
18870
18871
18872
18873
18874
18875
18876
18877
18878   gl_LIBOBJS="$gl_LIBOBJS fchdir.$ac_objext"
18879
18880     :
18881
18882 $as_echo "#define REPLACE_FCHDIR 1" >>confdefs.h
18883
18884                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open can visit directories" >&5
18885 $as_echo_n "checking whether open can visit directories... " >&6; }
18886 if ${gl_cv_func_open_directory_works+:} false; then :
18887   $as_echo_n "(cached) " >&6
18888 else
18889   if test "$cross_compiling" = yes; then :
18890   case "$host_os" in
18891                    # Guess yes on glibc systems.
18892            *-gnu*) gl_cv_func_open_directory_works="guessing yes" ;;
18893                    # If we don't know, assume the worst.
18894            *)      gl_cv_func_open_directory_works="guessing no" ;;
18895          esac
18896
18897 else
18898   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18899 /* end confdefs.h.  */
18900 #include <fcntl.h>
18901
18902 int
18903 main ()
18904 {
18905 return open(".", O_RDONLY) < 0;
18906   ;
18907   return 0;
18908 }
18909 _ACEOF
18910 if ac_fn_c_try_run "$LINENO"; then :
18911   gl_cv_func_open_directory_works=yes
18912 else
18913   gl_cv_func_open_directory_works=no
18914 fi
18915 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18916   conftest.$ac_objext conftest.beam conftest.$ac_ext
18917 fi
18918
18919 fi
18920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_directory_works" >&5
18921 $as_echo "$gl_cv_func_open_directory_works" >&6; }
18922     case "$gl_cv_func_open_directory_works" in
18923       *yes) ;;
18924       *)
18925
18926 $as_echo "#define REPLACE_OPEN_DIRECTORY 1" >>confdefs.h
18927
18928         ;;
18929     esac
18930   fi
18931
18932
18933
18934
18935
18936
18937           GNULIB_FCHDIR=1
18938
18939
18940
18941
18942
18943 $as_echo "#define GNULIB_TEST_FCHDIR 1" >>confdefs.h
18944
18945
18946
18947
18948
18949
18950
18951   if test $ac_cv_func_fchmodat != yes; then
18952     HAVE_FCHMODAT=0
18953   fi
18954
18955   if test $HAVE_FCHMODAT = 0; then
18956
18957
18958
18959
18960
18961
18962
18963
18964   gl_LIBOBJS="$gl_LIBOBJS fchmodat.$ac_objext"
18965
18966   fi
18967
18968
18969 cat >>confdefs.h <<_ACEOF
18970 #define GNULIB_FCHMODAT 1
18971 _ACEOF
18972
18973
18974
18975
18976
18977
18978           GNULIB_FCHMODAT=1
18979
18980
18981
18982
18983
18984 $as_echo "#define GNULIB_TEST_FCHMODAT 1" >>confdefs.h
18985
18986
18987
18988
18989
18990
18991
18992   ac_fn_c_check_func "$LINENO" "fchownat" "ac_cv_func_fchownat"
18993 if test "x$ac_cv_func_fchownat" = xyes; then :
18994
18995
18996
18997   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fchownat works with AT_SYMLINK_NOFOLLOW" >&5
18998 $as_echo_n "checking whether fchownat works with AT_SYMLINK_NOFOLLOW... " >&6; }
18999 if ${gl_cv_func_fchownat_nofollow_works+:} false; then :
19000   $as_echo_n "(cached) " >&6
19001 else
19002
19003      gl_dangle=conftest.dangle
19004      # Remove any remnants of a previous test.
19005      rm -f $gl_dangle
19006      # Arrange for deletion of the temporary file this test creates.
19007      ac_clean_files="$ac_clean_files $gl_dangle"
19008      ln -s conftest.no-such $gl_dangle
19009      if test "$cross_compiling" = yes; then :
19010   gl_cv_func_fchownat_nofollow_works=no
19011 else
19012   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19013 /* end confdefs.h.  */
19014
19015 #include <fcntl.h>
19016 #include <unistd.h>
19017 #include <stdlib.h>
19018 #include <errno.h>
19019 #include <sys/types.h>
19020 int
19021 main ()
19022 {
19023   return (fchownat (AT_FDCWD, "$gl_dangle", -1, getgid (),
19024                     AT_SYMLINK_NOFOLLOW) != 0
19025           && errno == ENOENT);
19026 }
19027
19028 _ACEOF
19029 if ac_fn_c_try_run "$LINENO"; then :
19030   gl_cv_func_fchownat_nofollow_works=yes
19031 else
19032   gl_cv_func_fchownat_nofollow_works=no
19033 fi
19034 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19035   conftest.$ac_objext conftest.beam conftest.$ac_ext
19036 fi
19037
19038
19039 fi
19040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fchownat_nofollow_works" >&5
19041 $as_echo "$gl_cv_func_fchownat_nofollow_works" >&6; }
19042   if test $gl_cv_func_fchownat_nofollow_works = no; then :
19043   REPLACE_FCHOWNAT=1
19044
19045 $as_echo "#define FCHOWNAT_NOFOLLOW_BUG 1" >>confdefs.h
19046
19047
19048 fi
19049
19050
19051
19052
19053   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fchownat works with an empty file name" >&5
19054 $as_echo_n "checking whether fchownat works with an empty file name... " >&6; }
19055 if ${gl_cv_func_fchownat_empty_filename_works+:} false; then :
19056   $as_echo_n "(cached) " >&6
19057 else
19058   if test "$cross_compiling" = yes; then :
19059   gl_cv_func_fchownat_empty_filename_works="guessing no"
19060 else
19061   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19062 /* end confdefs.h.  */
19063 #include <unistd.h>
19064             #include <fcntl.h>
19065
19066 int
19067 main ()
19068 {
19069 int fd;
19070             int ret;
19071             if (mkdir ("conftestdir", 0700) < 0)
19072               return 2;
19073             fd = open ("conftestdir", O_RDONLY);
19074             if (fd < 0)
19075               return 3;
19076             ret = fchownat (fd, "", -1, -1, 0);
19077             close (fd);
19078             rmdir ("conftestdir");
19079             return ret == 0;
19080
19081   ;
19082   return 0;
19083 }
19084 _ACEOF
19085 if ac_fn_c_try_run "$LINENO"; then :
19086   gl_cv_func_fchownat_empty_filename_works=yes
19087 else
19088   gl_cv_func_fchownat_empty_filename_works=no
19089 fi
19090 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19091   conftest.$ac_objext conftest.beam conftest.$ac_ext
19092 fi
19093
19094
19095 fi
19096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fchownat_empty_filename_works" >&5
19097 $as_echo "$gl_cv_func_fchownat_empty_filename_works" >&6; }
19098   if test "$gl_cv_func_fchownat_empty_filename_works" != yes; then :
19099   REPLACE_FCHOWNAT=1
19100
19101 $as_echo "#define FCHOWNAT_EMPTY_FILENAME_BUG 1" >>confdefs.h
19102
19103
19104 fi
19105
19106      if test $REPLACE_CHOWN = 1; then
19107        REPLACE_FCHOWNAT=1
19108      fi
19109 else
19110   HAVE_FCHOWNAT=0
19111 fi
19112
19113
19114   if test $HAVE_FCHOWNAT = 0 || test $REPLACE_FCHOWNAT = 1; then
19115
19116
19117
19118
19119
19120
19121
19122
19123   gl_LIBOBJS="$gl_LIBOBJS fchownat.$ac_objext"
19124
19125   fi
19126
19127
19128 cat >>confdefs.h <<_ACEOF
19129 #define GNULIB_FCHOWNAT 1
19130 _ACEOF
19131
19132
19133
19134
19135
19136
19137           GNULIB_FCHOWNAT=1
19138
19139
19140
19141
19142
19143 $as_echo "#define GNULIB_TEST_FCHOWNAT 1" >>confdefs.h
19144
19145
19146
19147
19148
19149
19150
19151
19152   if test $ac_cv_func_fcntl = no; then
19153
19154
19155
19156   if test $ac_cv_func_fcntl = no; then
19157     HAVE_FCNTL=0
19158   else
19159     REPLACE_FCNTL=1
19160   fi
19161
19162   else
19163             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
19164 $as_echo_n "checking whether fcntl handles F_DUPFD correctly... " >&6; }
19165 if ${gl_cv_func_fcntl_f_dupfd_works+:} false; then :
19166   $as_echo_n "(cached) " >&6
19167 else
19168   if test "$cross_compiling" = yes; then :
19169   case $host_os in
19170             aix* | cygwin* | haiku*)
19171                gl_cv_func_fcntl_f_dupfd_works="guessing no" ;;
19172             *) gl_cv_func_fcntl_f_dupfd_works="guessing yes" ;;
19173           esac
19174 else
19175   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19176 /* end confdefs.h.  */
19177 #include <errno.h>
19178               #include <fcntl.h>
19179               #include <limits.h>
19180               #include <sys/resource.h>
19181               #include <unistd.h>
19182               #ifndef RLIM_SAVED_CUR
19183               # define RLIM_SAVED_CUR RLIM_INFINITY
19184               #endif
19185               #ifndef RLIM_SAVED_MAX
19186               # define RLIM_SAVED_MAX RLIM_INFINITY
19187               #endif
19188
19189 int
19190 main ()
19191 {
19192 int result = 0;
19193               int bad_fd = INT_MAX;
19194               struct rlimit rlim;
19195               if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
19196                   && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
19197                   && rlim.rlim_cur != RLIM_INFINITY
19198                   && rlim.rlim_cur != RLIM_SAVED_MAX
19199                   && rlim.rlim_cur != RLIM_SAVED_CUR)
19200                 bad_fd = rlim.rlim_cur;
19201               if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
19202               if (errno != EINVAL) result |= 2;
19203               if (fcntl (0, F_DUPFD, bad_fd) != -1) result |= 4;
19204               if (errno != EINVAL) result |= 8;
19205               return result;
19206   ;
19207   return 0;
19208 }
19209 _ACEOF
19210 if ac_fn_c_try_run "$LINENO"; then :
19211   gl_cv_func_fcntl_f_dupfd_works=yes
19212 else
19213   gl_cv_func_fcntl_f_dupfd_works=no
19214 fi
19215 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19216   conftest.$ac_objext conftest.beam conftest.$ac_ext
19217 fi
19218
19219 fi
19220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
19221 $as_echo "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
19222     case $gl_cv_func_fcntl_f_dupfd_works in
19223       *yes) ;;
19224       *)
19225
19226
19227   if test $ac_cv_func_fcntl = no; then
19228     HAVE_FCNTL=0
19229   else
19230     REPLACE_FCNTL=1
19231   fi
19232
19233
19234 $as_echo "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
19235  ;;
19236     esac
19237
19238         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
19239 $as_echo_n "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
19240 if ${gl_cv_func_fcntl_f_dupfd_cloexec+:} false; then :
19241   $as_echo_n "(cached) " >&6
19242 else
19243   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19244 /* end confdefs.h.  */
19245
19246 #include <fcntl.h>
19247 #ifndef F_DUPFD_CLOEXEC
19248 choke me
19249 #endif
19250
19251 int
19252 main ()
19253 {
19254
19255   ;
19256   return 0;
19257 }
19258 _ACEOF
19259 if ac_fn_c_try_compile "$LINENO"; then :
19260   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19261 /* end confdefs.h.  */
19262
19263 #ifdef __linux__
19264 /* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
19265    it to support the semantics on older kernels that failed with EINVAL.  */
19266 choke me
19267 #endif
19268
19269 int
19270 main ()
19271 {
19272
19273   ;
19274   return 0;
19275 }
19276 _ACEOF
19277 if ac_fn_c_try_compile "$LINENO"; then :
19278   gl_cv_func_fcntl_f_dupfd_cloexec=yes
19279 else
19280   gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
19281 fi
19282 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19283 else
19284   gl_cv_func_fcntl_f_dupfd_cloexec=no
19285 fi
19286 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19287 fi
19288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
19289 $as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
19290     if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then
19291
19292
19293
19294   if test $ac_cv_func_fcntl = no; then
19295     HAVE_FCNTL=0
19296   else
19297     REPLACE_FCNTL=1
19298   fi
19299
19300           fi
19301   fi
19302
19303
19304
19305
19306   if test $ac_cv_func_fchdir = no; then
19307     HAVE_FCHDIR=0
19308   fi
19309
19310     if test $HAVE_FCHDIR = 0; then
19311
19312
19313
19314   if test $ac_cv_func_fcntl = no; then
19315     HAVE_FCNTL=0
19316   else
19317     REPLACE_FCNTL=1
19318   fi
19319
19320     fi
19321
19322
19323   if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
19324
19325
19326
19327
19328
19329
19330
19331
19332   gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
19333
19334   fi
19335
19336
19337
19338
19339
19340           GNULIB_FCNTL=1
19341
19342
19343
19344
19345
19346 $as_echo "#define GNULIB_TEST_FCNTL 1" >>confdefs.h
19347
19348
19349
19350
19351
19352
19353
19354
19355
19356
19357
19358
19359
19360
19361      if test $gl_cv_have_include_next = yes; then
19362        gl_cv_next_fcntl_h='<'fcntl.h'>'
19363      else
19364        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
19365 $as_echo_n "checking absolute name of <fcntl.h>... " >&6; }
19366 if ${gl_cv_next_fcntl_h+:} false; then :
19367   $as_echo_n "(cached) " >&6
19368 else
19369
19370
19371
19372   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19373 /* end confdefs.h.  */
19374 #include <fcntl.h>
19375 _ACEOF
19376                 case "$host_os" in
19377     aix*) gl_absname_cpp="$ac_cpp -C" ;;
19378     *)    gl_absname_cpp="$ac_cpp" ;;
19379   esac
19380
19381   case "$host_os" in
19382     mingw*)
19383                                           gl_dirsep_regex='[/\\]'
19384       ;;
19385     *)
19386       gl_dirsep_regex='\/'
19387       ;;
19388   esac
19389       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19390   gl_header_literal_regex=`echo 'fcntl.h' \
19391                            | sed -e "$gl_make_literal_regex_sed"`
19392   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19393       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19394       s|^/[^/]|//&|
19395       p
19396       q
19397     }'
19398
19399         gl_cv_absolute_fcntl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19400   sed -n "$gl_absolute_header_sed"`
19401
19402            gl_header=$gl_cv_absolute_fcntl_h
19403            gl_cv_next_fcntl_h='"'$gl_header'"'
19404
19405
19406 fi
19407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
19408 $as_echo "$gl_cv_next_fcntl_h" >&6; }
19409      fi
19410      NEXT_FCNTL_H=$gl_cv_next_fcntl_h
19411
19412      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19413        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19414        gl_next_as_first_directive='<'fcntl.h'>'
19415      else
19416        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19417        gl_next_as_first_directive=$gl_cv_next_fcntl_h
19418      fi
19419      NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
19420
19421
19422
19423
19424
19425
19426
19427
19428
19429
19430     for gl_func in fcntl openat; do
19431     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
19432     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
19433 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
19434 if eval \${$as_gl_Symbol+:} false; then :
19435   $as_echo_n "(cached) " >&6
19436 else
19437   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19438 /* end confdefs.h.  */
19439 #include <fcntl.h>
19440
19441 int
19442 main ()
19443 {
19444 #undef $gl_func
19445   (void) $gl_func;
19446   ;
19447   return 0;
19448 }
19449 _ACEOF
19450 if ac_fn_c_try_compile "$LINENO"; then :
19451   eval "$as_gl_Symbol=yes"
19452 else
19453   eval "$as_gl_Symbol=no"
19454 fi
19455 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19456 fi
19457 eval ac_res=\$$as_gl_Symbol
19458                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
19459 $as_echo "$ac_res" >&6; }
19460     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
19461   cat >>confdefs.h <<_ACEOF
19462 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
19463 _ACEOF
19464
19465                      eval ac_cv_have_decl_$gl_func=yes
19466 fi
19467       done
19468
19469
19470
19471
19472
19473
19474
19475     ac_fn_c_check_decl "$LINENO" "fdopendir" "ac_cv_have_decl_fdopendir" "
19476 #include <dirent.h>
19477
19478 "
19479 if test "x$ac_cv_have_decl_fdopendir" = xyes; then :
19480   ac_have_decl=1
19481 else
19482   ac_have_decl=0
19483 fi
19484
19485 cat >>confdefs.h <<_ACEOF
19486 #define HAVE_DECL_FDOPENDIR $ac_have_decl
19487 _ACEOF
19488 if test $ac_have_decl = 1; then :
19489
19490 else
19491   HAVE_DECL_FDOPENDIR=0
19492 fi
19493
19494
19495   if test $ac_cv_func_fdopendir = no; then
19496     HAVE_FDOPENDIR=0
19497   else
19498     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fdopendir works" >&5
19499 $as_echo_n "checking whether fdopendir works... " >&6; }
19500 if ${gl_cv_func_fdopendir_works+:} false; then :
19501   $as_echo_n "(cached) " >&6
19502 else
19503   if test "$cross_compiling" = yes; then :
19504   case "$host_os" in
19505                     # Guess yes on glibc systems.
19506             *-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;;
19507                     # If we don't know, assume the worst.
19508             *)      gl_cv_func_fdopendir_works="guessing no" ;;
19509           esac
19510
19511 else
19512   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19513 /* end confdefs.h.  */
19514
19515 #include <dirent.h>
19516 #include <fcntl.h>
19517 #include <unistd.h>
19518 #if !HAVE_DECL_FDOPENDIR
19519 extern
19520 # ifdef __cplusplus
19521 "C"
19522 # endif
19523 DIR *fdopendir (int);
19524 #endif
19525
19526 int
19527 main ()
19528 {
19529 int result = 0;
19530      int fd = open ("conftest.c", O_RDONLY);
19531      if (fd < 0) result |= 1;
19532      if (fdopendir (fd)) result |= 2;
19533      if (close (fd)) result |= 4;
19534      return result;
19535   ;
19536   return 0;
19537 }
19538 _ACEOF
19539 if ac_fn_c_try_run "$LINENO"; then :
19540   gl_cv_func_fdopendir_works=yes
19541 else
19542   gl_cv_func_fdopendir_works=no
19543 fi
19544 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19545   conftest.$ac_objext conftest.beam conftest.$ac_ext
19546 fi
19547
19548 fi
19549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopendir_works" >&5
19550 $as_echo "$gl_cv_func_fdopendir_works" >&6; }
19551     case "$gl_cv_func_fdopendir_works" in
19552       *yes) ;;
19553       *)
19554         REPLACE_FDOPENDIR=1
19555         ;;
19556     esac
19557   fi
19558
19559   if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then
19560
19561
19562
19563
19564
19565
19566
19567
19568   gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext"
19569
19570   fi
19571
19572
19573
19574
19575
19576           GNULIB_FDOPENDIR=1
19577
19578
19579
19580
19581
19582 $as_echo "#define GNULIB_TEST_FDOPENDIR 1" >>confdefs.h
19583
19584
19585
19586
19587
19588 cat >>confdefs.h <<_ACEOF
19589 #define GNULIB_FDOPENDIR 1
19590 _ACEOF
19591
19592
19593
19594
19595 cat >>confdefs.h <<_ACEOF
19596 #define GNULIB_FDUTIMENSAT 1
19597 _ACEOF
19598
19599
19600
19601
19602   if test "$enable_acl" != no; then
19603     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getxattr with XATTR_NAME_POSIX_ACL macros" >&5
19604 $as_echo_n "checking for getxattr with XATTR_NAME_POSIX_ACL macros... " >&6; }
19605 if ${gl_cv_getxattr_with_posix_acls+:} false; then :
19606   $as_echo_n "(cached) " >&6
19607 else
19608   gl_cv_getxattr_with_posix_acls=no
19609        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19610 /* end confdefs.h.  */
19611 #include <sys/types.h>
19612               #include <sys/xattr.h>
19613               #include <linux/xattr.h>
19614
19615 int
19616 main ()
19617 {
19618 ssize_t a = getxattr (".", XATTR_NAME_POSIX_ACL_ACCESS, 0, 0);
19619               ssize_t b = getxattr (".", XATTR_NAME_POSIX_ACL_DEFAULT, 0, 0);
19620               return a < 0 || b < 0;
19621
19622   ;
19623   return 0;
19624 }
19625 _ACEOF
19626 if ac_fn_c_try_link "$LINENO"; then :
19627   gl_cv_getxattr_with_posix_acls=yes
19628 fi
19629 rm -f core conftest.err conftest.$ac_objext \
19630     conftest$ac_exeext conftest.$ac_ext
19631 fi
19632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_getxattr_with_posix_acls" >&5
19633 $as_echo "$gl_cv_getxattr_with_posix_acls" >&6; }
19634   fi
19635   if test "$gl_cv_getxattr_with_posix_acls" = yes; then
19636     LIB_HAS_ACL=
19637
19638 $as_echo "#define GETXATTR_WITH_POSIX_ACLS 1" >>confdefs.h
19639
19640   else
19641             gl_need_lib_has_acl=1
19642     LIB_HAS_ACL=$LIB_ACL
19643   fi
19644
19645
19646
19647
19648     ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
19649 if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
19650
19651 cat >>confdefs.h <<_ACEOF
19652 #define HAVE_STRUCT_STAT_ST_BLOCKS 1
19653 _ACEOF
19654
19655
19656 $as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
19657
19658 else
19659   :
19660 fi
19661
19662
19663
19664
19665   if test $ac_cv_member_struct_stat_st_blocks = no; then
19666
19667
19668
19669
19670
19671
19672
19673
19674   gl_LIBOBJS="$gl_LIBOBJS fileblocks.$ac_objext"
19675
19676
19677
19678   :
19679
19680   fi
19681
19682
19683
19684
19685   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array member" >&5
19686 $as_echo_n "checking for flexible array member... " >&6; }
19687 if ${ac_cv_c_flexmember+:} false; then :
19688   $as_echo_n "(cached) " >&6
19689 else
19690   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19691 /* end confdefs.h.  */
19692 #include <stdlib.h>
19693             #include <stdio.h>
19694             #include <stddef.h>
19695             struct s { int n; double d[]; };
19696 int
19697 main ()
19698 {
19699 int m = getchar ();
19700             struct s *p = malloc (offsetof (struct s, d)
19701                                   + m * sizeof (double));
19702             p->d[0] = 0.0;
19703             return p->d != (double *) NULL;
19704   ;
19705   return 0;
19706 }
19707 _ACEOF
19708 if ac_fn_c_try_compile "$LINENO"; then :
19709   ac_cv_c_flexmember=yes
19710 else
19711   ac_cv_c_flexmember=no
19712 fi
19713 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19714 fi
19715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
19716 $as_echo "$ac_cv_c_flexmember" >&6; }
19717   if test $ac_cv_c_flexmember = yes; then
19718
19719 $as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
19720
19721   else
19722     $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
19723
19724   fi
19725
19726
19727
19728
19729   FLOAT_H=
19730   REPLACE_FLOAT_LDBL=0
19731   case "$host_os" in
19732     aix* | beos* | openbsd* | mirbsd* | irix*)
19733       FLOAT_H=float.h
19734       ;;
19735     freebsd*)
19736       case "$host_cpu" in
19737         i[34567]86 )
19738           FLOAT_H=float.h
19739           ;;
19740         x86_64 )
19741           # On x86_64 systems, the C compiler may still be generating
19742           # 32-bit code.
19743           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19744 /* end confdefs.h.  */
19745 #if defined __LP64__ || defined __x86_64__ || defined __amd64__
19746              yes
19747              #endif
19748 _ACEOF
19749 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19750   $EGREP "yes" >/dev/null 2>&1; then :
19751
19752 else
19753   FLOAT_H=float.h
19754 fi
19755 rm -f conftest*
19756
19757           ;;
19758       esac
19759       ;;
19760     linux*)
19761       case "$host_cpu" in
19762         powerpc*)
19763           FLOAT_H=float.h
19764           ;;
19765       esac
19766       ;;
19767   esac
19768   case "$host_os" in
19769     aix* | freebsd* | linux*)
19770       if test -n "$FLOAT_H"; then
19771         REPLACE_FLOAT_LDBL=1
19772       fi
19773       ;;
19774   esac
19775
19776     REPLACE_ITOLD=0
19777   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5
19778 $as_echo_n "checking whether conversion from 'int' to 'long double' works... " >&6; }
19779 if ${gl_cv_func_itold_works+:} false; then :
19780   $as_echo_n "(cached) " >&6
19781 else
19782
19783       if test "$cross_compiling" = yes; then :
19784   case "$host" in
19785            sparc*-*-linux*)
19786              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19787 /* end confdefs.h.  */
19788 #if defined __LP64__ || defined __arch64__
19789                 yes
19790                 #endif
19791 _ACEOF
19792 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19793   $EGREP "yes" >/dev/null 2>&1; then :
19794   gl_cv_func_itold_works="guessing no"
19795 else
19796   gl_cv_func_itold_works="guessing yes"
19797 fi
19798 rm -f conftest*
19799
19800              ;;
19801            *) gl_cv_func_itold_works="guessing yes" ;;
19802          esac
19803
19804 else
19805   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19806 /* end confdefs.h.  */
19807
19808 int i = -1;
19809 volatile long double ld;
19810 int main ()
19811 {
19812   ld += i * 1.0L;
19813   if (ld > 0)
19814     return 1;
19815   return 0;
19816 }
19817 _ACEOF
19818 if ac_fn_c_try_run "$LINENO"; then :
19819   gl_cv_func_itold_works=yes
19820 else
19821   gl_cv_func_itold_works=no
19822 fi
19823 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19824   conftest.$ac_objext conftest.beam conftest.$ac_ext
19825 fi
19826
19827
19828 fi
19829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5
19830 $as_echo "$gl_cv_func_itold_works" >&6; }
19831   case "$gl_cv_func_itold_works" in
19832     *no)
19833       REPLACE_ITOLD=1
19834                   FLOAT_H=float.h
19835       ;;
19836   esac
19837
19838   if test -n "$FLOAT_H"; then
19839
19840
19841
19842
19843
19844
19845
19846
19847      if test $gl_cv_have_include_next = yes; then
19848        gl_cv_next_float_h='<'float.h'>'
19849      else
19850        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
19851 $as_echo_n "checking absolute name of <float.h>... " >&6; }
19852 if ${gl_cv_next_float_h+:} false; then :
19853   $as_echo_n "(cached) " >&6
19854 else
19855
19856
19857
19858   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19859 /* end confdefs.h.  */
19860 #include <float.h>
19861 _ACEOF
19862                 case "$host_os" in
19863     aix*) gl_absname_cpp="$ac_cpp -C" ;;
19864     *)    gl_absname_cpp="$ac_cpp" ;;
19865   esac
19866
19867   case "$host_os" in
19868     mingw*)
19869                                           gl_dirsep_regex='[/\\]'
19870       ;;
19871     *)
19872       gl_dirsep_regex='\/'
19873       ;;
19874   esac
19875       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19876   gl_header_literal_regex=`echo 'float.h' \
19877                            | sed -e "$gl_make_literal_regex_sed"`
19878   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19879       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19880       s|^/[^/]|//&|
19881       p
19882       q
19883     }'
19884
19885         gl_cv_absolute_float_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19886   sed -n "$gl_absolute_header_sed"`
19887
19888            gl_header=$gl_cv_absolute_float_h
19889            gl_cv_next_float_h='"'$gl_header'"'
19890
19891
19892 fi
19893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
19894 $as_echo "$gl_cv_next_float_h" >&6; }
19895      fi
19896      NEXT_FLOAT_H=$gl_cv_next_float_h
19897
19898      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19899        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19900        gl_next_as_first_directive='<'float.h'>'
19901      else
19902        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19903        gl_next_as_first_directive=$gl_cv_next_float_h
19904      fi
19905      NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive
19906
19907
19908
19909
19910   fi
19911
19912    if test -n "$FLOAT_H"; then
19913   GL_GENERATE_FLOAT_H_TRUE=
19914   GL_GENERATE_FLOAT_H_FALSE='#'
19915 else
19916   GL_GENERATE_FLOAT_H_TRUE='#'
19917   GL_GENERATE_FLOAT_H_FALSE=
19918 fi
19919
19920
19921
19922   if test $REPLACE_FLOAT_LDBL = 1; then
19923
19924
19925
19926
19927
19928
19929
19930
19931   gl_LIBOBJS="$gl_LIBOBJS float.$ac_objext"
19932
19933   fi
19934   if test $REPLACE_ITOLD = 1; then
19935
19936
19937
19938
19939
19940
19941
19942
19943   gl_LIBOBJS="$gl_LIBOBJS itold.$ac_objext"
19944
19945   fi
19946
19947
19948
19949
19950
19951   FNMATCH_H=
19952   gl_fnmatch_required_lowercase=`
19953     echo $gl_fnmatch_required | LC_ALL=C tr '[A-Z]' '[a-z]'
19954   `
19955   gl_fnmatch_cache_var="gl_cv_func_fnmatch_${gl_fnmatch_required_lowercase}"
19956   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working $gl_fnmatch_required fnmatch" >&5
19957 $as_echo_n "checking for working $gl_fnmatch_required fnmatch... " >&6; }
19958 if eval \${$gl_fnmatch_cache_var+:} false; then :
19959   $as_echo_n "(cached) " >&6
19960 else
19961                            if test $gl_fnmatch_required = GNU; then
19962        gl_fnmatch_gnu_start=
19963        gl_fnmatch_gnu_end=
19964      else
19965        gl_fnmatch_gnu_start='#if 0'
19966        gl_fnmatch_gnu_end='#endif'
19967      fi
19968      if test "$cross_compiling" = yes; then :
19969   eval "$gl_fnmatch_cache_var=\"guessing no\""
19970 else
19971   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19972 /* end confdefs.h.  */
19973 #include <fnmatch.h>
19974             static int
19975             y (char const *pattern, char const *string, int flags)
19976             {
19977               return fnmatch (pattern, string, flags) == 0;
19978             }
19979             static int
19980             n (char const *pattern, char const *string, int flags)
19981             {
19982               return fnmatch (pattern, string, flags) == FNM_NOMATCH;
19983             }
19984
19985 int
19986 main ()
19987 {
19988 char const *Apat = 'A' < '\\\\' ? "[A-\\\\\\\\]" : "[\\\\\\\\-A]";
19989             char const *apat = 'a' < '\\\\' ? "[a-\\\\\\\\]" : "[\\\\\\\\-a]";
19990             static char const A_1[] = { 'A' - 1, 0 };
19991             static char const A01[] = { 'A' + 1, 0 };
19992             static char const a_1[] = { 'a' - 1, 0 };
19993             static char const a01[] = { 'a' + 1, 0 };
19994             static char const bs_1[] = { '\\\\' - 1, 0 };
19995             static char const bs01[] = { '\\\\' + 1, 0 };
19996             int result = 0;
19997             if (!n ("a*", "", 0))
19998               return 1;
19999             if (!y ("a*", "abc", 0))
20000               return 1;
20001             if (!y ("[/b", "[/b", 0)) /*"]]"*/ /* glibc Bugzilla bug 12378 */
20002               return 1;
20003             if (!n ("d*/*1", "d/s/1", FNM_PATHNAME))
20004               return 2;
20005             if (!y ("a\\\\bc", "abc", 0))
20006               return 3;
20007             if (!n ("a\\\\bc", "abc", FNM_NOESCAPE))
20008               return 3;
20009             if (!y ("*x", ".x", 0))
20010               return 4;
20011             if (!n ("*x", ".x", FNM_PERIOD))
20012               return 4;
20013             if (!y (Apat, "\\\\", 0))
20014               return 5;
20015             if (!y (Apat, "A", 0))
20016               return 5;
20017             if (!y (apat, "\\\\", 0))
20018               return 5;
20019             if (!y (apat, "a", 0))
20020               return 5;
20021             if (!(n (Apat, A_1, 0) == ('A' < '\\\\')))
20022               return 5;
20023             if (!(n (apat, a_1, 0) == ('a' < '\\\\')))
20024               return 5;
20025             if (!(y (Apat, A01, 0) == ('A' < '\\\\')))
20026               return 5;
20027             if (!(y (apat, a01, 0) == ('a' < '\\\\')))
20028               return 5;
20029             if (!(y (Apat, bs_1, 0) == ('A' < '\\\\')))
20030               return 5;
20031             if (!(y (apat, bs_1, 0) == ('a' < '\\\\')))
20032               return 5;
20033             if (!(n (Apat, bs01, 0) == ('A' < '\\\\')))
20034               return 5;
20035             if (!(n (apat, bs01, 0) == ('a' < '\\\\')))
20036               return 5;
20037             $gl_fnmatch_gnu_start
20038             if (!y ("xxXX", "xXxX", FNM_CASEFOLD))
20039               result |= 8;
20040             if (!y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH))
20041               result |= 16;
20042             if (!n ("d*/*1", "d/s/1", FNM_FILE_NAME))
20043               result |= 32;
20044             if (!y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR))
20045               result |= 64;
20046             if (!y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR))
20047               result |= 64;
20048             if (!y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR))
20049               result |= 64;
20050             $gl_fnmatch_gnu_end
20051             return result;
20052
20053   ;
20054   return 0;
20055 }
20056 _ACEOF
20057 if ac_fn_c_try_run "$LINENO"; then :
20058   eval "$gl_fnmatch_cache_var=yes"
20059 else
20060   eval "$gl_fnmatch_cache_var=no"
20061 fi
20062 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20063   conftest.$ac_objext conftest.beam conftest.$ac_ext
20064 fi
20065
20066
20067 fi
20068 eval ac_res=\$$gl_fnmatch_cache_var
20069                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20070 $as_echo "$ac_res" >&6; }
20071   eval "gl_fnmatch_result=\"\$$gl_fnmatch_cache_var\""
20072   if test "$gl_fnmatch_result" = yes; then
20073             rm -f "$gl_source_base/fnmatch.h"
20074   else
20075     FNMATCH_H=fnmatch.h
20076   fi
20077
20078    if test -n "$FNMATCH_H"; then
20079   GL_GENERATE_FNMATCH_H_TRUE=
20080   GL_GENERATE_FNMATCH_H_FALSE='#'
20081 else
20082   GL_GENERATE_FNMATCH_H_TRUE='#'
20083   GL_GENERATE_FNMATCH_H_FALSE=
20084 fi
20085
20086
20087   if test -n "$FNMATCH_H"; then
20088
20089
20090
20091
20092
20093
20094
20095
20096   gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
20097
20098
20099
20100 cat >>confdefs.h <<_ACEOF
20101 #define fnmatch ${gl_fnmatch_required_lowercase}_fnmatch
20102 _ACEOF
20103
20104
20105   ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
20106 "
20107 if test "x$ac_cv_have_decl_isblank" = xyes; then :
20108   ac_have_decl=1
20109 else
20110   ac_have_decl=0
20111 fi
20112
20113 cat >>confdefs.h <<_ACEOF
20114 #define HAVE_DECL_ISBLANK $ac_have_decl
20115 _ACEOF
20116
20117
20118
20119
20120   fi
20121
20122
20123
20124
20125
20126   if test -n "$FNMATCH_H"; then
20127
20128
20129
20130
20131
20132
20133
20134
20135   gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
20136
20137
20138
20139 cat >>confdefs.h <<_ACEOF
20140 #define fnmatch ${gl_fnmatch_required_lowercase}_fnmatch
20141 _ACEOF
20142
20143
20144   ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
20145 "
20146 if test "x$ac_cv_have_decl_isblank" = xyes; then :
20147   ac_have_decl=1
20148 else
20149   ac_have_decl=0
20150 fi
20151
20152 cat >>confdefs.h <<_ACEOF
20153 #define HAVE_DECL_ISBLANK $ac_have_decl
20154 _ACEOF
20155
20156
20157
20158
20159   fi
20160
20161
20162   fp_headers='
20163     #include <stdio.h>
20164     #if HAVE_STDIO_EXT_H
20165     # include <stdio_ext.h>
20166     #endif
20167   '
20168   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpending" >&5
20169 $as_echo_n "checking for __fpending... " >&6; }
20170 if ${gl_cv_func___fpending+:} false; then :
20171   $as_echo_n "(cached) " >&6
20172 else
20173
20174       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20175 /* end confdefs.h.  */
20176 $fp_headers
20177 int
20178 main ()
20179 {
20180 return ! __fpending (stdin);
20181   ;
20182   return 0;
20183 }
20184 _ACEOF
20185 if ac_fn_c_try_link "$LINENO"; then :
20186   gl_cv_func___fpending=yes
20187 else
20188   gl_cv_func___fpending=no
20189 fi
20190 rm -f core conftest.err conftest.$ac_objext \
20191     conftest$ac_exeext conftest.$ac_ext
20192
20193 fi
20194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func___fpending" >&5
20195 $as_echo "$gl_cv_func___fpending" >&6; }
20196   if test $gl_cv_func___fpending = yes; then
20197     ac_fn_c_check_decl "$LINENO" "__fpending" "ac_cv_have_decl___fpending" "$fp_headers
20198 "
20199 if test "x$ac_cv_have_decl___fpending" = xyes; then :
20200   ac_have_decl=1
20201 else
20202   ac_have_decl=0
20203 fi
20204
20205 cat >>confdefs.h <<_ACEOF
20206 #define HAVE_DECL___FPENDING $ac_have_decl
20207 _ACEOF
20208
20209   fi
20210
20211   if test $gl_cv_func___fpending = no; then
20212
20213
20214
20215
20216
20217
20218
20219
20220   gl_LIBOBJS="$gl_LIBOBJS fpending.$ac_objext"
20221
20222
20223   { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to determine the number of pending output bytes on a stream" >&5
20224 $as_echo_n "checking how to determine the number of pending output bytes on a stream... " >&6; }
20225 if ${ac_cv_sys_pending_output_n_bytes+:} false; then :
20226   $as_echo_n "(cached) " >&6
20227 else
20228
20229       for ac_expr in                                                    \
20230                                                                         \
20231           '# glibc2'                                                    \
20232           'fp->_IO_write_ptr - fp->_IO_write_base'                      \
20233                                                                         \
20234           '# traditional Unix'                                          \
20235           'fp->_ptr - fp->_base'                                        \
20236                                                                         \
20237           '# BSD'                                                       \
20238           'fp->_p - fp->_bf._base'                                      \
20239                                                                         \
20240           '# SCO, Unixware'                                             \
20241           '(fp->__ptr ? fp->__ptr - fp->__base : 0)'                    \
20242                                                                         \
20243           '# QNX'                                                       \
20244           '(fp->_Mode & 0x2000 /*_MWRITE*/ ? fp->_Next - fp->_Buf : 0)' \
20245                                                                         \
20246           '# old glibc?'                                                \
20247           'fp->__bufp - fp->__buffer'                                   \
20248                                                                         \
20249           '# old glibc iostream?'                                       \
20250           'fp->_pptr - fp->_pbase'                                      \
20251                                                                         \
20252           '# emx+gcc'                                                   \
20253           'fp->_ptr - fp->_buffer'                                      \
20254                                                                         \
20255           '# Minix'                                                     \
20256           'fp->_ptr - fp->_buf'                                         \
20257                                                                         \
20258           '# Plan9'                                                     \
20259           'fp->wp - fp->buf'                                            \
20260                                                                         \
20261           '# VMS'                                                       \
20262           '(*fp)->_ptr - (*fp)->_base'                                  \
20263                                                                         \
20264           '# e.g., DGUX R4.11; the info is not available'               \
20265           1                                                             \
20266           ; do
20267
20268         # Skip each embedded comment.
20269         case "$ac_expr" in '#'*) continue;; esac
20270
20271         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20272 /* end confdefs.h.  */
20273 #include <stdio.h>
20274 int
20275 main ()
20276 {
20277 FILE *fp = stdin; (void) ($ac_expr);
20278   ;
20279   return 0;
20280 }
20281 _ACEOF
20282 if ac_fn_c_try_compile "$LINENO"; then :
20283   fp_done=yes
20284
20285 fi
20286 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20287         test "$fp_done" = yes && break
20288       done
20289
20290       ac_cv_sys_pending_output_n_bytes=$ac_expr
20291
20292
20293 fi
20294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_pending_output_n_bytes" >&5
20295 $as_echo "$ac_cv_sys_pending_output_n_bytes" >&6; }
20296
20297 cat >>confdefs.h <<_ACEOF
20298 #define PENDING_OUTPUT_N_BYTES $ac_cv_sys_pending_output_n_bytes
20299 _ACEOF
20300
20301
20302   fi
20303
20304
20305
20306     if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then
20307     REPLACE_FSEEK=1
20308   fi
20309
20310   if test $REPLACE_FSEEK = 1; then
20311
20312
20313
20314
20315
20316
20317
20318
20319   gl_LIBOBJS="$gl_LIBOBJS fseek.$ac_objext"
20320
20321   fi
20322
20323
20324
20325
20326
20327           GNULIB_FSEEK=1
20328
20329
20330
20331
20332
20333 $as_echo "#define GNULIB_TEST_FSEEK 1" >>confdefs.h
20334
20335
20336
20337
20338
20339
20340
20341
20342
20343
20344
20345   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fseeko" >&5
20346 $as_echo_n "checking for fseeko... " >&6; }
20347 if ${gl_cv_func_fseeko+:} false; then :
20348   $as_echo_n "(cached) " >&6
20349 else
20350
20351       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20352 /* end confdefs.h.  */
20353 #include <stdio.h>
20354
20355 int
20356 main ()
20357 {
20358 fseeko (stdin, 0, 0);
20359   ;
20360   return 0;
20361 }
20362 _ACEOF
20363 if ac_fn_c_try_link "$LINENO"; then :
20364   gl_cv_func_fseeko=yes
20365 else
20366   gl_cv_func_fseeko=no
20367 fi
20368 rm -f core conftest.err conftest.$ac_objext \
20369     conftest$ac_exeext conftest.$ac_ext
20370
20371 fi
20372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fseeko" >&5
20373 $as_echo "$gl_cv_func_fseeko" >&6; }
20374
20375
20376   if test $ac_cv_have_decl_fseeko = no; then
20377     HAVE_DECL_FSEEKO=0
20378   fi
20379
20380   if test $gl_cv_func_fseeko = no; then
20381     HAVE_FSEEKO=0
20382   else
20383     if test $WINDOWS_64_BIT_OFF_T = 1; then
20384       REPLACE_FSEEKO=1
20385     fi
20386     if test $gl_cv_var_stdin_large_offset = no; then
20387       REPLACE_FSEEKO=1
20388     fi
20389
20390   fi
20391
20392   if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then
20393
20394
20395
20396
20397
20398
20399
20400
20401   gl_LIBOBJS="$gl_LIBOBJS fseeko.$ac_objext"
20402
20403
20404       for ac_func in _fseeki64
20405 do :
20406   ac_fn_c_check_func "$LINENO" "_fseeki64" "ac_cv_func__fseeki64"
20407 if test "x$ac_cv_func__fseeki64" = xyes; then :
20408   cat >>confdefs.h <<_ACEOF
20409 #define HAVE__FSEEKI64 1
20410 _ACEOF
20411
20412 fi
20413 done
20414
20415
20416   fi
20417
20418
20419
20420
20421
20422           GNULIB_FSEEKO=1
20423
20424
20425
20426
20427
20428 $as_echo "#define GNULIB_TEST_FSEEKO 1" >>confdefs.h
20429
20430
20431
20432
20433
20434
20435
20436   if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
20437     REPLACE_FSTAT=1
20438   fi
20439
20440
20441   if test $WINDOWS_64_BIT_ST_SIZE = 1; then
20442     REPLACE_FSTAT=1
20443   fi
20444
20445
20446
20447
20448
20449   if test $ac_cv_func_fchdir = no; then
20450     HAVE_FCHDIR=0
20451   fi
20452
20453     if test $HAVE_FCHDIR = 0; then
20454       case "$gl_cv_func_open_directory_works" in
20455         *yes) ;;
20456         *)
20457           REPLACE_FSTAT=1
20458           ;;
20459       esac
20460     fi
20461
20462
20463   if test $REPLACE_FSTAT = 1; then
20464
20465
20466
20467
20468
20469
20470
20471
20472   gl_LIBOBJS="$gl_LIBOBJS fstat.$ac_objext"
20473
20474     :
20475   fi
20476
20477
20478
20479
20480
20481           GNULIB_FSTAT=1
20482
20483
20484
20485
20486
20487 $as_echo "#define GNULIB_TEST_FSTAT 1" >>confdefs.h
20488
20489
20490
20491
20492
20493
20494
20495
20496
20497   if test $ac_cv_func_fstatat = no; then
20498     HAVE_FSTATAT=0
20499   else
20500             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fstatat (..., 0) works" >&5
20501 $as_echo_n "checking whether fstatat (..., 0) works... " >&6; }
20502 if ${gl_cv_func_fstatat_zero_flag+:} false; then :
20503   $as_echo_n "(cached) " >&6
20504 else
20505   if test "$cross_compiling" = yes; then :
20506   case "$host_os" in
20507             aix*) gl_cv_func_fstatat_zero_flag="guessing no";;
20508             *)    gl_cv_func_fstatat_zero_flag="guessing yes";;
20509           esac
20510
20511 else
20512   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20513 /* end confdefs.h.  */
20514
20515               #include <fcntl.h>
20516               #include <sys/stat.h>
20517               int
20518               main (void)
20519               {
20520                 struct stat a;
20521                 return fstatat (AT_FDCWD, ".", &a, 0) != 0;
20522               }
20523
20524 _ACEOF
20525 if ac_fn_c_try_run "$LINENO"; then :
20526   gl_cv_func_fstatat_zero_flag=yes
20527 else
20528   gl_cv_func_fstatat_zero_flag=no
20529 fi
20530 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20531   conftest.$ac_objext conftest.beam conftest.$ac_ext
20532 fi
20533
20534
20535 fi
20536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fstatat_zero_flag" >&5
20537 $as_echo "$gl_cv_func_fstatat_zero_flag" >&6; }
20538
20539     case $gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in
20540     *yes+*yes) ;;
20541     *) REPLACE_FSTATAT=1
20542        case $gl_cv_func_fstatat_zero_flag in
20543        *yes)
20544
20545 $as_echo "#define HAVE_WORKING_FSTATAT_ZERO_FLAG 1" >>confdefs.h
20546
20547          ;;
20548        esac
20549        ;;
20550     esac
20551   fi
20552
20553   if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
20554
20555
20556
20557
20558
20559
20560
20561
20562   gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext"
20563
20564   fi
20565
20566
20567
20568
20569
20570           GNULIB_FSTATAT=1
20571
20572
20573
20574
20575
20576 $as_echo "#define GNULIB_TEST_FSTATAT 1" >>confdefs.h
20577
20578
20579
20580
20581
20582
20583
20584   if test $ac_cv_func_futimens = no; then
20585     HAVE_FUTIMENS=0
20586   else
20587     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether futimens works" >&5
20588 $as_echo_n "checking whether futimens works... " >&6; }
20589 if ${gl_cv_func_futimens_works+:} false; then :
20590   $as_echo_n "(cached) " >&6
20591 else
20592   if test "$cross_compiling" = yes; then :
20593   gl_cv_func_futimens_works="guessing no"
20594 else
20595   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20596 /* end confdefs.h.  */
20597
20598 #include <fcntl.h>
20599 #include <sys/stat.h>
20600 #include <unistd.h>
20601 #include <errno.h>
20602
20603 int
20604 main ()
20605 {
20606 struct timespec ts[2] = { { 1, UTIME_OMIT }, { 1, UTIME_NOW } };
20607       int fd = creat ("conftest.file", 0600);
20608       struct stat st;
20609       if (fd < 0) return 1;
20610       errno = 0;
20611       if (futimens (AT_FDCWD, NULL) == 0) return 2;
20612       if (errno != EBADF) return 3;
20613       if (futimens (fd, ts)) return 4;
20614       sleep (1);
20615       ts[0].tv_nsec = UTIME_NOW;
20616       ts[1].tv_nsec = UTIME_OMIT;
20617       if (futimens (fd, ts)) return 5;
20618       if (fstat (fd, &st)) return 6;
20619       if (st.st_ctime < st.st_atime) return 7;
20620
20621   ;
20622   return 0;
20623 }
20624 _ACEOF
20625 if ac_fn_c_try_run "$LINENO"; then :
20626            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20627 /* end confdefs.h.  */
20628
20629 #ifdef __linux__
20630 /* The Linux kernel added futimens in 2.6.22, but has bugs with UTIME_OMIT
20631    in several file systems as recently as 2.6.32.  Always replace futimens
20632    to support older kernels.  */
20633 choke me
20634 #endif
20635
20636 int
20637 main ()
20638 {
20639
20640   ;
20641   return 0;
20642 }
20643 _ACEOF
20644 if ac_fn_c_try_compile "$LINENO"; then :
20645   gl_cv_func_futimens_works=yes
20646 else
20647   gl_cv_func_futimens_works="needs runtime check"
20648 fi
20649 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20650 else
20651   gl_cv_func_futimens_works=no
20652 fi
20653 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20654   conftest.$ac_objext conftest.beam conftest.$ac_ext
20655 fi
20656
20657       rm -f conftest.file
20658 fi
20659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_futimens_works" >&5
20660 $as_echo "$gl_cv_func_futimens_works" >&6; }
20661     if test "$gl_cv_func_futimens_works" != yes; then
20662       REPLACE_FUTIMENS=1
20663     fi
20664   fi
20665
20666   if test $HAVE_FUTIMENS = 0 || test $REPLACE_FUTIMENS = 1; then
20667
20668
20669
20670
20671
20672
20673
20674
20675   gl_LIBOBJS="$gl_LIBOBJS futimens.$ac_objext"
20676
20677   fi
20678
20679
20680
20681
20682
20683           GNULIB_FUTIMENS=1
20684
20685
20686
20687
20688
20689 $as_echo "#define GNULIB_TEST_FUTIMENS 1" >>confdefs.h
20690
20691
20692
20693
20694
20695
20696
20697
20698   gl_abort_bug=no
20699   case "$host_os" in
20700     mingw*)
20701       gl_cv_func_getcwd_path_max=yes
20702       ;;
20703     *)
20704
20705
20706
20707
20708
20709   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd handles long file names properly" >&5
20710 $as_echo_n "checking whether getcwd handles long file names properly... " >&6; }
20711 if ${gl_cv_func_getcwd_path_max+:} false; then :
20712   $as_echo_n "(cached) " >&6
20713 else
20714   # Arrange for deletion of the temporary directory this test creates.
20715      ac_clean_files="$ac_clean_files confdir3"
20716           if test "$cross_compiling" = yes; then :
20717   case "$host_os" in
20718        aix*) gl_cv_func_getcwd_path_max='no, it has the AIX bug';;
20719        *) gl_cv_func_getcwd_path_max=no;;
20720      esac
20721 else
20722   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20723 /* end confdefs.h.  */
20724
20725 #include <errno.h>
20726 #include <stdlib.h>
20727 #if HAVE_UNISTD_H
20728 # include <unistd.h>
20729 #else
20730 # include <direct.h>
20731 #endif
20732 #include <string.h>
20733 #include <limits.h>
20734 #include <sys/stat.h>
20735 #include <sys/types.h>
20736 #include <fcntl.h>
20737
20738
20739 /* Arrange to define PATH_MAX, like "pathmax.h" does. */
20740 #if HAVE_UNISTD_H
20741 # include <unistd.h>
20742 #endif
20743 #include <limits.h>
20744 #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
20745 # include <sys/param.h>
20746 #endif
20747 #if !defined PATH_MAX && defined MAXPATHLEN
20748 # define PATH_MAX MAXPATHLEN
20749 #endif
20750 #ifdef __hpux
20751 # undef PATH_MAX
20752 # define PATH_MAX 1024
20753 #endif
20754 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
20755 # undef PATH_MAX
20756 # define PATH_MAX 260
20757 #endif
20758
20759
20760 #ifndef AT_FDCWD
20761 # define AT_FDCWD 0
20762 #endif
20763 #ifdef ENAMETOOLONG
20764 # define is_ENAMETOOLONG(x) ((x) == ENAMETOOLONG)
20765 #else
20766 # define is_ENAMETOOLONG(x) 0
20767 #endif
20768
20769 /* Use the getcwd function, not any macro.  */
20770 #undef getcwd
20771
20772 /* Don't get link errors because mkdir is redefined to rpl_mkdir.  */
20773 #undef mkdir
20774
20775 #ifndef S_IRWXU
20776 # define S_IRWXU 0700
20777 #endif
20778
20779 /* The length of this name must be 8.  */
20780 #define DIR_NAME "confdir3"
20781 #define DIR_NAME_LEN 8
20782 #define DIR_NAME_SIZE (DIR_NAME_LEN + 1)
20783
20784 /* The length of "../".  */
20785 #define DOTDOTSLASH_LEN 3
20786
20787 /* Leftover bytes in the buffer, to work around library or OS bugs.  */
20788 #define BUF_SLOP 20
20789
20790 int
20791 main ()
20792 {
20793 #ifndef PATH_MAX
20794   /* The Hurd doesn't define this, so getcwd can't exhibit the bug --
20795      at least not on a local file system.  And if we were to start worrying
20796      about remote file systems, we'd have to enable the wrapper function
20797      all of the time, just to be safe.  That's not worth the cost.  */
20798   exit (0);
20799 #elif ((INT_MAX / (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1) \
20800         - DIR_NAME_SIZE - BUF_SLOP) \
20801        <= PATH_MAX)
20802   /* FIXME: Assuming there's a system for which this is true,
20803      this should be done in a compile test.  */
20804   exit (0);
20805 #else
20806   char buf[PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1)
20807            + DIR_NAME_SIZE + BUF_SLOP];
20808   char *cwd = getcwd (buf, PATH_MAX);
20809   size_t initial_cwd_len;
20810   size_t cwd_len;
20811   int fail = 0;
20812   size_t n_chdirs = 0;
20813
20814   if (cwd == NULL)
20815     exit (10);
20816
20817   cwd_len = initial_cwd_len = strlen (cwd);
20818
20819   while (1)
20820     {
20821       size_t dotdot_max = PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN);
20822       char *c = NULL;
20823
20824       cwd_len += DIR_NAME_SIZE;
20825       /* If mkdir or chdir fails, it could be that this system cannot create
20826          any file with an absolute name longer than PATH_MAX, such as cygwin.
20827          If so, leave fail as 0, because the current working directory can't
20828          be too long for getcwd if it can't even be created.  For other
20829          errors, be pessimistic and consider that as a failure, too.  */
20830       if (mkdir (DIR_NAME, S_IRWXU) < 0 || chdir (DIR_NAME) < 0)
20831         {
20832           if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
20833             fail = 20;
20834           break;
20835         }
20836
20837       if (PATH_MAX <= cwd_len && cwd_len < PATH_MAX + DIR_NAME_SIZE)
20838         {
20839           struct stat sb;
20840
20841           c = getcwd (buf, PATH_MAX);
20842           if (!c && errno == ENOENT)
20843             {
20844               fail = 11;
20845               break;
20846             }
20847           if (c)
20848             {
20849               fail = 31;
20850               break;
20851             }
20852           if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
20853             {
20854               fail = 21;
20855               break;
20856             }
20857
20858           /* Our replacement needs to be able to stat() long ../../paths,
20859              so generate a path larger than PATH_MAX to check,
20860              avoiding the replacement if we can't stat().  */
20861           c = getcwd (buf, cwd_len + 1);
20862           if (c && !AT_FDCWD && stat (c, &sb) != 0 && is_ENAMETOOLONG (errno))
20863             {
20864               fail = 32;
20865               break;
20866             }
20867         }
20868
20869       if (dotdot_max <= cwd_len - initial_cwd_len)
20870         {
20871           if (dotdot_max + DIR_NAME_SIZE < cwd_len - initial_cwd_len)
20872             break;
20873           c = getcwd (buf, cwd_len + 1);
20874           if (!c)
20875             {
20876               if (! (errno == ERANGE || errno == ENOENT
20877                      || is_ENAMETOOLONG (errno)))
20878                 {
20879                   fail = 22;
20880                   break;
20881                 }
20882               if (AT_FDCWD || errno == ERANGE || errno == ENOENT)
20883                 {
20884                   fail = 12;
20885                   break;
20886                 }
20887             }
20888         }
20889
20890       if (c && strlen (c) != cwd_len)
20891         {
20892           fail = 23;
20893           break;
20894         }
20895       ++n_chdirs;
20896     }
20897
20898   /* Leaving behind such a deep directory is not polite.
20899      So clean up here, right away, even though the driving
20900      shell script would also clean up.  */
20901   {
20902     size_t i;
20903
20904     /* Try rmdir first, in case the chdir failed.  */
20905     rmdir (DIR_NAME);
20906     for (i = 0; i <= n_chdirs; i++)
20907       {
20908         if (chdir ("..") < 0)
20909           break;
20910         if (rmdir (DIR_NAME) != 0)
20911           break;
20912       }
20913   }
20914
20915   exit (fail);
20916 #endif
20917 }
20918
20919 _ACEOF
20920 if ac_fn_c_try_run "$LINENO"; then :
20921   gl_cv_func_getcwd_path_max=yes
20922 else
20923   case $? in
20924      10|11|12) gl_cv_func_getcwd_path_max='no, but it is partly working';;
20925      31) gl_cv_func_getcwd_path_max='no, it has the AIX bug';;
20926      32) gl_cv_func_getcwd_path_max='yes, but with shorter paths';;
20927      *) gl_cv_func_getcwd_path_max=no;;
20928      esac
20929 fi
20930 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20931   conftest.$ac_objext conftest.beam conftest.$ac_ext
20932 fi
20933
20934
20935 fi
20936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_path_max" >&5
20937 $as_echo "$gl_cv_func_getcwd_path_max" >&6; }
20938
20939       case "$gl_cv_func_getcwd_null" in
20940         *yes)
20941
20942
20943
20944
20945   for ac_func in getpagesize
20946 do :
20947   ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
20948 if test "x$ac_cv_func_getpagesize" = xyes; then :
20949   cat >>confdefs.h <<_ACEOF
20950 #define HAVE_GETPAGESIZE 1
20951 _ACEOF
20952
20953 fi
20954 done
20955
20956   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd aborts when 4k < cwd_length < 16k" >&5
20957 $as_echo_n "checking whether getcwd aborts when 4k < cwd_length < 16k... " >&6; }
20958 if ${gl_cv_func_getcwd_abort_bug+:} false; then :
20959   $as_echo_n "(cached) " >&6
20960 else
20961   # Remove any remnants of a previous test.
20962      rm -rf confdir-14B---
20963      # Arrange for deletion of the temporary directory this test creates.
20964      ac_clean_files="$ac_clean_files confdir-14B---"
20965           if test "$cross_compiling" = yes; then :
20966   gl_cv_func_getcwd_abort_bug=yes
20967 else
20968   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20969 /* end confdefs.h.  */
20970
20971 #include <errno.h>
20972 #include <stdlib.h>
20973 #if HAVE_UNISTD_H
20974 # include <unistd.h>
20975 #else /* on Windows with MSVC */
20976 # include <direct.h>
20977 #endif
20978 #include <string.h>
20979 #include <sys/stat.h>
20980
20981
20982 /* Arrange to define PATH_MAX, like "pathmax.h" does. */
20983 #if HAVE_UNISTD_H
20984 # include <unistd.h>
20985 #endif
20986 #include <limits.h>
20987 #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
20988 # include <sys/param.h>
20989 #endif
20990 #if !defined PATH_MAX && defined MAXPATHLEN
20991 # define PATH_MAX MAXPATHLEN
20992 #endif
20993 #ifdef __hpux
20994 # undef PATH_MAX
20995 # define PATH_MAX 1024
20996 #endif
20997 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
20998 # undef PATH_MAX
20999 # define PATH_MAX 260
21000 #endif
21001
21002
21003 /* Don't get link errors because mkdir is redefined to rpl_mkdir.  */
21004 #undef mkdir
21005
21006 #ifndef S_IRWXU
21007 # define S_IRWXU 0700
21008 #endif
21009
21010 /* FIXME: skip the run-test altogether on systems without getpagesize.  */
21011 #if ! HAVE_GETPAGESIZE
21012 # define getpagesize() 0
21013 #endif
21014
21015 /* This size is chosen to be larger than PATH_MAX (4k), yet smaller than
21016    the 16kB pagesize on ia64 linux.  Those conditions make the code below
21017    trigger a bug in glibc's getcwd implementation before 2.4.90-10.  */
21018 #define TARGET_LEN (5 * 1024)
21019
21020 int
21021 main ()
21022 {
21023   char *cwd;
21024   size_t initial_cwd_len;
21025   int fail = 0;
21026
21027   /* The bug is triggered when PATH_MAX < getpagesize (), so skip
21028      this relatively expensive and invasive test if that's not true.  */
21029 #ifdef PATH_MAX
21030   int bug_possible = PATH_MAX < getpagesize ();
21031 #else
21032   int bug_possible = 0;
21033 #endif
21034   if (! bug_possible)
21035     return 0;
21036
21037   cwd = getcwd (NULL, 0);
21038   if (cwd == NULL)
21039     return 2;
21040
21041   initial_cwd_len = strlen (cwd);
21042   free (cwd);
21043
21044   if (1)
21045     {
21046       static char const dir_name[] = "confdir-14B---";
21047       size_t desired_depth = ((TARGET_LEN - 1 - initial_cwd_len)
21048                               / sizeof dir_name);
21049       size_t d;
21050       for (d = 0; d < desired_depth; d++)
21051         {
21052           if (mkdir (dir_name, S_IRWXU) < 0 || chdir (dir_name) < 0)
21053             {
21054               if (! (errno == ERANGE || errno == ENAMETOOLONG
21055                      || errno == ENOENT))
21056                 fail = 3; /* Unable to construct deep hierarchy.  */
21057               break;
21058             }
21059         }
21060
21061       /* If libc has the bug in question, this invocation of getcwd
21062          results in a failed assertion.  */
21063       cwd = getcwd (NULL, 0);
21064       if (cwd == NULL)
21065         fail = 4; /* getcwd didn't assert, but it failed for a long name
21066                      where the answer could have been learned.  */
21067       free (cwd);
21068
21069       /* Call rmdir first, in case the above chdir failed.  */
21070       rmdir (dir_name);
21071       while (0 < d--)
21072         {
21073           if (chdir ("..") < 0)
21074             {
21075               fail = 5;
21076               break;
21077             }
21078           rmdir (dir_name);
21079         }
21080     }
21081
21082   return fail;
21083 }
21084
21085 _ACEOF
21086 if ac_fn_c_try_run "$LINENO"; then :
21087   gl_cv_func_getcwd_abort_bug=no
21088 else
21089                                 ret=$?
21090      if test $ret -ge 128 || test $ret = 4; then
21091        gl_cv_func_getcwd_abort_bug=yes
21092      else
21093        gl_cv_func_getcwd_abort_bug=no
21094      fi
21095 fi
21096 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21097   conftest.$ac_objext conftest.beam conftest.$ac_ext
21098 fi
21099
21100
21101 fi
21102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_abort_bug" >&5
21103 $as_echo "$gl_cv_func_getcwd_abort_bug" >&6; }
21104   if test $gl_cv_func_getcwd_abort_bug = yes; then :
21105   gl_abort_bug=yes
21106 fi
21107
21108           ;;
21109       esac
21110       ;;
21111   esac
21112       case "$gl_cv_func_getcwd_path_max" in
21113     "no"|"no, it has the AIX bug") ;;
21114     *)
21115
21116 $as_echo "#define HAVE_MINIMALLY_WORKING_GETCWD 1" >>confdefs.h
21117
21118       ;;
21119   esac
21120   case "$gl_cv_func_getcwd_path_max" in
21121     "no, but it is partly working")
21122
21123 $as_echo "#define HAVE_PARTLY_WORKING_GETCWD 1" >>confdefs.h
21124
21125       ;;
21126     "yes, but with shorter paths")
21127
21128 $as_echo "#define HAVE_GETCWD_SHORTER 1" >>confdefs.h
21129
21130       ;;
21131   esac
21132
21133   if { case "$gl_cv_func_getcwd_null" in *yes) false;; *) true;; esac; } \
21134      || test $gl_cv_func_getcwd_posix_signature != yes \
21135      || { case "$gl_cv_func_getcwd_path_max" in *yes*) false;; *) true;; esac; } \
21136      || test $gl_abort_bug = yes; then
21137     REPLACE_GETCWD=1
21138   fi
21139
21140   if test $REPLACE_GETCWD = 1; then
21141
21142
21143
21144
21145
21146
21147
21148
21149   gl_LIBOBJS="$gl_LIBOBJS getcwd.$ac_objext"
21150
21151
21152
21153
21154   :
21155
21156   fi
21157
21158
21159 cat >>confdefs.h <<_ACEOF
21160 #define GNULIB_GETCWD 1
21161 _ACEOF
21162
21163
21164
21165
21166
21167
21168
21169           GNULIB_GETCWD=1
21170
21171
21172
21173
21174
21175 $as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
21176
21177
21178
21179
21180
21181
21182
21183
21184   case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_posix_signature in
21185   *yes,yes) ;;
21186   *)
21187         REPLACE_GETCWD=1
21188     ;;
21189   esac
21190
21191   if test $REPLACE_GETCWD = 1; then
21192
21193
21194
21195
21196
21197
21198
21199
21200   gl_LIBOBJS="$gl_LIBOBJS getcwd-lgpl.$ac_objext"
21201
21202   fi
21203
21204
21205
21206
21207
21208           GNULIB_GETCWD=1
21209
21210
21211
21212
21213
21214 $as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
21215
21216
21217
21218
21219
21220
21221
21222
21223
21224
21225
21226   if test $ac_cv_func_getdelim = yes; then
21227     HAVE_GETDELIM=1
21228         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getdelim function" >&5
21229 $as_echo_n "checking for working getdelim function... " >&6; }
21230 if ${gl_cv_func_working_getdelim+:} false; then :
21231   $as_echo_n "(cached) " >&6
21232 else
21233   echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data
21234     if test "$cross_compiling" = yes; then :
21235         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21236 /* end confdefs.h.  */
21237
21238 #include <features.h>
21239 #ifdef __GNU_LIBRARY__
21240  #if (__GLIBC__ >= 2) && !defined __UCLIBC__
21241   Lucky GNU user
21242  #endif
21243 #endif
21244
21245 _ACEOF
21246 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21247   $EGREP "Lucky GNU user" >/dev/null 2>&1; then :
21248   gl_cv_func_working_getdelim="guessing yes"
21249 else
21250   gl_cv_func_working_getdelim="guessing no"
21251 fi
21252 rm -f conftest*
21253
21254
21255 else
21256   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21257 /* end confdefs.h.  */
21258
21259 #    include <stdio.h>
21260 #    include <stdlib.h>
21261 #    include <string.h>
21262     int main ()
21263     {
21264       FILE *in = fopen ("./conftest.data", "r");
21265       if (!in)
21266         return 1;
21267       {
21268         /* Test result for a NULL buffer and a zero size.
21269            Based on a test program from Karl Heuer.  */
21270         char *line = NULL;
21271         size_t siz = 0;
21272         int len = getdelim (&line, &siz, '\n', in);
21273         if (!(len == 4 && line && strcmp (line, "foo\n") == 0))
21274           return 2;
21275       }
21276       {
21277         /* Test result for a NULL buffer and a non-zero size.
21278            This crashes on FreeBSD 8.0.  */
21279         char *line = NULL;
21280         size_t siz = (size_t)(~0) / 4;
21281         if (getdelim (&line, &siz, '\n', in) == -1)
21282           return 3;
21283       }
21284       return 0;
21285     }
21286
21287 _ACEOF
21288 if ac_fn_c_try_run "$LINENO"; then :
21289   gl_cv_func_working_getdelim=yes
21290 else
21291   gl_cv_func_working_getdelim=no
21292 fi
21293 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21294   conftest.$ac_objext conftest.beam conftest.$ac_ext
21295 fi
21296
21297 fi
21298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_getdelim" >&5
21299 $as_echo "$gl_cv_func_working_getdelim" >&6; }
21300     case "$gl_cv_func_working_getdelim" in
21301       *no)
21302         REPLACE_GETDELIM=1
21303         ;;
21304     esac
21305   else
21306     HAVE_GETDELIM=0
21307   fi
21308
21309   if test $ac_cv_have_decl_getdelim = no; then
21310     HAVE_DECL_GETDELIM=0
21311   fi
21312
21313   if test $HAVE_GETDELIM = 0 || test $REPLACE_GETDELIM = 1; then
21314
21315
21316
21317
21318
21319
21320
21321
21322   gl_LIBOBJS="$gl_LIBOBJS getdelim.$ac_objext"
21323
21324
21325   for ac_func in flockfile funlockfile
21326 do :
21327   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
21328 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
21329 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
21330   cat >>confdefs.h <<_ACEOF
21331 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
21332 _ACEOF
21333
21334 fi
21335 done
21336
21337   ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
21338 if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then :
21339   ac_have_decl=1
21340 else
21341   ac_have_decl=0
21342 fi
21343
21344 cat >>confdefs.h <<_ACEOF
21345 #define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
21346 _ACEOF
21347
21348
21349   fi
21350
21351
21352
21353
21354
21355           GNULIB_GETDELIM=1
21356
21357
21358
21359
21360
21361 $as_echo "#define GNULIB_TEST_GETDELIM 1" >>confdefs.h
21362
21363
21364
21365
21366
21367
21368
21369
21370   if test $ac_cv_func_getdtablesize = yes &&
21371      test $ac_cv_have_decl_getdtablesize = yes; then
21372     # Cygwin 1.7.25 automatically increases the RLIMIT_NOFILE soft limit
21373     # up to an unchangeable hard limit; all other platforms correctly
21374     # require setrlimit before getdtablesize() can report a larger value.
21375     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getdtablesize works" >&5
21376 $as_echo_n "checking whether getdtablesize works... " >&6; }
21377 if ${gl_cv_func_getdtablesize_works+:} false; then :
21378   $as_echo_n "(cached) " >&6
21379 else
21380   if test "$cross_compiling" = yes; then :
21381   case "$host_os" in
21382           cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows
21383             gl_cv_func_getdtablesize_works="guessing no" ;;
21384           *) gl_cv_func_getdtablesize_works="guessing yes" ;;
21385          esac
21386 else
21387   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21388 /* end confdefs.h.  */
21389
21390         #include <unistd.h>
21391 int
21392 main ()
21393 {
21394 int size = getdtablesize();
21395            if (dup2 (0, getdtablesize()) != -1)
21396              return 1;
21397            if (size != getdtablesize())
21398              return 2;
21399
21400   ;
21401   return 0;
21402 }
21403 _ACEOF
21404 if ac_fn_c_try_run "$LINENO"; then :
21405   gl_cv_func_getdtablesize_works=yes
21406 else
21407   gl_cv_func_getdtablesize_works=no
21408 fi
21409 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21410   conftest.$ac_objext conftest.beam conftest.$ac_ext
21411 fi
21412
21413
21414 fi
21415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getdtablesize_works" >&5
21416 $as_echo "$gl_cv_func_getdtablesize_works" >&6; }
21417     case "$gl_cv_func_getdtablesize_works" in
21418       *yes) ;;
21419       *) REPLACE_GETDTABLESIZE=1 ;;
21420     esac
21421   else
21422     HAVE_GETDTABLESIZE=0
21423   fi
21424
21425   if test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1; then
21426
21427
21428
21429
21430
21431
21432
21433
21434   gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext"
21435
21436     :
21437   fi
21438
21439
21440
21441
21442
21443           GNULIB_GETDTABLESIZE=1
21444
21445
21446
21447
21448
21449 $as_echo "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h
21450
21451
21452
21453
21454
21455
21456
21457
21458         ac_fn_c_check_func "$LINENO" "getgroups" "ac_cv_func_getgroups"
21459 if test "x$ac_cv_func_getgroups" = xyes; then :
21460
21461 fi
21462
21463
21464   # If we don't yet have getgroups, see if it's in -lbsd.
21465   # This is reported to be necessary on an ITOS 3000WS running SEIUX 3.1.
21466   ac_save_LIBS=$LIBS
21467   if test $ac_cv_func_getgroups = no; then
21468     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getgroups in -lbsd" >&5
21469 $as_echo_n "checking for getgroups in -lbsd... " >&6; }
21470 if ${ac_cv_lib_bsd_getgroups+:} false; then :
21471   $as_echo_n "(cached) " >&6
21472 else
21473   ac_check_lib_save_LIBS=$LIBS
21474 LIBS="-lbsd  $LIBS"
21475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21476 /* end confdefs.h.  */
21477
21478 /* Override any GCC internal prototype to avoid an error.
21479    Use char because int might match the return type of a GCC
21480    builtin and then its argument prototype would still apply.  */
21481 #ifdef __cplusplus
21482 extern "C"
21483 #endif
21484 char getgroups ();
21485 int
21486 main ()
21487 {
21488 return getgroups ();
21489   ;
21490   return 0;
21491 }
21492 _ACEOF
21493 if ac_fn_c_try_link "$LINENO"; then :
21494   ac_cv_lib_bsd_getgroups=yes
21495 else
21496   ac_cv_lib_bsd_getgroups=no
21497 fi
21498 rm -f core conftest.err conftest.$ac_objext \
21499     conftest$ac_exeext conftest.$ac_ext
21500 LIBS=$ac_check_lib_save_LIBS
21501 fi
21502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_getgroups" >&5
21503 $as_echo "$ac_cv_lib_bsd_getgroups" >&6; }
21504 if test "x$ac_cv_lib_bsd_getgroups" = xyes; then :
21505   GETGROUPS_LIB=-lbsd
21506 fi
21507
21508   fi
21509
21510   # Run the program to test the functionality of the system-supplied
21511   # getgroups function only if there is such a function.
21512   if test $ac_cv_func_getgroups = yes; then
21513     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getgroups" >&5
21514 $as_echo_n "checking for working getgroups... " >&6; }
21515 if ${ac_cv_func_getgroups_works+:} false; then :
21516   $as_echo_n "(cached) " >&6
21517 else
21518   if test "$cross_compiling" = yes; then :
21519   case "$host_os" in # ((
21520                     # Guess yes on glibc systems.
21521             *-gnu*) ac_cv_func_getgroups_works="guessing yes" ;;
21522                     # If we don't know, assume the worst.
21523             *)      ac_cv_func_getgroups_works="guessing no" ;;
21524           esac
21525
21526 else
21527   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21528 /* end confdefs.h.  */
21529 $ac_includes_default
21530 int
21531 main ()
21532 {
21533 /* On Ultrix 4.3, getgroups (0, 0) always fails.  */
21534               return getgroups (0, 0) == -1;
21535   ;
21536   return 0;
21537 }
21538
21539 _ACEOF
21540 if ac_fn_c_try_run "$LINENO"; then :
21541   ac_cv_func_getgroups_works=yes
21542 else
21543   ac_cv_func_getgroups_works=no
21544 fi
21545 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21546   conftest.$ac_objext conftest.beam conftest.$ac_ext
21547 fi
21548
21549
21550 fi
21551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getgroups_works" >&5
21552 $as_echo "$ac_cv_func_getgroups_works" >&6; }
21553   else
21554     ac_cv_func_getgroups_works=no
21555   fi
21556   case "$ac_cv_func_getgroups_works" in
21557     *yes)
21558
21559 $as_echo "#define HAVE_GETGROUPS 1" >>confdefs.h
21560
21561       ;;
21562   esac
21563   LIBS=$ac_save_LIBS
21564
21565   if test $ac_cv_func_getgroups != yes; then
21566     HAVE_GETGROUPS=0
21567   else
21568     if test "$ac_cv_type_getgroups" != gid_t \
21569        || { case "$ac_cv_func_getgroups_works" in
21570               *yes) false;;
21571               *) true;;
21572             esac
21573           }; then
21574       REPLACE_GETGROUPS=1
21575
21576 $as_echo "#define GETGROUPS_ZERO_BUG 1" >>confdefs.h
21577
21578     else
21579             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getgroups handles negative values" >&5
21580 $as_echo_n "checking whether getgroups handles negative values... " >&6; }
21581 if ${gl_cv_func_getgroups_works+:} false; then :
21582   $as_echo_n "(cached) " >&6
21583 else
21584   if test "$cross_compiling" = yes; then :
21585   case "$host_os" in
21586                      # Guess yes on glibc systems.
21587              *-gnu*) gl_cv_func_getgroups_works="guessing yes" ;;
21588                      # If we don't know, assume the worst.
21589              *)      gl_cv_func_getgroups_works="guessing no" ;;
21590            esac
21591
21592 else
21593   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21594 /* end confdefs.h.  */
21595 $ac_includes_default
21596 int
21597 main ()
21598 {
21599 int size = getgroups (0, 0);
21600             gid_t *list = malloc (size * sizeof *list);
21601             return getgroups (-1, list) != -1;
21602   ;
21603   return 0;
21604 }
21605 _ACEOF
21606 if ac_fn_c_try_run "$LINENO"; then :
21607   gl_cv_func_getgroups_works=yes
21608 else
21609   gl_cv_func_getgroups_works=no
21610 fi
21611 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21612   conftest.$ac_objext conftest.beam conftest.$ac_ext
21613 fi
21614
21615 fi
21616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getgroups_works" >&5
21617 $as_echo "$gl_cv_func_getgroups_works" >&6; }
21618       case "$gl_cv_func_getgroups_works" in
21619         *yes) ;;
21620         *) REPLACE_GETGROUPS=1 ;;
21621       esac
21622     fi
21623   fi
21624   test -n "$GETGROUPS_LIB" && LIBS="$GETGROUPS_LIB $LIBS"
21625
21626   if test $HAVE_GETGROUPS = 0 || test $REPLACE_GETGROUPS = 1; then
21627
21628
21629
21630
21631
21632
21633
21634
21635   gl_LIBOBJS="$gl_LIBOBJS getgroups.$ac_objext"
21636
21637   fi
21638
21639
21640
21641
21642
21643           GNULIB_GETGROUPS=1
21644
21645
21646
21647
21648
21649 $as_echo "#define GNULIB_TEST_GETGROUPS 1" >>confdefs.h
21650
21651
21652
21653
21654
21655
21656
21657
21658
21659
21660   gl_getline_needs_run_time_check=no
21661   ac_fn_c_check_func "$LINENO" "getline" "ac_cv_func_getline"
21662 if test "x$ac_cv_func_getline" = xyes; then :
21663                    gl_getline_needs_run_time_check=yes
21664 else
21665   am_cv_func_working_getline=no
21666 fi
21667
21668   if test $gl_getline_needs_run_time_check = yes; then
21669     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getline function" >&5
21670 $as_echo_n "checking for working getline function... " >&6; }
21671 if ${am_cv_func_working_getline+:} false; then :
21672   $as_echo_n "(cached) " >&6
21673 else
21674   echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data
21675     if test "$cross_compiling" = yes; then :
21676         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21677 /* end confdefs.h.  */
21678
21679 #include <features.h>
21680 #ifdef __GNU_LIBRARY__
21681  #if (__GLIBC__ >= 2) && !defined __UCLIBC__
21682   Lucky GNU user
21683  #endif
21684 #endif
21685
21686 _ACEOF
21687 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21688   $EGREP "Lucky GNU user" >/dev/null 2>&1; then :
21689   am_cv_func_working_getline="guessing yes"
21690 else
21691   am_cv_func_working_getline="guessing no"
21692 fi
21693 rm -f conftest*
21694
21695
21696 else
21697   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21698 /* end confdefs.h.  */
21699
21700 #    include <stdio.h>
21701 #    include <stdlib.h>
21702 #    include <string.h>
21703     int main ()
21704     {
21705       FILE *in = fopen ("./conftest.data", "r");
21706       if (!in)
21707         return 1;
21708       {
21709         /* Test result for a NULL buffer and a zero size.
21710            Based on a test program from Karl Heuer.  */
21711         char *line = NULL;
21712         size_t siz = 0;
21713         int len = getline (&line, &siz, in);
21714         if (!(len == 4 && line && strcmp (line, "foo\n") == 0))
21715           return 2;
21716       }
21717       {
21718         /* Test result for a NULL buffer and a non-zero size.
21719            This crashes on FreeBSD 8.0.  */
21720         char *line = NULL;
21721         size_t siz = (size_t)(~0) / 4;
21722         if (getline (&line, &siz, in) == -1)
21723           return 3;
21724       }
21725       return 0;
21726     }
21727
21728 _ACEOF
21729 if ac_fn_c_try_run "$LINENO"; then :
21730   am_cv_func_working_getline=yes
21731 else
21732   am_cv_func_working_getline=no
21733 fi
21734 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21735   conftest.$ac_objext conftest.beam conftest.$ac_ext
21736 fi
21737
21738 fi
21739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_working_getline" >&5
21740 $as_echo "$am_cv_func_working_getline" >&6; }
21741   fi
21742
21743   if test $ac_cv_have_decl_getline = no; then
21744     HAVE_DECL_GETLINE=0
21745   fi
21746
21747   case "$am_cv_func_working_getline" in
21748     *no)
21749                         REPLACE_GETLINE=1
21750       ;;
21751   esac
21752
21753   if test $REPLACE_GETLINE = 1; then
21754
21755
21756
21757
21758
21759
21760
21761
21762   gl_LIBOBJS="$gl_LIBOBJS getline.$ac_objext"
21763
21764
21765   :
21766
21767   fi
21768
21769
21770
21771
21772
21773           GNULIB_GETLINE=1
21774
21775
21776
21777
21778
21779 $as_echo "#define GNULIB_TEST_GETLINE 1" >>confdefs.h
21780
21781
21782
21783
21784
21785
21786
21787
21788   if test $REPLACE_GETOPT = 1; then
21789
21790
21791
21792
21793
21794
21795
21796
21797   gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
21798
21799
21800
21801
21802
21803
21804
21805
21806
21807   gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
21808
21809
21810
21811
21812         GNULIB_GL_UNISTD_H_GETOPT=1
21813   fi
21814
21815
21816
21817 $as_echo "#define GNULIB_TEST_GETOPT_GNU 1" >>confdefs.h
21818
21819
21820
21821
21822
21823
21824
21825     REPLACE_GETOPT=1
21826
21827   if test $REPLACE_GETOPT = 1; then
21828
21829   GETOPT_H=getopt.h
21830
21831 $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
21832
21833
21834
21835   fi
21836
21837   if test $REPLACE_GETOPT = 1; then
21838
21839
21840
21841
21842
21843
21844
21845
21846   gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
21847
21848
21849
21850
21851
21852
21853
21854
21855
21856   gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
21857
21858
21859
21860
21861         GNULIB_GL_UNISTD_H_GETOPT=1
21862   fi
21863
21864
21865
21866
21867   for ac_func in getpagesize
21868 do :
21869   ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
21870 if test "x$ac_cv_func_getpagesize" = xyes; then :
21871   cat >>confdefs.h <<_ACEOF
21872 #define HAVE_GETPAGESIZE 1
21873 _ACEOF
21874
21875 fi
21876 done
21877
21878   if test $ac_cv_func_getpagesize = no; then
21879     HAVE_GETPAGESIZE=0
21880     for ac_header in OS.h
21881 do :
21882   ac_fn_c_check_header_mongrel "$LINENO" "OS.h" "ac_cv_header_OS_h" "$ac_includes_default"
21883 if test "x$ac_cv_header_OS_h" = xyes; then :
21884   cat >>confdefs.h <<_ACEOF
21885 #define HAVE_OS_H 1
21886 _ACEOF
21887
21888 fi
21889
21890 done
21891
21892     if test $ac_cv_header_OS_h = yes; then
21893       HAVE_OS_H=1
21894     fi
21895     for ac_header in sys/param.h
21896 do :
21897   ac_fn_c_check_header_mongrel "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default"
21898 if test "x$ac_cv_header_sys_param_h" = xyes; then :
21899   cat >>confdefs.h <<_ACEOF
21900 #define HAVE_SYS_PARAM_H 1
21901 _ACEOF
21902
21903 fi
21904
21905 done
21906
21907     if test $ac_cv_header_sys_param_h = yes; then
21908       HAVE_SYS_PARAM_H=1
21909     fi
21910   fi
21911   case "$host_os" in
21912     mingw*)
21913       REPLACE_GETPAGESIZE=1
21914       ;;
21915   esac
21916       ac_fn_c_check_decl "$LINENO" "getpagesize" "ac_cv_have_decl_getpagesize" "$ac_includes_default"
21917 if test "x$ac_cv_have_decl_getpagesize" = xyes; then :
21918
21919 else
21920   HAVE_DECL_GETPAGESIZE=0
21921 fi
21922
21923
21924   if test $REPLACE_GETPAGESIZE = 1; then
21925
21926
21927
21928
21929
21930
21931
21932
21933   gl_LIBOBJS="$gl_LIBOBJS getpagesize.$ac_objext"
21934
21935   fi
21936
21937
21938
21939
21940
21941           GNULIB_GETPAGESIZE=1
21942
21943
21944
21945
21946
21947 $as_echo "#define GNULIB_TEST_GETPAGESIZE 1" >>confdefs.h
21948
21949
21950
21951
21952
21953
21954
21955
21956
21957
21958
21959
21960
21961
21962
21963
21964
21965   gl_gettimeofday_timezone=void
21966   if test $ac_cv_func_gettimeofday != yes; then
21967     HAVE_GETTIMEOFDAY=0
21968   else
21969
21970
21971
21972  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5
21973 $as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; }
21974 if ${gl_cv_func_gettimeofday_clobber+:} false; then :
21975   $as_echo_n "(cached) " >&6
21976 else
21977   if test "$cross_compiling" = yes; then :
21978   # When cross-compiling:
21979       case "$host_os" in
21980                 # Guess all is fine on glibc systems.
21981         *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
21982                 # If we don't know, assume the worst.
21983         *)      gl_cv_func_gettimeofday_clobber="guessing yes" ;;
21984       esac
21985
21986 else
21987   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21988 /* end confdefs.h.  */
21989 #include <string.h>
21990           #include <sys/time.h>
21991           #include <time.h>
21992           #include <stdlib.h>
21993
21994 int
21995 main ()
21996 {
21997
21998           time_t t = 0;
21999           struct tm *lt;
22000           struct tm saved_lt;
22001           struct timeval tv;
22002           lt = localtime (&t);
22003           saved_lt = *lt;
22004           gettimeofday (&tv, NULL);
22005           return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
22006
22007   ;
22008   return 0;
22009 }
22010 _ACEOF
22011 if ac_fn_c_try_run "$LINENO"; then :
22012   gl_cv_func_gettimeofday_clobber=no
22013 else
22014   gl_cv_func_gettimeofday_clobber=yes
22015 fi
22016 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22017   conftest.$ac_objext conftest.beam conftest.$ac_ext
22018 fi
22019
22020 fi
22021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5
22022 $as_echo "$gl_cv_func_gettimeofday_clobber" >&6; }
22023
22024  case "$gl_cv_func_gettimeofday_clobber" in
22025    *yes)
22026      REPLACE_GETTIMEOFDAY=1
22027
22028   REPLACE_GMTIME=1
22029   REPLACE_LOCALTIME=1
22030
22031
22032 $as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
22033
22034      ;;
22035  esac
22036
22037     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
22038 $as_echo_n "checking for gettimeofday with POSIX signature... " >&6; }
22039 if ${gl_cv_func_gettimeofday_posix_signature+:} false; then :
22040   $as_echo_n "(cached) " >&6
22041 else
22042   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22043 /* end confdefs.h.  */
22044 #include <sys/time.h>
22045               struct timeval c;
22046               int gettimeofday (struct timeval *restrict, void *restrict);
22047
22048 int
22049 main ()
22050 {
22051 /* glibc uses struct timezone * rather than the POSIX void *
22052                  if _GNU_SOURCE is defined.  However, since the only portable
22053                  use of gettimeofday uses NULL as the second parameter, and
22054                  since the glibc definition is actually more typesafe, it is
22055                  not worth wrapping this to get a compliant signature.  */
22056               int (*f) (struct timeval *restrict, void *restrict)
22057                 = gettimeofday;
22058               int x = f (&c, 0);
22059               return !(x | c.tv_sec | c.tv_usec);
22060
22061   ;
22062   return 0;
22063 }
22064 _ACEOF
22065 if ac_fn_c_try_compile "$LINENO"; then :
22066   gl_cv_func_gettimeofday_posix_signature=yes
22067 else
22068   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22069 /* end confdefs.h.  */
22070 #include <sys/time.h>
22071 int gettimeofday (struct timeval *restrict, struct timezone *restrict);
22072
22073 int
22074 main ()
22075 {
22076
22077   ;
22078   return 0;
22079 }
22080 _ACEOF
22081 if ac_fn_c_try_compile "$LINENO"; then :
22082   gl_cv_func_gettimeofday_posix_signature=almost
22083 else
22084   gl_cv_func_gettimeofday_posix_signature=no
22085 fi
22086 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22087 fi
22088 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22089 fi
22090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
22091 $as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; }
22092     if test $gl_cv_func_gettimeofday_posix_signature = almost; then
22093       gl_gettimeofday_timezone='struct timezone'
22094     elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
22095       REPLACE_GETTIMEOFDAY=1
22096     fi
22097         if test $REPLACE_STRUCT_TIMEVAL = 1; then
22098       REPLACE_GETTIMEOFDAY=1
22099     fi
22100
22101   fi
22102
22103 cat >>confdefs.h <<_ACEOF
22104 #define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone
22105 _ACEOF
22106
22107
22108   if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
22109
22110
22111
22112
22113
22114
22115
22116
22117   gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
22118
22119
22120   for ac_header in sys/timeb.h
22121 do :
22122   ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
22123 if test "x$ac_cv_header_sys_timeb_h" = xyes; then :
22124   cat >>confdefs.h <<_ACEOF
22125 #define HAVE_SYS_TIMEB_H 1
22126 _ACEOF
22127
22128 fi
22129
22130 done
22131
22132   for ac_func in _ftime
22133 do :
22134   ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
22135 if test "x$ac_cv_func__ftime" = xyes; then :
22136   cat >>confdefs.h <<_ACEOF
22137 #define HAVE__FTIME 1
22138 _ACEOF
22139
22140 fi
22141 done
22142
22143
22144   fi
22145
22146
22147
22148
22149
22150           GNULIB_GETTIMEOFDAY=1
22151
22152
22153
22154
22155
22156 $as_echo "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h
22157
22158
22159
22160
22161
22162
22163
22164
22165       ac_fn_c_check_func "$LINENO" "group_member" "ac_cv_func_group_member"
22166 if test "x$ac_cv_func_group_member" = xyes; then :
22167
22168 else
22169
22170     HAVE_GROUP_MEMBER=0
22171
22172 fi
22173
22174
22175   if test $HAVE_GROUP_MEMBER = 0; then
22176
22177
22178
22179
22180
22181
22182
22183
22184   gl_LIBOBJS="$gl_LIBOBJS group-member.$ac_objext"
22185
22186
22187
22188
22189   fi
22190
22191
22192
22193
22194
22195           GNULIB_GROUP_MEMBER=1
22196
22197
22198
22199
22200
22201 $as_echo "#define GNULIB_TEST_GROUP_MEMBER 1" >>confdefs.h
22202
22203
22204
22205
22206   :
22207
22208
22209
22210
22211   :
22212
22213   :
22214   :
22215   :
22216   :
22217
22218
22219
22220
22221
22222
22223   PRIPTR_PREFIX=
22224   if test -n "$STDINT_H"; then
22225         PRIPTR_PREFIX='"l"'
22226   else
22227         for glpfx in '' l ll I64; do
22228       case $glpfx in
22229         '')  gltype1='int';;
22230         l)   gltype1='long int';;
22231         ll)  gltype1='long long int';;
22232         I64) gltype1='__int64';;
22233       esac
22234       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22235 /* end confdefs.h.  */
22236 #include <stdint.h>
22237            extern intptr_t foo;
22238            extern $gltype1 foo;
22239 int
22240 main ()
22241 {
22242
22243   ;
22244   return 0;
22245 }
22246 _ACEOF
22247 if ac_fn_c_try_compile "$LINENO"; then :
22248   PRIPTR_PREFIX='"'$glpfx'"'
22249 fi
22250 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22251       test -n "$PRIPTR_PREFIX" && break
22252     done
22253   fi
22254
22255
22256
22257   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT32_MAX < INTMAX_MAX" >&5
22258 $as_echo_n "checking whether INT32_MAX < INTMAX_MAX... " >&6; }
22259 if ${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+:} false; then :
22260   $as_echo_n "(cached) " >&6
22261 else
22262   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22263 /* end confdefs.h.  */
22264 /* Work also in C++ mode.  */
22265             #define __STDC_LIMIT_MACROS 1
22266
22267             /* Work if build is not clean.  */
22268             #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
22269
22270             #include <limits.h>
22271             #if HAVE_STDINT_H
22272              #include <stdint.h>
22273             #endif
22274
22275             #if defined INT32_MAX && defined INTMAX_MAX
22276              #define CONDITION (INT32_MAX < INTMAX_MAX)
22277             #elif HAVE_LONG_LONG_INT
22278              #define CONDITION (sizeof (int) < sizeof (long long int))
22279             #else
22280              #define CONDITION 0
22281             #endif
22282             int test[CONDITION ? 1 : -1];
22283 int
22284 main ()
22285 {
22286
22287   ;
22288   return 0;
22289 }
22290 _ACEOF
22291 if ac_fn_c_try_compile "$LINENO"; then :
22292   gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes
22293 else
22294   gl_cv_test_INT32_MAX_LT_INTMAX_MAX=no
22295 fi
22296 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22297 fi
22298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&5
22299 $as_echo "$gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&6; }
22300   if test $gl_cv_test_INT32_MAX_LT_INTMAX_MAX = yes; then
22301     INT32_MAX_LT_INTMAX_MAX=1;
22302   else
22303     INT32_MAX_LT_INTMAX_MAX=0;
22304   fi
22305
22306
22307   if test $APPLE_UNIVERSAL_BUILD = 0; then
22308
22309   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT64_MAX == LONG_MAX" >&5
22310 $as_echo_n "checking whether INT64_MAX == LONG_MAX... " >&6; }
22311 if ${gl_cv_test_INT64_MAX_EQ_LONG_MAX+:} false; then :
22312   $as_echo_n "(cached) " >&6
22313 else
22314   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22315 /* end confdefs.h.  */
22316 /* Work also in C++ mode.  */
22317             #define __STDC_LIMIT_MACROS 1
22318
22319             /* Work if build is not clean.  */
22320             #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
22321
22322             #include <limits.h>
22323             #if HAVE_STDINT_H
22324              #include <stdint.h>
22325             #endif
22326
22327             #if defined INT64_MAX
22328              #define CONDITION (INT64_MAX == LONG_MAX)
22329             #elif HAVE_LONG_LONG_INT
22330              #define CONDITION (sizeof (long long int) == sizeof (long int))
22331             #else
22332              #define CONDITION 0
22333             #endif
22334             int test[CONDITION ? 1 : -1];
22335 int
22336 main ()
22337 {
22338
22339   ;
22340   return 0;
22341 }
22342 _ACEOF
22343 if ac_fn_c_try_compile "$LINENO"; then :
22344   gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes
22345 else
22346   gl_cv_test_INT64_MAX_EQ_LONG_MAX=no
22347 fi
22348 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22349 fi
22350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&5
22351 $as_echo "$gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&6; }
22352   if test $gl_cv_test_INT64_MAX_EQ_LONG_MAX = yes; then
22353     INT64_MAX_EQ_LONG_MAX=1;
22354   else
22355     INT64_MAX_EQ_LONG_MAX=0;
22356   fi
22357
22358
22359   else
22360     INT64_MAX_EQ_LONG_MAX=-1
22361   fi
22362
22363   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT32_MAX < UINTMAX_MAX" >&5
22364 $as_echo_n "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; }
22365 if ${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+:} false; then :
22366   $as_echo_n "(cached) " >&6
22367 else
22368   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22369 /* end confdefs.h.  */
22370 /* Work also in C++ mode.  */
22371             #define __STDC_LIMIT_MACROS 1
22372
22373             /* Work if build is not clean.  */
22374             #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
22375
22376             #include <limits.h>
22377             #if HAVE_STDINT_H
22378              #include <stdint.h>
22379             #endif
22380
22381             #if defined UINT32_MAX && defined UINTMAX_MAX
22382              #define CONDITION (UINT32_MAX < UINTMAX_MAX)
22383             #elif HAVE_LONG_LONG_INT
22384              #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int))
22385             #else
22386              #define CONDITION 0
22387             #endif
22388             int test[CONDITION ? 1 : -1];
22389 int
22390 main ()
22391 {
22392
22393   ;
22394   return 0;
22395 }
22396 _ACEOF
22397 if ac_fn_c_try_compile "$LINENO"; then :
22398   gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes
22399 else
22400   gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=no
22401 fi
22402 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22403 fi
22404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&5
22405 $as_echo "$gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&6; }
22406   if test $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX = yes; then
22407     UINT32_MAX_LT_UINTMAX_MAX=1;
22408   else
22409     UINT32_MAX_LT_UINTMAX_MAX=0;
22410   fi
22411
22412
22413   if test $APPLE_UNIVERSAL_BUILD = 0; then
22414
22415   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT64_MAX == ULONG_MAX" >&5
22416 $as_echo_n "checking whether UINT64_MAX == ULONG_MAX... " >&6; }
22417 if ${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+:} false; then :
22418   $as_echo_n "(cached) " >&6
22419 else
22420   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22421 /* end confdefs.h.  */
22422 /* Work also in C++ mode.  */
22423             #define __STDC_LIMIT_MACROS 1
22424
22425             /* Work if build is not clean.  */
22426             #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
22427
22428             #include <limits.h>
22429             #if HAVE_STDINT_H
22430              #include <stdint.h>
22431             #endif
22432
22433             #if defined UINT64_MAX
22434              #define CONDITION (UINT64_MAX == ULONG_MAX)
22435             #elif HAVE_LONG_LONG_INT
22436              #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int))
22437             #else
22438              #define CONDITION 0
22439             #endif
22440             int test[CONDITION ? 1 : -1];
22441 int
22442 main ()
22443 {
22444
22445   ;
22446   return 0;
22447 }
22448 _ACEOF
22449 if ac_fn_c_try_compile "$LINENO"; then :
22450   gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes
22451 else
22452   gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=no
22453 fi
22454 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22455 fi
22456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&5
22457 $as_echo "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; }
22458   if test $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX = yes; then
22459     UINT64_MAX_EQ_ULONG_MAX=1;
22460   else
22461     UINT64_MAX_EQ_ULONG_MAX=0;
22462   fi
22463
22464
22465   else
22466     UINT64_MAX_EQ_ULONG_MAX=-1
22467   fi
22468
22469
22470
22471
22472
22473
22474
22475
22476   ac_fn_c_check_decl "$LINENO" "iswblank" "ac_cv_have_decl_iswblank" "
22477 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22478    <wchar.h>.
22479    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
22480    before <wchar.h>.  */
22481 #include <stddef.h>
22482 #include <stdio.h>
22483 #include <time.h>
22484 #include <wchar.h>
22485 #include <wctype.h>
22486
22487 "
22488 if test "x$ac_cv_have_decl_iswblank" = xyes; then :
22489   ac_have_decl=1
22490 else
22491   ac_have_decl=0
22492 fi
22493
22494 cat >>confdefs.h <<_ACEOF
22495 #define HAVE_DECL_ISWBLANK $ac_have_decl
22496 _ACEOF
22497
22498   if test $ac_cv_func_iswblank = no; then
22499     HAVE_ISWBLANK=0
22500     if test $ac_cv_have_decl_iswblank = yes; then
22501       REPLACE_ISWBLANK=1
22502     fi
22503   fi
22504   if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
22505         :
22506   else
22507     if test $HAVE_ISWBLANK = 0 || test $REPLACE_ISWBLANK = 1; then
22508             :
22509     fi
22510   fi
22511
22512
22513   if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
22514     :
22515   else
22516     if test $HAVE_ISWBLANK = 0 || test $REPLACE_ISWBLANK = 1; then
22517
22518
22519
22520
22521
22522
22523
22524
22525   gl_LIBOBJS="$gl_LIBOBJS iswblank.$ac_objext"
22526
22527     fi
22528   fi
22529
22530
22531
22532
22533
22534           GNULIB_ISWBLANK=1
22535
22536
22537
22538
22539
22540 $as_echo "#define GNULIB_TEST_ISWBLANK 1" >>confdefs.h
22541
22542
22543
22544
22545
22546
22547
22548
22549
22550
22551
22552
22553
22554
22555
22556
22557
22558      if test $gl_cv_have_include_next = yes; then
22559        gl_cv_next_langinfo_h='<'langinfo.h'>'
22560      else
22561        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <langinfo.h>" >&5
22562 $as_echo_n "checking absolute name of <langinfo.h>... " >&6; }
22563 if ${gl_cv_next_langinfo_h+:} false; then :
22564   $as_echo_n "(cached) " >&6
22565 else
22566
22567              if test $ac_cv_header_langinfo_h = yes; then
22568
22569
22570
22571
22572   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22573 /* end confdefs.h.  */
22574 #include <langinfo.h>
22575 _ACEOF
22576                 case "$host_os" in
22577     aix*) gl_absname_cpp="$ac_cpp -C" ;;
22578     *)    gl_absname_cpp="$ac_cpp" ;;
22579   esac
22580
22581   case "$host_os" in
22582     mingw*)
22583                                           gl_dirsep_regex='[/\\]'
22584       ;;
22585     *)
22586       gl_dirsep_regex='\/'
22587       ;;
22588   esac
22589       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22590   gl_header_literal_regex=`echo 'langinfo.h' \
22591                            | sed -e "$gl_make_literal_regex_sed"`
22592   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22593       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22594       s|^/[^/]|//&|
22595       p
22596       q
22597     }'
22598
22599         gl_cv_absolute_langinfo_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22600   sed -n "$gl_absolute_header_sed"`
22601
22602            gl_header=$gl_cv_absolute_langinfo_h
22603            gl_cv_next_langinfo_h='"'$gl_header'"'
22604           else
22605                gl_cv_next_langinfo_h='<'langinfo.h'>'
22606              fi
22607
22608
22609 fi
22610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_langinfo_h" >&5
22611 $as_echo "$gl_cv_next_langinfo_h" >&6; }
22612      fi
22613      NEXT_LANGINFO_H=$gl_cv_next_langinfo_h
22614
22615      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22616        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22617        gl_next_as_first_directive='<'langinfo.h'>'
22618      else
22619        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22620        gl_next_as_first_directive=$gl_cv_next_langinfo_h
22621      fi
22622      NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H=$gl_next_as_first_directive
22623
22624
22625
22626
22627
22628     HAVE_LANGINFO_CODESET=0
22629   HAVE_LANGINFO_T_FMT_AMPM=0
22630   HAVE_LANGINFO_ERA=0
22631   HAVE_LANGINFO_YESEXPR=0
22632
22633   if test $ac_cv_header_langinfo_h = yes; then
22634     HAVE_LANGINFO_H=1
22635             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines CODESET" >&5
22636 $as_echo_n "checking whether langinfo.h defines CODESET... " >&6; }
22637 if ${gl_cv_header_langinfo_codeset+:} false; then :
22638   $as_echo_n "(cached) " >&6
22639 else
22640   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22641 /* end confdefs.h.  */
22642 #include <langinfo.h>
22643 int a = CODESET;
22644
22645 int
22646 main ()
22647 {
22648
22649   ;
22650   return 0;
22651 }
22652 _ACEOF
22653 if ac_fn_c_try_compile "$LINENO"; then :
22654   gl_cv_header_langinfo_codeset=yes
22655 else
22656   gl_cv_header_langinfo_codeset=no
22657 fi
22658 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22659
22660 fi
22661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_codeset" >&5
22662 $as_echo "$gl_cv_header_langinfo_codeset" >&6; }
22663     if test $gl_cv_header_langinfo_codeset = yes; then
22664       HAVE_LANGINFO_CODESET=1
22665     fi
22666     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines T_FMT_AMPM" >&5
22667 $as_echo_n "checking whether langinfo.h defines T_FMT_AMPM... " >&6; }
22668 if ${gl_cv_header_langinfo_t_fmt_ampm+:} false; then :
22669   $as_echo_n "(cached) " >&6
22670 else
22671   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22672 /* end confdefs.h.  */
22673 #include <langinfo.h>
22674 int a = T_FMT_AMPM;
22675
22676 int
22677 main ()
22678 {
22679
22680   ;
22681   return 0;
22682 }
22683 _ACEOF
22684 if ac_fn_c_try_compile "$LINENO"; then :
22685   gl_cv_header_langinfo_t_fmt_ampm=yes
22686 else
22687   gl_cv_header_langinfo_t_fmt_ampm=no
22688 fi
22689 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22690
22691 fi
22692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_t_fmt_ampm" >&5
22693 $as_echo "$gl_cv_header_langinfo_t_fmt_ampm" >&6; }
22694     if test $gl_cv_header_langinfo_t_fmt_ampm = yes; then
22695       HAVE_LANGINFO_T_FMT_AMPM=1
22696     fi
22697     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines ERA" >&5
22698 $as_echo_n "checking whether langinfo.h defines ERA... " >&6; }
22699 if ${gl_cv_header_langinfo_era+:} false; then :
22700   $as_echo_n "(cached) " >&6
22701 else
22702   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22703 /* end confdefs.h.  */
22704 #include <langinfo.h>
22705 int a = ERA;
22706
22707 int
22708 main ()
22709 {
22710
22711   ;
22712   return 0;
22713 }
22714 _ACEOF
22715 if ac_fn_c_try_compile "$LINENO"; then :
22716   gl_cv_header_langinfo_era=yes
22717 else
22718   gl_cv_header_langinfo_era=no
22719 fi
22720 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22721
22722 fi
22723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_era" >&5
22724 $as_echo "$gl_cv_header_langinfo_era" >&6; }
22725     if test $gl_cv_header_langinfo_era = yes; then
22726       HAVE_LANGINFO_ERA=1
22727     fi
22728     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines YESEXPR" >&5
22729 $as_echo_n "checking whether langinfo.h defines YESEXPR... " >&6; }
22730 if ${gl_cv_header_langinfo_yesexpr+:} false; then :
22731   $as_echo_n "(cached) " >&6
22732 else
22733   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22734 /* end confdefs.h.  */
22735 #include <langinfo.h>
22736 int a = YESEXPR;
22737
22738 int
22739 main ()
22740 {
22741
22742   ;
22743   return 0;
22744 }
22745 _ACEOF
22746 if ac_fn_c_try_compile "$LINENO"; then :
22747   gl_cv_header_langinfo_yesexpr=yes
22748 else
22749   gl_cv_header_langinfo_yesexpr=no
22750 fi
22751 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22752
22753 fi
22754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_yesexpr" >&5
22755 $as_echo "$gl_cv_header_langinfo_yesexpr" >&6; }
22756     if test $gl_cv_header_langinfo_yesexpr = yes; then
22757       HAVE_LANGINFO_YESEXPR=1
22758     fi
22759   else
22760     HAVE_LANGINFO_H=0
22761   fi
22762
22763
22764
22765
22766
22767
22768
22769     for gl_func in nl_langinfo; do
22770     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
22771     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
22772 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
22773 if eval \${$as_gl_Symbol+:} false; then :
22774   $as_echo_n "(cached) " >&6
22775 else
22776   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22777 /* end confdefs.h.  */
22778 #include <langinfo.h>
22779
22780 int
22781 main ()
22782 {
22783 #undef $gl_func
22784   (void) $gl_func;
22785   ;
22786   return 0;
22787 }
22788 _ACEOF
22789 if ac_fn_c_try_compile "$LINENO"; then :
22790   eval "$as_gl_Symbol=yes"
22791 else
22792   eval "$as_gl_Symbol=no"
22793 fi
22794 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22795 fi
22796 eval ac_res=\$$as_gl_Symbol
22797                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
22798 $as_echo "$ac_res" >&6; }
22799     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
22800   cat >>confdefs.h <<_ACEOF
22801 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
22802 _ACEOF
22803
22804                      eval ac_cv_have_decl_$gl_func=yes
22805 fi
22806       done
22807
22808
22809
22810
22811
22812
22813
22814   for ac_func in lchown
22815 do :
22816   ac_fn_c_check_func "$LINENO" "lchown" "ac_cv_func_lchown"
22817 if test "x$ac_cv_func_lchown" = xyes; then :
22818   cat >>confdefs.h <<_ACEOF
22819 #define HAVE_LCHOWN 1
22820 _ACEOF
22821
22822 fi
22823 done
22824
22825   if test $ac_cv_func_lchown = no; then
22826     HAVE_LCHOWN=0
22827   else
22828         case "$gl_cv_func_chown_slash_works" in
22829       *yes) ;;
22830       *)
22831         REPLACE_LCHOWN=1
22832         ;;
22833     esac
22834     case "$gl_cv_func_chown_ctime_works" in
22835       *yes) ;;
22836       *)
22837         REPLACE_LCHOWN=1
22838         ;;
22839     esac
22840   fi
22841
22842   if test $HAVE_LCHOWN = 0 || test $REPLACE_LCHOWN = 1; then
22843
22844
22845
22846
22847
22848
22849
22850
22851   gl_LIBOBJS="$gl_LIBOBJS lchown.$ac_objext"
22852
22853   fi
22854
22855
22856
22857
22858
22859           GNULIB_LCHOWN=1
22860
22861
22862
22863
22864
22865 $as_echo "#define GNULIB_TEST_LCHOWN 1" >>confdefs.h
22866
22867
22868
22869
22870
22871
22872   if test $ac_cv_func_link = no; then
22873     HAVE_LINK=0
22874   else
22875     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether link obeys POSIX" >&5
22876 $as_echo_n "checking whether link obeys POSIX... " >&6; }
22877 if ${gl_cv_func_link_works+:} false; then :
22878   $as_echo_n "(cached) " >&6
22879 else
22880   touch conftest.a
22881        # Assume that if we have lstat, we can also check symlinks.
22882        if test $ac_cv_func_lstat = yes; then
22883          ln -s conftest.a conftest.lnk
22884        fi
22885        if test "$cross_compiling" = yes; then :
22886   case "$host_os" in
22887                     # Guess yes on glibc systems.
22888             *-gnu*) gl_cv_func_link_works="guessing yes" ;;
22889                     # If we don't know, assume the worst.
22890             *)      gl_cv_func_link_works="guessing no" ;;
22891           esac
22892
22893 else
22894   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22895 /* end confdefs.h.  */
22896 #include <unistd.h>
22897
22898 int
22899 main ()
22900 {
22901 int result = 0;
22902              if (!link ("conftest.a", "conftest.b/"))
22903                result |= 1;
22904 #if HAVE_LSTAT
22905              if (!link ("conftest.lnk/", "conftest.b"))
22906                result |= 2;
22907              if (rename ("conftest.a", "conftest.b"))
22908                result |= 4;
22909              if (!link ("conftest.b", "conftest.lnk"))
22910                result |= 8;
22911 #endif
22912              return result;
22913
22914   ;
22915   return 0;
22916 }
22917 _ACEOF
22918 if ac_fn_c_try_run "$LINENO"; then :
22919   gl_cv_func_link_works=yes
22920 else
22921   gl_cv_func_link_works=no
22922 fi
22923 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22924   conftest.$ac_objext conftest.beam conftest.$ac_ext
22925 fi
22926
22927        rm -f conftest.a conftest.b conftest.lnk
22928 fi
22929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_link_works" >&5
22930 $as_echo "$gl_cv_func_link_works" >&6; }
22931     case "$gl_cv_func_link_works" in
22932       *yes) ;;
22933       *)
22934         REPLACE_LINK=1
22935         ;;
22936     esac
22937   fi
22938
22939   if test $HAVE_LINK = 0 || test $REPLACE_LINK = 1; then
22940
22941
22942
22943
22944
22945
22946
22947
22948   gl_LIBOBJS="$gl_LIBOBJS link.$ac_objext"
22949
22950   fi
22951
22952
22953
22954
22955
22956           GNULIB_LINK=1
22957
22958
22959
22960
22961
22962 $as_echo "#define GNULIB_TEST_LINK 1" >>confdefs.h
22963
22964
22965
22966
22967           gl_link_follows_symlinks=0 # assume GNU behavior
22968   if test $ac_cv_func_readlink = yes; then
22969                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __xpg4" >&5
22970 $as_echo_n "checking for __xpg4... " >&6; }
22971 if ${gl_cv_have___xpg4+:} false; then :
22972   $as_echo_n "(cached) " >&6
22973 else
22974   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22975 /* end confdefs.h.  */
22976 extern int __xpg4;
22977 int
22978 main ()
22979 {
22980 return __xpg4;
22981   ;
22982   return 0;
22983 }
22984 _ACEOF
22985 if ac_fn_c_try_link "$LINENO"; then :
22986   gl_cv_have___xpg4=yes
22987 else
22988   gl_cv_have___xpg4=no
22989 fi
22990 rm -f core conftest.err conftest.$ac_objext \
22991     conftest$ac_exeext conftest.$ac_ext
22992
22993 fi
22994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have___xpg4" >&5
22995 $as_echo "$gl_cv_have___xpg4" >&6; }
22996     if test $gl_cv_have___xpg4 = yes; then
22997       gl_link_follows_symlinks=-1
22998     else
22999       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether link(2) dereferences a symlink" >&5
23000 $as_echo_n "checking whether link(2) dereferences a symlink... " >&6; }
23001 if ${gl_cv_func_link_follows_symlink+:} false; then :
23002   $as_echo_n "(cached) " >&6
23003 else
23004
23005          # Create a regular file.
23006          echo > conftest.file
23007          if test "$cross_compiling" = yes; then :
23008                                                  case "$host_os" in
23009                            # On glibc/Linux we know the result.
23010               linux*-gnu*) gl_cv_func_link_follows_symlink="guessing no" ;;
23011                            # Otherwise, we don't know.
23012               *)           gl_cv_func_link_follows_symlink=unknown ;;
23013             esac
23014
23015 else
23016   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23017 /* end confdefs.h.  */
23018
23019 #       include <sys/types.h>
23020 #       include <sys/stat.h>
23021 #       include <unistd.h>
23022 #       include <stdlib.h>
23023
23024 #       define SAME_INODE(Stat_buf_1, Stat_buf_2) \
23025           ((Stat_buf_1).st_ino == (Stat_buf_2).st_ino \
23026            && (Stat_buf_1).st_dev == (Stat_buf_2).st_dev)
23027
23028         int
23029         main ()
23030         {
23031           const char *file = "conftest.file";
23032           const char *sym = "conftest.sym";
23033           const char *hard = "conftest.hard";
23034           struct stat sb_file, sb_hard;
23035
23036           /* Create a symlink to the regular file. */
23037           if (symlink (file, sym))
23038             return 2;
23039
23040           /* Create a hard link to that symlink.  */
23041           if (link (sym, hard))
23042             return 3;
23043
23044           if (lstat (hard, &sb_hard))
23045             return 4;
23046           if (lstat (file, &sb_file))
23047             return 5;
23048
23049           /* If the dev/inode of hard and file are the same, then
23050              the link call followed the symlink.  */
23051           return SAME_INODE (sb_hard, sb_file) ? 1 : 0;
23052         }
23053
23054 _ACEOF
23055 if ac_fn_c_try_run "$LINENO"; then :
23056   gl_cv_func_link_follows_symlink=no
23057 else
23058              gl_cv_func_link_follows_symlink=yes
23059 fi
23060 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23061   conftest.$ac_objext conftest.beam conftest.$ac_ext
23062 fi
23063
23064          rm -f conftest.file conftest.sym conftest.hard
23065
23066 fi
23067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_link_follows_symlink" >&5
23068 $as_echo "$gl_cv_func_link_follows_symlink" >&6; }
23069       case "$gl_cv_func_link_follows_symlink" in
23070         *yes) gl_link_follows_symlinks=1 ;;
23071         *no) ;; # already defaulted to 0
23072         *) gl_link_follows_symlinks=-2 ;;
23073       esac
23074     fi
23075   fi
23076
23077 cat >>confdefs.h <<_ACEOF
23078 #define LINK_FOLLOWS_SYMLINKS $gl_link_follows_symlinks
23079 _ACEOF
23080
23081
23082
23083
23084
23085
23086
23087
23088
23089   if test $ac_cv_func_linkat = no; then
23090     HAVE_LINKAT=0
23091   else
23092                     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether linkat() can link symlinks" >&5
23093 $as_echo_n "checking whether linkat() can link symlinks... " >&6; }
23094 if ${gl_cv_func_linkat_nofollow+:} false; then :
23095   $as_echo_n "(cached) " >&6
23096 else
23097   rm -rf conftest.l1 conftest.l2
23098        ln -s target conftest.l1
23099        if test "$cross_compiling" = yes; then :
23100   case "$host_os" in
23101            darwin*) gl_cv_func_linkat_nofollow="guessing no" ;;
23102            *)       gl_cv_func_linkat_nofollow="guessing yes" ;;
23103           esac
23104 else
23105   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23106 /* end confdefs.h.  */
23107 #include <fcntl.h>
23108                           #include <unistd.h>
23109
23110 int
23111 main ()
23112 {
23113 return linkat (AT_FDCWD, "conftest.l1", AT_FDCWD,
23114                                             "conftest.l2", 0);
23115
23116   ;
23117   return 0;
23118 }
23119 _ACEOF
23120 if ac_fn_c_try_run "$LINENO"; then :
23121   gl_cv_func_linkat_nofollow=yes
23122 else
23123   gl_cv_func_linkat_nofollow=no
23124 fi
23125 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23126   conftest.$ac_objext conftest.beam conftest.$ac_ext
23127 fi
23128
23129
23130        rm -rf conftest.l1 conftest.l2
23131 fi
23132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_linkat_nofollow" >&5
23133 $as_echo "$gl_cv_func_linkat_nofollow" >&6; }
23134
23135     case $gl_cv_func_linkat_nofollow in
23136       *no) LINKAT_SYMLINK_NOTSUP=1 ;;
23137       *yes) LINKAT_SYMLINK_NOTSUP=0 ;;
23138     esac
23139
23140     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether linkat handles trailing slash correctly" >&5
23141 $as_echo_n "checking whether linkat handles trailing slash correctly... " >&6; }
23142 if ${gl_cv_func_linkat_slash+:} false; then :
23143   $as_echo_n "(cached) " >&6
23144 else
23145   rm -rf conftest.a conftest.b conftest.c conftest.d conftest.e conftest.s
23146        if test "$cross_compiling" = yes; then :
23147   # Guess yes on glibc systems, no otherwise.
23148           case "$host_os" in
23149             *-gnu*) gl_cv_func_linkat_slash="guessing yes";;
23150             *)      gl_cv_func_linkat_slash="guessing no";;
23151           esac
23152
23153 else
23154   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23155 /* end confdefs.h.  */
23156 #include <unistd.h>
23157               #include <fcntl.h>
23158               #include <errno.h>
23159               #include <stdio.h>
23160
23161 int
23162 main ()
23163 {
23164 int result;
23165               int fd;
23166               /* Create a regular file.  */
23167               fd = open ("conftest.a", O_CREAT | O_EXCL | O_WRONLY, 0600);
23168               if (fd < 0)
23169                 return 1;
23170               if (write (fd, "hello", 5) < 5)
23171                 return 2;
23172               if (close (fd) < 0)
23173                 return 3;
23174               /* Test whether hard links are supported on the current
23175                  device.  */
23176               if (linkat (AT_FDCWD, "conftest.a", AT_FDCWD, "conftest.b",
23177                           AT_SYMLINK_FOLLOW) < 0)
23178                 return 0;
23179               result = 0;
23180               /* Test whether a trailing "/" is treated like "/.".  */
23181               if (linkat (AT_FDCWD, "conftest.a/", AT_FDCWD, "conftest.c",
23182                           AT_SYMLINK_FOLLOW) == 0)
23183                 result |= 4;
23184               if (linkat (AT_FDCWD, "conftest.a", AT_FDCWD, "conftest.d/",
23185                           AT_SYMLINK_FOLLOW) == 0)
23186                 result |= 8;
23187
23188               /* On OS X 10.10 a trailing "/" will cause the second path to be
23189                  dereferenced, and thus will succeed on a dangling symlink.  */
23190               if (symlink ("conftest.e", "conftest.s") == 0)
23191                 {
23192                   if (linkat (AT_FDCWD, "conftest.a", AT_FDCWD, "conftest.s/",
23193                       AT_SYMLINK_FOLLOW) == 0)
23194                     result |= 16;
23195                 }
23196
23197               return result;
23198
23199   ;
23200   return 0;
23201 }
23202 _ACEOF
23203 if ac_fn_c_try_run "$LINENO"; then :
23204   gl_cv_func_linkat_slash=yes
23205 else
23206   gl_cv_func_linkat_slash=no
23207 fi
23208 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23209   conftest.$ac_objext conftest.beam conftest.$ac_ext
23210 fi
23211
23212        rm -rf conftest.a conftest.b conftest.c conftest.d conftest.e conftest.s
23213 fi
23214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_linkat_slash" >&5
23215 $as_echo "$gl_cv_func_linkat_slash" >&6; }
23216     case "$gl_cv_func_linkat_slash" in
23217       *yes) gl_linkat_slash_bug=0 ;;
23218       *)    gl_linkat_slash_bug=1 ;;
23219     esac
23220
23221     case "$gl_cv_func_linkat_nofollow" in
23222       *yes) linkat_nofollow=yes ;;
23223       *) linkat_nofollow=no ;;
23224     esac
23225
23226     if test "$linkat_nofollow" != yes \
23227        || test $gl_linkat_slash_bug = 1; then
23228       REPLACE_LINKAT=1
23229
23230 cat >>confdefs.h <<_ACEOF
23231 #define LINKAT_TRAILING_SLASH_BUG $gl_linkat_slash_bug
23232 _ACEOF
23233
23234
23235 cat >>confdefs.h <<_ACEOF
23236 #define LINKAT_SYMLINK_NOTSUP $LINKAT_SYMLINK_NOTSUP
23237 _ACEOF
23238
23239     fi
23240   fi
23241
23242   if test $HAVE_LINKAT = 0 || test $REPLACE_LINKAT = 1; then
23243
23244
23245
23246
23247
23248
23249
23250
23251   gl_LIBOBJS="$gl_LIBOBJS linkat.$ac_objext"
23252
23253
23254
23255
23256
23257
23258
23259
23260
23261   gl_LIBOBJS="$gl_LIBOBJS at-func2.$ac_objext"
23262
23263   fi
23264
23265
23266
23267
23268
23269           GNULIB_LINKAT=1
23270
23271
23272
23273
23274
23275 $as_echo "#define GNULIB_TEST_LINKAT 1" >>confdefs.h
23276
23277
23278
23279
23280
23281
23282
23283
23284
23285
23286
23287   LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(abs_top_builddir)/$gl_source_base\""
23288
23289
23290
23291
23292
23293
23294
23295
23296
23297   case "$host_os" in
23298     solaris*)
23299
23300 $as_echo "#define _LCONV_C99 1" >>confdefs.h
23301
23302       ;;
23303   esac
23304
23305   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h conforms to POSIX:2001" >&5
23306 $as_echo_n "checking whether locale.h conforms to POSIX:2001... " >&6; }
23307 if ${gl_cv_header_locale_h_posix2001+:} false; then :
23308   $as_echo_n "(cached) " >&6
23309 else
23310   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23311 /* end confdefs.h.  */
23312 #include <locale.h>
23313             int x = LC_MESSAGES;
23314             int y = sizeof (((struct lconv *) 0)->decimal_point);
23315 int
23316 main ()
23317 {
23318
23319   ;
23320   return 0;
23321 }
23322 _ACEOF
23323 if ac_fn_c_try_compile "$LINENO"; then :
23324   gl_cv_header_locale_h_posix2001=yes
23325 else
23326   gl_cv_header_locale_h_posix2001=no
23327 fi
23328 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23329 fi
23330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_h_posix2001" >&5
23331 $as_echo "$gl_cv_header_locale_h_posix2001" >&6; }
23332
23333
23334   if test $ac_cv_header_xlocale_h = yes; then
23335     HAVE_XLOCALE_H=1
23336                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h defines locale_t" >&5
23337 $as_echo_n "checking whether locale.h defines locale_t... " >&6; }
23338 if ${gl_cv_header_locale_has_locale_t+:} false; then :
23339   $as_echo_n "(cached) " >&6
23340 else
23341   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23342 /* end confdefs.h.  */
23343 #include <locale.h>
23344               locale_t x;
23345 int
23346 main ()
23347 {
23348
23349   ;
23350   return 0;
23351 }
23352 _ACEOF
23353 if ac_fn_c_try_compile "$LINENO"; then :
23354   gl_cv_header_locale_has_locale_t=yes
23355 else
23356   gl_cv_header_locale_has_locale_t=no
23357 fi
23358 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23359
23360 fi
23361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_has_locale_t" >&5
23362 $as_echo "$gl_cv_header_locale_has_locale_t" >&6; }
23363     if test $gl_cv_header_locale_has_locale_t = yes; then
23364       gl_cv_header_locale_h_needs_xlocale_h=no
23365     else
23366       gl_cv_header_locale_h_needs_xlocale_h=yes
23367     fi
23368   else
23369     HAVE_XLOCALE_H=0
23370     gl_cv_header_locale_h_needs_xlocale_h=no
23371   fi
23372
23373
23374           { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct lconv is properly defined" >&5
23375 $as_echo_n "checking whether struct lconv is properly defined... " >&6; }
23376 if ${gl_cv_sys_struct_lconv_ok+:} false; then :
23377   $as_echo_n "(cached) " >&6
23378 else
23379   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23380 /* end confdefs.h.  */
23381 #include <locale.h>
23382             struct lconv l;
23383             int x = sizeof (l.decimal_point);
23384             int y = sizeof (l.int_p_cs_precedes);
23385 int
23386 main ()
23387 {
23388
23389   ;
23390   return 0;
23391 }
23392 _ACEOF
23393 if ac_fn_c_try_compile "$LINENO"; then :
23394   gl_cv_sys_struct_lconv_ok=yes
23395 else
23396   gl_cv_sys_struct_lconv_ok=no
23397 fi
23398 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23399
23400 fi
23401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_lconv_ok" >&5
23402 $as_echo "$gl_cv_sys_struct_lconv_ok" >&6; }
23403   if test $gl_cv_sys_struct_lconv_ok = no; then
23404     REPLACE_STRUCT_LCONV=1
23405   fi
23406
23407
23408
23409
23410
23411
23412
23413
23414
23415      if test $gl_cv_have_include_next = yes; then
23416        gl_cv_next_locale_h='<'locale.h'>'
23417      else
23418        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <locale.h>" >&5
23419 $as_echo_n "checking absolute name of <locale.h>... " >&6; }
23420 if ${gl_cv_next_locale_h+:} false; then :
23421   $as_echo_n "(cached) " >&6
23422 else
23423
23424
23425
23426   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23427 /* end confdefs.h.  */
23428 #include <locale.h>
23429 _ACEOF
23430                 case "$host_os" in
23431     aix*) gl_absname_cpp="$ac_cpp -C" ;;
23432     *)    gl_absname_cpp="$ac_cpp" ;;
23433   esac
23434
23435   case "$host_os" in
23436     mingw*)
23437                                           gl_dirsep_regex='[/\\]'
23438       ;;
23439     *)
23440       gl_dirsep_regex='\/'
23441       ;;
23442   esac
23443       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23444   gl_header_literal_regex=`echo 'locale.h' \
23445                            | sed -e "$gl_make_literal_regex_sed"`
23446   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23447       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23448       s|^/[^/]|//&|
23449       p
23450       q
23451     }'
23452
23453         gl_cv_absolute_locale_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23454   sed -n "$gl_absolute_header_sed"`
23455
23456            gl_header=$gl_cv_absolute_locale_h
23457            gl_cv_next_locale_h='"'$gl_header'"'
23458
23459
23460 fi
23461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_locale_h" >&5
23462 $as_echo "$gl_cv_next_locale_h" >&6; }
23463      fi
23464      NEXT_LOCALE_H=$gl_cv_next_locale_h
23465
23466      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23467        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23468        gl_next_as_first_directive='<'locale.h'>'
23469      else
23470        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23471        gl_next_as_first_directive=$gl_cv_next_locale_h
23472      fi
23473      NEXT_AS_FIRST_DIRECTIVE_LOCALE_H=$gl_next_as_first_directive
23474
23475
23476
23477
23478
23479
23480     for gl_func in setlocale duplocale; do
23481     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
23482     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
23483 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
23484 if eval \${$as_gl_Symbol+:} false; then :
23485   $as_echo_n "(cached) " >&6
23486 else
23487   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23488 /* end confdefs.h.  */
23489 #include <locale.h>
23490 /* Some systems provide declarations in a non-standard header.  */
23491 #if HAVE_XLOCALE_H
23492 # include <xlocale.h>
23493 #endif
23494
23495 int
23496 main ()
23497 {
23498 #undef $gl_func
23499   (void) $gl_func;
23500   ;
23501   return 0;
23502 }
23503 _ACEOF
23504 if ac_fn_c_try_compile "$LINENO"; then :
23505   eval "$as_gl_Symbol=yes"
23506 else
23507   eval "$as_gl_Symbol=no"
23508 fi
23509 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23510 fi
23511 eval ac_res=\$$as_gl_Symbol
23512                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
23513 $as_echo "$ac_res" >&6; }
23514     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
23515   cat >>confdefs.h <<_ACEOF
23516 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
23517 _ACEOF
23518
23519                      eval ac_cv_have_decl_$gl_func=yes
23520 fi
23521       done
23522
23523
23524
23525
23526
23527
23528   if test $REPLACE_STRUCT_LCONV = 1; then
23529     REPLACE_LOCALECONV=1
23530   fi
23531
23532   if test $REPLACE_LOCALECONV = 1; then
23533
23534
23535
23536
23537
23538
23539
23540
23541   gl_LIBOBJS="$gl_LIBOBJS localeconv.$ac_objext"
23542
23543
23544   ac_fn_c_check_member "$LINENO" "struct lconv" "decimal_point" "ac_cv_member_struct_lconv_decimal_point" "#include <locale.h>
23545 "
23546 if test "x$ac_cv_member_struct_lconv_decimal_point" = xyes; then :
23547
23548 cat >>confdefs.h <<_ACEOF
23549 #define HAVE_STRUCT_LCONV_DECIMAL_POINT 1
23550 _ACEOF
23551
23552
23553 fi
23554
23555
23556   fi
23557
23558
23559
23560
23561
23562           GNULIB_LOCALECONV=1
23563
23564
23565
23566
23567
23568 $as_echo "#define GNULIB_TEST_LOCALECONV 1" >>confdefs.h
23569
23570
23571
23572
23573
23574
23575
23576
23577
23578   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lseek detects pipes" >&5
23579 $as_echo_n "checking whether lseek detects pipes... " >&6; }
23580 if ${gl_cv_func_lseek_pipe+:} false; then :
23581   $as_echo_n "(cached) " >&6
23582 else
23583   case "$host_os" in
23584        mingw*)
23585                                                                gl_cv_func_lseek_pipe=no
23586          ;;
23587        *)
23588          if test $cross_compiling = no; then
23589            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23590 /* end confdefs.h.  */
23591
23592 #include <sys/types.h> /* for off_t */
23593 #include <stdio.h> /* for SEEK_CUR */
23594 #if HAVE_UNISTD_H
23595 # include <unistd.h>
23596 #else /* on Windows with MSVC */
23597 # include <io.h>
23598 #endif
23599
23600 int
23601 main ()
23602 {
23603
23604   /* Exit with success only if stdin is seekable.  */
23605   return lseek (0, (off_t)0, SEEK_CUR) < 0;
23606
23607   ;
23608   return 0;
23609 }
23610 _ACEOF
23611 if ac_fn_c_try_link "$LINENO"; then :
23612   if test -s conftest$ac_exeext \
23613                  && ./conftest$ac_exeext < conftest.$ac_ext \
23614                  && test 1 = "`echo hi \
23615                    | { ./conftest$ac_exeext; echo $?; cat >/dev/null; }`"; then
23616                 gl_cv_func_lseek_pipe=yes
23617               else
23618                 gl_cv_func_lseek_pipe=no
23619               fi
23620
23621 else
23622   gl_cv_func_lseek_pipe=no
23623 fi
23624 rm -f core conftest.err conftest.$ac_objext \
23625     conftest$ac_exeext conftest.$ac_ext
23626          else
23627            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23628 /* end confdefs.h.  */
23629
23630 #if defined __BEOS__
23631 /* BeOS mistakenly return 0 when trying to seek on pipes.  */
23632   Choke me.
23633 #endif
23634 _ACEOF
23635 if ac_fn_c_try_compile "$LINENO"; then :
23636   gl_cv_func_lseek_pipe=yes
23637 else
23638   gl_cv_func_lseek_pipe=no
23639 fi
23640 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23641          fi
23642          ;;
23643      esac
23644
23645 fi
23646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lseek_pipe" >&5
23647 $as_echo "$gl_cv_func_lseek_pipe" >&6; }
23648   if test $gl_cv_func_lseek_pipe = no; then
23649     REPLACE_LSEEK=1
23650
23651 $as_echo "#define LSEEK_PIPE_BROKEN 1" >>confdefs.h
23652
23653   fi
23654
23655
23656   if test $WINDOWS_64_BIT_OFF_T = 1; then
23657     REPLACE_LSEEK=1
23658   fi
23659
23660   if test $REPLACE_LSEEK = 1; then
23661
23662
23663
23664
23665
23666
23667
23668
23669   gl_LIBOBJS="$gl_LIBOBJS lseek.$ac_objext"
23670
23671   fi
23672
23673
23674
23675
23676
23677           GNULIB_LSEEK=1
23678
23679
23680
23681
23682
23683 $as_echo "#define GNULIB_TEST_LSEEK 1" >>confdefs.h
23684
23685
23686
23687
23688
23689
23690   if test $ac_cv_func_lstat = yes; then
23691
23692     case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
23693       *no)
23694         REPLACE_LSTAT=1
23695         ;;
23696     esac
23697   else
23698     HAVE_LSTAT=0
23699   fi
23700
23701   if test $REPLACE_LSTAT = 1; then
23702
23703
23704
23705
23706
23707
23708
23709
23710   gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
23711
23712     :
23713   fi
23714
23715
23716
23717
23718
23719           GNULIB_LSTAT=1
23720
23721
23722
23723
23724
23725 $as_echo "#define GNULIB_TEST_LSTAT 1" >>confdefs.h
23726
23727
23728
23729
23730
23731
23732       for ac_header in stdlib.h
23733 do :
23734   ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
23735 if test "x$ac_cv_header_stdlib_h" = xyes; then :
23736   cat >>confdefs.h <<_ACEOF
23737 #define HAVE_STDLIB_H 1
23738 _ACEOF
23739
23740 fi
23741
23742 done
23743
23744   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
23745 $as_echo_n "checking for GNU libc compatible malloc... " >&6; }
23746 if ${ac_cv_func_malloc_0_nonnull+:} false; then :
23747   $as_echo_n "(cached) " >&6
23748 else
23749   if test "$cross_compiling" = yes; then :
23750   case "$host_os" in
23751           # Guess yes on platforms where we know the result.
23752           *-gnu* | freebsd* | netbsd* | openbsd* \
23753           | hpux* | solaris* | cygwin* | mingw*)
23754             ac_cv_func_malloc_0_nonnull=yes ;;
23755           # If we don't know, assume the worst.
23756           *) ac_cv_func_malloc_0_nonnull=no ;;
23757         esac
23758
23759 else
23760   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23761 /* end confdefs.h.  */
23762 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
23763             # include <stdlib.h>
23764             #else
23765             char *malloc ();
23766             #endif
23767
23768 int
23769 main ()
23770 {
23771 return ! malloc (0);
23772   ;
23773   return 0;
23774 }
23775
23776 _ACEOF
23777 if ac_fn_c_try_run "$LINENO"; then :
23778   ac_cv_func_malloc_0_nonnull=yes
23779 else
23780   ac_cv_func_malloc_0_nonnull=no
23781 fi
23782 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23783   conftest.$ac_objext conftest.beam conftest.$ac_ext
23784 fi
23785
23786
23787 fi
23788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
23789 $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
23790   if test $ac_cv_func_malloc_0_nonnull = yes; then :
23791
23792 $as_echo "#define HAVE_MALLOC_GNU 1" >>confdefs.h
23793
23794 else
23795   $as_echo "#define HAVE_MALLOC_GNU 0" >>confdefs.h
23796
23797      REPLACE_MALLOC=1
23798
23799 fi
23800
23801
23802   if test $REPLACE_MALLOC = 1; then
23803
23804
23805
23806
23807
23808
23809
23810
23811   gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
23812
23813   fi
23814
23815
23816 cat >>confdefs.h <<_ACEOF
23817 #define GNULIB_MALLOC_GNU 1
23818 _ACEOF
23819
23820
23821
23822
23823
23824   if test $gl_cv_func_malloc_posix = yes; then
23825
23826 $as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
23827
23828   else
23829     REPLACE_MALLOC=1
23830   fi
23831
23832   if test $REPLACE_MALLOC = 1; then
23833
23834
23835
23836
23837
23838
23839
23840
23841   gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
23842
23843   fi
23844
23845
23846
23847
23848
23849           GNULIB_MALLOC_POSIX=1
23850
23851
23852
23853
23854
23855 $as_echo "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
23856
23857
23858
23859
23860
23861
23862
23863
23864
23865
23866
23867
23868
23869
23870
23871
23872
23873
23874
23875
23876   if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
23877
23878
23879
23880      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
23881 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
23882 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
23883   $as_echo_n "(cached) " >&6
23884 else
23885
23886                   case "$host_os" in
23887                      # Guess no on AIX and OSF/1.
23888         aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
23889                      # Guess yes otherwise.
23890         *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
23891       esac
23892       if test $LOCALE_JA != none; then
23893         if test "$cross_compiling" = yes; then :
23894   :
23895 else
23896   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23897 /* end confdefs.h.  */
23898
23899 #include <locale.h>
23900 #include <string.h>
23901 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
23902    <wchar.h>.
23903    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
23904    included before <wchar.h>.  */
23905 #include <stddef.h>
23906 #include <stdio.h>
23907 #include <time.h>
23908 #include <wchar.h>
23909 int main ()
23910 {
23911   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
23912     {
23913       const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
23914       mbstate_t state;
23915       wchar_t wc;
23916
23917       memset (&state, '\0', sizeof (mbstate_t));
23918       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
23919         if (mbsinit (&state))
23920           return 1;
23921     }
23922   return 0;
23923 }
23924 _ACEOF
23925 if ac_fn_c_try_run "$LINENO"; then :
23926   gl_cv_func_mbrtowc_incomplete_state=yes
23927 else
23928   gl_cv_func_mbrtowc_incomplete_state=no
23929 fi
23930 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23931   conftest.$ac_objext conftest.beam conftest.$ac_ext
23932 fi
23933
23934       fi
23935
23936 fi
23937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
23938 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
23939
23940
23941
23942
23943      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
23944 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
23945 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
23946   $as_echo_n "(cached) " >&6
23947 else
23948
23949                   case "$host_os" in
23950                     # Guess no on Solaris 8.
23951         solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
23952                     # Guess yes otherwise.
23953         *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
23954       esac
23955       if test $LOCALE_ZH_CN != none; then
23956         if test "$cross_compiling" = yes; then :
23957   :
23958 else
23959   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23960 /* end confdefs.h.  */
23961
23962 #include <locale.h>
23963 #include <stdlib.h>
23964 #include <string.h>
23965 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
23966    <wchar.h>.
23967    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
23968    included before <wchar.h>.  */
23969 #include <stddef.h>
23970 #include <stdio.h>
23971 #include <time.h>
23972 #include <wchar.h>
23973 int main ()
23974 {
23975   /* This fails on Solaris 8:
23976      mbrtowc returns 2, and sets wc to 0x00F0.
23977      mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
23978   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
23979     {
23980       char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
23981       mbstate_t state;
23982       wchar_t wc;
23983
23984       memset (&state, '\0', sizeof (mbstate_t));
23985       if (mbrtowc (&wc, input + 3, 6, &state) != 4
23986           && mbtowc (&wc, input + 3, 6) == 4)
23987         return 1;
23988     }
23989   return 0;
23990 }
23991 _ACEOF
23992 if ac_fn_c_try_run "$LINENO"; then :
23993   gl_cv_func_mbrtowc_sanitycheck=yes
23994 else
23995   gl_cv_func_mbrtowc_sanitycheck=no
23996 fi
23997 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23998   conftest.$ac_objext conftest.beam conftest.$ac_ext
23999 fi
24000
24001       fi
24002
24003 fi
24004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
24005 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
24006
24007     REPLACE_MBSTATE_T=0
24008     case "$gl_cv_func_mbrtowc_incomplete_state" in
24009       *yes) ;;
24010       *) REPLACE_MBSTATE_T=1 ;;
24011     esac
24012     case "$gl_cv_func_mbrtowc_sanitycheck" in
24013       *yes) ;;
24014       *) REPLACE_MBSTATE_T=1 ;;
24015     esac
24016   else
24017     REPLACE_MBSTATE_T=1
24018   fi
24019
24020
24021
24022   if test $ac_cv_func_mbrtowc = no; then
24023     HAVE_MBRTOWC=0
24024     ac_fn_c_check_decl "$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" "
24025 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
24026    <wchar.h>.
24027    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
24028    included before <wchar.h>.  */
24029 #include <stddef.h>
24030 #include <stdio.h>
24031 #include <time.h>
24032 #include <wchar.h>
24033
24034 "
24035 if test "x$ac_cv_have_decl_mbrtowc" = xyes; then :
24036   ac_have_decl=1
24037 else
24038   ac_have_decl=0
24039 fi
24040
24041 cat >>confdefs.h <<_ACEOF
24042 #define HAVE_DECL_MBRTOWC $ac_have_decl
24043 _ACEOF
24044
24045     if test $ac_cv_have_decl_mbrtowc = yes; then
24046                         REPLACE_MBRTOWC=1
24047     fi
24048   else
24049     if test $REPLACE_MBSTATE_T = 1; then
24050       REPLACE_MBRTOWC=1
24051     else
24052
24053
24054
24055      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5
24056 $as_echo_n "checking whether mbrtowc handles a NULL pwc argument... " >&6; }
24057 if ${gl_cv_func_mbrtowc_null_arg1+:} false; then :
24058   $as_echo_n "(cached) " >&6
24059 else
24060
24061                   case "$host_os" in
24062                   # Guess no on Solaris.
24063         solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;;
24064                   # Guess yes otherwise.
24065         *)        gl_cv_func_mbrtowc_null_arg1="guessing yes" ;;
24066       esac
24067       if test $LOCALE_FR_UTF8 != none; then
24068         if test "$cross_compiling" = yes; then :
24069   :
24070 else
24071   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24072 /* end confdefs.h.  */
24073
24074 #include <locale.h>
24075 #include <stdlib.h>
24076 #include <string.h>
24077 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
24078    <wchar.h>.
24079    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
24080    included before <wchar.h>.  */
24081 #include <stddef.h>
24082 #include <stdio.h>
24083 #include <time.h>
24084 #include <wchar.h>
24085 int main ()
24086 {
24087   int result = 0;
24088
24089   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
24090     {
24091       char input[] = "\303\237er";
24092       mbstate_t state;
24093       wchar_t wc;
24094       size_t ret;
24095
24096       memset (&state, '\0', sizeof (mbstate_t));
24097       wc = (wchar_t) 0xBADFACE;
24098       ret = mbrtowc (&wc, input, 5, &state);
24099       if (ret != 2)
24100         result |= 1;
24101       if (!mbsinit (&state))
24102         result |= 2;
24103
24104       memset (&state, '\0', sizeof (mbstate_t));
24105       ret = mbrtowc (NULL, input, 5, &state);
24106       if (ret != 2) /* Solaris 7 fails here: ret is -1.  */
24107         result |= 4;
24108       if (!mbsinit (&state))
24109         result |= 8;
24110     }
24111   return result;
24112 }
24113 _ACEOF
24114 if ac_fn_c_try_run "$LINENO"; then :
24115   gl_cv_func_mbrtowc_null_arg1=yes
24116 else
24117   gl_cv_func_mbrtowc_null_arg1=no
24118 fi
24119 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24120   conftest.$ac_objext conftest.beam conftest.$ac_ext
24121 fi
24122
24123       fi
24124
24125 fi
24126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5
24127 $as_echo "$gl_cv_func_mbrtowc_null_arg1" >&6; }
24128
24129
24130
24131
24132      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
24133 $as_echo_n "checking whether mbrtowc handles a NULL string argument... " >&6; }
24134 if ${gl_cv_func_mbrtowc_null_arg2+:} false; then :
24135   $as_echo_n "(cached) " >&6
24136 else
24137
24138                   case "$host_os" in
24139               # Guess no on OSF/1.
24140         osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;;
24141               # Guess yes otherwise.
24142         *)    gl_cv_func_mbrtowc_null_arg2="guessing yes" ;;
24143       esac
24144       if test $LOCALE_FR_UTF8 != none; then
24145         if test "$cross_compiling" = yes; then :
24146   :
24147 else
24148   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24149 /* end confdefs.h.  */
24150
24151 #include <locale.h>
24152 #include <string.h>
24153 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
24154    <wchar.h>.
24155    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
24156    included before <wchar.h>.  */
24157 #include <stddef.h>
24158 #include <stdio.h>
24159 #include <time.h>
24160 #include <wchar.h>
24161 int main ()
24162 {
24163   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
24164     {
24165       mbstate_t state;
24166       wchar_t wc;
24167       int ret;
24168
24169       memset (&state, '\0', sizeof (mbstate_t));
24170       wc = (wchar_t) 0xBADFACE;
24171       mbrtowc (&wc, NULL, 5, &state);
24172       /* Check that wc was not modified.  */
24173       if (wc != (wchar_t) 0xBADFACE)
24174         return 1;
24175     }
24176   return 0;
24177 }
24178 _ACEOF
24179 if ac_fn_c_try_run "$LINENO"; then :
24180   gl_cv_func_mbrtowc_null_arg2=yes
24181 else
24182   gl_cv_func_mbrtowc_null_arg2=no
24183 fi
24184 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24185   conftest.$ac_objext conftest.beam conftest.$ac_ext
24186 fi
24187
24188       fi
24189
24190 fi
24191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5
24192 $as_echo "$gl_cv_func_mbrtowc_null_arg2" >&6; }
24193
24194
24195
24196
24197
24198
24199   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
24200 $as_echo_n "checking whether mbrtowc has a correct return value... " >&6; }
24201 if ${gl_cv_func_mbrtowc_retval+:} false; then :
24202   $as_echo_n "(cached) " >&6
24203 else
24204
24205                   case "$host_os" in
24206                                    # Guess no on HP-UX, Solaris, native Windows.
24207         hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;;
24208                                    # Guess yes otherwise.
24209         *)                         gl_cv_func_mbrtowc_retval="guessing yes" ;;
24210       esac
24211       if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \
24212          || { case "$host_os" in mingw*) true;; *) false;; esac; }; then
24213         if test "$cross_compiling" = yes; then :
24214   :
24215 else
24216   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24217 /* end confdefs.h.  */
24218
24219 #include <locale.h>
24220 #include <string.h>
24221 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
24222    <wchar.h>.
24223    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
24224    included before <wchar.h>.  */
24225 #include <stddef.h>
24226 #include <stdio.h>
24227 #include <time.h>
24228 #include <wchar.h>
24229 int main ()
24230 {
24231   int result = 0;
24232   int found_some_locale = 0;
24233   /* This fails on Solaris.  */
24234   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
24235     {
24236       char input[] = "B\303\274\303\237er"; /* "Büßer" */
24237       mbstate_t state;
24238       wchar_t wc;
24239
24240       memset (&state, '\0', sizeof (mbstate_t));
24241       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
24242         {
24243           input[1] = '\0';
24244           if (mbrtowc (&wc, input + 2, 5, &state) != 1)
24245             result |= 1;
24246         }
24247       found_some_locale = 1;
24248     }
24249   /* This fails on HP-UX 11.11.  */
24250   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
24251     {
24252       char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
24253       mbstate_t state;
24254       wchar_t wc;
24255
24256       memset (&state, '\0', sizeof (mbstate_t));
24257       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
24258         {
24259           input[1] = '\0';
24260           if (mbrtowc (&wc, input + 2, 5, &state) != 2)
24261             result |= 2;
24262         }
24263       found_some_locale = 1;
24264     }
24265   /* This fails on native Windows.  */
24266   if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
24267     {
24268       char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */
24269       mbstate_t state;
24270       wchar_t wc;
24271
24272       memset (&state, '\0', sizeof (mbstate_t));
24273       if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
24274         {
24275           input[3] = '\0';
24276           if (mbrtowc (&wc, input + 4, 4, &state) != 1)
24277             result |= 4;
24278         }
24279       found_some_locale = 1;
24280     }
24281   if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
24282     {
24283       char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */
24284       mbstate_t state;
24285       wchar_t wc;
24286
24287       memset (&state, '\0', sizeof (mbstate_t));
24288       if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
24289         {
24290           input[3] = '\0';
24291           if (mbrtowc (&wc, input + 4, 4, &state) != 1)
24292             result |= 8;
24293         }
24294       found_some_locale = 1;
24295     }
24296   if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
24297     {
24298       char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */
24299       mbstate_t state;
24300       wchar_t wc;
24301
24302       memset (&state, '\0', sizeof (mbstate_t));
24303       if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
24304         {
24305           input[3] = '\0';
24306           if (mbrtowc (&wc, input + 4, 4, &state) != 1)
24307             result |= 16;
24308         }
24309       found_some_locale = 1;
24310     }
24311   return (found_some_locale ? result : 77);
24312 }
24313 _ACEOF
24314 if ac_fn_c_try_run "$LINENO"; then :
24315   gl_cv_func_mbrtowc_retval=yes
24316 else
24317   if test $? != 77; then
24318              gl_cv_func_mbrtowc_retval=no
24319            fi
24320
24321 fi
24322 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24323   conftest.$ac_objext conftest.beam conftest.$ac_ext
24324 fi
24325
24326       fi
24327
24328 fi
24329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
24330 $as_echo "$gl_cv_func_mbrtowc_retval" >&6; }
24331
24332
24333
24334
24335      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
24336 $as_echo_n "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
24337 if ${gl_cv_func_mbrtowc_nul_retval+:} false; then :
24338   $as_echo_n "(cached) " >&6
24339 else
24340
24341                   case "$host_os" in
24342                        # Guess no on Solaris 8 and 9.
24343         solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
24344                        # Guess yes otherwise.
24345         *)             gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
24346       esac
24347       if test $LOCALE_ZH_CN != none; then
24348         if test "$cross_compiling" = yes; then :
24349   :
24350 else
24351   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24352 /* end confdefs.h.  */
24353
24354 #include <locale.h>
24355 #include <string.h>
24356 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
24357    <wchar.h>.
24358    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
24359    included before <wchar.h>.  */
24360 #include <stddef.h>
24361 #include <stdio.h>
24362 #include <time.h>
24363 #include <wchar.h>
24364 int main ()
24365 {
24366   /* This fails on Solaris 8 and 9.  */
24367   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
24368     {
24369       mbstate_t state;
24370       wchar_t wc;
24371
24372       memset (&state, '\0', sizeof (mbstate_t));
24373       if (mbrtowc (&wc, "", 1, &state) != 0)
24374         return 1;
24375     }
24376   return 0;
24377 }
24378 _ACEOF
24379 if ac_fn_c_try_run "$LINENO"; then :
24380   gl_cv_func_mbrtowc_nul_retval=yes
24381 else
24382   gl_cv_func_mbrtowc_nul_retval=no
24383 fi
24384 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24385   conftest.$ac_objext conftest.beam conftest.$ac_ext
24386 fi
24387
24388       fi
24389
24390 fi
24391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
24392 $as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; }
24393
24394
24395
24396      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works on empty input" >&5
24397 $as_echo_n "checking whether mbrtowc works on empty input... " >&6; }
24398 if ${gl_cv_func_mbrtowc_empty_input+:} false; then :
24399   $as_echo_n "(cached) " >&6
24400 else
24401
24402                   case "$host_os" in
24403                      # Guess no on AIX and glibc systems.
24404         aix* | *-gnu*)
24405                     gl_cv_func_mbrtowc_empty_input="guessing no" ;;
24406         *)          gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
24407       esac
24408       if test "$cross_compiling" = yes; then :
24409   :
24410 else
24411   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24412 /* end confdefs.h.  */
24413
24414            #include <wchar.h>
24415            static wchar_t wc;
24416            static mbstate_t mbs;
24417            int
24418            main (void)
24419            {
24420              return mbrtowc (&wc, "", 0, &mbs) == (size_t) -2;
24421            }
24422 _ACEOF
24423 if ac_fn_c_try_run "$LINENO"; then :
24424   gl_cv_func_mbrtowc_empty_input=no
24425 else
24426   gl_cv_func_mbrtowc_empty_input=yes
24427 fi
24428 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24429   conftest.$ac_objext conftest.beam conftest.$ac_ext
24430 fi
24431
24432
24433 fi
24434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_empty_input" >&5
24435 $as_echo "$gl_cv_func_mbrtowc_empty_input" >&6; }
24436
24437       case "$gl_cv_func_mbrtowc_null_arg1" in
24438         *yes) ;;
24439         *)
24440 $as_echo "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h
24441
24442            REPLACE_MBRTOWC=1
24443            ;;
24444       esac
24445       case "$gl_cv_func_mbrtowc_null_arg2" in
24446         *yes) ;;
24447         *)
24448 $as_echo "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h
24449
24450            REPLACE_MBRTOWC=1
24451            ;;
24452       esac
24453       case "$gl_cv_func_mbrtowc_retval" in
24454         *yes) ;;
24455         *)
24456 $as_echo "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
24457
24458            REPLACE_MBRTOWC=1
24459            ;;
24460       esac
24461       case "$gl_cv_func_mbrtowc_nul_retval" in
24462         *yes) ;;
24463         *)
24464 $as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
24465
24466            REPLACE_MBRTOWC=1
24467            ;;
24468       esac
24469       case "$gl_cv_func_mbrtowc_empty_input" in
24470         *yes) ;;
24471         *)
24472 $as_echo "#define MBRTOWC_EMPTY_INPUT_BUG 1" >>confdefs.h
24473
24474            REPLACE_MBRTOWC=1
24475            ;;
24476       esac
24477     fi
24478   fi
24479
24480   if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
24481
24482
24483
24484
24485
24486
24487
24488
24489   gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext"
24490
24491
24492   :
24493
24494   fi
24495
24496
24497
24498
24499
24500           GNULIB_MBRTOWC=1
24501
24502
24503
24504
24505
24506 $as_echo "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h
24507
24508
24509
24510
24511
24512
24513
24514
24515           GNULIB_MBSCASECMP=1
24516
24517
24518
24519
24520
24521 $as_echo "#define GNULIB_TEST_MBSCASECMP 1" >>confdefs.h
24522
24523
24524
24525
24526
24527
24528
24529
24530
24531
24532
24533
24534
24535
24536   if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
24537
24538
24539
24540      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
24541 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
24542 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
24543   $as_echo_n "(cached) " >&6
24544 else
24545
24546                   case "$host_os" in
24547                      # Guess no on AIX and OSF/1.
24548         aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
24549                      # Guess yes otherwise.
24550         *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
24551       esac
24552       if test $LOCALE_JA != none; then
24553         if test "$cross_compiling" = yes; then :
24554   :
24555 else
24556   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24557 /* end confdefs.h.  */
24558
24559 #include <locale.h>
24560 #include <string.h>
24561 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
24562    <wchar.h>.
24563    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
24564    included before <wchar.h>.  */
24565 #include <stddef.h>
24566 #include <stdio.h>
24567 #include <time.h>
24568 #include <wchar.h>
24569 int main ()
24570 {
24571   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
24572     {
24573       const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
24574       mbstate_t state;
24575       wchar_t wc;
24576
24577       memset (&state, '\0', sizeof (mbstate_t));
24578       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
24579         if (mbsinit (&state))
24580           return 1;
24581     }
24582   return 0;
24583 }
24584 _ACEOF
24585 if ac_fn_c_try_run "$LINENO"; then :
24586   gl_cv_func_mbrtowc_incomplete_state=yes
24587 else
24588   gl_cv_func_mbrtowc_incomplete_state=no
24589 fi
24590 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24591   conftest.$ac_objext conftest.beam conftest.$ac_ext
24592 fi
24593
24594       fi
24595
24596 fi
24597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
24598 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
24599
24600
24601
24602
24603      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
24604 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
24605 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
24606   $as_echo_n "(cached) " >&6
24607 else
24608
24609                   case "$host_os" in
24610                     # Guess no on Solaris 8.
24611         solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
24612                     # Guess yes otherwise.
24613         *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
24614       esac
24615       if test $LOCALE_ZH_CN != none; then
24616         if test "$cross_compiling" = yes; then :
24617   :
24618 else
24619   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24620 /* end confdefs.h.  */
24621
24622 #include <locale.h>
24623 #include <stdlib.h>
24624 #include <string.h>
24625 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
24626    <wchar.h>.
24627    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
24628    included before <wchar.h>.  */
24629 #include <stddef.h>
24630 #include <stdio.h>
24631 #include <time.h>
24632 #include <wchar.h>
24633 int main ()
24634 {
24635   /* This fails on Solaris 8:
24636      mbrtowc returns 2, and sets wc to 0x00F0.
24637      mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
24638   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
24639     {
24640       char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
24641       mbstate_t state;
24642       wchar_t wc;
24643
24644       memset (&state, '\0', sizeof (mbstate_t));
24645       if (mbrtowc (&wc, input + 3, 6, &state) != 4
24646           && mbtowc (&wc, input + 3, 6) == 4)
24647         return 1;
24648     }
24649   return 0;
24650 }
24651 _ACEOF
24652 if ac_fn_c_try_run "$LINENO"; then :
24653   gl_cv_func_mbrtowc_sanitycheck=yes
24654 else
24655   gl_cv_func_mbrtowc_sanitycheck=no
24656 fi
24657 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24658   conftest.$ac_objext conftest.beam conftest.$ac_ext
24659 fi
24660
24661       fi
24662
24663 fi
24664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
24665 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
24666
24667     REPLACE_MBSTATE_T=0
24668     case "$gl_cv_func_mbrtowc_incomplete_state" in
24669       *yes) ;;
24670       *) REPLACE_MBSTATE_T=1 ;;
24671     esac
24672     case "$gl_cv_func_mbrtowc_sanitycheck" in
24673       *yes) ;;
24674       *) REPLACE_MBSTATE_T=1 ;;
24675     esac
24676   else
24677     REPLACE_MBSTATE_T=1
24678   fi
24679
24680
24681
24682   if test $ac_cv_func_mbsinit = no; then
24683     HAVE_MBSINIT=0
24684     ac_fn_c_check_decl "$LINENO" "mbsinit" "ac_cv_have_decl_mbsinit" "
24685 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
24686    <wchar.h>.
24687    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
24688    included before <wchar.h>.  */
24689 #include <stddef.h>
24690 #include <stdio.h>
24691 #include <time.h>
24692 #include <wchar.h>
24693
24694 "
24695 if test "x$ac_cv_have_decl_mbsinit" = xyes; then :
24696   ac_have_decl=1
24697 else
24698   ac_have_decl=0
24699 fi
24700
24701 cat >>confdefs.h <<_ACEOF
24702 #define HAVE_DECL_MBSINIT $ac_have_decl
24703 _ACEOF
24704
24705     if test $ac_cv_have_decl_mbsinit = yes; then
24706                         REPLACE_MBSINIT=1
24707     fi
24708   else
24709     if test $REPLACE_MBSTATE_T = 1; then
24710       REPLACE_MBSINIT=1
24711     else
24712                         case "$host_os" in
24713         mingw*) REPLACE_MBSINIT=1 ;;
24714       esac
24715     fi
24716   fi
24717
24718   if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
24719
24720
24721
24722
24723
24724
24725
24726
24727   gl_LIBOBJS="$gl_LIBOBJS mbsinit.$ac_objext"
24728
24729
24730   :
24731
24732   fi
24733
24734
24735
24736
24737
24738           GNULIB_MBSINIT=1
24739
24740
24741
24742
24743
24744 $as_echo "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h
24745
24746
24747
24748
24749
24750
24751
24752
24753
24754
24755
24756
24757
24758   if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
24759
24760
24761
24762      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
24763 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
24764 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
24765   $as_echo_n "(cached) " >&6
24766 else
24767
24768                   case "$host_os" in
24769                      # Guess no on AIX and OSF/1.
24770         aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
24771                      # Guess yes otherwise.
24772         *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
24773       esac
24774       if test $LOCALE_JA != none; then
24775         if test "$cross_compiling" = yes; then :
24776   :
24777 else
24778   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24779 /* end confdefs.h.  */
24780
24781 #include <locale.h>
24782 #include <string.h>
24783 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
24784    <wchar.h>.
24785    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
24786    included before <wchar.h>.  */
24787 #include <stddef.h>
24788 #include <stdio.h>
24789 #include <time.h>
24790 #include <wchar.h>
24791 int main ()
24792 {
24793   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
24794     {
24795       const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
24796       mbstate_t state;
24797       wchar_t wc;
24798
24799       memset (&state, '\0', sizeof (mbstate_t));
24800       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
24801         if (mbsinit (&state))
24802           return 1;
24803     }
24804   return 0;
24805 }
24806 _ACEOF
24807 if ac_fn_c_try_run "$LINENO"; then :
24808   gl_cv_func_mbrtowc_incomplete_state=yes
24809 else
24810   gl_cv_func_mbrtowc_incomplete_state=no
24811 fi
24812 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24813   conftest.$ac_objext conftest.beam conftest.$ac_ext
24814 fi
24815
24816       fi
24817
24818 fi
24819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
24820 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
24821
24822
24823
24824
24825      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
24826 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
24827 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
24828   $as_echo_n "(cached) " >&6
24829 else
24830
24831                   case "$host_os" in
24832                     # Guess no on Solaris 8.
24833         solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
24834                     # Guess yes otherwise.
24835         *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
24836       esac
24837       if test $LOCALE_ZH_CN != none; then
24838         if test "$cross_compiling" = yes; then :
24839   :
24840 else
24841   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24842 /* end confdefs.h.  */
24843
24844 #include <locale.h>
24845 #include <stdlib.h>
24846 #include <string.h>
24847 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
24848    <wchar.h>.
24849    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
24850    included before <wchar.h>.  */
24851 #include <stddef.h>
24852 #include <stdio.h>
24853 #include <time.h>
24854 #include <wchar.h>
24855 int main ()
24856 {
24857   /* This fails on Solaris 8:
24858      mbrtowc returns 2, and sets wc to 0x00F0.
24859      mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
24860   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
24861     {
24862       char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
24863       mbstate_t state;
24864       wchar_t wc;
24865
24866       memset (&state, '\0', sizeof (mbstate_t));
24867       if (mbrtowc (&wc, input + 3, 6, &state) != 4
24868           && mbtowc (&wc, input + 3, 6) == 4)
24869         return 1;
24870     }
24871   return 0;
24872 }
24873 _ACEOF
24874 if ac_fn_c_try_run "$LINENO"; then :
24875   gl_cv_func_mbrtowc_sanitycheck=yes
24876 else
24877   gl_cv_func_mbrtowc_sanitycheck=no
24878 fi
24879 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24880   conftest.$ac_objext conftest.beam conftest.$ac_ext
24881 fi
24882
24883       fi
24884
24885 fi
24886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
24887 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
24888
24889     REPLACE_MBSTATE_T=0
24890     case "$gl_cv_func_mbrtowc_incomplete_state" in
24891       *yes) ;;
24892       *) REPLACE_MBSTATE_T=1 ;;
24893     esac
24894     case "$gl_cv_func_mbrtowc_sanitycheck" in
24895       *yes) ;;
24896       *) REPLACE_MBSTATE_T=1 ;;
24897     esac
24898   else
24899     REPLACE_MBSTATE_T=1
24900   fi
24901
24902
24903
24904   if test $ac_cv_func_mbsrtowcs = no; then
24905     HAVE_MBSRTOWCS=0
24906     ac_fn_c_check_decl "$LINENO" "mbsrtowcs" "ac_cv_have_decl_mbsrtowcs" "
24907 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
24908    <wchar.h>.
24909    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
24910    included before <wchar.h>.  */
24911 #include <stddef.h>
24912 #include <stdio.h>
24913 #include <time.h>
24914 #include <wchar.h>
24915
24916 "
24917 if test "x$ac_cv_have_decl_mbsrtowcs" = xyes; then :
24918   ac_have_decl=1
24919 else
24920   ac_have_decl=0
24921 fi
24922
24923 cat >>confdefs.h <<_ACEOF
24924 #define HAVE_DECL_MBSRTOWCS $ac_have_decl
24925 _ACEOF
24926
24927     if test $ac_cv_have_decl_mbsrtowcs = yes; then
24928                         REPLACE_MBSRTOWCS=1
24929     fi
24930   else
24931     if test $REPLACE_MBSTATE_T = 1; then
24932       REPLACE_MBSRTOWCS=1
24933     else
24934
24935
24936
24937
24938
24939
24940      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbsrtowcs works" >&5
24941 $as_echo_n "checking whether mbsrtowcs works... " >&6; }
24942 if ${gl_cv_func_mbsrtowcs_works+:} false; then :
24943   $as_echo_n "(cached) " >&6
24944 else
24945
24946                   case "$host_os" in
24947                                    # Guess no on HP-UX, Solaris, mingw.
24948         hpux* | solaris* | mingw*) gl_cv_func_mbsrtowcs_works="guessing no" ;;
24949                                    # Guess yes otherwise.
24950         *)                         gl_cv_func_mbsrtowcs_works="guessing yes" ;;
24951       esac
24952       if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
24953         if test "$cross_compiling" = yes; then :
24954   :
24955 else
24956   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24957 /* end confdefs.h.  */
24958
24959 #include <locale.h>
24960 #include <string.h>
24961 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
24962    <wchar.h>.
24963    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
24964    included before <wchar.h>.  */
24965 #include <stddef.h>
24966 #include <stdio.h>
24967 #include <time.h>
24968 #include <wchar.h>
24969 int main ()
24970 {
24971   int result = 0;
24972   /* Test whether the function supports a NULL destination argument.
24973      This fails on native Windows.  */
24974   if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
24975     {
24976       const char input[] = "\337er";
24977       const char *src = input;
24978       mbstate_t state;
24979
24980       memset (&state, '\0', sizeof (mbstate_t));
24981       if (mbsrtowcs (NULL, &src, 1, &state) != 3
24982           || src != input)
24983         result |= 1;
24984     }
24985   /* Test whether the function works when started with a conversion state
24986      in non-initial state.  This fails on HP-UX 11.11 and Solaris 10.  */
24987   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
24988     {
24989       const char input[] = "B\303\274\303\237er";
24990       mbstate_t state;
24991
24992       memset (&state, '\0', sizeof (mbstate_t));
24993       if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
24994         if (!mbsinit (&state))
24995           {
24996             const char *src = input + 2;
24997             if (mbsrtowcs (NULL, &src, 10, &state) != 4)
24998               result |= 2;
24999           }
25000     }
25001   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
25002     {
25003       const char input[] = "<\306\374\313\334\270\354>";
25004       mbstate_t state;
25005
25006       memset (&state, '\0', sizeof (mbstate_t));
25007       if (mbrtowc (NULL, input + 3, 1, &state) == (size_t)(-2))
25008         if (!mbsinit (&state))
25009           {
25010             const char *src = input + 4;
25011             if (mbsrtowcs (NULL, &src, 10, &state) != 3)
25012               result |= 4;
25013           }
25014     }
25015   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
25016     {
25017       const char input[] = "B\250\271\201\060\211\070er";
25018       mbstate_t state;
25019
25020       memset (&state, '\0', sizeof (mbstate_t));
25021       if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
25022         if (!mbsinit (&state))
25023           {
25024             const char *src = input + 2;
25025             if (mbsrtowcs (NULL, &src, 10, &state) != 4)
25026               result |= 8;
25027           }
25028     }
25029   return result;
25030 }
25031 _ACEOF
25032 if ac_fn_c_try_run "$LINENO"; then :
25033   gl_cv_func_mbsrtowcs_works=yes
25034 else
25035   gl_cv_func_mbsrtowcs_works=no
25036 fi
25037 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25038   conftest.$ac_objext conftest.beam conftest.$ac_ext
25039 fi
25040
25041       fi
25042
25043 fi
25044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbsrtowcs_works" >&5
25045 $as_echo "$gl_cv_func_mbsrtowcs_works" >&6; }
25046
25047       case "$gl_cv_func_mbsrtowcs_works" in
25048         *yes) ;;
25049         *) REPLACE_MBSRTOWCS=1 ;;
25050       esac
25051     fi
25052   fi
25053
25054   if test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1; then
25055
25056
25057
25058
25059
25060
25061
25062
25063   gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs.$ac_objext"
25064
25065
25066
25067
25068
25069
25070
25071
25072
25073   gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs-state.$ac_objext"
25074
25075
25076   :
25077
25078   fi
25079
25080
25081
25082
25083
25084           GNULIB_MBSRTOWCS=1
25085
25086
25087
25088
25089
25090 $as_echo "#define GNULIB_TEST_MBSRTOWCS 1" >>confdefs.h
25091
25092
25093
25094
25095
25096
25097   if false; then
25098     REPLACE_MBTOWC=1
25099   fi
25100
25101   if test $REPLACE_MBTOWC = 1; then
25102
25103
25104
25105
25106
25107
25108
25109
25110   gl_LIBOBJS="$gl_LIBOBJS mbtowc.$ac_objext"
25111
25112
25113   :
25114
25115   fi
25116
25117
25118
25119
25120
25121           GNULIB_MBTOWC=1
25122
25123
25124
25125
25126
25127 $as_echo "#define GNULIB_TEST_MBTOWC 1" >>confdefs.h
25128
25129
25130
25131
25132
25133   :
25134
25135
25136   if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
25137
25138
25139
25140
25141
25142
25143
25144
25145   gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext"
25146
25147
25148   for ac_header in bp-sym.h
25149 do :
25150   ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
25151 if test "x$ac_cv_header_bp_sym_h" = xyes; then :
25152   cat >>confdefs.h <<_ACEOF
25153 #define HAVE_BP_SYM_H 1
25154 _ACEOF
25155
25156 fi
25157
25158 done
25159
25160
25161   fi
25162
25163
25164
25165
25166
25167           GNULIB_MEMCHR=1
25168
25169
25170
25171
25172
25173 $as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
25174
25175
25176
25177
25178
25179
25180
25181
25182
25183   for ac_func in mempcpy
25184 do :
25185   ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
25186 if test "x$ac_cv_func_mempcpy" = xyes; then :
25187   cat >>confdefs.h <<_ACEOF
25188 #define HAVE_MEMPCPY 1
25189 _ACEOF
25190
25191 fi
25192 done
25193
25194   if test $ac_cv_func_mempcpy = no; then
25195     HAVE_MEMPCPY=0
25196   fi
25197
25198   if test $HAVE_MEMPCPY = 0; then
25199
25200
25201
25202
25203
25204
25205
25206
25207   gl_LIBOBJS="$gl_LIBOBJS mempcpy.$ac_objext"
25208
25209
25210   :
25211
25212   fi
25213
25214
25215
25216
25217
25218           GNULIB_MEMPCPY=1
25219
25220
25221
25222
25223
25224 $as_echo "#define GNULIB_TEST_MEMPCPY 1" >>confdefs.h
25225
25226
25227
25228
25229
25230
25231
25232
25233   if test $ac_cv_have_decl_memrchr = no; then
25234     HAVE_DECL_MEMRCHR=0
25235   fi
25236
25237   for ac_func in memrchr
25238 do :
25239   ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr"
25240 if test "x$ac_cv_func_memrchr" = xyes; then :
25241   cat >>confdefs.h <<_ACEOF
25242 #define HAVE_MEMRCHR 1
25243 _ACEOF
25244
25245 fi
25246 done
25247
25248
25249   if test $ac_cv_func_memrchr = no; then
25250
25251
25252
25253
25254
25255
25256
25257
25258   gl_LIBOBJS="$gl_LIBOBJS memrchr.$ac_objext"
25259
25260     :
25261   fi
25262
25263
25264
25265
25266
25267           GNULIB_MEMRCHR=1
25268
25269
25270
25271
25272
25273 $as_echo "#define GNULIB_TEST_MEMRCHR 1" >>confdefs.h
25274
25275
25276
25277
25278
25279   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing slash" >&5
25280 $as_echo_n "checking whether mkdir handles trailing slash... " >&6; }
25281 if ${gl_cv_func_mkdir_trailing_slash_works+:} false; then :
25282   $as_echo_n "(cached) " >&6
25283 else
25284   rm -rf conftest.dir
25285       if test "$cross_compiling" = yes; then :
25286   case "$host_os" in
25287                  # Guess yes on glibc systems.
25288          *-gnu*) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
25289                  # If we don't know, assume the worst.
25290          *)      gl_cv_func_mkdir_trailing_slash_works="guessing no" ;;
25291        esac
25292
25293 else
25294   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25295 /* end confdefs.h.  */
25296
25297 #       include <sys/types.h>
25298 #       include <sys/stat.h>
25299
25300 int
25301 main ()
25302 {
25303 return mkdir ("conftest.dir/", 0700);
25304   ;
25305   return 0;
25306 }
25307 _ACEOF
25308 if ac_fn_c_try_run "$LINENO"; then :
25309   gl_cv_func_mkdir_trailing_slash_works=yes
25310 else
25311   gl_cv_func_mkdir_trailing_slash_works=no
25312 fi
25313 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25314   conftest.$ac_objext conftest.beam conftest.$ac_ext
25315 fi
25316
25317     rm -rf conftest.dir
25318
25319
25320 fi
25321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_slash_works" >&5
25322 $as_echo "$gl_cv_func_mkdir_trailing_slash_works" >&6; }
25323   case "$gl_cv_func_mkdir_trailing_slash_works" in
25324     *yes) ;;
25325     *)
25326       REPLACE_MKDIR=1
25327       ;;
25328   esac
25329
25330   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing dot" >&5
25331 $as_echo_n "checking whether mkdir handles trailing dot... " >&6; }
25332 if ${gl_cv_func_mkdir_trailing_dot_works+:} false; then :
25333   $as_echo_n "(cached) " >&6
25334 else
25335   rm -rf conftest.dir
25336       if test "$cross_compiling" = yes; then :
25337   case "$host_os" in
25338                  # Guess yes on glibc systems.
25339          *-gnu*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
25340                  # If we don't know, assume the worst.
25341          *)      gl_cv_func_mkdir_trailing_dot_works="guessing no" ;;
25342        esac
25343
25344 else
25345   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25346 /* end confdefs.h.  */
25347
25348 #       include <sys/types.h>
25349 #       include <sys/stat.h>
25350
25351 int
25352 main ()
25353 {
25354 return !mkdir ("conftest.dir/./", 0700);
25355   ;
25356   return 0;
25357 }
25358 _ACEOF
25359 if ac_fn_c_try_run "$LINENO"; then :
25360   gl_cv_func_mkdir_trailing_dot_works=yes
25361 else
25362   gl_cv_func_mkdir_trailing_dot_works=no
25363 fi
25364 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25365   conftest.$ac_objext conftest.beam conftest.$ac_ext
25366 fi
25367
25368     rm -rf conftest.dir
25369
25370
25371 fi
25372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_dot_works" >&5
25373 $as_echo "$gl_cv_func_mkdir_trailing_dot_works" >&6; }
25374   case "$gl_cv_func_mkdir_trailing_dot_works" in
25375     *yes) ;;
25376     *)
25377       REPLACE_MKDIR=1
25378
25379 $as_echo "#define FUNC_MKDIR_DOT_BUG 1" >>confdefs.h
25380
25381       ;;
25382   esac
25383
25384   if test $REPLACE_MKDIR = 1; then
25385
25386
25387
25388
25389
25390
25391
25392
25393   gl_LIBOBJS="$gl_LIBOBJS mkdir.$ac_objext"
25394
25395   fi
25396
25397
25398
25399
25400   if test $ac_cv_func_mkdirat != yes; then
25401     HAVE_MKDIRAT=0
25402   fi
25403
25404   if test $HAVE_MKDIRAT = 0; then
25405
25406
25407
25408
25409
25410
25411
25412
25413   gl_LIBOBJS="$gl_LIBOBJS mkdirat.$ac_objext"
25414
25415
25416
25417
25418   fi
25419
25420
25421
25422
25423
25424           GNULIB_MKDIRAT=1
25425
25426
25427
25428
25429
25430 $as_echo "#define GNULIB_TEST_MKDIRAT 1" >>confdefs.h
25431
25432
25433
25434
25435
25436   for ac_func in mkdtemp
25437 do :
25438   ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
25439 if test "x$ac_cv_func_mkdtemp" = xyes; then :
25440   cat >>confdefs.h <<_ACEOF
25441 #define HAVE_MKDTEMP 1
25442 _ACEOF
25443
25444 fi
25445 done
25446
25447   if test $ac_cv_func_mkdtemp = no; then
25448     HAVE_MKDTEMP=0
25449   fi
25450
25451   if test $HAVE_MKDTEMP = 0; then
25452
25453
25454
25455
25456
25457
25458
25459
25460   gl_LIBOBJS="$gl_LIBOBJS mkdtemp.$ac_objext"
25461
25462     :
25463
25464   fi
25465
25466
25467
25468
25469
25470           GNULIB_MKDTEMP=1
25471
25472
25473
25474
25475
25476 $as_echo "#define GNULIB_TEST_MKDTEMP 1" >>confdefs.h
25477
25478
25479
25480
25481
25482
25483   if test $ac_cv_func_mkfifo = no; then
25484     HAVE_MKFIFO=0
25485   else
25486
25487     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkfifo rejects trailing slashes" >&5
25488 $as_echo_n "checking whether mkfifo rejects trailing slashes... " >&6; }
25489 if ${gl_cv_func_mkfifo_works+:} false; then :
25490   $as_echo_n "(cached) " >&6
25491 else
25492   # Assume that if we have lstat, we can also check symlinks.
25493        if test $ac_cv_func_lstat = yes; then
25494          ln -s conftest.tmp conftest.lnk
25495        fi
25496        if test "$cross_compiling" = yes; then :
25497   case "$host_os" in
25498                     # Guess yes on glibc systems.
25499             *-gnu*) gl_cv_func_mkfifo_works="guessing yes" ;;
25500                     # If we don't know, assume the worst.
25501             *)      gl_cv_func_mkfifo_works="guessing no" ;;
25502           esac
25503
25504 else
25505   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25506 /* end confdefs.h.  */
25507 #include <sys/stat.h>
25508
25509 int
25510 main ()
25511 {
25512 int result = 0;
25513              if (!mkfifo ("conftest.tmp/", 0600))
25514                result |= 1;
25515 #if HAVE_LSTAT
25516              if (!mkfifo ("conftest.lnk/", 0600))
25517                result |= 2;
25518 #endif
25519              return result;
25520
25521   ;
25522   return 0;
25523 }
25524 _ACEOF
25525 if ac_fn_c_try_run "$LINENO"; then :
25526   gl_cv_func_mkfifo_works=yes
25527 else
25528   gl_cv_func_mkfifo_works=no
25529 fi
25530 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25531   conftest.$ac_objext conftest.beam conftest.$ac_ext
25532 fi
25533
25534        rm -f conftest.tmp conftest.lnk
25535 fi
25536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkfifo_works" >&5
25537 $as_echo "$gl_cv_func_mkfifo_works" >&6; }
25538     case "$gl_cv_func_mkfifo_works" in
25539       *yes) ;;
25540       *)
25541
25542 $as_echo "#define MKFIFO_TRAILING_SLASH_BUG 1" >>confdefs.h
25543
25544         REPLACE_MKFIFO=1
25545         ;;
25546     esac
25547   fi
25548
25549   if test $HAVE_MKFIFO = 0 || test $REPLACE_MKFIFO = 1; then
25550
25551
25552
25553
25554
25555
25556
25557
25558   gl_LIBOBJS="$gl_LIBOBJS mkfifo.$ac_objext"
25559
25560   fi
25561
25562
25563
25564
25565
25566           GNULIB_MKFIFO=1
25567
25568
25569
25570
25571
25572 $as_echo "#define GNULIB_TEST_MKFIFO 1" >>confdefs.h
25573
25574
25575
25576
25577
25578
25579
25580
25581   if test $ac_cv_func_mkfifoat = no; then
25582     # No known system has mkfifoat but not mknodat
25583     HAVE_MKFIFOAT=0
25584     HAVE_MKNODAT=0
25585   fi
25586
25587   if test $HAVE_MKFIFOAT = 0; then
25588
25589
25590
25591
25592
25593
25594
25595
25596   gl_LIBOBJS="$gl_LIBOBJS mkfifoat.$ac_objext"
25597
25598   fi
25599   if test $HAVE_MKNODAT = 0; then
25600
25601
25602
25603
25604
25605
25606
25607
25608   gl_LIBOBJS="$gl_LIBOBJS mknodat.$ac_objext"
25609
25610   fi
25611
25612
25613
25614
25615
25616           GNULIB_MKFIFOAT=1
25617
25618
25619
25620
25621
25622 $as_echo "#define GNULIB_TEST_MKFIFOAT 1" >>confdefs.h
25623
25624
25625
25626
25627
25628
25629
25630
25631           GNULIB_MKNODAT=1
25632
25633
25634
25635
25636
25637 $as_echo "#define GNULIB_TEST_MKNODAT 1" >>confdefs.h
25638
25639
25640
25641
25642
25643
25644
25645
25646   if test $ac_cv_func_mknod = no; then
25647     HAVE_MKNOD=0
25648   else
25649         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mknod can create fifo without root privileges" >&5
25650 $as_echo_n "checking whether mknod can create fifo without root privileges... " >&6; }
25651 if ${gl_cv_func_mknod_works+:} false; then :
25652   $as_echo_n "(cached) " >&6
25653 else
25654   if test "$cross_compiling" = yes; then :
25655   case "$host_os" in
25656                     # Guess yes on glibc systems.
25657             *-gnu*) gl_cv_func_mknod_works="guessing yes" ;;
25658                     # If we don't know, assume the worst.
25659             *)      gl_cv_func_mknod_works="guessing no" ;;
25660           esac
25661
25662 else
25663   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25664 /* end confdefs.h.  */
25665 #include <sys/stat.h>
25666              #include <unistd.h>
25667
25668              /* Copied from root-uid.h.  FIXME: Just use root-uid.h.  */
25669              #ifdef __TANDEM
25670              # define ROOT_UID 65535
25671              #else
25672              # define ROOT_UID 0
25673              #endif
25674
25675 int
25676 main ()
25677 {
25678 /* Indeterminate for super-user, assume no.  Why are you running
25679          configure as root, anyway?  */
25680       if (geteuid () == ROOT_UID) return 99;
25681       if (mknod ("conftest.fifo", S_IFIFO | 0600, 0)) return 2;
25682   ;
25683   return 0;
25684 }
25685 _ACEOF
25686 if ac_fn_c_try_run "$LINENO"; then :
25687   gl_cv_func_mknod_works=yes
25688 else
25689   if test $? = 99 && test x"$FORCE_UNSAFE_CONFIGURE" = x; then
25690             { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
25691 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
25692 as_fn_error $? "you should not run configure as root (set FORCE_UNSAFE_CONFIGURE=1 in environment to bypass this check)
25693 See \`config.log' for more details" "$LINENO" 5; }
25694           fi
25695           gl_cv_func_mknod_works=no
25696 fi
25697 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25698   conftest.$ac_objext conftest.beam conftest.$ac_ext
25699 fi
25700
25701        rm -f conftest.fifo
25702 fi
25703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mknod_works" >&5
25704 $as_echo "$gl_cv_func_mknod_works" >&6; }
25705     case "$gl_cv_func_mknod_works" in
25706       *yes) ;;
25707       *)
25708         REPLACE_MKNOD=1
25709
25710 $as_echo "#define MKNOD_FIFO_BUG 1" >>confdefs.h
25711
25712         ;;
25713     esac
25714         if test $REPLACE_MKFIFO = 1; then
25715       REPLACE_MKNOD=1
25716     fi
25717   fi
25718
25719   if test $HAVE_MKNOD = 0 || test $REPLACE_MKNOD = 1; then
25720
25721
25722
25723
25724
25725
25726
25727
25728   gl_LIBOBJS="$gl_LIBOBJS mknod.$ac_objext"
25729
25730   fi
25731
25732
25733
25734
25735
25736           GNULIB_MKNOD=1
25737
25738
25739
25740
25741
25742 $as_echo "#define GNULIB_TEST_MKNOD 1" >>confdefs.h
25743
25744
25745
25746
25747
25748
25749
25750
25751
25752   if test $APPLE_UNIVERSAL_BUILD = 1; then
25753     # A universal build on Apple Mac OS X platforms.
25754     # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode.
25755     # But we need a configuration result that is valid in both modes.
25756     gl_cv_func_working_mktime=no
25757   fi
25758   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5
25759 $as_echo_n "checking for working mktime... " >&6; }
25760 if ${gl_cv_func_working_mktime+:} false; then :
25761   $as_echo_n "(cached) " >&6
25762 else
25763   if test "$cross_compiling" = yes; then :
25764   gl_cv_func_working_mktime=no
25765 else
25766   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25767 /* end confdefs.h.  */
25768 /* Test program from Paul Eggert and Tony Leneis.  */
25769 #include <limits.h>
25770 #include <stdlib.h>
25771 #include <time.h>
25772
25773 #ifdef HAVE_UNISTD_H
25774 # include <unistd.h>
25775 #endif
25776
25777 #if HAVE_DECL_ALARM
25778 # include <signal.h>
25779 #endif
25780
25781 /* Work around redefinition to rpl_putenv by other config tests.  */
25782 #undef putenv
25783
25784 static time_t time_t_max;
25785 static time_t time_t_min;
25786
25787 /* Values we'll use to set the TZ environment variable.  */
25788 static char *tz_strings[] = {
25789   (char *) 0, "TZ=GMT0", "TZ=JST-9",
25790   "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
25791 };
25792 #define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
25793
25794 /* Return 0 if mktime fails to convert a date in the spring-forward gap.
25795    Based on a problem report from Andreas Jaeger.  */
25796 static int
25797 spring_forward_gap ()
25798 {
25799   /* glibc (up to about 1998-10-07) failed this test. */
25800   struct tm tm;
25801
25802   /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
25803      instead of "TZ=America/Vancouver" in order to detect the bug even
25804      on systems that don't support the Olson extension, or don't have the
25805      full zoneinfo tables installed.  */
25806   putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
25807
25808   tm.tm_year = 98;
25809   tm.tm_mon = 3;
25810   tm.tm_mday = 5;
25811   tm.tm_hour = 2;
25812   tm.tm_min = 0;
25813   tm.tm_sec = 0;
25814   tm.tm_isdst = -1;
25815   return mktime (&tm) != (time_t) -1;
25816 }
25817
25818 static int
25819 mktime_test1 (time_t now)
25820 {
25821   struct tm *lt;
25822   return ! (lt = localtime (&now)) || mktime (lt) == now;
25823 }
25824
25825 static int
25826 mktime_test (time_t now)
25827 {
25828   return (mktime_test1 (now)
25829           && mktime_test1 ((time_t) (time_t_max - now))
25830           && mktime_test1 ((time_t) (time_t_min + now)));
25831 }
25832
25833 static int
25834 irix_6_4_bug ()
25835 {
25836   /* Based on code from Ariel Faigon.  */
25837   struct tm tm;
25838   tm.tm_year = 96;
25839   tm.tm_mon = 3;
25840   tm.tm_mday = 0;
25841   tm.tm_hour = 0;
25842   tm.tm_min = 0;
25843   tm.tm_sec = 0;
25844   tm.tm_isdst = -1;
25845   mktime (&tm);
25846   return tm.tm_mon == 2 && tm.tm_mday == 31;
25847 }
25848
25849 static int
25850 bigtime_test (int j)
25851 {
25852   struct tm tm;
25853   time_t now;
25854   tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
25855   now = mktime (&tm);
25856   if (now != (time_t) -1)
25857     {
25858       struct tm *lt = localtime (&now);
25859       if (! (lt
25860              && lt->tm_year == tm.tm_year
25861              && lt->tm_mon == tm.tm_mon
25862              && lt->tm_mday == tm.tm_mday
25863              && lt->tm_hour == tm.tm_hour
25864              && lt->tm_min == tm.tm_min
25865              && lt->tm_sec == tm.tm_sec
25866              && lt->tm_yday == tm.tm_yday
25867              && lt->tm_wday == tm.tm_wday
25868              && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
25869                   == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
25870         return 0;
25871     }
25872   return 1;
25873 }
25874
25875 static int
25876 year_2050_test ()
25877 {
25878   /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
25879      ignoring leap seconds.  */
25880   unsigned long int answer = 2527315200UL;
25881
25882   struct tm tm;
25883   time_t t;
25884   tm.tm_year = 2050 - 1900;
25885   tm.tm_mon = 2 - 1;
25886   tm.tm_mday = 1;
25887   tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
25888   tm.tm_isdst = -1;
25889
25890   /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
25891      instead of "TZ=America/Vancouver" in order to detect the bug even
25892      on systems that don't support the Olson extension, or don't have the
25893      full zoneinfo tables installed.  */
25894   putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
25895
25896   t = mktime (&tm);
25897
25898   /* Check that the result is either a failure, or close enough
25899      to the correct answer that we can assume the discrepancy is
25900      due to leap seconds.  */
25901   return (t == (time_t) -1
25902           || (0 < t && answer - 120 <= t && t <= answer + 120));
25903 }
25904
25905 int
25906 main ()
25907 {
25908   int result = 0;
25909   time_t t, delta;
25910   int i, j;
25911   int time_t_signed_magnitude = (time_t) ~ (time_t) 0 < (time_t) -1;
25912   int time_t_signed = ! ((time_t) 0 < (time_t) -1);
25913
25914 #if HAVE_DECL_ALARM
25915   /* This test makes some buggy mktime implementations loop.
25916      Give up after 60 seconds; a mktime slower than that
25917      isn't worth using anyway.  */
25918   signal (SIGALRM, SIG_DFL);
25919   alarm (60);
25920 #endif
25921
25922   time_t_max = (! time_t_signed
25923                 ? (time_t) -1
25924                 : ((((time_t) 1 << (sizeof (time_t) * CHAR_BIT - 2)) - 1)
25925                    * 2 + 1));
25926   time_t_min = (! time_t_signed
25927                 ? (time_t) 0
25928                 : time_t_signed_magnitude
25929                 ? ~ (time_t) 0
25930                 : ~ time_t_max);
25931
25932   delta = time_t_max / 997; /* a suitable prime number */
25933   for (i = 0; i < N_STRINGS; i++)
25934     {
25935       if (tz_strings[i])
25936         putenv (tz_strings[i]);
25937
25938       for (t = 0; t <= time_t_max - delta && (result & 1) == 0; t += delta)
25939         if (! mktime_test (t))
25940           result |= 1;
25941       if ((result & 2) == 0
25942           && ! (mktime_test ((time_t) 1)
25943                 && mktime_test ((time_t) (60 * 60))
25944                 && mktime_test ((time_t) (60 * 60 * 24))))
25945         result |= 2;
25946
25947       for (j = 1; (result & 4) == 0; j <<= 1)
25948         {
25949           if (! bigtime_test (j))
25950             result |= 4;
25951           if (INT_MAX / 2 < j)
25952             break;
25953         }
25954       if ((result & 8) == 0 && ! bigtime_test (INT_MAX))
25955         result |= 8;
25956     }
25957   if (! irix_6_4_bug ())
25958     result |= 16;
25959   if (! spring_forward_gap ())
25960     result |= 32;
25961   if (! year_2050_test ())
25962     result |= 64;
25963   return result;
25964 }
25965 _ACEOF
25966 if ac_fn_c_try_run "$LINENO"; then :
25967   gl_cv_func_working_mktime=yes
25968 else
25969   gl_cv_func_working_mktime=no
25970 fi
25971 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25972   conftest.$ac_objext conftest.beam conftest.$ac_ext
25973 fi
25974
25975
25976 fi
25977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mktime" >&5
25978 $as_echo "$gl_cv_func_working_mktime" >&6; }
25979
25980   if test $gl_cv_func_working_mktime = no; then
25981     REPLACE_MKTIME=1
25982   else
25983     REPLACE_MKTIME=0
25984   fi
25985
25986   if test $REPLACE_MKTIME = 1; then
25987
25988
25989
25990
25991
25992
25993
25994
25995   gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext"
25996
25997     :
25998   fi
25999
26000
26001
26002
26003
26004           GNULIB_MKTIME=1
26005
26006
26007
26008
26009
26010 $as_echo "#define GNULIB_TEST_MKTIME 1" >>confdefs.h
26011
26012
26013
26014
26015
26016   if test $REPLACE_MKTIME = 0; then
26017         ac_fn_c_check_func "$LINENO" "__mktime_internal" "ac_cv_func___mktime_internal"
26018 if test "x$ac_cv_func___mktime_internal" = xyes; then :
26019
26020 $as_echo "#define mktime_internal __mktime_internal" >>confdefs.h
26021
26022
26023 else
26024                 REPLACE_MKTIME=1
26025
26026 fi
26027
26028   fi
26029
26030   if test $REPLACE_MKTIME = 1; then
26031
26032
26033
26034
26035
26036
26037
26038
26039   gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext"
26040
26041     :
26042   fi
26043
26044   :
26045
26046
26047
26048   if test $ac_cv_func__set_invalid_parameter_handler = yes; then
26049     HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
26050
26051 $as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
26052
26053   else
26054     HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
26055   fi
26056
26057
26058   if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
26059
26060
26061
26062
26063
26064
26065
26066
26067   gl_LIBOBJS="$gl_LIBOBJS msvc-inval.$ac_objext"
26068
26069   fi
26070
26071
26072
26073   if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
26074
26075
26076
26077
26078
26079
26080
26081
26082   gl_LIBOBJS="$gl_LIBOBJS msvc-nothrow.$ac_objext"
26083
26084   fi
26085
26086
26087
26088
26089
26090      if test $ac_cv_func_nl_langinfo = yes; then
26091     # On Irix 6.5, YESEXPR is defined, but nl_langinfo(YESEXPR) is broken.
26092     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether YESEXPR works" >&5
26093 $as_echo_n "checking whether YESEXPR works... " >&6; }
26094 if ${gl_cv_func_nl_langinfo_yesexpr_works+:} false; then :
26095   $as_echo_n "(cached) " >&6
26096 else
26097   if test "$cross_compiling" = yes; then :
26098
26099          case "$host_os" in
26100                    # Guess no on irix systems.
26101            irix*)  gl_cv_func_nl_langinfo_yesexpr_works="guessing no";;
26102                    # Guess yes elsewhere.
26103            *)      gl_cv_func_nl_langinfo_yesexpr_works="guessing yes";;
26104          esac
26105
26106 else
26107   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26108 /* end confdefs.h.  */
26109 #include <langinfo.h>
26110
26111 int
26112 main ()
26113 {
26114 return !*nl_langinfo(YESEXPR);
26115
26116   ;
26117   return 0;
26118 }
26119 _ACEOF
26120 if ac_fn_c_try_run "$LINENO"; then :
26121   gl_cv_func_nl_langinfo_yesexpr_works=yes
26122 else
26123   gl_cv_func_nl_langinfo_yesexpr_works=no
26124 fi
26125 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26126   conftest.$ac_objext conftest.beam conftest.$ac_ext
26127 fi
26128
26129
26130 fi
26131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_nl_langinfo_yesexpr_works" >&5
26132 $as_echo "$gl_cv_func_nl_langinfo_yesexpr_works" >&6; }
26133     case $gl_cv_func_nl_langinfo_yesexpr_works in
26134       *yes) FUNC_NL_LANGINFO_YESEXPR_WORKS=1 ;;
26135       *)    FUNC_NL_LANGINFO_YESEXPR_WORKS=0 ;;
26136     esac
26137
26138 cat >>confdefs.h <<_ACEOF
26139 #define FUNC_NL_LANGINFO_YESEXPR_WORKS $FUNC_NL_LANGINFO_YESEXPR_WORKS
26140 _ACEOF
26141
26142     if test $HAVE_LANGINFO_CODESET = 1 && test $HAVE_LANGINFO_ERA = 1 \
26143         && test $FUNC_NL_LANGINFO_YESEXPR_WORKS = 1; then
26144       :
26145     else
26146       REPLACE_NL_LANGINFO=1
26147
26148 $as_echo "#define REPLACE_NL_LANGINFO 1" >>confdefs.h
26149
26150     fi
26151   else
26152     HAVE_NL_LANGINFO=0
26153   fi
26154
26155   if test $HAVE_NL_LANGINFO = 0 || test $REPLACE_NL_LANGINFO = 1; then
26156
26157
26158
26159
26160
26161
26162
26163
26164   gl_LIBOBJS="$gl_LIBOBJS nl_langinfo.$ac_objext"
26165
26166   fi
26167
26168
26169
26170
26171
26172           GNULIB_NL_LANGINFO=1
26173
26174
26175
26176
26177
26178 $as_echo "#define GNULIB_TEST_NL_LANGINFO 1" >>confdefs.h
26179
26180
26181
26182
26183
26184
26185
26186
26187
26188
26189
26190
26191
26192
26193
26194    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for obstacks that work with any size object" >&5
26195 $as_echo_n "checking for obstacks that work with any size object... " >&6; }
26196 if ${ac_cv_func_obstack+:} false; then :
26197   $as_echo_n "(cached) " >&6
26198 else
26199   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26200 /* end confdefs.h.  */
26201 #include "obstack.h"
26202              void *obstack_chunk_alloc (size_t n) { return 0; }
26203              void obstack_chunk_free (void *p) { }
26204              /* Check that an internal function returns size_t, not int.  */
26205              size_t _obstack_memory_used (struct obstack *);
26206
26207 int
26208 main ()
26209 {
26210 struct obstack mem;
26211              obstack_init (&mem);
26212              obstack_free (&mem, 0);
26213
26214   ;
26215   return 0;
26216 }
26217 _ACEOF
26218 if ac_fn_c_try_link "$LINENO"; then :
26219   ac_cv_func_obstack=yes
26220 else
26221   ac_cv_func_obstack=no
26222 fi
26223 rm -f core conftest.err conftest.$ac_objext \
26224     conftest$ac_exeext conftest.$ac_ext
26225 fi
26226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_obstack" >&5
26227 $as_echo "$ac_cv_func_obstack" >&6; }
26228    if test "$ac_cv_func_obstack" = yes; then
26229
26230 $as_echo "#define HAVE_OBSTACK 1" >>confdefs.h
26231
26232    else
26233
26234
26235
26236
26237
26238
26239
26240
26241   gl_LIBOBJS="$gl_LIBOBJS obstack.$ac_objext"
26242
26243    fi
26244
26245
26246
26247   case "$host_os" in
26248     mingw* | pw*)
26249       REPLACE_OPEN=1
26250       ;;
26251     *)
26252
26253       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
26254 $as_echo_n "checking whether open recognizes a trailing slash... " >&6; }
26255 if ${gl_cv_func_open_slash+:} false; then :
26256   $as_echo_n "(cached) " >&6
26257 else
26258   # Assume that if we have lstat, we can also check symlinks.
26259           if test $ac_cv_func_lstat = yes; then
26260             touch conftest.tmp
26261             ln -s conftest.tmp conftest.lnk
26262           fi
26263           if test "$cross_compiling" = yes; then :
26264
26265              case "$host_os" in
26266                freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
26267                  gl_cv_func_open_slash="guessing no" ;;
26268                *)
26269                  gl_cv_func_open_slash="guessing yes" ;;
26270              esac
26271
26272 else
26273   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26274 /* end confdefs.h.  */
26275
26276 #include <fcntl.h>
26277 #if HAVE_UNISTD_H
26278 # include <unistd.h>
26279 #endif
26280 int main ()
26281 {
26282   int result = 0;
26283 #if HAVE_LSTAT
26284   if (open ("conftest.lnk/", O_RDONLY) != -1)
26285     result |= 1;
26286 #endif
26287   if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
26288     result |= 2;
26289   return result;
26290 }
26291 _ACEOF
26292 if ac_fn_c_try_run "$LINENO"; then :
26293   gl_cv_func_open_slash=yes
26294 else
26295   gl_cv_func_open_slash=no
26296 fi
26297 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26298   conftest.$ac_objext conftest.beam conftest.$ac_ext
26299 fi
26300
26301           rm -f conftest.sl conftest.tmp conftest.lnk
26302
26303 fi
26304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5
26305 $as_echo "$gl_cv_func_open_slash" >&6; }
26306       case "$gl_cv_func_open_slash" in
26307         *no)
26308
26309 $as_echo "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
26310
26311           REPLACE_OPEN=1
26312           ;;
26313       esac
26314       ;;
26315   esac
26316
26317     if test $REPLACE_OPEN = 0; then
26318
26319
26320
26321   if test $ac_cv_func_fchdir = no; then
26322     HAVE_FCHDIR=0
26323   fi
26324
26325       if test $HAVE_FCHDIR = 0; then
26326         REPLACE_OPEN=1
26327       fi
26328     fi
26329
26330
26331
26332   if test $REPLACE_OPEN = 1; then
26333
26334
26335
26336
26337
26338
26339
26340
26341   gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext"
26342
26343
26344
26345   :
26346
26347   fi
26348
26349
26350
26351
26352
26353           GNULIB_OPEN=1
26354
26355
26356
26357
26358
26359 $as_echo "#define GNULIB_TEST_OPEN 1" >>confdefs.h
26360
26361
26362
26363
26364
26365
26366
26367
26368   case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink in
26369   yes+*yes)
26370     ;;
26371   yes+*)
26372     # Solaris 9 has *at functions, but uniformly mishandles trailing
26373     # slash in all of them.
26374     REPLACE_OPENAT=1
26375     ;;
26376   *)
26377     HAVE_OPENAT=0
26378     ;;
26379   esac
26380
26381   if test $HAVE_OPENAT = 0 || test $REPLACE_OPENAT = 1; then
26382
26383
26384
26385
26386
26387
26388
26389
26390   gl_LIBOBJS="$gl_LIBOBJS openat.$ac_objext"
26391
26392
26393
26394   :
26395
26396   fi
26397
26398
26399 cat >>confdefs.h <<_ACEOF
26400 #define GNULIB_OPENAT 1
26401 _ACEOF
26402
26403
26404
26405
26406
26407
26408           GNULIB_OPENAT=1
26409
26410
26411
26412
26413
26414 $as_echo "#define GNULIB_TEST_OPENAT 1" >>confdefs.h
26415
26416
26417
26418
26419
26420
26421   for ac_func in opendir
26422 do :
26423   ac_fn_c_check_func "$LINENO" "opendir" "ac_cv_func_opendir"
26424 if test "x$ac_cv_func_opendir" = xyes; then :
26425   cat >>confdefs.h <<_ACEOF
26426 #define HAVE_OPENDIR 1
26427 _ACEOF
26428
26429 fi
26430 done
26431
26432   if test $ac_cv_func_opendir = no; then
26433     HAVE_OPENDIR=0
26434   fi
26435
26436
26437
26438
26439   if test $ac_cv_func_fchdir = no; then
26440     HAVE_FCHDIR=0
26441   fi
26442
26443     if test $HAVE_FCHDIR = 0; then
26444       if test $HAVE_OPENDIR = 1; then
26445         REPLACE_OPENDIR=1
26446       fi
26447     fi
26448
26449
26450   if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then
26451
26452
26453
26454
26455
26456
26457
26458
26459   gl_LIBOBJS="$gl_LIBOBJS opendir.$ac_objext"
26460
26461   fi
26462
26463
26464
26465
26466
26467           GNULIB_OPENDIR=1
26468
26469
26470
26471
26472
26473 $as_echo "#define GNULIB_TEST_OPENDIR 1" >>confdefs.h
26474
26475
26476
26477
26478
26479
26480
26481
26482
26483   ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
26484 #include <$ac_cv_struct_tm>
26485
26486 "
26487 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
26488
26489 cat >>confdefs.h <<_ACEOF
26490 #define HAVE_STRUCT_TM_TM_ZONE 1
26491 _ACEOF
26492
26493
26494 fi
26495
26496 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
26497
26498 $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
26499
26500 else
26501   ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
26502 "
26503 if test "x$ac_cv_have_decl_tzname" = xyes; then :
26504   ac_have_decl=1
26505 else
26506   ac_have_decl=0
26507 fi
26508
26509 cat >>confdefs.h <<_ACEOF
26510 #define HAVE_DECL_TZNAME $ac_have_decl
26511 _ACEOF
26512
26513   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
26514 $as_echo_n "checking for tzname... " >&6; }
26515 if ${ac_cv_var_tzname+:} false; then :
26516   $as_echo_n "(cached) " >&6
26517 else
26518   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26519 /* end confdefs.h.  */
26520 #include <time.h>
26521 #if !HAVE_DECL_TZNAME
26522 extern char *tzname[];
26523 #endif
26524
26525 int
26526 main ()
26527 {
26528 return tzname[0][0];
26529   ;
26530   return 0;
26531 }
26532 _ACEOF
26533 if ac_fn_c_try_link "$LINENO"; then :
26534   ac_cv_var_tzname=yes
26535 else
26536   ac_cv_var_tzname=no
26537 fi
26538 rm -f core conftest.err conftest.$ac_objext \
26539     conftest$ac_exeext conftest.$ac_ext
26540 fi
26541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
26542 $as_echo "$ac_cv_var_tzname" >&6; }
26543   if test $ac_cv_var_tzname = yes; then
26544
26545 $as_echo "#define HAVE_TZNAME 1" >>confdefs.h
26546
26547   fi
26548 fi
26549
26550
26551
26552   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26553 /* end confdefs.h.  */
26554
26555 #include <time.h> /* for time_t */
26556 #include <limits.h> /* for CHAR_BIT, LONG_MIN, LONG_MAX */
26557 #define TYPE_MINIMUM(t) \
26558   ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
26559 #define TYPE_MAXIMUM(t) \
26560   ((t) ((t) 0 < (t) -1 \
26561         ? (t) -1 \
26562         : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
26563 typedef int verify_min[2 * (LONG_MIN <= TYPE_MINIMUM (time_t)) - 1];
26564 typedef int verify_max[2 * (TYPE_MAXIMUM (time_t) <= LONG_MAX) - 1];
26565
26566 _ACEOF
26567 if ac_fn_c_try_compile "$LINENO"; then :
26568
26569 $as_echo "#define TIME_T_FITS_IN_LONG_INT 1" >>confdefs.h
26570
26571
26572 fi
26573 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26574
26575
26576
26577
26578
26579   for ac_func in getppriv
26580 do :
26581   ac_fn_c_check_func "$LINENO" "getppriv" "ac_cv_func_getppriv"
26582 if test "x$ac_cv_func_getppriv" = xyes; then :
26583   cat >>confdefs.h <<_ACEOF
26584 #define HAVE_GETPPRIV 1
26585 _ACEOF
26586
26587 fi
26588 done
26589
26590
26591
26592   ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
26593 "
26594 if test "x$ac_cv_have_decl_program_invocation_name" = xyes; then :
26595   ac_have_decl=1
26596 else
26597   ac_have_decl=0
26598 fi
26599
26600 cat >>confdefs.h <<_ACEOF
26601 #define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl
26602 _ACEOF
26603
26604   ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
26605 "
26606 if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes; then :
26607   ac_have_decl=1
26608 else
26609   ac_have_decl=0
26610 fi
26611
26612 cat >>confdefs.h <<_ACEOF
26613 #define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl
26614 _ACEOF
26615
26616
26617       :
26618
26619
26620   :
26621
26622
26623
26624
26625
26626   for ac_func in raise
26627 do :
26628   ac_fn_c_check_func "$LINENO" "raise" "ac_cv_func_raise"
26629 if test "x$ac_cv_func_raise" = xyes; then :
26630   cat >>confdefs.h <<_ACEOF
26631 #define HAVE_RAISE 1
26632 _ACEOF
26633
26634 fi
26635 done
26636
26637   if test $ac_cv_func_raise = no; then
26638     HAVE_RAISE=0
26639   else
26640     if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
26641       REPLACE_RAISE=1
26642     fi
26643
26644   fi
26645
26646   if test $HAVE_RAISE = 0 || test $REPLACE_RAISE = 1; then
26647
26648
26649
26650
26651
26652
26653
26654
26655   gl_LIBOBJS="$gl_LIBOBJS raise.$ac_objext"
26656
26657     :
26658   fi
26659
26660
26661
26662
26663
26664           GNULIB_RAISE=1
26665
26666
26667
26668
26669
26670 $as_echo "#define GNULIB_TEST_RAISE 1" >>confdefs.h
26671
26672
26673
26674
26675
26676
26677
26678   for ac_func in rawmemchr
26679 do :
26680   ac_fn_c_check_func "$LINENO" "rawmemchr" "ac_cv_func_rawmemchr"
26681 if test "x$ac_cv_func_rawmemchr" = xyes; then :
26682   cat >>confdefs.h <<_ACEOF
26683 #define HAVE_RAWMEMCHR 1
26684 _ACEOF
26685
26686 fi
26687 done
26688
26689   if test $ac_cv_func_rawmemchr = no; then
26690     HAVE_RAWMEMCHR=0
26691   fi
26692
26693   if test $HAVE_RAWMEMCHR = 0; then
26694
26695
26696
26697
26698
26699
26700
26701
26702   gl_LIBOBJS="$gl_LIBOBJS rawmemchr.$ac_objext"
26703
26704     :
26705   fi
26706
26707
26708
26709
26710
26711           GNULIB_RAWMEMCHR=1
26712
26713
26714
26715
26716
26717 $as_echo "#define GNULIB_TEST_RAWMEMCHR 1" >>confdefs.h
26718
26719
26720
26721
26722
26723
26724   if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
26725     REPLACE_READ=1
26726   fi
26727
26728
26729   if test $REPLACE_READ = 1; then
26730
26731
26732
26733
26734
26735
26736
26737
26738   gl_LIBOBJS="$gl_LIBOBJS read.$ac_objext"
26739
26740     :
26741   fi
26742
26743
26744
26745
26746
26747           GNULIB_READ=1
26748
26749
26750
26751
26752
26753 $as_echo "#define GNULIB_TEST_READ 1" >>confdefs.h
26754
26755
26756
26757
26758
26759
26760   for ac_func in readdir
26761 do :
26762   ac_fn_c_check_func "$LINENO" "readdir" "ac_cv_func_readdir"
26763 if test "x$ac_cv_func_readdir" = xyes; then :
26764   cat >>confdefs.h <<_ACEOF
26765 #define HAVE_READDIR 1
26766 _ACEOF
26767
26768 fi
26769 done
26770
26771   if test $ac_cv_func_readdir = no; then
26772     HAVE_READDIR=0
26773   fi
26774
26775   if test $HAVE_READDIR = 0; then
26776
26777
26778
26779
26780
26781
26782
26783
26784   gl_LIBOBJS="$gl_LIBOBJS readdir.$ac_objext"
26785
26786   fi
26787
26788
26789
26790
26791
26792           GNULIB_READDIR=1
26793
26794
26795
26796
26797
26798 $as_echo "#define GNULIB_TEST_READDIR 1" >>confdefs.h
26799
26800
26801
26802
26803
26804
26805   if test $ac_cv_func_readlink = no; then
26806     HAVE_READLINK=0
26807   else
26808     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
26809 $as_echo_n "checking whether readlink signature is correct... " >&6; }
26810 if ${gl_cv_decl_readlink_works+:} false; then :
26811   $as_echo_n "(cached) " >&6
26812 else
26813   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26814 /* end confdefs.h.  */
26815 #include <unistd.h>
26816       /* Cause compilation failure if original declaration has wrong type.  */
26817       ssize_t readlink (const char *, char *, size_t);
26818 int
26819 main ()
26820 {
26821
26822   ;
26823   return 0;
26824 }
26825 _ACEOF
26826 if ac_fn_c_try_compile "$LINENO"; then :
26827   gl_cv_decl_readlink_works=yes
26828 else
26829   gl_cv_decl_readlink_works=no
26830 fi
26831 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26832 fi
26833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
26834 $as_echo "$gl_cv_decl_readlink_works" >&6; }
26835             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
26836 $as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; }
26837 if ${gl_cv_func_readlink_works+:} false; then :
26838   $as_echo_n "(cached) " >&6
26839 else
26840   # We have readlink, so assume ln -s works.
26841        ln -s conftest.no-such conftest.link
26842        ln -s conftest.link conftest.lnk2
26843        if test "$cross_compiling" = yes; then :
26844   case "$host_os" in
26845                     # Guess yes on glibc systems.
26846             *-gnu*) gl_cv_func_readlink_works="guessing yes" ;;
26847                     # If we don't know, assume the worst.
26848             *)      gl_cv_func_readlink_works="guessing no" ;;
26849           esac
26850
26851 else
26852   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26853 /* end confdefs.h.  */
26854 #include <unistd.h>
26855
26856 int
26857 main ()
26858 {
26859 char buf[20];
26860       return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
26861   ;
26862   return 0;
26863 }
26864 _ACEOF
26865 if ac_fn_c_try_run "$LINENO"; then :
26866   gl_cv_func_readlink_works=yes
26867 else
26868   gl_cv_func_readlink_works=no
26869 fi
26870 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26871   conftest.$ac_objext conftest.beam conftest.$ac_ext
26872 fi
26873
26874       rm -f conftest.link conftest.lnk2
26875 fi
26876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5
26877 $as_echo "$gl_cv_func_readlink_works" >&6; }
26878     case "$gl_cv_func_readlink_works" in
26879       *yes)
26880         if test "$gl_cv_decl_readlink_works" != yes; then
26881           REPLACE_READLINK=1
26882         fi
26883         ;;
26884       *)
26885
26886 $as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
26887
26888         REPLACE_READLINK=1
26889         ;;
26890     esac
26891   fi
26892
26893   if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
26894
26895
26896
26897
26898
26899
26900
26901
26902   gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext"
26903
26904
26905   :
26906
26907   fi
26908
26909
26910
26911
26912
26913           GNULIB_READLINK=1
26914
26915
26916
26917
26918
26919 $as_echo "#define GNULIB_TEST_READLINK 1" >>confdefs.h
26920
26921
26922
26923
26924
26925
26926
26927
26928   if test $ac_cv_func_readlinkat = no; then
26929     HAVE_READLINKAT=0
26930   else
26931     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlinkat signature is correct" >&5
26932 $as_echo_n "checking whether readlinkat signature is correct... " >&6; }
26933 if ${gl_cv_decl_readlinkat_works+:} false; then :
26934   $as_echo_n "(cached) " >&6
26935 else
26936   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26937 /* end confdefs.h.  */
26938 #include <unistd.h>
26939              /* Check whether original declaration has correct type.  */
26940              ssize_t readlinkat (int, char const *, char *, size_t);
26941 int
26942 main ()
26943 {
26944
26945   ;
26946   return 0;
26947 }
26948 _ACEOF
26949 if ac_fn_c_try_compile "$LINENO"; then :
26950   gl_cv_decl_readlinkat_works=yes
26951 else
26952   gl_cv_decl_readlinkat_works=no
26953 fi
26954 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26955 fi
26956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlinkat_works" >&5
26957 $as_echo "$gl_cv_decl_readlinkat_works" >&6; }
26958     # Assume readinkat has the same trailing slash bug as readlink,
26959     # as is the case on Mac Os X 10.10
26960     case "$gl_cv_func_readlink_works" in
26961       *yes)
26962         if test "$gl_cv_decl_readlinkat_works" != yes; then
26963           REPLACE_READLINKAT=1
26964         fi
26965         ;;
26966       *)
26967         REPLACE_READLINKAT=1
26968         ;;
26969     esac
26970   fi
26971
26972   if test $HAVE_READLINKAT = 0 || test $REPLACE_READLINKAT = 1; then
26973
26974
26975
26976
26977
26978
26979
26980
26981   gl_LIBOBJS="$gl_LIBOBJS readlinkat.$ac_objext"
26982
26983   fi
26984
26985
26986
26987
26988
26989           GNULIB_READLINKAT=1
26990
26991
26992
26993
26994
26995 $as_echo "#define GNULIB_TEST_READLINKAT 1" >>confdefs.h
26996
26997
26998
26999
27000
27001
27002   if test $gl_cv_func_malloc_posix = yes; then
27003
27004 $as_echo "#define HAVE_REALLOC_POSIX 1" >>confdefs.h
27005
27006   else
27007     REPLACE_REALLOC=1
27008   fi
27009
27010   if test $REPLACE_REALLOC = 1; then
27011
27012
27013
27014
27015
27016
27017
27018
27019   gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
27020
27021   fi
27022
27023
27024
27025
27026
27027           GNULIB_REALLOC_POSIX=1
27028
27029
27030
27031
27032
27033 $as_echo "#define GNULIB_TEST_REALLOC_POSIX 1" >>confdefs.h
27034
27035
27036
27037
27038
27039 # Check whether --with-included-regex was given.
27040 if test "${with_included_regex+set}" = set; then :
27041   withval=$with_included_regex;
27042 fi
27043
27044
27045   case $with_included_regex in #(
27046   yes|no) ac_use_included_regex=$with_included_regex
27047         ;;
27048   '')
27049     # If the system regex support is good enough that it passes the
27050     # following run test, then default to *not* using the included regex.c.
27051     # If cross compiling, assume the test would fail and use the included
27052     # regex.c.
27053
27054
27055     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working re_compile_pattern" >&5
27056 $as_echo_n "checking for working re_compile_pattern... " >&6; }
27057 if ${gl_cv_func_re_compile_pattern_working+:} false; then :
27058   $as_echo_n "(cached) " >&6
27059 else
27060   if test "$cross_compiling" = yes; then :
27061          gl_cv_func_re_compile_pattern_working=no
27062 else
27063   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27064 /* end confdefs.h.  */
27065 #include <regex.h>
27066
27067             #include <locale.h>
27068             #include <limits.h>
27069             #include <string.h>
27070
27071             #if defined M_CHECK_ACTION || HAVE_DECL_ALARM
27072             # include <signal.h>
27073             # include <unistd.h>
27074             #endif
27075
27076             #if HAVE_MALLOC_H
27077             # include <malloc.h>
27078             #endif
27079
27080             #ifdef M_CHECK_ACTION
27081             /* Exit with distinguishable exit code.  */
27082             static void sigabrt_no_core (int sig) { raise (SIGTERM); }
27083             #endif
27084
27085 int
27086 main ()
27087 {
27088 int result = 0;
27089             static struct re_pattern_buffer regex;
27090             unsigned char folded_chars[UCHAR_MAX + 1];
27091             int i;
27092             const char *s;
27093             struct re_registers regs;
27094
27095             /* Some builds of glibc go into an infinite loop on this
27096                test.  Use alarm to force death, and mallopt to avoid
27097                malloc recursion in diagnosing the corrupted heap. */
27098 #if HAVE_DECL_ALARM
27099             signal (SIGALRM, SIG_DFL);
27100             alarm (2);
27101 #endif
27102 #ifdef M_CHECK_ACTION
27103             signal (SIGABRT, sigabrt_no_core);
27104             mallopt (M_CHECK_ACTION, 2);
27105 #endif
27106
27107             if (setlocale (LC_ALL, "en_US.UTF-8"))
27108               {
27109                 {
27110                   /* http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html
27111                      This test needs valgrind to catch the bug on Debian
27112                      GNU/Linux 3.1 x86, but it might catch the bug better
27113                      on other platforms and it shouldn't hurt to try the
27114                      test here.  */
27115                   static char const pat[] = "insert into";
27116                   static char const data[] =
27117                     "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK";
27118                   re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE
27119                                  | RE_ICASE);
27120                   memset (&regex, 0, sizeof regex);
27121                   s = re_compile_pattern (pat, sizeof pat - 1, &regex);
27122                   if (s)
27123                     result |= 1;
27124                   else if (re_search (&regex, data, sizeof data - 1,
27125                                       0, sizeof data - 1, &regs)
27126                            != -1)
27127                     result |= 1;
27128                 }
27129
27130                 {
27131                   /* This test is from glibc bug 15078.
27132                      The test case is from Andreas Schwab in
27133                      <http://www.sourceware.org/ml/libc-alpha/2013-01/msg00967.html>.
27134                      */
27135                   static char const pat[] = "[^x]x";
27136                   static char const data[] =
27137                     /* <U1000><U103B><U103D><U1014><U103A><U102F><U1015><U103A> */
27138                     "\xe1\x80\x80"
27139                     "\xe1\x80\xbb"
27140                     "\xe1\x80\xbd"
27141                     "\xe1\x80\x94"
27142                     "\xe1\x80\xba"
27143                     "\xe1\x80\xaf"
27144                     "\xe1\x80\x95"
27145                     "\xe1\x80\xba"
27146                     "x";
27147                   re_set_syntax (0);
27148                   memset (&regex, 0, sizeof regex);
27149                   s = re_compile_pattern (pat, sizeof pat - 1, &regex);
27150                   if (s)
27151                     result |= 1;
27152                   else
27153                     {
27154                       i = re_search (&regex, data, sizeof data - 1,
27155                                      0, sizeof data - 1, 0);
27156                       if (i != 0 && i != 21)
27157                         result |= 1;
27158                     }
27159                 }
27160
27161                 if (! setlocale (LC_ALL, "C"))
27162                   return 1;
27163               }
27164
27165             /* This test is from glibc bug 3957, reported by Andrew Mackey.  */
27166             re_set_syntax (RE_SYNTAX_EGREP | RE_HAT_LISTS_NOT_NEWLINE);
27167             memset (&regex, 0, sizeof regex);
27168             s = re_compile_pattern ("a[^x]b", 6, &regex);
27169             if (s)
27170               result |= 2;
27171             /* This should fail, but succeeds for glibc-2.5.  */
27172             else if (re_search (&regex, "a\nb", 3, 0, 3, &regs) != -1)
27173               result |= 2;
27174
27175             /* This regular expression is from Spencer ere test number 75
27176                in grep-2.3.  */
27177             re_set_syntax (RE_SYNTAX_POSIX_EGREP);
27178             memset (&regex, 0, sizeof regex);
27179             for (i = 0; i <= UCHAR_MAX; i++)
27180               folded_chars[i] = i;
27181             regex.translate = folded_chars;
27182             s = re_compile_pattern ("a[[:]:]]b\n", 11, &regex);
27183             /* This should fail with _Invalid character class name_ error.  */
27184             if (!s)
27185               result |= 4;
27186
27187             /* Ensure that [b-a] is diagnosed as invalid, when
27188                using RE_NO_EMPTY_RANGES. */
27189             re_set_syntax (RE_SYNTAX_POSIX_EGREP | RE_NO_EMPTY_RANGES);
27190             memset (&regex, 0, sizeof regex);
27191             s = re_compile_pattern ("a[b-a]", 6, &regex);
27192             if (s == 0)
27193               result |= 8;
27194
27195             /* This should succeed, but does not for glibc-2.1.3.  */
27196             memset (&regex, 0, sizeof regex);
27197             s = re_compile_pattern ("{1", 2, &regex);
27198             if (s)
27199               result |= 8;
27200
27201             /* The following example is derived from a problem report
27202                against gawk from Jorge Stolfi <stolfi@ic.unicamp.br>.  */
27203             memset (&regex, 0, sizeof regex);
27204             s = re_compile_pattern ("[an\371]*n", 7, &regex);
27205             if (s)
27206               result |= 8;
27207             /* This should match, but does not for glibc-2.2.1.  */
27208             else if (re_match (&regex, "an", 2, 0, &regs) != 2)
27209               result |= 8;
27210
27211             memset (&regex, 0, sizeof regex);
27212             s = re_compile_pattern ("x", 1, &regex);
27213             if (s)
27214               result |= 8;
27215             /* glibc-2.2.93 does not work with a negative RANGE argument.  */
27216             else if (re_search (&regex, "wxy", 3, 2, -2, &regs) != 1)
27217               result |= 8;
27218
27219             /* The version of regex.c in older versions of gnulib
27220                ignored RE_ICASE.  Detect that problem too.  */
27221             re_set_syntax (RE_SYNTAX_EMACS | RE_ICASE);
27222             memset (&regex, 0, sizeof regex);
27223             s = re_compile_pattern ("x", 1, &regex);
27224             if (s)
27225               result |= 16;
27226             else if (re_search (&regex, "WXY", 3, 0, 3, &regs) < 0)
27227               result |= 16;
27228
27229             /* Catch a bug reported by Vin Shelton in
27230                http://lists.gnu.org/archive/html/bug-coreutils/2007-06/msg00089.html
27231                */
27232             re_set_syntax (RE_SYNTAX_POSIX_BASIC
27233                            & ~RE_CONTEXT_INVALID_DUP
27234                            & ~RE_NO_EMPTY_RANGES);
27235             memset (&regex, 0, sizeof regex);
27236             s = re_compile_pattern ("[[:alnum:]_-]\\\\+$", 16, &regex);
27237             if (s)
27238               result |= 32;
27239
27240             /* REG_STARTEND was added to glibc on 2004-01-15.
27241                Reject older versions.  */
27242             if (! REG_STARTEND)
27243               result |= 64;
27244
27245 #if 0
27246             /* It would be nice to reject hosts whose regoff_t values are too
27247                narrow (including glibc on hosts with 64-bit ptrdiff_t and
27248                32-bit int), but we should wait until glibc implements this
27249                feature.  Otherwise, support for equivalence classes and
27250                multibyte collation symbols would always be broken except
27251                when compiling --without-included-regex.   */
27252             if (sizeof (regoff_t) < sizeof (ptrdiff_t)
27253                 || sizeof (regoff_t) < sizeof (ssize_t))
27254               result |= 64;
27255 #endif
27256
27257             return result;
27258
27259   ;
27260   return 0;
27261 }
27262 _ACEOF
27263 if ac_fn_c_try_run "$LINENO"; then :
27264   gl_cv_func_re_compile_pattern_working=yes
27265 else
27266   gl_cv_func_re_compile_pattern_working=no
27267 fi
27268 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27269   conftest.$ac_objext conftest.beam conftest.$ac_ext
27270 fi
27271
27272 fi
27273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_re_compile_pattern_working" >&5
27274 $as_echo "$gl_cv_func_re_compile_pattern_working" >&6; }
27275     case $gl_cv_func_re_compile_pattern_working in #(
27276     yes) ac_use_included_regex=no;; #(
27277     no) ac_use_included_regex=yes;;
27278     esac
27279     ;;
27280   *) as_fn_error $? "Invalid value for --with-included-regex: $with_included_regex" "$LINENO" 5
27281     ;;
27282   esac
27283
27284   if test $ac_use_included_regex = yes; then
27285
27286 $as_echo "#define _REGEX_INCLUDE_LIMITS_H 1" >>confdefs.h
27287
27288
27289 $as_echo "#define _REGEX_LARGE_OFFSETS 1" >>confdefs.h
27290
27291
27292 $as_echo "#define re_syntax_options rpl_re_syntax_options" >>confdefs.h
27293
27294
27295 $as_echo "#define re_set_syntax rpl_re_set_syntax" >>confdefs.h
27296
27297
27298 $as_echo "#define re_compile_pattern rpl_re_compile_pattern" >>confdefs.h
27299
27300
27301 $as_echo "#define re_compile_fastmap rpl_re_compile_fastmap" >>confdefs.h
27302
27303
27304 $as_echo "#define re_search rpl_re_search" >>confdefs.h
27305
27306
27307 $as_echo "#define re_search_2 rpl_re_search_2" >>confdefs.h
27308
27309
27310 $as_echo "#define re_match rpl_re_match" >>confdefs.h
27311
27312
27313 $as_echo "#define re_match_2 rpl_re_match_2" >>confdefs.h
27314
27315
27316 $as_echo "#define re_set_registers rpl_re_set_registers" >>confdefs.h
27317
27318
27319 $as_echo "#define re_comp rpl_re_comp" >>confdefs.h
27320
27321
27322 $as_echo "#define re_exec rpl_re_exec" >>confdefs.h
27323
27324
27325 $as_echo "#define regcomp rpl_regcomp" >>confdefs.h
27326
27327
27328 $as_echo "#define regexec rpl_regexec" >>confdefs.h
27329
27330
27331 $as_echo "#define regerror rpl_regerror" >>confdefs.h
27332
27333
27334 $as_echo "#define regfree rpl_regfree" >>confdefs.h
27335
27336   fi
27337
27338   if test $ac_use_included_regex = yes; then
27339
27340
27341
27342
27343
27344
27345
27346
27347   gl_LIBOBJS="$gl_LIBOBJS regex.$ac_objext"
27348
27349
27350
27351
27352
27353
27354
27355
27356   for ac_header in libintl.h
27357 do :
27358   ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
27359 if test "x$ac_cv_header_libintl_h" = xyes; then :
27360   cat >>confdefs.h <<_ACEOF
27361 #define HAVE_LIBINTL_H 1
27362 _ACEOF
27363
27364 fi
27365
27366 done
27367
27368
27369   ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
27370 "
27371 if test "x$ac_cv_have_decl_isblank" = xyes; then :
27372   ac_have_decl=1
27373 else
27374   ac_have_decl=0
27375 fi
27376
27377 cat >>confdefs.h <<_ACEOF
27378 #define HAVE_DECL_ISBLANK $ac_have_decl
27379 _ACEOF
27380
27381
27382   fi
27383
27384
27385
27386
27387
27388                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on destination" >&5
27389 $as_echo_n "checking whether rename honors trailing slash on destination... " >&6; }
27390 if ${gl_cv_func_rename_slash_dst_works+:} false; then :
27391   $as_echo_n "(cached) " >&6
27392 else
27393   rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
27394     touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
27395       as_fn_error $? "cannot create temporary files" "$LINENO" 5
27396     # Assume that if we have lstat, we can also check symlinks.
27397     if test $ac_cv_func_lstat = yes; then
27398       ln -s conftest.f conftest.lnk
27399     fi
27400     if test "$cross_compiling" = yes; then :
27401         case "$host_os" in
27402                  # Guess yes on glibc systems.
27403          *-gnu*) gl_cv_func_rename_slash_dst_works="guessing yes" ;;
27404                  # If we don't know, assume the worst.
27405          *)      gl_cv_func_rename_slash_dst_works="guessing no" ;;
27406        esac
27407
27408 else
27409   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27410 /* end confdefs.h.  */
27411
27412 #        include <stdio.h>
27413 #        include <stdlib.h>
27414
27415 int
27416 main ()
27417 {
27418 int result = 0;
27419            if (rename ("conftest.f1", "conftest.f2/") == 0)
27420              result |= 1;
27421            if (rename ("conftest.d1", "conftest.d2/") != 0)
27422              result |= 2;
27423 #if HAVE_LSTAT
27424            if (rename ("conftest.f", "conftest.lnk/") == 0)
27425              result |= 4;
27426 #endif
27427            return result;
27428
27429   ;
27430   return 0;
27431 }
27432 _ACEOF
27433 if ac_fn_c_try_run "$LINENO"; then :
27434   gl_cv_func_rename_slash_dst_works=yes
27435 else
27436   gl_cv_func_rename_slash_dst_works=no
27437 fi
27438 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27439   conftest.$ac_objext conftest.beam conftest.$ac_ext
27440 fi
27441
27442     rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
27443
27444 fi
27445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_dst_works" >&5
27446 $as_echo "$gl_cv_func_rename_slash_dst_works" >&6; }
27447   case "$gl_cv_func_rename_slash_dst_works" in
27448     *yes) ;;
27449     *)
27450       REPLACE_RENAME=1
27451
27452 $as_echo "#define RENAME_TRAILING_SLASH_DEST_BUG 1" >>confdefs.h
27453
27454       ;;
27455   esac
27456
27457             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on source" >&5
27458 $as_echo_n "checking whether rename honors trailing slash on source... " >&6; }
27459 if ${gl_cv_func_rename_slash_src_works+:} false; then :
27460   $as_echo_n "(cached) " >&6
27461 else
27462   rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
27463     touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
27464       as_fn_error $? "cannot create temporary files" "$LINENO" 5
27465     # Assume that if we have lstat, we can also check symlinks.
27466     if test $ac_cv_func_lstat = yes; then
27467       ln -s conftest.f conftest.lnk
27468     fi
27469     if test "$cross_compiling" = yes; then :
27470         case "$host_os" in
27471                  # Guess yes on glibc systems.
27472          *-gnu*) gl_cv_func_rename_slash_src_works="guessing yes" ;;
27473                  # If we don't know, assume the worst.
27474          *)      gl_cv_func_rename_slash_src_works="guessing no" ;;
27475        esac
27476
27477 else
27478   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27479 /* end confdefs.h.  */
27480
27481 #        include <stdio.h>
27482 #        include <stdlib.h>
27483
27484 int
27485 main ()
27486 {
27487 int result = 0;
27488            if (rename ("conftest.f1/", "conftest.d3") == 0)
27489              result |= 1;
27490            if (rename ("conftest.d1/", "conftest.d2") != 0)
27491              result |= 2;
27492 #if HAVE_LSTAT
27493            if (rename ("conftest.lnk/", "conftest.f") == 0)
27494              result |= 4;
27495 #endif
27496            return result;
27497
27498   ;
27499   return 0;
27500 }
27501 _ACEOF
27502 if ac_fn_c_try_run "$LINENO"; then :
27503   gl_cv_func_rename_slash_src_works=yes
27504 else
27505   gl_cv_func_rename_slash_src_works=no
27506 fi
27507 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27508   conftest.$ac_objext conftest.beam conftest.$ac_ext
27509 fi
27510
27511     rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
27512
27513 fi
27514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_src_works" >&5
27515 $as_echo "$gl_cv_func_rename_slash_src_works" >&6; }
27516   case "$gl_cv_func_rename_slash_src_works" in
27517     *yes) ;;
27518     *)
27519       REPLACE_RENAME=1
27520
27521 $as_echo "#define RENAME_TRAILING_SLASH_SOURCE_BUG 1" >>confdefs.h
27522
27523       ;;
27524   esac
27525
27526
27527   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages hard links correctly" >&5
27528 $as_echo_n "checking whether rename manages hard links correctly... " >&6; }
27529 if ${gl_cv_func_rename_link_works+:} false; then :
27530   $as_echo_n "(cached) " >&6
27531 else
27532   if test $ac_cv_func_link = yes; then
27533        rm -rf conftest.f conftest.f1
27534        if touch conftest.f && ln conftest.f conftest.f1 &&
27535            set x `ls -i conftest.f conftest.f1` && test "" = ""; then
27536          if test "$cross_compiling" = yes; then :
27537              case "$host_os" in
27538                       # Guess yes on glibc systems.
27539               *-gnu*) gl_cv_func_rename_link_works="guessing yes" ;;
27540                       # If we don't know, assume the worst.
27541               *)      gl_cv_func_rename_link_works="guessing no" ;;
27542             esac
27543
27544 else
27545   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27546 /* end confdefs.h.  */
27547
27548 #             include <stdio.h>
27549 #             include <stdlib.h>
27550 #             include <unistd.h>
27551
27552 int
27553 main ()
27554 {
27555 int result = 0;
27556                 if (rename ("conftest.f", "conftest.f1"))
27557                   result |= 1;
27558                 if (unlink ("conftest.f1"))
27559                   result |= 2;
27560                 if (rename ("conftest.f", "conftest.f"))
27561                   result |= 4;
27562                 if (rename ("conftest.f1", "conftest.f1") == 0)
27563                   result |= 8;
27564                 return result;
27565
27566   ;
27567   return 0;
27568 }
27569 _ACEOF
27570 if ac_fn_c_try_run "$LINENO"; then :
27571   gl_cv_func_rename_link_works=yes
27572 else
27573   gl_cv_func_rename_link_works=no
27574 fi
27575 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27576   conftest.$ac_objext conftest.beam conftest.$ac_ext
27577 fi
27578
27579        else
27580          gl_cv_func_rename_link_works="guessing no"
27581        fi
27582        rm -rf conftest.f conftest.f1
27583      else
27584        gl_cv_func_rename_link_works=yes
27585      fi
27586
27587 fi
27588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_link_works" >&5
27589 $as_echo "$gl_cv_func_rename_link_works" >&6; }
27590   case "$gl_cv_func_rename_link_works" in
27591     *yes) ;;
27592     *)
27593       REPLACE_RENAME=1
27594
27595 $as_echo "#define RENAME_HARD_LINK_BUG 1" >>confdefs.h
27596
27597       ;;
27598   esac
27599
27600           { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages existing destinations correctly" >&5
27601 $as_echo_n "checking whether rename manages existing destinations correctly... " >&6; }
27602 if ${gl_cv_func_rename_dest_works+:} false; then :
27603   $as_echo_n "(cached) " >&6
27604 else
27605   rm -rf conftest.f conftest.d1 conftest.d2
27606     touch conftest.f && mkdir conftest.d1 conftest.d2 ||
27607       as_fn_error $? "cannot create temporary files" "$LINENO" 5
27608     if test "$cross_compiling" = yes; then :
27609         case "$host_os" in
27610                  # Guess yes on glibc systems.
27611          *-gnu*) gl_cv_func_rename_dest_works="guessing yes" ;;
27612                  # If we don't know, assume the worst.
27613          *)      gl_cv_func_rename_dest_works="guessing no" ;;
27614        esac
27615
27616 else
27617   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27618 /* end confdefs.h.  */
27619
27620 #        include <stdio.h>
27621 #        include <stdlib.h>
27622
27623 int
27624 main ()
27625 {
27626 int result = 0;
27627            if (rename ("conftest.d1", "conftest.d2") != 0)
27628              result |= 1;
27629            if (rename ("conftest.d2", "conftest.f") == 0)
27630              result |= 2;
27631            return result;
27632
27633   ;
27634   return 0;
27635 }
27636 _ACEOF
27637 if ac_fn_c_try_run "$LINENO"; then :
27638   gl_cv_func_rename_dest_works=yes
27639 else
27640   gl_cv_func_rename_dest_works=no
27641 fi
27642 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27643   conftest.$ac_objext conftest.beam conftest.$ac_ext
27644 fi
27645
27646     rm -rf conftest.f conftest.d1 conftest.d2
27647
27648 fi
27649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_dest_works" >&5
27650 $as_echo "$gl_cv_func_rename_dest_works" >&6; }
27651   case "$gl_cv_func_rename_dest_works" in
27652     *yes) ;;
27653     *)
27654       REPLACE_RENAME=1
27655
27656 $as_echo "#define RENAME_DEST_EXISTS_BUG 1" >>confdefs.h
27657
27658       ;;
27659   esac
27660
27661   if test $REPLACE_RENAME = 1; then
27662
27663
27664
27665
27666
27667
27668
27669
27670   gl_LIBOBJS="$gl_LIBOBJS rename.$ac_objext"
27671
27672   fi
27673
27674
27675
27676
27677
27678           GNULIB_RENAME=1
27679
27680
27681
27682
27683
27684 $as_echo "#define GNULIB_TEST_RENAME 1" >>confdefs.h
27685
27686
27687
27688
27689
27690
27691
27692
27693
27694   if test $ac_cv_func_renameat = no; then
27695     HAVE_RENAMEAT=0
27696   elif test $REPLACE_RENAME = 1; then
27697         REPLACE_RENAMEAT=1
27698   fi
27699
27700   if test $HAVE_RENAMEAT = 0 || test $REPLACE_RENAMEAT = 1; then
27701
27702
27703
27704
27705
27706
27707
27708
27709   gl_LIBOBJS="$gl_LIBOBJS renameat.$ac_objext"
27710
27711   fi
27712   if test $HAVE_RENAMEAT = 0; then
27713
27714
27715
27716
27717
27718
27719
27720
27721   gl_LIBOBJS="$gl_LIBOBJS at-func2.$ac_objext"
27722
27723   fi
27724
27725
27726
27727
27728
27729           GNULIB_RENAMEAT=1
27730
27731
27732
27733
27734
27735 $as_echo "#define GNULIB_TEST_RENAMEAT 1" >>confdefs.h
27736
27737
27738
27739
27740
27741
27742   for ac_func in rewinddir
27743 do :
27744   ac_fn_c_check_func "$LINENO" "rewinddir" "ac_cv_func_rewinddir"
27745 if test "x$ac_cv_func_rewinddir" = xyes; then :
27746   cat >>confdefs.h <<_ACEOF
27747 #define HAVE_REWINDDIR 1
27748 _ACEOF
27749
27750 fi
27751 done
27752
27753   if test $ac_cv_func_rewinddir = no; then
27754     HAVE_REWINDDIR=0
27755   fi
27756
27757   if test $HAVE_REWINDDIR = 0; then
27758
27759
27760
27761
27762
27763
27764
27765
27766   gl_LIBOBJS="$gl_LIBOBJS rewinddir.$ac_objext"
27767
27768   fi
27769
27770
27771
27772
27773
27774           GNULIB_REWINDDIR=1
27775
27776
27777
27778
27779
27780 $as_echo "#define GNULIB_TEST_REWINDDIR 1" >>confdefs.h
27781
27782
27783
27784
27785
27786
27787   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rmdir works" >&5
27788 $as_echo_n "checking whether rmdir works... " >&6; }
27789 if ${gl_cv_func_rmdir_works+:} false; then :
27790   $as_echo_n "(cached) " >&6
27791 else
27792   mkdir conftest.dir
27793      touch conftest.file
27794      if test "$cross_compiling" = yes; then :
27795   case "$host_os" in
27796                   # Guess yes on glibc systems.
27797           *-gnu*) gl_cv_func_rmdir_works="guessing yes" ;;
27798                   # If we don't know, assume the worst.
27799           *)      gl_cv_func_rmdir_works="guessing no" ;;
27800         esac
27801
27802 else
27803   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27804 /* end confdefs.h.  */
27805 #include <stdio.h>
27806            #include <errno.h>
27807            #if HAVE_UNISTD_H
27808            # include <unistd.h>
27809            #else /* on Windows with MSVC */
27810            # include <direct.h>
27811            #endif
27812
27813 int
27814 main ()
27815 {
27816 int result = 0;
27817       if (!rmdir ("conftest.file/"))
27818         result |= 1;
27819       else if (errno != ENOTDIR)
27820         result |= 2;
27821       if (!rmdir ("conftest.dir/./"))
27822         result |= 4;
27823       return result;
27824
27825   ;
27826   return 0;
27827 }
27828 _ACEOF
27829 if ac_fn_c_try_run "$LINENO"; then :
27830   gl_cv_func_rmdir_works=yes
27831 else
27832   gl_cv_func_rmdir_works=no
27833 fi
27834 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27835   conftest.$ac_objext conftest.beam conftest.$ac_ext
27836 fi
27837
27838      rm -rf conftest.dir conftest.file
27839 fi
27840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rmdir_works" >&5
27841 $as_echo "$gl_cv_func_rmdir_works" >&6; }
27842   case "$gl_cv_func_rmdir_works" in
27843     *yes) ;;
27844     *)
27845       REPLACE_RMDIR=1
27846       ;;
27847   esac
27848
27849   if test $REPLACE_RMDIR = 1; then
27850
27851
27852
27853
27854
27855
27856
27857
27858   gl_LIBOBJS="$gl_LIBOBJS rmdir.$ac_objext"
27859
27860   fi
27861
27862
27863
27864
27865
27866           GNULIB_RMDIR=1
27867
27868
27869
27870
27871
27872 $as_echo "#define GNULIB_TEST_RMDIR 1" >>confdefs.h
27873
27874
27875
27876
27877
27878
27879
27880   for ac_func in rpmatch
27881 do :
27882   ac_fn_c_check_func "$LINENO" "rpmatch" "ac_cv_func_rpmatch"
27883 if test "x$ac_cv_func_rpmatch" = xyes; then :
27884   cat >>confdefs.h <<_ACEOF
27885 #define HAVE_RPMATCH 1
27886 _ACEOF
27887
27888 fi
27889 done
27890
27891   if test $ac_cv_func_rpmatch = no; then
27892     HAVE_RPMATCH=0
27893   fi
27894
27895   if test $HAVE_RPMATCH = 0; then
27896
27897
27898
27899
27900
27901
27902
27903
27904   gl_LIBOBJS="$gl_LIBOBJS rpmatch.$ac_objext"
27905
27906
27907   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and YESEXPR" >&5
27908 $as_echo_n "checking for nl_langinfo and YESEXPR... " >&6; }
27909 if ${gl_cv_langinfo_yesexpr+:} false; then :
27910   $as_echo_n "(cached) " >&6
27911 else
27912   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27913 /* end confdefs.h.  */
27914 #include <langinfo.h>
27915 int
27916 main ()
27917 {
27918 char* cs = nl_langinfo(YESEXPR); return !cs;
27919   ;
27920   return 0;
27921 }
27922 _ACEOF
27923 if ac_fn_c_try_link "$LINENO"; then :
27924   gl_cv_langinfo_yesexpr=yes
27925 else
27926   gl_cv_langinfo_yesexpr=no
27927 fi
27928 rm -f core conftest.err conftest.$ac_objext \
27929     conftest$ac_exeext conftest.$ac_ext
27930
27931 fi
27932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_langinfo_yesexpr" >&5
27933 $as_echo "$gl_cv_langinfo_yesexpr" >&6; }
27934   if test $gl_cv_langinfo_yesexpr = yes; then
27935
27936 $as_echo "#define HAVE_LANGINFO_YESEXPR 1" >>confdefs.h
27937
27938   fi
27939
27940   fi
27941
27942
27943
27944
27945
27946           GNULIB_RPMATCH=1
27947
27948
27949
27950
27951
27952 $as_echo "#define GNULIB_TEST_RPMATCH 1" >>confdefs.h
27953
27954
27955
27956
27957
27958
27959
27960
27961
27962
27963
27964
27965
27966
27967
27968   :
27969
27970
27971
27972
27973
27974
27975   if test $ac_cv_func_secure_getenv = no; then
27976     HAVE_SECURE_GETENV=0
27977   fi
27978
27979   if test $HAVE_SECURE_GETENV = 0; then
27980
27981
27982
27983
27984
27985
27986
27987
27988   gl_LIBOBJS="$gl_LIBOBJS secure_getenv.$ac_objext"
27989
27990
27991   for ac_func in __secure_getenv
27992 do :
27993   ac_fn_c_check_func "$LINENO" "__secure_getenv" "ac_cv_func___secure_getenv"
27994 if test "x$ac_cv_func___secure_getenv" = xyes; then :
27995   cat >>confdefs.h <<_ACEOF
27996 #define HAVE___SECURE_GETENV 1
27997 _ACEOF
27998
27999 fi
28000 done
28001
28002   if test $ac_cv_func___secure_getenv = no; then
28003     for ac_func in issetugid
28004 do :
28005   ac_fn_c_check_func "$LINENO" "issetugid" "ac_cv_func_issetugid"
28006 if test "x$ac_cv_func_issetugid" = xyes; then :
28007   cat >>confdefs.h <<_ACEOF
28008 #define HAVE_ISSETUGID 1
28009 _ACEOF
28010
28011 fi
28012 done
28013
28014   fi
28015
28016   fi
28017
28018
28019
28020
28021
28022           GNULIB_SECURE_GETENV=1
28023
28024
28025
28026
28027
28028 $as_echo "#define GNULIB_TEST_SECURE_GETENV 1" >>confdefs.h
28029
28030
28031
28032   for ac_header in selinux/flask.h
28033 do :
28034   ac_fn_c_check_header_mongrel "$LINENO" "selinux/flask.h" "ac_cv_header_selinux_flask_h" "$ac_includes_default"
28035 if test "x$ac_cv_header_selinux_flask_h" = xyes; then :
28036   cat >>confdefs.h <<_ACEOF
28037 #define HAVE_SELINUX_FLASK_H 1
28038 _ACEOF
28039
28040 fi
28041
28042 done
28043
28044
28045
28046
28047
28048
28049
28050
28051
28052   gl_LIBOBJS="$gl_LIBOBJS selinux-at.$ac_objext"
28053
28054
28055
28056   if test "$with_selinux" != no; then
28057     for ac_header in selinux/selinux.h
28058 do :
28059   ac_fn_c_check_header_mongrel "$LINENO" "selinux/selinux.h" "ac_cv_header_selinux_selinux_h" "$ac_includes_default"
28060 if test "x$ac_cv_header_selinux_selinux_h" = xyes; then :
28061   cat >>confdefs.h <<_ACEOF
28062 #define HAVE_SELINUX_SELINUX_H 1
28063 _ACEOF
28064
28065 fi
28066
28067 done
28068
28069
28070     if test "$ac_cv_header_selinux_selinux_h" = yes; then
28071       # We do have <selinux/selinux.h>, so do compile getfilecon.c
28072       # and arrange to use its wrappers.
28073
28074
28075
28076
28077
28078
28079
28080
28081
28082      if test $gl_cv_have_include_next = yes; then
28083        gl_cv_next_selinux_selinux_h='<'selinux/selinux.h'>'
28084      else
28085        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <selinux/selinux.h>" >&5
28086 $as_echo_n "checking absolute name of <selinux/selinux.h>... " >&6; }
28087 if ${gl_cv_next_selinux_selinux_h+:} false; then :
28088   $as_echo_n "(cached) " >&6
28089 else
28090
28091              if test $ac_cv_header_selinux_selinux_h = yes; then
28092
28093
28094
28095
28096   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28097 /* end confdefs.h.  */
28098 #include <selinux/selinux.h>
28099 _ACEOF
28100                 case "$host_os" in
28101     aix*) gl_absname_cpp="$ac_cpp -C" ;;
28102     *)    gl_absname_cpp="$ac_cpp" ;;
28103   esac
28104
28105   case "$host_os" in
28106     mingw*)
28107                                           gl_dirsep_regex='[/\\]'
28108       ;;
28109     *)
28110       gl_dirsep_regex='\/'
28111       ;;
28112   esac
28113       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
28114   gl_header_literal_regex=`echo 'selinux/selinux.h' \
28115                            | sed -e "$gl_make_literal_regex_sed"`
28116   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
28117       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
28118       s|^/[^/]|//&|
28119       p
28120       q
28121     }'
28122
28123         gl_cv_absolute_selinux_selinux_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
28124   sed -n "$gl_absolute_header_sed"`
28125
28126            gl_header=$gl_cv_absolute_selinux_selinux_h
28127            gl_cv_next_selinux_selinux_h='"'$gl_header'"'
28128           else
28129                gl_cv_next_selinux_selinux_h='<'selinux/selinux.h'>'
28130              fi
28131
28132
28133 fi
28134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_selinux_selinux_h" >&5
28135 $as_echo "$gl_cv_next_selinux_selinux_h" >&6; }
28136      fi
28137      NEXT_SELINUX_SELINUX_H=$gl_cv_next_selinux_selinux_h
28138
28139      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
28140        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
28141        gl_next_as_first_directive='<'selinux/selinux.h'>'
28142      else
28143        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
28144        gl_next_as_first_directive=$gl_cv_next_selinux_selinux_h
28145      fi
28146      NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H=$gl_next_as_first_directive
28147
28148
28149
28150
28151
28152 $as_echo "#define getfilecon rpl_getfilecon" >>confdefs.h
28153
28154
28155 $as_echo "#define lgetfilecon rpl_lgetfilecon" >>confdefs.h
28156
28157
28158 $as_echo "#define fgetfilecon rpl_fgetfilecon" >>confdefs.h
28159
28160     fi
28161
28162     case "$ac_cv_search_setfilecon:$ac_cv_header_selinux_selinux_h" in
28163       no:*) # already warned
28164         ;;
28165       *:no)
28166         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libselinux was found but selinux/selinux.h is missing." >&5
28167 $as_echo "$as_me: WARNING: libselinux was found but selinux/selinux.h is missing." >&2;}
28168         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GNU tar will be compiled without SELinux support." >&5
28169 $as_echo "$as_me: WARNING: GNU tar will be compiled without SELinux support." >&2;}
28170     esac
28171   else
28172     # Do as if <selinux/selinux.h> does not exist, even if
28173     # AC_CHECK_HEADERS_ONCE has already determined that it exists.
28174     $as_echo "#define HAVE_SELINUX_SELINUX_H 0" >>confdefs.h
28175
28176   fi
28177
28178
28179
28180   if test "$with_selinux" != no; then
28181     for ac_header in selinux/context.h
28182 do :
28183   ac_fn_c_check_header_mongrel "$LINENO" "selinux/context.h" "ac_cv_header_selinux_context_h" "$ac_includes_default"
28184 if test "x$ac_cv_header_selinux_context_h" = xyes; then :
28185   cat >>confdefs.h <<_ACEOF
28186 #define HAVE_SELINUX_CONTEXT_H 1
28187 _ACEOF
28188  SELINUX_CONTEXT_H=
28189 else
28190   SELINUX_CONTEXT_H=selinux/context.h
28191 fi
28192
28193 done
28194
28195   else
28196     SELINUX_CONTEXT_H=selinux/context.h
28197   fi
28198
28199    if test -n "$SELINUX_CONTEXT_H"; then
28200   GL_GENERATE_SELINUX_CONTEXT_H_TRUE=
28201   GL_GENERATE_SELINUX_CONTEXT_H_FALSE='#'
28202 else
28203   GL_GENERATE_SELINUX_CONTEXT_H_TRUE='#'
28204   GL_GENERATE_SELINUX_CONTEXT_H_FALSE=
28205 fi
28206
28207
28208   if test "$with_selinux" != no && test "$ac_cv_header_selinux_selinux_h" = yes; then
28209
28210
28211
28212
28213
28214
28215
28216
28217   gl_LIBOBJS="$gl_LIBOBJS getfilecon.$ac_objext"
28218
28219   fi
28220
28221
28222      if test $ac_cv_func_setenv = no; then
28223     HAVE_SETENV=0
28224   else
28225     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setenv validates arguments" >&5
28226 $as_echo_n "checking whether setenv validates arguments... " >&6; }
28227 if ${gl_cv_func_setenv_works+:} false; then :
28228   $as_echo_n "(cached) " >&6
28229 else
28230   if test "$cross_compiling" = yes; then :
28231   case "$host_os" in
28232                  # Guess yes on glibc systems.
28233          *-gnu*) gl_cv_func_setenv_works="guessing yes" ;;
28234                  # If we don't know, assume the worst.
28235          *)      gl_cv_func_setenv_works="guessing no" ;;
28236        esac
28237
28238 else
28239   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28240 /* end confdefs.h.  */
28241
28242        #include <stdlib.h>
28243        #include <errno.h>
28244        #include <string.h>
28245
28246 int
28247 main ()
28248 {
28249
28250        int result = 0;
28251        {
28252          if (setenv ("", "", 0) != -1)
28253            result |= 1;
28254          else if (errno != EINVAL)
28255            result |= 2;
28256        }
28257        {
28258          if (setenv ("a", "=", 1) != 0)
28259            result |= 4;
28260          else if (strcmp (getenv ("a"), "=") != 0)
28261            result |= 8;
28262        }
28263        return result;
28264
28265   ;
28266   return 0;
28267 }
28268 _ACEOF
28269 if ac_fn_c_try_run "$LINENO"; then :
28270   gl_cv_func_setenv_works=yes
28271 else
28272   gl_cv_func_setenv_works=no
28273 fi
28274 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28275   conftest.$ac_objext conftest.beam conftest.$ac_ext
28276 fi
28277
28278 fi
28279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setenv_works" >&5
28280 $as_echo "$gl_cv_func_setenv_works" >&6; }
28281     case "$gl_cv_func_setenv_works" in
28282       *yes) ;;
28283       *)
28284         REPLACE_SETENV=1
28285         ;;
28286     esac
28287   fi
28288
28289   if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then
28290
28291
28292
28293
28294
28295
28296
28297
28298   gl_LIBOBJS="$gl_LIBOBJS setenv.$ac_objext"
28299
28300   fi
28301
28302
28303
28304
28305
28306           GNULIB_SETENV=1
28307
28308
28309
28310
28311
28312 $as_echo "#define GNULIB_TEST_SETENV 1" >>confdefs.h
28313
28314
28315
28316
28317
28318
28319
28320
28321
28322
28323
28324
28325
28326
28327      if test $gl_cv_have_include_next = yes; then
28328        gl_cv_next_signal_h='<'signal.h'>'
28329      else
28330        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
28331 $as_echo_n "checking absolute name of <signal.h>... " >&6; }
28332 if ${gl_cv_next_signal_h+:} false; then :
28333   $as_echo_n "(cached) " >&6
28334 else
28335
28336
28337
28338   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28339 /* end confdefs.h.  */
28340 #include <signal.h>
28341 _ACEOF
28342                 case "$host_os" in
28343     aix*) gl_absname_cpp="$ac_cpp -C" ;;
28344     *)    gl_absname_cpp="$ac_cpp" ;;
28345   esac
28346
28347   case "$host_os" in
28348     mingw*)
28349                                           gl_dirsep_regex='[/\\]'
28350       ;;
28351     *)
28352       gl_dirsep_regex='\/'
28353       ;;
28354   esac
28355       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
28356   gl_header_literal_regex=`echo 'signal.h' \
28357                            | sed -e "$gl_make_literal_regex_sed"`
28358   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
28359       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
28360       s|^/[^/]|//&|
28361       p
28362       q
28363     }'
28364
28365         gl_cv_absolute_signal_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
28366   sed -n "$gl_absolute_header_sed"`
28367
28368            gl_header=$gl_cv_absolute_signal_h
28369            gl_cv_next_signal_h='"'$gl_header'"'
28370
28371
28372 fi
28373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
28374 $as_echo "$gl_cv_next_signal_h" >&6; }
28375      fi
28376      NEXT_SIGNAL_H=$gl_cv_next_signal_h
28377
28378      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
28379        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
28380        gl_next_as_first_directive='<'signal.h'>'
28381      else
28382        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
28383        gl_next_as_first_directive=$gl_cv_next_signal_h
28384      fi
28385      NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
28386
28387
28388
28389
28390
28391 # AIX declares sig_atomic_t to already include volatile, and C89 compilers
28392 # then choke on 'volatile sig_atomic_t'.  C99 requires that it compile.
28393   ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
28394 #include <signal.h>
28395
28396 "
28397 if test "x$ac_cv_type_volatile_sig_atomic_t" = xyes; then :
28398
28399 else
28400   HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
28401 fi
28402
28403
28404
28405
28406
28407
28408
28409   ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
28410 #include <signal.h>
28411
28412 "
28413 if test "x$ac_cv_type_sighandler_t" = xyes; then :
28414
28415 else
28416   HAVE_SIGHANDLER_T=0
28417 fi
28418
28419
28420
28421     for gl_func in pthread_sigmask sigaction     sigaddset sigdelset sigemptyset sigfillset sigismember     sigpending sigprocmask; do
28422     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
28423     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
28424 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
28425 if eval \${$as_gl_Symbol+:} false; then :
28426   $as_echo_n "(cached) " >&6
28427 else
28428   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28429 /* end confdefs.h.  */
28430 #include <signal.h>
28431
28432 int
28433 main ()
28434 {
28435 #undef $gl_func
28436   (void) $gl_func;
28437   ;
28438   return 0;
28439 }
28440 _ACEOF
28441 if ac_fn_c_try_compile "$LINENO"; then :
28442   eval "$as_gl_Symbol=yes"
28443 else
28444   eval "$as_gl_Symbol=no"
28445 fi
28446 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28447 fi
28448 eval ac_res=\$$as_gl_Symbol
28449                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
28450 $as_echo "$ac_res" >&6; }
28451     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
28452   cat >>confdefs.h <<_ACEOF
28453 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
28454 _ACEOF
28455
28456                      eval ac_cv_have_decl_$gl_func=yes
28457 fi
28458       done
28459
28460
28461
28462   for ac_header in stdint.h
28463 do :
28464   ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
28465 if test "x$ac_cv_header_stdint_h" = xyes; then :
28466   cat >>confdefs.h <<_ACEOF
28467 #define HAVE_STDINT_H 1
28468 _ACEOF
28469
28470 fi
28471
28472 done
28473
28474     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIZE_MAX" >&5
28475 $as_echo_n "checking for SIZE_MAX... " >&6; }
28476 if ${gl_cv_size_max+:} false; then :
28477   $as_echo_n "(cached) " >&6
28478 else
28479
28480     gl_cv_size_max=
28481     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28482 /* end confdefs.h.  */
28483
28484 #include <limits.h>
28485 #if HAVE_STDINT_H
28486 #include <stdint.h>
28487 #endif
28488 #ifdef SIZE_MAX
28489 Found it
28490 #endif
28491
28492 _ACEOF
28493 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28494   $EGREP "Found it" >/dev/null 2>&1; then :
28495   gl_cv_size_max=yes
28496 fi
28497 rm -f conftest*
28498
28499     if test -z "$gl_cv_size_max"; then
28500                         if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) * CHAR_BIT - 1" "size_t_bits_minus_1"        "#include <stddef.h>
28501 #include <limits.h>"; then :
28502
28503 else
28504   size_t_bits_minus_1=
28505 fi
28506
28507       if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) <= sizeof (unsigned int)" "fits_in_uint"        "#include <stddef.h>"; then :
28508
28509 else
28510   fits_in_uint=
28511 fi
28512
28513       if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then
28514         if test $fits_in_uint = 1; then
28515                               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28516 /* end confdefs.h.  */
28517 #include <stddef.h>
28518                  extern size_t foo;
28519                  extern unsigned long foo;
28520
28521 int
28522 main ()
28523 {
28524
28525   ;
28526   return 0;
28527 }
28528 _ACEOF
28529 if ac_fn_c_try_compile "$LINENO"; then :
28530   fits_in_uint=0
28531 fi
28532 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28533         fi
28534                                 if test $fits_in_uint = 1; then
28535           gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)"
28536         else
28537           gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)"
28538         fi
28539       else
28540                 gl_cv_size_max='((size_t)~(size_t)0)'
28541       fi
28542     fi
28543
28544 fi
28545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_size_max" >&5
28546 $as_echo "$gl_cv_size_max" >&6; }
28547   if test "$gl_cv_size_max" != yes; then
28548
28549 cat >>confdefs.h <<_ACEOF
28550 #define SIZE_MAX $gl_cv_size_max
28551 _ACEOF
28552
28553   fi
28554
28555
28556
28557
28558                ac_fn_c_check_decl "$LINENO" "sleep" "ac_cv_have_decl_sleep" "#include <unistd.h>
28559 "
28560 if test "x$ac_cv_have_decl_sleep" = xyes; then :
28561   ac_have_decl=1
28562 else
28563   ac_have_decl=0
28564 fi
28565
28566 cat >>confdefs.h <<_ACEOF
28567 #define HAVE_DECL_SLEEP $ac_have_decl
28568 _ACEOF
28569
28570
28571   if test $ac_cv_have_decl_sleep != yes; then
28572     HAVE_SLEEP=0
28573   else
28574         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working sleep" >&5
28575 $as_echo_n "checking for working sleep... " >&6; }
28576 if ${gl_cv_func_sleep_works+:} false; then :
28577   $as_echo_n "(cached) " >&6
28578 else
28579   if test "$cross_compiling" = yes; then :
28580   case "$host_os" in
28581                  # Guess yes on glibc systems.
28582          *-gnu*) gl_cv_func_sleep_works="guessing yes" ;;
28583                  # If we don't know, assume the worst.
28584          *)      gl_cv_func_sleep_works="guessing no" ;;
28585        esac
28586
28587 else
28588   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28589 /* end confdefs.h.  */
28590
28591 #include <errno.h>
28592 #include <unistd.h>
28593 #include <signal.h>
28594 static void
28595 handle_alarm (int sig)
28596 {
28597   if (sig != SIGALRM)
28598     _exit (2);
28599 }
28600
28601 int
28602 main ()
28603 {
28604
28605     /* Failure to compile this test due to missing alarm is okay,
28606        since all such platforms (mingw) also lack sleep.  */
28607     unsigned int pentecost = 50 * 24 * 60 * 60; /* 50 days.  */
28608     unsigned int remaining;
28609     signal (SIGALRM, handle_alarm);
28610     alarm (1);
28611     remaining = sleep (pentecost);
28612     if (remaining > pentecost)
28613       return 3;
28614     if (remaining <= pentecost - 10)
28615       return 4;
28616     return 0;
28617
28618   ;
28619   return 0;
28620 }
28621 _ACEOF
28622 if ac_fn_c_try_run "$LINENO"; then :
28623   gl_cv_func_sleep_works=yes
28624 else
28625   gl_cv_func_sleep_works=no
28626 fi
28627 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28628   conftest.$ac_objext conftest.beam conftest.$ac_ext
28629 fi
28630
28631 fi
28632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_sleep_works" >&5
28633 $as_echo "$gl_cv_func_sleep_works" >&6; }
28634     case "$gl_cv_func_sleep_works" in
28635       *yes) ;;
28636       *)
28637         REPLACE_SLEEP=1
28638         ;;
28639     esac
28640   fi
28641
28642   if test $HAVE_SLEEP = 0 || test $REPLACE_SLEEP = 1; then
28643
28644
28645
28646
28647
28648
28649
28650
28651   gl_LIBOBJS="$gl_LIBOBJS sleep.$ac_objext"
28652
28653   fi
28654
28655
28656
28657
28658
28659           GNULIB_SLEEP=1
28660
28661
28662
28663
28664
28665 $as_echo "#define GNULIB_TEST_SLEEP 1" >>confdefs.h
28666
28667
28668
28669
28670
28671   gl_cv_func_snprintf_usable=no
28672   for ac_func in snprintf
28673 do :
28674   ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
28675 if test "x$ac_cv_func_snprintf" = xyes; then :
28676   cat >>confdefs.h <<_ACEOF
28677 #define HAVE_SNPRINTF 1
28678 _ACEOF
28679
28680 fi
28681 done
28682
28683   if test $ac_cv_func_snprintf = yes; then
28684
28685
28686
28687   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf respects a size of 1" >&5
28688 $as_echo_n "checking whether snprintf respects a size of 1... " >&6; }
28689 if ${gl_cv_func_snprintf_size1+:} false; then :
28690   $as_echo_n "(cached) " >&6
28691 else
28692
28693       if test "$cross_compiling" = yes; then :
28694   gl_cv_func_snprintf_size1="guessing yes"
28695 else
28696   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28697 /* end confdefs.h.  */
28698
28699 #include <stdio.h>
28700 #if HAVE_SNPRINTF
28701 # define my_snprintf snprintf
28702 #else
28703 # include <stdarg.h>
28704 static int my_snprintf (char *buf, int size, const char *format, ...)
28705 {
28706   va_list args;
28707   int ret;
28708   va_start (args, format);
28709   ret = vsnprintf (buf, size, format, args);
28710   va_end (args);
28711   return ret;
28712 }
28713 #endif
28714 int main()
28715 {
28716   static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
28717   my_snprintf (buf, 1, "%d", 12345);
28718   return buf[1] != 'E';
28719 }
28720 _ACEOF
28721 if ac_fn_c_try_run "$LINENO"; then :
28722   gl_cv_func_snprintf_size1=yes
28723 else
28724   gl_cv_func_snprintf_size1=no
28725 fi
28726 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28727   conftest.$ac_objext conftest.beam conftest.$ac_ext
28728 fi
28729
28730
28731 fi
28732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_size1" >&5
28733 $as_echo "$gl_cv_func_snprintf_size1" >&6; }
28734
28735     case "$gl_cv_func_snprintf_size1" in
28736       *yes)
28737
28738         case "$gl_cv_func_snprintf_retval_c99" in
28739           *yes)
28740
28741
28742      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports POSIX/XSI format strings with positions" >&5
28743 $as_echo_n "checking whether printf supports POSIX/XSI format strings with positions... " >&6; }
28744 if ${gl_cv_func_printf_positions+:} false; then :
28745   $as_echo_n "(cached) " >&6
28746 else
28747
28748       if test "$cross_compiling" = yes; then :
28749
28750          case "$host_os" in
28751            netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*)
28752                          gl_cv_func_printf_positions="guessing no";;
28753            beos*)        gl_cv_func_printf_positions="guessing no";;
28754            mingw* | pw*) gl_cv_func_printf_positions="guessing no";;
28755            *)            gl_cv_func_printf_positions="guessing yes";;
28756          esac
28757
28758 else
28759   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28760 /* end confdefs.h.  */
28761
28762 #include <stdio.h>
28763 #include <string.h>
28764 /* The string "%2$d %1$d", with dollar characters protected from the shell's
28765    dollar expansion (possibly an autoconf bug).  */
28766 static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
28767 static char buf[100];
28768 int main ()
28769 {
28770   sprintf (buf, format, 33, 55);
28771   return (strcmp (buf, "55 33") != 0);
28772 }
28773 _ACEOF
28774 if ac_fn_c_try_run "$LINENO"; then :
28775   gl_cv_func_printf_positions=yes
28776 else
28777   gl_cv_func_printf_positions=no
28778 fi
28779 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28780   conftest.$ac_objext conftest.beam conftest.$ac_ext
28781 fi
28782
28783
28784 fi
28785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_positions" >&5
28786 $as_echo "$gl_cv_func_printf_positions" >&6; }
28787
28788             case "$gl_cv_func_printf_positions" in
28789               *yes)
28790                 gl_cv_func_snprintf_usable=yes
28791                 ;;
28792             esac
28793             ;;
28794         esac
28795         ;;
28796     esac
28797   fi
28798   if test $gl_cv_func_snprintf_usable = no; then
28799
28800
28801
28802
28803
28804
28805
28806
28807
28808
28809   gl_LIBOBJS="$gl_LIBOBJS snprintf.$ac_objext"
28810
28811   if test $ac_cv_func_snprintf = yes; then
28812     REPLACE_SNPRINTF=1
28813   fi
28814   :
28815
28816   fi
28817
28818   if test $ac_cv_have_decl_snprintf = no; then
28819     HAVE_DECL_SNPRINTF=0
28820   fi
28821
28822
28823
28824
28825
28826
28827           GNULIB_SNPRINTF=1
28828
28829
28830
28831
28832
28833 $as_echo "#define GNULIB_TEST_SNPRINTF 1" >>confdefs.h
28834
28835
28836
28837
28838
28839 cat >>confdefs.h <<_ACEOF
28840 #define GNULIB_SNPRINTF 1
28841 _ACEOF
28842
28843
28844
28845   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
28846 $as_echo_n "checking for ssize_t... " >&6; }
28847 if ${gt_cv_ssize_t+:} false; then :
28848   $as_echo_n "(cached) " >&6
28849 else
28850   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28851 /* end confdefs.h.  */
28852 #include <sys/types.h>
28853 int
28854 main ()
28855 {
28856 int x = sizeof (ssize_t *) + sizeof (ssize_t);
28857             return !x;
28858   ;
28859   return 0;
28860 }
28861 _ACEOF
28862 if ac_fn_c_try_compile "$LINENO"; then :
28863   gt_cv_ssize_t=yes
28864 else
28865   gt_cv_ssize_t=no
28866 fi
28867 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28868 fi
28869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
28870 $as_echo "$gt_cv_ssize_t" >&6; }
28871   if test $gt_cv_ssize_t = no; then
28872
28873 $as_echo "#define ssize_t int" >>confdefs.h
28874
28875   fi
28876
28877
28878
28879
28880     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5
28881 $as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; }
28882 if ${gl_cv_func_stat_dir_slash+:} false; then :
28883   $as_echo_n "(cached) " >&6
28884 else
28885   if test "$cross_compiling" = yes; then :
28886   case $host_os in
28887             mingw*) gl_cv_func_stat_dir_slash="guessing no";;
28888             *) gl_cv_func_stat_dir_slash="guessing yes";;
28889           esac
28890 else
28891   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28892 /* end confdefs.h.  */
28893 #include <sys/stat.h>
28894
28895 int
28896 main ()
28897 {
28898 struct stat st; return stat (".", &st) != stat ("./", &st);
28899   ;
28900   return 0;
28901 }
28902 _ACEOF
28903 if ac_fn_c_try_run "$LINENO"; then :
28904   gl_cv_func_stat_dir_slash=yes
28905 else
28906   gl_cv_func_stat_dir_slash=no
28907 fi
28908 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28909   conftest.$ac_objext conftest.beam conftest.$ac_ext
28910 fi
28911
28912 fi
28913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5
28914 $as_echo "$gl_cv_func_stat_dir_slash" >&6; }
28915         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
28916 $as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
28917 if ${gl_cv_func_stat_file_slash+:} false; then :
28918   $as_echo_n "(cached) " >&6
28919 else
28920   touch conftest.tmp
28921        # Assume that if we have lstat, we can also check symlinks.
28922        if test $ac_cv_func_lstat = yes; then
28923          ln -s conftest.tmp conftest.lnk
28924        fi
28925        if test "$cross_compiling" = yes; then :
28926   case "$host_os" in
28927                     # Guess yes on glibc systems.
28928             *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
28929                     # If we don't know, assume the worst.
28930             *)      gl_cv_func_stat_file_slash="guessing no" ;;
28931           esac
28932
28933 else
28934   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28935 /* end confdefs.h.  */
28936 #include <sys/stat.h>
28937
28938 int
28939 main ()
28940 {
28941 int result = 0;
28942       struct stat st;
28943       if (!stat ("conftest.tmp/", &st))
28944         result |= 1;
28945 #if HAVE_LSTAT
28946       if (!stat ("conftest.lnk/", &st))
28947         result |= 2;
28948 #endif
28949       return result;
28950
28951   ;
28952   return 0;
28953 }
28954 _ACEOF
28955 if ac_fn_c_try_run "$LINENO"; then :
28956   gl_cv_func_stat_file_slash=yes
28957 else
28958   gl_cv_func_stat_file_slash=no
28959 fi
28960 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28961   conftest.$ac_objext conftest.beam conftest.$ac_ext
28962 fi
28963
28964        rm -f conftest.tmp conftest.lnk
28965 fi
28966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
28967 $as_echo "$gl_cv_func_stat_file_slash" >&6; }
28968   case $gl_cv_func_stat_dir_slash in
28969     *no) REPLACE_STAT=1
28970
28971 $as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h
28972 ;;
28973   esac
28974   case $gl_cv_func_stat_file_slash in
28975     *no) REPLACE_STAT=1
28976
28977 $as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
28978 ;;
28979   esac
28980
28981   if test $REPLACE_STAT = 1; then
28982
28983
28984
28985
28986
28987
28988
28989
28990   gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
28991
28992     :
28993   fi
28994
28995
28996
28997
28998
28999           GNULIB_STAT=1
29000
29001
29002
29003
29004
29005 $as_echo "#define GNULIB_TEST_STAT 1" >>confdefs.h
29006
29007
29008
29009
29010
29011
29012
29013   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>
29014      #include <sys/stat.h>
29015 "
29016 if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes; then :
29017
29018 cat >>confdefs.h <<_ACEOF
29019 #define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1
29020 _ACEOF
29021
29022 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
29023 $as_echo_n "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
29024 if ${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+:} false; then :
29025   $as_echo_n "(cached) " >&6
29026 else
29027   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29028 /* end confdefs.h.  */
29029
29030             #include <sys/types.h>
29031             #include <sys/stat.h>
29032             #if HAVE_SYS_TIME_H
29033             # include <sys/time.h>
29034             #endif
29035             #include <time.h>
29036             struct timespec ts;
29037             struct stat st;
29038
29039 int
29040 main ()
29041 {
29042
29043             st.st_atim = ts;
29044
29045   ;
29046   return 0;
29047 }
29048 _ACEOF
29049 if ac_fn_c_try_compile "$LINENO"; then :
29050   ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
29051 else
29052   ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no
29053 fi
29054 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29055 fi
29056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
29057 $as_echo "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
29058      if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
29059
29060 $as_echo "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
29061
29062      fi
29063 else
29064   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>
29065         #include <sys/stat.h>
29066 "
29067 if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = xyes; then :
29068
29069 cat >>confdefs.h <<_ACEOF
29070 #define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1
29071 _ACEOF
29072
29073
29074 else
29075   ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
29076            #include <sys/stat.h>
29077 "
29078 if test "x$ac_cv_member_struct_stat_st_atimensec" = xyes; then :
29079
29080 cat >>confdefs.h <<_ACEOF
29081 #define HAVE_STRUCT_STAT_ST_ATIMENSEC 1
29082 _ACEOF
29083
29084
29085 else
29086   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>
29087               #include <sys/stat.h>
29088 "
29089 if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = xyes; then :
29090
29091 cat >>confdefs.h <<_ACEOF
29092 #define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1
29093 _ACEOF
29094
29095
29096 fi
29097
29098 fi
29099
29100 fi
29101
29102 fi
29103
29104
29105
29106
29107
29108   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>
29109      #include <sys/stat.h>
29110 "
29111 if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = xyes; then :
29112
29113 cat >>confdefs.h <<_ACEOF
29114 #define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1
29115 _ACEOF
29116
29117
29118 else
29119   ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h>
29120         #include <sys/stat.h>
29121 "
29122 if test "x$ac_cv_member_struct_stat_st_birthtimensec" = xyes; then :
29123
29124 cat >>confdefs.h <<_ACEOF
29125 #define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1
29126 _ACEOF
29127
29128
29129 else
29130   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>
29131           #include <sys/stat.h>
29132 "
29133 if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = xyes; then :
29134
29135 cat >>confdefs.h <<_ACEOF
29136 #define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1
29137 _ACEOF
29138
29139
29140 fi
29141
29142 fi
29143
29144 fi
29145
29146
29147
29148
29149 cat >>confdefs.h <<_ACEOF
29150 #define GNULIB_STATAT 1
29151 _ACEOF
29152
29153
29154   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stdalign.h" >&5
29155 $as_echo_n "checking for working stdalign.h... " >&6; }
29156 if ${gl_cv_header_working_stdalign_h+:} false; then :
29157   $as_echo_n "(cached) " >&6
29158 else
29159   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29160 /* end confdefs.h.  */
29161 #include <stdalign.h>
29162             #include <stddef.h>
29163
29164             /* Test that alignof yields a result consistent with offsetof.
29165                This catches GCC bug 52023
29166                <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>.  */
29167             #ifdef __cplusplus
29168                template <class t> struct alignof_helper { char a; t b; };
29169             # define ao(type) offsetof (alignof_helper<type>, b)
29170             #else
29171             # define ao(type) offsetof (struct { char a; type b; }, b)
29172             #endif
29173             char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1];
29174             char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1];
29175             char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1];
29176
29177             /* Test _Alignas only on platforms where gnulib can help.  */
29178             #if \
29179                 ((defined __cplusplus && 201103 <= __cplusplus) \
29180                  || (defined __APPLE__ && defined __MACH__ \
29181                      ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \
29182                      : __GNUC__) \
29183                  || __HP_cc || __HP_aCC || __IBMC__ || __IBMCPP__ \
29184                  || __ICC || 0x5110 <= __SUNPRO_C \
29185                  || 1300 <= _MSC_VER)
29186               struct alignas_test { char c; char alignas (8) alignas_8; };
29187               char test_alignas[offsetof (struct alignas_test, alignas_8) == 8
29188                                 ? 1 : -1];
29189             #endif
29190
29191 int
29192 main ()
29193 {
29194
29195   ;
29196   return 0;
29197 }
29198 _ACEOF
29199 if ac_fn_c_try_compile "$LINENO"; then :
29200   gl_cv_header_working_stdalign_h=yes
29201 else
29202   gl_cv_header_working_stdalign_h=no
29203 fi
29204 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29205 fi
29206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdalign_h" >&5
29207 $as_echo "$gl_cv_header_working_stdalign_h" >&6; }
29208
29209   if test $gl_cv_header_working_stdalign_h = yes; then
29210     STDALIGN_H=''
29211   else
29212     STDALIGN_H='stdalign.h'
29213   fi
29214
29215
29216    if test -n "$STDALIGN_H"; then
29217   GL_GENERATE_STDALIGN_H_TRUE=
29218   GL_GENERATE_STDALIGN_H_FALSE='#'
29219 else
29220   GL_GENERATE_STDALIGN_H_TRUE='#'
29221   GL_GENERATE_STDALIGN_H_FALSE=
29222 fi
29223
29224
29225
29226   STDARG_H=''
29227   NEXT_STDARG_H='<stdarg.h>'
29228   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5
29229 $as_echo_n "checking for va_copy... " >&6; }
29230   if ${gl_cv_func_va_copy+:} false; then :
29231   $as_echo_n "(cached) " >&6
29232 else
29233
29234     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29235 /* end confdefs.h.  */
29236 #include <stdarg.h>
29237 int
29238 main ()
29239 {
29240
29241 #ifndef va_copy
29242 void (*func) (va_list, va_list) = va_copy;
29243 #endif
29244
29245   ;
29246   return 0;
29247 }
29248 _ACEOF
29249 if ac_fn_c_try_compile "$LINENO"; then :
29250   gl_cv_func_va_copy=yes
29251 else
29252   gl_cv_func_va_copy=no
29253 fi
29254 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29255 fi
29256
29257   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_va_copy" >&5
29258 $as_echo "$gl_cv_func_va_copy" >&6; }
29259   if test $gl_cv_func_va_copy = no; then
29260                                     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29261 /* end confdefs.h.  */
29262 #if defined _AIX && !defined __GNUC__
29263         AIX vaccine
29264        #endif
29265
29266 _ACEOF
29267 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
29268   $EGREP "vaccine" >/dev/null 2>&1; then :
29269   gl_aixcc=yes
29270 else
29271   gl_aixcc=no
29272 fi
29273 rm -f conftest*
29274
29275     if test $gl_aixcc = yes; then
29276             STDARG_H=stdarg.h
29277
29278
29279
29280
29281
29282
29283
29284
29285      if test $gl_cv_have_include_next = yes; then
29286        gl_cv_next_stdarg_h='<'stdarg.h'>'
29287      else
29288        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdarg.h>" >&5
29289 $as_echo_n "checking absolute name of <stdarg.h>... " >&6; }
29290 if ${gl_cv_next_stdarg_h+:} false; then :
29291   $as_echo_n "(cached) " >&6
29292 else
29293
29294
29295
29296   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29297 /* end confdefs.h.  */
29298 #include <stdarg.h>
29299 _ACEOF
29300                 case "$host_os" in
29301     aix*) gl_absname_cpp="$ac_cpp -C" ;;
29302     *)    gl_absname_cpp="$ac_cpp" ;;
29303   esac
29304
29305   case "$host_os" in
29306     mingw*)
29307                                           gl_dirsep_regex='[/\\]'
29308       ;;
29309     *)
29310       gl_dirsep_regex='\/'
29311       ;;
29312   esac
29313       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
29314   gl_header_literal_regex=`echo 'stdarg.h' \
29315                            | sed -e "$gl_make_literal_regex_sed"`
29316   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
29317       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
29318       s|^/[^/]|//&|
29319       p
29320       q
29321     }'
29322
29323         gl_cv_absolute_stdarg_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
29324   sed -n "$gl_absolute_header_sed"`
29325
29326            gl_header=$gl_cv_absolute_stdarg_h
29327            gl_cv_next_stdarg_h='"'$gl_header'"'
29328
29329
29330 fi
29331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdarg_h" >&5
29332 $as_echo "$gl_cv_next_stdarg_h" >&6; }
29333      fi
29334      NEXT_STDARG_H=$gl_cv_next_stdarg_h
29335
29336      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
29337        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
29338        gl_next_as_first_directive='<'stdarg.h'>'
29339      else
29340        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
29341        gl_next_as_first_directive=$gl_cv_next_stdarg_h
29342      fi
29343      NEXT_AS_FIRST_DIRECTIVE_STDARG_H=$gl_next_as_first_directive
29344
29345
29346
29347
29348             if test "$gl_cv_next_stdarg_h" = '""'; then
29349         gl_cv_next_stdarg_h='"///usr/include/stdarg.h"'
29350         NEXT_STDARG_H="$gl_cv_next_stdarg_h"
29351       fi
29352     else
29353
29354   saved_as_echo_n="$as_echo_n"
29355   as_echo_n=':'
29356   if ${gl_cv_func___va_copy+:} false; then :
29357   $as_echo_n "(cached) " >&6
29358 else
29359
29360         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29361 /* end confdefs.h.  */
29362 #include <stdarg.h>
29363 int
29364 main ()
29365 {
29366
29367 #ifndef __va_copy
29368 error, bail out
29369 #endif
29370
29371   ;
29372   return 0;
29373 }
29374 _ACEOF
29375 if ac_fn_c_try_compile "$LINENO"; then :
29376   gl_cv_func___va_copy=yes
29377 else
29378   gl_cv_func___va_copy=no
29379 fi
29380 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29381 fi
29382
29383   as_echo_n="$saved_as_echo_n"
29384
29385       if test $gl_cv_func___va_copy = yes; then
29386
29387 $as_echo "#define va_copy __va_copy" >>confdefs.h
29388
29389       else
29390
29391
29392 $as_echo "#define va_copy gl_va_copy" >>confdefs.h
29393
29394       fi
29395     fi
29396   fi
29397
29398    if test -n "$STDARG_H"; then
29399   GL_GENERATE_STDARG_H_TRUE=
29400   GL_GENERATE_STDARG_H_FALSE='#'
29401 else
29402   GL_GENERATE_STDARG_H_TRUE='#'
29403   GL_GENERATE_STDARG_H_FALSE=
29404 fi
29405
29406
29407
29408
29409
29410
29411   # Define two additional variables used in the Makefile substitution.
29412
29413   if test "$ac_cv_header_stdbool_h" = yes; then
29414     STDBOOL_H=''
29415   else
29416     STDBOOL_H='stdbool.h'
29417   fi
29418
29419    if test -n "$STDBOOL_H"; then
29420   GL_GENERATE_STDBOOL_H_TRUE=
29421   GL_GENERATE_STDBOOL_H_FALSE='#'
29422 else
29423   GL_GENERATE_STDBOOL_H_TRUE='#'
29424   GL_GENERATE_STDBOOL_H_FALSE=
29425 fi
29426
29427
29428   if test "$ac_cv_type__Bool" = yes; then
29429     HAVE__BOOL=1
29430   else
29431     HAVE__BOOL=0
29432   fi
29433
29434
29435
29436
29437
29438   STDDEF_H=
29439   ac_fn_c_check_type "$LINENO" "max_align_t" "ac_cv_type_max_align_t" "#include <stddef.h>
29440
29441 "
29442 if test "x$ac_cv_type_max_align_t" = xyes; then :
29443
29444 else
29445   HAVE_MAX_ALIGN_T=0; STDDEF_H=stddef.h
29446 fi
29447
29448   if test $gt_cv_c_wchar_t = no; then
29449     HAVE_WCHAR_T=0
29450     STDDEF_H=stddef.h
29451   fi
29452   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
29453 $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
29454 if ${gl_cv_decl_null_works+:} false; then :
29455   $as_echo_n "(cached) " >&6
29456 else
29457   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29458 /* end confdefs.h.  */
29459 #include <stddef.h>
29460       int test[2 * (sizeof NULL == sizeof (void *)) -1];
29461
29462 int
29463 main ()
29464 {
29465
29466   ;
29467   return 0;
29468 }
29469 _ACEOF
29470 if ac_fn_c_try_compile "$LINENO"; then :
29471   gl_cv_decl_null_works=yes
29472 else
29473   gl_cv_decl_null_works=no
29474 fi
29475 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29476 fi
29477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
29478 $as_echo "$gl_cv_decl_null_works" >&6; }
29479   if test $gl_cv_decl_null_works = no; then
29480     REPLACE_NULL=1
29481     STDDEF_H=stddef.h
29482   fi
29483
29484    if test -n "$STDDEF_H"; then
29485   GL_GENERATE_STDDEF_H_TRUE=
29486   GL_GENERATE_STDDEF_H_FALSE='#'
29487 else
29488   GL_GENERATE_STDDEF_H_TRUE='#'
29489   GL_GENERATE_STDDEF_H_FALSE=
29490 fi
29491
29492   if test -n "$STDDEF_H"; then
29493
29494
29495
29496
29497
29498
29499
29500
29501      if test $gl_cv_have_include_next = yes; then
29502        gl_cv_next_stddef_h='<'stddef.h'>'
29503      else
29504        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
29505 $as_echo_n "checking absolute name of <stddef.h>... " >&6; }
29506 if ${gl_cv_next_stddef_h+:} false; then :
29507   $as_echo_n "(cached) " >&6
29508 else
29509
29510
29511
29512   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29513 /* end confdefs.h.  */
29514 #include <stddef.h>
29515 _ACEOF
29516                 case "$host_os" in
29517     aix*) gl_absname_cpp="$ac_cpp -C" ;;
29518     *)    gl_absname_cpp="$ac_cpp" ;;
29519   esac
29520
29521   case "$host_os" in
29522     mingw*)
29523                                           gl_dirsep_regex='[/\\]'
29524       ;;
29525     *)
29526       gl_dirsep_regex='\/'
29527       ;;
29528   esac
29529       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
29530   gl_header_literal_regex=`echo 'stddef.h' \
29531                            | sed -e "$gl_make_literal_regex_sed"`
29532   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
29533       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
29534       s|^/[^/]|//&|
29535       p
29536       q
29537     }'
29538
29539         gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
29540   sed -n "$gl_absolute_header_sed"`
29541
29542            gl_header=$gl_cv_absolute_stddef_h
29543            gl_cv_next_stddef_h='"'$gl_header'"'
29544
29545
29546 fi
29547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
29548 $as_echo "$gl_cv_next_stddef_h" >&6; }
29549      fi
29550      NEXT_STDDEF_H=$gl_cv_next_stddef_h
29551
29552      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
29553        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
29554        gl_next_as_first_directive='<'stddef.h'>'
29555      else
29556        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
29557        gl_next_as_first_directive=$gl_cv_next_stddef_h
29558      fi
29559      NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
29560
29561
29562
29563
29564   fi
29565
29566
29567
29568
29569
29570
29571
29572
29573
29574
29575
29576
29577
29578
29579      if test $gl_cv_have_include_next = yes; then
29580        gl_cv_next_stdio_h='<'stdio.h'>'
29581      else
29582        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
29583 $as_echo_n "checking absolute name of <stdio.h>... " >&6; }
29584 if ${gl_cv_next_stdio_h+:} false; then :
29585   $as_echo_n "(cached) " >&6
29586 else
29587
29588
29589
29590   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29591 /* end confdefs.h.  */
29592 #include <stdio.h>
29593 _ACEOF
29594                 case "$host_os" in
29595     aix*) gl_absname_cpp="$ac_cpp -C" ;;
29596     *)    gl_absname_cpp="$ac_cpp" ;;
29597   esac
29598
29599   case "$host_os" in
29600     mingw*)
29601                                           gl_dirsep_regex='[/\\]'
29602       ;;
29603     *)
29604       gl_dirsep_regex='\/'
29605       ;;
29606   esac
29607       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
29608   gl_header_literal_regex=`echo 'stdio.h' \
29609                            | sed -e "$gl_make_literal_regex_sed"`
29610   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
29611       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
29612       s|^/[^/]|//&|
29613       p
29614       q
29615     }'
29616
29617         gl_cv_absolute_stdio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
29618   sed -n "$gl_absolute_header_sed"`
29619
29620            gl_header=$gl_cv_absolute_stdio_h
29621            gl_cv_next_stdio_h='"'$gl_header'"'
29622
29623
29624 fi
29625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
29626 $as_echo "$gl_cv_next_stdio_h" >&6; }
29627      fi
29628      NEXT_STDIO_H=$gl_cv_next_stdio_h
29629
29630      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
29631        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
29632        gl_next_as_first_directive='<'stdio.h'>'
29633      else
29634        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
29635        gl_next_as_first_directive=$gl_cv_next_stdio_h
29636      fi
29637      NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
29638
29639
29640
29641
29642
29643         { $as_echo "$as_me:${as_lineno-$LINENO}: checking which flavor of printf attribute matches inttypes macros" >&5
29644 $as_echo_n "checking which flavor of printf attribute matches inttypes macros... " >&6; }
29645 if ${gl_cv_func_printf_attribute_flavor+:} false; then :
29646   $as_echo_n "(cached) " >&6
29647 else
29648   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29649 /* end confdefs.h.  */
29650
29651        #define __STDC_FORMAT_MACROS 1
29652        #include <stdio.h>
29653        #include <inttypes.h>
29654        /* For non-mingw systems, compilation will trivially succeed.
29655           For mingw, compilation will succeed for older mingw (system
29656           printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */
29657        #if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) && \
29658          (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
29659        extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1];
29660        #endif
29661
29662 int
29663 main ()
29664 {
29665
29666   ;
29667   return 0;
29668 }
29669 _ACEOF
29670 if ac_fn_c_try_compile "$LINENO"; then :
29671   gl_cv_func_printf_attribute_flavor=system
29672 else
29673   gl_cv_func_printf_attribute_flavor=gnu
29674 fi
29675 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29676 fi
29677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_attribute_flavor" >&5
29678 $as_echo "$gl_cv_func_printf_attribute_flavor" >&6; }
29679   if test "$gl_cv_func_printf_attribute_flavor" = gnu; then
29680
29681 $as_echo "#define GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU 1" >>confdefs.h
29682
29683   fi
29684
29685       GNULIB_FSCANF=1
29686
29687
29688 cat >>confdefs.h <<_ACEOF
29689 #define GNULIB_FSCANF 1
29690 _ACEOF
29691
29692
29693   GNULIB_SCANF=1
29694
29695
29696 cat >>confdefs.h <<_ACEOF
29697 #define GNULIB_SCANF 1
29698 _ACEOF
29699
29700
29701   GNULIB_FGETC=1
29702   GNULIB_GETC=1
29703   GNULIB_GETCHAR=1
29704   GNULIB_FGETS=1
29705   GNULIB_FREAD=1
29706
29707
29708       GNULIB_FPRINTF=1
29709   GNULIB_PRINTF=1
29710   GNULIB_VFPRINTF=1
29711   GNULIB_VPRINTF=1
29712   GNULIB_FPUTC=1
29713   GNULIB_PUTC=1
29714   GNULIB_PUTCHAR=1
29715   GNULIB_FPUTS=1
29716   GNULIB_PUTS=1
29717   GNULIB_FWRITE=1
29718
29719
29720
29721
29722     for gl_func in dprintf fpurge fseeko ftello getdelim getline gets pclose popen     renameat snprintf tmpfile vdprintf vsnprintf; do
29723     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
29724     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
29725 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
29726 if eval \${$as_gl_Symbol+:} false; then :
29727   $as_echo_n "(cached) " >&6
29728 else
29729   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29730 /* end confdefs.h.  */
29731 #include <stdio.h>
29732
29733 int
29734 main ()
29735 {
29736 #undef $gl_func
29737   (void) $gl_func;
29738   ;
29739   return 0;
29740 }
29741 _ACEOF
29742 if ac_fn_c_try_compile "$LINENO"; then :
29743   eval "$as_gl_Symbol=yes"
29744 else
29745   eval "$as_gl_Symbol=no"
29746 fi
29747 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29748 fi
29749 eval ac_res=\$$as_gl_Symbol
29750                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
29751 $as_echo "$ac_res" >&6; }
29752     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
29753   cat >>confdefs.h <<_ACEOF
29754 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
29755 _ACEOF
29756
29757                      eval ac_cv_have_decl_$gl_func=yes
29758 fi
29759       done
29760
29761
29762
29763
29764
29765
29766
29767
29768
29769
29770
29771
29772      if test $gl_cv_have_include_next = yes; then
29773        gl_cv_next_stdlib_h='<'stdlib.h'>'
29774      else
29775        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
29776 $as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
29777 if ${gl_cv_next_stdlib_h+:} false; then :
29778   $as_echo_n "(cached) " >&6
29779 else
29780
29781
29782
29783   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29784 /* end confdefs.h.  */
29785 #include <stdlib.h>
29786 _ACEOF
29787                 case "$host_os" in
29788     aix*) gl_absname_cpp="$ac_cpp -C" ;;
29789     *)    gl_absname_cpp="$ac_cpp" ;;
29790   esac
29791
29792   case "$host_os" in
29793     mingw*)
29794                                           gl_dirsep_regex='[/\\]'
29795       ;;
29796     *)
29797       gl_dirsep_regex='\/'
29798       ;;
29799   esac
29800       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
29801   gl_header_literal_regex=`echo 'stdlib.h' \
29802                            | sed -e "$gl_make_literal_regex_sed"`
29803   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
29804       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
29805       s|^/[^/]|//&|
29806       p
29807       q
29808     }'
29809
29810         gl_cv_absolute_stdlib_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
29811   sed -n "$gl_absolute_header_sed"`
29812
29813            gl_header=$gl_cv_absolute_stdlib_h
29814            gl_cv_next_stdlib_h='"'$gl_header'"'
29815
29816
29817 fi
29818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
29819 $as_echo "$gl_cv_next_stdlib_h" >&6; }
29820      fi
29821      NEXT_STDLIB_H=$gl_cv_next_stdlib_h
29822
29823      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
29824        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
29825        gl_next_as_first_directive='<'stdlib.h'>'
29826      else
29827        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
29828        gl_next_as_first_directive=$gl_cv_next_stdlib_h
29829      fi
29830      NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
29831
29832
29833
29834
29835
29836
29837     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
29838     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
29839     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
29840 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
29841 if eval \${$as_gl_Symbol+:} false; then :
29842   $as_echo_n "(cached) " >&6
29843 else
29844   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29845 /* end confdefs.h.  */
29846 #include <stdlib.h>
29847 #if HAVE_SYS_LOADAVG_H
29848 # include <sys/loadavg.h>
29849 #endif
29850 #if HAVE_RANDOM_H
29851 # include <random.h>
29852 #endif
29853
29854 int
29855 main ()
29856 {
29857 #undef $gl_func
29858   (void) $gl_func;
29859   ;
29860   return 0;
29861 }
29862 _ACEOF
29863 if ac_fn_c_try_compile "$LINENO"; then :
29864   eval "$as_gl_Symbol=yes"
29865 else
29866   eval "$as_gl_Symbol=no"
29867 fi
29868 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29869 fi
29870 eval ac_res=\$$as_gl_Symbol
29871                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
29872 $as_echo "$ac_res" >&6; }
29873     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
29874   cat >>confdefs.h <<_ACEOF
29875 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
29876 _ACEOF
29877
29878                      eval ac_cv_have_decl_$gl_func=yes
29879 fi
29880       done
29881
29882
29883
29884
29885
29886
29887
29888
29889   for ac_func in stpcpy
29890 do :
29891   ac_fn_c_check_func "$LINENO" "stpcpy" "ac_cv_func_stpcpy"
29892 if test "x$ac_cv_func_stpcpy" = xyes; then :
29893   cat >>confdefs.h <<_ACEOF
29894 #define HAVE_STPCPY 1
29895 _ACEOF
29896
29897 fi
29898 done
29899
29900   if test $ac_cv_func_stpcpy = no; then
29901     HAVE_STPCPY=0
29902   fi
29903
29904   if test $HAVE_STPCPY = 0; then
29905
29906
29907
29908
29909
29910
29911
29912
29913   gl_LIBOBJS="$gl_LIBOBJS stpcpy.$ac_objext"
29914
29915
29916   :
29917
29918   fi
29919
29920
29921
29922
29923
29924           GNULIB_STPCPY=1
29925
29926
29927
29928
29929
29930 $as_echo "#define GNULIB_TEST_STPCPY 1" >>confdefs.h
29931
29932
29933
29934
29935
29936
29937   for ac_func in strcasecmp
29938 do :
29939   ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp"
29940 if test "x$ac_cv_func_strcasecmp" = xyes; then :
29941   cat >>confdefs.h <<_ACEOF
29942 #define HAVE_STRCASECMP 1
29943 _ACEOF
29944
29945 fi
29946 done
29947
29948   if test $ac_cv_func_strcasecmp = no; then
29949     HAVE_STRCASECMP=0
29950   fi
29951
29952
29953
29954   for ac_func in strncasecmp
29955 do :
29956   ac_fn_c_check_func "$LINENO" "strncasecmp" "ac_cv_func_strncasecmp"
29957 if test "x$ac_cv_func_strncasecmp" = xyes; then :
29958   cat >>confdefs.h <<_ACEOF
29959 #define HAVE_STRNCASECMP 1
29960 _ACEOF
29961
29962 fi
29963 done
29964
29965   if test $ac_cv_func_strncasecmp = yes; then
29966     HAVE_STRNCASECMP=1
29967   else
29968     HAVE_STRNCASECMP=0
29969   fi
29970   ac_fn_c_check_decl "$LINENO" "strncasecmp" "ac_cv_have_decl_strncasecmp" "$ac_includes_default"
29971 if test "x$ac_cv_have_decl_strncasecmp" = xyes; then :
29972   ac_have_decl=1
29973 else
29974   ac_have_decl=0
29975 fi
29976
29977 cat >>confdefs.h <<_ACEOF
29978 #define HAVE_DECL_STRNCASECMP $ac_have_decl
29979 _ACEOF
29980
29981   if test $ac_cv_have_decl_strncasecmp = no; then
29982     HAVE_DECL_STRNCASECMP=0
29983   fi
29984
29985
29986   if test $HAVE_STRCASECMP = 0; then
29987
29988
29989
29990
29991
29992
29993
29994
29995   gl_LIBOBJS="$gl_LIBOBJS strcasecmp.$ac_objext"
29996
29997
29998   :
29999
30000   fi
30001   if test $HAVE_STRNCASECMP = 0; then
30002
30003
30004
30005
30006
30007
30008
30009
30010   gl_LIBOBJS="$gl_LIBOBJS strncasecmp.$ac_objext"
30011
30012
30013   :
30014
30015   fi
30016
30017
30018
30019
30020   for ac_func in strchrnul
30021 do :
30022   ac_fn_c_check_func "$LINENO" "strchrnul" "ac_cv_func_strchrnul"
30023 if test "x$ac_cv_func_strchrnul" = xyes; then :
30024   cat >>confdefs.h <<_ACEOF
30025 #define HAVE_STRCHRNUL 1
30026 _ACEOF
30027
30028 fi
30029 done
30030
30031   if test $ac_cv_func_strchrnul = no; then
30032     HAVE_STRCHRNUL=0
30033   else
30034     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strchrnul works" >&5
30035 $as_echo_n "checking whether strchrnul works... " >&6; }
30036 if ${gl_cv_func_strchrnul_works+:} false; then :
30037   $as_echo_n "(cached) " >&6
30038 else
30039   if test "$cross_compiling" = yes; then :
30040            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30041 /* end confdefs.h.  */
30042
30043 #if defined __CYGWIN__
30044  #include <cygwin/version.h>
30045  #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 9)
30046   Lucky user
30047  #endif
30048 #else
30049   Lucky user
30050 #endif
30051
30052 _ACEOF
30053 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
30054   $EGREP "Lucky user" >/dev/null 2>&1; then :
30055   gl_cv_func_strchrnul_works="guessing yes"
30056 else
30057   gl_cv_func_strchrnul_works="guessing no"
30058 fi
30059 rm -f conftest*
30060
30061
30062 else
30063   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30064 /* end confdefs.h.  */
30065
30066 #include <string.h> /* for strchrnul */
30067
30068 int
30069 main ()
30070 {
30071 const char *buf = "a";
30072       return strchrnul (buf, 'b') != buf + 1;
30073
30074   ;
30075   return 0;
30076 }
30077 _ACEOF
30078 if ac_fn_c_try_run "$LINENO"; then :
30079   gl_cv_func_strchrnul_works=yes
30080 else
30081   gl_cv_func_strchrnul_works=no
30082 fi
30083 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30084   conftest.$ac_objext conftest.beam conftest.$ac_ext
30085 fi
30086
30087
30088 fi
30089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strchrnul_works" >&5
30090 $as_echo "$gl_cv_func_strchrnul_works" >&6; }
30091     case "$gl_cv_func_strchrnul_works" in
30092       *yes) ;;
30093       *) REPLACE_STRCHRNUL=1 ;;
30094     esac
30095   fi
30096
30097   if test $HAVE_STRCHRNUL = 0 || test $REPLACE_STRCHRNUL = 1; then
30098
30099
30100
30101
30102
30103
30104
30105
30106   gl_LIBOBJS="$gl_LIBOBJS strchrnul.$ac_objext"
30107
30108     :
30109   fi
30110
30111
30112
30113
30114
30115           GNULIB_STRCHRNUL=1
30116
30117
30118
30119
30120
30121 $as_echo "#define GNULIB_TEST_STRCHRNUL 1" >>confdefs.h
30122
30123
30124
30125
30126
30127
30128
30129   if test $ac_cv_func_strdup = yes; then
30130     if test $gl_cv_func_malloc_posix != yes; then
30131       REPLACE_STRDUP=1
30132     fi
30133   fi
30134
30135   if test $ac_cv_have_decl_strdup = no; then
30136     HAVE_DECL_STRDUP=0
30137   fi
30138
30139   if test $ac_cv_func_strdup = no || test $REPLACE_STRDUP = 1; then
30140
30141
30142
30143
30144
30145
30146
30147
30148   gl_LIBOBJS="$gl_LIBOBJS strdup.$ac_objext"
30149
30150     :
30151   fi
30152
30153
30154
30155
30156
30157           GNULIB_STRDUP=1
30158
30159
30160
30161
30162
30163 $as_echo "#define GNULIB_TEST_STRDUP 1" >>confdefs.h
30164
30165
30166
30167
30168
30169
30170
30171
30172   if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
30173     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
30174 $as_echo_n "checking for working strerror function... " >&6; }
30175 if ${gl_cv_func_working_strerror+:} false; then :
30176   $as_echo_n "(cached) " >&6
30177 else
30178   if test "$cross_compiling" = yes; then :
30179   case "$host_os" in
30180                    # Guess yes on glibc systems.
30181            *-gnu*) gl_cv_func_working_strerror="guessing yes" ;;
30182                    # If we don't know, assume the worst.
30183            *)      gl_cv_func_working_strerror="guessing no" ;;
30184          esac
30185
30186 else
30187   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30188 /* end confdefs.h.  */
30189 #include <string.h>
30190
30191 int
30192 main ()
30193 {
30194 if (!*strerror (-2)) return 1;
30195   ;
30196   return 0;
30197 }
30198 _ACEOF
30199 if ac_fn_c_try_run "$LINENO"; then :
30200   gl_cv_func_working_strerror=yes
30201 else
30202   gl_cv_func_working_strerror=no
30203 fi
30204 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30205   conftest.$ac_objext conftest.beam conftest.$ac_ext
30206 fi
30207
30208
30209 fi
30210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
30211 $as_echo "$gl_cv_func_working_strerror" >&6; }
30212     case "$gl_cv_func_working_strerror" in
30213       *yes) ;;
30214       *)
30215                         REPLACE_STRERROR=1
30216         ;;
30217     esac
30218
30219   else
30220             REPLACE_STRERROR=1
30221   fi
30222
30223   if test $REPLACE_STRERROR = 1; then
30224
30225
30226
30227
30228
30229
30230
30231
30232   gl_LIBOBJS="$gl_LIBOBJS strerror.$ac_objext"
30233
30234   fi
30235
30236
30237 cat >>confdefs.h <<_ACEOF
30238 #define GNULIB_STRERROR 1
30239 _ACEOF
30240
30241
30242
30243
30244
30245
30246
30247           GNULIB_STRERROR=1
30248
30249
30250
30251
30252
30253 $as_echo "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
30254
30255
30256
30257
30258
30259   if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
30260
30261
30262
30263
30264
30265
30266
30267
30268   gl_LIBOBJS="$gl_LIBOBJS strerror-override.$ac_objext"
30269
30270
30271
30272
30273
30274   if test $ac_cv_header_sys_socket_h != yes; then
30275                     for ac_header in winsock2.h
30276 do :
30277   ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
30278 if test "x$ac_cv_header_winsock2_h" = xyes; then :
30279   cat >>confdefs.h <<_ACEOF
30280 #define HAVE_WINSOCK2_H 1
30281 _ACEOF
30282
30283 fi
30284
30285 done
30286
30287   fi
30288   if test "$ac_cv_header_winsock2_h" = yes; then
30289     HAVE_WINSOCK2_H=1
30290     UNISTD_H_HAVE_WINSOCK2_H=1
30291     SYS_IOCTL_H_HAVE_WINSOCK2_H=1
30292   else
30293     HAVE_WINSOCK2_H=0
30294   fi
30295
30296
30297   fi
30298
30299
30300  # This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE.
30301
30302
30303
30304
30305
30306
30307
30308 $as_echo "#define my_strftime nstrftime" >>confdefs.h
30309
30310
30311
30312
30313
30314
30315
30316
30317
30318
30319
30320
30321
30322
30323
30324   if test $ac_cv_have_decl_strndup = no; then
30325     HAVE_DECL_STRNDUP=0
30326   fi
30327
30328   if test $ac_cv_func_strndup = yes; then
30329     HAVE_STRNDUP=1
30330     # AIX 4.3.3, AIX 5.1 have a function that fails to add the terminating '\0'.
30331     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strndup" >&5
30332 $as_echo_n "checking for working strndup... " >&6; }
30333 if ${gl_cv_func_strndup_works+:} false; then :
30334   $as_echo_n "(cached) " >&6
30335 else
30336   if test "$cross_compiling" = yes; then :
30337
30338           case $host_os in
30339             aix | aix[3-6]*) gl_cv_func_strndup_works="guessing no";;
30340             *)               gl_cv_func_strndup_works="guessing yes";;
30341           esac
30342
30343 else
30344   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30345 /* end confdefs.h.  */
30346
30347          #include <string.h>
30348                            #include <stdlib.h>
30349 int
30350 main ()
30351 {
30352
30353 #if !HAVE_DECL_STRNDUP
30354   extern
30355   #ifdef __cplusplus
30356   "C"
30357   #endif
30358   char *strndup (const char *, size_t);
30359 #endif
30360   char *s;
30361   s = strndup ("some longer string", 15);
30362   free (s);
30363   s = strndup ("shorter string", 13);
30364   return s[13] != '\0';
30365   ;
30366   return 0;
30367 }
30368 _ACEOF
30369 if ac_fn_c_try_run "$LINENO"; then :
30370   gl_cv_func_strndup_works=yes
30371 else
30372   gl_cv_func_strndup_works=no
30373 fi
30374 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30375   conftest.$ac_objext conftest.beam conftest.$ac_ext
30376 fi
30377
30378 fi
30379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strndup_works" >&5
30380 $as_echo "$gl_cv_func_strndup_works" >&6; }
30381     case $gl_cv_func_strndup_works in
30382       *no) REPLACE_STRNDUP=1 ;;
30383     esac
30384   else
30385     HAVE_STRNDUP=0
30386   fi
30387
30388   if test $HAVE_STRNDUP = 0 || test $REPLACE_STRNDUP = 1; then
30389
30390
30391
30392
30393
30394
30395
30396
30397   gl_LIBOBJS="$gl_LIBOBJS strndup.$ac_objext"
30398
30399   fi
30400
30401
30402
30403
30404
30405           GNULIB_STRNDUP=1
30406
30407
30408
30409
30410
30411 $as_echo "#define GNULIB_TEST_STRNDUP 1" >>confdefs.h
30412
30413
30414
30415
30416
30417
30418
30419
30420
30421   if test $ac_cv_have_decl_strnlen = no; then
30422     HAVE_DECL_STRNLEN=0
30423   else
30424
30425          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strnlen" >&5
30426 $as_echo_n "checking for working strnlen... " >&6; }
30427 if ${ac_cv_func_strnlen_working+:} false; then :
30428   $as_echo_n "(cached) " >&6
30429 else
30430   if test "$cross_compiling" = yes; then :
30431   # Guess no on AIX systems, yes otherwise.
30432                 case "$host_os" in
30433                   aix*) ac_cv_func_strnlen_working=no;;
30434                   *)    ac_cv_func_strnlen_working=yes;;
30435                 esac
30436 else
30437   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30438 /* end confdefs.h.  */
30439 $ac_includes_default
30440 int
30441 main ()
30442 {
30443
30444 #define S "foobar"
30445 #define S_LEN (sizeof S - 1)
30446
30447   /* At least one implementation is buggy: that of AIX 4.3 would
30448      give strnlen (S, 1) == 3.  */
30449
30450   int i;
30451   for (i = 0; i < S_LEN + 1; ++i)
30452     {
30453       int expected = i <= S_LEN ? i : S_LEN;
30454       if (strnlen (S, i) != expected)
30455         return 1;
30456     }
30457   return 0;
30458
30459   ;
30460   return 0;
30461 }
30462 _ACEOF
30463 if ac_fn_c_try_run "$LINENO"; then :
30464   ac_cv_func_strnlen_working=yes
30465 else
30466   ac_cv_func_strnlen_working=no
30467 fi
30468 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30469   conftest.$ac_objext conftest.beam conftest.$ac_ext
30470 fi
30471
30472 fi
30473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strnlen_working" >&5
30474 $as_echo "$ac_cv_func_strnlen_working" >&6; }
30475 test $ac_cv_func_strnlen_working = no && :
30476
30477
30478     if test $ac_cv_func_strnlen_working = no; then
30479       REPLACE_STRNLEN=1
30480     fi
30481   fi
30482
30483   if test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1; then
30484
30485
30486
30487
30488
30489
30490
30491
30492   gl_LIBOBJS="$gl_LIBOBJS strnlen.$ac_objext"
30493
30494     :
30495   fi
30496
30497
30498
30499
30500
30501           GNULIB_STRNLEN=1
30502
30503
30504
30505
30506
30507 $as_echo "#define GNULIB_TEST_STRNLEN 1" >>confdefs.h
30508
30509
30510
30511
30512
30513
30514
30515
30516   if test "$ac_cv_have_decl_strtoimax" != yes; then
30517     HAVE_DECL_STRTOIMAX=0
30518   fi
30519
30520   if test "$ac_cv_func_strtoimax" = yes; then
30521     HAVE_STRTOIMAX=1
30522              { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtoimax works" >&5
30523 $as_echo_n "checking whether strtoimax works... " >&6; }
30524 if ${gl_cv_func_strtoimax+:} false; then :
30525   $as_echo_n "(cached) " >&6
30526 else
30527   if test "$cross_compiling" = yes; then :
30528   case "$host_os" in
30529                    # Guess no on AIX 5.
30530             aix5*) gl_cv_func_strtoimax="guessing no" ;;
30531                    # Guess yes otherwise.
30532             *)     gl_cv_func_strtoimax="guessing yes" ;;
30533           esac
30534
30535 else
30536   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30537 /* end confdefs.h.  */
30538
30539 #include <errno.h>
30540 #include <string.h>
30541 #include <inttypes.h>
30542 int main ()
30543 {
30544   if (sizeof (intmax_t) > sizeof (int))
30545     {
30546       const char *s = "4294967295";
30547       char *p;
30548       intmax_t res;
30549       errno = 0;
30550       res = strtoimax (s, &p, 10);
30551       if (p != s + strlen (s))
30552         return 1;
30553       if (errno != 0)
30554         return 2;
30555       if (res != (intmax_t) 65535 * (intmax_t) 65537)
30556         return 3;
30557     }
30558   else
30559     {
30560       const char *s = "2147483647";
30561       char *p;
30562       intmax_t res;
30563       errno = 0;
30564       res = strtoimax (s, &p, 10);
30565       if (p != s + strlen (s))
30566         return 1;
30567       if (errno != 0)
30568         return 2;
30569       if (res != 2147483647)
30570         return 3;
30571     }
30572   return 0;
30573 }
30574
30575 _ACEOF
30576 if ac_fn_c_try_run "$LINENO"; then :
30577   gl_cv_func_strtoimax=yes
30578 else
30579   gl_cv_func_strtoimax=no
30580 fi
30581 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30582   conftest.$ac_objext conftest.beam conftest.$ac_ext
30583 fi
30584
30585
30586 fi
30587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtoimax" >&5
30588 $as_echo "$gl_cv_func_strtoimax" >&6; }
30589     case "$gl_cv_func_strtoimax" in
30590       *no) REPLACE_STRTOIMAX=1 ;;
30591     esac
30592   else
30593     if test "$ac_cv_have_decl_strtoimax" = yes; then
30594       # HP-UX 11.11 has "#define strtoimax(...) ..." but no function.
30595       REPLACE_STRTOIMAX=1
30596     fi
30597     HAVE_STRTOIMAX=0
30598   fi
30599
30600   if test $HAVE_DECL_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; then
30601
30602
30603
30604
30605
30606
30607
30608
30609   gl_LIBOBJS="$gl_LIBOBJS strtoimax.$ac_objext"
30610
30611
30612   ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
30613 if test "x$ac_cv_have_decl_strtoll" = xyes; then :
30614   ac_have_decl=1
30615 else
30616   ac_have_decl=0
30617 fi
30618
30619 cat >>confdefs.h <<_ACEOF
30620 #define HAVE_DECL_STRTOLL $ac_have_decl
30621 _ACEOF
30622
30623
30624
30625   fi
30626
30627
30628
30629
30630
30631           GNULIB_STRTOIMAX=1
30632
30633
30634
30635
30636
30637   for ac_func in strtol
30638 do :
30639   ac_fn_c_check_func "$LINENO" "strtol" "ac_cv_func_strtol"
30640 if test "x$ac_cv_func_strtol" = xyes; then :
30641   cat >>confdefs.h <<_ACEOF
30642 #define HAVE_STRTOL 1
30643 _ACEOF
30644
30645 fi
30646 done
30647
30648
30649   if test $ac_cv_func_strtol = no; then
30650
30651
30652
30653
30654
30655
30656
30657
30658   gl_LIBOBJS="$gl_LIBOBJS strtol.$ac_objext"
30659
30660   fi
30661
30662
30663
30664   if test "$ac_cv_type_long_long_int" = yes; then
30665     for ac_func in strtoll
30666 do :
30667   ac_fn_c_check_func "$LINENO" "strtoll" "ac_cv_func_strtoll"
30668 if test "x$ac_cv_func_strtoll" = xyes; then :
30669   cat >>confdefs.h <<_ACEOF
30670 #define HAVE_STRTOLL 1
30671 _ACEOF
30672
30673 fi
30674 done
30675
30676     if test $ac_cv_func_strtoll = no; then
30677       HAVE_STRTOLL=0
30678     fi
30679   fi
30680
30681   if test $HAVE_STRTOLL = 0; then
30682
30683
30684
30685
30686
30687
30688
30689
30690   gl_LIBOBJS="$gl_LIBOBJS strtoll.$ac_objext"
30691
30692
30693   :
30694
30695   fi
30696
30697
30698
30699
30700
30701           GNULIB_STRTOLL=1
30702
30703
30704
30705
30706
30707 $as_echo "#define GNULIB_TEST_STRTOLL 1" >>confdefs.h
30708
30709
30710
30711
30712   for ac_func in strtoul
30713 do :
30714   ac_fn_c_check_func "$LINENO" "strtoul" "ac_cv_func_strtoul"
30715 if test "x$ac_cv_func_strtoul" = xyes; then :
30716   cat >>confdefs.h <<_ACEOF
30717 #define HAVE_STRTOUL 1
30718 _ACEOF
30719
30720 fi
30721 done
30722
30723
30724   if test $ac_cv_func_strtoul = no; then
30725
30726
30727
30728
30729
30730
30731
30732
30733   gl_LIBOBJS="$gl_LIBOBJS strtoul.$ac_objext"
30734
30735   fi
30736
30737
30738
30739   if test "$ac_cv_type_unsigned_long_long_int" = yes; then
30740     for ac_func in strtoull
30741 do :
30742   ac_fn_c_check_func "$LINENO" "strtoull" "ac_cv_func_strtoull"
30743 if test "x$ac_cv_func_strtoull" = xyes; then :
30744   cat >>confdefs.h <<_ACEOF
30745 #define HAVE_STRTOULL 1
30746 _ACEOF
30747
30748 fi
30749 done
30750
30751     if test $ac_cv_func_strtoull = no; then
30752       HAVE_STRTOULL=0
30753     fi
30754   fi
30755
30756   if test $HAVE_STRTOULL = 0; then
30757
30758
30759
30760
30761
30762
30763
30764
30765   gl_LIBOBJS="$gl_LIBOBJS strtoull.$ac_objext"
30766
30767
30768   :
30769
30770   fi
30771
30772
30773
30774
30775
30776           GNULIB_STRTOULL=1
30777
30778
30779
30780
30781
30782 $as_echo "#define GNULIB_TEST_STRTOULL 1" >>confdefs.h
30783
30784
30785
30786
30787
30788
30789
30790
30791   if test "$ac_cv_have_decl_strtoumax" = yes; then
30792     if test "$ac_cv_func_strtoumax" != yes; then
30793       # HP-UX 11.11 has "#define strtoimax(...) ..." but no function.
30794       REPLACE_STRTOUMAX=1
30795     fi
30796   else
30797     HAVE_DECL_STRTOUMAX=0
30798   fi
30799
30800   if test $HAVE_DECL_STRTOUMAX = 0 || test $REPLACE_STRTOUMAX = 1; then
30801
30802
30803
30804
30805
30806
30807
30808
30809   gl_LIBOBJS="$gl_LIBOBJS strtoumax.$ac_objext"
30810
30811
30812   ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
30813 if test "x$ac_cv_have_decl_strtoull" = xyes; then :
30814   ac_have_decl=1
30815 else
30816   ac_have_decl=0
30817 fi
30818
30819 cat >>confdefs.h <<_ACEOF
30820 #define HAVE_DECL_STRTOULL $ac_have_decl
30821 _ACEOF
30822
30823
30824
30825   fi
30826
30827
30828
30829
30830
30831           GNULIB_STRTOUMAX=1
30832
30833
30834
30835
30836
30837
30838
30839         if test $ac_cv_func_symlink = no; then
30840     HAVE_SYMLINK=0
30841   else
30842     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether symlink handles trailing slash correctly" >&5
30843 $as_echo_n "checking whether symlink handles trailing slash correctly... " >&6; }
30844 if ${gl_cv_func_symlink_works+:} false; then :
30845   $as_echo_n "(cached) " >&6
30846 else
30847   if test "$cross_compiling" = yes; then :
30848   case "$host_os" in
30849                     # Guess yes on glibc systems.
30850             *-gnu*) gl_cv_func_symlink_works="guessing yes" ;;
30851                     # If we don't know, assume the worst.
30852             *)      gl_cv_func_symlink_works="guessing no" ;;
30853           esac
30854
30855 else
30856   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30857 /* end confdefs.h.  */
30858 #include <unistd.h>
30859
30860 int
30861 main ()
30862 {
30863 int result = 0;
30864              if (!symlink ("a", "conftest.link/"))
30865                result |= 1;
30866              if (symlink ("conftest.f", "conftest.lnk2"))
30867                result |= 2;
30868              else if (!symlink ("a", "conftest.lnk2/"))
30869                result |= 4;
30870              return result;
30871
30872   ;
30873   return 0;
30874 }
30875 _ACEOF
30876 if ac_fn_c_try_run "$LINENO"; then :
30877   gl_cv_func_symlink_works=yes
30878 else
30879   gl_cv_func_symlink_works=no
30880 fi
30881 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30882   conftest.$ac_objext conftest.beam conftest.$ac_ext
30883 fi
30884
30885       rm -f conftest.f conftest.link conftest.lnk2
30886 fi
30887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_symlink_works" >&5
30888 $as_echo "$gl_cv_func_symlink_works" >&6; }
30889     case "$gl_cv_func_symlink_works" in
30890       *yes) ;;
30891       *)
30892         REPLACE_SYMLINK=1
30893         ;;
30894     esac
30895   fi
30896
30897   if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then
30898
30899
30900
30901
30902
30903
30904
30905
30906   gl_LIBOBJS="$gl_LIBOBJS symlink.$ac_objext"
30907
30908   fi
30909
30910
30911
30912
30913
30914           GNULIB_SYMLINK=1
30915
30916
30917
30918
30919
30920 $as_echo "#define GNULIB_TEST_SYMLINK 1" >>confdefs.h
30921
30922
30923
30924
30925
30926
30927
30928
30929   if test $ac_cv_func_symlinkat = no; then
30930     HAVE_SYMLINKAT=0
30931   else
30932     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether symlinkat handles trailing slash correctly" >&5
30933 $as_echo_n "checking whether symlinkat handles trailing slash correctly... " >&6; }
30934 if ${gl_cv_func_symlinkat_works+:} false; then :
30935   $as_echo_n "(cached) " >&6
30936 else
30937   if test "$cross_compiling" = yes; then :
30938   case "$host_os" in
30939                     # Guess yes on glibc systems.
30940             *-gnu*) gl_cv_func_symlinkat_works="guessing yes" ;;
30941                     # If we don't know, assume the worst.
30942             *)      gl_cv_func_symlinkat_works="guessing no" ;;
30943           esac
30944
30945 else
30946   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30947 /* end confdefs.h.  */
30948 #include <fcntl.h>
30949              #include <unistd.h>
30950
30951 int
30952 main ()
30953 {
30954 int result = 0;
30955              if (!symlinkat ("a", AT_FDCWD, "conftest.link/"))
30956                result |= 1;
30957              if (symlinkat ("conftest.f", AT_FDCWD, "conftest.lnk2"))
30958                result |= 2;
30959              else if (!symlinkat ("a", AT_FDCWD, "conftest.lnk2/"))
30960                result |= 4;
30961              return result;
30962
30963   ;
30964   return 0;
30965 }
30966 _ACEOF
30967 if ac_fn_c_try_run "$LINENO"; then :
30968   gl_cv_func_symlinkat_works=yes
30969 else
30970   gl_cv_func_symlinkat_works=no
30971 fi
30972 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30973   conftest.$ac_objext conftest.beam conftest.$ac_ext
30974 fi
30975
30976       rm -f conftest.f conftest.link conftest.lnk2
30977 fi
30978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_symlinkat_works" >&5
30979 $as_echo "$gl_cv_func_symlinkat_works" >&6; }
30980     case "$gl_cv_func_symlinkat_works" in
30981       *yes) ;;
30982       *)
30983         REPLACE_SYMLINKAT=1
30984         ;;
30985     esac
30986   fi
30987
30988   if test $HAVE_SYMLINKAT = 0 || test $REPLACE_SYMLINKAT = 1; then
30989
30990
30991
30992
30993
30994
30995
30996
30997   gl_LIBOBJS="$gl_LIBOBJS symlinkat.$ac_objext"
30998
30999   fi
31000
31001
31002
31003
31004
31005           GNULIB_SYMLINKAT=1
31006
31007
31008
31009
31010
31011 $as_echo "#define GNULIB_TEST_SYMLINKAT 1" >>confdefs.h
31012
31013
31014
31015
31016
31017
31018
31019
31020
31021
31022
31023
31024
31025
31026
31027
31028
31029      if test $gl_cv_have_include_next = yes; then
31030        gl_cv_next_sys_stat_h='<'sys/stat.h'>'
31031      else
31032        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
31033 $as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
31034 if ${gl_cv_next_sys_stat_h+:} false; then :
31035   $as_echo_n "(cached) " >&6
31036 else
31037
31038              if test $ac_cv_header_sys_stat_h = yes; then
31039
31040
31041
31042
31043   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31044 /* end confdefs.h.  */
31045 #include <sys/stat.h>
31046 _ACEOF
31047                 case "$host_os" in
31048     aix*) gl_absname_cpp="$ac_cpp -C" ;;
31049     *)    gl_absname_cpp="$ac_cpp" ;;
31050   esac
31051
31052   case "$host_os" in
31053     mingw*)
31054                                           gl_dirsep_regex='[/\\]'
31055       ;;
31056     *)
31057       gl_dirsep_regex='\/'
31058       ;;
31059   esac
31060       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
31061   gl_header_literal_regex=`echo 'sys/stat.h' \
31062                            | sed -e "$gl_make_literal_regex_sed"`
31063   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
31064       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
31065       s|^/[^/]|//&|
31066       p
31067       q
31068     }'
31069
31070         gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
31071   sed -n "$gl_absolute_header_sed"`
31072
31073            gl_header=$gl_cv_absolute_sys_stat_h
31074            gl_cv_next_sys_stat_h='"'$gl_header'"'
31075           else
31076                gl_cv_next_sys_stat_h='<'sys/stat.h'>'
31077              fi
31078
31079
31080 fi
31081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
31082 $as_echo "$gl_cv_next_sys_stat_h" >&6; }
31083      fi
31084      NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
31085
31086      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
31087        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
31088        gl_next_as_first_directive='<'sys/stat.h'>'
31089      else
31090        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
31091        gl_next_as_first_directive=$gl_cv_next_sys_stat_h
31092      fi
31093      NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
31094
31095
31096
31097
31098
31099
31100
31101
31102
31103
31104
31105   if test $WINDOWS_64_BIT_ST_SIZE = 1; then
31106
31107 $as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
31108
31109   fi
31110
31111       ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
31112      #include <sys/stat.h>
31113 "
31114 if test "x$ac_cv_type_nlink_t" = xyes; then :
31115
31116 else
31117
31118 $as_echo "#define nlink_t int" >>confdefs.h
31119
31120 fi
31121
31122
31123
31124     for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat     mknod mknodat stat utimensat; do
31125     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
31126     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
31127 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
31128 if eval \${$as_gl_Symbol+:} false; then :
31129   $as_echo_n "(cached) " >&6
31130 else
31131   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31132 /* end confdefs.h.  */
31133 #include <sys/stat.h>
31134
31135 int
31136 main ()
31137 {
31138 #undef $gl_func
31139   (void) $gl_func;
31140   ;
31141   return 0;
31142 }
31143 _ACEOF
31144 if ac_fn_c_try_compile "$LINENO"; then :
31145   eval "$as_gl_Symbol=yes"
31146 else
31147   eval "$as_gl_Symbol=no"
31148 fi
31149 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31150 fi
31151 eval ac_res=\$$as_gl_Symbol
31152                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
31153 $as_echo "$ac_res" >&6; }
31154     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
31155   cat >>confdefs.h <<_ACEOF
31156 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
31157 _ACEOF
31158
31159                      eval ac_cv_have_decl_$gl_func=yes
31160 fi
31161       done
31162
31163
31164
31165
31166
31167
31168
31169
31170
31171
31172
31173   if test $ac_cv_header_sysexits_h = yes; then
31174     HAVE_SYSEXITS_H=1
31175
31176
31177
31178
31179
31180
31181
31182
31183
31184      if test $gl_cv_have_include_next = yes; then
31185        gl_cv_next_sysexits_h='<'sysexits.h'>'
31186      else
31187        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sysexits.h>" >&5
31188 $as_echo_n "checking absolute name of <sysexits.h>... " >&6; }
31189 if ${gl_cv_next_sysexits_h+:} false; then :
31190   $as_echo_n "(cached) " >&6
31191 else
31192
31193              if test $ac_cv_header_sysexits_h = yes; then
31194
31195
31196
31197
31198   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31199 /* end confdefs.h.  */
31200 #include <sysexits.h>
31201 _ACEOF
31202                 case "$host_os" in
31203     aix*) gl_absname_cpp="$ac_cpp -C" ;;
31204     *)    gl_absname_cpp="$ac_cpp" ;;
31205   esac
31206
31207   case "$host_os" in
31208     mingw*)
31209                                           gl_dirsep_regex='[/\\]'
31210       ;;
31211     *)
31212       gl_dirsep_regex='\/'
31213       ;;
31214   esac
31215       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
31216   gl_header_literal_regex=`echo 'sysexits.h' \
31217                            | sed -e "$gl_make_literal_regex_sed"`
31218   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
31219       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
31220       s|^/[^/]|//&|
31221       p
31222       q
31223     }'
31224
31225         gl_cv_absolute_sysexits_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
31226   sed -n "$gl_absolute_header_sed"`
31227
31228            gl_header=$gl_cv_absolute_sysexits_h
31229            gl_cv_next_sysexits_h='"'$gl_header'"'
31230           else
31231                gl_cv_next_sysexits_h='<'sysexits.h'>'
31232              fi
31233
31234
31235 fi
31236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sysexits_h" >&5
31237 $as_echo "$gl_cv_next_sysexits_h" >&6; }
31238      fi
31239      NEXT_SYSEXITS_H=$gl_cv_next_sysexits_h
31240
31241      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
31242        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
31243        gl_next_as_first_directive='<'sysexits.h'>'
31244      else
31245        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
31246        gl_next_as_first_directive=$gl_cv_next_sysexits_h
31247      fi
31248      NEXT_AS_FIRST_DIRECTIVE_SYSEXITS_H=$gl_next_as_first_directive
31249
31250
31251
31252
31253     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31254 /* end confdefs.h.  */
31255 #include <sysexits.h>
31256 int
31257 main ()
31258 {
31259 switch (0)
31260           {
31261           case EX_OK:
31262           case EX_USAGE:
31263           case EX_DATAERR:
31264           case EX_NOINPUT:
31265           case EX_NOUSER:
31266           case EX_NOHOST:
31267           case EX_UNAVAILABLE:
31268           case EX_SOFTWARE:
31269           case EX_OSERR:
31270           case EX_OSFILE:
31271           case EX_CANTCREAT:
31272           case EX_IOERR:
31273           case EX_TEMPFAIL:
31274           case EX_PROTOCOL:
31275           case EX_NOPERM:
31276           case EX_CONFIG:
31277             break;
31278           }
31279
31280   ;
31281   return 0;
31282 }
31283 _ACEOF
31284 if ac_fn_c_try_compile "$LINENO"; then :
31285   SYSEXITS_H=
31286 else
31287   SYSEXITS_H=sysexits.h
31288 fi
31289 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31290   else
31291     HAVE_SYSEXITS_H=0
31292     SYSEXITS_H=sysexits.h
31293   fi
31294
31295
31296    if test -n "$SYSEXITS_H"; then
31297   GL_GENERATE_SYSEXITS_H_TRUE=
31298   GL_GENERATE_SYSEXITS_H_FALSE='#'
31299 else
31300   GL_GENERATE_SYSEXITS_H_TRUE='#'
31301   GL_GENERATE_SYSEXITS_H_FALSE=
31302 fi
31303
31304
31305
31306
31307   :
31308
31309
31310
31311
31312
31313
31314
31315
31316
31317
31318
31319       ac_fn_c_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "#include <time.h>
31320 "
31321 if test "x$ac_cv_have_decl_localtime_r" = xyes; then :
31322   ac_have_decl=1
31323 else
31324   ac_have_decl=0
31325 fi
31326
31327 cat >>confdefs.h <<_ACEOF
31328 #define HAVE_DECL_LOCALTIME_R $ac_have_decl
31329 _ACEOF
31330
31331   if test $ac_cv_have_decl_localtime_r = no; then
31332     HAVE_DECL_LOCALTIME_R=0
31333   fi
31334
31335
31336   if test $ac_cv_func_localtime_r = yes; then
31337     HAVE_LOCALTIME_R=1
31338     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5
31339 $as_echo_n "checking whether localtime_r is compatible with its POSIX signature... " >&6; }
31340 if ${gl_cv_time_r_posix+:} false; then :
31341   $as_echo_n "(cached) " >&6
31342 else
31343   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31344 /* end confdefs.h.  */
31345 #include <time.h>
31346 int
31347 main ()
31348 {
31349 /* We don't need to append 'restrict's to the argument types,
31350                  even though the POSIX signature has the 'restrict's,
31351                  since C99 says they can't affect type compatibility.  */
31352               struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r;
31353               if (ptr) return 0;
31354               /* Check the return type is a pointer.
31355                  On HP-UX 10 it is 'int'.  */
31356               *localtime_r (0, 0);
31357   ;
31358   return 0;
31359 }
31360
31361 _ACEOF
31362 if ac_fn_c_try_compile "$LINENO"; then :
31363   gl_cv_time_r_posix=yes
31364 else
31365   gl_cv_time_r_posix=no
31366 fi
31367 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31368
31369 fi
31370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_r_posix" >&5
31371 $as_echo "$gl_cv_time_r_posix" >&6; }
31372     if test $gl_cv_time_r_posix = yes; then
31373       REPLACE_LOCALTIME_R=0
31374     else
31375       REPLACE_LOCALTIME_R=1
31376     fi
31377   else
31378     HAVE_LOCALTIME_R=0
31379   fi
31380
31381   if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
31382
31383
31384
31385
31386
31387
31388
31389
31390   gl_LIBOBJS="$gl_LIBOBJS time_r.$ac_objext"
31391
31392
31393   :
31394
31395   fi
31396
31397
31398
31399
31400
31401           GNULIB_TIME_R=1
31402
31403
31404
31405
31406
31407 $as_echo "#define GNULIB_TEST_TIME_R 1" >>confdefs.h
31408
31409
31410
31411
31412
31413
31414
31415
31416
31417   ac_fn_c_check_type "$LINENO" "timezone_t" "ac_cv_type_timezone_t" "#include <time.h>
31418 "
31419 if test "x$ac_cv_type_timezone_t" = xyes; then :
31420
31421 cat >>confdefs.h <<_ACEOF
31422 #define HAVE_TIMEZONE_T 1
31423 _ACEOF
31424
31425
31426 fi
31427
31428   if test "$ac_cv_type_timezone_t" = yes; then
31429     HAVE_TIMEZONE_T=1
31430   fi
31431
31432   if test "$HAVE_TIMEZONE_T" = 0; then
31433
31434
31435
31436
31437
31438
31439
31440
31441   gl_LIBOBJS="$gl_LIBOBJS time_rz.$ac_objext"
31442
31443   fi
31444
31445
31446
31447
31448
31449           GNULIB_TIME_RZ=1
31450
31451
31452
31453
31454
31455 $as_echo "#define GNULIB_TEST_TIME_RZ 1" >>confdefs.h
31456
31457
31458
31459
31460
31461
31462   REPLACE_TIMEGM=0
31463
31464   if test $ac_cv_func_timegm = yes; then
31465     if test $gl_cv_func_working_mktime = no; then
31466       # Assume that timegm is buggy if mktime is.
31467       REPLACE_TIMEGM=1
31468     fi
31469   else
31470     HAVE_TIMEGM=0
31471   fi
31472
31473   if test $HAVE_TIMEGM = 0 || test $REPLACE_TIMEGM = 1; then
31474
31475
31476
31477
31478
31479
31480
31481
31482   gl_LIBOBJS="$gl_LIBOBJS timegm.$ac_objext"
31483
31484
31485   :
31486
31487   fi
31488
31489
31490
31491
31492
31493           GNULIB_TIMEGM=1
31494
31495
31496
31497
31498
31499 $as_echo "#define GNULIB_TEST_TIMEGM 1" >>confdefs.h
31500
31501
31502
31503   :
31504
31505
31506
31507
31508
31509
31510
31511
31512
31513
31514
31515
31516      if test $gl_cv_have_include_next = yes; then
31517        gl_cv_next_unistd_h='<'unistd.h'>'
31518      else
31519        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
31520 $as_echo_n "checking absolute name of <unistd.h>... " >&6; }
31521 if ${gl_cv_next_unistd_h+:} false; then :
31522   $as_echo_n "(cached) " >&6
31523 else
31524
31525              if test $ac_cv_header_unistd_h = yes; then
31526
31527
31528
31529
31530   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31531 /* end confdefs.h.  */
31532 #include <unistd.h>
31533 _ACEOF
31534                 case "$host_os" in
31535     aix*) gl_absname_cpp="$ac_cpp -C" ;;
31536     *)    gl_absname_cpp="$ac_cpp" ;;
31537   esac
31538
31539   case "$host_os" in
31540     mingw*)
31541                                           gl_dirsep_regex='[/\\]'
31542       ;;
31543     *)
31544       gl_dirsep_regex='\/'
31545       ;;
31546   esac
31547       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
31548   gl_header_literal_regex=`echo 'unistd.h' \
31549                            | sed -e "$gl_make_literal_regex_sed"`
31550   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
31551       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
31552       s|^/[^/]|//&|
31553       p
31554       q
31555     }'
31556
31557         gl_cv_absolute_unistd_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
31558   sed -n "$gl_absolute_header_sed"`
31559
31560            gl_header=$gl_cv_absolute_unistd_h
31561            gl_cv_next_unistd_h='"'$gl_header'"'
31562           else
31563                gl_cv_next_unistd_h='<'unistd.h'>'
31564              fi
31565
31566
31567 fi
31568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
31569 $as_echo "$gl_cv_next_unistd_h" >&6; }
31570      fi
31571      NEXT_UNISTD_H=$gl_cv_next_unistd_h
31572
31573      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
31574        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
31575        gl_next_as_first_directive='<'unistd.h'>'
31576      else
31577        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
31578        gl_next_as_first_directive=$gl_cv_next_unistd_h
31579      fi
31580      NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
31581
31582
31583
31584
31585   if test $ac_cv_header_unistd_h = yes; then
31586     HAVE_UNISTD_H=1
31587   else
31588     HAVE_UNISTD_H=0
31589   fi
31590
31591
31592
31593
31594
31595
31596
31597     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
31598     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
31599     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
31600 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
31601 if eval \${$as_gl_Symbol+:} false; then :
31602   $as_echo_n "(cached) " >&6
31603 else
31604   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31605 /* end confdefs.h.  */
31606
31607 #if HAVE_UNISTD_H
31608 # include <unistd.h>
31609 #endif
31610 /* Some systems declare various items in the wrong headers.  */
31611 #if !(defined __GLIBC__ && !defined __UCLIBC__)
31612 # include <fcntl.h>
31613 # include <stdio.h>
31614 # include <stdlib.h>
31615 # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
31616 #  include <io.h>
31617 # endif
31618 #endif
31619
31620 int
31621 main ()
31622 {
31623 #undef $gl_func
31624   (void) $gl_func;
31625   ;
31626   return 0;
31627 }
31628 _ACEOF
31629 if ac_fn_c_try_compile "$LINENO"; then :
31630   eval "$as_gl_Symbol=yes"
31631 else
31632   eval "$as_gl_Symbol=no"
31633 fi
31634 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31635 fi
31636 eval ac_res=\$$as_gl_Symbol
31637                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
31638 $as_echo "$ac_res" >&6; }
31639     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
31640   cat >>confdefs.h <<_ACEOF
31641 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
31642 _ACEOF
31643
31644                      eval ac_cv_have_decl_$gl_func=yes
31645 fi
31646       done
31647
31648
31649
31650
31651
31652
31653
31654       if  { test "$HAVE_LIBUNISTRING" != yes \
31655     || {
31656
31657
31658
31659             test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
31660             || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
31661                  && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
31662                       || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
31663                            && test $LIBUNISTRING_VERSION_SUBMINOR -lt 4
31664                          }
31665                     }
31666                }
31667
31668
31669
31670
31671        }
31672   }; then
31673     LIBUNISTRING_UNITYPES_H='unitypes.h'
31674   else
31675     LIBUNISTRING_UNITYPES_H=
31676   fi
31677
31678
31679
31680
31681       if  { test "$HAVE_LIBUNISTRING" != yes \
31682     || {
31683
31684
31685
31686             test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
31687             || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
31688                  && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
31689                       || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
31690                            && test $LIBUNISTRING_VERSION_SUBMINOR -lt 4
31691                          }
31692                     }
31693                }
31694
31695
31696
31697
31698        }
31699   }; then
31700     LIBUNISTRING_UNIWIDTH_H='uniwidth.h'
31701   else
31702     LIBUNISTRING_UNIWIDTH_H=
31703   fi
31704
31705
31706
31707
31708        if  { test "$HAVE_LIBUNISTRING" != yes \
31709     || {
31710
31711
31712
31713             test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
31714             || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
31715                  && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
31716                       || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
31717                            && test $LIBUNISTRING_VERSION_SUBMINOR -lt 6
31718                          }
31719                     }
31720                }
31721
31722
31723
31724
31725        }
31726   }; then
31727   LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE=
31728   LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE='#'
31729 else
31730   LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE='#'
31731   LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE=
31732 fi
31733
31734
31735
31736
31737
31738
31739
31740     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unlink honors trailing slashes" >&5
31741 $as_echo_n "checking whether unlink honors trailing slashes... " >&6; }
31742 if ${gl_cv_func_unlink_honors_slashes+:} false; then :
31743   $as_echo_n "(cached) " >&6
31744 else
31745   touch conftest.file
31746      # Assume that if we have lstat, we can also check symlinks.
31747      if test $ac_cv_func_lstat = yes; then
31748        ln -s conftest.file conftest.lnk
31749      fi
31750      if test "$cross_compiling" = yes; then :
31751   case "$host_os" in
31752                  # Guess yes on glibc systems.
31753          *-gnu*) gl_cv_func_unlink_honors_slashes="guessing yes" ;;
31754                  # If we don't know, assume the worst.
31755          *)      gl_cv_func_unlink_honors_slashes="guessing no" ;;
31756        esac
31757
31758 else
31759   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31760 /* end confdefs.h.  */
31761 #if HAVE_UNISTD_H
31762            # include <unistd.h>
31763            #else /* on Windows with MSVC */
31764            # include <io.h>
31765            #endif
31766            #include <errno.h>
31767
31768 int
31769 main ()
31770 {
31771 int result = 0;
31772            if (!unlink ("conftest.file/"))
31773              result |= 1;
31774            else if (errno != ENOTDIR)
31775              result |= 2;
31776 #if HAVE_LSTAT
31777            if (!unlink ("conftest.lnk/"))
31778              result |= 4;
31779            else if (errno != ENOTDIR)
31780              result |= 8;
31781 #endif
31782            return result;
31783
31784   ;
31785   return 0;
31786 }
31787 _ACEOF
31788 if ac_fn_c_try_run "$LINENO"; then :
31789   gl_cv_func_unlink_honors_slashes=yes
31790 else
31791   gl_cv_func_unlink_honors_slashes=no
31792 fi
31793 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31794   conftest.$ac_objext conftest.beam conftest.$ac_ext
31795 fi
31796
31797      rm -f conftest.file conftest.lnk
31798 fi
31799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unlink_honors_slashes" >&5
31800 $as_echo "$gl_cv_func_unlink_honors_slashes" >&6; }
31801   case "$gl_cv_func_unlink_honors_slashes" in
31802     *no)
31803       REPLACE_UNLINK=1
31804       ;;
31805   esac
31806
31807       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unlink of a parent directory fails as it should" >&5
31808 $as_echo_n "checking whether unlink of a parent directory fails as it should... " >&6; }
31809 if ${gl_cv_func_unlink_parent_fails+:} false; then :
31810   $as_echo_n "(cached) " >&6
31811 else
31812   case "$host_os" in
31813        darwin*)
31814                                                       if {
31815               # Use the mktemp program if available. If not available, hide the error
31816               # message.
31817               tmp=`(umask 077 && mktemp -d /tmp/gtXXXXXX) 2>/dev/null` &&
31818               test -n "$tmp" && test -d "$tmp"
31819             } ||
31820             {
31821               # Use a simple mkdir command. It is guaranteed to fail if the directory
31822               # already exists.  $RANDOM is bash specific and expands to empty in shells
31823               # other than bash, ksh and zsh.  Its use does not increase security;
31824               # rather, it minimizes the probability of failure in a very cluttered /tmp
31825               # directory.
31826               tmp=/tmp/gt$$-$RANDOM
31827               (umask 077 && mkdir "$tmp")
31828             }; then
31829            mkdir "$tmp/subdir"
31830            GL_SUBDIR_FOR_UNLINK="$tmp/subdir"
31831            export GL_SUBDIR_FOR_UNLINK
31832            if test "$cross_compiling" = yes; then :
31833   # If we don't know, assume the worst.
31834               gl_cv_func_unlink_parent_fails="guessing no"
31835
31836 else
31837   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31838 /* end confdefs.h.  */
31839
31840                 #include <stdlib.h>
31841                 #if HAVE_UNISTD_H
31842                 # include <unistd.h>
31843                 #else /* on Windows with MSVC */
31844                 # include <direct.h>
31845                 # include <io.h>
31846                 #endif
31847                 int main ()
31848                 {
31849                   int result = 0;
31850                   if (chdir (getenv ("GL_SUBDIR_FOR_UNLINK")) != 0)
31851                     result |= 1;
31852                   else if (unlink ("..") == 0)
31853                     result |= 2;
31854                   return result;
31855                 }
31856
31857 _ACEOF
31858 if ac_fn_c_try_run "$LINENO"; then :
31859   gl_cv_func_unlink_parent_fails=yes
31860 else
31861   gl_cv_func_unlink_parent_fails=no
31862 fi
31863 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31864   conftest.$ac_objext conftest.beam conftest.$ac_ext
31865 fi
31866
31867            unset GL_SUBDIR_FOR_UNLINK
31868            rm -rf "$tmp"
31869          else
31870            gl_cv_func_unlink_parent_fails="guessing no"
31871          fi
31872          ;;
31873        *)
31874          gl_cv_func_unlink_parent_fails="guessing yes"
31875          ;;
31876      esac
31877
31878 fi
31879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unlink_parent_fails" >&5
31880 $as_echo "$gl_cv_func_unlink_parent_fails" >&6; }
31881   case "$gl_cv_func_unlink_parent_fails" in
31882     *no)
31883       REPLACE_UNLINK=1
31884
31885 $as_echo "#define UNLINK_PARENT_BUG 1" >>confdefs.h
31886
31887       ;;
31888   esac
31889
31890   if test $REPLACE_UNLINK = 1; then
31891
31892
31893
31894
31895
31896
31897
31898
31899   gl_LIBOBJS="$gl_LIBOBJS unlink.$ac_objext"
31900
31901   fi
31902
31903
31904
31905
31906
31907           GNULIB_UNLINK=1
31908
31909
31910
31911
31912
31913 $as_echo "#define GNULIB_TEST_UNLINK 1" >>confdefs.h
31914
31915
31916
31917
31918
31919
31920
31921
31922
31923   if test $ac_cv_func_unlinkat = no; then
31924     HAVE_UNLINKAT=0
31925   else
31926     case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
31927       *no)
31928         # Solaris 9 has *at functions, but uniformly mishandles trailing
31929         # slash in all of them.
31930         REPLACE_UNLINKAT=1
31931         ;;
31932       *)
31933         # GNU/Hurd has unlinkat, but it has the same bug as unlink.
31934         # Darwin has unlinkat, but it has the same UNLINK_PARENT_BUG.
31935         if test $REPLACE_UNLINK = 1; then
31936           REPLACE_UNLINKAT=1
31937         fi
31938         ;;
31939     esac
31940   fi
31941
31942   if test $HAVE_UNLINKAT = 0 || test $REPLACE_UNLINKAT = 1; then
31943
31944
31945
31946
31947
31948
31949
31950
31951   gl_LIBOBJS="$gl_LIBOBJS unlinkat.$ac_objext"
31952
31953   fi
31954
31955
31956
31957
31958
31959           GNULIB_UNLINKAT=1
31960
31961
31962
31963
31964
31965 $as_echo "#define GNULIB_TEST_UNLINKAT 1" >>confdefs.h
31966
31967
31968
31969
31970
31971
31972
31973   # The Hurd, the Linux kernel, the FreeBSD kernel version 2.2 and later,
31974   # Cygwin, and mingw never let anyone (even root) unlink directories.
31975   # If anyone knows of another system for which unlink can never
31976   # remove a directory, please report it to <bug-coreutils@gnu.org>.
31977   # Unfortunately this is difficult to test for, since it requires root access
31978   # and might create garbage in the file system,
31979   # so the code below simply relies on the kernel name and version number.
31980   case $host_os in
31981   gnu[0-9]* | \
31982   linux-* | linux | \
31983   freebsd2.2* | freebsd[3-9]* | freebsd[1-9][0-9]* | \
31984   cygwin | \
31985   mingw*)
31986
31987 $as_echo "#define UNLINK_CANNOT_UNLINK_DIR 1" >>confdefs.h
31988 ;;
31989   esac
31990
31991
31992
31993 $as_echo "#define USE_UNLOCKED_IO 1" >>confdefs.h
31994
31995
31996
31997
31998
31999
32000
32001
32002
32003
32004
32005
32006
32007
32008
32009
32010
32011
32012
32013
32014
32015   if test $ac_cv_have_decl_unsetenv = no; then
32016     HAVE_DECL_UNSETENV=0
32017   fi
32018   for ac_func in unsetenv
32019 do :
32020   ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
32021 if test "x$ac_cv_func_unsetenv" = xyes; then :
32022   cat >>confdefs.h <<_ACEOF
32023 #define HAVE_UNSETENV 1
32024 _ACEOF
32025
32026 fi
32027 done
32028
32029   if test $ac_cv_func_unsetenv = no; then
32030     HAVE_UNSETENV=0
32031   else
32032     HAVE_UNSETENV=1
32033         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5
32034 $as_echo_n "checking for unsetenv() return type... " >&6; }
32035 if ${gt_cv_func_unsetenv_ret+:} false; then :
32036   $as_echo_n "(cached) " >&6
32037 else
32038   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32039 /* end confdefs.h.  */
32040
32041 #undef _BSD
32042 #define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */
32043 #include <stdlib.h>
32044 extern
32045 #ifdef __cplusplus
32046 "C"
32047 #endif
32048 int unsetenv (const char *name);
32049
32050 int
32051 main ()
32052 {
32053
32054   ;
32055   return 0;
32056 }
32057 _ACEOF
32058 if ac_fn_c_try_compile "$LINENO"; then :
32059   gt_cv_func_unsetenv_ret='int'
32060 else
32061   gt_cv_func_unsetenv_ret='void'
32062 fi
32063 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32064 fi
32065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5
32066 $as_echo "$gt_cv_func_unsetenv_ret" >&6; }
32067     if test $gt_cv_func_unsetenv_ret = 'void'; then
32068
32069 $as_echo "#define VOID_UNSETENV 1" >>confdefs.h
32070
32071       REPLACE_UNSETENV=1
32072     fi
32073
32074                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5
32075 $as_echo_n "checking whether unsetenv obeys POSIX... " >&6; }
32076 if ${gl_cv_func_unsetenv_works+:} false; then :
32077   $as_echo_n "(cached) " >&6
32078 else
32079   if test "$cross_compiling" = yes; then :
32080   case "$host_os" in
32081                  # Guess yes on glibc systems.
32082          *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
32083                  # If we don't know, assume the worst.
32084          *)      gl_cv_func_unsetenv_works="guessing no" ;;
32085        esac
32086
32087 else
32088   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32089 /* end confdefs.h.  */
32090
32091        #include <stdlib.h>
32092        #include <errno.h>
32093        extern char **environ;
32094
32095 int
32096 main ()
32097 {
32098
32099        char entry1[] = "a=1";
32100        char entry2[] = "b=2";
32101        char *env[] = { entry1, entry2, NULL };
32102        if (putenv ((char *) "a=1")) return 1;
32103        if (putenv (entry2)) return 2;
32104        entry2[0] = 'a';
32105        unsetenv ("a");
32106        if (getenv ("a")) return 3;
32107        if (!unsetenv ("") || errno != EINVAL) return 4;
32108        entry2[0] = 'b';
32109        environ = env;
32110        if (!getenv ("a")) return 5;
32111        entry2[0] = 'a';
32112        unsetenv ("a");
32113        if (getenv ("a")) return 6;
32114
32115   ;
32116   return 0;
32117 }
32118 _ACEOF
32119 if ac_fn_c_try_run "$LINENO"; then :
32120   gl_cv_func_unsetenv_works=yes
32121 else
32122   gl_cv_func_unsetenv_works=no
32123 fi
32124 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32125   conftest.$ac_objext conftest.beam conftest.$ac_ext
32126 fi
32127
32128 fi
32129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
32130 $as_echo "$gl_cv_func_unsetenv_works" >&6; }
32131     case "$gl_cv_func_unsetenv_works" in
32132       *yes) ;;
32133       *)
32134         REPLACE_UNSETENV=1
32135         ;;
32136     esac
32137   fi
32138
32139   if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
32140
32141
32142
32143
32144
32145
32146
32147
32148   gl_LIBOBJS="$gl_LIBOBJS unsetenv.$ac_objext"
32149
32150
32151
32152
32153
32154   fi
32155
32156
32157
32158
32159
32160           GNULIB_UNSETENV=1
32161
32162
32163
32164
32165
32166 $as_echo "#define GNULIB_TEST_UNSETENV 1" >>confdefs.h
32167
32168
32169
32170
32171
32172
32173
32174
32175
32176   if test $ac_cv_func_futimens = no && test $ac_cv_func_futimesat = yes; then
32177                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether futimesat handles NULL file" >&5
32178 $as_echo_n "checking whether futimesat handles NULL file... " >&6; }
32179 if ${gl_cv_func_futimesat_works+:} false; then :
32180   $as_echo_n "(cached) " >&6
32181 else
32182   touch conftest.file
32183        if test "$cross_compiling" = yes; then :
32184   case "$host_os" in
32185                    # Guess yes on glibc systems.
32186            *-gnu*) gl_cv_func_futimesat_works="guessing yes" ;;
32187                    # If we don't know, assume the worst.
32188            *)      gl_cv_func_futimesat_works="guessing no" ;;
32189          esac
32190
32191 else
32192   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32193 /* end confdefs.h.  */
32194
32195 #include <stddef.h>
32196 #include <sys/times.h>
32197 #include <fcntl.h>
32198
32199 int
32200 main ()
32201 {
32202     int fd = open ("conftest.file", O_RDWR);
32203           if (fd < 0) return 1;
32204           if (futimesat (fd, NULL, NULL)) return 2;
32205
32206   ;
32207   return 0;
32208 }
32209 _ACEOF
32210 if ac_fn_c_try_run "$LINENO"; then :
32211   gl_cv_func_futimesat_works=yes
32212 else
32213   gl_cv_func_futimesat_works=no
32214 fi
32215 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32216   conftest.$ac_objext conftest.beam conftest.$ac_ext
32217 fi
32218
32219       rm -f conftest.file
32220 fi
32221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_futimesat_works" >&5
32222 $as_echo "$gl_cv_func_futimesat_works" >&6; }
32223     case "$gl_cv_func_futimesat_works" in
32224       *yes) ;;
32225       *)
32226
32227 $as_echo "#define FUTIMESAT_NULL_BUG 1" >>confdefs.h
32228
32229         ;;
32230     esac
32231   fi
32232
32233
32234
32235
32236
32237   if test $ac_cv_func_utimensat = no; then
32238     HAVE_UTIMENSAT=0
32239   else
32240     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether utimensat works" >&5
32241 $as_echo_n "checking whether utimensat works... " >&6; }
32242 if ${gl_cv_func_utimensat_works+:} false; then :
32243   $as_echo_n "(cached) " >&6
32244 else
32245   if test "$cross_compiling" = yes; then :
32246   gl_cv_func_utimensat_works="guessing no"
32247 else
32248   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32249 /* end confdefs.h.  */
32250
32251 #include <fcntl.h>
32252 #include <sys/stat.h>
32253 #include <unistd.h>
32254
32255 int
32256 main ()
32257 {
32258 int result = 0;
32259               const char *f = "conftest.file";
32260               if (close (creat (f, 0600)))
32261                 return 1;
32262               /* Test whether the AT_SYMLINK_NOFOLLOW flag is supported.  */
32263               {
32264                 if (utimensat (AT_FDCWD, f, NULL, AT_SYMLINK_NOFOLLOW))
32265                   result |= 2;
32266               }
32267               /* Test whether UTIME_NOW and UTIME_OMIT work.  */
32268               {
32269                 struct timespec ts[2] = { { 1, UTIME_OMIT }, { 1, UTIME_NOW } };
32270                 if (utimensat (AT_FDCWD, f, ts, 0))
32271                   result |= 4;
32272               }
32273               sleep (1);
32274               {
32275                 struct timespec ts[2] = { { 1, UTIME_NOW }, { 1, UTIME_OMIT } };
32276                 struct stat st;
32277                 if (utimensat (AT_FDCWD, f, ts, 0))
32278                   result |= 8;
32279                 if (stat (f, &st))
32280                   result |= 16;
32281                 else if (st.st_ctime < st.st_atime)
32282                   result |= 32;
32283               }
32284               return result;
32285
32286   ;
32287   return 0;
32288 }
32289 _ACEOF
32290 if ac_fn_c_try_run "$LINENO"; then :
32291            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32292 /* end confdefs.h.  */
32293
32294 #ifdef __linux__
32295 /* The Linux kernel added utimensat in 2.6.22, but has bugs with UTIME_OMIT
32296    in several file systems as recently as 2.6.32.  Always replace utimensat
32297    to support older kernels.  */
32298 choke me
32299 #endif
32300
32301 int
32302 main ()
32303 {
32304
32305   ;
32306   return 0;
32307 }
32308 _ACEOF
32309 if ac_fn_c_try_compile "$LINENO"; then :
32310   gl_cv_func_utimensat_works=yes
32311 else
32312   gl_cv_func_utimensat_works="needs runtime check"
32313 fi
32314 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32315 else
32316   gl_cv_func_utimensat_works=no
32317 fi
32318 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32319   conftest.$ac_objext conftest.beam conftest.$ac_ext
32320 fi
32321
32322 fi
32323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_utimensat_works" >&5
32324 $as_echo "$gl_cv_func_utimensat_works" >&6; }
32325     if test "$gl_cv_func_utimensat_works" != yes; then
32326       REPLACE_UTIMENSAT=1
32327     fi
32328   fi
32329
32330   if test $HAVE_UTIMENSAT = 0 || test $REPLACE_UTIMENSAT = 1; then
32331
32332
32333
32334
32335
32336
32337
32338
32339   gl_LIBOBJS="$gl_LIBOBJS utimensat.$ac_objext"
32340
32341   fi
32342
32343
32344
32345
32346
32347           GNULIB_UTIMENSAT=1
32348
32349
32350
32351
32352
32353 $as_echo "#define GNULIB_TEST_UTIMENSAT 1" >>confdefs.h
32354
32355
32356
32357
32358
32359   if test $ac_cv_func_vasnprintf = no; then
32360
32361
32362
32363
32364
32365
32366
32367
32368
32369
32370   gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
32371
32372
32373
32374
32375
32376
32377
32378
32379
32380   gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
32381
32382
32383
32384
32385
32386
32387
32388
32389
32390   gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
32391
32392
32393
32394
32395
32396
32397
32398
32399
32400   gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
32401
32402   if test $ac_cv_func_vasnprintf = yes; then
32403
32404 $as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h
32405
32406   fi
32407
32408
32409
32410
32411
32412
32413
32414
32415
32416
32417
32418   ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
32419 if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
32420
32421 else
32422
32423 $as_echo "#define ptrdiff_t long" >>confdefs.h
32424
32425
32426 fi
32427
32428
32429
32430
32431
32432
32433
32434   fi
32435
32436
32437   for ac_func in vasprintf
32438 do :
32439   ac_fn_c_check_func "$LINENO" "vasprintf" "ac_cv_func_vasprintf"
32440 if test "x$ac_cv_func_vasprintf" = xyes; then :
32441   cat >>confdefs.h <<_ACEOF
32442 #define HAVE_VASPRINTF 1
32443 _ACEOF
32444
32445 fi
32446 done
32447
32448   if test $ac_cv_func_vasprintf = no; then
32449
32450
32451
32452
32453
32454
32455
32456
32457
32458   gl_LIBOBJS="$gl_LIBOBJS vasprintf.$ac_objext"
32459
32460
32461
32462
32463
32464
32465
32466
32467
32468   gl_LIBOBJS="$gl_LIBOBJS asprintf.$ac_objext"
32469
32470
32471   if test $ac_cv_func_vasprintf = yes; then
32472     REPLACE_VASPRINTF=1
32473   else
32474     HAVE_VASPRINTF=0
32475   fi
32476
32477
32478
32479
32480
32481
32482
32483
32484   fi
32485
32486
32487
32488
32489
32490
32491           GNULIB_VASPRINTF=1
32492
32493
32494
32495
32496
32497 $as_echo "#define GNULIB_TEST_VASPRINTF 1" >>confdefs.h
32498
32499
32500
32501
32502
32503   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=asprintf:2:c-format"
32504
32505
32506
32507   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=vasprintf:2:c-format"
32508
32509
32510 # Check whether --with-packager was given.
32511 if test "${with_packager+set}" = set; then :
32512   withval=$with_packager;       case $withval in
32513         yes|no) ;;
32514         *)
32515 cat >>confdefs.h <<_ACEOF
32516 #define PACKAGE_PACKAGER "$withval"
32517 _ACEOF
32518  ;;
32519       esac
32520
32521 fi
32522
32523
32524
32525 # Check whether --with-packager-version was given.
32526 if test "${with_packager_version+set}" = set; then :
32527   withval=$with_packager_version;       case $withval in
32528         yes|no) ;;
32529         *)
32530 cat >>confdefs.h <<_ACEOF
32531 #define PACKAGE_PACKAGER_VERSION "$withval"
32532 _ACEOF
32533  ;;
32534       esac
32535
32536 fi
32537
32538
32539
32540 # Check whether --with-packager-bug-reports was given.
32541 if test "${with_packager_bug_reports+set}" = set; then :
32542   withval=$with_packager_bug_reports;       case $withval in
32543         yes|no) ;;
32544         *)
32545 cat >>confdefs.h <<_ACEOF
32546 #define PACKAGE_PACKAGER_BUG_REPORTS "$withval"
32547 _ACEOF
32548  ;;
32549       esac
32550
32551 fi
32552
32553
32554   if test "X$with_packager" = "X" && \
32555      test "X$with_packager_version$with_packager_bug_reports" != "X"
32556   then
32557     as_fn_error $? "The --with-packager-{bug-reports,version} options require --with-packager" "$LINENO" 5
32558   fi
32559
32560
32561
32562   gl_cv_func_vsnprintf_usable=no
32563   for ac_func in vsnprintf
32564 do :
32565   ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
32566 if test "x$ac_cv_func_vsnprintf" = xyes; then :
32567   cat >>confdefs.h <<_ACEOF
32568 #define HAVE_VSNPRINTF 1
32569 _ACEOF
32570
32571 fi
32572 done
32573
32574   if test $ac_cv_func_vsnprintf = yes; then
32575
32576
32577
32578   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf respects a size of 1" >&5
32579 $as_echo_n "checking whether snprintf respects a size of 1... " >&6; }
32580 if ${gl_cv_func_snprintf_size1+:} false; then :
32581   $as_echo_n "(cached) " >&6
32582 else
32583
32584       if test "$cross_compiling" = yes; then :
32585   gl_cv_func_snprintf_size1="guessing yes"
32586 else
32587   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32588 /* end confdefs.h.  */
32589
32590 #include <stdio.h>
32591 #if HAVE_SNPRINTF
32592 # define my_snprintf snprintf
32593 #else
32594 # include <stdarg.h>
32595 static int my_snprintf (char *buf, int size, const char *format, ...)
32596 {
32597   va_list args;
32598   int ret;
32599   va_start (args, format);
32600   ret = vsnprintf (buf, size, format, args);
32601   va_end (args);
32602   return ret;
32603 }
32604 #endif
32605 int main()
32606 {
32607   static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
32608   my_snprintf (buf, 1, "%d", 12345);
32609   return buf[1] != 'E';
32610 }
32611 _ACEOF
32612 if ac_fn_c_try_run "$LINENO"; then :
32613   gl_cv_func_snprintf_size1=yes
32614 else
32615   gl_cv_func_snprintf_size1=no
32616 fi
32617 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32618   conftest.$ac_objext conftest.beam conftest.$ac_ext
32619 fi
32620
32621
32622 fi
32623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_size1" >&5
32624 $as_echo "$gl_cv_func_snprintf_size1" >&6; }
32625
32626     case "$gl_cv_func_snprintf_size1" in
32627       *yes)
32628
32629         case "$gl_cv_func_snprintf_retval_c99" in
32630           *yes)
32631
32632
32633      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports POSIX/XSI format strings with positions" >&5
32634 $as_echo_n "checking whether printf supports POSIX/XSI format strings with positions... " >&6; }
32635 if ${gl_cv_func_printf_positions+:} false; then :
32636   $as_echo_n "(cached) " >&6
32637 else
32638
32639       if test "$cross_compiling" = yes; then :
32640
32641          case "$host_os" in
32642            netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*)
32643                          gl_cv_func_printf_positions="guessing no";;
32644            beos*)        gl_cv_func_printf_positions="guessing no";;
32645            mingw* | pw*) gl_cv_func_printf_positions="guessing no";;
32646            *)            gl_cv_func_printf_positions="guessing yes";;
32647          esac
32648
32649 else
32650   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32651 /* end confdefs.h.  */
32652
32653 #include <stdio.h>
32654 #include <string.h>
32655 /* The string "%2$d %1$d", with dollar characters protected from the shell's
32656    dollar expansion (possibly an autoconf bug).  */
32657 static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
32658 static char buf[100];
32659 int main ()
32660 {
32661   sprintf (buf, format, 33, 55);
32662   return (strcmp (buf, "55 33") != 0);
32663 }
32664 _ACEOF
32665 if ac_fn_c_try_run "$LINENO"; then :
32666   gl_cv_func_printf_positions=yes
32667 else
32668   gl_cv_func_printf_positions=no
32669 fi
32670 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32671   conftest.$ac_objext conftest.beam conftest.$ac_ext
32672 fi
32673
32674
32675 fi
32676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_positions" >&5
32677 $as_echo "$gl_cv_func_printf_positions" >&6; }
32678
32679             case "$gl_cv_func_printf_positions" in
32680               *yes)
32681                 gl_cv_func_vsnprintf_usable=yes
32682                 ;;
32683             esac
32684             ;;
32685         esac
32686         ;;
32687     esac
32688   fi
32689   if test $gl_cv_func_vsnprintf_usable = no; then
32690
32691
32692
32693
32694
32695
32696
32697
32698
32699
32700   gl_LIBOBJS="$gl_LIBOBJS vsnprintf.$ac_objext"
32701
32702   if test $ac_cv_func_vsnprintf = yes; then
32703     REPLACE_VSNPRINTF=1
32704   fi
32705   :
32706
32707   fi
32708
32709   if test $ac_cv_have_decl_vsnprintf = no; then
32710     HAVE_DECL_VSNPRINTF=0
32711   fi
32712
32713
32714
32715
32716
32717
32718           GNULIB_VSNPRINTF=1
32719
32720
32721
32722
32723
32724 $as_echo "#define GNULIB_TEST_VSNPRINTF 1" >>confdefs.h
32725
32726
32727
32728
32729
32730
32731
32732
32733
32734
32735
32736
32737
32738
32739
32740      if test $gl_cv_have_include_next = yes; then
32741        gl_cv_next_wchar_h='<'wchar.h'>'
32742      else
32743        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
32744 $as_echo_n "checking absolute name of <wchar.h>... " >&6; }
32745 if ${gl_cv_next_wchar_h+:} false; then :
32746   $as_echo_n "(cached) " >&6
32747 else
32748
32749              if test $ac_cv_header_wchar_h = yes; then
32750
32751
32752
32753
32754   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32755 /* end confdefs.h.  */
32756 #include <wchar.h>
32757 _ACEOF
32758                 case "$host_os" in
32759     aix*) gl_absname_cpp="$ac_cpp -C" ;;
32760     *)    gl_absname_cpp="$ac_cpp" ;;
32761   esac
32762
32763   case "$host_os" in
32764     mingw*)
32765                                           gl_dirsep_regex='[/\\]'
32766       ;;
32767     *)
32768       gl_dirsep_regex='\/'
32769       ;;
32770   esac
32771       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
32772   gl_header_literal_regex=`echo 'wchar.h' \
32773                            | sed -e "$gl_make_literal_regex_sed"`
32774   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
32775       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
32776       s|^/[^/]|//&|
32777       p
32778       q
32779     }'
32780
32781         gl_cv_absolute_wchar_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
32782   sed -n "$gl_absolute_header_sed"`
32783
32784            gl_header=$gl_cv_absolute_wchar_h
32785            gl_cv_next_wchar_h='"'$gl_header'"'
32786           else
32787                gl_cv_next_wchar_h='<'wchar.h'>'
32788              fi
32789
32790
32791 fi
32792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
32793 $as_echo "$gl_cv_next_wchar_h" >&6; }
32794      fi
32795      NEXT_WCHAR_H=$gl_cv_next_wchar_h
32796
32797      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
32798        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
32799        gl_next_as_first_directive='<'wchar.h'>'
32800      else
32801        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
32802        gl_next_as_first_directive=$gl_cv_next_wchar_h
32803      fi
32804      NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
32805
32806
32807
32808
32809   if test $ac_cv_header_wchar_h = yes; then
32810     HAVE_WCHAR_H=1
32811   else
32812     HAVE_WCHAR_H=0
32813   fi
32814
32815
32816
32817
32818
32819   if test $gt_cv_c_wint_t = yes; then
32820     HAVE_WINT_T=1
32821   else
32822     HAVE_WINT_T=0
32823   fi
32824
32825
32826
32827     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
32828     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
32829     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
32830 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
32831 if eval \${$as_gl_Symbol+:} false; then :
32832   $as_echo_n "(cached) " >&6
32833 else
32834   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32835 /* end confdefs.h.  */
32836
32837 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
32838    <wchar.h>.
32839    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
32840    included before <wchar.h>.  */
32841 #if !(defined __GLIBC__ && !defined __UCLIBC__)
32842 # include <stddef.h>
32843 # include <stdio.h>
32844 # include <time.h>
32845 #endif
32846 #include <wchar.h>
32847
32848 int
32849 main ()
32850 {
32851 #undef $gl_func
32852   (void) $gl_func;
32853   ;
32854   return 0;
32855 }
32856 _ACEOF
32857 if ac_fn_c_try_compile "$LINENO"; then :
32858   eval "$as_gl_Symbol=yes"
32859 else
32860   eval "$as_gl_Symbol=no"
32861 fi
32862 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32863 fi
32864 eval ac_res=\$$as_gl_Symbol
32865                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
32866 $as_echo "$ac_res" >&6; }
32867     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
32868   cat >>confdefs.h <<_ACEOF
32869 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
32870 _ACEOF
32871
32872                      eval ac_cv_have_decl_$gl_func=yes
32873 fi
32874       done
32875
32876
32877
32878
32879
32880
32881
32882
32883
32884
32885
32886
32887   if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
32888
32889
32890
32891      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
32892 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
32893 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
32894   $as_echo_n "(cached) " >&6
32895 else
32896
32897                   case "$host_os" in
32898                      # Guess no on AIX and OSF/1.
32899         aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
32900                      # Guess yes otherwise.
32901         *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
32902       esac
32903       if test $LOCALE_JA != none; then
32904         if test "$cross_compiling" = yes; then :
32905   :
32906 else
32907   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32908 /* end confdefs.h.  */
32909
32910 #include <locale.h>
32911 #include <string.h>
32912 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
32913    <wchar.h>.
32914    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
32915    included before <wchar.h>.  */
32916 #include <stddef.h>
32917 #include <stdio.h>
32918 #include <time.h>
32919 #include <wchar.h>
32920 int main ()
32921 {
32922   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
32923     {
32924       const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
32925       mbstate_t state;
32926       wchar_t wc;
32927
32928       memset (&state, '\0', sizeof (mbstate_t));
32929       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
32930         if (mbsinit (&state))
32931           return 1;
32932     }
32933   return 0;
32934 }
32935 _ACEOF
32936 if ac_fn_c_try_run "$LINENO"; then :
32937   gl_cv_func_mbrtowc_incomplete_state=yes
32938 else
32939   gl_cv_func_mbrtowc_incomplete_state=no
32940 fi
32941 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32942   conftest.$ac_objext conftest.beam conftest.$ac_ext
32943 fi
32944
32945       fi
32946
32947 fi
32948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
32949 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
32950
32951
32952
32953
32954      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
32955 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
32956 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
32957   $as_echo_n "(cached) " >&6
32958 else
32959
32960                   case "$host_os" in
32961                     # Guess no on Solaris 8.
32962         solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
32963                     # Guess yes otherwise.
32964         *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
32965       esac
32966       if test $LOCALE_ZH_CN != none; then
32967         if test "$cross_compiling" = yes; then :
32968   :
32969 else
32970   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32971 /* end confdefs.h.  */
32972
32973 #include <locale.h>
32974 #include <stdlib.h>
32975 #include <string.h>
32976 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
32977    <wchar.h>.
32978    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
32979    included before <wchar.h>.  */
32980 #include <stddef.h>
32981 #include <stdio.h>
32982 #include <time.h>
32983 #include <wchar.h>
32984 int main ()
32985 {
32986   /* This fails on Solaris 8:
32987      mbrtowc returns 2, and sets wc to 0x00F0.
32988      mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
32989   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
32990     {
32991       char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
32992       mbstate_t state;
32993       wchar_t wc;
32994
32995       memset (&state, '\0', sizeof (mbstate_t));
32996       if (mbrtowc (&wc, input + 3, 6, &state) != 4
32997           && mbtowc (&wc, input + 3, 6) == 4)
32998         return 1;
32999     }
33000   return 0;
33001 }
33002 _ACEOF
33003 if ac_fn_c_try_run "$LINENO"; then :
33004   gl_cv_func_mbrtowc_sanitycheck=yes
33005 else
33006   gl_cv_func_mbrtowc_sanitycheck=no
33007 fi
33008 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33009   conftest.$ac_objext conftest.beam conftest.$ac_ext
33010 fi
33011
33012       fi
33013
33014 fi
33015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
33016 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
33017
33018     REPLACE_MBSTATE_T=0
33019     case "$gl_cv_func_mbrtowc_incomplete_state" in
33020       *yes) ;;
33021       *) REPLACE_MBSTATE_T=1 ;;
33022     esac
33023     case "$gl_cv_func_mbrtowc_sanitycheck" in
33024       *yes) ;;
33025       *) REPLACE_MBSTATE_T=1 ;;
33026     esac
33027   else
33028     REPLACE_MBSTATE_T=1
33029   fi
33030
33031
33032
33033   if test $ac_cv_func_wcrtomb = no; then
33034     HAVE_WCRTOMB=0
33035     ac_fn_c_check_decl "$LINENO" "wcrtomb" "ac_cv_have_decl_wcrtomb" "
33036 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
33037    <wchar.h>.
33038    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
33039    included before <wchar.h>.  */
33040 #include <stddef.h>
33041 #include <stdio.h>
33042 #include <time.h>
33043 #include <wchar.h>
33044
33045 "
33046 if test "x$ac_cv_have_decl_wcrtomb" = xyes; then :
33047   ac_have_decl=1
33048 else
33049   ac_have_decl=0
33050 fi
33051
33052 cat >>confdefs.h <<_ACEOF
33053 #define HAVE_DECL_WCRTOMB $ac_have_decl
33054 _ACEOF
33055
33056     if test $ac_cv_have_decl_wcrtomb = yes; then
33057                         REPLACE_WCRTOMB=1
33058     fi
33059   else
33060     if test $REPLACE_MBSTATE_T = 1; then
33061       REPLACE_WCRTOMB=1
33062     else
33063
33064
33065
33066
33067
33068              { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wcrtomb return value is correct" >&5
33069 $as_echo_n "checking whether wcrtomb return value is correct... " >&6; }
33070 if ${gl_cv_func_wcrtomb_retval+:} false; then :
33071   $as_echo_n "(cached) " >&6
33072 else
33073
33074                               case "$host_os" in
33075                                      # Guess no on AIX 4, OSF/1 and Solaris.
33076             aix4* | osf* | solaris*) gl_cv_func_wcrtomb_retval="guessing no" ;;
33077                                      # Guess yes otherwise.
33078             *)                       gl_cv_func_wcrtomb_retval="guessing yes" ;;
33079           esac
33080           if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
33081             if test "$cross_compiling" = yes; then :
33082   :
33083 else
33084   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33085 /* end confdefs.h.  */
33086
33087 #include <locale.h>
33088 #include <string.h>
33089 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
33090    <wchar.h>.
33091    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
33092    included before <wchar.h>.  */
33093 #include <stddef.h>
33094 #include <stdio.h>
33095 #include <time.h>
33096 #include <wchar.h>
33097 int main ()
33098 {
33099   int result = 0;
33100   if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
33101     {
33102       if (wcrtomb (NULL, 0, NULL) != 1)
33103         result |= 1;
33104     }
33105   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
33106     {
33107       if (wcrtomb (NULL, 0, NULL) != 1)
33108         result |= 2;
33109     }
33110   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
33111     {
33112       if (wcrtomb (NULL, 0, NULL) != 1)
33113         result |= 4;
33114     }
33115   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
33116     {
33117       if (wcrtomb (NULL, 0, NULL) != 1)
33118         result |= 8;
33119     }
33120   return result;
33121 }
33122 _ACEOF
33123 if ac_fn_c_try_run "$LINENO"; then :
33124   gl_cv_func_wcrtomb_retval=yes
33125 else
33126   gl_cv_func_wcrtomb_retval=no
33127 fi
33128 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33129   conftest.$ac_objext conftest.beam conftest.$ac_ext
33130 fi
33131
33132           fi
33133
33134 fi
33135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcrtomb_retval" >&5
33136 $as_echo "$gl_cv_func_wcrtomb_retval" >&6; }
33137       case "$gl_cv_func_wcrtomb_retval" in
33138         *yes) ;;
33139         *) REPLACE_WCRTOMB=1 ;;
33140       esac
33141     fi
33142   fi
33143
33144   if test $HAVE_WCRTOMB = 0 || test $REPLACE_WCRTOMB = 1; then
33145
33146
33147
33148
33149
33150
33151
33152
33153   gl_LIBOBJS="$gl_LIBOBJS wcrtomb.$ac_objext"
33154
33155
33156   :
33157
33158   fi
33159
33160
33161
33162
33163
33164           GNULIB_WCRTOMB=1
33165
33166
33167
33168
33169
33170 $as_echo "#define GNULIB_TEST_WCRTOMB 1" >>confdefs.h
33171
33172
33173
33174
33175
33176
33177
33178
33179   if test $ac_cv_func_iswcntrl = yes; then
33180     HAVE_ISWCNTRL=1
33181   else
33182     HAVE_ISWCNTRL=0
33183   fi
33184
33185
33186
33187   if test $gt_cv_c_wint_t = yes; then
33188     HAVE_WINT_T=1
33189   else
33190     HAVE_WINT_T=0
33191   fi
33192
33193
33194
33195
33196
33197
33198
33199
33200
33201
33202
33203      if test $gl_cv_have_include_next = yes; then
33204        gl_cv_next_wctype_h='<'wctype.h'>'
33205      else
33206        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
33207 $as_echo_n "checking absolute name of <wctype.h>... " >&6; }
33208 if ${gl_cv_next_wctype_h+:} false; then :
33209   $as_echo_n "(cached) " >&6
33210 else
33211
33212              if test $ac_cv_header_wctype_h = yes; then
33213
33214
33215
33216
33217   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33218 /* end confdefs.h.  */
33219 #include <wctype.h>
33220 _ACEOF
33221                 case "$host_os" in
33222     aix*) gl_absname_cpp="$ac_cpp -C" ;;
33223     *)    gl_absname_cpp="$ac_cpp" ;;
33224   esac
33225
33226   case "$host_os" in
33227     mingw*)
33228                                           gl_dirsep_regex='[/\\]'
33229       ;;
33230     *)
33231       gl_dirsep_regex='\/'
33232       ;;
33233   esac
33234       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
33235   gl_header_literal_regex=`echo 'wctype.h' \
33236                            | sed -e "$gl_make_literal_regex_sed"`
33237   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
33238       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
33239       s|^/[^/]|//&|
33240       p
33241       q
33242     }'
33243
33244         gl_cv_absolute_wctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
33245   sed -n "$gl_absolute_header_sed"`
33246
33247            gl_header=$gl_cv_absolute_wctype_h
33248            gl_cv_next_wctype_h='"'$gl_header'"'
33249           else
33250                gl_cv_next_wctype_h='<'wctype.h'>'
33251              fi
33252
33253
33254 fi
33255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
33256 $as_echo "$gl_cv_next_wctype_h" >&6; }
33257      fi
33258      NEXT_WCTYPE_H=$gl_cv_next_wctype_h
33259
33260      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
33261        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
33262        gl_next_as_first_directive='<'wctype.h'>'
33263      else
33264        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
33265        gl_next_as_first_directive=$gl_cv_next_wctype_h
33266      fi
33267      NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
33268
33269
33270
33271
33272   if test $ac_cv_header_wctype_h = yes; then
33273     if test $ac_cv_func_iswcntrl = yes; then
33274                   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
33275 $as_echo_n "checking whether iswcntrl works... " >&6; }
33276 if ${gl_cv_func_iswcntrl_works+:} false; then :
33277   $as_echo_n "(cached) " >&6
33278 else
33279
33280           if test "$cross_compiling" = yes; then :
33281   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33282 /* end confdefs.h.  */
33283 #include <stdlib.h>
33284                           #if __GNU_LIBRARY__ == 1
33285                           Linux libc5 i18n is broken.
33286                           #endif
33287 int
33288 main ()
33289 {
33290
33291   ;
33292   return 0;
33293 }
33294 _ACEOF
33295 if ac_fn_c_try_compile "$LINENO"; then :
33296   gl_cv_func_iswcntrl_works="guessing yes"
33297 else
33298   gl_cv_func_iswcntrl_works="guessing no"
33299 fi
33300 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33301
33302 else
33303   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33304 /* end confdefs.h.  */
33305
33306                /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
33307                   included before <wchar.h>.
33308                   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
33309                   must be included before <wchar.h>.  */
33310                #include <stddef.h>
33311                #include <stdio.h>
33312                #include <time.h>
33313                #include <wchar.h>
33314                #include <wctype.h>
33315                int main () { return iswprint ('x') == 0; }
33316
33317 _ACEOF
33318 if ac_fn_c_try_run "$LINENO"; then :
33319   gl_cv_func_iswcntrl_works=yes
33320 else
33321   gl_cv_func_iswcntrl_works=no
33322 fi
33323 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33324   conftest.$ac_objext conftest.beam conftest.$ac_ext
33325 fi
33326
33327
33328 fi
33329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
33330 $as_echo "$gl_cv_func_iswcntrl_works" >&6; }
33331     fi
33332     HAVE_WCTYPE_H=1
33333   else
33334     HAVE_WCTYPE_H=0
33335   fi
33336
33337
33338   case "$gl_cv_func_iswcntrl_works" in
33339     *yes) REPLACE_ISWCNTRL=0 ;;
33340     *)    REPLACE_ISWCNTRL=1 ;;
33341   esac
33342
33343
33344   if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
33345         :
33346   fi
33347
33348   if test $REPLACE_ISWCNTRL = 1; then
33349     REPLACE_TOWLOWER=1
33350   else
33351     for ac_func in towlower
33352 do :
33353   ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
33354 if test "x$ac_cv_func_towlower" = xyes; then :
33355   cat >>confdefs.h <<_ACEOF
33356 #define HAVE_TOWLOWER 1
33357 _ACEOF
33358
33359 fi
33360 done
33361
33362     if test $ac_cv_func_towlower = yes; then
33363       REPLACE_TOWLOWER=0
33364     else
33365       ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
33366              included before <wchar.h>.
33367              BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
33368              must be included before <wchar.h>.  */
33369           #include <stddef.h>
33370           #include <stdio.h>
33371           #include <time.h>
33372           #include <wchar.h>
33373           #if HAVE_WCTYPE_H
33374           # include <wctype.h>
33375           #endif
33376
33377 "
33378 if test "x$ac_cv_have_decl_towlower" = xyes; then :
33379   ac_have_decl=1
33380 else
33381   ac_have_decl=0
33382 fi
33383
33384 cat >>confdefs.h <<_ACEOF
33385 #define HAVE_DECL_TOWLOWER $ac_have_decl
33386 _ACEOF
33387
33388       if test $ac_cv_have_decl_towlower = yes; then
33389                                 REPLACE_TOWLOWER=1
33390       else
33391         REPLACE_TOWLOWER=0
33392       fi
33393     fi
33394   fi
33395
33396
33397   if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
33398         :
33399   fi
33400
33401           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
33402 $as_echo_n "checking for wctype_t... " >&6; }
33403 if ${gl_cv_type_wctype_t+:} false; then :
33404   $as_echo_n "(cached) " >&6
33405 else
33406   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33407 /* end confdefs.h.  */
33408 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
33409                included before <wchar.h>.
33410                BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
33411                must be included before <wchar.h>.  */
33412             #include <stddef.h>
33413             #include <stdio.h>
33414             #include <time.h>
33415             #include <wchar.h>
33416             #if HAVE_WCTYPE_H
33417             # include <wctype.h>
33418             #endif
33419             wctype_t a;
33420
33421 int
33422 main ()
33423 {
33424
33425   ;
33426   return 0;
33427 }
33428 _ACEOF
33429 if ac_fn_c_try_compile "$LINENO"; then :
33430   gl_cv_type_wctype_t=yes
33431 else
33432   gl_cv_type_wctype_t=no
33433 fi
33434 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33435
33436 fi
33437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
33438 $as_echo "$gl_cv_type_wctype_t" >&6; }
33439   if test $gl_cv_type_wctype_t = no; then
33440     HAVE_WCTYPE_T=0
33441   fi
33442
33443       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
33444 $as_echo_n "checking for wctrans_t... " >&6; }
33445 if ${gl_cv_type_wctrans_t+:} false; then :
33446   $as_echo_n "(cached) " >&6
33447 else
33448   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33449 /* end confdefs.h.  */
33450 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
33451                included before <wchar.h>.
33452                BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
33453                must be included before <wchar.h>.  */
33454             #include <stddef.h>
33455             #include <stdio.h>
33456             #include <time.h>
33457             #include <wchar.h>
33458             #include <wctype.h>
33459             wctrans_t a;
33460
33461 int
33462 main ()
33463 {
33464
33465   ;
33466   return 0;
33467 }
33468 _ACEOF
33469 if ac_fn_c_try_compile "$LINENO"; then :
33470   gl_cv_type_wctrans_t=yes
33471 else
33472   gl_cv_type_wctrans_t=no
33473 fi
33474 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33475
33476 fi
33477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
33478 $as_echo "$gl_cv_type_wctrans_t" >&6; }
33479   if test $gl_cv_type_wctrans_t = no; then
33480     HAVE_WCTRANS_T=0
33481   fi
33482
33483
33484     for gl_func in wctype iswctype wctrans towctrans     ; do
33485     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
33486     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
33487 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
33488 if eval \${$as_gl_Symbol+:} false; then :
33489   $as_echo_n "(cached) " >&6
33490 else
33491   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33492 /* end confdefs.h.  */
33493
33494 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
33495    <wchar.h>.
33496    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
33497    included before <wchar.h>.  */
33498 #if !(defined __GLIBC__ && !defined __UCLIBC__)
33499 # include <stddef.h>
33500 # include <stdio.h>
33501 # include <time.h>
33502 # include <wchar.h>
33503 #endif
33504 #include <wctype.h>
33505
33506 int
33507 main ()
33508 {
33509 #undef $gl_func
33510   (void) $gl_func;
33511   ;
33512   return 0;
33513 }
33514 _ACEOF
33515 if ac_fn_c_try_compile "$LINENO"; then :
33516   eval "$as_gl_Symbol=yes"
33517 else
33518   eval "$as_gl_Symbol=no"
33519 fi
33520 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33521 fi
33522 eval ac_res=\$$as_gl_Symbol
33523                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
33524 $as_echo "$ac_res" >&6; }
33525     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
33526   cat >>confdefs.h <<_ACEOF
33527 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
33528 _ACEOF
33529
33530                      eval ac_cv_have_decl_$gl_func=yes
33531 fi
33532       done
33533
33534
33535
33536
33537
33538
33539
33540
33541
33542
33543
33544
33545
33546   ac_fn_c_check_decl "$LINENO" "wcwidth" "ac_cv_have_decl_wcwidth" "
33547 /* AIX 3.2.5 declares wcwidth in <string.h>. */
33548 #include <string.h>
33549 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
33550    <wchar.h>.
33551    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
33552    before <wchar.h>.  */
33553 #include <stddef.h>
33554 #include <stdio.h>
33555 #include <time.h>
33556 #include <wchar.h>
33557
33558 "
33559 if test "x$ac_cv_have_decl_wcwidth" = xyes; then :
33560   ac_have_decl=1
33561 else
33562   ac_have_decl=0
33563 fi
33564
33565 cat >>confdefs.h <<_ACEOF
33566 #define HAVE_DECL_WCWIDTH $ac_have_decl
33567 _ACEOF
33568
33569   if test $ac_cv_have_decl_wcwidth != yes; then
33570     HAVE_DECL_WCWIDTH=0
33571   fi
33572
33573   if test $ac_cv_func_wcwidth = yes; then
33574     HAVE_WCWIDTH=1
33575                     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wcwidth works reasonably in UTF-8 locales" >&5
33576 $as_echo_n "checking whether wcwidth works reasonably in UTF-8 locales... " >&6; }
33577 if ${gl_cv_func_wcwidth_works+:} false; then :
33578   $as_echo_n "(cached) " >&6
33579 else
33580
33581         if test "$cross_compiling" = yes; then :
33582
33583            case "$host_os" in
33584                      # Guess yes on glibc and AIX 7 systems.
33585              *-gnu* | aix[7-9]*) gl_cv_func_wcwidth_works="guessing yes";;
33586              *)                  gl_cv_func_wcwidth_works="guessing no";;
33587            esac
33588
33589 else
33590   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33591 /* end confdefs.h.  */
33592
33593 #include <locale.h>
33594 /* AIX 3.2.5 declares wcwidth in <string.h>. */
33595 #include <string.h>
33596 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
33597    <wchar.h>.
33598    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
33599    before <wchar.h>.  */
33600 #include <stddef.h>
33601 #include <stdio.h>
33602 #include <time.h>
33603 #include <wchar.h>
33604 #if !HAVE_DECL_WCWIDTH
33605 extern
33606 # ifdef __cplusplus
33607 "C"
33608 # endif
33609 int wcwidth (int);
33610 #endif
33611 int main ()
33612 {
33613   int result = 0;
33614   if (setlocale (LC_ALL, "fr_FR.UTF-8") != NULL)
33615     {
33616       if (wcwidth (0x0301) > 0)
33617         result |= 1;
33618       if (wcwidth (0x05B0) > 0)
33619         result |= 2;
33620       if (wcwidth (0x200B) > 0)
33621         result |= 4;
33622     }
33623   return result;
33624 }
33625 _ACEOF
33626 if ac_fn_c_try_run "$LINENO"; then :
33627   gl_cv_func_wcwidth_works=yes
33628 else
33629   gl_cv_func_wcwidth_works=no
33630 fi
33631 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33632   conftest.$ac_objext conftest.beam conftest.$ac_ext
33633 fi
33634
33635
33636 fi
33637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcwidth_works" >&5
33638 $as_echo "$gl_cv_func_wcwidth_works" >&6; }
33639     case "$gl_cv_func_wcwidth_works" in
33640       *yes) ;;
33641       *no) REPLACE_WCWIDTH=1 ;;
33642     esac
33643   else
33644     HAVE_WCWIDTH=0
33645   fi
33646
33647   if test $HAVE_WCWIDTH = 0 || test $REPLACE_WCWIDTH = 1; then
33648
33649
33650
33651
33652
33653
33654
33655
33656   gl_LIBOBJS="$gl_LIBOBJS wcwidth.$ac_objext"
33657
33658   fi
33659
33660
33661
33662
33663
33664           GNULIB_WCWIDTH=1
33665
33666
33667
33668
33669
33670 $as_echo "#define GNULIB_TEST_WCWIDTH 1" >>confdefs.h
33671
33672
33673
33674
33675
33676
33677   if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
33678     REPLACE_WRITE=1
33679   fi
33680
33681
33682
33683   if test $REPLACE_WRITE = 1; then
33684
33685
33686
33687
33688
33689
33690
33691
33692   gl_LIBOBJS="$gl_LIBOBJS write.$ac_objext"
33693
33694     :
33695   fi
33696
33697
33698
33699
33700
33701           GNULIB_WRITE=1
33702
33703
33704
33705
33706
33707 $as_echo "#define GNULIB_TEST_WRITE 1" >>confdefs.h
33708
33709
33710
33711   :
33712
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
33730
33731
33732   :
33733
33734
33735
33736   :
33737
33738   :
33739
33740
33741   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=xasprintf:1:c-format"
33742
33743   # End of code from modules
33744
33745
33746
33747
33748
33749
33750
33751
33752
33753   gltests_libdeps=
33754   gltests_ltlibdeps=
33755
33756
33757
33758
33759
33760
33761
33762
33763
33764   gl_source_base='tests'
33765   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
33766
33767   gl_module_indicator_condition=$gltests_WITNESS
33768
33769
33770
33771
33772
33773
33774
33775
33776
33777   LIBGNU_LIBDEPS="$gl_libdeps"
33778
33779   LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
33780
33781
33782 # paxutils modules
33783
33784
33785
33786
33787
33788
33789
33790
33791 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
33792 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
33793 if ${ac_cv_header_time+:} false; then :
33794   $as_echo_n "(cached) " >&6
33795 else
33796   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33797 /* end confdefs.h.  */
33798 #include <sys/types.h>
33799 #include <sys/time.h>
33800 #include <time.h>
33801
33802 int
33803 main ()
33804 {
33805 if ((struct tm *) 0)
33806 return 0;
33807   ;
33808   return 0;
33809 }
33810 _ACEOF
33811 if ac_fn_c_try_compile "$LINENO"; then :
33812   ac_cv_header_time=yes
33813 else
33814   ac_cv_header_time=no
33815 fi
33816 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33817 fi
33818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
33819 $as_echo "$ac_cv_header_time" >&6; }
33820 if test $ac_cv_header_time = yes; then
33821
33822 $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
33823
33824 fi
33825
33826 ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
33827 if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
33828
33829 cat >>confdefs.h <<_ACEOF
33830 #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
33831 _ACEOF
33832
33833
33834 $as_echo "#define HAVE_ST_BLKSIZE 1" >>confdefs.h
33835
33836 fi
33837
33838
33839
33840
33841
33842
33843   # Set LIB_SETSOCKOPT to -lnsl -lsocket if necessary.
33844   pu_save_LIBS=$LIBS
33845   LIB_SETSOCKOPT=
33846   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5
33847 $as_echo_n "checking for library containing setsockopt... " >&6; }
33848 if ${ac_cv_search_setsockopt+:} false; then :
33849   $as_echo_n "(cached) " >&6
33850 else
33851   ac_func_search_save_LIBS=$LIBS
33852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33853 /* end confdefs.h.  */
33854
33855 /* Override any GCC internal prototype to avoid an error.
33856    Use char because int might match the return type of a GCC
33857    builtin and then its argument prototype would still apply.  */
33858 #ifdef __cplusplus
33859 extern "C"
33860 #endif
33861 char setsockopt ();
33862 int
33863 main ()
33864 {
33865 return setsockopt ();
33866   ;
33867   return 0;
33868 }
33869 _ACEOF
33870 for ac_lib in '' socket; do
33871   if test -z "$ac_lib"; then
33872     ac_res="none required"
33873   else
33874     ac_res=-l$ac_lib
33875     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
33876   fi
33877   if ac_fn_c_try_link "$LINENO"; then :
33878   ac_cv_search_setsockopt=$ac_res
33879 fi
33880 rm -f core conftest.err conftest.$ac_objext \
33881     conftest$ac_exeext
33882   if ${ac_cv_search_setsockopt+:} false; then :
33883   break
33884 fi
33885 done
33886 if ${ac_cv_search_setsockopt+:} false; then :
33887
33888 else
33889   ac_cv_search_setsockopt=no
33890 fi
33891 rm conftest.$ac_ext
33892 LIBS=$ac_func_search_save_LIBS
33893 fi
33894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setsockopt" >&5
33895 $as_echo "$ac_cv_search_setsockopt" >&6; }
33896 ac_res=$ac_cv_search_setsockopt
33897 if test "$ac_res" != no; then :
33898   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
33899
33900 else
33901   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5
33902 $as_echo_n "checking for library containing setsockopt... " >&6; }
33903 if ${ac_cv_search_setsockopt+:} false; then :
33904   $as_echo_n "(cached) " >&6
33905 else
33906   ac_func_search_save_LIBS=$LIBS
33907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33908 /* end confdefs.h.  */
33909
33910 /* Override any GCC internal prototype to avoid an error.
33911    Use char because int might match the return type of a GCC
33912    builtin and then its argument prototype would still apply.  */
33913 #ifdef __cplusplus
33914 extern "C"
33915 #endif
33916 char setsockopt ();
33917 int
33918 main ()
33919 {
33920 return setsockopt ();
33921   ;
33922   return 0;
33923 }
33924 _ACEOF
33925 for ac_lib in '' socket; do
33926   if test -z "$ac_lib"; then
33927     ac_res="none required"
33928   else
33929     ac_res=-l$ac_lib
33930     LIBS="-l$ac_lib -lnsl $ac_func_search_save_LIBS"
33931   fi
33932   if ac_fn_c_try_link "$LINENO"; then :
33933   ac_cv_search_setsockopt=$ac_res
33934 fi
33935 rm -f core conftest.err conftest.$ac_objext \
33936     conftest$ac_exeext
33937   if ${ac_cv_search_setsockopt+:} false; then :
33938   break
33939 fi
33940 done
33941 if ${ac_cv_search_setsockopt+:} false; then :
33942
33943 else
33944   ac_cv_search_setsockopt=no
33945 fi
33946 rm conftest.$ac_ext
33947 LIBS=$ac_func_search_save_LIBS
33948 fi
33949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setsockopt" >&5
33950 $as_echo "$ac_cv_search_setsockopt" >&6; }
33951 ac_res=$ac_cv_search_setsockopt
33952 if test "$ac_res" != no; then :
33953   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
33954
33955 fi
33956
33957 fi
33958
33959   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5
33960 $as_echo_n "checking for library containing setsockopt... " >&6; }
33961 if ${ac_cv_search_setsockopt+:} false; then :
33962   $as_echo_n "(cached) " >&6
33963 else
33964   ac_func_search_save_LIBS=$LIBS
33965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33966 /* end confdefs.h.  */
33967
33968 /* Override any GCC internal prototype to avoid an error.
33969    Use char because int might match the return type of a GCC
33970    builtin and then its argument prototype would still apply.  */
33971 #ifdef __cplusplus
33972 extern "C"
33973 #endif
33974 char setsockopt ();
33975 int
33976 main ()
33977 {
33978 return setsockopt ();
33979   ;
33980   return 0;
33981 }
33982 _ACEOF
33983 for ac_lib in '' nsl; do
33984   if test -z "$ac_lib"; then
33985     ac_res="none required"
33986   else
33987     ac_res=-l$ac_lib
33988     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
33989   fi
33990   if ac_fn_c_try_link "$LINENO"; then :
33991   ac_cv_search_setsockopt=$ac_res
33992 fi
33993 rm -f core conftest.err conftest.$ac_objext \
33994     conftest$ac_exeext
33995   if ${ac_cv_search_setsockopt+:} false; then :
33996   break
33997 fi
33998 done
33999 if ${ac_cv_search_setsockopt+:} false; then :
34000
34001 else
34002   ac_cv_search_setsockopt=no
34003 fi
34004 rm conftest.$ac_ext
34005 LIBS=$ac_func_search_save_LIBS
34006 fi
34007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setsockopt" >&5
34008 $as_echo "$ac_cv_search_setsockopt" >&6; }
34009 ac_res=$ac_cv_search_setsockopt
34010 if test "$ac_res" != no; then :
34011   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
34012
34013 fi
34014
34015
34016   case "$ac_cv_search_setsockopt" in
34017     -l*) LIB_SETSOCKOPT=$ac_cv_search_setsockopt
34018   esac
34019
34020   LIBS=$pu_save_LIBS
34021
34022   enable_rmt() {
34023     if test $ac_cv_header_sys_mtio_h = yes; then
34024       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remote tape header files" >&5
34025 $as_echo_n "checking for remote tape header files... " >&6; }
34026 if ${pu_cv_header_rmt+:} false; then :
34027   $as_echo_n "(cached) " >&6
34028 else
34029   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34030 /* end confdefs.h.  */
34031
34032 #if HAVE_SGTTY_H
34033 # include <sgtty.h>
34034 #endif
34035 #include <sys/socket.h>
34036 _ACEOF
34037 if ac_fn_c_try_cpp "$LINENO"; then :
34038   pu_cv_header_rmt=yes
34039 else
34040   pu_cv_header_rmt=no
34041 fi
34042 rm -f conftest.err conftest.i conftest.$ac_ext
34043 fi
34044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pu_cv_header_rmt" >&5
34045 $as_echo "$pu_cv_header_rmt" >&6; }
34046       test $pu_cv_header_rmt = yes && PU_RMT_PROG='rmt$(EXEEXT)'
34047
34048     fi
34049   }
34050
34051   for ac_header in sys/mtio.h
34052 do :
34053   ac_fn_c_check_header_mongrel "$LINENO" "sys/mtio.h" "ac_cv_header_sys_mtio_h" "$ac_includes_default"
34054 if test "x$ac_cv_header_sys_mtio_h" = xyes; then :
34055   cat >>confdefs.h <<_ACEOF
34056 #define HAVE_SYS_MTIO_H 1
34057 _ACEOF
34058
34059 fi
34060
34061 done
34062
34063   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which ioctl field to test for reversed bytes" >&5
34064 $as_echo_n "checking which ioctl field to test for reversed bytes... " >&6; }
34065 if ${pu_cv_header_mtio_check_field+:} false; then :
34066   $as_echo_n "(cached) " >&6
34067 else
34068   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34069 /* end confdefs.h.  */
34070 #include <sys/mtio.h>
34071
34072 _ACEOF
34073 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
34074   $EGREP "mt_model" >/dev/null 2>&1; then :
34075   pu_cv_header_mtio_check_field=mt_model
34076 else
34077   pu_cv_header_mtio_check_field=mt_type
34078 fi
34079 rm -f conftest*
34080
34081 fi
34082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pu_cv_header_mtio_check_field" >&5
34083 $as_echo "$pu_cv_header_mtio_check_field" >&6; }
34084
34085 cat >>confdefs.h <<_ACEOF
34086 #define MTIO_CHECK_FIELD $pu_cv_header_mtio_check_field
34087 _ACEOF
34088
34089
34090
34091
34092   if test "x$DEFAULT_RMT_DIR" != x; then
34093         DEFAULT_RMT_COMMAND=$DEFAULT_RMT_DIR/rmt
34094   else
34095         DEFAULT_RMT_DIR='$(libexecdir)'
34096   fi
34097
34098   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build rmt" >&5
34099 $as_echo_n "checking whether to build rmt... " >&6; }
34100
34101 # Check whether --with-rmt was given.
34102 if test "${with_rmt+set}" = set; then :
34103   withval=$with_rmt; case $withval in
34104                yes|no) as_fn_error $? "Invalid argument to --with-rmt" "$LINENO" 5;;
34105                /*)     DEFAULT_RMT_COMMAND=$withval
34106                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, use $withval instead" >&5
34107 $as_echo "no, use $withval instead" >&6; };;
34108                *)      as_fn_error $? "Argument to --with-rmt must be an absolute file name" "$LINENO" 5;;
34109                esac
34110 else
34111   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34112 $as_echo "yes" >&6; }
34113                 enable_rmt
34114                 if test "$PU_RMT_PROG" = ""; then
34115                   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: not building rmt, required header files are missing" >&5
34116 $as_echo "$as_me: WARNING: not building rmt, required header files are missing" >&2;}
34117                 fi
34118 fi
34119
34120
34121
34122   if test "x$DEFAULT_RMT_COMMAND" != x; then
34123
34124 cat >>confdefs.h <<_ACEOF
34125 #define DEFAULT_RMT_COMMAND "$DEFAULT_RMT_COMMAND"
34126 _ACEOF
34127
34128   fi
34129    if test "$pu_cv_header_rmt" = yes; then
34130   PU_RMT_COND_TRUE=
34131   PU_RMT_COND_FALSE='#'
34132 else
34133   PU_RMT_COND_TRUE='#'
34134   PU_RMT_COND_FALSE=
34135 fi
34136
34137
34138
34139
34140
34141
34142
34143
34144
34145
34146   for ac_header in sys/buf.h
34147 do :
34148   ac_fn_c_check_header_compile "$LINENO" "sys/buf.h" "ac_cv_header_sys_buf_h" "#if HAVE_SYS_PARAM_H
34149 #include <sys/param.h>
34150 #endif
34151 "
34152 if test "x$ac_cv_header_sys_buf_h" = xyes; then :
34153   cat >>confdefs.h <<_ACEOF
34154 #define HAVE_SYS_BUF_H 1
34155 _ACEOF
34156
34157 fi
34158
34159 done
34160
34161
34162
34163
34164   ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
34165 if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
34166
34167 cat >>confdefs.h <<_ACEOF
34168 #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
34169 _ACEOF
34170
34171
34172 fi
34173
34174
34175
34176
34177
34178
34179
34180   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
34181 $as_echo_n "checking for library containing gethostbyname... " >&6; }
34182 if ${ac_cv_search_gethostbyname+:} false; then :
34183   $as_echo_n "(cached) " >&6
34184 else
34185   ac_func_search_save_LIBS=$LIBS
34186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34187 /* end confdefs.h.  */
34188
34189 /* Override any GCC internal prototype to avoid an error.
34190    Use char because int might match the return type of a GCC
34191    builtin and then its argument prototype would still apply.  */
34192 #ifdef __cplusplus
34193 extern "C"
34194 #endif
34195 char gethostbyname ();
34196 int
34197 main ()
34198 {
34199 return gethostbyname ();
34200   ;
34201   return 0;
34202 }
34203 _ACEOF
34204 for ac_lib in '' nsl; do
34205   if test -z "$ac_lib"; then
34206     ac_res="none required"
34207   else
34208     ac_res=-l$ac_lib
34209     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
34210   fi
34211   if ac_fn_c_try_link "$LINENO"; then :
34212   ac_cv_search_gethostbyname=$ac_res
34213 fi
34214 rm -f core conftest.err conftest.$ac_objext \
34215     conftest$ac_exeext
34216   if ${ac_cv_search_gethostbyname+:} false; then :
34217   break
34218 fi
34219 done
34220 if ${ac_cv_search_gethostbyname+:} false; then :
34221
34222 else
34223   ac_cv_search_gethostbyname=no
34224 fi
34225 rm conftest.$ac_ext
34226 LIBS=$ac_func_search_save_LIBS
34227 fi
34228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
34229 $as_echo "$ac_cv_search_gethostbyname" >&6; }
34230 ac_res=$ac_cv_search_gethostbyname
34231 if test "$ac_res" != no; then :
34232   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
34233
34234 fi
34235
34236
34237
34238
34239 # gl_GCC_VERSION_IFELSE([major], [minor], [run-if-found], [run-if-not-found])
34240 # ------------------------------------------------
34241 # If $CPP is gcc-MAJOR.MINOR or newer, then run RUN-IF-FOUND.
34242 # Otherwise, run RUN-IF-NOT-FOUND.
34243
34244
34245 # Check whether --enable-gcc-warnings was given.
34246 if test "${enable_gcc_warnings+set}" = set; then :
34247   enableval=$enable_gcc_warnings; case $enableval in
34248      yes|no) ;;
34249      *)      as_fn_error $? "bad value $enableval for gcc-warnings option" "$LINENO" 5 ;;
34250    esac
34251    gl_gcc_warnings=$enableval
34252 else
34253   gl_gcc_warnings=no
34254    if test -d "$srcdir"/.git; then
34255      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34256 /* end confdefs.h.  */
34257
34258 #if (4) < __GNUC__ || ((4) == __GNUC__ && (6) <= __GNUC_MINOR__)
34259 /* ok */
34260 #else
34261 # error "your version of gcc is older than 4.6"
34262 #endif
34263
34264 int
34265 main ()
34266 {
34267
34268   ;
34269   return 0;
34270 },
34271
34272 _ACEOF
34273 if ac_fn_c_try_cpp "$LINENO"; then :
34274   gl_gcc_warnings=yes
34275 fi
34276 rm -f conftest.err conftest.i conftest.$ac_ext
34277
34278
34279    fi
34280
34281 fi
34282
34283
34284 if test "$gl_gcc_warnings" = yes; then
34285   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror -Wunknown-warning-option" >&5
34286 $as_echo_n "checking whether C compiler handles -Werror -Wunknown-warning-option... " >&6; }
34287 if ${gl_cv_warn_c__Werror__Wunknown_warning_option+:} false; then :
34288   $as_echo_n "(cached) " >&6
34289 else
34290
34291   gl_save_compiler_FLAGS="$CFLAGS"
34292   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror -Wunknown-warning-option"
34293   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34294 /* end confdefs.h.  */
34295
34296 int
34297 main ()
34298 {
34299
34300   ;
34301   return 0;
34302 }
34303 _ACEOF
34304 if ac_fn_c_try_link "$LINENO"; then :
34305   gl_cv_warn_c__Werror__Wunknown_warning_option=yes
34306 else
34307   gl_cv_warn_c__Werror__Wunknown_warning_option=no
34308 fi
34309 rm -f core conftest.err conftest.$ac_objext \
34310     conftest$ac_exeext conftest.$ac_ext
34311   CFLAGS="$gl_save_compiler_FLAGS"
34312
34313 fi
34314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror__Wunknown_warning_option" >&5
34315 $as_echo "$gl_cv_warn_c__Werror__Wunknown_warning_option" >&6; }
34316 if test "x$gl_cv_warn_c__Werror__Wunknown_warning_option" = xyes; then :
34317   gl_unknown_warnings_are_errors='-Wunknown-warning-option -Werror'
34318 else
34319   gl_unknown_warnings_are_errors=
34320 fi
34321
34322
34323 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror" >&5
34324 $as_echo_n "checking whether C compiler handles -Werror... " >&6; }
34325 if ${gl_cv_warn_c__Werror+:} false; then :
34326   $as_echo_n "(cached) " >&6
34327 else
34328
34329   gl_save_compiler_FLAGS="$CFLAGS"
34330   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror"
34331   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34332 /* end confdefs.h.  */
34333
34334 int
34335 main ()
34336 {
34337
34338   ;
34339   return 0;
34340 }
34341 _ACEOF
34342 if ac_fn_c_try_link "$LINENO"; then :
34343   gl_cv_warn_c__Werror=yes
34344 else
34345   gl_cv_warn_c__Werror=no
34346 fi
34347 rm -f core conftest.err conftest.$ac_objext \
34348     conftest$ac_exeext conftest.$ac_ext
34349   CFLAGS="$gl_save_compiler_FLAGS"
34350
34351 fi
34352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror" >&5
34353 $as_echo "$gl_cv_warn_c__Werror" >&6; }
34354 if test "x$gl_cv_warn_c__Werror" = xyes; then :
34355   as_fn_append WERROR_CFLAGS " -Werror"
34356 fi
34357
34358
34359
34360
34361   nw=
34362   # This, $nw, is the list of warnings we disable.
34363   nw="$nw -Wformat-nonliteral"      # warnings in Fedora 17 stdio.h
34364   nw="$nw -Wvla"                    # warnings in gettext.h
34365   nw="$nw -Wswitch-default"         # Too many warnings for now
34366   nw="$nw -Wunsafe-loop-optimizations" # It's OK to omit unsafe optimizations.
34367   nw="$nw -Winline"                 # It's OK to not inline.
34368   nw="$nw -Wstrict-overflow"        # It's OK to optimize strictly.
34369   nw="$nw -Wsuggest-attribute=pure" # Too many warnings for now.
34370   nw="$nw -Wstack-protector"
34371
34372
34373
34374   if test -n "$GCC"; then
34375
34376             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is supported" >&5
34377 $as_echo_n "checking whether -Wno-missing-field-initializers is supported... " >&6; }
34378     if ${gl_cv_cc_nomfi_supported+:} false; then :
34379   $as_echo_n "(cached) " >&6
34380 else
34381
34382       gl_save_CFLAGS="$CFLAGS"
34383       CFLAGS="$CFLAGS -W -Werror -Wno-missing-field-initializers"
34384       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34385 /* end confdefs.h.  */
34386
34387 int
34388 main ()
34389 {
34390
34391   ;
34392   return 0;
34393 }
34394 _ACEOF
34395 if ac_fn_c_try_compile "$LINENO"; then :
34396   gl_cv_cc_nomfi_supported=yes
34397 else
34398   gl_cv_cc_nomfi_supported=no
34399 fi
34400 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34401       CFLAGS="$gl_save_CFLAGS"
34402 fi
34403
34404     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_supported" >&5
34405 $as_echo "$gl_cv_cc_nomfi_supported" >&6; }
34406
34407     if test "$gl_cv_cc_nomfi_supported" = yes; then
34408                   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is needed" >&5
34409 $as_echo_n "checking whether -Wno-missing-field-initializers is needed... " >&6; }
34410       if ${gl_cv_cc_nomfi_needed+:} false; then :
34411   $as_echo_n "(cached) " >&6
34412 else
34413
34414         gl_save_CFLAGS="$CFLAGS"
34415         CFLAGS="$CFLAGS -W -Werror"
34416         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34417 /* end confdefs.h.  */
34418 void f (void)
34419                {
34420                  typedef struct { int a; int b; } s_t;
34421                  s_t s1 = { 0, };
34422                }
34423
34424 int
34425 main ()
34426 {
34427
34428   ;
34429   return 0;
34430 }
34431 _ACEOF
34432 if ac_fn_c_try_compile "$LINENO"; then :
34433   gl_cv_cc_nomfi_needed=no
34434 else
34435   gl_cv_cc_nomfi_needed=yes
34436 fi
34437 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34438         CFLAGS="$gl_save_CFLAGS"
34439
34440 fi
34441
34442       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_needed" >&5
34443 $as_echo "$gl_cv_cc_nomfi_needed" >&6; }
34444     fi
34445
34446                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wuninitialized is supported" >&5
34447 $as_echo_n "checking whether -Wuninitialized is supported... " >&6; }
34448     if ${gl_cv_cc_uninitialized_supported+:} false; then :
34449   $as_echo_n "(cached) " >&6
34450 else
34451
34452       gl_save_CFLAGS="$CFLAGS"
34453       CFLAGS="$CFLAGS -Werror -Wuninitialized"
34454       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34455 /* end confdefs.h.  */
34456
34457 int
34458 main ()
34459 {
34460
34461   ;
34462   return 0;
34463 }
34464 _ACEOF
34465 if ac_fn_c_try_compile "$LINENO"; then :
34466   gl_cv_cc_uninitialized_supported=yes
34467 else
34468   gl_cv_cc_uninitialized_supported=no
34469 fi
34470 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34471       CFLAGS="$gl_save_CFLAGS"
34472 fi
34473
34474     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_uninitialized_supported" >&5
34475 $as_echo "$gl_cv_cc_uninitialized_supported" >&6; }
34476
34477   fi
34478
34479   # List all gcc warning categories.
34480   # To compare this list to your installed GCC's, run this Bash command:
34481   #
34482   # comm -3 \
34483   #  <(sed -n 's/^  *\(-[^ ]*\) .*/\1/p' manywarnings.m4 | sort) \
34484   #  <(gcc --help=warnings | sed -n 's/^  \(-[^ ]*\) .*/\1/p' | sort |
34485   #      grep -v -x -f <(
34486   #         awk '/^[^#]/ {print ws}' ../build-aux/gcc-warning.spec))
34487
34488   gl_manywarn_set=
34489   for gl_manywarn_item in \
34490     -W \
34491     -Wabi \
34492     -Waddress \
34493     -Waggressive-loop-optimizations \
34494     -Wall \
34495     -Wattributes \
34496     -Wbad-function-cast \
34497     -Wbool-compare \
34498     -Wbuiltin-macro-redefined \
34499     -Wcast-align \
34500     -Wchar-subscripts \
34501     -Wchkp \
34502     -Wclobbered \
34503     -Wcomment \
34504     -Wcomments \
34505     -Wcoverage-mismatch \
34506     -Wcpp \
34507     -Wdate-time \
34508     -Wdeprecated \
34509     -Wdeprecated-declarations \
34510     -Wdesignated-init \
34511     -Wdisabled-optimization \
34512     -Wdiscarded-array-qualifiers \
34513     -Wdiscarded-qualifiers \
34514     -Wdiv-by-zero \
34515     -Wdouble-promotion \
34516     -Wempty-body \
34517     -Wendif-labels \
34518     -Wenum-compare \
34519     -Wextra \
34520     -Wformat-contains-nul \
34521     -Wformat-extra-args \
34522     -Wformat-nonliteral \
34523     -Wformat-security \
34524     -Wformat-signedness \
34525     -Wformat-y2k \
34526     -Wformat-zero-length \
34527     -Wfree-nonheap-object \
34528     -Wignored-qualifiers \
34529     -Wimplicit \
34530     -Wimplicit-function-declaration \
34531     -Wimplicit-int \
34532     -Wincompatible-pointer-types \
34533     -Winit-self \
34534     -Winline \
34535     -Wint-conversion \
34536     -Wint-to-pointer-cast \
34537     -Winvalid-memory-model \
34538     -Winvalid-pch \
34539     -Wjump-misses-init \
34540     -Wlogical-not-parentheses \
34541     -Wlogical-op \
34542     -Wmain \
34543     -Wmaybe-uninitialized \
34544     -Wmemset-transposed-args \
34545     -Wmissing-braces \
34546     -Wmissing-declarations \
34547     -Wmissing-field-initializers \
34548     -Wmissing-include-dirs \
34549     -Wmissing-parameter-type \
34550     -Wmissing-prototypes \
34551     -Wmultichar \
34552     -Wnarrowing \
34553     -Wnested-externs \
34554     -Wnonnull \
34555     -Wodr \
34556     -Wold-style-declaration \
34557     -Wold-style-definition \
34558     -Wopenmp-simd \
34559     -Woverflow \
34560     -Woverlength-strings \
34561     -Woverride-init \
34562     -Wpacked \
34563     -Wpacked-bitfield-compat \
34564     -Wparentheses \
34565     -Wpointer-arith \
34566     -Wpointer-sign \
34567     -Wpointer-to-int-cast \
34568     -Wpragmas \
34569     -Wreturn-local-addr \
34570     -Wreturn-type \
34571     -Wsequence-point \
34572     -Wshadow \
34573     -Wshift-count-negative \
34574     -Wshift-count-overflow \
34575     -Wsizeof-array-argument \
34576     -Wsizeof-pointer-memaccess \
34577     -Wstack-protector \
34578     -Wstrict-aliasing \
34579     -Wstrict-overflow \
34580     -Wstrict-prototypes \
34581     -Wsuggest-attribute=const \
34582     -Wsuggest-attribute=format \
34583     -Wsuggest-attribute=noreturn \
34584     -Wsuggest-attribute=pure \
34585     -Wsuggest-final-methods \
34586     -Wsuggest-final-types \
34587     -Wswitch \
34588     -Wswitch-bool \
34589     -Wswitch-default \
34590     -Wsync-nand \
34591     -Wsystem-headers \
34592     -Wtrampolines \
34593     -Wtrigraphs \
34594     -Wtype-limits \
34595     -Wuninitialized \
34596     -Wunknown-pragmas \
34597     -Wunsafe-loop-optimizations \
34598     -Wunused \
34599     -Wunused-but-set-parameter \
34600     -Wunused-but-set-variable \
34601     -Wunused-function \
34602     -Wunused-label \
34603     -Wunused-local-typedefs \
34604     -Wunused-macros \
34605     -Wunused-parameter \
34606     -Wunused-result \
34607     -Wunused-value \
34608     -Wunused-variable \
34609     -Wvarargs \
34610     -Wvariadic-macros \
34611     -Wvector-operation-performance \
34612     -Wvla \
34613     -Wvolatile-register-var \
34614     -Wwrite-strings \
34615     \
34616     ; do
34617     gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
34618   done
34619
34620   # gcc --help=warnings outputs an unusual form for these options; list
34621   # them here so that the above 'comm' command doesn't report a false match.
34622   gl_manywarn_set="$gl_manywarn_set -Warray-bounds=2"
34623   gl_manywarn_set="$gl_manywarn_set -Wnormalized=nfc"
34624
34625   # These are needed for older GCC versions.
34626   if test -n "$GCC"; then
34627     case `($CC --version) 2>/dev/null` in
34628       'gcc (GCC) '[0-3].* | \
34629       'gcc (GCC) '4.[0-7].*)
34630         gl_manywarn_set="$gl_manywarn_set -fdiagnostics-show-option"
34631         gl_manywarn_set="$gl_manywarn_set -funit-at-a-time"
34632           ;;
34633     esac
34634   fi
34635
34636   # Disable specific options as needed.
34637   if test "$gl_cv_cc_nomfi_needed" = yes; then
34638     gl_manywarn_set="$gl_manywarn_set -Wno-missing-field-initializers"
34639   fi
34640
34641   if test "$gl_cv_cc_uninitialized_supported" = no; then
34642     gl_manywarn_set="$gl_manywarn_set -Wno-uninitialized"
34643   fi
34644
34645   ws=$gl_manywarn_set
34646
34647
34648   gl_warn_set=
34649   set x $ws; shift
34650   for gl_warn_item
34651   do
34652     case " $nw " in
34653       *" $gl_warn_item "*)
34654         ;;
34655       *)
34656         gl_warn_set="$gl_warn_set $gl_warn_item"
34657         ;;
34658     esac
34659   done
34660   ws=$gl_warn_set
34661
34662   for w in $ws; do
34663
34664 as_gl_Warn=`$as_echo "gl_cv_warn_c_$w" | $as_tr_sh`
34665 gl_positive="$w"
34666 case $gl_positive in
34667   -Wno-*) gl_positive=-W`expr "X$gl_positive" : 'X-Wno-\(.*\)'` ;;
34668 esac
34669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles $w" >&5
34670 $as_echo_n "checking whether C compiler handles $w... " >&6; }
34671 if eval \${$as_gl_Warn+:} false; then :
34672   $as_echo_n "(cached) " >&6
34673 else
34674
34675   gl_save_compiler_FLAGS="$CFLAGS"
34676   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors $gl_positive"
34677   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34678 /* end confdefs.h.  */
34679
34680 int
34681 main ()
34682 {
34683
34684   ;
34685   return 0;
34686 }
34687 _ACEOF
34688 if ac_fn_c_try_link "$LINENO"; then :
34689   eval "$as_gl_Warn=yes"
34690 else
34691   eval "$as_gl_Warn=no"
34692 fi
34693 rm -f core conftest.err conftest.$ac_objext \
34694     conftest$ac_exeext conftest.$ac_ext
34695   CFLAGS="$gl_save_compiler_FLAGS"
34696
34697 fi
34698 eval ac_res=\$$as_gl_Warn
34699                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
34700 $as_echo "$ac_res" >&6; }
34701 if eval test \"x\$"$as_gl_Warn"\" = x"yes"; then :
34702   as_fn_append WARN_CFLAGS " $w"
34703 fi
34704
34705
34706   done
34707
34708 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-sign-compare" >&5
34709 $as_echo_n "checking whether C compiler handles -Wno-sign-compare... " >&6; }
34710 if ${gl_cv_warn_c__Wno_sign_compare+:} false; then :
34711   $as_echo_n "(cached) " >&6
34712 else
34713
34714   gl_save_compiler_FLAGS="$CFLAGS"
34715   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wsign-compare"
34716   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34717 /* end confdefs.h.  */
34718
34719 int
34720 main ()
34721 {
34722
34723   ;
34724   return 0;
34725 }
34726 _ACEOF
34727 if ac_fn_c_try_link "$LINENO"; then :
34728   gl_cv_warn_c__Wno_sign_compare=yes
34729 else
34730   gl_cv_warn_c__Wno_sign_compare=no
34731 fi
34732 rm -f core conftest.err conftest.$ac_objext \
34733     conftest$ac_exeext conftest.$ac_ext
34734   CFLAGS="$gl_save_compiler_FLAGS"
34735
34736 fi
34737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_sign_compare" >&5
34738 $as_echo "$gl_cv_warn_c__Wno_sign_compare" >&6; }
34739 if test "x$gl_cv_warn_c__Wno_sign_compare" = xyes; then :
34740   as_fn_append WARN_CFLAGS " -Wno-sign-compare"
34741 fi
34742
34743      # Too many warnings for now
34744
34745 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-type-limits" >&5
34746 $as_echo_n "checking whether C compiler handles -Wno-type-limits... " >&6; }
34747 if ${gl_cv_warn_c__Wno_type_limits+:} false; then :
34748   $as_echo_n "(cached) " >&6
34749 else
34750
34751   gl_save_compiler_FLAGS="$CFLAGS"
34752   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wtype-limits"
34753   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34754 /* end confdefs.h.  */
34755
34756 int
34757 main ()
34758 {
34759
34760   ;
34761   return 0;
34762 }
34763 _ACEOF
34764 if ac_fn_c_try_link "$LINENO"; then :
34765   gl_cv_warn_c__Wno_type_limits=yes
34766 else
34767   gl_cv_warn_c__Wno_type_limits=no
34768 fi
34769 rm -f core conftest.err conftest.$ac_objext \
34770     conftest$ac_exeext conftest.$ac_ext
34771   CFLAGS="$gl_save_compiler_FLAGS"
34772
34773 fi
34774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_type_limits" >&5
34775 $as_echo "$gl_cv_warn_c__Wno_type_limits" >&6; }
34776 if test "x$gl_cv_warn_c__Wno_type_limits" = xyes; then :
34777   as_fn_append WARN_CFLAGS " -Wno-type-limits"
34778 fi
34779
34780       # It's OK to optimize based on types.
34781
34782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-parameter" >&5
34783 $as_echo_n "checking whether C compiler handles -Wno-unused-parameter... " >&6; }
34784 if ${gl_cv_warn_c__Wno_unused_parameter+:} false; then :
34785   $as_echo_n "(cached) " >&6
34786 else
34787
34788   gl_save_compiler_FLAGS="$CFLAGS"
34789   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wunused-parameter"
34790   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34791 /* end confdefs.h.  */
34792
34793 int
34794 main ()
34795 {
34796
34797   ;
34798   return 0;
34799 }
34800 _ACEOF
34801 if ac_fn_c_try_link "$LINENO"; then :
34802   gl_cv_warn_c__Wno_unused_parameter=yes
34803 else
34804   gl_cv_warn_c__Wno_unused_parameter=no
34805 fi
34806 rm -f core conftest.err conftest.$ac_objext \
34807     conftest$ac_exeext conftest.$ac_ext
34808   CFLAGS="$gl_save_compiler_FLAGS"
34809
34810 fi
34811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_parameter" >&5
34812 $as_echo "$gl_cv_warn_c__Wno_unused_parameter" >&6; }
34813 if test "x$gl_cv_warn_c__Wno_unused_parameter" = xyes; then :
34814   as_fn_append WARN_CFLAGS " -Wno-unused-parameter"
34815 fi
34816
34817  # Too many warnings for now
34818
34819 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-format-nonliteral" >&5
34820 $as_echo_n "checking whether C compiler handles -Wno-format-nonliteral... " >&6; }
34821 if ${gl_cv_warn_c__Wno_format_nonliteral+:} false; then :
34822   $as_echo_n "(cached) " >&6
34823 else
34824
34825   gl_save_compiler_FLAGS="$CFLAGS"
34826   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wformat-nonliteral"
34827   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34828 /* end confdefs.h.  */
34829
34830 int
34831 main ()
34832 {
34833
34834   ;
34835   return 0;
34836 }
34837 _ACEOF
34838 if ac_fn_c_try_link "$LINENO"; then :
34839   gl_cv_warn_c__Wno_format_nonliteral=yes
34840 else
34841   gl_cv_warn_c__Wno_format_nonliteral=no
34842 fi
34843 rm -f core conftest.err conftest.$ac_objext \
34844     conftest$ac_exeext conftest.$ac_ext
34845   CFLAGS="$gl_save_compiler_FLAGS"
34846
34847 fi
34848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_format_nonliteral" >&5
34849 $as_echo "$gl_cv_warn_c__Wno_format_nonliteral" >&6; }
34850 if test "x$gl_cv_warn_c__Wno_format_nonliteral" = xyes; then :
34851   as_fn_append WARN_CFLAGS " -Wno-format-nonliteral"
34852 fi
34853
34854
34855
34856
34857 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fdiagnostics-show-option" >&5
34858 $as_echo_n "checking whether C compiler handles -fdiagnostics-show-option... " >&6; }
34859 if ${gl_cv_warn_c__fdiagnostics_show_option+:} false; then :
34860   $as_echo_n "(cached) " >&6
34861 else
34862
34863   gl_save_compiler_FLAGS="$CFLAGS"
34864   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fdiagnostics-show-option"
34865   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34866 /* end confdefs.h.  */
34867
34868 int
34869 main ()
34870 {
34871
34872   ;
34873   return 0;
34874 }
34875 _ACEOF
34876 if ac_fn_c_try_link "$LINENO"; then :
34877   gl_cv_warn_c__fdiagnostics_show_option=yes
34878 else
34879   gl_cv_warn_c__fdiagnostics_show_option=no
34880 fi
34881 rm -f core conftest.err conftest.$ac_objext \
34882     conftest$ac_exeext conftest.$ac_ext
34883   CFLAGS="$gl_save_compiler_FLAGS"
34884
34885 fi
34886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fdiagnostics_show_option" >&5
34887 $as_echo "$gl_cv_warn_c__fdiagnostics_show_option" >&6; }
34888 if test "x$gl_cv_warn_c__fdiagnostics_show_option" = xyes; then :
34889   as_fn_append WARN_CFLAGS " -fdiagnostics-show-option"
34890 fi
34891
34892
34893
34894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -funit-at-a-time" >&5
34895 $as_echo_n "checking whether C compiler handles -funit-at-a-time... " >&6; }
34896 if ${gl_cv_warn_c__funit_at_a_time+:} false; then :
34897   $as_echo_n "(cached) " >&6
34898 else
34899
34900   gl_save_compiler_FLAGS="$CFLAGS"
34901   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -funit-at-a-time"
34902   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34903 /* end confdefs.h.  */
34904
34905 int
34906 main ()
34907 {
34908
34909   ;
34910   return 0;
34911 }
34912 _ACEOF
34913 if ac_fn_c_try_link "$LINENO"; then :
34914   gl_cv_warn_c__funit_at_a_time=yes
34915 else
34916   gl_cv_warn_c__funit_at_a_time=no
34917 fi
34918 rm -f core conftest.err conftest.$ac_objext \
34919     conftest$ac_exeext conftest.$ac_ext
34920   CFLAGS="$gl_save_compiler_FLAGS"
34921
34922 fi
34923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__funit_at_a_time" >&5
34924 $as_echo "$gl_cv_warn_c__funit_at_a_time" >&6; }
34925 if test "x$gl_cv_warn_c__funit_at_a_time" = xyes; then :
34926   as_fn_append WARN_CFLAGS " -funit-at-a-time"
34927 fi
34928
34929
34930
34931
34932
34933
34934
34935 $as_echo "#define lint 1" >>confdefs.h
34936
34937
34938
34939 $as_echo "#define GNULIB_PORTCHECK 1" >>confdefs.h
34940
34941
34942   # Use a slightly smaller set of warning options for lib/.
34943   # Remove the following and save the result in GNULIB_WARN_CFLAGS.
34944   nw=
34945   nw="$nw -Wmissing-prototypes"
34946   nw="$nw -Wunused-macros"
34947   #
34948   # These are for argp.
34949   nw="$nw -Wmissing-field-initializers"
34950   nw="$nw -Wshadow"
34951   #
34952
34953   gl_warn_set=
34954   set x $WARN_CFLAGS; shift
34955   for gl_warn_item
34956   do
34957     case " $nw " in
34958       *" $gl_warn_item "*)
34959         ;;
34960       *)
34961         gl_warn_set="$gl_warn_set $gl_warn_item"
34962         ;;
34963     esac
34964   done
34965   GNULIB_WARN_CFLAGS=$gl_warn_set
34966
34967
34968   # This is also for argp.
34969
34970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-missing-field-initializers" >&5
34971 $as_echo_n "checking whether C compiler handles -Wno-missing-field-initializers... " >&6; }
34972 if ${gl_cv_warn_c__Wno_missing_field_initializers+:} false; then :
34973   $as_echo_n "(cached) " >&6
34974 else
34975
34976   gl_save_compiler_FLAGS="$CFLAGS"
34977   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wmissing-field-initializers"
34978   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34979 /* end confdefs.h.  */
34980
34981 int
34982 main ()
34983 {
34984
34985   ;
34986   return 0;
34987 }
34988 _ACEOF
34989 if ac_fn_c_try_link "$LINENO"; then :
34990   gl_cv_warn_c__Wno_missing_field_initializers=yes
34991 else
34992   gl_cv_warn_c__Wno_missing_field_initializers=no
34993 fi
34994 rm -f core conftest.err conftest.$ac_objext \
34995     conftest$ac_exeext conftest.$ac_ext
34996   CFLAGS="$gl_save_compiler_FLAGS"
34997
34998 fi
34999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_missing_field_initializers" >&5
35000 $as_echo "$gl_cv_warn_c__Wno_missing_field_initializers" >&6; }
35001 if test "x$gl_cv_warn_c__Wno_missing_field_initializers" = xyes; then :
35002   as_fn_append GNULIB_WARN_CFLAGS " -Wno-missing-field-initializers"
35003 fi
35004
35005
35006
35007
35008
35009   # For gnulib-tests, the set is slightly smaller still.
35010   nw=
35011   # It's not worth being this picky about test programs.
35012   nw="$nw -Wsuggest-attribute=const"
35013
35014   gl_warn_set=
35015   set x $GNULIB_WARN_CFLAGS; shift
35016   for gl_warn_item
35017   do
35018     case " $nw " in
35019       *" $gl_warn_item "*)
35020         ;;
35021       *)
35022         gl_warn_set="$gl_warn_set $gl_warn_item"
35023         ;;
35024     esac
35025   done
35026   GNULIB_TEST_WARN_CFLAGS=$gl_warn_set
35027
35028
35029 fi
35030
35031
35032
35033 # Check whether --with-xattrs was given.
35034 if test "${with_xattrs+set}" = set; then :
35035   withval=$with_xattrs;
35036 else
35037   with_xattrs=maybe
35038
35039 fi
35040
35041
35042   # First check for <sys/xattr.h>
35043   for ac_header in sys/xattr.h
35044 do :
35045   ac_fn_c_check_header_mongrel "$LINENO" "sys/xattr.h" "ac_cv_header_sys_xattr_h" "$ac_includes_default"
35046 if test "x$ac_cv_header_sys_xattr_h" = xyes; then :
35047   cat >>confdefs.h <<_ACEOF
35048 #define HAVE_SYS_XATTR_H 1
35049 _ACEOF
35050
35051 fi
35052
35053 done
35054
35055    if test "$ac_cv_header_sys_xattr_h" = yes; then
35056   TAR_COND_XATTR_H_TRUE=
35057   TAR_COND_XATTR_H_FALSE='#'
35058 else
35059   TAR_COND_XATTR_H_TRUE='#'
35060   TAR_COND_XATTR_H_FALSE=
35061 fi
35062
35063   if test "$ac_cv_header_sys_xattr_h" != yes; then
35064     for ac_header in attr/xattr.h
35065 do :
35066   ac_fn_c_check_header_mongrel "$LINENO" "attr/xattr.h" "ac_cv_header_attr_xattr_h" "$ac_includes_default"
35067 if test "x$ac_cv_header_attr_xattr_h" = xyes; then :
35068   cat >>confdefs.h <<_ACEOF
35069 #define HAVE_ATTR_XATTR_H 1
35070 _ACEOF
35071
35072 fi
35073
35074 done
35075
35076      if test "$ac_cv_header_attr_xattr_h" = yes; then
35077   TAR_COND_XATTR_H_TRUE=
35078   TAR_COND_XATTR_H_FALSE='#'
35079 else
35080   TAR_COND_XATTR_H_TRUE='#'
35081   TAR_COND_XATTR_H_FALSE=
35082 fi
35083
35084   fi
35085
35086   if test "$with_xattrs" != no; then
35087     for i in getxattr  fgetxattr  lgetxattr \
35088              setxattr  fsetxattr  lsetxattr \
35089              listxattr flistxattr llistxattr
35090     do
35091       as_ac_Search=`$as_echo "ac_cv_search_$i" | $as_tr_sh`
35092 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing $i" >&5
35093 $as_echo_n "checking for library containing $i... " >&6; }
35094 if eval \${$as_ac_Search+:} false; then :
35095   $as_echo_n "(cached) " >&6
35096 else
35097   ac_func_search_save_LIBS=$LIBS
35098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35099 /* end confdefs.h.  */
35100
35101 /* Override any GCC internal prototype to avoid an error.
35102    Use char because int might match the return type of a GCC
35103    builtin and then its argument prototype would still apply.  */
35104 #ifdef __cplusplus
35105 extern "C"
35106 #endif
35107 char $i ();
35108 int
35109 main ()
35110 {
35111 return $i ();
35112   ;
35113   return 0;
35114 }
35115 _ACEOF
35116 for ac_lib in '' attr; do
35117   if test -z "$ac_lib"; then
35118     ac_res="none required"
35119   else
35120     ac_res=-l$ac_lib
35121     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
35122   fi
35123   if ac_fn_c_try_link "$LINENO"; then :
35124   eval "$as_ac_Search=\$ac_res"
35125 fi
35126 rm -f core conftest.err conftest.$ac_objext \
35127     conftest$ac_exeext
35128   if eval \${$as_ac_Search+:} false; then :
35129   break
35130 fi
35131 done
35132 if eval \${$as_ac_Search+:} false; then :
35133
35134 else
35135   eval "$as_ac_Search=no"
35136 fi
35137 rm conftest.$ac_ext
35138 LIBS=$ac_func_search_save_LIBS
35139 fi
35140 eval ac_res=\$$as_ac_Search
35141                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
35142 $as_echo "$ac_res" >&6; }
35143 eval ac_res=\$$as_ac_Search
35144 if test "$ac_res" != no; then :
35145   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
35146
35147 fi
35148
35149       eval found=\$ac_cv_search_$i
35150       test "$found" = "no" && break
35151     done
35152
35153     if test "$found" != no; then
35154
35155 $as_echo "#define HAVE_XATTRS /**/" >>confdefs.h
35156
35157     fi
35158   fi
35159
35160
35161
35162
35163
35164
35165 ac_fn_c_check_decl "$LINENO" "getgrgid" "ac_cv_have_decl_getgrgid" "#include <grp.h>
35166 "
35167 if test "x$ac_cv_have_decl_getgrgid" = xyes; then :
35168   ac_have_decl=1
35169 else
35170   ac_have_decl=0
35171 fi
35172
35173 cat >>confdefs.h <<_ACEOF
35174 #define HAVE_DECL_GETGRGID $ac_have_decl
35175 _ACEOF
35176
35177 ac_fn_c_check_decl "$LINENO" "getpwuid" "ac_cv_have_decl_getpwuid" "#include <pwd.h>
35178 "
35179 if test "x$ac_cv_have_decl_getpwuid" = xyes; then :
35180   ac_have_decl=1
35181 else
35182   ac_have_decl=0
35183 fi
35184
35185 cat >>confdefs.h <<_ACEOF
35186 #define HAVE_DECL_GETPWUID $ac_have_decl
35187 _ACEOF
35188
35189 ac_fn_c_check_decl "$LINENO" "time" "ac_cv_have_decl_time" "#include <time.h>
35190 "
35191 if test "x$ac_cv_have_decl_time" = xyes; then :
35192   ac_have_decl=1
35193 else
35194   ac_have_decl=0
35195 fi
35196
35197 cat >>confdefs.h <<_ACEOF
35198 #define HAVE_DECL_TIME $ac_have_decl
35199 _ACEOF
35200
35201
35202 ac_fn_c_check_func "$LINENO" "waitpid" "ac_cv_func_waitpid"
35203 if test "x$ac_cv_func_waitpid" = xyes; then :
35204   $as_echo "#define HAVE_WAITPID 1" >>confdefs.h
35205
35206 else
35207   case " $LIBOBJS " in
35208   *" waitpid.$ac_objext "* ) ;;
35209   *) LIBOBJS="$LIBOBJS waitpid.$ac_objext"
35210  ;;
35211 esac
35212
35213 fi
35214
35215
35216
35217
35218 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remote shell" >&5
35219 $as_echo_n "checking for remote shell... " >&6; }
35220 if ${tar_cv_path_RSH+:} false; then :
35221   $as_echo_n "(cached) " >&6
35222 else
35223   if test -n "$RSH"; then
35224     tar_cv_path_RSH=$RSH
35225   else
35226     tar_cv_path_RSH=no
35227     for ac_file in /usr/ucb/rsh /usr/bin/remsh /usr/bin/rsh /usr/bsd/rsh \
35228         /usr/bin/nsh /usr/bin/rcmd
35229     do
35230       # Prefer a non-symlink rsh to a symlink one, so that binaries built
35231       # on AIX 4.1.4, where /usr/ucb/rsh is a symlink to /usr/bin/rsh
35232       # will run on AIX 4.3.0, which has only /usr/bin/rsh.
35233       if test -f $ac_file; then
35234         if (test -h $ac_file) 2>/dev/null; then
35235           test $tar_cv_path_RSH = no && tar_cv_path_RSH=$ac_file
35236         else
35237           tar_cv_path_RSH=$ac_file
35238           break
35239         fi
35240       fi
35241     done
35242   fi
35243 fi
35244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tar_cv_path_RSH" >&5
35245 $as_echo "$tar_cv_path_RSH" >&6; }
35246 if test $tar_cv_path_RSH = no; then
35247   for ac_header in netdb.h
35248 do :
35249   ac_fn_c_check_header_mongrel "$LINENO" "netdb.h" "ac_cv_header_netdb_h" "$ac_includes_default"
35250 if test "x$ac_cv_header_netdb_h" = xyes; then :
35251   cat >>confdefs.h <<_ACEOF
35252 #define HAVE_NETDB_H 1
35253 _ACEOF
35254
35255 fi
35256
35257 done
35258
35259 else
35260
35261 cat >>confdefs.h <<_ACEOF
35262 #define REMOTE_SHELL "$tar_cv_path_RSH"
35263 _ACEOF
35264
35265 fi
35266
35267
35268
35269
35270
35271 # Check whether --with-compress was given.
35272 if test "${with_compress+set}" = set; then :
35273   withval=$with_compress; tar_cv_compressor_compress=${withval}
35274 else
35275   tar_cv_compressor_compress=compress
35276 fi
35277
35278
35279 cat >>confdefs.h <<_ACEOF
35280 #define COMPRESS_PROGRAM "$tar_cv_compressor_compress"
35281 _ACEOF
35282
35283
35284
35285
35286
35287 # Check whether --with-gzip was given.
35288 if test "${with_gzip+set}" = set; then :
35289   withval=$with_gzip; tar_cv_compressor_gzip=${withval}
35290 else
35291   tar_cv_compressor_gzip=gzip
35292 fi
35293
35294
35295 cat >>confdefs.h <<_ACEOF
35296 #define GZIP_PROGRAM "$tar_cv_compressor_gzip"
35297 _ACEOF
35298
35299
35300
35301
35302
35303 # Check whether --with-bzip2 was given.
35304 if test "${with_bzip2+set}" = set; then :
35305   withval=$with_bzip2; tar_cv_compressor_bzip2=${withval}
35306 else
35307   tar_cv_compressor_bzip2=bzip2
35308 fi
35309
35310
35311 cat >>confdefs.h <<_ACEOF
35312 #define BZIP2_PROGRAM "$tar_cv_compressor_bzip2"
35313 _ACEOF
35314
35315
35316
35317
35318
35319 # Check whether --with-lzip was given.
35320 if test "${with_lzip+set}" = set; then :
35321   withval=$with_lzip; tar_cv_compressor_lzip=${withval}
35322 else
35323   tar_cv_compressor_lzip=lzip
35324 fi
35325
35326
35327 cat >>confdefs.h <<_ACEOF
35328 #define LZIP_PROGRAM "$tar_cv_compressor_lzip"
35329 _ACEOF
35330
35331
35332
35333
35334
35335 # Check whether --with-lzma was given.
35336 if test "${with_lzma+set}" = set; then :
35337   withval=$with_lzma; tar_cv_compressor_lzma=${withval}
35338 else
35339   tar_cv_compressor_lzma=lzma
35340 fi
35341
35342
35343 cat >>confdefs.h <<_ACEOF
35344 #define LZMA_PROGRAM "$tar_cv_compressor_lzma"
35345 _ACEOF
35346
35347
35348
35349
35350
35351 # Check whether --with-lzop was given.
35352 if test "${with_lzop+set}" = set; then :
35353   withval=$with_lzop; tar_cv_compressor_lzop=${withval}
35354 else
35355   tar_cv_compressor_lzop=lzop
35356 fi
35357
35358
35359 cat >>confdefs.h <<_ACEOF
35360 #define LZOP_PROGRAM "$tar_cv_compressor_lzop"
35361 _ACEOF
35362
35363
35364
35365
35366
35367 # Check whether --with-xz was given.
35368 if test "${with_xz+set}" = set; then :
35369   withval=$with_xz; tar_cv_compressor_xz=${withval}
35370 else
35371   tar_cv_compressor_xz=xz
35372 fi
35373
35374
35375 cat >>confdefs.h <<_ACEOF
35376 #define XZ_PROGRAM "$tar_cv_compressor_xz"
35377 _ACEOF
35378
35379
35380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default archive format" >&5
35381 $as_echo_n "checking for default archive format... " >&6; }
35382
35383
35384
35385 if test -z "$DEFAULT_ARCHIVE_FORMAT"; then
35386   DEFAULT_ARCHIVE_FORMAT="GNU"
35387 fi
35388 case $DEFAULT_ARCHIVE_FORMAT in
35389   V7|OLDGNU|USTAR|POSIX|GNU) ;;
35390   *) as_fn_error $? "Invalid format name" "$LINENO" 5;;
35391 esac
35392
35393 cat >>confdefs.h <<_ACEOF
35394 #define DEFAULT_ARCHIVE_FORMAT ${DEFAULT_ARCHIVE_FORMAT}_FORMAT
35395 _ACEOF
35396
35397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEFAULT_ARCHIVE_FORMAT" >&5
35398 $as_echo "$DEFAULT_ARCHIVE_FORMAT" >&6; }
35399
35400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default archive" >&5
35401 $as_echo_n "checking for default archive... " >&6; }
35402
35403
35404 if test -z "$DEFAULT_ARCHIVE"; then
35405   DEFAULT_ARCHIVE=-
35406 else
35407   if test -z "`ls $DEFAULT_ARCHIVE 2>/dev/null`"; then
35408     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: DEFAULT_ARCHIVE '$DEFAULT_ARCHIVE' not found on this system" >&5
35409 $as_echo "$as_me: WARNING: DEFAULT_ARCHIVE '$DEFAULT_ARCHIVE' not found on this system" >&2;}
35410   fi
35411   # FIXME: Look for DEFTAPE in <sys/mtio.h>.
35412   # FIXME: Let DEVICE_PREFIX be configured from the environment.
35413   # FIXME: Rearrange, here.
35414   case $DEFAULT_ARCHIVE in
35415     *[0-7][lmh])
35416
35417 $as_echo "#define DENSITY_LETTER 1" >>confdefs.h
35418
35419       device_prefix=`echo $DEFAULT_ARCHIVE | sed 's/0-7lmh$//'`
35420       ;;
35421     *[0-7])
35422       device_prefix=`echo $DEFAULT_ARCHIVE | sed 's/0-7$//'`
35423       ;;
35424     *)
35425       device_prefix=
35426       ;;
35427   esac
35428   case "$device_prefix" in
35429     ?*)
35430
35431 cat >>confdefs.h <<_ACEOF
35432 #define DEVICE_PREFIX "$device_prefix"
35433 _ACEOF
35434
35435       ;;
35436   esac
35437 fi
35438
35439 cat >>confdefs.h <<_ACEOF
35440 #define DEFAULT_ARCHIVE "$DEFAULT_ARCHIVE"
35441 _ACEOF
35442
35443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEFAULT_ARCHIVE" >&5
35444 $as_echo "$DEFAULT_ARCHIVE" >&6; }
35445
35446
35447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default blocking" >&5
35448 $as_echo_n "checking for default blocking... " >&6; }
35449 DEFAULT_BLOCKING=${DEFAULT_BLOCKING-20}
35450
35451 cat >>confdefs.h <<_ACEOF
35452 #define DEFAULT_BLOCKING $DEFAULT_BLOCKING
35453 _ACEOF
35454
35455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEFAULT_BLOCKING" >&5
35456 $as_echo "$DEFAULT_BLOCKING" >&6; }
35457
35458 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default quoting style" >&5
35459 $as_echo_n "checking for default quoting style... " >&6; }
35460
35461
35462 DEFAULT_QUOTING_STYLE="escape"
35463
35464
35465 case $DEFAULT_QUOTING_STYLE in
35466           literal|shell|shell-always|c|escape|locale|clocale) ;;
35467 *)  as_fn_error $? "Invalid quoting style" "$LINENO" 5;;
35468 esac
35469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEFAULT_QUOTING_STYLE" >&5
35470 $as_echo "$DEFAULT_QUOTING_STYLE" >&6; }
35471 DEFAULT_QUOTING_STYLE=`echo ${DEFAULT_QUOTING_STYLE}|sed 's/-/_/g'`_quoting_style
35472
35473 cat >>confdefs.h <<_ACEOF
35474 #define DEFAULT_QUOTING_STYLE $DEFAULT_QUOTING_STYLE
35475 _ACEOF
35476
35477
35478 # Iconv
35479
35480       if test "X$prefix" = "XNONE"; then
35481     acl_final_prefix="$ac_default_prefix"
35482   else
35483     acl_final_prefix="$prefix"
35484   fi
35485   if test "X$exec_prefix" = "XNONE"; then
35486     acl_final_exec_prefix='${prefix}'
35487   else
35488     acl_final_exec_prefix="$exec_prefix"
35489   fi
35490   acl_save_prefix="$prefix"
35491   prefix="$acl_final_prefix"
35492   eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
35493   prefix="$acl_save_prefix"
35494
35495
35496
35497 # Check whether --with-gnu-ld was given.
35498 if test "${with_gnu_ld+set}" = set; then :
35499   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
35500 else
35501   with_gnu_ld=no
35502 fi
35503
35504 # Prepare PATH_SEPARATOR.
35505 # The user is always right.
35506 if test "${PATH_SEPARATOR+set}" != set; then
35507   # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
35508   # contains only /bin. Note that ksh looks also at the FPATH variable,
35509   # so we have to set that as well for the test.
35510   PATH_SEPARATOR=:
35511   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
35512     && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
35513            || PATH_SEPARATOR=';'
35514        }
35515 fi
35516
35517 ac_prog=ld
35518 if test "$GCC" = yes; then
35519   # Check if gcc -print-prog-name=ld gives a path.
35520   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
35521 $as_echo_n "checking for ld used by $CC... " >&6; }
35522   case $host in
35523   *-*-mingw*)
35524     # gcc leaves a trailing carriage return which upsets mingw
35525     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
35526   *)
35527     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
35528   esac
35529   case $ac_prog in
35530     # Accept absolute paths.
35531     [\\/]* | ?:[\\/]*)
35532       re_direlt='/[^/][^/]*/\.\./'
35533       # Canonicalize the pathname of ld
35534       ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'`
35535       while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do
35536         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
35537       done
35538       test -z "$LD" && LD="$ac_prog"
35539       ;;
35540   "")
35541     # If it fails, then pretend we aren't using GCC.
35542     ac_prog=ld
35543     ;;
35544   *)
35545     # If it is relative, then search for the first ld in PATH.
35546     with_gnu_ld=unknown
35547     ;;
35548   esac
35549 elif test "$with_gnu_ld" = yes; then
35550   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
35551 $as_echo_n "checking for GNU ld... " >&6; }
35552 else
35553   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
35554 $as_echo_n "checking for non-GNU ld... " >&6; }
35555 fi
35556 if ${acl_cv_path_LD+:} false; then :
35557   $as_echo_n "(cached) " >&6
35558 else
35559   if test -z "$LD"; then
35560   acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
35561   for ac_dir in $PATH; do
35562     IFS="$acl_save_ifs"
35563     test -z "$ac_dir" && ac_dir=.
35564     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
35565       acl_cv_path_LD="$ac_dir/$ac_prog"
35566       # Check to see if the program is GNU ld.  I'd rather use --version,
35567       # but apparently some variants of GNU ld only accept -v.
35568       # Break only if it was the GNU/non-GNU ld that we prefer.
35569       case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
35570       *GNU* | *'with BFD'*)
35571         test "$with_gnu_ld" != no && break
35572         ;;
35573       *)
35574         test "$with_gnu_ld" != yes && break
35575         ;;
35576       esac
35577     fi
35578   done
35579   IFS="$acl_save_ifs"
35580 else
35581   acl_cv_path_LD="$LD" # Let the user override the test with a path.
35582 fi
35583 fi
35584
35585 LD="$acl_cv_path_LD"
35586 if test -n "$LD"; then
35587   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
35588 $as_echo "$LD" >&6; }
35589 else
35590   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35591 $as_echo "no" >&6; }
35592 fi
35593 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
35594 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
35595 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
35596 if ${acl_cv_prog_gnu_ld+:} false; then :
35597   $as_echo_n "(cached) " >&6
35598 else
35599   # I'd rather use --version here, but apparently some GNU lds only accept -v.
35600 case `$LD -v 2>&1 </dev/null` in
35601 *GNU* | *'with BFD'*)
35602   acl_cv_prog_gnu_ld=yes
35603   ;;
35604 *)
35605   acl_cv_prog_gnu_ld=no
35606   ;;
35607 esac
35608 fi
35609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
35610 $as_echo "$acl_cv_prog_gnu_ld" >&6; }
35611 with_gnu_ld=$acl_cv_prog_gnu_ld
35612
35613
35614
35615
35616                                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
35617 $as_echo_n "checking for shared library run path origin... " >&6; }
35618 if ${acl_cv_rpath+:} false; then :
35619   $as_echo_n "(cached) " >&6
35620 else
35621
35622     CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
35623     ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
35624     . ./conftest.sh
35625     rm -f ./conftest.sh
35626     acl_cv_rpath=done
35627
35628 fi
35629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
35630 $as_echo "$acl_cv_rpath" >&6; }
35631   wl="$acl_cv_wl"
35632   acl_libext="$acl_cv_libext"
35633   acl_shlibext="$acl_cv_shlibext"
35634   acl_libname_spec="$acl_cv_libname_spec"
35635   acl_library_names_spec="$acl_cv_library_names_spec"
35636   acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
35637   acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
35638   acl_hardcode_direct="$acl_cv_hardcode_direct"
35639   acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
35640     # Check whether --enable-rpath was given.
35641 if test "${enable_rpath+set}" = set; then :
35642   enableval=$enable_rpath; :
35643 else
35644   enable_rpath=yes
35645 fi
35646
35647
35648
35649
35650   acl_libdirstem=lib
35651   acl_libdirstem2=
35652   case "$host_os" in
35653     solaris*)
35654                                     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5
35655 $as_echo_n "checking for 64-bit host... " >&6; }
35656 if ${gl_cv_solaris_64bit+:} false; then :
35657   $as_echo_n "(cached) " >&6
35658 else
35659   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35660 /* end confdefs.h.  */
35661
35662 #ifdef _LP64
35663 sixtyfour bits
35664 #endif
35665
35666 _ACEOF
35667 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
35668   $EGREP "sixtyfour bits" >/dev/null 2>&1; then :
35669   gl_cv_solaris_64bit=yes
35670 else
35671   gl_cv_solaris_64bit=no
35672 fi
35673 rm -f conftest*
35674
35675
35676 fi
35677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5
35678 $as_echo "$gl_cv_solaris_64bit" >&6; }
35679       if test $gl_cv_solaris_64bit = yes; then
35680         acl_libdirstem=lib/64
35681         case "$host_cpu" in
35682           sparc*)        acl_libdirstem2=lib/sparcv9 ;;
35683           i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
35684         esac
35685       fi
35686       ;;
35687     *)
35688       searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
35689       if test -n "$searchpath"; then
35690         acl_save_IFS="${IFS=    }"; IFS=":"
35691         for searchdir in $searchpath; do
35692           if test -d "$searchdir"; then
35693             case "$searchdir" in
35694               */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
35695               */../ | */.. )
35696                 # Better ignore directories of this form. They are misleading.
35697                 ;;
35698               *) searchdir=`cd "$searchdir" && pwd`
35699                  case "$searchdir" in
35700                    */lib64 ) acl_libdirstem=lib64 ;;
35701                  esac ;;
35702             esac
35703           fi
35704         done
35705         IFS="$acl_save_IFS"
35706       fi
35707       ;;
35708   esac
35709   test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
35710
35711
35712
35713
35714
35715
35716
35717
35718
35719
35720
35721
35722     use_additional=yes
35723
35724   acl_save_prefix="$prefix"
35725   prefix="$acl_final_prefix"
35726   acl_save_exec_prefix="$exec_prefix"
35727   exec_prefix="$acl_final_exec_prefix"
35728
35729     eval additional_includedir=\"$includedir\"
35730     eval additional_libdir=\"$libdir\"
35731
35732   exec_prefix="$acl_save_exec_prefix"
35733   prefix="$acl_save_prefix"
35734
35735
35736 # Check whether --with-libiconv-prefix was given.
35737 if test "${with_libiconv_prefix+set}" = set; then :
35738   withval=$with_libiconv_prefix;
35739     if test "X$withval" = "Xno"; then
35740       use_additional=no
35741     else
35742       if test "X$withval" = "X"; then
35743
35744   acl_save_prefix="$prefix"
35745   prefix="$acl_final_prefix"
35746   acl_save_exec_prefix="$exec_prefix"
35747   exec_prefix="$acl_final_exec_prefix"
35748
35749           eval additional_includedir=\"$includedir\"
35750           eval additional_libdir=\"$libdir\"
35751
35752   exec_prefix="$acl_save_exec_prefix"
35753   prefix="$acl_save_prefix"
35754
35755       else
35756         additional_includedir="$withval/include"
35757         additional_libdir="$withval/$acl_libdirstem"
35758         if test "$acl_libdirstem2" != "$acl_libdirstem" \
35759            && ! test -d "$withval/$acl_libdirstem"; then
35760           additional_libdir="$withval/$acl_libdirstem2"
35761         fi
35762       fi
35763     fi
35764
35765 fi
35766
35767       LIBICONV=
35768   LTLIBICONV=
35769   INCICONV=
35770   LIBICONV_PREFIX=
35771       HAVE_LIBICONV=
35772   rpathdirs=
35773   ltrpathdirs=
35774   names_already_handled=
35775   names_next_round='iconv '
35776   while test -n "$names_next_round"; do
35777     names_this_round="$names_next_round"
35778     names_next_round=
35779     for name in $names_this_round; do
35780       already_handled=
35781       for n in $names_already_handled; do
35782         if test "$n" = "$name"; then
35783           already_handled=yes
35784           break
35785         fi
35786       done
35787       if test -z "$already_handled"; then
35788         names_already_handled="$names_already_handled $name"
35789                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
35790         eval value=\"\$HAVE_LIB$uppername\"
35791         if test -n "$value"; then
35792           if test "$value" = yes; then
35793             eval value=\"\$LIB$uppername\"
35794             test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
35795             eval value=\"\$LTLIB$uppername\"
35796             test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
35797           else
35798                                     :
35799           fi
35800         else
35801                               found_dir=
35802           found_la=
35803           found_so=
35804           found_a=
35805           eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
35806           if test -n "$acl_shlibext"; then
35807             shrext=".$acl_shlibext"             # typically: shrext=.so
35808           else
35809             shrext=
35810           fi
35811           if test $use_additional = yes; then
35812             dir="$additional_libdir"
35813                                     if test -n "$acl_shlibext"; then
35814               if test -f "$dir/$libname$shrext"; then
35815                 found_dir="$dir"
35816                 found_so="$dir/$libname$shrext"
35817               else
35818                 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
35819                   ver=`(cd "$dir" && \
35820                         for f in "$libname$shrext".*; do echo "$f"; done \
35821                         | sed -e "s,^$libname$shrext\\\\.,," \
35822                         | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
35823                         | sed 1q ) 2>/dev/null`
35824                   if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
35825                     found_dir="$dir"
35826                     found_so="$dir/$libname$shrext.$ver"
35827                   fi
35828                 else
35829                   eval library_names=\"$acl_library_names_spec\"
35830                   for f in $library_names; do
35831                     if test -f "$dir/$f"; then
35832                       found_dir="$dir"
35833                       found_so="$dir/$f"
35834                       break
35835                     fi
35836                   done
35837                 fi
35838               fi
35839             fi
35840                         if test "X$found_dir" = "X"; then
35841               if test -f "$dir/$libname.$acl_libext"; then
35842                 found_dir="$dir"
35843                 found_a="$dir/$libname.$acl_libext"
35844               fi
35845             fi
35846             if test "X$found_dir" != "X"; then
35847               if test -f "$dir/$libname.la"; then
35848                 found_la="$dir/$libname.la"
35849               fi
35850             fi
35851           fi
35852           if test "X$found_dir" = "X"; then
35853             for x in $LDFLAGS $LTLIBICONV; do
35854
35855   acl_save_prefix="$prefix"
35856   prefix="$acl_final_prefix"
35857   acl_save_exec_prefix="$exec_prefix"
35858   exec_prefix="$acl_final_exec_prefix"
35859   eval x=\"$x\"
35860   exec_prefix="$acl_save_exec_prefix"
35861   prefix="$acl_save_prefix"
35862
35863               case "$x" in
35864                 -L*)
35865                   dir=`echo "X$x" | sed -e 's/^X-L//'`
35866                                     if test -n "$acl_shlibext"; then
35867                     if test -f "$dir/$libname$shrext"; then
35868                       found_dir="$dir"
35869                       found_so="$dir/$libname$shrext"
35870                     else
35871                       if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
35872                         ver=`(cd "$dir" && \
35873                               for f in "$libname$shrext".*; do echo "$f"; done \
35874                               | sed -e "s,^$libname$shrext\\\\.,," \
35875                               | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
35876                               | sed 1q ) 2>/dev/null`
35877                         if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
35878                           found_dir="$dir"
35879                           found_so="$dir/$libname$shrext.$ver"
35880                         fi
35881                       else
35882                         eval library_names=\"$acl_library_names_spec\"
35883                         for f in $library_names; do
35884                           if test -f "$dir/$f"; then
35885                             found_dir="$dir"
35886                             found_so="$dir/$f"
35887                             break
35888                           fi
35889                         done
35890                       fi
35891                     fi
35892                   fi
35893                                     if test "X$found_dir" = "X"; then
35894                     if test -f "$dir/$libname.$acl_libext"; then
35895                       found_dir="$dir"
35896                       found_a="$dir/$libname.$acl_libext"
35897                     fi
35898                   fi
35899                   if test "X$found_dir" != "X"; then
35900                     if test -f "$dir/$libname.la"; then
35901                       found_la="$dir/$libname.la"
35902                     fi
35903                   fi
35904                   ;;
35905               esac
35906               if test "X$found_dir" != "X"; then
35907                 break
35908               fi
35909             done
35910           fi
35911           if test "X$found_dir" != "X"; then
35912                         LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
35913             if test "X$found_so" != "X"; then
35914                                                         if test "$enable_rpath" = no \
35915                  || test "X$found_dir" = "X/usr/$acl_libdirstem" \
35916                  || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
35917                                 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
35918               else
35919                                                                                 haveit=
35920                 for x in $ltrpathdirs; do
35921                   if test "X$x" = "X$found_dir"; then
35922                     haveit=yes
35923                     break
35924                   fi
35925                 done
35926                 if test -z "$haveit"; then
35927                   ltrpathdirs="$ltrpathdirs $found_dir"
35928                 fi
35929                                 if test "$acl_hardcode_direct" = yes; then
35930                                                       LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
35931                 else
35932                   if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
35933                                                             LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
35934                                                             haveit=
35935                     for x in $rpathdirs; do
35936                       if test "X$x" = "X$found_dir"; then
35937                         haveit=yes
35938                         break
35939                       fi
35940                     done
35941                     if test -z "$haveit"; then
35942                       rpathdirs="$rpathdirs $found_dir"
35943                     fi
35944                   else
35945                                                                                 haveit=
35946                     for x in $LDFLAGS $LIBICONV; do
35947
35948   acl_save_prefix="$prefix"
35949   prefix="$acl_final_prefix"
35950   acl_save_exec_prefix="$exec_prefix"
35951   exec_prefix="$acl_final_exec_prefix"
35952   eval x=\"$x\"
35953   exec_prefix="$acl_save_exec_prefix"
35954   prefix="$acl_save_prefix"
35955
35956                       if test "X$x" = "X-L$found_dir"; then
35957                         haveit=yes
35958                         break
35959                       fi
35960                     done
35961                     if test -z "$haveit"; then
35962                       LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
35963                     fi
35964                     if test "$acl_hardcode_minus_L" != no; then
35965                                                                                         LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
35966                     else
35967                                                                                                                                                                                 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
35968                     fi
35969                   fi
35970                 fi
35971               fi
35972             else
35973               if test "X$found_a" != "X"; then
35974                                 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
35975               else
35976                                                 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
35977               fi
35978             fi
35979                         additional_includedir=
35980             case "$found_dir" in
35981               */$acl_libdirstem | */$acl_libdirstem/)
35982                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
35983                 if test "$name" = 'iconv'; then
35984                   LIBICONV_PREFIX="$basedir"
35985                 fi
35986                 additional_includedir="$basedir/include"
35987                 ;;
35988               */$acl_libdirstem2 | */$acl_libdirstem2/)
35989                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
35990                 if test "$name" = 'iconv'; then
35991                   LIBICONV_PREFIX="$basedir"
35992                 fi
35993                 additional_includedir="$basedir/include"
35994                 ;;
35995             esac
35996             if test "X$additional_includedir" != "X"; then
35997                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
35998                 haveit=
35999                 if test "X$additional_includedir" = "X/usr/local/include"; then
36000                   if test -n "$GCC"; then
36001                     case $host_os in
36002                       linux* | gnu* | k*bsd*-gnu) haveit=yes;;
36003                     esac
36004                   fi
36005                 fi
36006                 if test -z "$haveit"; then
36007                   for x in $CPPFLAGS $INCICONV; do
36008
36009   acl_save_prefix="$prefix"
36010   prefix="$acl_final_prefix"
36011   acl_save_exec_prefix="$exec_prefix"
36012   exec_prefix="$acl_final_exec_prefix"
36013   eval x=\"$x\"
36014   exec_prefix="$acl_save_exec_prefix"
36015   prefix="$acl_save_prefix"
36016
36017                     if test "X$x" = "X-I$additional_includedir"; then
36018                       haveit=yes
36019                       break
36020                     fi
36021                   done
36022                   if test -z "$haveit"; then
36023                     if test -d "$additional_includedir"; then
36024                                             INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
36025                     fi
36026                   fi
36027                 fi
36028               fi
36029             fi
36030                         if test -n "$found_la"; then
36031                                                         save_libdir="$libdir"
36032               case "$found_la" in
36033                 */* | *\\*) . "$found_la" ;;
36034                 *) . "./$found_la" ;;
36035               esac
36036               libdir="$save_libdir"
36037                             for dep in $dependency_libs; do
36038                 case "$dep" in
36039                   -L*)
36040                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
36041                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
36042                        && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
36043                       haveit=
36044                       if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
36045                          || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
36046                         if test -n "$GCC"; then
36047                           case $host_os in
36048                             linux* | gnu* | k*bsd*-gnu) haveit=yes;;
36049                           esac
36050                         fi
36051                       fi
36052                       if test -z "$haveit"; then
36053                         haveit=
36054                         for x in $LDFLAGS $LIBICONV; do
36055
36056   acl_save_prefix="$prefix"
36057   prefix="$acl_final_prefix"
36058   acl_save_exec_prefix="$exec_prefix"
36059   exec_prefix="$acl_final_exec_prefix"
36060   eval x=\"$x\"
36061   exec_prefix="$acl_save_exec_prefix"
36062   prefix="$acl_save_prefix"
36063
36064                           if test "X$x" = "X-L$additional_libdir"; then
36065                             haveit=yes
36066                             break
36067                           fi
36068                         done
36069                         if test -z "$haveit"; then
36070                           if test -d "$additional_libdir"; then
36071                                                         LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
36072                           fi
36073                         fi
36074                         haveit=
36075                         for x in $LDFLAGS $LTLIBICONV; do
36076
36077   acl_save_prefix="$prefix"
36078   prefix="$acl_final_prefix"
36079   acl_save_exec_prefix="$exec_prefix"
36080   exec_prefix="$acl_final_exec_prefix"
36081   eval x=\"$x\"
36082   exec_prefix="$acl_save_exec_prefix"
36083   prefix="$acl_save_prefix"
36084
36085                           if test "X$x" = "X-L$additional_libdir"; then
36086                             haveit=yes
36087                             break
36088                           fi
36089                         done
36090                         if test -z "$haveit"; then
36091                           if test -d "$additional_libdir"; then
36092                                                         LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
36093                           fi
36094                         fi
36095                       fi
36096                     fi
36097                     ;;
36098                   -R*)
36099                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
36100                     if test "$enable_rpath" != no; then
36101                                                                   haveit=
36102                       for x in $rpathdirs; do
36103                         if test "X$x" = "X$dir"; then
36104                           haveit=yes
36105                           break
36106                         fi
36107                       done
36108                       if test -z "$haveit"; then
36109                         rpathdirs="$rpathdirs $dir"
36110                       fi
36111                                                                   haveit=
36112                       for x in $ltrpathdirs; do
36113                         if test "X$x" = "X$dir"; then
36114                           haveit=yes
36115                           break
36116                         fi
36117                       done
36118                       if test -z "$haveit"; then
36119                         ltrpathdirs="$ltrpathdirs $dir"
36120                       fi
36121                     fi
36122                     ;;
36123                   -l*)
36124                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
36125                     ;;
36126                   *.la)
36127                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
36128                     ;;
36129                   *)
36130                                         LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
36131                     LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
36132                     ;;
36133                 esac
36134               done
36135             fi
36136           else
36137                                                             LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
36138             LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
36139           fi
36140         fi
36141       fi
36142     done
36143   done
36144   if test "X$rpathdirs" != "X"; then
36145     if test -n "$acl_hardcode_libdir_separator"; then
36146                         alldirs=
36147       for found_dir in $rpathdirs; do
36148         alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
36149       done
36150             acl_save_libdir="$libdir"
36151       libdir="$alldirs"
36152       eval flag=\"$acl_hardcode_libdir_flag_spec\"
36153       libdir="$acl_save_libdir"
36154       LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
36155     else
36156             for found_dir in $rpathdirs; do
36157         acl_save_libdir="$libdir"
36158         libdir="$found_dir"
36159         eval flag=\"$acl_hardcode_libdir_flag_spec\"
36160         libdir="$acl_save_libdir"
36161         LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
36162       done
36163     fi
36164   fi
36165   if test "X$ltrpathdirs" != "X"; then
36166             for found_dir in $ltrpathdirs; do
36167       LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
36168     done
36169   fi
36170
36171
36172
36173
36174
36175
36176
36177
36178
36179
36180
36181
36182           am_save_CPPFLAGS="$CPPFLAGS"
36183
36184   for element in $INCICONV; do
36185     haveit=
36186     for x in $CPPFLAGS; do
36187
36188   acl_save_prefix="$prefix"
36189   prefix="$acl_final_prefix"
36190   acl_save_exec_prefix="$exec_prefix"
36191   exec_prefix="$acl_final_exec_prefix"
36192   eval x=\"$x\"
36193   exec_prefix="$acl_save_exec_prefix"
36194   prefix="$acl_save_prefix"
36195
36196       if test "X$x" = "X$element"; then
36197         haveit=yes
36198         break
36199       fi
36200     done
36201     if test -z "$haveit"; then
36202       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
36203     fi
36204   done
36205
36206
36207   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
36208 $as_echo_n "checking for iconv... " >&6; }
36209 if ${am_cv_func_iconv+:} false; then :
36210   $as_echo_n "(cached) " >&6
36211 else
36212
36213     am_cv_func_iconv="no, consider installing GNU libiconv"
36214     am_cv_lib_iconv=no
36215     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36216 /* end confdefs.h.  */
36217
36218 #include <stdlib.h>
36219 #include <iconv.h>
36220
36221 int
36222 main ()
36223 {
36224 iconv_t cd = iconv_open("","");
36225            iconv(cd,NULL,NULL,NULL,NULL);
36226            iconv_close(cd);
36227   ;
36228   return 0;
36229 }
36230 _ACEOF
36231 if ac_fn_c_try_link "$LINENO"; then :
36232   am_cv_func_iconv=yes
36233 fi
36234 rm -f core conftest.err conftest.$ac_objext \
36235     conftest$ac_exeext conftest.$ac_ext
36236     if test "$am_cv_func_iconv" != yes; then
36237       am_save_LIBS="$LIBS"
36238       LIBS="$LIBS $LIBICONV"
36239       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36240 /* end confdefs.h.  */
36241
36242 #include <stdlib.h>
36243 #include <iconv.h>
36244
36245 int
36246 main ()
36247 {
36248 iconv_t cd = iconv_open("","");
36249              iconv(cd,NULL,NULL,NULL,NULL);
36250              iconv_close(cd);
36251   ;
36252   return 0;
36253 }
36254 _ACEOF
36255 if ac_fn_c_try_link "$LINENO"; then :
36256   am_cv_lib_iconv=yes
36257         am_cv_func_iconv=yes
36258 fi
36259 rm -f core conftest.err conftest.$ac_objext \
36260     conftest$ac_exeext conftest.$ac_ext
36261       LIBS="$am_save_LIBS"
36262     fi
36263
36264 fi
36265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
36266 $as_echo "$am_cv_func_iconv" >&6; }
36267   if test "$am_cv_func_iconv" = yes; then
36268     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
36269 $as_echo_n "checking for working iconv... " >&6; }
36270 if ${am_cv_func_iconv_works+:} false; then :
36271   $as_echo_n "(cached) " >&6
36272 else
36273
36274                   am_save_LIBS="$LIBS"
36275       if test $am_cv_lib_iconv = yes; then
36276         LIBS="$LIBS $LIBICONV"
36277       fi
36278       am_cv_func_iconv_works=no
36279       for ac_iconv_const in '' 'const'; do
36280         if test "$cross_compiling" = yes; then :
36281   case "$host_os" in
36282              aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
36283              *)            am_cv_func_iconv_works="guessing yes" ;;
36284            esac
36285 else
36286   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36287 /* end confdefs.h.  */
36288
36289 #include <iconv.h>
36290 #include <string.h>
36291
36292 #ifndef ICONV_CONST
36293 # define ICONV_CONST $ac_iconv_const
36294 #endif
36295
36296 int
36297 main ()
36298 {
36299 int result = 0;
36300   /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
36301      returns.  */
36302   {
36303     iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
36304     if (cd_utf8_to_88591 != (iconv_t)(-1))
36305       {
36306         static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */
36307         char buf[10];
36308         ICONV_CONST char *inptr = input;
36309         size_t inbytesleft = strlen (input);
36310         char *outptr = buf;
36311         size_t outbytesleft = sizeof (buf);
36312         size_t res = iconv (cd_utf8_to_88591,
36313                             &inptr, &inbytesleft,
36314                             &outptr, &outbytesleft);
36315         if (res == 0)
36316           result |= 1;
36317         iconv_close (cd_utf8_to_88591);
36318       }
36319   }
36320   /* Test against Solaris 10 bug: Failures are not distinguishable from
36321      successful returns.  */
36322   {
36323     iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
36324     if (cd_ascii_to_88591 != (iconv_t)(-1))
36325       {
36326         static ICONV_CONST char input[] = "\263";
36327         char buf[10];
36328         ICONV_CONST char *inptr = input;
36329         size_t inbytesleft = strlen (input);
36330         char *outptr = buf;
36331         size_t outbytesleft = sizeof (buf);
36332         size_t res = iconv (cd_ascii_to_88591,
36333                             &inptr, &inbytesleft,
36334                             &outptr, &outbytesleft);
36335         if (res == 0)
36336           result |= 2;
36337         iconv_close (cd_ascii_to_88591);
36338       }
36339   }
36340   /* Test against AIX 6.1..7.1 bug: Buffer overrun.  */
36341   {
36342     iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
36343     if (cd_88591_to_utf8 != (iconv_t)(-1))
36344       {
36345         static ICONV_CONST char input[] = "\304";
36346         static char buf[2] = { (char)0xDE, (char)0xAD };
36347         ICONV_CONST char *inptr = input;
36348         size_t inbytesleft = 1;
36349         char *outptr = buf;
36350         size_t outbytesleft = 1;
36351         size_t res = iconv (cd_88591_to_utf8,
36352                             &inptr, &inbytesleft,
36353                             &outptr, &outbytesleft);
36354         if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
36355           result |= 4;
36356         iconv_close (cd_88591_to_utf8);
36357       }
36358   }
36359 #if 0 /* This bug could be worked around by the caller.  */
36360   /* Test against HP-UX 11.11 bug: Positive return value instead of 0.  */
36361   {
36362     iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
36363     if (cd_88591_to_utf8 != (iconv_t)(-1))
36364       {
36365         static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
36366         char buf[50];
36367         ICONV_CONST char *inptr = input;
36368         size_t inbytesleft = strlen (input);
36369         char *outptr = buf;
36370         size_t outbytesleft = sizeof (buf);
36371         size_t res = iconv (cd_88591_to_utf8,
36372                             &inptr, &inbytesleft,
36373                             &outptr, &outbytesleft);
36374         if ((int)res > 0)
36375           result |= 8;
36376         iconv_close (cd_88591_to_utf8);
36377       }
36378   }
36379 #endif
36380   /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
36381      provided.  */
36382   if (/* Try standardized names.  */
36383       iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
36384       /* Try IRIX, OSF/1 names.  */
36385       && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
36386       /* Try AIX names.  */
36387       && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
36388       /* Try HP-UX names.  */
36389       && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
36390     result |= 16;
36391   return result;
36392
36393   ;
36394   return 0;
36395 }
36396 _ACEOF
36397 if ac_fn_c_try_run "$LINENO"; then :
36398   am_cv_func_iconv_works=yes
36399 fi
36400 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
36401   conftest.$ac_objext conftest.beam conftest.$ac_ext
36402 fi
36403
36404         test "$am_cv_func_iconv_works" = no || break
36405       done
36406       LIBS="$am_save_LIBS"
36407
36408 fi
36409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
36410 $as_echo "$am_cv_func_iconv_works" >&6; }
36411     case "$am_cv_func_iconv_works" in
36412       *no) am_func_iconv=no am_cv_lib_iconv=no ;;
36413       *)   am_func_iconv=yes ;;
36414     esac
36415   else
36416     am_func_iconv=no am_cv_lib_iconv=no
36417   fi
36418   if test "$am_func_iconv" = yes; then
36419
36420 $as_echo "#define HAVE_ICONV 1" >>confdefs.h
36421
36422   fi
36423   if test "$am_cv_lib_iconv" = yes; then
36424     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
36425 $as_echo_n "checking how to link with libiconv... " >&6; }
36426     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
36427 $as_echo "$LIBICONV" >&6; }
36428   else
36429             CPPFLAGS="$am_save_CPPFLAGS"
36430     LIBICONV=
36431     LTLIBICONV=
36432   fi
36433
36434
36435
36436   if test "$am_cv_func_iconv" = yes; then
36437     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
36438 $as_echo_n "checking for iconv declaration... " >&6; }
36439     if ${am_cv_proto_iconv+:} false; then :
36440   $as_echo_n "(cached) " >&6
36441 else
36442
36443       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36444 /* end confdefs.h.  */
36445
36446 #include <stdlib.h>
36447 #include <iconv.h>
36448 extern
36449 #ifdef __cplusplus
36450 "C"
36451 #endif
36452 #if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus)
36453 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
36454 #else
36455 size_t iconv();
36456 #endif
36457
36458 int
36459 main ()
36460 {
36461
36462   ;
36463   return 0;
36464 }
36465 _ACEOF
36466 if ac_fn_c_try_compile "$LINENO"; then :
36467   am_cv_proto_iconv_arg1=""
36468 else
36469   am_cv_proto_iconv_arg1="const"
36470 fi
36471 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36472       am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"
36473 fi
36474
36475     am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
36476     { $as_echo "$as_me:${as_lineno-$LINENO}: result:
36477          $am_cv_proto_iconv" >&5
36478 $as_echo "
36479          $am_cv_proto_iconv" >&6; }
36480
36481 cat >>confdefs.h <<_ACEOF
36482 #define ICONV_CONST $am_cv_proto_iconv_arg1
36483 _ACEOF
36484
36485
36486   fi
36487
36488 for ac_header in iconv.h
36489 do :
36490   ac_fn_c_check_header_mongrel "$LINENO" "iconv.h" "ac_cv_header_iconv_h" "$ac_includes_default"
36491 if test "x$ac_cv_header_iconv_h" = xyes; then :
36492   cat >>confdefs.h <<_ACEOF
36493 #define HAVE_ICONV_H 1
36494 _ACEOF
36495
36496 fi
36497
36498 done
36499
36500 ac_fn_c_check_type "$LINENO" "iconv_t" "ac_cv_type_iconv_t" "
36501 #ifdef HAVE_ICONV_H
36502 # include <iconv.h>
36503 #endif
36504
36505 "
36506 if test "x$ac_cv_type_iconv_t" = xyes; then :
36507   :
36508 else
36509
36510 $as_echo "#define iconv_t int" >>confdefs.h
36511
36512 fi
36513
36514
36515 # Gettext.
36516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
36517 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
36518 if ${ac_cv_path_SED+:} false; then :
36519   $as_echo_n "(cached) " >&6
36520 else
36521             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
36522      for ac_i in 1 2 3 4 5 6 7; do
36523        ac_script="$ac_script$as_nl$ac_script"
36524      done
36525      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
36526      { ac_script=; unset ac_script;}
36527      if test -z "$SED"; then
36528   ac_path_SED_found=false
36529   # Loop through the user's path and test for each of PROGNAME-LIST
36530   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36531 for as_dir in $PATH
36532 do
36533   IFS=$as_save_IFS
36534   test -z "$as_dir" && as_dir=.
36535     for ac_prog in sed gsed; do
36536     for ac_exec_ext in '' $ac_executable_extensions; do
36537       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
36538       as_fn_executable_p "$ac_path_SED" || continue
36539 # Check for GNU ac_path_SED and select it if it is found.
36540   # Check for GNU $ac_path_SED
36541 case `"$ac_path_SED" --version 2>&1` in
36542 *GNU*)
36543   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
36544 *)
36545   ac_count=0
36546   $as_echo_n 0123456789 >"conftest.in"
36547   while :
36548   do
36549     cat "conftest.in" "conftest.in" >"conftest.tmp"
36550     mv "conftest.tmp" "conftest.in"
36551     cp "conftest.in" "conftest.nl"
36552     $as_echo '' >> "conftest.nl"
36553     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
36554     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
36555     as_fn_arith $ac_count + 1 && ac_count=$as_val
36556     if test $ac_count -gt ${ac_path_SED_max-0}; then
36557       # Best one so far, save it but keep looking for a better one
36558       ac_cv_path_SED="$ac_path_SED"
36559       ac_path_SED_max=$ac_count
36560     fi
36561     # 10*(2^10) chars as input seems more than enough
36562     test $ac_count -gt 10 && break
36563   done
36564   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
36565 esac
36566
36567       $ac_path_SED_found && break 3
36568     done
36569   done
36570   done
36571 IFS=$as_save_IFS
36572   if test -z "$ac_cv_path_SED"; then
36573     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
36574   fi
36575 else
36576   ac_cv_path_SED=$SED
36577 fi
36578
36579 fi
36580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
36581 $as_echo "$ac_cv_path_SED" >&6; }
36582  SED="$ac_cv_path_SED"
36583   rm -f conftest.sed
36584
36585
36586   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
36587 $as_echo_n "checking whether NLS is requested... " >&6; }
36588     # Check whether --enable-nls was given.
36589 if test "${enable_nls+set}" = set; then :
36590   enableval=$enable_nls; USE_NLS=$enableval
36591 else
36592   USE_NLS=yes
36593 fi
36594
36595   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
36596 $as_echo "$USE_NLS" >&6; }
36597
36598
36599
36600
36601       GETTEXT_MACRO_VERSION=0.19
36602
36603
36604
36605
36606 # Prepare PATH_SEPARATOR.
36607 # The user is always right.
36608 if test "${PATH_SEPARATOR+set}" != set; then
36609   # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
36610   # contains only /bin. Note that ksh looks also at the FPATH variable,
36611   # so we have to set that as well for the test.
36612   PATH_SEPARATOR=:
36613   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
36614     && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
36615            || PATH_SEPARATOR=';'
36616        }
36617 fi
36618
36619 # Find out how to test for executable files. Don't use a zero-byte file,
36620 # as systems may use methods other than mode bits to determine executability.
36621 cat >conf$$.file <<_ASEOF
36622 #! /bin/sh
36623 exit 0
36624 _ASEOF
36625 chmod +x conf$$.file
36626 if test -x conf$$.file >/dev/null 2>&1; then
36627   ac_executable_p="test -x"
36628 else
36629   ac_executable_p="test -f"
36630 fi
36631 rm -f conf$$.file
36632
36633 # Extract the first word of "msgfmt", so it can be a program name with args.
36634 set dummy msgfmt; ac_word=$2
36635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36636 $as_echo_n "checking for $ac_word... " >&6; }
36637 if ${ac_cv_path_MSGFMT+:} false; then :
36638   $as_echo_n "(cached) " >&6
36639 else
36640   case "$MSGFMT" in
36641   [\\/]* | ?:[\\/]*)
36642     ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
36643     ;;
36644   *)
36645     ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
36646     for ac_dir in $PATH; do
36647       IFS="$ac_save_IFS"
36648       test -z "$ac_dir" && ac_dir=.
36649       for ac_exec_ext in '' $ac_executable_extensions; do
36650         if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
36651           echo "$as_me: trying $ac_dir/$ac_word..." >&5
36652           if $ac_dir/$ac_word --statistics /dev/null >&5 2>&1 &&
36653      (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
36654             ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext"
36655             break 2
36656           fi
36657         fi
36658       done
36659     done
36660     IFS="$ac_save_IFS"
36661   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
36662     ;;
36663 esac
36664 fi
36665 MSGFMT="$ac_cv_path_MSGFMT"
36666 if test "$MSGFMT" != ":"; then
36667   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
36668 $as_echo "$MSGFMT" >&6; }
36669 else
36670   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36671 $as_echo "no" >&6; }
36672 fi
36673
36674   # Extract the first word of "gmsgfmt", so it can be a program name with args.
36675 set dummy gmsgfmt; ac_word=$2
36676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36677 $as_echo_n "checking for $ac_word... " >&6; }
36678 if ${ac_cv_path_GMSGFMT+:} false; then :
36679   $as_echo_n "(cached) " >&6
36680 else
36681   case $GMSGFMT in
36682   [\\/]* | ?:[\\/]*)
36683   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
36684   ;;
36685   *)
36686   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36687 for as_dir in $PATH
36688 do
36689   IFS=$as_save_IFS
36690   test -z "$as_dir" && as_dir=.
36691     for ac_exec_ext in '' $ac_executable_extensions; do
36692   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36693     ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
36694     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36695     break 2
36696   fi
36697 done
36698   done
36699 IFS=$as_save_IFS
36700
36701   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
36702   ;;
36703 esac
36704 fi
36705 GMSGFMT=$ac_cv_path_GMSGFMT
36706 if test -n "$GMSGFMT"; then
36707   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
36708 $as_echo "$GMSGFMT" >&6; }
36709 else
36710   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36711 $as_echo "no" >&6; }
36712 fi
36713
36714
36715
36716     case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
36717     '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
36718     *) MSGFMT_015=$MSGFMT ;;
36719   esac
36720
36721   case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
36722     '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
36723     *) GMSGFMT_015=$GMSGFMT ;;
36724   esac
36725
36726
36727
36728 # Prepare PATH_SEPARATOR.
36729 # The user is always right.
36730 if test "${PATH_SEPARATOR+set}" != set; then
36731   # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
36732   # contains only /bin. Note that ksh looks also at the FPATH variable,
36733   # so we have to set that as well for the test.
36734   PATH_SEPARATOR=:
36735   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
36736     && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
36737            || PATH_SEPARATOR=';'
36738        }
36739 fi
36740
36741 # Find out how to test for executable files. Don't use a zero-byte file,
36742 # as systems may use methods other than mode bits to determine executability.
36743 cat >conf$$.file <<_ASEOF
36744 #! /bin/sh
36745 exit 0
36746 _ASEOF
36747 chmod +x conf$$.file
36748 if test -x conf$$.file >/dev/null 2>&1; then
36749   ac_executable_p="test -x"
36750 else
36751   ac_executable_p="test -f"
36752 fi
36753 rm -f conf$$.file
36754
36755 # Extract the first word of "xgettext", so it can be a program name with args.
36756 set dummy xgettext; ac_word=$2
36757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36758 $as_echo_n "checking for $ac_word... " >&6; }
36759 if ${ac_cv_path_XGETTEXT+:} false; then :
36760   $as_echo_n "(cached) " >&6
36761 else
36762   case "$XGETTEXT" in
36763   [\\/]* | ?:[\\/]*)
36764     ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
36765     ;;
36766   *)
36767     ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
36768     for ac_dir in $PATH; do
36769       IFS="$ac_save_IFS"
36770       test -z "$ac_dir" && ac_dir=.
36771       for ac_exec_ext in '' $ac_executable_extensions; do
36772         if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
36773           echo "$as_me: trying $ac_dir/$ac_word..." >&5
36774           if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&5 2>&1 &&
36775      (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
36776             ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext"
36777             break 2
36778           fi
36779         fi
36780       done
36781     done
36782     IFS="$ac_save_IFS"
36783   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
36784     ;;
36785 esac
36786 fi
36787 XGETTEXT="$ac_cv_path_XGETTEXT"
36788 if test "$XGETTEXT" != ":"; then
36789   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
36790 $as_echo "$XGETTEXT" >&6; }
36791 else
36792   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36793 $as_echo "no" >&6; }
36794 fi
36795
36796     rm -f messages.po
36797
36798     case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
36799     '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
36800     *) XGETTEXT_015=$XGETTEXT ;;
36801   esac
36802
36803
36804
36805 # Prepare PATH_SEPARATOR.
36806 # The user is always right.
36807 if test "${PATH_SEPARATOR+set}" != set; then
36808   # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
36809   # contains only /bin. Note that ksh looks also at the FPATH variable,
36810   # so we have to set that as well for the test.
36811   PATH_SEPARATOR=:
36812   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
36813     && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
36814            || PATH_SEPARATOR=';'
36815        }
36816 fi
36817
36818 # Find out how to test for executable files. Don't use a zero-byte file,
36819 # as systems may use methods other than mode bits to determine executability.
36820 cat >conf$$.file <<_ASEOF
36821 #! /bin/sh
36822 exit 0
36823 _ASEOF
36824 chmod +x conf$$.file
36825 if test -x conf$$.file >/dev/null 2>&1; then
36826   ac_executable_p="test -x"
36827 else
36828   ac_executable_p="test -f"
36829 fi
36830 rm -f conf$$.file
36831
36832 # Extract the first word of "msgmerge", so it can be a program name with args.
36833 set dummy msgmerge; ac_word=$2
36834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36835 $as_echo_n "checking for $ac_word... " >&6; }
36836 if ${ac_cv_path_MSGMERGE+:} false; then :
36837   $as_echo_n "(cached) " >&6
36838 else
36839   case "$MSGMERGE" in
36840   [\\/]* | ?:[\\/]*)
36841     ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
36842     ;;
36843   *)
36844     ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
36845     for ac_dir in $PATH; do
36846       IFS="$ac_save_IFS"
36847       test -z "$ac_dir" && ac_dir=.
36848       for ac_exec_ext in '' $ac_executable_extensions; do
36849         if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
36850           echo "$as_me: trying $ac_dir/$ac_word..." >&5
36851           if $ac_dir/$ac_word --update -q /dev/null /dev/null >&5 2>&1; then
36852             ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext"
36853             break 2
36854           fi
36855         fi
36856       done
36857     done
36858     IFS="$ac_save_IFS"
36859   test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":"
36860     ;;
36861 esac
36862 fi
36863 MSGMERGE="$ac_cv_path_MSGMERGE"
36864 if test "$MSGMERGE" != ":"; then
36865   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
36866 $as_echo "$MSGMERGE" >&6; }
36867 else
36868   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36869 $as_echo "no" >&6; }
36870 fi
36871
36872
36873         test -n "$localedir" || localedir='${datadir}/locale'
36874
36875
36876     test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
36877
36878
36879   ac_config_commands="$ac_config_commands po-directories"
36880
36881
36882
36883
36884
36885
36886
36887
36888
36889
36890
36891
36892
36893
36894
36895
36896
36897
36898
36899
36900
36901
36902
36903
36904
36905
36906     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5
36907 $as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; }
36908 if ${gt_cv_func_CFPreferencesCopyAppValue+:} false; then :
36909   $as_echo_n "(cached) " >&6
36910 else
36911   gt_save_LIBS="$LIBS"
36912      LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
36913      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36914 /* end confdefs.h.  */
36915 #include <CoreFoundation/CFPreferences.h>
36916 int
36917 main ()
36918 {
36919 CFPreferencesCopyAppValue(NULL, NULL)
36920   ;
36921   return 0;
36922 }
36923 _ACEOF
36924 if ac_fn_c_try_link "$LINENO"; then :
36925   gt_cv_func_CFPreferencesCopyAppValue=yes
36926 else
36927   gt_cv_func_CFPreferencesCopyAppValue=no
36928 fi
36929 rm -f core conftest.err conftest.$ac_objext \
36930     conftest$ac_exeext conftest.$ac_ext
36931      LIBS="$gt_save_LIBS"
36932 fi
36933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5
36934 $as_echo "$gt_cv_func_CFPreferencesCopyAppValue" >&6; }
36935   if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
36936
36937 $as_echo "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h
36938
36939   fi
36940     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5
36941 $as_echo_n "checking for CFLocaleCopyCurrent... " >&6; }
36942 if ${gt_cv_func_CFLocaleCopyCurrent+:} false; then :
36943   $as_echo_n "(cached) " >&6
36944 else
36945   gt_save_LIBS="$LIBS"
36946      LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
36947      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36948 /* end confdefs.h.  */
36949 #include <CoreFoundation/CFLocale.h>
36950 int
36951 main ()
36952 {
36953 CFLocaleCopyCurrent();
36954   ;
36955   return 0;
36956 }
36957 _ACEOF
36958 if ac_fn_c_try_link "$LINENO"; then :
36959   gt_cv_func_CFLocaleCopyCurrent=yes
36960 else
36961   gt_cv_func_CFLocaleCopyCurrent=no
36962 fi
36963 rm -f core conftest.err conftest.$ac_objext \
36964     conftest$ac_exeext conftest.$ac_ext
36965      LIBS="$gt_save_LIBS"
36966 fi
36967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5
36968 $as_echo "$gt_cv_func_CFLocaleCopyCurrent" >&6; }
36969   if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
36970
36971 $as_echo "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h
36972
36973   fi
36974   INTL_MACOSX_LIBS=
36975   if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
36976     INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
36977   fi
36978
36979
36980
36981
36982
36983
36984   LIBINTL=
36985   LTLIBINTL=
36986   POSUB=
36987
36988     case " $gt_needs " in
36989     *" need-formatstring-macros "*) gt_api_version=3 ;;
36990     *" need-ngettext "*) gt_api_version=2 ;;
36991     *) gt_api_version=1 ;;
36992   esac
36993   gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
36994   gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
36995
36996     if test "$USE_NLS" = "yes"; then
36997     gt_use_preinstalled_gnugettext=no
36998
36999
37000         if test $gt_api_version -ge 3; then
37001           gt_revision_test_code='
37002 #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
37003 #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
37004 #endif
37005 typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
37006 '
37007         else
37008           gt_revision_test_code=
37009         fi
37010         if test $gt_api_version -ge 2; then
37011           gt_expression_test_code=' + * ngettext ("", "", 0)'
37012         else
37013           gt_expression_test_code=
37014         fi
37015
37016         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5
37017 $as_echo_n "checking for GNU gettext in libc... " >&6; }
37018 if eval \${$gt_func_gnugettext_libc+:} false; then :
37019   $as_echo_n "(cached) " >&6
37020 else
37021   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37022 /* end confdefs.h.  */
37023
37024 #include <libintl.h>
37025 $gt_revision_test_code
37026 extern int _nl_msg_cat_cntr;
37027 extern int *_nl_domain_bindings;
37028
37029 int
37030 main ()
37031 {
37032
37033 bindtextdomain ("", "");
37034 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings
37035
37036   ;
37037   return 0;
37038 }
37039 _ACEOF
37040 if ac_fn_c_try_link "$LINENO"; then :
37041   eval "$gt_func_gnugettext_libc=yes"
37042 else
37043   eval "$gt_func_gnugettext_libc=no"
37044 fi
37045 rm -f core conftest.err conftest.$ac_objext \
37046     conftest$ac_exeext conftest.$ac_ext
37047 fi
37048 eval ac_res=\$$gt_func_gnugettext_libc
37049                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
37050 $as_echo "$ac_res" >&6; }
37051
37052         if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
37053
37054
37055
37056
37057
37058           am_save_CPPFLAGS="$CPPFLAGS"
37059
37060   for element in $INCICONV; do
37061     haveit=
37062     for x in $CPPFLAGS; do
37063
37064   acl_save_prefix="$prefix"
37065   prefix="$acl_final_prefix"
37066   acl_save_exec_prefix="$exec_prefix"
37067   exec_prefix="$acl_final_exec_prefix"
37068   eval x=\"$x\"
37069   exec_prefix="$acl_save_exec_prefix"
37070   prefix="$acl_save_prefix"
37071
37072       if test "X$x" = "X$element"; then
37073         haveit=yes
37074         break
37075       fi
37076     done
37077     if test -z "$haveit"; then
37078       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
37079     fi
37080   done
37081
37082
37083   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
37084 $as_echo_n "checking for iconv... " >&6; }
37085 if ${am_cv_func_iconv+:} false; then :
37086   $as_echo_n "(cached) " >&6
37087 else
37088
37089     am_cv_func_iconv="no, consider installing GNU libiconv"
37090     am_cv_lib_iconv=no
37091     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37092 /* end confdefs.h.  */
37093
37094 #include <stdlib.h>
37095 #include <iconv.h>
37096
37097 int
37098 main ()
37099 {
37100 iconv_t cd = iconv_open("","");
37101            iconv(cd,NULL,NULL,NULL,NULL);
37102            iconv_close(cd);
37103   ;
37104   return 0;
37105 }
37106 _ACEOF
37107 if ac_fn_c_try_link "$LINENO"; then :
37108   am_cv_func_iconv=yes
37109 fi
37110 rm -f core conftest.err conftest.$ac_objext \
37111     conftest$ac_exeext conftest.$ac_ext
37112     if test "$am_cv_func_iconv" != yes; then
37113       am_save_LIBS="$LIBS"
37114       LIBS="$LIBS $LIBICONV"
37115       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37116 /* end confdefs.h.  */
37117
37118 #include <stdlib.h>
37119 #include <iconv.h>
37120
37121 int
37122 main ()
37123 {
37124 iconv_t cd = iconv_open("","");
37125              iconv(cd,NULL,NULL,NULL,NULL);
37126              iconv_close(cd);
37127   ;
37128   return 0;
37129 }
37130 _ACEOF
37131 if ac_fn_c_try_link "$LINENO"; then :
37132   am_cv_lib_iconv=yes
37133         am_cv_func_iconv=yes
37134 fi
37135 rm -f core conftest.err conftest.$ac_objext \
37136     conftest$ac_exeext conftest.$ac_ext
37137       LIBS="$am_save_LIBS"
37138     fi
37139
37140 fi
37141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
37142 $as_echo "$am_cv_func_iconv" >&6; }
37143   if test "$am_cv_func_iconv" = yes; then
37144     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
37145 $as_echo_n "checking for working iconv... " >&6; }
37146 if ${am_cv_func_iconv_works+:} false; then :
37147   $as_echo_n "(cached) " >&6
37148 else
37149
37150                   am_save_LIBS="$LIBS"
37151       if test $am_cv_lib_iconv = yes; then
37152         LIBS="$LIBS $LIBICONV"
37153       fi
37154       am_cv_func_iconv_works=no
37155       for ac_iconv_const in '' 'const'; do
37156         if test "$cross_compiling" = yes; then :
37157   case "$host_os" in
37158              aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
37159              *)            am_cv_func_iconv_works="guessing yes" ;;
37160            esac
37161 else
37162   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37163 /* end confdefs.h.  */
37164
37165 #include <iconv.h>
37166 #include <string.h>
37167
37168 #ifndef ICONV_CONST
37169 # define ICONV_CONST $ac_iconv_const
37170 #endif
37171
37172 int
37173 main ()
37174 {
37175 int result = 0;
37176   /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
37177      returns.  */
37178   {
37179     iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
37180     if (cd_utf8_to_88591 != (iconv_t)(-1))
37181       {
37182         static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */
37183         char buf[10];
37184         ICONV_CONST char *inptr = input;
37185         size_t inbytesleft = strlen (input);
37186         char *outptr = buf;
37187         size_t outbytesleft = sizeof (buf);
37188         size_t res = iconv (cd_utf8_to_88591,
37189                             &inptr, &inbytesleft,
37190                             &outptr, &outbytesleft);
37191         if (res == 0)
37192           result |= 1;
37193         iconv_close (cd_utf8_to_88591);
37194       }
37195   }
37196   /* Test against Solaris 10 bug: Failures are not distinguishable from
37197      successful returns.  */
37198   {
37199     iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
37200     if (cd_ascii_to_88591 != (iconv_t)(-1))
37201       {
37202         static ICONV_CONST char input[] = "\263";
37203         char buf[10];
37204         ICONV_CONST char *inptr = input;
37205         size_t inbytesleft = strlen (input);
37206         char *outptr = buf;
37207         size_t outbytesleft = sizeof (buf);
37208         size_t res = iconv (cd_ascii_to_88591,
37209                             &inptr, &inbytesleft,
37210                             &outptr, &outbytesleft);
37211         if (res == 0)
37212           result |= 2;
37213         iconv_close (cd_ascii_to_88591);
37214       }
37215   }
37216   /* Test against AIX 6.1..7.1 bug: Buffer overrun.  */
37217   {
37218     iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
37219     if (cd_88591_to_utf8 != (iconv_t)(-1))
37220       {
37221         static ICONV_CONST char input[] = "\304";
37222         static char buf[2] = { (char)0xDE, (char)0xAD };
37223         ICONV_CONST char *inptr = input;
37224         size_t inbytesleft = 1;
37225         char *outptr = buf;
37226         size_t outbytesleft = 1;
37227         size_t res = iconv (cd_88591_to_utf8,
37228                             &inptr, &inbytesleft,
37229                             &outptr, &outbytesleft);
37230         if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
37231           result |= 4;
37232         iconv_close (cd_88591_to_utf8);
37233       }
37234   }
37235 #if 0 /* This bug could be worked around by the caller.  */
37236   /* Test against HP-UX 11.11 bug: Positive return value instead of 0.  */
37237   {
37238     iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
37239     if (cd_88591_to_utf8 != (iconv_t)(-1))
37240       {
37241         static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
37242         char buf[50];
37243         ICONV_CONST char *inptr = input;
37244         size_t inbytesleft = strlen (input);
37245         char *outptr = buf;
37246         size_t outbytesleft = sizeof (buf);
37247         size_t res = iconv (cd_88591_to_utf8,
37248                             &inptr, &inbytesleft,
37249                             &outptr, &outbytesleft);
37250         if ((int)res > 0)
37251           result |= 8;
37252         iconv_close (cd_88591_to_utf8);
37253       }
37254   }
37255 #endif
37256   /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
37257      provided.  */
37258   if (/* Try standardized names.  */
37259       iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
37260       /* Try IRIX, OSF/1 names.  */
37261       && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
37262       /* Try AIX names.  */
37263       && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
37264       /* Try HP-UX names.  */
37265       && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
37266     result |= 16;
37267   return result;
37268
37269   ;
37270   return 0;
37271 }
37272 _ACEOF
37273 if ac_fn_c_try_run "$LINENO"; then :
37274   am_cv_func_iconv_works=yes
37275 fi
37276 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
37277   conftest.$ac_objext conftest.beam conftest.$ac_ext
37278 fi
37279
37280         test "$am_cv_func_iconv_works" = no || break
37281       done
37282       LIBS="$am_save_LIBS"
37283
37284 fi
37285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
37286 $as_echo "$am_cv_func_iconv_works" >&6; }
37287     case "$am_cv_func_iconv_works" in
37288       *no) am_func_iconv=no am_cv_lib_iconv=no ;;
37289       *)   am_func_iconv=yes ;;
37290     esac
37291   else
37292     am_func_iconv=no am_cv_lib_iconv=no
37293   fi
37294   if test "$am_func_iconv" = yes; then
37295
37296 $as_echo "#define HAVE_ICONV 1" >>confdefs.h
37297
37298   fi
37299   if test "$am_cv_lib_iconv" = yes; then
37300     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
37301 $as_echo_n "checking how to link with libiconv... " >&6; }
37302     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
37303 $as_echo "$LIBICONV" >&6; }
37304   else
37305             CPPFLAGS="$am_save_CPPFLAGS"
37306     LIBICONV=
37307     LTLIBICONV=
37308   fi
37309
37310
37311
37312
37313
37314
37315
37316
37317
37318
37319
37320     use_additional=yes
37321
37322   acl_save_prefix="$prefix"
37323   prefix="$acl_final_prefix"
37324   acl_save_exec_prefix="$exec_prefix"
37325   exec_prefix="$acl_final_exec_prefix"
37326
37327     eval additional_includedir=\"$includedir\"
37328     eval additional_libdir=\"$libdir\"
37329
37330   exec_prefix="$acl_save_exec_prefix"
37331   prefix="$acl_save_prefix"
37332
37333
37334 # Check whether --with-libintl-prefix was given.
37335 if test "${with_libintl_prefix+set}" = set; then :
37336   withval=$with_libintl_prefix;
37337     if test "X$withval" = "Xno"; then
37338       use_additional=no
37339     else
37340       if test "X$withval" = "X"; then
37341
37342   acl_save_prefix="$prefix"
37343   prefix="$acl_final_prefix"
37344   acl_save_exec_prefix="$exec_prefix"
37345   exec_prefix="$acl_final_exec_prefix"
37346
37347           eval additional_includedir=\"$includedir\"
37348           eval additional_libdir=\"$libdir\"
37349
37350   exec_prefix="$acl_save_exec_prefix"
37351   prefix="$acl_save_prefix"
37352
37353       else
37354         additional_includedir="$withval/include"
37355         additional_libdir="$withval/$acl_libdirstem"
37356         if test "$acl_libdirstem2" != "$acl_libdirstem" \
37357            && ! test -d "$withval/$acl_libdirstem"; then
37358           additional_libdir="$withval/$acl_libdirstem2"
37359         fi
37360       fi
37361     fi
37362
37363 fi
37364
37365       LIBINTL=
37366   LTLIBINTL=
37367   INCINTL=
37368   LIBINTL_PREFIX=
37369       HAVE_LIBINTL=
37370   rpathdirs=
37371   ltrpathdirs=
37372   names_already_handled=
37373   names_next_round='intl '
37374   while test -n "$names_next_round"; do
37375     names_this_round="$names_next_round"
37376     names_next_round=
37377     for name in $names_this_round; do
37378       already_handled=
37379       for n in $names_already_handled; do
37380         if test "$n" = "$name"; then
37381           already_handled=yes
37382           break
37383         fi
37384       done
37385       if test -z "$already_handled"; then
37386         names_already_handled="$names_already_handled $name"
37387                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
37388         eval value=\"\$HAVE_LIB$uppername\"
37389         if test -n "$value"; then
37390           if test "$value" = yes; then
37391             eval value=\"\$LIB$uppername\"
37392             test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value"
37393             eval value=\"\$LTLIB$uppername\"
37394             test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value"
37395           else
37396                                     :
37397           fi
37398         else
37399                               found_dir=
37400           found_la=
37401           found_so=
37402           found_a=
37403           eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
37404           if test -n "$acl_shlibext"; then
37405             shrext=".$acl_shlibext"             # typically: shrext=.so
37406           else
37407             shrext=
37408           fi
37409           if test $use_additional = yes; then
37410             dir="$additional_libdir"
37411                                     if test -n "$acl_shlibext"; then
37412               if test -f "$dir/$libname$shrext"; then
37413                 found_dir="$dir"
37414                 found_so="$dir/$libname$shrext"
37415               else
37416                 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
37417                   ver=`(cd "$dir" && \
37418                         for f in "$libname$shrext".*; do echo "$f"; done \
37419                         | sed -e "s,^$libname$shrext\\\\.,," \
37420                         | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
37421                         | sed 1q ) 2>/dev/null`
37422                   if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
37423                     found_dir="$dir"
37424                     found_so="$dir/$libname$shrext.$ver"
37425                   fi
37426                 else
37427                   eval library_names=\"$acl_library_names_spec\"
37428                   for f in $library_names; do
37429                     if test -f "$dir/$f"; then
37430                       found_dir="$dir"
37431                       found_so="$dir/$f"
37432                       break
37433                     fi
37434                   done
37435                 fi
37436               fi
37437             fi
37438                         if test "X$found_dir" = "X"; then
37439               if test -f "$dir/$libname.$acl_libext"; then
37440                 found_dir="$dir"
37441                 found_a="$dir/$libname.$acl_libext"
37442               fi
37443             fi
37444             if test "X$found_dir" != "X"; then
37445               if test -f "$dir/$libname.la"; then
37446                 found_la="$dir/$libname.la"
37447               fi
37448             fi
37449           fi
37450           if test "X$found_dir" = "X"; then
37451             for x in $LDFLAGS $LTLIBINTL; do
37452
37453   acl_save_prefix="$prefix"
37454   prefix="$acl_final_prefix"
37455   acl_save_exec_prefix="$exec_prefix"
37456   exec_prefix="$acl_final_exec_prefix"
37457   eval x=\"$x\"
37458   exec_prefix="$acl_save_exec_prefix"
37459   prefix="$acl_save_prefix"
37460
37461               case "$x" in
37462                 -L*)
37463                   dir=`echo "X$x" | sed -e 's/^X-L//'`
37464                                     if test -n "$acl_shlibext"; then
37465                     if test -f "$dir/$libname$shrext"; then
37466                       found_dir="$dir"
37467                       found_so="$dir/$libname$shrext"
37468                     else
37469                       if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
37470                         ver=`(cd "$dir" && \
37471                               for f in "$libname$shrext".*; do echo "$f"; done \
37472                               | sed -e "s,^$libname$shrext\\\\.,," \
37473                               | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
37474                               | sed 1q ) 2>/dev/null`
37475                         if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
37476                           found_dir="$dir"
37477                           found_so="$dir/$libname$shrext.$ver"
37478                         fi
37479                       else
37480                         eval library_names=\"$acl_library_names_spec\"
37481                         for f in $library_names; do
37482                           if test -f "$dir/$f"; then
37483                             found_dir="$dir"
37484                             found_so="$dir/$f"
37485                             break
37486                           fi
37487                         done
37488                       fi
37489                     fi
37490                   fi
37491                                     if test "X$found_dir" = "X"; then
37492                     if test -f "$dir/$libname.$acl_libext"; then
37493                       found_dir="$dir"
37494                       found_a="$dir/$libname.$acl_libext"
37495                     fi
37496                   fi
37497                   if test "X$found_dir" != "X"; then
37498                     if test -f "$dir/$libname.la"; then
37499                       found_la="$dir/$libname.la"
37500                     fi
37501                   fi
37502                   ;;
37503               esac
37504               if test "X$found_dir" != "X"; then
37505                 break
37506               fi
37507             done
37508           fi
37509           if test "X$found_dir" != "X"; then
37510                         LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name"
37511             if test "X$found_so" != "X"; then
37512                                                         if test "$enable_rpath" = no \
37513                  || test "X$found_dir" = "X/usr/$acl_libdirstem" \
37514                  || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
37515                                 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
37516               else
37517                                                                                 haveit=
37518                 for x in $ltrpathdirs; do
37519                   if test "X$x" = "X$found_dir"; then
37520                     haveit=yes
37521                     break
37522                   fi
37523                 done
37524                 if test -z "$haveit"; then
37525                   ltrpathdirs="$ltrpathdirs $found_dir"
37526                 fi
37527                                 if test "$acl_hardcode_direct" = yes; then
37528                                                       LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
37529                 else
37530                   if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
37531                                                             LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
37532                                                             haveit=
37533                     for x in $rpathdirs; do
37534                       if test "X$x" = "X$found_dir"; then
37535                         haveit=yes
37536                         break
37537                       fi
37538                     done
37539                     if test -z "$haveit"; then
37540                       rpathdirs="$rpathdirs $found_dir"
37541                     fi
37542                   else
37543                                                                                 haveit=
37544                     for x in $LDFLAGS $LIBINTL; do
37545
37546   acl_save_prefix="$prefix"
37547   prefix="$acl_final_prefix"
37548   acl_save_exec_prefix="$exec_prefix"
37549   exec_prefix="$acl_final_exec_prefix"
37550   eval x=\"$x\"
37551   exec_prefix="$acl_save_exec_prefix"
37552   prefix="$acl_save_prefix"
37553
37554                       if test "X$x" = "X-L$found_dir"; then
37555                         haveit=yes
37556                         break
37557                       fi
37558                     done
37559                     if test -z "$haveit"; then
37560                       LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir"
37561                     fi
37562                     if test "$acl_hardcode_minus_L" != no; then
37563                                                                                         LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
37564                     else
37565                                                                                                                                                                                 LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
37566                     fi
37567                   fi
37568                 fi
37569               fi
37570             else
37571               if test "X$found_a" != "X"; then
37572                                 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a"
37573               else
37574                                                 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name"
37575               fi
37576             fi
37577                         additional_includedir=
37578             case "$found_dir" in
37579               */$acl_libdirstem | */$acl_libdirstem/)
37580                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
37581                 if test "$name" = 'intl'; then
37582                   LIBINTL_PREFIX="$basedir"
37583                 fi
37584                 additional_includedir="$basedir/include"
37585                 ;;
37586               */$acl_libdirstem2 | */$acl_libdirstem2/)
37587                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
37588                 if test "$name" = 'intl'; then
37589                   LIBINTL_PREFIX="$basedir"
37590                 fi
37591                 additional_includedir="$basedir/include"
37592                 ;;
37593             esac
37594             if test "X$additional_includedir" != "X"; then
37595                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
37596                 haveit=
37597                 if test "X$additional_includedir" = "X/usr/local/include"; then
37598                   if test -n "$GCC"; then
37599                     case $host_os in
37600                       linux* | gnu* | k*bsd*-gnu) haveit=yes;;
37601                     esac
37602                   fi
37603                 fi
37604                 if test -z "$haveit"; then
37605                   for x in $CPPFLAGS $INCINTL; do
37606
37607   acl_save_prefix="$prefix"
37608   prefix="$acl_final_prefix"
37609   acl_save_exec_prefix="$exec_prefix"
37610   exec_prefix="$acl_final_exec_prefix"
37611   eval x=\"$x\"
37612   exec_prefix="$acl_save_exec_prefix"
37613   prefix="$acl_save_prefix"
37614
37615                     if test "X$x" = "X-I$additional_includedir"; then
37616                       haveit=yes
37617                       break
37618                     fi
37619                   done
37620                   if test -z "$haveit"; then
37621                     if test -d "$additional_includedir"; then
37622                                             INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir"
37623                     fi
37624                   fi
37625                 fi
37626               fi
37627             fi
37628                         if test -n "$found_la"; then
37629                                                         save_libdir="$libdir"
37630               case "$found_la" in
37631                 */* | *\\*) . "$found_la" ;;
37632                 *) . "./$found_la" ;;
37633               esac
37634               libdir="$save_libdir"
37635                             for dep in $dependency_libs; do
37636                 case "$dep" in
37637                   -L*)
37638                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
37639                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
37640                        && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
37641                       haveit=
37642                       if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
37643                          || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
37644                         if test -n "$GCC"; then
37645                           case $host_os in
37646                             linux* | gnu* | k*bsd*-gnu) haveit=yes;;
37647                           esac
37648                         fi
37649                       fi
37650                       if test -z "$haveit"; then
37651                         haveit=
37652                         for x in $LDFLAGS $LIBINTL; do
37653
37654   acl_save_prefix="$prefix"
37655   prefix="$acl_final_prefix"
37656   acl_save_exec_prefix="$exec_prefix"
37657   exec_prefix="$acl_final_exec_prefix"
37658   eval x=\"$x\"
37659   exec_prefix="$acl_save_exec_prefix"
37660   prefix="$acl_save_prefix"
37661
37662                           if test "X$x" = "X-L$additional_libdir"; then
37663                             haveit=yes
37664                             break
37665                           fi
37666                         done
37667                         if test -z "$haveit"; then
37668                           if test -d "$additional_libdir"; then
37669                                                         LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir"
37670                           fi
37671                         fi
37672                         haveit=
37673                         for x in $LDFLAGS $LTLIBINTL; do
37674
37675   acl_save_prefix="$prefix"
37676   prefix="$acl_final_prefix"
37677   acl_save_exec_prefix="$exec_prefix"
37678   exec_prefix="$acl_final_exec_prefix"
37679   eval x=\"$x\"
37680   exec_prefix="$acl_save_exec_prefix"
37681   prefix="$acl_save_prefix"
37682
37683                           if test "X$x" = "X-L$additional_libdir"; then
37684                             haveit=yes
37685                             break
37686                           fi
37687                         done
37688                         if test -z "$haveit"; then
37689                           if test -d "$additional_libdir"; then
37690                                                         LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir"
37691                           fi
37692                         fi
37693                       fi
37694                     fi
37695                     ;;
37696                   -R*)
37697                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
37698                     if test "$enable_rpath" != no; then
37699                                                                   haveit=
37700                       for x in $rpathdirs; do
37701                         if test "X$x" = "X$dir"; then
37702                           haveit=yes
37703                           break
37704                         fi
37705                       done
37706                       if test -z "$haveit"; then
37707                         rpathdirs="$rpathdirs $dir"
37708                       fi
37709                                                                   haveit=
37710                       for x in $ltrpathdirs; do
37711                         if test "X$x" = "X$dir"; then
37712                           haveit=yes
37713                           break
37714                         fi
37715                       done
37716                       if test -z "$haveit"; then
37717                         ltrpathdirs="$ltrpathdirs $dir"
37718                       fi
37719                     fi
37720                     ;;
37721                   -l*)
37722                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
37723                     ;;
37724                   *.la)
37725                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
37726                     ;;
37727                   *)
37728                                         LIBINTL="${LIBINTL}${LIBINTL:+ }$dep"
37729                     LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep"
37730                     ;;
37731                 esac
37732               done
37733             fi
37734           else
37735                                                             LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
37736             LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name"
37737           fi
37738         fi
37739       fi
37740     done
37741   done
37742   if test "X$rpathdirs" != "X"; then
37743     if test -n "$acl_hardcode_libdir_separator"; then
37744                         alldirs=
37745       for found_dir in $rpathdirs; do
37746         alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
37747       done
37748             acl_save_libdir="$libdir"
37749       libdir="$alldirs"
37750       eval flag=\"$acl_hardcode_libdir_flag_spec\"
37751       libdir="$acl_save_libdir"
37752       LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
37753     else
37754             for found_dir in $rpathdirs; do
37755         acl_save_libdir="$libdir"
37756         libdir="$found_dir"
37757         eval flag=\"$acl_hardcode_libdir_flag_spec\"
37758         libdir="$acl_save_libdir"
37759         LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
37760       done
37761     fi
37762   fi
37763   if test "X$ltrpathdirs" != "X"; then
37764             for found_dir in $ltrpathdirs; do
37765       LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir"
37766     done
37767   fi
37768
37769
37770
37771
37772
37773
37774           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5
37775 $as_echo_n "checking for GNU gettext in libintl... " >&6; }
37776 if eval \${$gt_func_gnugettext_libintl+:} false; then :
37777   $as_echo_n "(cached) " >&6
37778 else
37779   gt_save_CPPFLAGS="$CPPFLAGS"
37780             CPPFLAGS="$CPPFLAGS $INCINTL"
37781             gt_save_LIBS="$LIBS"
37782             LIBS="$LIBS $LIBINTL"
37783                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37784 /* end confdefs.h.  */
37785
37786 #include <libintl.h>
37787 $gt_revision_test_code
37788 extern int _nl_msg_cat_cntr;
37789 extern
37790 #ifdef __cplusplus
37791 "C"
37792 #endif
37793 const char *_nl_expand_alias (const char *);
37794
37795 int
37796 main ()
37797 {
37798
37799 bindtextdomain ("", "");
37800 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
37801
37802   ;
37803   return 0;
37804 }
37805 _ACEOF
37806 if ac_fn_c_try_link "$LINENO"; then :
37807   eval "$gt_func_gnugettext_libintl=yes"
37808 else
37809   eval "$gt_func_gnugettext_libintl=no"
37810 fi
37811 rm -f core conftest.err conftest.$ac_objext \
37812     conftest$ac_exeext conftest.$ac_ext
37813                         if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
37814               LIBS="$LIBS $LIBICONV"
37815               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37816 /* end confdefs.h.  */
37817
37818 #include <libintl.h>
37819 $gt_revision_test_code
37820 extern int _nl_msg_cat_cntr;
37821 extern
37822 #ifdef __cplusplus
37823 "C"
37824 #endif
37825 const char *_nl_expand_alias (const char *);
37826
37827 int
37828 main ()
37829 {
37830
37831 bindtextdomain ("", "");
37832 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
37833
37834   ;
37835   return 0;
37836 }
37837 _ACEOF
37838 if ac_fn_c_try_link "$LINENO"; then :
37839   LIBINTL="$LIBINTL $LIBICONV"
37840                  LTLIBINTL="$LTLIBINTL $LTLIBICONV"
37841                  eval "$gt_func_gnugettext_libintl=yes"
37842
37843 fi
37844 rm -f core conftest.err conftest.$ac_objext \
37845     conftest$ac_exeext conftest.$ac_ext
37846             fi
37847             CPPFLAGS="$gt_save_CPPFLAGS"
37848             LIBS="$gt_save_LIBS"
37849 fi
37850 eval ac_res=\$$gt_func_gnugettext_libintl
37851                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
37852 $as_echo "$ac_res" >&6; }
37853         fi
37854
37855                                         if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
37856            || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
37857                 && test "$PACKAGE" != gettext-runtime \
37858                 && test "$PACKAGE" != gettext-tools; }; then
37859           gt_use_preinstalled_gnugettext=yes
37860         else
37861                     LIBINTL=
37862           LTLIBINTL=
37863           INCINTL=
37864         fi
37865
37866
37867
37868     if test -n "$INTL_MACOSX_LIBS"; then
37869       if test "$gt_use_preinstalled_gnugettext" = "yes" \
37870          || test "$nls_cv_use_gnu_gettext" = "yes"; then
37871                 LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
37872         LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
37873       fi
37874     fi
37875
37876     if test "$gt_use_preinstalled_gnugettext" = "yes" \
37877        || test "$nls_cv_use_gnu_gettext" = "yes"; then
37878
37879 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
37880
37881     else
37882       USE_NLS=no
37883     fi
37884   fi
37885
37886   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5
37887 $as_echo_n "checking whether to use NLS... " >&6; }
37888   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
37889 $as_echo "$USE_NLS" >&6; }
37890   if test "$USE_NLS" = "yes"; then
37891     { $as_echo "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5
37892 $as_echo_n "checking where the gettext function comes from... " >&6; }
37893     if test "$gt_use_preinstalled_gnugettext" = "yes"; then
37894       if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
37895         gt_source="external libintl"
37896       else
37897         gt_source="libc"
37898       fi
37899     else
37900       gt_source="included intl directory"
37901     fi
37902     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5
37903 $as_echo "$gt_source" >&6; }
37904   fi
37905
37906   if test "$USE_NLS" = "yes"; then
37907
37908     if test "$gt_use_preinstalled_gnugettext" = "yes"; then
37909       if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
37910         { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5
37911 $as_echo_n "checking how to link with libintl... " >&6; }
37912         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5
37913 $as_echo "$LIBINTL" >&6; }
37914
37915   for element in $INCINTL; do
37916     haveit=
37917     for x in $CPPFLAGS; do
37918
37919   acl_save_prefix="$prefix"
37920   prefix="$acl_final_prefix"
37921   acl_save_exec_prefix="$exec_prefix"
37922   exec_prefix="$acl_final_exec_prefix"
37923   eval x=\"$x\"
37924   exec_prefix="$acl_save_exec_prefix"
37925   prefix="$acl_save_prefix"
37926
37927       if test "X$x" = "X$element"; then
37928         haveit=yes
37929         break
37930       fi
37931     done
37932     if test -z "$haveit"; then
37933       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
37934     fi
37935   done
37936
37937       fi
37938
37939
37940 $as_echo "#define HAVE_GETTEXT 1" >>confdefs.h
37941
37942
37943 $as_echo "#define HAVE_DCGETTEXT 1" >>confdefs.h
37944
37945     fi
37946
37947         POSUB=po
37948   fi
37949
37950
37951
37952     INTLLIBS="$LIBINTL"
37953
37954
37955
37956
37957
37958
37959
37960
37961 # Initialize the test suite.
37962 ac_config_commands="$ac_config_commands tests/atconfig"
37963
37964 ac_config_files="$ac_config_files tests/Makefile tests/atlocal"
37965  # FIXME: tests/preset?
37966
37967 AUTOM4TE=${AUTOM4TE-"${am_missing_run}autom4te"}
37968
37969
37970
37971
37972 # Check whether --enable-backup-scripts was given.
37973 if test "${enable_backup_scripts+set}" = set; then :
37974   enableval=$enable_backup_scripts; case $enableval in
37975                yes) BACKUP_LIBEXEC_SCRIPTS='$(BACKUP_LIBEXEC_SCRIPTS_LIST)'
37976                     BACKUP_SBIN_SCRIPTS='$(BACKUP_SBIN_SCRIPTS_LIST)'
37977                     ;;
37978                esac
37979 fi
37980
37981
37982
37983 if date +%Y-%m-%d 2>/dev/null >&2; then
37984         BACKUP_SED_COND='/^\#ELSE_DATE_FORMAT_OK/,/^\#ENDIF_DATE_FORMAT_OK/d;/^\#IF_DATE_FORMAT_OK/d'
37985 else
37986         BACKUP_SED_COND='/^\#IF_DATE_FORMAT_OK/,/^\#ELSE_DATE_FORMAT_OK/d;/^\#ENDIF_DATE_FORMAT_OK/d'
37987 fi
37988
37989 ac_config_files="$ac_config_files Makefile doc/Makefile gnu/Makefile lib/Makefile po/Makefile.in scripts/Makefile rmt/Makefile src/Makefile"
37990
37991 cat >confcache <<\_ACEOF
37992 # This file is a shell script that caches the results of configure
37993 # tests run on this system so they can be shared between configure
37994 # scripts and configure runs, see configure's option --config-cache.
37995 # It is not useful on other systems.  If it contains results you don't
37996 # want to keep, you may remove or edit it.
37997 #
37998 # config.status only pays attention to the cache file if you give it
37999 # the --recheck option to rerun configure.
38000 #
38001 # `ac_cv_env_foo' variables (set or unset) will be overridden when
38002 # loading this file, other *unset* `ac_cv_foo' will be assigned the
38003 # following values.
38004
38005 _ACEOF
38006
38007 # The following way of writing the cache mishandles newlines in values,
38008 # but we know of no workaround that is simple, portable, and efficient.
38009 # So, we kill variables containing newlines.
38010 # Ultrix sh set writes to stderr and can't be redirected directly,
38011 # and sets the high bit in the cache file unless we assign to the vars.
38012 (
38013   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
38014     eval ac_val=\$$ac_var
38015     case $ac_val in #(
38016     *${as_nl}*)
38017       case $ac_var in #(
38018       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
38019 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
38020       esac
38021       case $ac_var in #(
38022       _ | IFS | as_nl) ;; #(
38023       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
38024       *) { eval $ac_var=; unset $ac_var;} ;;
38025       esac ;;
38026     esac
38027   done
38028
38029   (set) 2>&1 |
38030     case $as_nl`(ac_space=' '; set) 2>&1` in #(
38031     *${as_nl}ac_space=\ *)
38032       # `set' does not quote correctly, so add quotes: double-quote
38033       # substitution turns \\\\ into \\, and sed turns \\ into \.
38034       sed -n \
38035         "s/'/'\\\\''/g;
38036           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
38037       ;; #(
38038     *)
38039       # `set' quotes correctly as required by POSIX, so do not add quotes.
38040       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
38041       ;;
38042     esac |
38043     sort
38044 ) |
38045   sed '
38046      /^ac_cv_env_/b end
38047      t clear
38048      :clear
38049      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
38050      t end
38051      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
38052      :end' >>confcache
38053 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
38054   if test -w "$cache_file"; then
38055     if test "x$cache_file" != "x/dev/null"; then
38056       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
38057 $as_echo "$as_me: updating cache $cache_file" >&6;}
38058       if test ! -f "$cache_file" || test -h "$cache_file"; then
38059         cat confcache >"$cache_file"
38060       else
38061         case $cache_file in #(
38062         */* | ?:*)
38063           mv -f confcache "$cache_file"$$ &&
38064           mv -f "$cache_file"$$ "$cache_file" ;; #(
38065         *)
38066           mv -f confcache "$cache_file" ;;
38067         esac
38068       fi
38069     fi
38070   else
38071     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
38072 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
38073   fi
38074 fi
38075 rm -f confcache
38076
38077 test "x$prefix" = xNONE && prefix=$ac_default_prefix
38078 # Let make expand exec_prefix.
38079 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
38080
38081 DEFS=-DHAVE_CONFIG_H
38082
38083 ac_libobjs=
38084 ac_ltlibobjs=
38085 U=
38086 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
38087   # 1. Remove the extension, and $U if already installed.
38088   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
38089   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
38090   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
38091   #    will be set to the directory where LIBOBJS objects are built.
38092   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
38093   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
38094 done
38095 LIBOBJS=$ac_libobjs
38096
38097 LTLIBOBJS=$ac_ltlibobjs
38098
38099
38100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
38101 $as_echo_n "checking that generated files are newer than configure... " >&6; }
38102    if test -n "$am_sleep_pid"; then
38103      # Hide warnings about reused PIDs.
38104      wait $am_sleep_pid 2>/dev/null
38105    fi
38106    { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
38107 $as_echo "done" >&6; }
38108  if test -n "$EXEEXT"; then
38109   am__EXEEXT_TRUE=
38110   am__EXEEXT_FALSE='#'
38111 else
38112   am__EXEEXT_TRUE='#'
38113   am__EXEEXT_FALSE=
38114 fi
38115
38116 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
38117   as_fn_error $? "conditional \"AMDEP\" was never defined.
38118 Usually this means the macro was only invoked conditionally." "$LINENO" 5
38119 fi
38120 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
38121   as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
38122 Usually this means the macro was only invoked conditionally." "$LINENO" 5
38123 fi
38124 if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
38125   as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined.
38126 Usually this means the macro was only invoked conditionally." "$LINENO" 5
38127 fi
38128 if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
38129   as_fn_error $? "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
38130 Usually this means the macro was only invoked conditionally." "$LINENO" 5
38131 fi
38132 if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
38133   as_fn_error $? "conditional \"GL_GENERATE_ERRNO_H\" was never defined.
38134 Usually this means the macro was only invoked conditionally." "$LINENO" 5
38135 fi
38136 if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then
38137   as_fn_error $? "conditional \"GL_GENERATE_FLOAT_H\" was never defined.
38138 Usually this means the macro was only invoked conditionally." "$LINENO" 5
38139 fi
38140 if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then
38141   as_fn_error $? "conditional \"GL_GENERATE_FNMATCH_H\" was never defined.
38142 Usually this means the macro was only invoked conditionally." "$LINENO" 5
38143 fi
38144 if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
38145   as_fn_error $? "conditional \"GL_GENERATE_STDINT_H\" was never defined.
38146 Usually this means the macro was only invoked conditionally." "$LINENO" 5
38147 fi
38148 if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
38149   as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
38150 Usually this means the macro was only invoked conditionally." "$LINENO" 5
38151 fi
38152 if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
38153   as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
38154 Usually this means the macro was only invoked conditionally." "$LINENO" 5
38155 fi
38156 if test -z "${GL_GENERATE_SELINUX_CONTEXT_H_TRUE}" && test -z "${GL_GENERATE_SELINUX_CONTEXT_H_FALSE}"; then
38157   as_fn_error $? "conditional \"GL_GENERATE_SELINUX_CONTEXT_H\" was never defined.
38158 Usually this means the macro was only invoked conditionally." "$LINENO" 5
38159 fi
38160 if test -z "${GL_GENERATE_STDALIGN_H_TRUE}" && test -z "${GL_GENERATE_STDALIGN_H_FALSE}"; then
38161   as_fn_error $? "conditional \"GL_GENERATE_STDALIGN_H\" was never defined.
38162 Usually this means the macro was only invoked conditionally." "$LINENO" 5
38163 fi
38164 if test -z "${GL_GENERATE_STDARG_H_TRUE}" && test -z "${GL_GENERATE_STDARG_H_FALSE}"; then
38165   as_fn_error $? "conditional \"GL_GENERATE_STDARG_H\" was never defined.
38166 Usually this means the macro was only invoked conditionally." "$LINENO" 5
38167 fi
38168 if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
38169   as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
38170 Usually this means the macro was only invoked conditionally." "$LINENO" 5
38171 fi
38172 if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
38173   as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
38174 Usually this means the macro was only invoked conditionally." "$LINENO" 5
38175 fi
38176 if test -z "${GL_GENERATE_SYSEXITS_H_TRUE}" && test -z "${GL_GENERATE_SYSEXITS_H_FALSE}"; then
38177   as_fn_error $? "conditional \"GL_GENERATE_SYSEXITS_H\" was never defined.
38178 Usually this means the macro was only invoked conditionally." "$LINENO" 5
38179 fi
38180 if test -z "${LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE}"; then
38181   as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH\" was never defined.
38182 Usually this means the macro was only invoked conditionally." "$LINENO" 5
38183 fi
38184
38185
38186     gl_libobjs=
38187     gl_ltlibobjs=
38188     if test -n "$gl_LIBOBJS"; then
38189       # Remove the extension.
38190       sed_drop_objext='s/\.o$//;s/\.obj$//'
38191       for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
38192         gl_libobjs="$gl_libobjs $i.$ac_objext"
38193         gl_ltlibobjs="$gl_ltlibobjs $i.lo"
38194       done
38195     fi
38196     gl_LIBOBJS=$gl_libobjs
38197
38198     gl_LTLIBOBJS=$gl_ltlibobjs
38199
38200
38201
38202     gltests_libobjs=
38203     gltests_ltlibobjs=
38204     if test -n "$gltests_LIBOBJS"; then
38205       # Remove the extension.
38206       sed_drop_objext='s/\.o$//;s/\.obj$//'
38207       for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
38208         gltests_libobjs="$gltests_libobjs $i.$ac_objext"
38209         gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
38210       done
38211     fi
38212     gltests_LIBOBJS=$gltests_libobjs
38213
38214     gltests_LTLIBOBJS=$gltests_ltlibobjs
38215
38216
38217 if test -z "${PU_RMT_COND_TRUE}" && test -z "${PU_RMT_COND_FALSE}"; then
38218   as_fn_error $? "conditional \"PU_RMT_COND\" was never defined.
38219 Usually this means the macro was only invoked conditionally." "$LINENO" 5
38220 fi
38221 if test -z "${TAR_COND_XATTR_H_TRUE}" && test -z "${TAR_COND_XATTR_H_FALSE}"; then
38222   as_fn_error $? "conditional \"TAR_COND_XATTR_H\" was never defined.
38223 Usually this means the macro was only invoked conditionally." "$LINENO" 5
38224 fi
38225 if test -z "${TAR_COND_XATTR_H_TRUE}" && test -z "${TAR_COND_XATTR_H_FALSE}"; then
38226   as_fn_error $? "conditional \"TAR_COND_XATTR_H\" was never defined.
38227 Usually this means the macro was only invoked conditionally." "$LINENO" 5
38228 fi
38229
38230 : "${CONFIG_STATUS=./config.status}"
38231 ac_write_fail=0
38232 ac_clean_files_save=$ac_clean_files
38233 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
38234 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
38235 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
38236 as_write_fail=0
38237 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
38238 #! $SHELL
38239 # Generated by $as_me.
38240 # Run this file to recreate the current configuration.
38241 # Compiler output produced by configure, useful for debugging
38242 # configure, is in config.log if it exists.
38243
38244 debug=false
38245 ac_cs_recheck=false
38246 ac_cs_silent=false
38247
38248 SHELL=\${CONFIG_SHELL-$SHELL}
38249 export SHELL
38250 _ASEOF
38251 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
38252 ## -------------------- ##
38253 ## M4sh Initialization. ##
38254 ## -------------------- ##
38255
38256 # Be more Bourne compatible
38257 DUALCASE=1; export DUALCASE # for MKS sh
38258 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
38259   emulate sh
38260   NULLCMD=:
38261   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
38262   # is contrary to our usage.  Disable this feature.
38263   alias -g '${1+"$@"}'='"$@"'
38264   setopt NO_GLOB_SUBST
38265 else
38266   case `(set -o) 2>/dev/null` in #(
38267   *posix*) :
38268     set -o posix ;; #(
38269   *) :
38270      ;;
38271 esac
38272 fi
38273
38274
38275 as_nl='
38276 '
38277 export as_nl
38278 # Printing a long string crashes Solaris 7 /usr/bin/printf.
38279 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
38280 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
38281 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
38282 # Prefer a ksh shell builtin over an external printf program on Solaris,
38283 # but without wasting forks for bash or zsh.
38284 if test -z "$BASH_VERSION$ZSH_VERSION" \
38285     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
38286   as_echo='print -r --'
38287   as_echo_n='print -rn --'
38288 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
38289   as_echo='printf %s\n'
38290   as_echo_n='printf %s'
38291 else
38292   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
38293     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
38294     as_echo_n='/usr/ucb/echo -n'
38295   else
38296     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
38297     as_echo_n_body='eval
38298       arg=$1;
38299       case $arg in #(
38300       *"$as_nl"*)
38301         expr "X$arg" : "X\\(.*\\)$as_nl";
38302         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
38303       esac;
38304       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
38305     '
38306     export as_echo_n_body
38307     as_echo_n='sh -c $as_echo_n_body as_echo'
38308   fi
38309   export as_echo_body
38310   as_echo='sh -c $as_echo_body as_echo'
38311 fi
38312
38313 # The user is always right.
38314 if test "${PATH_SEPARATOR+set}" != set; then
38315   PATH_SEPARATOR=:
38316   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
38317     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
38318       PATH_SEPARATOR=';'
38319   }
38320 fi
38321
38322
38323 # IFS
38324 # We need space, tab and new line, in precisely that order.  Quoting is
38325 # there to prevent editors from complaining about space-tab.
38326 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
38327 # splitting by setting IFS to empty value.)
38328 IFS=" ""        $as_nl"
38329
38330 # Find who we are.  Look in the path if we contain no directory separator.
38331 as_myself=
38332 case $0 in #((
38333   *[\\/]* ) as_myself=$0 ;;
38334   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38335 for as_dir in $PATH
38336 do
38337   IFS=$as_save_IFS
38338   test -z "$as_dir" && as_dir=.
38339     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
38340   done
38341 IFS=$as_save_IFS
38342
38343      ;;
38344 esac
38345 # We did not find ourselves, most probably we were run as `sh COMMAND'
38346 # in which case we are not to be found in the path.
38347 if test "x$as_myself" = x; then
38348   as_myself=$0
38349 fi
38350 if test ! -f "$as_myself"; then
38351   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
38352   exit 1
38353 fi
38354
38355 # Unset variables that we do not need and which cause bugs (e.g. in
38356 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
38357 # suppresses any "Segmentation fault" message there.  '((' could
38358 # trigger a bug in pdksh 5.2.14.
38359 for as_var in BASH_ENV ENV MAIL MAILPATH
38360 do eval test x\${$as_var+set} = xset \
38361   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
38362 done
38363 PS1='$ '
38364 PS2='> '
38365 PS4='+ '
38366
38367 # NLS nuisances.
38368 LC_ALL=C
38369 export LC_ALL
38370 LANGUAGE=C
38371 export LANGUAGE
38372
38373 # CDPATH.
38374 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
38375
38376
38377 # as_fn_error STATUS ERROR [LINENO LOG_FD]
38378 # ----------------------------------------
38379 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
38380 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
38381 # script with STATUS, using 1 if that was 0.
38382 as_fn_error ()
38383 {
38384   as_status=$1; test $as_status -eq 0 && as_status=1
38385   if test "$4"; then
38386     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
38387     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
38388   fi
38389   $as_echo "$as_me: error: $2" >&2
38390   as_fn_exit $as_status
38391 } # as_fn_error
38392
38393
38394 # as_fn_set_status STATUS
38395 # -----------------------
38396 # Set $? to STATUS, without forking.
38397 as_fn_set_status ()
38398 {
38399   return $1
38400 } # as_fn_set_status
38401
38402 # as_fn_exit STATUS
38403 # -----------------
38404 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
38405 as_fn_exit ()
38406 {
38407   set +e
38408   as_fn_set_status $1
38409   exit $1
38410 } # as_fn_exit
38411
38412 # as_fn_unset VAR
38413 # ---------------
38414 # Portably unset VAR.
38415 as_fn_unset ()
38416 {
38417   { eval $1=; unset $1;}
38418 }
38419 as_unset=as_fn_unset
38420 # as_fn_append VAR VALUE
38421 # ----------------------
38422 # Append the text in VALUE to the end of the definition contained in VAR. Take
38423 # advantage of any shell optimizations that allow amortized linear growth over
38424 # repeated appends, instead of the typical quadratic growth present in naive
38425 # implementations.
38426 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
38427   eval 'as_fn_append ()
38428   {
38429     eval $1+=\$2
38430   }'
38431 else
38432   as_fn_append ()
38433   {
38434     eval $1=\$$1\$2
38435   }
38436 fi # as_fn_append
38437
38438 # as_fn_arith ARG...
38439 # ------------------
38440 # Perform arithmetic evaluation on the ARGs, and store the result in the
38441 # global $as_val. Take advantage of shells that can avoid forks. The arguments
38442 # must be portable across $(()) and expr.
38443 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
38444   eval 'as_fn_arith ()
38445   {
38446     as_val=$(( $* ))
38447   }'
38448 else
38449   as_fn_arith ()
38450   {
38451     as_val=`expr "$@" || test $? -eq 1`
38452   }
38453 fi # as_fn_arith
38454
38455
38456 if expr a : '\(a\)' >/dev/null 2>&1 &&
38457    test "X`expr 00001 : '.*\(...\)'`" = X001; then
38458   as_expr=expr
38459 else
38460   as_expr=false
38461 fi
38462
38463 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
38464   as_basename=basename
38465 else
38466   as_basename=false
38467 fi
38468
38469 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
38470   as_dirname=dirname
38471 else
38472   as_dirname=false
38473 fi
38474
38475 as_me=`$as_basename -- "$0" ||
38476 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
38477          X"$0" : 'X\(//\)$' \| \
38478          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
38479 $as_echo X/"$0" |
38480     sed '/^.*\/\([^/][^/]*\)\/*$/{
38481             s//\1/
38482             q
38483           }
38484           /^X\/\(\/\/\)$/{
38485             s//\1/
38486             q
38487           }
38488           /^X\/\(\/\).*/{
38489             s//\1/
38490             q
38491           }
38492           s/.*/./; q'`
38493
38494 # Avoid depending upon Character Ranges.
38495 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
38496 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
38497 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
38498 as_cr_digits='0123456789'
38499 as_cr_alnum=$as_cr_Letters$as_cr_digits
38500
38501 ECHO_C= ECHO_N= ECHO_T=
38502 case `echo -n x` in #(((((
38503 -n*)
38504   case `echo 'xy\c'` in
38505   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
38506   xy)  ECHO_C='\c';;
38507   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
38508        ECHO_T=' ';;
38509   esac;;
38510 *)
38511   ECHO_N='-n';;
38512 esac
38513
38514 rm -f conf$$ conf$$.exe conf$$.file
38515 if test -d conf$$.dir; then
38516   rm -f conf$$.dir/conf$$.file
38517 else
38518   rm -f conf$$.dir
38519   mkdir conf$$.dir 2>/dev/null
38520 fi
38521 if (echo >conf$$.file) 2>/dev/null; then
38522   if ln -s conf$$.file conf$$ 2>/dev/null; then
38523     as_ln_s='ln -s'
38524     # ... but there are two gotchas:
38525     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
38526     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
38527     # In both cases, we have to default to `cp -pR'.
38528     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
38529       as_ln_s='cp -pR'
38530   elif ln conf$$.file conf$$ 2>/dev/null; then
38531     as_ln_s=ln
38532   else
38533     as_ln_s='cp -pR'
38534   fi
38535 else
38536   as_ln_s='cp -pR'
38537 fi
38538 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
38539 rmdir conf$$.dir 2>/dev/null
38540
38541
38542 # as_fn_mkdir_p
38543 # -------------
38544 # Create "$as_dir" as a directory, including parents if necessary.
38545 as_fn_mkdir_p ()
38546 {
38547
38548   case $as_dir in #(
38549   -*) as_dir=./$as_dir;;
38550   esac
38551   test -d "$as_dir" || eval $as_mkdir_p || {
38552     as_dirs=
38553     while :; do
38554       case $as_dir in #(
38555       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
38556       *) as_qdir=$as_dir;;
38557       esac
38558       as_dirs="'$as_qdir' $as_dirs"
38559       as_dir=`$as_dirname -- "$as_dir" ||
38560 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
38561          X"$as_dir" : 'X\(//\)[^/]' \| \
38562          X"$as_dir" : 'X\(//\)$' \| \
38563          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
38564 $as_echo X"$as_dir" |
38565     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
38566             s//\1/
38567             q
38568           }
38569           /^X\(\/\/\)[^/].*/{
38570             s//\1/
38571             q
38572           }
38573           /^X\(\/\/\)$/{
38574             s//\1/
38575             q
38576           }
38577           /^X\(\/\).*/{
38578             s//\1/
38579             q
38580           }
38581           s/.*/./; q'`
38582       test -d "$as_dir" && break
38583     done
38584     test -z "$as_dirs" || eval "mkdir $as_dirs"
38585   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
38586
38587
38588 } # as_fn_mkdir_p
38589 if mkdir -p . 2>/dev/null; then
38590   as_mkdir_p='mkdir -p "$as_dir"'
38591 else
38592   test -d ./-p && rmdir ./-p
38593   as_mkdir_p=false
38594 fi
38595
38596
38597 # as_fn_executable_p FILE
38598 # -----------------------
38599 # Test if FILE is an executable regular file.
38600 as_fn_executable_p ()
38601 {
38602   test -f "$1" && test -x "$1"
38603 } # as_fn_executable_p
38604 as_test_x='test -x'
38605 as_executable_p=as_fn_executable_p
38606
38607 # Sed expression to map a string onto a valid CPP name.
38608 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
38609
38610 # Sed expression to map a string onto a valid variable name.
38611 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
38612
38613
38614 exec 6>&1
38615 ## ----------------------------------- ##
38616 ## Main body of $CONFIG_STATUS script. ##
38617 ## ----------------------------------- ##
38618 _ASEOF
38619 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
38620
38621 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
38622 # Save the log message, to keep $0 and so on meaningful, and to
38623 # report actual input values of CONFIG_FILES etc. instead of their
38624 # values after options handling.
38625 ac_log="
38626 This file was extended by GNU tar $as_me 1.29, which was
38627 generated by GNU Autoconf 2.69.  Invocation command line was
38628
38629   CONFIG_FILES    = $CONFIG_FILES
38630   CONFIG_HEADERS  = $CONFIG_HEADERS
38631   CONFIG_LINKS    = $CONFIG_LINKS
38632   CONFIG_COMMANDS = $CONFIG_COMMANDS
38633   $ $0 $@
38634
38635 on `(hostname || uname -n) 2>/dev/null | sed 1q`
38636 "
38637
38638 _ACEOF
38639
38640 case $ac_config_files in *"
38641 "*) set x $ac_config_files; shift; ac_config_files=$*;;
38642 esac
38643
38644 case $ac_config_headers in *"
38645 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
38646 esac
38647
38648
38649 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
38650 # Files that config.status was made for.
38651 config_files="$ac_config_files"
38652 config_headers="$ac_config_headers"
38653 config_commands="$ac_config_commands"
38654
38655 _ACEOF
38656
38657 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
38658 ac_cs_usage="\
38659 \`$as_me' instantiates files and other configuration actions
38660 from templates according to the current configuration.  Unless the files
38661 and actions are specified as TAGs, all are instantiated by default.
38662
38663 Usage: $0 [OPTION]... [TAG]...
38664
38665   -h, --help       print this help, then exit
38666   -V, --version    print version number and configuration settings, then exit
38667       --config     print configuration, then exit
38668   -q, --quiet, --silent
38669                    do not print progress messages
38670   -d, --debug      don't remove temporary files
38671       --recheck    update $as_me by reconfiguring in the same conditions
38672       --file=FILE[:TEMPLATE]
38673                    instantiate the configuration file FILE
38674       --header=FILE[:TEMPLATE]
38675                    instantiate the configuration header FILE
38676
38677 Configuration files:
38678 $config_files
38679
38680 Configuration headers:
38681 $config_headers
38682
38683 Configuration commands:
38684 $config_commands
38685
38686 Report bugs to <bug-tar@gnu.org>.
38687 GNU tar home page: <http://www.gnu.org/software/tar/>.
38688 General help using GNU software: <http://www.gnu.org/gethelp/>."
38689
38690 _ACEOF
38691 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
38692 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
38693 ac_cs_version="\\
38694 GNU tar config.status 1.29
38695 configured by $0, generated by GNU Autoconf 2.69,
38696   with options \\"\$ac_cs_config\\"
38697
38698 Copyright (C) 2012 Free Software Foundation, Inc.
38699 This config.status script is free software; the Free Software Foundation
38700 gives unlimited permission to copy, distribute and modify it."
38701
38702 ac_pwd='$ac_pwd'
38703 srcdir='$srcdir'
38704 INSTALL='$INSTALL'
38705 MKDIR_P='$MKDIR_P'
38706 AWK='$AWK'
38707 test -n "\$AWK" || AWK=awk
38708 _ACEOF
38709
38710 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
38711 # The default lists apply if the user does not specify any file.
38712 ac_need_defaults=:
38713 while test $# != 0
38714 do
38715   case $1 in
38716   --*=?*)
38717     ac_option=`expr "X$1" : 'X\([^=]*\)='`
38718     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
38719     ac_shift=:
38720     ;;
38721   --*=)
38722     ac_option=`expr "X$1" : 'X\([^=]*\)='`
38723     ac_optarg=
38724     ac_shift=:
38725     ;;
38726   *)
38727     ac_option=$1
38728     ac_optarg=$2
38729     ac_shift=shift
38730     ;;
38731   esac
38732
38733   case $ac_option in
38734   # Handling of the options.
38735   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
38736     ac_cs_recheck=: ;;
38737   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
38738     $as_echo "$ac_cs_version"; exit ;;
38739   --config | --confi | --conf | --con | --co | --c )
38740     $as_echo "$ac_cs_config"; exit ;;
38741   --debug | --debu | --deb | --de | --d | -d )
38742     debug=: ;;
38743   --file | --fil | --fi | --f )
38744     $ac_shift
38745     case $ac_optarg in
38746     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
38747     '') as_fn_error $? "missing file argument" ;;
38748     esac
38749     as_fn_append CONFIG_FILES " '$ac_optarg'"
38750     ac_need_defaults=false;;
38751   --header | --heade | --head | --hea )
38752     $ac_shift
38753     case $ac_optarg in
38754     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
38755     esac
38756     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
38757     ac_need_defaults=false;;
38758   --he | --h)
38759     # Conflict between --help and --header
38760     as_fn_error $? "ambiguous option: \`$1'
38761 Try \`$0 --help' for more information.";;
38762   --help | --hel | -h )
38763     $as_echo "$ac_cs_usage"; exit ;;
38764   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
38765   | -silent | --silent | --silen | --sile | --sil | --si | --s)
38766     ac_cs_silent=: ;;
38767
38768   # This is an error.
38769   -*) as_fn_error $? "unrecognized option: \`$1'
38770 Try \`$0 --help' for more information." ;;
38771
38772   *) as_fn_append ac_config_targets " $1"
38773      ac_need_defaults=false ;;
38774
38775   esac
38776   shift
38777 done
38778
38779 ac_configure_extra_args=
38780
38781 if $ac_cs_silent; then
38782   exec 6>/dev/null
38783   ac_configure_extra_args="$ac_configure_extra_args --silent"
38784 fi
38785
38786 _ACEOF
38787 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
38788 if \$ac_cs_recheck; then
38789   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
38790   shift
38791   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
38792   CONFIG_SHELL='$SHELL'
38793   export CONFIG_SHELL
38794   exec "\$@"
38795 fi
38796
38797 _ACEOF
38798 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
38799 exec 5>>config.log
38800 {
38801   echo
38802   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
38803 ## Running $as_me. ##
38804 _ASBOX
38805   $as_echo "$ac_log"
38806 } >&5
38807
38808 _ACEOF
38809 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
38810 #
38811 # INIT-COMMANDS
38812 #
38813 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
38814 # Capture the value of obsolete ALL_LINGUAS because we need it to compute
38815     # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
38816     # from automake < 1.5.
38817     eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
38818     # Capture the value of LINGUAS because we need it to compute CATALOGS.
38819     LINGUAS="${LINGUAS-%UNSET%}"
38820
38821
38822
38823 _ACEOF
38824
38825 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
38826
38827 # Handling of arguments.
38828 for ac_config_target in $ac_config_targets
38829 do
38830   case $ac_config_target in
38831     "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
38832     "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
38833     "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;;
38834     "tests/atconfig") CONFIG_COMMANDS="$CONFIG_COMMANDS tests/atconfig" ;;
38835     "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
38836     "tests/atlocal") CONFIG_FILES="$CONFIG_FILES tests/atlocal" ;;
38837     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
38838     "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
38839     "gnu/Makefile") CONFIG_FILES="$CONFIG_FILES gnu/Makefile" ;;
38840     "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
38841     "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
38842     "scripts/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/Makefile" ;;
38843     "rmt/Makefile") CONFIG_FILES="$CONFIG_FILES rmt/Makefile" ;;
38844     "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
38845
38846   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
38847   esac
38848 done
38849
38850
38851 # If the user did not use the arguments to specify the items to instantiate,
38852 # then the envvar interface is used.  Set only those that are not.
38853 # We use the long form for the default assignment because of an extremely
38854 # bizarre bug on SunOS 4.1.3.
38855 if $ac_need_defaults; then
38856   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
38857   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
38858   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
38859 fi
38860
38861 # Have a temporary directory for convenience.  Make it in the build tree
38862 # simply because there is no reason against having it here, and in addition,
38863 # creating and moving files from /tmp can sometimes cause problems.
38864 # Hook for its removal unless debugging.
38865 # Note that there is a small window in which the directory will not be cleaned:
38866 # after its creation but before its name has been assigned to `$tmp'.
38867 $debug ||
38868 {
38869   tmp= ac_tmp=
38870   trap 'exit_status=$?
38871   : "${ac_tmp:=$tmp}"
38872   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
38873 ' 0
38874   trap 'as_fn_exit 1' 1 2 13 15
38875 }
38876 # Create a (secure) tmp directory for tmp files.
38877
38878 {
38879   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
38880   test -d "$tmp"
38881 }  ||
38882 {
38883   tmp=./conf$$-$RANDOM
38884   (umask 077 && mkdir "$tmp")
38885 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
38886 ac_tmp=$tmp
38887
38888 # Set up the scripts for CONFIG_FILES section.
38889 # No need to generate them if there are no CONFIG_FILES.
38890 # This happens for instance with `./config.status config.h'.
38891 if test -n "$CONFIG_FILES"; then
38892
38893
38894 ac_cr=`echo X | tr X '\015'`
38895 # On cygwin, bash can eat \r inside `` if the user requested igncr.
38896 # But we know of no other shell where ac_cr would be empty at this
38897 # point, so we can use a bashism as a fallback.
38898 if test "x$ac_cr" = x; then
38899   eval ac_cr=\$\'\\r\'
38900 fi
38901 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
38902 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
38903   ac_cs_awk_cr='\\r'
38904 else
38905   ac_cs_awk_cr=$ac_cr
38906 fi
38907
38908 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
38909 _ACEOF
38910
38911
38912 {
38913   echo "cat >conf$$subs.awk <<_ACEOF" &&
38914   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
38915   echo "_ACEOF"
38916 } >conf$$subs.sh ||
38917   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
38918 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
38919 ac_delim='%!_!# '
38920 for ac_last_try in false false false false false :; do
38921   . ./conf$$subs.sh ||
38922     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
38923
38924   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
38925   if test $ac_delim_n = $ac_delim_num; then
38926     break
38927   elif $ac_last_try; then
38928     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
38929   else
38930     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
38931   fi
38932 done
38933 rm -f conf$$subs.sh
38934
38935 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
38936 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
38937 _ACEOF
38938 sed -n '
38939 h
38940 s/^/S["/; s/!.*/"]=/
38941 p
38942 g
38943 s/^[^!]*!//
38944 :repl
38945 t repl
38946 s/'"$ac_delim"'$//
38947 t delim
38948 :nl
38949 h
38950 s/\(.\{148\}\)..*/\1/
38951 t more1
38952 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
38953 p
38954 n
38955 b repl
38956 :more1
38957 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
38958 p
38959 g
38960 s/.\{148\}//
38961 t nl
38962 :delim
38963 h
38964 s/\(.\{148\}\)..*/\1/
38965 t more2
38966 s/["\\]/\\&/g; s/^/"/; s/$/"/
38967 p
38968 b
38969 :more2
38970 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
38971 p
38972 g
38973 s/.\{148\}//
38974 t delim
38975 ' <conf$$subs.awk | sed '
38976 /^[^""]/{
38977   N
38978   s/\n//
38979 }
38980 ' >>$CONFIG_STATUS || ac_write_fail=1
38981 rm -f conf$$subs.awk
38982 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
38983 _ACAWK
38984 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
38985   for (key in S) S_is_set[key] = 1
38986   FS = "\a"
38987
38988 }
38989 {
38990   line = $ 0
38991   nfields = split(line, field, "@")
38992   substed = 0
38993   len = length(field[1])
38994   for (i = 2; i < nfields; i++) {
38995     key = field[i]
38996     keylen = length(key)
38997     if (S_is_set[key]) {
38998       value = S[key]
38999       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
39000       len += length(value) + length(field[++i])
39001       substed = 1
39002     } else
39003       len += 1 + keylen
39004   }
39005
39006   print line
39007 }
39008
39009 _ACAWK
39010 _ACEOF
39011 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
39012 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
39013   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
39014 else
39015   cat
39016 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
39017   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
39018 _ACEOF
39019
39020 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
39021 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
39022 # trailing colons and then remove the whole line if VPATH becomes empty
39023 # (actually we leave an empty line to preserve line numbers).
39024 if test "x$srcdir" = x.; then
39025   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
39026 h
39027 s///
39028 s/^/:/
39029 s/[      ]*$/:/
39030 s/:\$(srcdir):/:/g
39031 s/:\${srcdir}:/:/g
39032 s/:@srcdir@:/:/g
39033 s/^:*//
39034 s/:*$//
39035 x
39036 s/\(=[   ]*\).*/\1/
39037 G
39038 s/\n//
39039 s/^[^=]*=[       ]*$//
39040 }'
39041 fi
39042
39043 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
39044 fi # test -n "$CONFIG_FILES"
39045
39046 # Set up the scripts for CONFIG_HEADERS section.
39047 # No need to generate them if there are no CONFIG_HEADERS.
39048 # This happens for instance with `./config.status Makefile'.
39049 if test -n "$CONFIG_HEADERS"; then
39050 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
39051 BEGIN {
39052 _ACEOF
39053
39054 # Transform confdefs.h into an awk script `defines.awk', embedded as
39055 # here-document in config.status, that substitutes the proper values into
39056 # config.h.in to produce config.h.
39057
39058 # Create a delimiter string that does not exist in confdefs.h, to ease
39059 # handling of long lines.
39060 ac_delim='%!_!# '
39061 for ac_last_try in false false :; do
39062   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
39063   if test -z "$ac_tt"; then
39064     break
39065   elif $ac_last_try; then
39066     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
39067   else
39068     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
39069   fi
39070 done
39071
39072 # For the awk script, D is an array of macro values keyed by name,
39073 # likewise P contains macro parameters if any.  Preserve backslash
39074 # newline sequences.
39075
39076 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
39077 sed -n '
39078 s/.\{148\}/&'"$ac_delim"'/g
39079 t rset
39080 :rset
39081 s/^[     ]*#[    ]*define[       ][      ]*/ /
39082 t def
39083 d
39084 :def
39085 s/\\$//
39086 t bsnl
39087 s/["\\]/\\&/g
39088 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
39089 D["\1"]=" \3"/p
39090 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
39091 d
39092 :bsnl
39093 s/["\\]/\\&/g
39094 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
39095 D["\1"]=" \3\\\\\\n"\\/p
39096 t cont
39097 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
39098 t cont
39099 d
39100 :cont
39101 n
39102 s/.\{148\}/&'"$ac_delim"'/g
39103 t clear
39104 :clear
39105 s/\\$//
39106 t bsnlc
39107 s/["\\]/\\&/g; s/^/"/; s/$/"/p
39108 d
39109 :bsnlc
39110 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
39111 b cont
39112 ' <confdefs.h | sed '
39113 s/'"$ac_delim"'/"\\\
39114 "/g' >>$CONFIG_STATUS || ac_write_fail=1
39115
39116 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
39117   for (key in D) D_is_set[key] = 1
39118   FS = "\a"
39119 }
39120 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
39121   line = \$ 0
39122   split(line, arg, " ")
39123   if (arg[1] == "#") {
39124     defundef = arg[2]
39125     mac1 = arg[3]
39126   } else {
39127     defundef = substr(arg[1], 2)
39128     mac1 = arg[2]
39129   }
39130   split(mac1, mac2, "(") #)
39131   macro = mac2[1]
39132   prefix = substr(line, 1, index(line, defundef) - 1)
39133   if (D_is_set[macro]) {
39134     # Preserve the white space surrounding the "#".
39135     print prefix "define", macro P[macro] D[macro]
39136     next
39137   } else {
39138     # Replace #undef with comments.  This is necessary, for example,
39139     # in the case of _POSIX_SOURCE, which is predefined and required
39140     # on some systems where configure will not decide to define it.
39141     if (defundef == "undef") {
39142       print "/*", prefix defundef, macro, "*/"
39143       next
39144     }
39145   }
39146 }
39147 { print }
39148 _ACAWK
39149 _ACEOF
39150 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
39151   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
39152 fi # test -n "$CONFIG_HEADERS"
39153
39154
39155 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
39156 shift
39157 for ac_tag
39158 do
39159   case $ac_tag in
39160   :[FHLC]) ac_mode=$ac_tag; continue;;
39161   esac
39162   case $ac_mode$ac_tag in
39163   :[FHL]*:*);;
39164   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
39165   :[FH]-) ac_tag=-:-;;
39166   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
39167   esac
39168   ac_save_IFS=$IFS
39169   IFS=:
39170   set x $ac_tag
39171   IFS=$ac_save_IFS
39172   shift
39173   ac_file=$1
39174   shift
39175
39176   case $ac_mode in
39177   :L) ac_source=$1;;
39178   :[FH])
39179     ac_file_inputs=
39180     for ac_f
39181     do
39182       case $ac_f in
39183       -) ac_f="$ac_tmp/stdin";;
39184       *) # Look for the file first in the build tree, then in the source tree
39185          # (if the path is not absolute).  The absolute path cannot be DOS-style,
39186          # because $ac_f cannot contain `:'.
39187          test -f "$ac_f" ||
39188            case $ac_f in
39189            [\\/$]*) false;;
39190            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
39191            esac ||
39192            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
39193       esac
39194       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
39195       as_fn_append ac_file_inputs " '$ac_f'"
39196     done
39197
39198     # Let's still pretend it is `configure' which instantiates (i.e., don't
39199     # use $as_me), people would be surprised to read:
39200     #    /* config.h.  Generated by config.status.  */
39201     configure_input='Generated from '`
39202           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
39203         `' by configure.'
39204     if test x"$ac_file" != x-; then
39205       configure_input="$ac_file.  $configure_input"
39206       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
39207 $as_echo "$as_me: creating $ac_file" >&6;}
39208     fi
39209     # Neutralize special characters interpreted by sed in replacement strings.
39210     case $configure_input in #(
39211     *\&* | *\|* | *\\* )
39212        ac_sed_conf_input=`$as_echo "$configure_input" |
39213        sed 's/[\\\\&|]/\\\\&/g'`;; #(
39214     *) ac_sed_conf_input=$configure_input;;
39215     esac
39216
39217     case $ac_tag in
39218     *:-:* | *:-) cat >"$ac_tmp/stdin" \
39219       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
39220     esac
39221     ;;
39222   esac
39223
39224   ac_dir=`$as_dirname -- "$ac_file" ||
39225 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
39226          X"$ac_file" : 'X\(//\)[^/]' \| \
39227          X"$ac_file" : 'X\(//\)$' \| \
39228          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
39229 $as_echo X"$ac_file" |
39230     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
39231             s//\1/
39232             q
39233           }
39234           /^X\(\/\/\)[^/].*/{
39235             s//\1/
39236             q
39237           }
39238           /^X\(\/\/\)$/{
39239             s//\1/
39240             q
39241           }
39242           /^X\(\/\).*/{
39243             s//\1/
39244             q
39245           }
39246           s/.*/./; q'`
39247   as_dir="$ac_dir"; as_fn_mkdir_p
39248   ac_builddir=.
39249
39250 case "$ac_dir" in
39251 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
39252 *)
39253   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
39254   # A ".." for each directory in $ac_dir_suffix.
39255   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
39256   case $ac_top_builddir_sub in
39257   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
39258   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
39259   esac ;;
39260 esac
39261 ac_abs_top_builddir=$ac_pwd
39262 ac_abs_builddir=$ac_pwd$ac_dir_suffix
39263 # for backward compatibility:
39264 ac_top_builddir=$ac_top_build_prefix
39265
39266 case $srcdir in
39267   .)  # We are building in place.
39268     ac_srcdir=.
39269     ac_top_srcdir=$ac_top_builddir_sub
39270     ac_abs_top_srcdir=$ac_pwd ;;
39271   [\\/]* | ?:[\\/]* )  # Absolute name.
39272     ac_srcdir=$srcdir$ac_dir_suffix;
39273     ac_top_srcdir=$srcdir
39274     ac_abs_top_srcdir=$srcdir ;;
39275   *) # Relative name.
39276     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
39277     ac_top_srcdir=$ac_top_build_prefix$srcdir
39278     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
39279 esac
39280 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
39281
39282
39283   case $ac_mode in
39284   :F)
39285   #
39286   # CONFIG_FILE
39287   #
39288
39289   case $INSTALL in
39290   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
39291   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
39292   esac
39293   ac_MKDIR_P=$MKDIR_P
39294   case $MKDIR_P in
39295   [\\/$]* | ?:[\\/]* ) ;;
39296   */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
39297   esac
39298 _ACEOF
39299
39300 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
39301 # If the template does not know about datarootdir, expand it.
39302 # FIXME: This hack should be removed a few years after 2.60.
39303 ac_datarootdir_hack=; ac_datarootdir_seen=
39304 ac_sed_dataroot='
39305 /datarootdir/ {
39306   p
39307   q
39308 }
39309 /@datadir@/p
39310 /@docdir@/p
39311 /@infodir@/p
39312 /@localedir@/p
39313 /@mandir@/p'
39314 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
39315 *datarootdir*) ac_datarootdir_seen=yes;;
39316 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
39317   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
39318 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
39319 _ACEOF
39320 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
39321   ac_datarootdir_hack='
39322   s&@datadir@&$datadir&g
39323   s&@docdir@&$docdir&g
39324   s&@infodir@&$infodir&g
39325   s&@localedir@&$localedir&g
39326   s&@mandir@&$mandir&g
39327   s&\\\${datarootdir}&$datarootdir&g' ;;
39328 esac
39329 _ACEOF
39330
39331 # Neutralize VPATH when `$srcdir' = `.'.
39332 # Shell code in configure.ac might set extrasub.
39333 # FIXME: do we really want to maintain this feature?
39334 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
39335 ac_sed_extra="$ac_vpsub
39336 $extrasub
39337 _ACEOF
39338 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
39339 :t
39340 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
39341 s|@configure_input@|$ac_sed_conf_input|;t t
39342 s&@top_builddir@&$ac_top_builddir_sub&;t t
39343 s&@top_build_prefix@&$ac_top_build_prefix&;t t
39344 s&@srcdir@&$ac_srcdir&;t t
39345 s&@abs_srcdir@&$ac_abs_srcdir&;t t
39346 s&@top_srcdir@&$ac_top_srcdir&;t t
39347 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
39348 s&@builddir@&$ac_builddir&;t t
39349 s&@abs_builddir@&$ac_abs_builddir&;t t
39350 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
39351 s&@INSTALL@&$ac_INSTALL&;t t
39352 s&@MKDIR_P@&$ac_MKDIR_P&;t t
39353 $ac_datarootdir_hack
39354 "
39355 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
39356   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
39357
39358 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
39359   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
39360   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
39361       "$ac_tmp/out"`; test -z "$ac_out"; } &&
39362   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
39363 which seems to be undefined.  Please make sure it is defined" >&5
39364 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
39365 which seems to be undefined.  Please make sure it is defined" >&2;}
39366
39367   rm -f "$ac_tmp/stdin"
39368   case $ac_file in
39369   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
39370   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
39371   esac \
39372   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
39373  ;;
39374   :H)
39375   #
39376   # CONFIG_HEADER
39377   #
39378   if test x"$ac_file" != x-; then
39379     {
39380       $as_echo "/* $configure_input  */" \
39381       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
39382     } >"$ac_tmp/config.h" \
39383       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
39384     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
39385       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
39386 $as_echo "$as_me: $ac_file is unchanged" >&6;}
39387     else
39388       rm -f "$ac_file"
39389       mv "$ac_tmp/config.h" "$ac_file" \
39390         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
39391     fi
39392   else
39393     $as_echo "/* $configure_input  */" \
39394       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
39395       || as_fn_error $? "could not create -" "$LINENO" 5
39396   fi
39397 # Compute "$ac_file"'s index in $config_headers.
39398 _am_arg="$ac_file"
39399 _am_stamp_count=1
39400 for _am_header in $config_headers :; do
39401   case $_am_header in
39402     $_am_arg | $_am_arg:* )
39403       break ;;
39404     * )
39405       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
39406   esac
39407 done
39408 echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
39409 $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
39410          X"$_am_arg" : 'X\(//\)[^/]' \| \
39411          X"$_am_arg" : 'X\(//\)$' \| \
39412          X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
39413 $as_echo X"$_am_arg" |
39414     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
39415             s//\1/
39416             q
39417           }
39418           /^X\(\/\/\)[^/].*/{
39419             s//\1/
39420             q
39421           }
39422           /^X\(\/\/\)$/{
39423             s//\1/
39424             q
39425           }
39426           /^X\(\/\).*/{
39427             s//\1/
39428             q
39429           }
39430           s/.*/./; q'`/stamp-h$_am_stamp_count
39431  ;;
39432
39433   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
39434 $as_echo "$as_me: executing $ac_file commands" >&6;}
39435  ;;
39436   esac
39437
39438
39439   case $ac_file$ac_mode in
39440     "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
39441   # Older Autoconf quotes --file arguments for eval, but not when files
39442   # are listed without --file.  Let's play safe and only enable the eval
39443   # if we detect the quoting.
39444   case $CONFIG_FILES in
39445   *\'*) eval set x "$CONFIG_FILES" ;;
39446   *)   set x $CONFIG_FILES ;;
39447   esac
39448   shift
39449   for mf
39450   do
39451     # Strip MF so we end up with the name of the file.
39452     mf=`echo "$mf" | sed -e 's/:.*$//'`
39453     # Check whether this is an Automake generated Makefile or not.
39454     # We used to match only the files named 'Makefile.in', but
39455     # some people rename them; so instead we look at the file content.
39456     # Grep'ing the first line is not enough: some people post-process
39457     # each Makefile.in and add a new line on top of each file to say so.
39458     # Grep'ing the whole file is not good either: AIX grep has a line
39459     # limit of 2048, but all sed's we know have understand at least 4000.
39460     if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
39461       dirpart=`$as_dirname -- "$mf" ||
39462 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
39463          X"$mf" : 'X\(//\)[^/]' \| \
39464          X"$mf" : 'X\(//\)$' \| \
39465          X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
39466 $as_echo X"$mf" |
39467     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
39468             s//\1/
39469             q
39470           }
39471           /^X\(\/\/\)[^/].*/{
39472             s//\1/
39473             q
39474           }
39475           /^X\(\/\/\)$/{
39476             s//\1/
39477             q
39478           }
39479           /^X\(\/\).*/{
39480             s//\1/
39481             q
39482           }
39483           s/.*/./; q'`
39484     else
39485       continue
39486     fi
39487     # Extract the definition of DEPDIR, am__include, and am__quote
39488     # from the Makefile without running 'make'.
39489     DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
39490     test -z "$DEPDIR" && continue
39491     am__include=`sed -n 's/^am__include = //p' < "$mf"`
39492     test -z "$am__include" && continue
39493     am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
39494     # Find all dependency output files, they are included files with
39495     # $(DEPDIR) in their names.  We invoke sed twice because it is the
39496     # simplest approach to changing $(DEPDIR) to its actual value in the
39497     # expansion.
39498     for file in `sed -n "
39499       s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
39500          sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
39501       # Make sure the directory exists.
39502       test -f "$dirpart/$file" && continue
39503       fdir=`$as_dirname -- "$file" ||
39504 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
39505          X"$file" : 'X\(//\)[^/]' \| \
39506          X"$file" : 'X\(//\)$' \| \
39507          X"$file" : 'X\(/\)' \| . 2>/dev/null ||
39508 $as_echo X"$file" |
39509     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
39510             s//\1/
39511             q
39512           }
39513           /^X\(\/\/\)[^/].*/{
39514             s//\1/
39515             q
39516           }
39517           /^X\(\/\/\)$/{
39518             s//\1/
39519             q
39520           }
39521           /^X\(\/\).*/{
39522             s//\1/
39523             q
39524           }
39525           s/.*/./; q'`
39526       as_dir=$dirpart/$fdir; as_fn_mkdir_p
39527       # echo "creating $dirpart/$file"
39528       echo '# dummy' > "$dirpart/$file"
39529     done
39530   done
39531 }
39532  ;;
39533     "po-directories":C)
39534     for ac_file in $CONFIG_FILES; do
39535       # Support "outfile[:infile[:infile...]]"
39536       case "$ac_file" in
39537         *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
39538       esac
39539       # PO directories have a Makefile.in generated from Makefile.in.in.
39540       case "$ac_file" in */Makefile.in)
39541         # Adjust a relative srcdir.
39542         ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
39543         ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
39544         ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
39545         # In autoconf-2.13 it is called $ac_given_srcdir.
39546         # In autoconf-2.50 it is called $srcdir.
39547         test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
39548         case "$ac_given_srcdir" in
39549           .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
39550           /*) top_srcdir="$ac_given_srcdir" ;;
39551           *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
39552         esac
39553         # Treat a directory as a PO directory if and only if it has a
39554         # POTFILES.in file. This allows packages to have multiple PO
39555         # directories under different names or in different locations.
39556         if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
39557           rm -f "$ac_dir/POTFILES"
39558           test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
39559           gt_tab=`printf '\t'`
39560           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"
39561           POMAKEFILEDEPS="POTFILES.in"
39562           # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
39563           # on $ac_dir but don't depend on user-specified configuration
39564           # parameters.
39565           if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
39566             # The LINGUAS file contains the set of available languages.
39567             if test -n "$OBSOLETE_ALL_LINGUAS"; then
39568               test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
39569             fi
39570             ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
39571             # Hide the ALL_LINGUAS assignment from automake < 1.5.
39572             eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
39573             POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
39574           else
39575             # The set of available languages was given in configure.in.
39576             # Hide the ALL_LINGUAS assignment from automake < 1.5.
39577             eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
39578           fi
39579           # Compute POFILES
39580           # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
39581           # Compute UPDATEPOFILES
39582           # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
39583           # Compute DUMMYPOFILES
39584           # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
39585           # Compute GMOFILES
39586           # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
39587           case "$ac_given_srcdir" in
39588             .) srcdirpre= ;;
39589             *) srcdirpre='$(srcdir)/' ;;
39590           esac
39591           POFILES=
39592           UPDATEPOFILES=
39593           DUMMYPOFILES=
39594           GMOFILES=
39595           for lang in $ALL_LINGUAS; do
39596             POFILES="$POFILES $srcdirpre$lang.po"
39597             UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
39598             DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
39599             GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
39600           done
39601           # CATALOGS depends on both $ac_dir and the user's LINGUAS
39602           # environment variable.
39603           INST_LINGUAS=
39604           if test -n "$ALL_LINGUAS"; then
39605             for presentlang in $ALL_LINGUAS; do
39606               useit=no
39607               if test "%UNSET%" != "$LINGUAS"; then
39608                 desiredlanguages="$LINGUAS"
39609               else
39610                 desiredlanguages="$ALL_LINGUAS"
39611               fi
39612               for desiredlang in $desiredlanguages; do
39613                 # Use the presentlang catalog if desiredlang is
39614                 #   a. equal to presentlang, or
39615                 #   b. a variant of presentlang (because in this case,
39616                 #      presentlang can be used as a fallback for messages
39617                 #      which are not translated in the desiredlang catalog).
39618                 case "$desiredlang" in
39619                   "$presentlang"*) useit=yes;;
39620                 esac
39621               done
39622               if test $useit = yes; then
39623                 INST_LINGUAS="$INST_LINGUAS $presentlang"
39624               fi
39625             done
39626           fi
39627           CATALOGS=
39628           if test -n "$INST_LINGUAS"; then
39629             for lang in $INST_LINGUAS; do
39630               CATALOGS="$CATALOGS $lang.gmo"
39631             done
39632           fi
39633           test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
39634           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"
39635           for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
39636             if test -f "$f"; then
39637               case "$f" in
39638                 *.orig | *.bak | *~) ;;
39639                 *) cat "$f" >> "$ac_dir/Makefile" ;;
39640               esac
39641             fi
39642           done
39643         fi
39644         ;;
39645       esac
39646     done ;;
39647     "tests/atconfig":C) cat >tests/atconfig <<ATEOF
39648 # Configurable variable values for building test suites.
39649 # Generated by $0.
39650 # Copyright (C) 2012 Free Software Foundation, Inc.
39651
39652 # The test suite will define top_srcdir=$at_top_srcdir/../.. etc.
39653 at_testdir='tests'
39654 abs_builddir='$ac_abs_builddir'
39655 at_srcdir='$ac_srcdir'
39656 abs_srcdir='$ac_abs_srcdir'
39657 at_top_srcdir='$ac_top_srcdir'
39658 abs_top_srcdir='$ac_abs_top_srcdir'
39659 at_top_build_prefix='$ac_top_build_prefix'
39660 abs_top_builddir='$ac_abs_top_builddir'
39661
39662 # Backward compatibility with Autotest <= 2.59b:
39663 at_top_builddir=\$at_top_build_prefix
39664
39665 AUTOTEST_PATH='tests'
39666
39667 SHELL=\${CONFIG_SHELL-'$SHELL'}
39668 ATEOF
39669  ;;
39670
39671   esac
39672 done # for ac_tag
39673
39674
39675 as_fn_exit 0
39676 _ACEOF
39677 ac_clean_files=$ac_clean_files_save
39678
39679 test $ac_write_fail = 0 ||
39680   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
39681
39682
39683 # configure is writing to config.log, and then calls config.status.
39684 # config.status does its own redirection, appending to config.log.
39685 # Unfortunately, on DOS this fails, as config.log is still kept open
39686 # by configure, so config.status won't be able to write to it; its
39687 # output is simply discarded.  So we exec the FD to /dev/null,
39688 # effectively closing config.log, so it can be properly (re)opened and
39689 # appended to by config.status.  When coming back to configure, we
39690 # need to make the FD available again.
39691 if test "$no_create" != yes; then
39692   ac_cs_success=:
39693   ac_config_status_args=
39694   test "$silent" = yes &&
39695     ac_config_status_args="$ac_config_status_args --quiet"
39696   exec 5>/dev/null
39697   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
39698   exec 5>>config.log
39699   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
39700   # would make configure fail if this is the last instruction.
39701   $ac_cs_success || as_fn_exit 1
39702 fi
39703 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
39704   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
39705 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
39706 fi
39707