Elide non-DFSG compliant upstream components
[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.28.
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.28'
584 PACKAGE_STRING='GNU tar 1.28'
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_GRANTPT_FALSE
665 TAR_COND_GRANTPT_TRUE
666 TAR_LIB_ATTR_FALSE
667 TAR_LIB_ATTR_TRUE
668 TAR_COND_XATTR_H_FALSE
669 TAR_COND_XATTR_H_TRUE
670 GNULIB_TEST_WARN_CFLAGS
671 GNULIB_WARN_CFLAGS
672 WARN_CFLAGS
673 WERROR_CFLAGS
674 PU_RMT_COND_FALSE
675 PU_RMT_COND_TRUE
676 DEFAULT_RMT_COMMAND
677 DEFAULT_RMT_DIR
678 PU_RMT_PROG
679 LIB_SETSOCKOPT
680 LIBGNU_LTLIBDEPS
681 LIBGNU_LIBDEPS
682 gltests_WITNESS
683 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
684 NEXT_WCHAR_H
685 HAVE_FEATURES_H
686 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE
687 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE
688 LIBUNISTRING_UNIWIDTH_H
689 LIBUNISTRING_UNITYPES_H
690 HAVE_UNISTD_H
691 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
692 NEXT_UNISTD_H
693 PTHREAD_H_DEFINES_STRUCT_TIMESPEC
694 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
695 TIME_H_DEFINES_STRUCT_TIMESPEC
696 NEXT_AS_FIRST_DIRECTIVE_TIME_H
697 NEXT_TIME_H
698 GL_GENERATE_SYSEXITS_H_FALSE
699 GL_GENERATE_SYSEXITS_H_TRUE
700 SYSEXITS_H
701 HAVE_SYSEXITS_H
702 NEXT_AS_FIRST_DIRECTIVE_SYSEXITS_H
703 NEXT_SYSEXITS_H
704 HAVE_STRINGS_H
705 NEXT_AS_FIRST_DIRECTIVE_STRINGS_H
706 NEXT_STRINGS_H
707 NEXT_AS_FIRST_DIRECTIVE_STRING_H
708 NEXT_STRING_H
709 HAVE_DECL_STRNCASECMP
710 HAVE_STRCASECMP
711 HAVE_FFS
712 GNULIB_FFS
713 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
714 NEXT_STDLIB_H
715 NEXT_AS_FIRST_DIRECTIVE_STDIO_H
716 NEXT_STDIO_H
717 GL_GENERATE_STDARG_H_FALSE
718 GL_GENERATE_STDARG_H_TRUE
719 STDARG_H
720 NEXT_AS_FIRST_DIRECTIVE_STDARG_H
721 NEXT_STDARG_H
722 GL_GENERATE_STDALIGN_H_FALSE
723 GL_GENERATE_STDALIGN_H_TRUE
724 STDALIGN_H
725 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
726 NEXT_SIGNAL_H
727 GL_GENERATE_SELINUX_CONTEXT_H_FALSE
728 GL_GENERATE_SELINUX_CONTEXT_H_TRUE
729 SELINUX_CONTEXT_H
730 NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H
731 NEXT_SELINUX_SELINUX_H
732 LIB_SELINUX
733 REPLACE_RAISE
734 REPLACE_PTHREAD_SIGMASK
735 HAVE_SIGHANDLER_T
736 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
737 HAVE_STRUCT_SIGACTION_SA_SIGACTION
738 HAVE_SIGACTION
739 HAVE_SIGINFO_T
740 HAVE_SIGSET_T
741 HAVE_RAISE
742 HAVE_PTHREAD_SIGMASK
743 HAVE_POSIX_SIGNALBLOCKING
744 GNULIB_SIGACTION
745 GNULIB_SIGPROCMASK
746 GNULIB_SIGNAL_H_SIGPIPE
747 GNULIB_RAISE
748 GNULIB_PTHREAD_SIGMASK
749 USE_ACL
750 LIB_ACL
751 HAVE__BOOL
752 GL_GENERATE_STDBOOL_H_FALSE
753 GL_GENERATE_STDBOOL_H_TRUE
754 STDBOOL_H
755 REPLACE_LOCALTIME
756 REPLACE_GMTIME
757 REPLACE_TIMEGM
758 REPLACE_NANOSLEEP
759 REPLACE_MKTIME
760 REPLACE_LOCALTIME_R
761 HAVE_TIMEGM
762 HAVE_STRPTIME
763 HAVE_NANOSLEEP
764 HAVE_DECL_LOCALTIME_R
765 GNULIB_TIME_R
766 GNULIB_TIMEGM
767 GNULIB_STRPTIME
768 GNULIB_NANOSLEEP
769 GNULIB_MKTIME
770 UNDEFINE_STRTOK_R
771 REPLACE_STRTOK_R
772 REPLACE_STRSIGNAL
773 REPLACE_STRNLEN
774 REPLACE_STRNDUP
775 REPLACE_STRNCAT
776 REPLACE_STRERROR_R
777 REPLACE_STRERROR
778 REPLACE_STRCHRNUL
779 REPLACE_STRCASESTR
780 REPLACE_STRSTR
781 REPLACE_STRDUP
782 REPLACE_STPNCPY
783 REPLACE_MEMMEM
784 REPLACE_MEMCHR
785 HAVE_STRVERSCMP
786 HAVE_DECL_STRSIGNAL
787 HAVE_DECL_STRERROR_R
788 HAVE_DECL_STRTOK_R
789 HAVE_STRCASESTR
790 HAVE_STRSEP
791 HAVE_STRPBRK
792 HAVE_DECL_STRNLEN
793 HAVE_DECL_STRNDUP
794 HAVE_DECL_STRDUP
795 HAVE_STRCHRNUL
796 HAVE_STPNCPY
797 HAVE_STPCPY
798 HAVE_RAWMEMCHR
799 HAVE_DECL_MEMRCHR
800 HAVE_MEMPCPY
801 HAVE_DECL_MEMMEM
802 HAVE_MEMCHR
803 HAVE_FFSLL
804 HAVE_FFSL
805 HAVE_MBSLEN
806 GNULIB_STRVERSCMP
807 GNULIB_STRSIGNAL
808 GNULIB_STRERROR_R
809 GNULIB_STRERROR
810 GNULIB_MBSTOK_R
811 GNULIB_MBSSEP
812 GNULIB_MBSSPN
813 GNULIB_MBSPBRK
814 GNULIB_MBSCSPN
815 GNULIB_MBSCASESTR
816 GNULIB_MBSPCASECMP
817 GNULIB_MBSNCASECMP
818 GNULIB_MBSCASECMP
819 GNULIB_MBSSTR
820 GNULIB_MBSRCHR
821 GNULIB_MBSCHR
822 GNULIB_MBSNLEN
823 GNULIB_MBSLEN
824 GNULIB_STRTOK_R
825 GNULIB_STRCASESTR
826 GNULIB_STRSTR
827 GNULIB_STRSEP
828 GNULIB_STRPBRK
829 GNULIB_STRNLEN
830 GNULIB_STRNDUP
831 GNULIB_STRNCAT
832 GNULIB_STRDUP
833 GNULIB_STRCHRNUL
834 GNULIB_STPNCPY
835 GNULIB_STPCPY
836 GNULIB_RAWMEMCHR
837 GNULIB_MEMRCHR
838 GNULIB_MEMPCPY
839 GNULIB_MEMMEM
840 GNULIB_MEMCHR
841 GNULIB_FFSLL
842 GNULIB_FFSL
843 LOCALE_FR_UTF8
844 LOCALE_ZH_CN
845 LOCALE_JA
846 NEXT_AS_FIRST_DIRECTIVE_LOCALE_H
847 NEXT_LOCALE_H
848 HAVE_XLOCALE_H
849 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
850 NEXT_STDDEF_H
851 GL_GENERATE_STDDEF_H_FALSE
852 GL_GENERATE_STDDEF_H_TRUE
853 STDDEF_H
854 HAVE_WCHAR_T
855 REPLACE_NULL
856 REPLACE_STRUCT_LCONV
857 REPLACE_DUPLOCALE
858 REPLACE_SETLOCALE
859 REPLACE_LOCALECONV
860 HAVE_DUPLOCALE
861 GNULIB_DUPLOCALE
862 GNULIB_SETLOCALE
863 GNULIB_LOCALECONV
864 LOCALCHARSET_TESTS_ENVIRONMENT
865 GLIBC21
866 HAVE_LANGINFO_YESEXPR
867 HAVE_LANGINFO_ERA
868 HAVE_LANGINFO_T_FMT_AMPM
869 HAVE_LANGINFO_CODESET
870 HAVE_LANGINFO_H
871 NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H
872 NEXT_LANGINFO_H
873 REPLACE_NL_LANGINFO
874 HAVE_NL_LANGINFO
875 GNULIB_NL_LANGINFO
876 REPLACE_TOWLOWER
877 REPLACE_ISWCNTRL
878 HAVE_WCTYPE_H
879 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H
880 NEXT_WCTYPE_H
881 HAVE_WINT_T
882 HAVE_ISWCNTRL
883 REPLACE_ISWBLANK
884 HAVE_WCTRANS_T
885 HAVE_WCTYPE_T
886 HAVE_ISWBLANK
887 GNULIB_TOWCTRANS
888 GNULIB_WCTRANS
889 GNULIB_ISWCTYPE
890 GNULIB_WCTYPE
891 GNULIB_ISWBLANK
892 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
893 NEXT_INTTYPES_H
894 UINT64_MAX_EQ_ULONG_MAX
895 UINT32_MAX_LT_UINTMAX_MAX
896 PRIPTR_PREFIX
897 PRI_MACROS_BROKEN
898 INT64_MAX_EQ_LONG_MAX
899 INT32_MAX_LT_INTMAX_MAX
900 REPLACE_STRTOUMAX
901 REPLACE_STRTOIMAX
902 HAVE_DECL_STRTOUMAX
903 HAVE_DECL_STRTOIMAX
904 HAVE_DECL_IMAXDIV
905 HAVE_DECL_IMAXABS
906 GNULIB_STRTOUMAX
907 GNULIB_STRTOIMAX
908 GNULIB_IMAXDIV
909 GNULIB_IMAXABS
910 GL_GENERATE_STDINT_H_FALSE
911 GL_GENERATE_STDINT_H_TRUE
912 STDINT_H
913 WINT_T_SUFFIX
914 WCHAR_T_SUFFIX
915 SIG_ATOMIC_T_SUFFIX
916 SIZE_T_SUFFIX
917 PTRDIFF_T_SUFFIX
918 HAVE_SIGNED_WINT_T
919 HAVE_SIGNED_WCHAR_T
920 HAVE_SIGNED_SIG_ATOMIC_T
921 BITSIZEOF_WINT_T
922 BITSIZEOF_WCHAR_T
923 BITSIZEOF_SIG_ATOMIC_T
924 BITSIZEOF_SIZE_T
925 BITSIZEOF_PTRDIFF_T
926 APPLE_UNIVERSAL_BUILD
927 HAVE_SYS_BITYPES_H
928 HAVE_SYS_INTTYPES_H
929 HAVE_STDINT_H
930 NEXT_AS_FIRST_DIRECTIVE_STDINT_H
931 NEXT_STDINT_H
932 HAVE_SYS_TYPES_H
933 HAVE_INTTYPES_H
934 HAVE_WCHAR_H
935 HAVE_UNSIGNED_LONG_LONG_INT
936 HAVE_LONG_LONG_INT
937 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
938 NEXT_SYS_TIME_H
939 REPLACE_STRUCT_TIMEVAL
940 REPLACE_GETTIMEOFDAY
941 HAVE_SYS_TIME_H
942 HAVE_STRUCT_TIMEVAL
943 HAVE_GETTIMEOFDAY
944 GNULIB_GETTIMEOFDAY
945 LTLIBINTL
946 LIBINTL
947 GNULIB_GL_UNISTD_H_GETOPT
948 GETOPT_H
949 HAVE_GETOPT_H
950 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H
951 NEXT_GETOPT_H
952 WINDOWS_64_BIT_ST_SIZE
953 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
954 NEXT_SYS_STAT_H
955 WINDOWS_64_BIT_OFF_T
956 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H
957 NEXT_SYS_TYPES_H
958 REPLACE_VSPRINTF
959 REPLACE_VSNPRINTF
960 REPLACE_VPRINTF
961 REPLACE_VFPRINTF
962 REPLACE_VDPRINTF
963 REPLACE_VASPRINTF
964 REPLACE_TMPFILE
965 REPLACE_STDIO_WRITE_FUNCS
966 REPLACE_STDIO_READ_FUNCS
967 REPLACE_SPRINTF
968 REPLACE_SNPRINTF
969 REPLACE_RENAMEAT
970 REPLACE_RENAME
971 REPLACE_REMOVE
972 REPLACE_PRINTF
973 REPLACE_POPEN
974 REPLACE_PERROR
975 REPLACE_OBSTACK_PRINTF
976 REPLACE_GETLINE
977 REPLACE_GETDELIM
978 REPLACE_FTELLO
979 REPLACE_FTELL
980 REPLACE_FSEEKO
981 REPLACE_FSEEK
982 REPLACE_FREOPEN
983 REPLACE_FPURGE
984 REPLACE_FPRINTF
985 REPLACE_FOPEN
986 REPLACE_FFLUSH
987 REPLACE_FDOPEN
988 REPLACE_FCLOSE
989 REPLACE_DPRINTF
990 HAVE_VDPRINTF
991 HAVE_VASPRINTF
992 HAVE_RENAMEAT
993 HAVE_POPEN
994 HAVE_PCLOSE
995 HAVE_FTELLO
996 HAVE_FSEEKO
997 HAVE_DPRINTF
998 HAVE_DECL_VSNPRINTF
999 HAVE_DECL_SNPRINTF
1000 HAVE_DECL_OBSTACK_PRINTF
1001 HAVE_DECL_GETLINE
1002 HAVE_DECL_GETDELIM
1003 HAVE_DECL_FTELLO
1004 HAVE_DECL_FSEEKO
1005 HAVE_DECL_FPURGE
1006 GNULIB_VSPRINTF_POSIX
1007 GNULIB_VSNPRINTF
1008 GNULIB_VPRINTF_POSIX
1009 GNULIB_VPRINTF
1010 GNULIB_VFPRINTF_POSIX
1011 GNULIB_VFPRINTF
1012 GNULIB_VDPRINTF
1013 GNULIB_VSCANF
1014 GNULIB_VFSCANF
1015 GNULIB_VASPRINTF
1016 GNULIB_TMPFILE
1017 GNULIB_STDIO_H_SIGPIPE
1018 GNULIB_STDIO_H_NONBLOCKING
1019 GNULIB_SPRINTF_POSIX
1020 GNULIB_SNPRINTF
1021 GNULIB_SCANF
1022 GNULIB_RENAMEAT
1023 GNULIB_RENAME
1024 GNULIB_REMOVE
1025 GNULIB_PUTS
1026 GNULIB_PUTCHAR
1027 GNULIB_PUTC
1028 GNULIB_PRINTF_POSIX
1029 GNULIB_PRINTF
1030 GNULIB_POPEN
1031 GNULIB_PERROR
1032 GNULIB_PCLOSE
1033 GNULIB_OBSTACK_PRINTF_POSIX
1034 GNULIB_OBSTACK_PRINTF
1035 GNULIB_GETLINE
1036 GNULIB_GETDELIM
1037 GNULIB_GETCHAR
1038 GNULIB_GETC
1039 GNULIB_FWRITE
1040 GNULIB_FTELLO
1041 GNULIB_FTELL
1042 GNULIB_FSEEKO
1043 GNULIB_FSEEK
1044 GNULIB_FSCANF
1045 GNULIB_FREOPEN
1046 GNULIB_FREAD
1047 GNULIB_FPUTS
1048 GNULIB_FPUTC
1049 GNULIB_FPURGE
1050 GNULIB_FPRINTF_POSIX
1051 GNULIB_FPRINTF
1052 GNULIB_FOPEN
1053 GNULIB_FGETS
1054 GNULIB_FGETC
1055 GNULIB_FFLUSH
1056 GNULIB_FDOPEN
1057 GNULIB_FCLOSE
1058 GNULIB_DPRINTF
1059 GL_GENERATE_FNMATCH_H_FALSE
1060 GL_GENERATE_FNMATCH_H_TRUE
1061 FNMATCH_H
1062 REPLACE_ITOLD
1063 GL_GENERATE_FLOAT_H_FALSE
1064 GL_GENERATE_FLOAT_H_TRUE
1065 FLOAT_H
1066 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H
1067 NEXT_FLOAT_H
1068 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
1069 NEXT_FCNTL_H
1070 REPLACE_OPENAT
1071 REPLACE_OPEN
1072 REPLACE_FCNTL
1073 HAVE_OPENAT
1074 HAVE_FCNTL
1075 GNULIB_OPENAT
1076 GNULIB_OPEN
1077 GNULIB_NONBLOCKING
1078 GNULIB_FCNTL
1079 REPLACE_UTIMENSAT
1080 REPLACE_STAT
1081 REPLACE_MKNOD
1082 REPLACE_MKFIFO
1083 REPLACE_MKDIR
1084 REPLACE_LSTAT
1085 REPLACE_FUTIMENS
1086 REPLACE_FSTATAT
1087 REPLACE_FSTAT
1088 HAVE_UTIMENSAT
1089 HAVE_MKNODAT
1090 HAVE_MKNOD
1091 HAVE_MKFIFOAT
1092 HAVE_MKFIFO
1093 HAVE_MKDIRAT
1094 HAVE_LSTAT
1095 HAVE_LCHMOD
1096 HAVE_FUTIMENS
1097 HAVE_FSTATAT
1098 HAVE_FCHMODAT
1099 GNULIB_UTIMENSAT
1100 GNULIB_STAT
1101 GNULIB_MKNODAT
1102 GNULIB_MKNOD
1103 GNULIB_MKFIFOAT
1104 GNULIB_MKFIFO
1105 GNULIB_MKDIRAT
1106 GNULIB_LSTAT
1107 GNULIB_LCHMOD
1108 GNULIB_FUTIMENS
1109 GNULIB_FSTATAT
1110 GNULIB_FSTAT
1111 GNULIB_FCHMODAT
1112 LIB_EACCESS
1113 EOVERFLOW_VALUE
1114 EOVERFLOW_HIDDEN
1115 ENOLINK_VALUE
1116 ENOLINK_HIDDEN
1117 EMULTIHOP_VALUE
1118 EMULTIHOP_HIDDEN
1119 GL_GENERATE_ERRNO_H_FALSE
1120 GL_GENERATE_ERRNO_H_TRUE
1121 ERRNO_H
1122 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
1123 NEXT_ERRNO_H
1124 HAVE_DIRENT_H
1125 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H
1126 NEXT_DIRENT_H
1127 PRAGMA_COLUMNS
1128 PRAGMA_SYSTEM_HEADER
1129 INCLUDE_NEXT_AS_FIRST_DIRECTIVE
1130 INCLUDE_NEXT
1131 pkglibexecdir
1132 runstatedir
1133 lispdir
1134 REPLACE_FDOPENDIR
1135 REPLACE_DIRFD
1136 REPLACE_CLOSEDIR
1137 REPLACE_OPENDIR
1138 HAVE_ALPHASORT
1139 HAVE_SCANDIR
1140 HAVE_FDOPENDIR
1141 HAVE_DECL_FDOPENDIR
1142 HAVE_DECL_DIRFD
1143 HAVE_CLOSEDIR
1144 HAVE_REWINDDIR
1145 HAVE_READDIR
1146 HAVE_OPENDIR
1147 GNULIB_ALPHASORT
1148 GNULIB_SCANDIR
1149 GNULIB_FDOPENDIR
1150 GNULIB_DIRFD
1151 GNULIB_CLOSEDIR
1152 GNULIB_REWINDDIR
1153 GNULIB_READDIR
1154 GNULIB_OPENDIR
1155 HAVE_WINSOCK2_H
1156 HAVE_MSVC_INVALID_PARAMETER_HANDLER
1157 LIB_CLOCK_GETTIME
1158 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1159 UNISTD_H_HAVE_WINSOCK2_H
1160 REPLACE_WRITE
1161 REPLACE_USLEEP
1162 REPLACE_UNLINKAT
1163 REPLACE_UNLINK
1164 REPLACE_TTYNAME_R
1165 REPLACE_SYMLINK
1166 REPLACE_SLEEP
1167 REPLACE_RMDIR
1168 REPLACE_READLINK
1169 REPLACE_READ
1170 REPLACE_PWRITE
1171 REPLACE_PREAD
1172 REPLACE_LSEEK
1173 REPLACE_LINKAT
1174 REPLACE_LINK
1175 REPLACE_LCHOWN
1176 REPLACE_ISATTY
1177 REPLACE_GETPAGESIZE
1178 REPLACE_GETGROUPS
1179 REPLACE_GETLOGIN_R
1180 REPLACE_GETDTABLESIZE
1181 REPLACE_GETDOMAINNAME
1182 REPLACE_GETCWD
1183 REPLACE_FTRUNCATE
1184 REPLACE_FCHOWNAT
1185 REPLACE_DUP2
1186 REPLACE_DUP
1187 REPLACE_CLOSE
1188 REPLACE_CHOWN
1189 HAVE_SYS_PARAM_H
1190 HAVE_OS_H
1191 HAVE_DECL_TTYNAME_R
1192 HAVE_DECL_SETHOSTNAME
1193 HAVE_DECL_GETUSERSHELL
1194 HAVE_DECL_GETPAGESIZE
1195 HAVE_DECL_GETLOGIN_R
1196 HAVE_DECL_GETDOMAINNAME
1197 HAVE_DECL_FDATASYNC
1198 HAVE_DECL_FCHDIR
1199 HAVE_DECL_ENVIRON
1200 HAVE_USLEEP
1201 HAVE_UNLINKAT
1202 HAVE_SYMLINKAT
1203 HAVE_SYMLINK
1204 HAVE_SLEEP
1205 HAVE_SETHOSTNAME
1206 HAVE_READLINKAT
1207 HAVE_READLINK
1208 HAVE_PWRITE
1209 HAVE_PREAD
1210 HAVE_PIPE2
1211 HAVE_PIPE
1212 HAVE_LINKAT
1213 HAVE_LINK
1214 HAVE_LCHOWN
1215 HAVE_GROUP_MEMBER
1216 HAVE_GETPAGESIZE
1217 HAVE_GETLOGIN
1218 HAVE_GETHOSTNAME
1219 HAVE_GETGROUPS
1220 HAVE_GETDTABLESIZE
1221 HAVE_FTRUNCATE
1222 HAVE_FSYNC
1223 HAVE_FDATASYNC
1224 HAVE_FCHOWNAT
1225 HAVE_FCHDIR
1226 HAVE_FACCESSAT
1227 HAVE_EUIDACCESS
1228 HAVE_DUP3
1229 HAVE_DUP2
1230 HAVE_CHOWN
1231 GNULIB_WRITE
1232 GNULIB_USLEEP
1233 GNULIB_UNLINKAT
1234 GNULIB_UNLINK
1235 GNULIB_UNISTD_H_SIGPIPE
1236 GNULIB_UNISTD_H_NONBLOCKING
1237 GNULIB_TTYNAME_R
1238 GNULIB_SYMLINKAT
1239 GNULIB_SYMLINK
1240 GNULIB_SLEEP
1241 GNULIB_SETHOSTNAME
1242 GNULIB_RMDIR
1243 GNULIB_READLINKAT
1244 GNULIB_READLINK
1245 GNULIB_READ
1246 GNULIB_PWRITE
1247 GNULIB_PREAD
1248 GNULIB_PIPE2
1249 GNULIB_PIPE
1250 GNULIB_LSEEK
1251 GNULIB_LINKAT
1252 GNULIB_LINK
1253 GNULIB_LCHOWN
1254 GNULIB_ISATTY
1255 GNULIB_GROUP_MEMBER
1256 GNULIB_GETUSERSHELL
1257 GNULIB_GETPAGESIZE
1258 GNULIB_GETLOGIN_R
1259 GNULIB_GETLOGIN
1260 GNULIB_GETHOSTNAME
1261 GNULIB_GETGROUPS
1262 GNULIB_GETDTABLESIZE
1263 GNULIB_GETDOMAINNAME
1264 GNULIB_GETCWD
1265 GNULIB_FTRUNCATE
1266 GNULIB_FSYNC
1267 GNULIB_FDATASYNC
1268 GNULIB_FCHOWNAT
1269 GNULIB_FCHDIR
1270 GNULIB_FACCESSAT
1271 GNULIB_EUIDACCESS
1272 GNULIB_ENVIRON
1273 GNULIB_DUP3
1274 GNULIB_DUP2
1275 GNULIB_DUP
1276 GNULIB_CLOSE
1277 GNULIB_CHOWN
1278 GNULIB_CHDIR
1279 REPLACE_WCTOMB
1280 REPLACE_UNSETENV
1281 REPLACE_STRTOD
1282 REPLACE_SETENV
1283 REPLACE_REALPATH
1284 REPLACE_REALLOC
1285 REPLACE_RANDOM_R
1286 REPLACE_PUTENV
1287 REPLACE_PTSNAME_R
1288 REPLACE_PTSNAME
1289 REPLACE_MKSTEMP
1290 REPLACE_MBTOWC
1291 REPLACE_MALLOC
1292 REPLACE_CANONICALIZE_FILE_NAME
1293 REPLACE_CALLOC
1294 HAVE_DECL_UNSETENV
1295 HAVE_UNLOCKPT
1296 HAVE_SYS_LOADAVG_H
1297 HAVE_STRUCT_RANDOM_DATA
1298 HAVE_STRTOULL
1299 HAVE_STRTOLL
1300 HAVE_STRTOD
1301 HAVE_DECL_SETENV
1302 HAVE_SETENV
1303 HAVE_SECURE_GETENV
1304 HAVE_RPMATCH
1305 HAVE_REALPATH
1306 HAVE_RANDOM_R
1307 HAVE_RANDOM_H
1308 HAVE_RANDOM
1309 HAVE_PTSNAME_R
1310 HAVE_PTSNAME
1311 HAVE_POSIX_OPENPT
1312 HAVE_MKSTEMPS
1313 HAVE_MKSTEMP
1314 HAVE_MKOSTEMPS
1315 HAVE_MKOSTEMP
1316 HAVE_MKDTEMP
1317 HAVE_GRANTPT
1318 HAVE_GETSUBOPT
1319 HAVE_DECL_GETLOADAVG
1320 HAVE_CANONICALIZE_FILE_NAME
1321 HAVE_ATOLL
1322 HAVE__EXIT
1323 GNULIB_WCTOMB
1324 GNULIB_UNSETENV
1325 GNULIB_UNLOCKPT
1326 GNULIB_SYSTEM_POSIX
1327 GNULIB_STRTOULL
1328 GNULIB_STRTOLL
1329 GNULIB_STRTOD
1330 GNULIB_SETENV
1331 GNULIB_SECURE_GETENV
1332 GNULIB_RPMATCH
1333 GNULIB_REALPATH
1334 GNULIB_REALLOC_POSIX
1335 GNULIB_RANDOM_R
1336 GNULIB_RANDOM
1337 GNULIB_PUTENV
1338 GNULIB_PTSNAME_R
1339 GNULIB_PTSNAME
1340 GNULIB_POSIX_OPENPT
1341 GNULIB_MKSTEMPS
1342 GNULIB_MKSTEMP
1343 GNULIB_MKOSTEMPS
1344 GNULIB_MKOSTEMP
1345 GNULIB_MKDTEMP
1346 GNULIB_MBTOWC
1347 GNULIB_MALLOC_POSIX
1348 GNULIB_GRANTPT
1349 GNULIB_GETSUBOPT
1350 GNULIB_GETLOADAVG
1351 GNULIB_CANONICALIZE_FILE_NAME
1352 GNULIB_CALLOC_POSIX
1353 GNULIB_ATOLL
1354 GNULIB__EXIT
1355 LOCALE_FR
1356 REPLACE_WCSWIDTH
1357 REPLACE_WCWIDTH
1358 REPLACE_WCSNRTOMBS
1359 REPLACE_WCSRTOMBS
1360 REPLACE_WCRTOMB
1361 REPLACE_MBSNRTOWCS
1362 REPLACE_MBSRTOWCS
1363 REPLACE_MBRLEN
1364 REPLACE_MBRTOWC
1365 REPLACE_MBSINIT
1366 REPLACE_WCTOB
1367 REPLACE_BTOWC
1368 REPLACE_MBSTATE_T
1369 HAVE_DECL_WCWIDTH
1370 HAVE_DECL_WCTOB
1371 HAVE_WCSWIDTH
1372 HAVE_WCSTOK
1373 HAVE_WCSSTR
1374 HAVE_WCSPBRK
1375 HAVE_WCSSPN
1376 HAVE_WCSCSPN
1377 HAVE_WCSRCHR
1378 HAVE_WCSCHR
1379 HAVE_WCSDUP
1380 HAVE_WCSXFRM
1381 HAVE_WCSCOLL
1382 HAVE_WCSNCASECMP
1383 HAVE_WCSCASECMP
1384 HAVE_WCSNCMP
1385 HAVE_WCSCMP
1386 HAVE_WCSNCAT
1387 HAVE_WCSCAT
1388 HAVE_WCPNCPY
1389 HAVE_WCSNCPY
1390 HAVE_WCPCPY
1391 HAVE_WCSCPY
1392 HAVE_WCSNLEN
1393 HAVE_WCSLEN
1394 HAVE_WMEMSET
1395 HAVE_WMEMMOVE
1396 HAVE_WMEMCPY
1397 HAVE_WMEMCMP
1398 HAVE_WMEMCHR
1399 HAVE_WCSNRTOMBS
1400 HAVE_WCSRTOMBS
1401 HAVE_WCRTOMB
1402 HAVE_MBSNRTOWCS
1403 HAVE_MBSRTOWCS
1404 HAVE_MBRLEN
1405 HAVE_MBRTOWC
1406 HAVE_MBSINIT
1407 HAVE_BTOWC
1408 GNULIB_WCSWIDTH
1409 GNULIB_WCSTOK
1410 GNULIB_WCSSTR
1411 GNULIB_WCSPBRK
1412 GNULIB_WCSSPN
1413 GNULIB_WCSCSPN
1414 GNULIB_WCSRCHR
1415 GNULIB_WCSCHR
1416 GNULIB_WCSDUP
1417 GNULIB_WCSXFRM
1418 GNULIB_WCSCOLL
1419 GNULIB_WCSNCASECMP
1420 GNULIB_WCSCASECMP
1421 GNULIB_WCSNCMP
1422 GNULIB_WCSCMP
1423 GNULIB_WCSNCAT
1424 GNULIB_WCSCAT
1425 GNULIB_WCPNCPY
1426 GNULIB_WCSNCPY
1427 GNULIB_WCPCPY
1428 GNULIB_WCSCPY
1429 GNULIB_WCSNLEN
1430 GNULIB_WCSLEN
1431 GNULIB_WMEMSET
1432 GNULIB_WMEMMOVE
1433 GNULIB_WMEMCPY
1434 GNULIB_WMEMCMP
1435 GNULIB_WMEMCHR
1436 GNULIB_WCWIDTH
1437 GNULIB_WCSNRTOMBS
1438 GNULIB_WCSRTOMBS
1439 GNULIB_WCRTOMB
1440 GNULIB_MBSNRTOWCS
1441 GNULIB_MBSRTOWCS
1442 GNULIB_MBRLEN
1443 GNULIB_MBRTOWC
1444 GNULIB_MBSINIT
1445 GNULIB_WCTOB
1446 GNULIB_BTOWC
1447 host_os
1448 host_vendor
1449 host_cpu
1450 host
1451 build_os
1452 build_vendor
1453 build_cpu
1454 build
1455 GL_GENERATE_ALLOCA_H_FALSE
1456 GL_GENERATE_ALLOCA_H_TRUE
1457 ALLOCA_H
1458 ALLOCA
1459 GL_COND_LIBTOOL_FALSE
1460 GL_COND_LIBTOOL_TRUE
1461 ac_ct_AR
1462 ARFLAGS
1463 AR
1464 EGREP
1465 GREP
1466 CPP
1467 YFLAGS
1468 YACC
1469 RANLIB
1470 am__fastdepCC_FALSE
1471 am__fastdepCC_TRUE
1472 CCDEPMODE
1473 am__nodep
1474 AMDEPBACKSLASH
1475 AMDEP_FALSE
1476 AMDEP_TRUE
1477 am__quote
1478 am__include
1479 DEPDIR
1480 OBJEXT
1481 EXEEXT
1482 ac_ct_CC
1483 CPPFLAGS
1484 LDFLAGS
1485 CFLAGS
1486 CC
1487 AM_BACKSLASH
1488 AM_DEFAULT_VERBOSITY
1489 AM_DEFAULT_V
1490 AM_V
1491 am__untar
1492 am__tar
1493 AMTAR
1494 am__leading_dot
1495 SET_MAKE
1496 AWK
1497 mkdir_p
1498 MKDIR_P
1499 INSTALL_STRIP_PROGRAM
1500 STRIP
1501 install_sh
1502 MAKEINFO
1503 AUTOHEADER
1504 AUTOMAKE
1505 AUTOCONF
1506 ACLOCAL
1507 VERSION
1508 PACKAGE
1509 CYGPATH_W
1510 am__isrc
1511 INSTALL_DATA
1512 INSTALL_SCRIPT
1513 INSTALL_PROGRAM
1514 target_alias
1515 host_alias
1516 build_alias
1517 LIBS
1518 ECHO_T
1519 ECHO_N
1520 ECHO_C
1521 DEFS
1522 mandir
1523 localedir
1524 libdir
1525 psdir
1526 pdfdir
1527 dvidir
1528 htmldir
1529 infodir
1530 docdir
1531 oldincludedir
1532 includedir
1533 localstatedir
1534 sharedstatedir
1535 sysconfdir
1536 datadir
1537 datarootdir
1538 libexecdir
1539 sbindir
1540 bindir
1541 program_transform_name
1542 prefix
1543 exec_prefix
1544 PACKAGE_URL
1545 PACKAGE_BUGREPORT
1546 PACKAGE_STRING
1547 PACKAGE_VERSION
1548 PACKAGE_TARNAME
1549 PACKAGE_NAME
1550 PATH_SEPARATOR
1551 SHELL'
1552 ac_subst_files=''
1553 ac_user_opts='
1554 enable_option_checking
1555 enable_silent_rules
1556 enable_dependency_tracking
1557 enable_largefile
1558 with_posix_acls
1559 enable_acl
1560 with_included_regex
1561 with_selinux
1562 with_packager
1563 with_packager_version
1564 with_packager_bug_reports
1565 with_rmt
1566 enable_gcc_warnings
1567 with_xattrs
1568 with_compress
1569 with_gzip
1570 with_bzip2
1571 with_lzip
1572 with_lzma
1573 with_lzop
1574 with_xz
1575 with_gnu_ld
1576 enable_rpath
1577 with_libiconv_prefix
1578 enable_nls
1579 with_libintl_prefix
1580 enable_backup_scripts
1581 '
1582       ac_precious_vars='build_alias
1583 host_alias
1584 target_alias
1585 CC
1586 CFLAGS
1587 LDFLAGS
1588 LIBS
1589 CPPFLAGS
1590 YACC
1591 YFLAGS
1592 CPP
1593 DEFAULT_RMT_DIR
1594 RSH
1595 DEFAULT_ARCHIVE_FORMAT
1596 DEFAULT_ARCHIVE
1597 DEFAULT_BLOCKING
1598 DEFAULT_QUOTING_STYLE'
1599
1600
1601 # Initialize some variables set by options.
1602 ac_init_help=
1603 ac_init_version=false
1604 ac_unrecognized_opts=
1605 ac_unrecognized_sep=
1606 # The variables have the same names as the options, with
1607 # dashes changed to underlines.
1608 cache_file=/dev/null
1609 exec_prefix=NONE
1610 no_create=
1611 no_recursion=
1612 prefix=NONE
1613 program_prefix=NONE
1614 program_suffix=NONE
1615 program_transform_name=s,x,x,
1616 silent=
1617 site=
1618 srcdir=
1619 verbose=
1620 x_includes=NONE
1621 x_libraries=NONE
1622
1623 # Installation directory options.
1624 # These are left unexpanded so users can "make install exec_prefix=/foo"
1625 # and all the variables that are supposed to be based on exec_prefix
1626 # by default will actually change.
1627 # Use braces instead of parens because sh, perl, etc. also accept them.
1628 # (The list follows the same order as the GNU Coding Standards.)
1629 bindir='${exec_prefix}/bin'
1630 sbindir='${exec_prefix}/sbin'
1631 libexecdir='${exec_prefix}/libexec'
1632 datarootdir='${prefix}/share'
1633 datadir='${datarootdir}'
1634 sysconfdir='${prefix}/etc'
1635 sharedstatedir='${prefix}/com'
1636 localstatedir='${prefix}/var'
1637 includedir='${prefix}/include'
1638 oldincludedir='/usr/include'
1639 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1640 infodir='${datarootdir}/info'
1641 htmldir='${docdir}'
1642 dvidir='${docdir}'
1643 pdfdir='${docdir}'
1644 psdir='${docdir}'
1645 libdir='${exec_prefix}/lib'
1646 localedir='${datarootdir}/locale'
1647 mandir='${datarootdir}/man'
1648
1649 ac_prev=
1650 ac_dashdash=
1651 for ac_option
1652 do
1653   # If the previous option needs an argument, assign it.
1654   if test -n "$ac_prev"; then
1655     eval $ac_prev=\$ac_option
1656     ac_prev=
1657     continue
1658   fi
1659
1660   case $ac_option in
1661   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1662   *=)   ac_optarg= ;;
1663   *)    ac_optarg=yes ;;
1664   esac
1665
1666   # Accept the important Cygnus configure options, so we can diagnose typos.
1667
1668   case $ac_dashdash$ac_option in
1669   --)
1670     ac_dashdash=yes ;;
1671
1672   -bindir | --bindir | --bindi | --bind | --bin | --bi)
1673     ac_prev=bindir ;;
1674   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1675     bindir=$ac_optarg ;;
1676
1677   -build | --build | --buil | --bui | --bu)
1678     ac_prev=build_alias ;;
1679   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1680     build_alias=$ac_optarg ;;
1681
1682   -cache-file | --cache-file | --cache-fil | --cache-fi \
1683   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1684     ac_prev=cache_file ;;
1685   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1686   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1687     cache_file=$ac_optarg ;;
1688
1689   --config-cache | -C)
1690     cache_file=config.cache ;;
1691
1692   -datadir | --datadir | --datadi | --datad)
1693     ac_prev=datadir ;;
1694   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1695     datadir=$ac_optarg ;;
1696
1697   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1698   | --dataroo | --dataro | --datar)
1699     ac_prev=datarootdir ;;
1700   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1701   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1702     datarootdir=$ac_optarg ;;
1703
1704   -disable-* | --disable-*)
1705     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1706     # Reject names that are not valid shell variable names.
1707     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1708       as_fn_error $? "invalid feature name: $ac_useropt"
1709     ac_useropt_orig=$ac_useropt
1710     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1711     case $ac_user_opts in
1712       *"
1713 "enable_$ac_useropt"
1714 "*) ;;
1715       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1716          ac_unrecognized_sep=', ';;
1717     esac
1718     eval enable_$ac_useropt=no ;;
1719
1720   -docdir | --docdir | --docdi | --doc | --do)
1721     ac_prev=docdir ;;
1722   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1723     docdir=$ac_optarg ;;
1724
1725   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1726     ac_prev=dvidir ;;
1727   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1728     dvidir=$ac_optarg ;;
1729
1730   -enable-* | --enable-*)
1731     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1732     # Reject names that are not valid shell variable names.
1733     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1734       as_fn_error $? "invalid feature name: $ac_useropt"
1735     ac_useropt_orig=$ac_useropt
1736     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1737     case $ac_user_opts in
1738       *"
1739 "enable_$ac_useropt"
1740 "*) ;;
1741       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1742          ac_unrecognized_sep=', ';;
1743     esac
1744     eval enable_$ac_useropt=\$ac_optarg ;;
1745
1746   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1747   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1748   | --exec | --exe | --ex)
1749     ac_prev=exec_prefix ;;
1750   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1751   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1752   | --exec=* | --exe=* | --ex=*)
1753     exec_prefix=$ac_optarg ;;
1754
1755   -gas | --gas | --ga | --g)
1756     # Obsolete; use --with-gas.
1757     with_gas=yes ;;
1758
1759   -help | --help | --hel | --he | -h)
1760     ac_init_help=long ;;
1761   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1762     ac_init_help=recursive ;;
1763   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1764     ac_init_help=short ;;
1765
1766   -host | --host | --hos | --ho)
1767     ac_prev=host_alias ;;
1768   -host=* | --host=* | --hos=* | --ho=*)
1769     host_alias=$ac_optarg ;;
1770
1771   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1772     ac_prev=htmldir ;;
1773   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1774   | --ht=*)
1775     htmldir=$ac_optarg ;;
1776
1777   -includedir | --includedir | --includedi | --included | --include \
1778   | --includ | --inclu | --incl | --inc)
1779     ac_prev=includedir ;;
1780   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1781   | --includ=* | --inclu=* | --incl=* | --inc=*)
1782     includedir=$ac_optarg ;;
1783
1784   -infodir | --infodir | --infodi | --infod | --info | --inf)
1785     ac_prev=infodir ;;
1786   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1787     infodir=$ac_optarg ;;
1788
1789   -libdir | --libdir | --libdi | --libd)
1790     ac_prev=libdir ;;
1791   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1792     libdir=$ac_optarg ;;
1793
1794   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1795   | --libexe | --libex | --libe)
1796     ac_prev=libexecdir ;;
1797   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1798   | --libexe=* | --libex=* | --libe=*)
1799     libexecdir=$ac_optarg ;;
1800
1801   -localedir | --localedir | --localedi | --localed | --locale)
1802     ac_prev=localedir ;;
1803   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1804     localedir=$ac_optarg ;;
1805
1806   -localstatedir | --localstatedir | --localstatedi | --localstated \
1807   | --localstate | --localstat | --localsta | --localst | --locals)
1808     ac_prev=localstatedir ;;
1809   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1810   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1811     localstatedir=$ac_optarg ;;
1812
1813   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1814     ac_prev=mandir ;;
1815   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1816     mandir=$ac_optarg ;;
1817
1818   -nfp | --nfp | --nf)
1819     # Obsolete; use --without-fp.
1820     with_fp=no ;;
1821
1822   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1823   | --no-cr | --no-c | -n)
1824     no_create=yes ;;
1825
1826   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1827   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1828     no_recursion=yes ;;
1829
1830   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1831   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1832   | --oldin | --oldi | --old | --ol | --o)
1833     ac_prev=oldincludedir ;;
1834   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1835   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1836   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1837     oldincludedir=$ac_optarg ;;
1838
1839   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1840     ac_prev=prefix ;;
1841   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1842     prefix=$ac_optarg ;;
1843
1844   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1845   | --program-pre | --program-pr | --program-p)
1846     ac_prev=program_prefix ;;
1847   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1848   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1849     program_prefix=$ac_optarg ;;
1850
1851   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1852   | --program-suf | --program-su | --program-s)
1853     ac_prev=program_suffix ;;
1854   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1855   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1856     program_suffix=$ac_optarg ;;
1857
1858   -program-transform-name | --program-transform-name \
1859   | --program-transform-nam | --program-transform-na \
1860   | --program-transform-n | --program-transform- \
1861   | --program-transform | --program-transfor \
1862   | --program-transfo | --program-transf \
1863   | --program-trans | --program-tran \
1864   | --progr-tra | --program-tr | --program-t)
1865     ac_prev=program_transform_name ;;
1866   -program-transform-name=* | --program-transform-name=* \
1867   | --program-transform-nam=* | --program-transform-na=* \
1868   | --program-transform-n=* | --program-transform-=* \
1869   | --program-transform=* | --program-transfor=* \
1870   | --program-transfo=* | --program-transf=* \
1871   | --program-trans=* | --program-tran=* \
1872   | --progr-tra=* | --program-tr=* | --program-t=*)
1873     program_transform_name=$ac_optarg ;;
1874
1875   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1876     ac_prev=pdfdir ;;
1877   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1878     pdfdir=$ac_optarg ;;
1879
1880   -psdir | --psdir | --psdi | --psd | --ps)
1881     ac_prev=psdir ;;
1882   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1883     psdir=$ac_optarg ;;
1884
1885   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1886   | -silent | --silent | --silen | --sile | --sil)
1887     silent=yes ;;
1888
1889   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1890     ac_prev=sbindir ;;
1891   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1892   | --sbi=* | --sb=*)
1893     sbindir=$ac_optarg ;;
1894
1895   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1896   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1897   | --sharedst | --shareds | --shared | --share | --shar \
1898   | --sha | --sh)
1899     ac_prev=sharedstatedir ;;
1900   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1901   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1902   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1903   | --sha=* | --sh=*)
1904     sharedstatedir=$ac_optarg ;;
1905
1906   -site | --site | --sit)
1907     ac_prev=site ;;
1908   -site=* | --site=* | --sit=*)
1909     site=$ac_optarg ;;
1910
1911   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1912     ac_prev=srcdir ;;
1913   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1914     srcdir=$ac_optarg ;;
1915
1916   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1917   | --syscon | --sysco | --sysc | --sys | --sy)
1918     ac_prev=sysconfdir ;;
1919   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1920   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1921     sysconfdir=$ac_optarg ;;
1922
1923   -target | --target | --targe | --targ | --tar | --ta | --t)
1924     ac_prev=target_alias ;;
1925   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1926     target_alias=$ac_optarg ;;
1927
1928   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1929     verbose=yes ;;
1930
1931   -version | --version | --versio | --versi | --vers | -V)
1932     ac_init_version=: ;;
1933
1934   -with-* | --with-*)
1935     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1936     # Reject names that are not valid shell variable names.
1937     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1938       as_fn_error $? "invalid package name: $ac_useropt"
1939     ac_useropt_orig=$ac_useropt
1940     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1941     case $ac_user_opts in
1942       *"
1943 "with_$ac_useropt"
1944 "*) ;;
1945       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1946          ac_unrecognized_sep=', ';;
1947     esac
1948     eval with_$ac_useropt=\$ac_optarg ;;
1949
1950   -without-* | --without-*)
1951     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1952     # Reject names that are not valid shell variable names.
1953     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1954       as_fn_error $? "invalid package name: $ac_useropt"
1955     ac_useropt_orig=$ac_useropt
1956     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1957     case $ac_user_opts in
1958       *"
1959 "with_$ac_useropt"
1960 "*) ;;
1961       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1962          ac_unrecognized_sep=', ';;
1963     esac
1964     eval with_$ac_useropt=no ;;
1965
1966   --x)
1967     # Obsolete; use --with-x.
1968     with_x=yes ;;
1969
1970   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1971   | --x-incl | --x-inc | --x-in | --x-i)
1972     ac_prev=x_includes ;;
1973   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1974   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1975     x_includes=$ac_optarg ;;
1976
1977   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1978   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1979     ac_prev=x_libraries ;;
1980   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1981   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1982     x_libraries=$ac_optarg ;;
1983
1984   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1985 Try \`$0 --help' for more information"
1986     ;;
1987
1988   *=*)
1989     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1990     # Reject names that are not valid shell variable names.
1991     case $ac_envvar in #(
1992       '' | [0-9]* | *[!_$as_cr_alnum]* )
1993       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1994     esac
1995     eval $ac_envvar=\$ac_optarg
1996     export $ac_envvar ;;
1997
1998   *)
1999     # FIXME: should be removed in autoconf 3.0.
2000     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
2001     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
2002       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
2003     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
2004     ;;
2005
2006   esac
2007 done
2008
2009 if test -n "$ac_prev"; then
2010   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
2011   as_fn_error $? "missing argument to $ac_option"
2012 fi
2013
2014 if test -n "$ac_unrecognized_opts"; then
2015   case $enable_option_checking in
2016     no) ;;
2017     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
2018     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
2019   esac
2020 fi
2021
2022 # Check all directory arguments for consistency.
2023 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
2024                 datadir sysconfdir sharedstatedir localstatedir includedir \
2025                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
2026                 libdir localedir mandir
2027 do
2028   eval ac_val=\$$ac_var
2029   # Remove trailing slashes.
2030   case $ac_val in
2031     */ )
2032       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
2033       eval $ac_var=\$ac_val;;
2034   esac
2035   # Be sure to have absolute directory names.
2036   case $ac_val in
2037     [\\/$]* | ?:[\\/]* )  continue;;
2038     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
2039   esac
2040   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
2041 done
2042
2043 # There might be people who depend on the old broken behavior: `$host'
2044 # used to hold the argument of --host etc.
2045 # FIXME: To remove some day.
2046 build=$build_alias
2047 host=$host_alias
2048 target=$target_alias
2049
2050 # FIXME: To remove some day.
2051 if test "x$host_alias" != x; then
2052   if test "x$build_alias" = x; then
2053     cross_compiling=maybe
2054   elif test "x$build_alias" != "x$host_alias"; then
2055     cross_compiling=yes
2056   fi
2057 fi
2058
2059 ac_tool_prefix=
2060 test -n "$host_alias" && ac_tool_prefix=$host_alias-
2061
2062 test "$silent" = yes && exec 6>/dev/null
2063
2064
2065 ac_pwd=`pwd` && test -n "$ac_pwd" &&
2066 ac_ls_di=`ls -di .` &&
2067 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
2068   as_fn_error $? "working directory cannot be determined"
2069 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
2070   as_fn_error $? "pwd does not report name of working directory"
2071
2072
2073 # Find the source files, if location was not specified.
2074 if test -z "$srcdir"; then
2075   ac_srcdir_defaulted=yes
2076   # Try the directory containing this script, then the parent directory.
2077   ac_confdir=`$as_dirname -- "$as_myself" ||
2078 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
2079          X"$as_myself" : 'X\(//\)[^/]' \| \
2080          X"$as_myself" : 'X\(//\)$' \| \
2081          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
2082 $as_echo X"$as_myself" |
2083     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
2084             s//\1/
2085             q
2086           }
2087           /^X\(\/\/\)[^/].*/{
2088             s//\1/
2089             q
2090           }
2091           /^X\(\/\/\)$/{
2092             s//\1/
2093             q
2094           }
2095           /^X\(\/\).*/{
2096             s//\1/
2097             q
2098           }
2099           s/.*/./; q'`
2100   srcdir=$ac_confdir
2101   if test ! -r "$srcdir/$ac_unique_file"; then
2102     srcdir=..
2103   fi
2104 else
2105   ac_srcdir_defaulted=no
2106 fi
2107 if test ! -r "$srcdir/$ac_unique_file"; then
2108   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
2109   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
2110 fi
2111 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
2112 ac_abs_confdir=`(
2113         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
2114         pwd)`
2115 # When building in place, set srcdir=.
2116 if test "$ac_abs_confdir" = "$ac_pwd"; then
2117   srcdir=.
2118 fi
2119 # Remove unnecessary trailing slashes from srcdir.
2120 # Double slashes in file names in object file debugging info
2121 # mess up M-x gdb in Emacs.
2122 case $srcdir in
2123 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
2124 esac
2125 for ac_var in $ac_precious_vars; do
2126   eval ac_env_${ac_var}_set=\${${ac_var}+set}
2127   eval ac_env_${ac_var}_value=\$${ac_var}
2128   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
2129   eval ac_cv_env_${ac_var}_value=\$${ac_var}
2130 done
2131
2132 #
2133 # Report the --help message.
2134 #
2135 if test "$ac_init_help" = "long"; then
2136   # Omit some internal or obsolete options to make the list less imposing.
2137   # This message is too long to be a string in the A/UX 3.1 sh.
2138   cat <<_ACEOF
2139 \`configure' configures GNU tar 1.28 to adapt to many kinds of systems.
2140
2141 Usage: $0 [OPTION]... [VAR=VALUE]...
2142
2143 To assign environment variables (e.g., CC, CFLAGS...), specify them as
2144 VAR=VALUE.  See below for descriptions of some of the useful variables.
2145
2146 Defaults for the options are specified in brackets.
2147
2148 Configuration:
2149   -h, --help              display this help and exit
2150       --help=short        display options specific to this package
2151       --help=recursive    display the short help of all the included packages
2152   -V, --version           display version information and exit
2153   -q, --quiet, --silent   do not print \`checking ...' messages
2154       --cache-file=FILE   cache test results in FILE [disabled]
2155   -C, --config-cache      alias for \`--cache-file=config.cache'
2156   -n, --no-create         do not create output files
2157       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
2158
2159 Installation directories:
2160   --prefix=PREFIX         install architecture-independent files in PREFIX
2161                           [$ac_default_prefix]
2162   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
2163                           [PREFIX]
2164
2165 By default, \`make install' will install all the files in
2166 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
2167 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
2168 for instance \`--prefix=\$HOME'.
2169
2170 For better control, use the options below.
2171
2172 Fine tuning of the installation directories:
2173   --bindir=DIR            user executables [EPREFIX/bin]
2174   --sbindir=DIR           system admin executables [EPREFIX/sbin]
2175   --libexecdir=DIR        program executables [EPREFIX/libexec]
2176   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
2177   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
2178   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
2179   --libdir=DIR            object code libraries [EPREFIX/lib]
2180   --includedir=DIR        C header files [PREFIX/include]
2181   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
2182   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
2183   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
2184   --infodir=DIR           info documentation [DATAROOTDIR/info]
2185   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
2186   --mandir=DIR            man documentation [DATAROOTDIR/man]
2187   --docdir=DIR            documentation root [DATAROOTDIR/doc/tar]
2188   --htmldir=DIR           html documentation [DOCDIR]
2189   --dvidir=DIR            dvi documentation [DOCDIR]
2190   --pdfdir=DIR            pdf documentation [DOCDIR]
2191   --psdir=DIR             ps documentation [DOCDIR]
2192 _ACEOF
2193
2194   cat <<\_ACEOF
2195
2196 Program names:
2197   --program-prefix=PREFIX            prepend PREFIX to installed program names
2198   --program-suffix=SUFFIX            append SUFFIX to installed program names
2199   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
2200
2201 System types:
2202   --build=BUILD     configure for building on BUILD [guessed]
2203   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
2204 _ACEOF
2205 fi
2206
2207 if test -n "$ac_init_help"; then
2208   case $ac_init_help in
2209      short | recursive ) echo "Configuration of GNU tar 1.28:";;
2210    esac
2211   cat <<\_ACEOF
2212
2213 Optional Features:
2214   --disable-option-checking  ignore unrecognized --enable/--with options
2215   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
2216   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
2217   --enable-silent-rules   less verbose build output (undo: "make V=1")
2218   --disable-silent-rules  verbose build output (undo: "make V=0")
2219   --enable-dependency-tracking
2220                           do not reject slow dependency extractors
2221   --disable-dependency-tracking
2222                           speeds up one-time build
2223   --disable-largefile     omit support for large files
2224   --disable-acl           do not support ACLs
2225   --enable-gcc-warnings   turn on many GCC warnings (for developers; best with
2226                           GNU make)
2227   --disable-rpath         do not hardcode runtime library paths
2228   --disable-nls           do not use Native Language Support
2229   --enable-backup-scripts Create and install backup and restore scripts
2230
2231 Optional Packages:
2232   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2233   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2234   --without-posix-acls    do not use POSIX.1e access control lists
2235   --without-included-regex
2236                           don't compile regex; this is the default on systems
2237                           with recent-enough versions of the GNU C Library
2238                           (use with caution on other systems).
2239   --without-selinux       do not use SELinux, even on systems with SELinux
2240   --with-packager         String identifying the packager of this software
2241   --with-packager-version Packager-specific version information
2242   --with-packager-bug-reports
2243                           Packager info for bug reports (URL/e-mail/...)
2244   --with-rmt=FILE         Use FILE as the default `rmt' program. Do not build
2245                           included copy of `rmt'.
2246   --without-xattrs        don't use linux extended attributes
2247   --with-compress=PROG    use PROG as compress compressor program
2248   --with-gzip=PROG        use PROG as gzip compressor program
2249   --with-bzip2=PROG       use PROG as bzip2 compressor program
2250   --with-lzip=PROG        use PROG as lzip compressor program
2251   --with-lzma=PROG        use PROG as lzma compressor program
2252   --with-lzop=PROG        use PROG as lzop compressor program
2253   --with-xz=PROG          use PROG as xz compressor program
2254   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
2255   --with-libiconv-prefix[=DIR]  search for libiconv in DIR/include and DIR/lib
2256   --without-libiconv-prefix     don't search for libiconv in includedir and libdir
2257   --with-libintl-prefix[=DIR]  search for libintl in DIR/include and DIR/lib
2258   --without-libintl-prefix     don't search for libintl in includedir and libdir
2259
2260 Some influential environment variables:
2261   CC          C compiler command
2262   CFLAGS      C compiler flags
2263   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2264               nonstandard directory <lib dir>
2265   LIBS        libraries to pass to the linker, e.g. -l<library>
2266   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2267               you have headers in a nonstandard directory <include dir>
2268   YACC        The `Yet Another Compiler Compiler' implementation to use.
2269               Defaults to the first program found out of: `bison -y', `byacc',
2270               `yacc'.
2271   YFLAGS      The list of arguments that will be passed by default to $YACC.
2272               This script will default YFLAGS to the empty string to avoid a
2273               default value of `-d' given by some make applications.
2274   CPP         C preprocessor
2275   DEFAULT_RMT_DIR
2276               Define full file name of the directory where to install `rmt'.
2277               (default: $(libexecdir))
2278   RSH         Configure absolute path to default remote shell binary
2279   DEFAULT_ARCHIVE_FORMAT
2280               Set the default archive format. Allowed values are: V7, OLDGNU,
2281               USTAR, POSIX, GNU. Default is GNU
2282   DEFAULT_ARCHIVE
2283               Set the name of the default archive (default: -)
2284   DEFAULT_BLOCKING
2285               Define default blocking factor (default: 20)
2286   DEFAULT_QUOTING_STYLE
2287               Set the default quoting style. Allowed values are: literal,
2288               shell, shell-always, c, escape, locale, clocale . Default is
2289               "escape".
2290
2291 Use these variables to override the choices made by `configure' or to help
2292 it to find libraries and programs with nonstandard names/locations.
2293
2294 Report bugs to <bug-tar@gnu.org>.
2295 GNU tar home page: <http://www.gnu.org/software/tar/>.
2296 General help using GNU software: <http://www.gnu.org/gethelp/>.
2297 _ACEOF
2298 ac_status=$?
2299 fi
2300
2301 if test "$ac_init_help" = "recursive"; then
2302   # If there are subdirs, report their specific --help.
2303   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2304     test -d "$ac_dir" ||
2305       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2306       continue
2307     ac_builddir=.
2308
2309 case "$ac_dir" in
2310 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2311 *)
2312   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2313   # A ".." for each directory in $ac_dir_suffix.
2314   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2315   case $ac_top_builddir_sub in
2316   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2317   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2318   esac ;;
2319 esac
2320 ac_abs_top_builddir=$ac_pwd
2321 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2322 # for backward compatibility:
2323 ac_top_builddir=$ac_top_build_prefix
2324
2325 case $srcdir in
2326   .)  # We are building in place.
2327     ac_srcdir=.
2328     ac_top_srcdir=$ac_top_builddir_sub
2329     ac_abs_top_srcdir=$ac_pwd ;;
2330   [\\/]* | ?:[\\/]* )  # Absolute name.
2331     ac_srcdir=$srcdir$ac_dir_suffix;
2332     ac_top_srcdir=$srcdir
2333     ac_abs_top_srcdir=$srcdir ;;
2334   *) # Relative name.
2335     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2336     ac_top_srcdir=$ac_top_build_prefix$srcdir
2337     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2338 esac
2339 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2340
2341     cd "$ac_dir" || { ac_status=$?; continue; }
2342     # Check for guested configure.
2343     if test -f "$ac_srcdir/configure.gnu"; then
2344       echo &&
2345       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2346     elif test -f "$ac_srcdir/configure"; then
2347       echo &&
2348       $SHELL "$ac_srcdir/configure" --help=recursive
2349     else
2350       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2351     fi || ac_status=$?
2352     cd "$ac_pwd" || { ac_status=$?; break; }
2353   done
2354 fi
2355
2356 test -n "$ac_init_help" && exit $ac_status
2357 if $ac_init_version; then
2358   cat <<\_ACEOF
2359 GNU tar configure 1.28
2360 generated by GNU Autoconf 2.69
2361
2362 Copyright (C) 2012 Free Software Foundation, Inc.
2363 This configure script is free software; the Free Software Foundation
2364 gives unlimited permission to copy, distribute and modify it.
2365 _ACEOF
2366   exit
2367 fi
2368
2369 ## ------------------------ ##
2370 ## Autoconf initialization. ##
2371 ## ------------------------ ##
2372
2373 # ac_fn_c_try_compile LINENO
2374 # --------------------------
2375 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2376 ac_fn_c_try_compile ()
2377 {
2378   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2379   rm -f conftest.$ac_objext
2380   if { { ac_try="$ac_compile"
2381 case "(($ac_try" in
2382   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2383   *) ac_try_echo=$ac_try;;
2384 esac
2385 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2386 $as_echo "$ac_try_echo"; } >&5
2387   (eval "$ac_compile") 2>conftest.err
2388   ac_status=$?
2389   if test -s conftest.err; then
2390     grep -v '^ *+' conftest.err >conftest.er1
2391     cat conftest.er1 >&5
2392     mv -f conftest.er1 conftest.err
2393   fi
2394   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2395   test $ac_status = 0; } && {
2396          test -z "$ac_c_werror_flag" ||
2397          test ! -s conftest.err
2398        } && test -s conftest.$ac_objext; then :
2399   ac_retval=0
2400 else
2401   $as_echo "$as_me: failed program was:" >&5
2402 sed 's/^/| /' conftest.$ac_ext >&5
2403
2404         ac_retval=1
2405 fi
2406   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2407   as_fn_set_status $ac_retval
2408
2409 } # ac_fn_c_try_compile
2410
2411 # ac_fn_c_try_cpp LINENO
2412 # ----------------------
2413 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2414 ac_fn_c_try_cpp ()
2415 {
2416   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2417   if { { ac_try="$ac_cpp conftest.$ac_ext"
2418 case "(($ac_try" in
2419   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2420   *) ac_try_echo=$ac_try;;
2421 esac
2422 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2423 $as_echo "$ac_try_echo"; } >&5
2424   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2425   ac_status=$?
2426   if test -s conftest.err; then
2427     grep -v '^ *+' conftest.err >conftest.er1
2428     cat conftest.er1 >&5
2429     mv -f conftest.er1 conftest.err
2430   fi
2431   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2432   test $ac_status = 0; } > conftest.i && {
2433          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2434          test ! -s conftest.err
2435        }; then :
2436   ac_retval=0
2437 else
2438   $as_echo "$as_me: failed program was:" >&5
2439 sed 's/^/| /' conftest.$ac_ext >&5
2440
2441     ac_retval=1
2442 fi
2443   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2444   as_fn_set_status $ac_retval
2445
2446 } # ac_fn_c_try_cpp
2447
2448 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
2449 # -------------------------------------------------------
2450 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2451 # the include files in INCLUDES and setting the cache variable VAR
2452 # accordingly.
2453 ac_fn_c_check_header_mongrel ()
2454 {
2455   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2456   if eval \${$3+:} false; then :
2457   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2458 $as_echo_n "checking for $2... " >&6; }
2459 if eval \${$3+:} false; then :
2460   $as_echo_n "(cached) " >&6
2461 fi
2462 eval ac_res=\$$3
2463                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2464 $as_echo "$ac_res" >&6; }
2465 else
2466   # Is the header compilable?
2467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2468 $as_echo_n "checking $2 usability... " >&6; }
2469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2470 /* end confdefs.h.  */
2471 $4
2472 #include <$2>
2473 _ACEOF
2474 if ac_fn_c_try_compile "$LINENO"; then :
2475   ac_header_compiler=yes
2476 else
2477   ac_header_compiler=no
2478 fi
2479 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2481 $as_echo "$ac_header_compiler" >&6; }
2482
2483 # Is the header present?
2484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2485 $as_echo_n "checking $2 presence... " >&6; }
2486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2487 /* end confdefs.h.  */
2488 #include <$2>
2489 _ACEOF
2490 if ac_fn_c_try_cpp "$LINENO"; then :
2491   ac_header_preproc=yes
2492 else
2493   ac_header_preproc=no
2494 fi
2495 rm -f conftest.err conftest.i conftest.$ac_ext
2496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2497 $as_echo "$ac_header_preproc" >&6; }
2498
2499 # So?  What about this header?
2500 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2501   yes:no: )
2502     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2503 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2504     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2505 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2506     ;;
2507   no:yes:* )
2508     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2509 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2510     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2511 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2512     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2513 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2514     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2515 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2516     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2517 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2518 ( $as_echo "## ------------------------------ ##
2519 ## Report this to bug-tar@gnu.org ##
2520 ## ------------------------------ ##"
2521      ) | sed "s/^/$as_me: WARNING:     /" >&2
2522     ;;
2523 esac
2524   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2525 $as_echo_n "checking for $2... " >&6; }
2526 if eval \${$3+:} false; then :
2527   $as_echo_n "(cached) " >&6
2528 else
2529   eval "$3=\$ac_header_compiler"
2530 fi
2531 eval ac_res=\$$3
2532                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2533 $as_echo "$ac_res" >&6; }
2534 fi
2535   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2536
2537 } # ac_fn_c_check_header_mongrel
2538
2539 # ac_fn_c_try_run LINENO
2540 # ----------------------
2541 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2542 # that executables *can* be run.
2543 ac_fn_c_try_run ()
2544 {
2545   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2546   if { { ac_try="$ac_link"
2547 case "(($ac_try" in
2548   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2549   *) ac_try_echo=$ac_try;;
2550 esac
2551 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2552 $as_echo "$ac_try_echo"; } >&5
2553   (eval "$ac_link") 2>&5
2554   ac_status=$?
2555   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2556   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2557   { { case "(($ac_try" in
2558   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2559   *) ac_try_echo=$ac_try;;
2560 esac
2561 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2562 $as_echo "$ac_try_echo"; } >&5
2563   (eval "$ac_try") 2>&5
2564   ac_status=$?
2565   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2566   test $ac_status = 0; }; }; then :
2567   ac_retval=0
2568 else
2569   $as_echo "$as_me: program exited with status $ac_status" >&5
2570        $as_echo "$as_me: failed program was:" >&5
2571 sed 's/^/| /' conftest.$ac_ext >&5
2572
2573        ac_retval=$ac_status
2574 fi
2575   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2576   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2577   as_fn_set_status $ac_retval
2578
2579 } # ac_fn_c_try_run
2580
2581 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2582 # -------------------------------------------------------
2583 # Tests whether HEADER exists and can be compiled using the include files in
2584 # INCLUDES, setting the cache variable VAR accordingly.
2585 ac_fn_c_check_header_compile ()
2586 {
2587   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2588   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2589 $as_echo_n "checking for $2... " >&6; }
2590 if eval \${$3+:} false; then :
2591   $as_echo_n "(cached) " >&6
2592 else
2593   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2594 /* end confdefs.h.  */
2595 $4
2596 #include <$2>
2597 _ACEOF
2598 if ac_fn_c_try_compile "$LINENO"; then :
2599   eval "$3=yes"
2600 else
2601   eval "$3=no"
2602 fi
2603 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2604 fi
2605 eval ac_res=\$$3
2606                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2607 $as_echo "$ac_res" >&6; }
2608   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2609
2610 } # ac_fn_c_check_header_compile
2611
2612 # ac_fn_c_try_link LINENO
2613 # -----------------------
2614 # Try to link conftest.$ac_ext, and return whether this succeeded.
2615 ac_fn_c_try_link ()
2616 {
2617   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2618   rm -f conftest.$ac_objext conftest$ac_exeext
2619   if { { ac_try="$ac_link"
2620 case "(($ac_try" in
2621   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2622   *) ac_try_echo=$ac_try;;
2623 esac
2624 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2625 $as_echo "$ac_try_echo"; } >&5
2626   (eval "$ac_link") 2>conftest.err
2627   ac_status=$?
2628   if test -s conftest.err; then
2629     grep -v '^ *+' conftest.err >conftest.er1
2630     cat conftest.er1 >&5
2631     mv -f conftest.er1 conftest.err
2632   fi
2633   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2634   test $ac_status = 0; } && {
2635          test -z "$ac_c_werror_flag" ||
2636          test ! -s conftest.err
2637        } && test -s conftest$ac_exeext && {
2638          test "$cross_compiling" = yes ||
2639          test -x conftest$ac_exeext
2640        }; then :
2641   ac_retval=0
2642 else
2643   $as_echo "$as_me: failed program was:" >&5
2644 sed 's/^/| /' conftest.$ac_ext >&5
2645
2646         ac_retval=1
2647 fi
2648   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2649   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2650   # interfere with the next link command; also delete a directory that is
2651   # left behind by Apple's compiler.  We do this before executing the actions.
2652   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2653   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2654   as_fn_set_status $ac_retval
2655
2656 } # ac_fn_c_try_link
2657
2658 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2659 # -------------------------------------------
2660 # Tests whether TYPE exists after having included INCLUDES, setting cache
2661 # variable VAR accordingly.
2662 ac_fn_c_check_type ()
2663 {
2664   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2665   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2666 $as_echo_n "checking for $2... " >&6; }
2667 if eval \${$3+:} false; then :
2668   $as_echo_n "(cached) " >&6
2669 else
2670   eval "$3=no"
2671   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2672 /* end confdefs.h.  */
2673 $4
2674 int
2675 main ()
2676 {
2677 if (sizeof ($2))
2678          return 0;
2679   ;
2680   return 0;
2681 }
2682 _ACEOF
2683 if ac_fn_c_try_compile "$LINENO"; then :
2684   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2685 /* end confdefs.h.  */
2686 $4
2687 int
2688 main ()
2689 {
2690 if (sizeof (($2)))
2691             return 0;
2692   ;
2693   return 0;
2694 }
2695 _ACEOF
2696 if ac_fn_c_try_compile "$LINENO"; then :
2697
2698 else
2699   eval "$3=yes"
2700 fi
2701 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2702 fi
2703 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2704 fi
2705 eval ac_res=\$$3
2706                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2707 $as_echo "$ac_res" >&6; }
2708   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2709
2710 } # ac_fn_c_check_type
2711
2712 # ac_fn_c_check_func LINENO FUNC VAR
2713 # ----------------------------------
2714 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2715 ac_fn_c_check_func ()
2716 {
2717   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2718   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2719 $as_echo_n "checking for $2... " >&6; }
2720 if eval \${$3+:} false; then :
2721   $as_echo_n "(cached) " >&6
2722 else
2723   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2724 /* end confdefs.h.  */
2725 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2726    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2727 #define $2 innocuous_$2
2728
2729 /* System header to define __stub macros and hopefully few prototypes,
2730     which can conflict with char $2 (); below.
2731     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2732     <limits.h> exists even on freestanding compilers.  */
2733
2734 #ifdef __STDC__
2735 # include <limits.h>
2736 #else
2737 # include <assert.h>
2738 #endif
2739
2740 #undef $2
2741
2742 /* Override any GCC internal prototype to avoid an error.
2743    Use char because int might match the return type of a GCC
2744    builtin and then its argument prototype would still apply.  */
2745 #ifdef __cplusplus
2746 extern "C"
2747 #endif
2748 char $2 ();
2749 /* The GNU C library defines this for functions which it implements
2750     to always fail with ENOSYS.  Some functions are actually named
2751     something starting with __ and the normal name is an alias.  */
2752 #if defined __stub_$2 || defined __stub___$2
2753 choke me
2754 #endif
2755
2756 int
2757 main ()
2758 {
2759 return $2 ();
2760   ;
2761   return 0;
2762 }
2763 _ACEOF
2764 if ac_fn_c_try_link "$LINENO"; then :
2765   eval "$3=yes"
2766 else
2767   eval "$3=no"
2768 fi
2769 rm -f core conftest.err conftest.$ac_objext \
2770     conftest$ac_exeext conftest.$ac_ext
2771 fi
2772 eval ac_res=\$$3
2773                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2774 $as_echo "$ac_res" >&6; }
2775   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2776
2777 } # ac_fn_c_check_func
2778
2779 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2780 # ---------------------------------------------
2781 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2782 # accordingly.
2783 ac_fn_c_check_decl ()
2784 {
2785   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2786   as_decl_name=`echo $2|sed 's/ *(.*//'`
2787   as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2788   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2789 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2790 if eval \${$3+:} false; then :
2791   $as_echo_n "(cached) " >&6
2792 else
2793   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2794 /* end confdefs.h.  */
2795 $4
2796 int
2797 main ()
2798 {
2799 #ifndef $as_decl_name
2800 #ifdef __cplusplus
2801   (void) $as_decl_use;
2802 #else
2803   (void) $as_decl_name;
2804 #endif
2805 #endif
2806
2807   ;
2808   return 0;
2809 }
2810 _ACEOF
2811 if ac_fn_c_try_compile "$LINENO"; then :
2812   eval "$3=yes"
2813 else
2814   eval "$3=no"
2815 fi
2816 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2817 fi
2818 eval ac_res=\$$3
2819                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2820 $as_echo "$ac_res" >&6; }
2821   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2822
2823 } # ac_fn_c_check_decl
2824
2825 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2826 # --------------------------------------------
2827 # Tries to find the compile-time value of EXPR in a program that includes
2828 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2829 # computed
2830 ac_fn_c_compute_int ()
2831 {
2832   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2833   if test "$cross_compiling" = yes; then
2834     # Depending upon the size, compute the lo and hi bounds.
2835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2836 /* end confdefs.h.  */
2837 $4
2838 int
2839 main ()
2840 {
2841 static int test_array [1 - 2 * !(($2) >= 0)];
2842 test_array [0] = 0;
2843 return test_array [0];
2844
2845   ;
2846   return 0;
2847 }
2848 _ACEOF
2849 if ac_fn_c_try_compile "$LINENO"; then :
2850   ac_lo=0 ac_mid=0
2851   while :; do
2852     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2853 /* end confdefs.h.  */
2854 $4
2855 int
2856 main ()
2857 {
2858 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2859 test_array [0] = 0;
2860 return test_array [0];
2861
2862   ;
2863   return 0;
2864 }
2865 _ACEOF
2866 if ac_fn_c_try_compile "$LINENO"; then :
2867   ac_hi=$ac_mid; break
2868 else
2869   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2870                         if test $ac_lo -le $ac_mid; then
2871                           ac_lo= ac_hi=
2872                           break
2873                         fi
2874                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2875 fi
2876 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2877   done
2878 else
2879   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2880 /* end confdefs.h.  */
2881 $4
2882 int
2883 main ()
2884 {
2885 static int test_array [1 - 2 * !(($2) < 0)];
2886 test_array [0] = 0;
2887 return test_array [0];
2888
2889   ;
2890   return 0;
2891 }
2892 _ACEOF
2893 if ac_fn_c_try_compile "$LINENO"; then :
2894   ac_hi=-1 ac_mid=-1
2895   while :; do
2896     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2897 /* end confdefs.h.  */
2898 $4
2899 int
2900 main ()
2901 {
2902 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2903 test_array [0] = 0;
2904 return test_array [0];
2905
2906   ;
2907   return 0;
2908 }
2909 _ACEOF
2910 if ac_fn_c_try_compile "$LINENO"; then :
2911   ac_lo=$ac_mid; break
2912 else
2913   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2914                         if test $ac_mid -le $ac_hi; then
2915                           ac_lo= ac_hi=
2916                           break
2917                         fi
2918                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2919 fi
2920 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2921   done
2922 else
2923   ac_lo= ac_hi=
2924 fi
2925 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2926 fi
2927 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2928 # Binary search between lo and hi bounds.
2929 while test "x$ac_lo" != "x$ac_hi"; do
2930   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2931   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2932 /* end confdefs.h.  */
2933 $4
2934 int
2935 main ()
2936 {
2937 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2938 test_array [0] = 0;
2939 return test_array [0];
2940
2941   ;
2942   return 0;
2943 }
2944 _ACEOF
2945 if ac_fn_c_try_compile "$LINENO"; then :
2946   ac_hi=$ac_mid
2947 else
2948   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2949 fi
2950 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2951 done
2952 case $ac_lo in #((
2953 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2954 '') ac_retval=1 ;;
2955 esac
2956   else
2957     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2958 /* end confdefs.h.  */
2959 $4
2960 static long int longval () { return $2; }
2961 static unsigned long int ulongval () { return $2; }
2962 #include <stdio.h>
2963 #include <stdlib.h>
2964 int
2965 main ()
2966 {
2967
2968   FILE *f = fopen ("conftest.val", "w");
2969   if (! f)
2970     return 1;
2971   if (($2) < 0)
2972     {
2973       long int i = longval ();
2974       if (i != ($2))
2975         return 1;
2976       fprintf (f, "%ld", i);
2977     }
2978   else
2979     {
2980       unsigned long int i = ulongval ();
2981       if (i != ($2))
2982         return 1;
2983       fprintf (f, "%lu", i);
2984     }
2985   /* Do not output a trailing newline, as this causes \r\n confusion
2986      on some platforms.  */
2987   return ferror (f) || fclose (f) != 0;
2988
2989   ;
2990   return 0;
2991 }
2992 _ACEOF
2993 if ac_fn_c_try_run "$LINENO"; then :
2994   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2995 else
2996   ac_retval=1
2997 fi
2998 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2999   conftest.$ac_objext conftest.beam conftest.$ac_ext
3000 rm -f conftest.val
3001
3002   fi
3003   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3004   as_fn_set_status $ac_retval
3005
3006 } # ac_fn_c_compute_int
3007
3008 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
3009 # ----------------------------------------------------
3010 # Tries to find if the field MEMBER exists in type AGGR, after including
3011 # INCLUDES, setting cache variable VAR accordingly.
3012 ac_fn_c_check_member ()
3013 {
3014   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3015   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
3016 $as_echo_n "checking for $2.$3... " >&6; }
3017 if eval \${$4+:} false; then :
3018   $as_echo_n "(cached) " >&6
3019 else
3020   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3021 /* end confdefs.h.  */
3022 $5
3023 int
3024 main ()
3025 {
3026 static $2 ac_aggr;
3027 if (ac_aggr.$3)
3028 return 0;
3029   ;
3030   return 0;
3031 }
3032 _ACEOF
3033 if ac_fn_c_try_compile "$LINENO"; then :
3034   eval "$4=yes"
3035 else
3036   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3037 /* end confdefs.h.  */
3038 $5
3039 int
3040 main ()
3041 {
3042 static $2 ac_aggr;
3043 if (sizeof ac_aggr.$3)
3044 return 0;
3045   ;
3046   return 0;
3047 }
3048 _ACEOF
3049 if ac_fn_c_try_compile "$LINENO"; then :
3050   eval "$4=yes"
3051 else
3052   eval "$4=no"
3053 fi
3054 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3055 fi
3056 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3057 fi
3058 eval ac_res=\$$4
3059                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3060 $as_echo "$ac_res" >&6; }
3061   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3062
3063 } # ac_fn_c_check_member
3064 cat >config.log <<_ACEOF
3065 This file contains any messages produced by compilers while
3066 running configure, to aid debugging if configure makes a mistake.
3067
3068 It was created by GNU tar $as_me 1.28, which was
3069 generated by GNU Autoconf 2.69.  Invocation command line was
3070
3071   $ $0 $@
3072
3073 _ACEOF
3074 exec 5>>config.log
3075 {
3076 cat <<_ASUNAME
3077 ## --------- ##
3078 ## Platform. ##
3079 ## --------- ##
3080
3081 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3082 uname -m = `(uname -m) 2>/dev/null || echo unknown`
3083 uname -r = `(uname -r) 2>/dev/null || echo unknown`
3084 uname -s = `(uname -s) 2>/dev/null || echo unknown`
3085 uname -v = `(uname -v) 2>/dev/null || echo unknown`
3086
3087 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3088 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3089
3090 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3091 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3092 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3093 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3094 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3095 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3096 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3097
3098 _ASUNAME
3099
3100 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3101 for as_dir in $PATH
3102 do
3103   IFS=$as_save_IFS
3104   test -z "$as_dir" && as_dir=.
3105     $as_echo "PATH: $as_dir"
3106   done
3107 IFS=$as_save_IFS
3108
3109 } >&5
3110
3111 cat >&5 <<_ACEOF
3112
3113
3114 ## ----------- ##
3115 ## Core tests. ##
3116 ## ----------- ##
3117
3118 _ACEOF
3119
3120
3121 # Keep a trace of the command line.
3122 # Strip out --no-create and --no-recursion so they do not pile up.
3123 # Strip out --silent because we don't want to record it for future runs.
3124 # Also quote any args containing shell meta-characters.
3125 # Make two passes to allow for proper duplicate-argument suppression.
3126 ac_configure_args=
3127 ac_configure_args0=
3128 ac_configure_args1=
3129 ac_must_keep_next=false
3130 for ac_pass in 1 2
3131 do
3132   for ac_arg
3133   do
3134     case $ac_arg in
3135     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3136     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3137     | -silent | --silent | --silen | --sile | --sil)
3138       continue ;;
3139     *\'*)
3140       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3141     esac
3142     case $ac_pass in
3143     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3144     2)
3145       as_fn_append ac_configure_args1 " '$ac_arg'"
3146       if test $ac_must_keep_next = true; then
3147         ac_must_keep_next=false # Got value, back to normal.
3148       else
3149         case $ac_arg in
3150           *=* | --config-cache | -C | -disable-* | --disable-* \
3151           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3152           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3153           | -with-* | --with-* | -without-* | --without-* | --x)
3154             case "$ac_configure_args0 " in
3155               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3156             esac
3157             ;;
3158           -* ) ac_must_keep_next=true ;;
3159         esac
3160       fi
3161       as_fn_append ac_configure_args " '$ac_arg'"
3162       ;;
3163     esac
3164   done
3165 done
3166 { ac_configure_args0=; unset ac_configure_args0;}
3167 { ac_configure_args1=; unset ac_configure_args1;}
3168
3169 # When interrupted or exit'd, cleanup temporary files, and complete
3170 # config.log.  We remove comments because anyway the quotes in there
3171 # would cause problems or look ugly.
3172 # WARNING: Use '\'' to represent an apostrophe within the trap.
3173 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3174 trap 'exit_status=$?
3175   # Save into config.log some information that might help in debugging.
3176   {
3177     echo
3178
3179     $as_echo "## ---------------- ##
3180 ## Cache variables. ##
3181 ## ---------------- ##"
3182     echo
3183     # The following way of writing the cache mishandles newlines in values,
3184 (
3185   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3186     eval ac_val=\$$ac_var
3187     case $ac_val in #(
3188     *${as_nl}*)
3189       case $ac_var in #(
3190       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3191 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3192       esac
3193       case $ac_var in #(
3194       _ | IFS | as_nl) ;; #(
3195       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3196       *) { eval $ac_var=; unset $ac_var;} ;;
3197       esac ;;
3198     esac
3199   done
3200   (set) 2>&1 |
3201     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3202     *${as_nl}ac_space=\ *)
3203       sed -n \
3204         "s/'\''/'\''\\\\'\'''\''/g;
3205           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3206       ;; #(
3207     *)
3208       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3209       ;;
3210     esac |
3211     sort
3212 )
3213     echo
3214
3215     $as_echo "## ----------------- ##
3216 ## Output variables. ##
3217 ## ----------------- ##"
3218     echo
3219     for ac_var in $ac_subst_vars
3220     do
3221       eval ac_val=\$$ac_var
3222       case $ac_val in
3223       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3224       esac
3225       $as_echo "$ac_var='\''$ac_val'\''"
3226     done | sort
3227     echo
3228
3229     if test -n "$ac_subst_files"; then
3230       $as_echo "## ------------------- ##
3231 ## File substitutions. ##
3232 ## ------------------- ##"
3233       echo
3234       for ac_var in $ac_subst_files
3235       do
3236         eval ac_val=\$$ac_var
3237         case $ac_val in
3238         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3239         esac
3240         $as_echo "$ac_var='\''$ac_val'\''"
3241       done | sort
3242       echo
3243     fi
3244
3245     if test -s confdefs.h; then
3246       $as_echo "## ----------- ##
3247 ## confdefs.h. ##
3248 ## ----------- ##"
3249       echo
3250       cat confdefs.h
3251       echo
3252     fi
3253     test "$ac_signal" != 0 &&
3254       $as_echo "$as_me: caught signal $ac_signal"
3255     $as_echo "$as_me: exit $exit_status"
3256   } >&5
3257   rm -f core *.core core.conftest.* &&
3258     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3259     exit $exit_status
3260 ' 0
3261 for ac_signal in 1 2 13 15; do
3262   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3263 done
3264 ac_signal=0
3265
3266 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3267 rm -f -r conftest* confdefs.h
3268
3269 $as_echo "/* confdefs.h */" > confdefs.h
3270
3271 # Predefined preprocessor variables.
3272
3273 cat >>confdefs.h <<_ACEOF
3274 #define PACKAGE_NAME "$PACKAGE_NAME"
3275 _ACEOF
3276
3277 cat >>confdefs.h <<_ACEOF
3278 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3279 _ACEOF
3280
3281 cat >>confdefs.h <<_ACEOF
3282 #define PACKAGE_VERSION "$PACKAGE_VERSION"
3283 _ACEOF
3284
3285 cat >>confdefs.h <<_ACEOF
3286 #define PACKAGE_STRING "$PACKAGE_STRING"
3287 _ACEOF
3288
3289 cat >>confdefs.h <<_ACEOF
3290 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3291 _ACEOF
3292
3293 cat >>confdefs.h <<_ACEOF
3294 #define PACKAGE_URL "$PACKAGE_URL"
3295 _ACEOF
3296
3297
3298 # Let the site file select an alternate cache file if it wants to.
3299 # Prefer an explicitly selected file to automatically selected ones.
3300 ac_site_file1=NONE
3301 ac_site_file2=NONE
3302 if test -n "$CONFIG_SITE"; then
3303   # We do not want a PATH search for config.site.
3304   case $CONFIG_SITE in #((
3305     -*)  ac_site_file1=./$CONFIG_SITE;;
3306     */*) ac_site_file1=$CONFIG_SITE;;
3307     *)   ac_site_file1=./$CONFIG_SITE;;
3308   esac
3309 elif test "x$prefix" != xNONE; then
3310   ac_site_file1=$prefix/share/config.site
3311   ac_site_file2=$prefix/etc/config.site
3312 else
3313   ac_site_file1=$ac_default_prefix/share/config.site
3314   ac_site_file2=$ac_default_prefix/etc/config.site
3315 fi
3316 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3317 do
3318   test "x$ac_site_file" = xNONE && continue
3319   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3320     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3321 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
3322     sed 's/^/| /' "$ac_site_file" >&5
3323     . "$ac_site_file" \
3324       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3325 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3326 as_fn_error $? "failed to load site script $ac_site_file
3327 See \`config.log' for more details" "$LINENO" 5; }
3328   fi
3329 done
3330
3331 if test -r "$cache_file"; then
3332   # Some versions of bash will fail to source /dev/null (special files
3333   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3334   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3335     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3336 $as_echo "$as_me: loading cache $cache_file" >&6;}
3337     case $cache_file in
3338       [\\/]* | ?:[\\/]* ) . "$cache_file";;
3339       *)                      . "./$cache_file";;
3340     esac
3341   fi
3342 else
3343   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3344 $as_echo "$as_me: creating cache $cache_file" >&6;}
3345   >$cache_file
3346 fi
3347
3348 as_fn_append ac_header_list " fcntl.h"
3349 as_fn_append ac_header_list " linux/fd.h"
3350 as_fn_append ac_header_list " memory.h"
3351 as_fn_append ac_header_list " net/errno.h"
3352 as_fn_append ac_header_list " sgtty.h"
3353 as_fn_append ac_header_list " string.h"
3354 as_fn_append ac_header_list " sys/param.h"
3355 as_fn_append ac_header_list " sys/device.h"
3356 as_fn_append ac_header_list " sys/gentape.h"
3357 as_fn_append ac_header_list " sys/inet.h"
3358 as_fn_append ac_header_list " sys/io/trioctl.h"
3359 as_fn_append ac_header_list " sys/mtio.h"
3360 as_fn_append ac_header_list " sys/time.h"
3361 as_fn_append ac_header_list " sys/tprintf.h"
3362 as_fn_append ac_header_list " sys/tape.h"
3363 as_fn_append ac_header_list " unistd.h"
3364 as_fn_append ac_header_list " locale.h"
3365 as_fn_append ac_func_list " flockfile"
3366 as_fn_append ac_func_list " funlockfile"
3367 as_fn_append ac_header_list " features.h"
3368 as_fn_append ac_header_list " linewrap.h"
3369 as_fn_append ac_func_list " pathconf"
3370 as_fn_append ac_func_list " btowc"
3371 as_fn_append ac_func_list " canonicalize_file_name"
3372 as_fn_append ac_func_list " getcwd"
3373 as_fn_append ac_func_list " readlink"
3374 as_fn_append ac_func_list " realpath"
3375 as_fn_append ac_func_list " readlinkat"
3376 as_fn_append ac_func_list " chown"
3377 as_fn_append ac_func_list " fchown"
3378 as_fn_append ac_func_list " _set_invalid_parameter_handler"
3379 as_fn_append ac_header_list " sys/socket.h"
3380 as_fn_append ac_func_list " fchdir"
3381 as_fn_append ac_header_list " dirent.h"
3382 as_fn_append ac_func_list " fdopendir"
3383 as_fn_append ac_func_list " faccessat"
3384 as_fn_append ac_func_list " fchmodat"
3385 as_fn_append ac_func_list " lchmod"
3386 as_fn_append ac_func_list " fcntl"
3387 as_fn_append ac_func_list " symlink"
3388 as_fn_append ac_func_list " mempcpy"
3389 as_fn_append ac_func_list " isblank"
3390 as_fn_append ac_func_list " iswctype"
3391 as_fn_append ac_func_list " mbsrtowcs"
3392 as_fn_append ac_func_list " wmemchr"
3393 as_fn_append ac_func_list " wmemcpy"
3394 as_fn_append ac_func_list " wmempcpy"
3395 as_fn_append ac_header_list " wctype.h"
3396 gl_fnmatch_required=GNU
3397 as_fn_append ac_header_list " stdio_ext.h"
3398 as_fn_append ac_header_list " sys/stat.h"
3399 as_fn_append ac_func_list " fstatat"
3400 as_fn_append ac_func_list " futimens"
3401 as_fn_append ac_func_list " getdelim"
3402 as_fn_append ac_func_list " getdtablesize"
3403 gl_getopt_required=GNU
3404 as_fn_append ac_header_list " getopt.h"
3405 as_fn_append ac_func_list " gettimeofday"
3406 as_fn_append ac_func_list " nanotime"
3407 as_fn_append ac_header_list " wchar.h"
3408 as_fn_append ac_header_list " stdint.h"
3409 as_fn_append ac_header_list " inttypes.h"
3410 as_fn_append ac_func_list " iswcntrl"
3411 as_fn_append ac_func_list " iswblank"
3412 as_fn_append ac_header_list " langinfo.h"
3413 as_fn_append ac_func_list " link"
3414 as_fn_append ac_func_list " openat"
3415 as_fn_append ac_func_list " linkat"
3416 as_fn_append ac_header_list " xlocale.h"
3417 as_fn_append ac_func_list " lstat"
3418 as_fn_append ac_func_list " mbsinit"
3419 as_fn_append ac_func_list " mbrtowc"
3420 as_fn_append ac_header_list " sys/mman.h"
3421 as_fn_append ac_func_list " mprotect"
3422 as_fn_append ac_func_list " mkdirat"
3423 as_fn_append ac_func_list " mkfifo"
3424 as_fn_append ac_func_list " mkfifoat"
3425 as_fn_append ac_func_list " mknodat"
3426 as_fn_append ac_func_list " mknod"
3427 as_fn_append ac_func_list " nl_langinfo"
3428 as_fn_append ac_func_list " posix_openpt"
3429 as_fn_append ac_header_list " priv.h"
3430 as_fn_append ac_func_list " ptsname_r"
3431 as_fn_append ac_func_list " fchmod"
3432 as_fn_append ac_header_list " malloc.h"
3433 as_fn_append ac_func_list " renameat"
3434 as_fn_append ac_func_list " secure_getenv"
3435 as_fn_append ac_header_list " selinux/selinux.h"
3436 as_fn_append ac_func_list " setenv"
3437 as_fn_append ac_func_list " sleep"
3438 as_fn_append ac_func_list " snprintf"
3439 as_fn_append ac_func_list " strdup"
3440 as_fn_append ac_func_list " tzset"
3441 as_fn_append ac_header_list " strings.h"
3442 as_fn_append ac_func_list " strndup"
3443 as_fn_append ac_func_list " strtoimax"
3444 as_fn_append ac_func_list " strtoumax"
3445 as_fn_append ac_func_list " symlinkat"
3446 as_fn_append ac_header_list " sysexits.h"
3447 as_fn_append ac_func_list " localtime_r"
3448 as_fn_append ac_func_list " pipe"
3449 as_fn_append ac_func_list " unlinkat"
3450 as_fn_append ac_header_list " utime.h"
3451 as_fn_append ac_func_list " futimes"
3452 as_fn_append ac_func_list " futimesat"
3453 as_fn_append ac_func_list " utimensat"
3454 as_fn_append ac_func_list " lutimes"
3455 as_fn_append ac_func_list " vasnprintf"
3456 as_fn_append ac_func_list " wcrtomb"
3457 as_fn_append ac_func_list " wcwidth"
3458 as_fn_append ac_header_list " netdb.h"
3459 as_fn_append ac_header_list " sys/wait.h"
3460 as_fn_append ac_header_list " pwd.h"
3461 as_fn_append ac_header_list " grp.h"
3462 as_fn_append ac_func_list " setlocale"
3463 as_fn_append ac_func_list " fsync"
3464 as_fn_append ac_func_list " grantpt"
3465 gt_needs="$gt_needs need-formatstring-macros"
3466 # Check that the precious variables saved in the cache have kept the same
3467 # value.
3468 ac_cache_corrupted=false
3469 for ac_var in $ac_precious_vars; do
3470   eval ac_old_set=\$ac_cv_env_${ac_var}_set
3471   eval ac_new_set=\$ac_env_${ac_var}_set
3472   eval ac_old_val=\$ac_cv_env_${ac_var}_value
3473   eval ac_new_val=\$ac_env_${ac_var}_value
3474   case $ac_old_set,$ac_new_set in
3475     set,)
3476       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3477 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3478       ac_cache_corrupted=: ;;
3479     ,set)
3480       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3481 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3482       ac_cache_corrupted=: ;;
3483     ,);;
3484     *)
3485       if test "x$ac_old_val" != "x$ac_new_val"; then
3486         # differences in whitespace do not lead to failure.
3487         ac_old_val_w=`echo x $ac_old_val`
3488         ac_new_val_w=`echo x $ac_new_val`
3489         if test "$ac_old_val_w" != "$ac_new_val_w"; then
3490           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3491 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3492           ac_cache_corrupted=:
3493         else
3494           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3495 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3496           eval $ac_var=\$ac_old_val
3497         fi
3498         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3499 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3500         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3501 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3502       fi;;
3503   esac
3504   # Pass precious variables to config.status.
3505   if test "$ac_new_set" = set; then
3506     case $ac_new_val in
3507     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3508     *) ac_arg=$ac_var=$ac_new_val ;;
3509     esac
3510     case " $ac_configure_args " in
3511       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3512       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3513     esac
3514   fi
3515 done
3516 if $ac_cache_corrupted; then
3517   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3518 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3519   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3520 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3521   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3522 fi
3523 ## -------------------- ##
3524 ## Main body of script. ##
3525 ## -------------------- ##
3526
3527 ac_ext=c
3528 ac_cpp='$CPP $CPPFLAGS'
3529 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3530 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3531 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3532
3533
3534
3535 ac_aux_dir=
3536 for ac_dir in build-aux "$srcdir"/build-aux; do
3537   if test -f "$ac_dir/install-sh"; then
3538     ac_aux_dir=$ac_dir
3539     ac_install_sh="$ac_aux_dir/install-sh -c"
3540     break
3541   elif test -f "$ac_dir/install.sh"; then
3542     ac_aux_dir=$ac_dir
3543     ac_install_sh="$ac_aux_dir/install.sh -c"
3544     break
3545   elif test -f "$ac_dir/shtool"; then
3546     ac_aux_dir=$ac_dir
3547     ac_install_sh="$ac_aux_dir/shtool install -c"
3548     break
3549   fi
3550 done
3551 if test -z "$ac_aux_dir"; then
3552   as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
3553 fi
3554
3555 # These three variables are undocumented and unsupported,
3556 # and are intended to be withdrawn in a future Autoconf release.
3557 # They can cause serious problems if a builder's source tree is in a directory
3558 # whose full name contains unusual characters.
3559 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3560 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3561 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3562
3563
3564 ac_config_headers="$ac_config_headers config.h"
3565
3566
3567 am__api_version='1.14'
3568
3569 # Find a good install program.  We prefer a C program (faster),
3570 # so one script is as good as another.  But avoid the broken or
3571 # incompatible versions:
3572 # SysV /etc/install, /usr/sbin/install
3573 # SunOS /usr/etc/install
3574 # IRIX /sbin/install
3575 # AIX /bin/install
3576 # AmigaOS /C/install, which installs bootblocks on floppy discs
3577 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3578 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3579 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3580 # OS/2's system install, which has a completely different semantic
3581 # ./install, which can be erroneously created by make from ./install.sh.
3582 # Reject install programs that cannot install multiple files.
3583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
3584 $as_echo_n "checking for a BSD-compatible install... " >&6; }
3585 if test -z "$INSTALL"; then
3586 if ${ac_cv_path_install+:} false; then :
3587   $as_echo_n "(cached) " >&6
3588 else
3589   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3590 for as_dir in $PATH
3591 do
3592   IFS=$as_save_IFS
3593   test -z "$as_dir" && as_dir=.
3594     # Account for people who put trailing slashes in PATH elements.
3595 case $as_dir/ in #((
3596   ./ | .// | /[cC]/* | \
3597   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3598   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
3599   /usr/ucb/* ) ;;
3600   *)
3601     # OSF1 and SCO ODT 3.0 have their own names for install.
3602     # Don't use installbsd from OSF since it installs stuff as root
3603     # by default.
3604     for ac_prog in ginstall scoinst install; do
3605       for ac_exec_ext in '' $ac_executable_extensions; do
3606         if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3607           if test $ac_prog = install &&
3608             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3609             # AIX install.  It has an incompatible calling convention.
3610             :
3611           elif test $ac_prog = install &&
3612             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3613             # program-specific install script used by HP pwplus--don't use.
3614             :
3615           else
3616             rm -rf conftest.one conftest.two conftest.dir
3617             echo one > conftest.one
3618             echo two > conftest.two
3619             mkdir conftest.dir
3620             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
3621               test -s conftest.one && test -s conftest.two &&
3622               test -s conftest.dir/conftest.one &&
3623               test -s conftest.dir/conftest.two
3624             then
3625               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3626               break 3
3627             fi
3628           fi
3629         fi
3630       done
3631     done
3632     ;;
3633 esac
3634
3635   done
3636 IFS=$as_save_IFS
3637
3638 rm -rf conftest.one conftest.two conftest.dir
3639
3640 fi
3641   if test "${ac_cv_path_install+set}" = set; then
3642     INSTALL=$ac_cv_path_install
3643   else
3644     # As a last resort, use the slow shell script.  Don't cache a
3645     # value for INSTALL within a source directory, because that will
3646     # break other packages using the cache if that directory is
3647     # removed, or if the value is a relative name.
3648     INSTALL=$ac_install_sh
3649   fi
3650 fi
3651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
3652 $as_echo "$INSTALL" >&6; }
3653
3654 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3655 # It thinks the first close brace ends the variable substitution.
3656 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3657
3658 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3659
3660 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3661
3662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
3663 $as_echo_n "checking whether build environment is sane... " >&6; }
3664 # Reject unsafe characters in $srcdir or the absolute working directory
3665 # name.  Accept space and tab only in the latter.
3666 am_lf='
3667 '
3668 case `pwd` in
3669   *[\\\"\#\$\&\'\`$am_lf]*)
3670     as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
3671 esac
3672 case $srcdir in
3673   *[\\\"\#\$\&\'\`$am_lf\ \     ]*)
3674     as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
3675 esac
3676
3677 # Do 'set' in a subshell so we don't clobber the current shell's
3678 # arguments.  Must try -L first in case configure is actually a
3679 # symlink; some systems play weird games with the mod time of symlinks
3680 # (eg FreeBSD returns the mod time of the symlink's containing
3681 # directory).
3682 if (
3683    am_has_slept=no
3684    for am_try in 1 2; do
3685      echo "timestamp, slept: $am_has_slept" > conftest.file
3686      set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
3687      if test "$*" = "X"; then
3688         # -L didn't work.
3689         set X `ls -t "$srcdir/configure" conftest.file`
3690      fi
3691      if test "$*" != "X $srcdir/configure conftest.file" \
3692         && test "$*" != "X conftest.file $srcdir/configure"; then
3693
3694         # If neither matched, then we have a broken ls.  This can happen
3695         # if, for instance, CONFIG_SHELL is bash and it inherits a
3696         # broken ls alias from the environment.  This has actually
3697         # happened.  Such a system could not be considered "sane".
3698         as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
3699   alias in your environment" "$LINENO" 5
3700      fi
3701      if test "$2" = conftest.file || test $am_try -eq 2; then
3702        break
3703      fi
3704      # Just in case.
3705      sleep 1
3706      am_has_slept=yes
3707    done
3708    test "$2" = conftest.file
3709    )
3710 then
3711    # Ok.
3712    :
3713 else
3714    as_fn_error $? "newly created file is older than distributed files!
3715 Check your system clock" "$LINENO" 5
3716 fi
3717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3718 $as_echo "yes" >&6; }
3719 # If we didn't sleep, we still need to ensure time stamps of config.status and
3720 # generated files are strictly newer.
3721 am_sleep_pid=
3722 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
3723   ( sleep 1 ) &
3724   am_sleep_pid=$!
3725 fi
3726
3727 rm -f conftest.file
3728
3729 test "$program_prefix" != NONE &&
3730   program_transform_name="s&^&$program_prefix&;$program_transform_name"
3731 # Use a double $ so make ignores it.
3732 test "$program_suffix" != NONE &&
3733   program_transform_name="s&\$&$program_suffix&;$program_transform_name"
3734 # Double any \ or $.
3735 # By default was `s,x,x', remove it if useless.
3736 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
3737 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
3738
3739 # expand $ac_aux_dir to an absolute path
3740 am_aux_dir=`cd $ac_aux_dir && pwd`
3741
3742 if test x"${MISSING+set}" != xset; then
3743   case $am_aux_dir in
3744   *\ * | *\     *)
3745     MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
3746   *)
3747     MISSING="\${SHELL} $am_aux_dir/missing" ;;
3748   esac
3749 fi
3750 # Use eval to expand $SHELL
3751 if eval "$MISSING --is-lightweight"; then
3752   am_missing_run="$MISSING "
3753 else
3754   am_missing_run=
3755   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
3756 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
3757 fi
3758
3759 if test x"${install_sh}" != xset; then
3760   case $am_aux_dir in
3761   *\ * | *\     *)
3762     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
3763   *)
3764     install_sh="\${SHELL} $am_aux_dir/install-sh"
3765   esac
3766 fi
3767
3768 # Installed binaries are usually stripped using 'strip' when the user
3769 # run "make install-strip".  However 'strip' might not be the right
3770 # tool to use in cross-compilation environments, therefore Automake
3771 # will honor the 'STRIP' environment variable to overrule this program.
3772 if test "$cross_compiling" != no; then
3773   if test -n "$ac_tool_prefix"; then
3774   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
3775 set dummy ${ac_tool_prefix}strip; ac_word=$2
3776 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3777 $as_echo_n "checking for $ac_word... " >&6; }
3778 if ${ac_cv_prog_STRIP+:} false; then :
3779   $as_echo_n "(cached) " >&6
3780 else
3781   if test -n "$STRIP"; then
3782   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
3783 else
3784 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3785 for as_dir in $PATH
3786 do
3787   IFS=$as_save_IFS
3788   test -z "$as_dir" && as_dir=.
3789     for ac_exec_ext in '' $ac_executable_extensions; do
3790   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3791     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
3792     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3793     break 2
3794   fi
3795 done
3796   done
3797 IFS=$as_save_IFS
3798
3799 fi
3800 fi
3801 STRIP=$ac_cv_prog_STRIP
3802 if test -n "$STRIP"; then
3803   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
3804 $as_echo "$STRIP" >&6; }
3805 else
3806   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3807 $as_echo "no" >&6; }
3808 fi
3809
3810
3811 fi
3812 if test -z "$ac_cv_prog_STRIP"; then
3813   ac_ct_STRIP=$STRIP
3814   # Extract the first word of "strip", so it can be a program name with args.
3815 set dummy strip; ac_word=$2
3816 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3817 $as_echo_n "checking for $ac_word... " >&6; }
3818 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
3819   $as_echo_n "(cached) " >&6
3820 else
3821   if test -n "$ac_ct_STRIP"; then
3822   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
3823 else
3824 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3825 for as_dir in $PATH
3826 do
3827   IFS=$as_save_IFS
3828   test -z "$as_dir" && as_dir=.
3829     for ac_exec_ext in '' $ac_executable_extensions; do
3830   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3831     ac_cv_prog_ac_ct_STRIP="strip"
3832     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3833     break 2
3834   fi
3835 done
3836   done
3837 IFS=$as_save_IFS
3838
3839 fi
3840 fi
3841 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
3842 if test -n "$ac_ct_STRIP"; then
3843   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
3844 $as_echo "$ac_ct_STRIP" >&6; }
3845 else
3846   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3847 $as_echo "no" >&6; }
3848 fi
3849
3850   if test "x$ac_ct_STRIP" = x; then
3851     STRIP=":"
3852   else
3853     case $cross_compiling:$ac_tool_warned in
3854 yes:)
3855 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3856 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3857 ac_tool_warned=yes ;;
3858 esac
3859     STRIP=$ac_ct_STRIP
3860   fi
3861 else
3862   STRIP="$ac_cv_prog_STRIP"
3863 fi
3864
3865 fi
3866 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
3867
3868 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
3869 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
3870 if test -z "$MKDIR_P"; then
3871   if ${ac_cv_path_mkdir+:} false; then :
3872   $as_echo_n "(cached) " >&6
3873 else
3874   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3875 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
3876 do
3877   IFS=$as_save_IFS
3878   test -z "$as_dir" && as_dir=.
3879     for ac_prog in mkdir gmkdir; do
3880          for ac_exec_ext in '' $ac_executable_extensions; do
3881            as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
3882            case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
3883              'mkdir (GNU coreutils) '* | \
3884              'mkdir (coreutils) '* | \
3885              'mkdir (fileutils) '4.1*)
3886                ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
3887                break 3;;
3888            esac
3889          done
3890        done
3891   done
3892 IFS=$as_save_IFS
3893
3894 fi
3895
3896   test -d ./--version && rmdir ./--version
3897   if test "${ac_cv_path_mkdir+set}" = set; then
3898     MKDIR_P="$ac_cv_path_mkdir -p"
3899   else
3900     # As a last resort, use the slow shell script.  Don't cache a
3901     # value for MKDIR_P within a source directory, because that will
3902     # break other packages using the cache if that directory is
3903     # removed, or if the value is a relative name.
3904     MKDIR_P="$ac_install_sh -d"
3905   fi
3906 fi
3907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
3908 $as_echo "$MKDIR_P" >&6; }
3909
3910 for ac_prog in gawk mawk nawk awk
3911 do
3912   # Extract the first word of "$ac_prog", so it can be a program name with args.
3913 set dummy $ac_prog; ac_word=$2
3914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3915 $as_echo_n "checking for $ac_word... " >&6; }
3916 if ${ac_cv_prog_AWK+:} false; then :
3917   $as_echo_n "(cached) " >&6
3918 else
3919   if test -n "$AWK"; then
3920   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3921 else
3922 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3923 for as_dir in $PATH
3924 do
3925   IFS=$as_save_IFS
3926   test -z "$as_dir" && as_dir=.
3927     for ac_exec_ext in '' $ac_executable_extensions; do
3928   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3929     ac_cv_prog_AWK="$ac_prog"
3930     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3931     break 2
3932   fi
3933 done
3934   done
3935 IFS=$as_save_IFS
3936
3937 fi
3938 fi
3939 AWK=$ac_cv_prog_AWK
3940 if test -n "$AWK"; then
3941   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
3942 $as_echo "$AWK" >&6; }
3943 else
3944   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3945 $as_echo "no" >&6; }
3946 fi
3947
3948
3949   test -n "$AWK" && break
3950 done
3951
3952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3953 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
3954 set x ${MAKE-make}
3955 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3956 if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
3957   $as_echo_n "(cached) " >&6
3958 else
3959   cat >conftest.make <<\_ACEOF
3960 SHELL = /bin/sh
3961 all:
3962         @echo '@@@%%%=$(MAKE)=@@@%%%'
3963 _ACEOF
3964 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
3965 case `${MAKE-make} -f conftest.make 2>/dev/null` in
3966   *@@@%%%=?*=@@@%%%*)
3967     eval ac_cv_prog_make_${ac_make}_set=yes;;
3968   *)
3969     eval ac_cv_prog_make_${ac_make}_set=no;;
3970 esac
3971 rm -f conftest.make
3972 fi
3973 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3974   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3975 $as_echo "yes" >&6; }
3976   SET_MAKE=
3977 else
3978   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3979 $as_echo "no" >&6; }
3980   SET_MAKE="MAKE=${MAKE-make}"
3981 fi
3982
3983 rm -rf .tst 2>/dev/null
3984 mkdir .tst 2>/dev/null
3985 if test -d .tst; then
3986   am__leading_dot=.
3987 else
3988   am__leading_dot=_
3989 fi
3990 rmdir .tst 2>/dev/null
3991
3992 # Check whether --enable-silent-rules was given.
3993 if test "${enable_silent_rules+set}" = set; then :
3994   enableval=$enable_silent_rules;
3995 fi
3996
3997 case $enable_silent_rules in # (((
3998   yes) AM_DEFAULT_VERBOSITY=0;;
3999    no) AM_DEFAULT_VERBOSITY=1;;
4000     *) AM_DEFAULT_VERBOSITY=1;;
4001 esac
4002 am_make=${MAKE-make}
4003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
4004 $as_echo_n "checking whether $am_make supports nested variables... " >&6; }
4005 if ${am_cv_make_support_nested_variables+:} false; then :
4006   $as_echo_n "(cached) " >&6
4007 else
4008   if $as_echo 'TRUE=$(BAR$(V))
4009 BAR0=false
4010 BAR1=true
4011 V=1
4012 am__doit:
4013         @$(TRUE)
4014 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
4015   am_cv_make_support_nested_variables=yes
4016 else
4017   am_cv_make_support_nested_variables=no
4018 fi
4019 fi
4020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
4021 $as_echo "$am_cv_make_support_nested_variables" >&6; }
4022 if test $am_cv_make_support_nested_variables = yes; then
4023     AM_V='$(V)'
4024   AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
4025 else
4026   AM_V=$AM_DEFAULT_VERBOSITY
4027   AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
4028 fi
4029 AM_BACKSLASH='\'
4030
4031 if test "`cd $srcdir && pwd`" != "`pwd`"; then
4032   # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
4033   # is not polluted with repeated "-I."
4034   am__isrc=' -I$(srcdir)'
4035   # test to see if srcdir already configured
4036   if test -f $srcdir/config.status; then
4037     as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
4038   fi
4039 fi
4040
4041 # test whether we have cygpath
4042 if test -z "$CYGPATH_W"; then
4043   if (cygpath --version) >/dev/null 2>/dev/null; then
4044     CYGPATH_W='cygpath -w'
4045   else
4046     CYGPATH_W=echo
4047   fi
4048 fi
4049
4050
4051 # Define the identity of the package.
4052  PACKAGE='tar'
4053  VERSION='1.28'
4054
4055
4056 cat >>confdefs.h <<_ACEOF
4057 #define PACKAGE "$PACKAGE"
4058 _ACEOF
4059
4060
4061 cat >>confdefs.h <<_ACEOF
4062 #define VERSION "$VERSION"
4063 _ACEOF
4064
4065 # Some tools Automake needs.
4066
4067 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
4068
4069
4070 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
4071
4072
4073 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
4074
4075
4076 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
4077
4078
4079 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
4080
4081 # For better backward compatibility.  To be removed once Automake 1.9.x
4082 # dies out for good.  For more background, see:
4083 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
4084 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
4085 mkdir_p='$(MKDIR_P)'
4086
4087 # We need awk for the "check" target.  The system "awk" is bad on
4088 # some platforms.
4089 # Always define AMTAR for backward compatibility.  Yes, it's still used
4090 # in the wild :-(  We should find a proper way to deprecate it ...
4091 AMTAR='$${TAR-tar}'
4092
4093
4094 # We'll loop over all known methods to create a tar archive until one works.
4095 _am_tools='gnutar plaintar pax cpio none'
4096
4097 # The POSIX 1988 'ustar' format is defined with fixed-size fields.
4098       # There is notably a 21 bits limit for the UID and the GID.  In fact,
4099       # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
4100       # and bug#13588).
4101       am_max_uid=2097151 # 2^21 - 1
4102       am_max_gid=$am_max_uid
4103       # The $UID and $GID variables are not portable, so we need to resort
4104       # to the POSIX-mandated id(1) utility.  Errors in the 'id' calls
4105       # below are definitely unexpected, so allow the users to see them
4106       # (that is, avoid stderr redirection).
4107       am_uid=`id -u || echo unknown`
4108       am_gid=`id -g || echo unknown`
4109       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UID '$am_uid' is supported by ustar format" >&5
4110 $as_echo_n "checking whether UID '$am_uid' is supported by ustar format... " >&6; }
4111       if test $am_uid -le $am_max_uid; then
4112          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4113 $as_echo "yes" >&6; }
4114       else
4115          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4116 $as_echo "no" >&6; }
4117          _am_tools=none
4118       fi
4119       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether GID '$am_gid' is supported by ustar format" >&5
4120 $as_echo_n "checking whether GID '$am_gid' is supported by ustar format... " >&6; }
4121       if test $am_gid -le $am_max_gid; then
4122          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4123 $as_echo "yes" >&6; }
4124       else
4125         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4126 $as_echo "no" >&6; }
4127         _am_tools=none
4128       fi
4129
4130   { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create a ustar tar archive" >&5
4131 $as_echo_n "checking how to create a ustar tar archive... " >&6; }
4132
4133   # Go ahead even if we have the value already cached.  We do so because we
4134   # need to set the values for the 'am__tar' and 'am__untar' variables.
4135   _am_tools=${am_cv_prog_tar_ustar-$_am_tools}
4136
4137   for _am_tool in $_am_tools; do
4138     case $_am_tool in
4139     gnutar)
4140       for _am_tar in tar gnutar gtar; do
4141         { echo "$as_me:$LINENO: $_am_tar --version" >&5
4142    ($_am_tar --version) >&5 2>&5
4143    ac_status=$?
4144    echo "$as_me:$LINENO: \$? = $ac_status" >&5
4145    (exit $ac_status); } && break
4146       done
4147       am__tar="$_am_tar --format=ustar -chf - "'"$$tardir"'
4148       am__tar_="$_am_tar --format=ustar -chf - "'"$tardir"'
4149       am__untar="$_am_tar -xf -"
4150       ;;
4151     plaintar)
4152       # Must skip GNU tar: if it does not support --format= it doesn't create
4153       # ustar tarball either.
4154       (tar --version) >/dev/null 2>&1 && continue
4155       am__tar='tar chf - "$$tardir"'
4156       am__tar_='tar chf - "$tardir"'
4157       am__untar='tar xf -'
4158       ;;
4159     pax)
4160       am__tar='pax -L -x ustar -w "$$tardir"'
4161       am__tar_='pax -L -x ustar -w "$tardir"'
4162       am__untar='pax -r'
4163       ;;
4164     cpio)
4165       am__tar='find "$$tardir" -print | cpio -o -H ustar -L'
4166       am__tar_='find "$tardir" -print | cpio -o -H ustar -L'
4167       am__untar='cpio -i -H ustar -d'
4168       ;;
4169     none)
4170       am__tar=false
4171       am__tar_=false
4172       am__untar=false
4173       ;;
4174     esac
4175
4176     # If the value was cached, stop now.  We just wanted to have am__tar
4177     # and am__untar set.
4178     test -n "${am_cv_prog_tar_ustar}" && break
4179
4180     # tar/untar a dummy directory, and stop if the command works.
4181     rm -rf conftest.dir
4182     mkdir conftest.dir
4183     echo GrepMe > conftest.dir/file
4184     { echo "$as_me:$LINENO: tardir=conftest.dir && eval $am__tar_ >conftest.tar" >&5
4185    (tardir=conftest.dir && eval $am__tar_ >conftest.tar) >&5 2>&5
4186    ac_status=$?
4187    echo "$as_me:$LINENO: \$? = $ac_status" >&5
4188    (exit $ac_status); }
4189     rm -rf conftest.dir
4190     if test -s conftest.tar; then
4191       { echo "$as_me:$LINENO: $am__untar <conftest.tar" >&5
4192    ($am__untar <conftest.tar) >&5 2>&5
4193    ac_status=$?
4194    echo "$as_me:$LINENO: \$? = $ac_status" >&5
4195    (exit $ac_status); }
4196       { echo "$as_me:$LINENO: cat conftest.dir/file" >&5
4197    (cat conftest.dir/file) >&5 2>&5
4198    ac_status=$?
4199    echo "$as_me:$LINENO: \$? = $ac_status" >&5
4200    (exit $ac_status); }
4201       grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
4202     fi
4203   done
4204   rm -rf conftest.dir
4205
4206   if ${am_cv_prog_tar_ustar+:} false; then :
4207   $as_echo_n "(cached) " >&6
4208 else
4209   am_cv_prog_tar_ustar=$_am_tool
4210 fi
4211
4212   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_ustar" >&5
4213 $as_echo "$am_cv_prog_tar_ustar" >&6; }
4214
4215
4216
4217
4218
4219
4220 # POSIX will say in a future version that running "rm -f" with no argument
4221 # is OK; and we want to be able to make that assumption in our Makefile
4222 # recipes.  So use an aggressive probe to check that the usage we want is
4223 # actually supported "in the wild" to an acceptable degree.
4224 # See automake bug#10828.
4225 # To make any issue more visible, cause the running configure to be aborted
4226 # by default if the 'rm' program in use doesn't match our expectations; the
4227 # user can still override this though.
4228 if rm -f && rm -fr && rm -rf; then : OK; else
4229   cat >&2 <<'END'
4230 Oops!
4231
4232 Your 'rm' program seems unable to run without file operands specified
4233 on the command line, even when the '-f' option is present.  This is contrary
4234 to the behaviour of most rm programs out there, and not conforming with
4235 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
4236
4237 Please tell bug-automake@gnu.org about your system, including the value
4238 of your $PATH and any error possibly output before this message.  This
4239 can help us improve future automake versions.
4240
4241 END
4242   if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
4243     echo 'Configuration will proceed anyway, since you have set the' >&2
4244     echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
4245     echo >&2
4246   else
4247     cat >&2 <<'END'
4248 Aborting the configuration process, to ensure you take notice of the issue.
4249
4250 You can download and install GNU coreutils to get an 'rm' implementation
4251 that behaves properly: <http://www.gnu.org/software/coreutils/>.
4252
4253 If you want to complete the configuration process using your problematic
4254 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
4255 to "yes", and re-run configure.
4256
4257 END
4258     as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
4259   fi
4260 fi
4261
4262 # Enable silent rules by default:
4263 # Check whether --enable-silent-rules was given.
4264 if test "${enable_silent_rules+set}" = set; then :
4265   enableval=$enable_silent_rules;
4266 fi
4267
4268 case $enable_silent_rules in # (((
4269   yes) AM_DEFAULT_VERBOSITY=0;;
4270    no) AM_DEFAULT_VERBOSITY=1;;
4271     *) AM_DEFAULT_VERBOSITY=0;;
4272 esac
4273 am_make=${MAKE-make}
4274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
4275 $as_echo_n "checking whether $am_make supports nested variables... " >&6; }
4276 if ${am_cv_make_support_nested_variables+:} false; then :
4277   $as_echo_n "(cached) " >&6
4278 else
4279   if $as_echo 'TRUE=$(BAR$(V))
4280 BAR0=false
4281 BAR1=true
4282 V=1
4283 am__doit:
4284         @$(TRUE)
4285 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
4286   am_cv_make_support_nested_variables=yes
4287 else
4288   am_cv_make_support_nested_variables=no
4289 fi
4290 fi
4291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
4292 $as_echo "$am_cv_make_support_nested_variables" >&6; }
4293 if test $am_cv_make_support_nested_variables = yes; then
4294     AM_V='$(V)'
4295   AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
4296 else
4297   AM_V=$AM_DEFAULT_VERBOSITY
4298   AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
4299 fi
4300 AM_BACKSLASH='\'
4301
4302
4303 DEPDIR="${am__leading_dot}deps"
4304
4305 ac_config_commands="$ac_config_commands depfiles"
4306
4307
4308 am_make=${MAKE-make}
4309 cat > confinc << 'END'
4310 am__doit:
4311         @echo this is the am__doit target
4312 .PHONY: am__doit
4313 END
4314 # If we don't find an include directive, just comment out the code.
4315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
4316 $as_echo_n "checking for style of include used by $am_make... " >&6; }
4317 am__include="#"
4318 am__quote=
4319 _am_result=none
4320 # First try GNU make style include.
4321 echo "include confinc" > confmf
4322 # Ignore all kinds of additional output from 'make'.
4323 case `$am_make -s -f confmf 2> /dev/null` in #(
4324 *the\ am__doit\ target*)
4325   am__include=include
4326   am__quote=
4327   _am_result=GNU
4328   ;;
4329 esac
4330 # Now try BSD make style include.
4331 if test "$am__include" = "#"; then
4332    echo '.include "confinc"' > confmf
4333    case `$am_make -s -f confmf 2> /dev/null` in #(
4334    *the\ am__doit\ target*)
4335      am__include=.include
4336      am__quote="\""
4337      _am_result=BSD
4338      ;;
4339    esac
4340 fi
4341
4342
4343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
4344 $as_echo "$_am_result" >&6; }
4345 rm -f confinc confmf
4346
4347 # Check whether --enable-dependency-tracking was given.
4348 if test "${enable_dependency_tracking+set}" = set; then :
4349   enableval=$enable_dependency_tracking;
4350 fi
4351
4352 if test "x$enable_dependency_tracking" != xno; then
4353   am_depcomp="$ac_aux_dir/depcomp"
4354   AMDEPBACKSLASH='\'
4355   am__nodep='_no'
4356 fi
4357  if test "x$enable_dependency_tracking" != xno; then
4358   AMDEP_TRUE=
4359   AMDEP_FALSE='#'
4360 else
4361   AMDEP_TRUE='#'
4362   AMDEP_FALSE=
4363 fi
4364
4365
4366 ac_ext=c
4367 ac_cpp='$CPP $CPPFLAGS'
4368 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4369 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4370 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4371 if test -n "$ac_tool_prefix"; then
4372   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4373 set dummy ${ac_tool_prefix}gcc; ac_word=$2
4374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4375 $as_echo_n "checking for $ac_word... " >&6; }
4376 if ${ac_cv_prog_CC+:} false; then :
4377   $as_echo_n "(cached) " >&6
4378 else
4379   if test -n "$CC"; then
4380   ac_cv_prog_CC="$CC" # Let the user override the test.
4381 else
4382 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4383 for as_dir in $PATH
4384 do
4385   IFS=$as_save_IFS
4386   test -z "$as_dir" && as_dir=.
4387     for ac_exec_ext in '' $ac_executable_extensions; do
4388   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4389     ac_cv_prog_CC="${ac_tool_prefix}gcc"
4390     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4391     break 2
4392   fi
4393 done
4394   done
4395 IFS=$as_save_IFS
4396
4397 fi
4398 fi
4399 CC=$ac_cv_prog_CC
4400 if test -n "$CC"; then
4401   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4402 $as_echo "$CC" >&6; }
4403 else
4404   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4405 $as_echo "no" >&6; }
4406 fi
4407
4408
4409 fi
4410 if test -z "$ac_cv_prog_CC"; then
4411   ac_ct_CC=$CC
4412   # Extract the first word of "gcc", so it can be a program name with args.
4413 set dummy gcc; ac_word=$2
4414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4415 $as_echo_n "checking for $ac_word... " >&6; }
4416 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4417   $as_echo_n "(cached) " >&6
4418 else
4419   if test -n "$ac_ct_CC"; then
4420   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4421 else
4422 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4423 for as_dir in $PATH
4424 do
4425   IFS=$as_save_IFS
4426   test -z "$as_dir" && as_dir=.
4427     for ac_exec_ext in '' $ac_executable_extensions; do
4428   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4429     ac_cv_prog_ac_ct_CC="gcc"
4430     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4431     break 2
4432   fi
4433 done
4434   done
4435 IFS=$as_save_IFS
4436
4437 fi
4438 fi
4439 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4440 if test -n "$ac_ct_CC"; then
4441   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4442 $as_echo "$ac_ct_CC" >&6; }
4443 else
4444   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4445 $as_echo "no" >&6; }
4446 fi
4447
4448   if test "x$ac_ct_CC" = x; then
4449     CC=""
4450   else
4451     case $cross_compiling:$ac_tool_warned in
4452 yes:)
4453 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4454 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4455 ac_tool_warned=yes ;;
4456 esac
4457     CC=$ac_ct_CC
4458   fi
4459 else
4460   CC="$ac_cv_prog_CC"
4461 fi
4462
4463 if test -z "$CC"; then
4464           if test -n "$ac_tool_prefix"; then
4465     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4466 set dummy ${ac_tool_prefix}cc; ac_word=$2
4467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4468 $as_echo_n "checking for $ac_word... " >&6; }
4469 if ${ac_cv_prog_CC+:} false; then :
4470   $as_echo_n "(cached) " >&6
4471 else
4472   if test -n "$CC"; then
4473   ac_cv_prog_CC="$CC" # Let the user override the test.
4474 else
4475 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4476 for as_dir in $PATH
4477 do
4478   IFS=$as_save_IFS
4479   test -z "$as_dir" && as_dir=.
4480     for ac_exec_ext in '' $ac_executable_extensions; do
4481   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4482     ac_cv_prog_CC="${ac_tool_prefix}cc"
4483     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4484     break 2
4485   fi
4486 done
4487   done
4488 IFS=$as_save_IFS
4489
4490 fi
4491 fi
4492 CC=$ac_cv_prog_CC
4493 if test -n "$CC"; then
4494   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4495 $as_echo "$CC" >&6; }
4496 else
4497   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4498 $as_echo "no" >&6; }
4499 fi
4500
4501
4502   fi
4503 fi
4504 if test -z "$CC"; then
4505   # Extract the first word of "cc", so it can be a program name with args.
4506 set dummy cc; ac_word=$2
4507 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4508 $as_echo_n "checking for $ac_word... " >&6; }
4509 if ${ac_cv_prog_CC+:} false; then :
4510   $as_echo_n "(cached) " >&6
4511 else
4512   if test -n "$CC"; then
4513   ac_cv_prog_CC="$CC" # Let the user override the test.
4514 else
4515   ac_prog_rejected=no
4516 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4517 for as_dir in $PATH
4518 do
4519   IFS=$as_save_IFS
4520   test -z "$as_dir" && as_dir=.
4521     for ac_exec_ext in '' $ac_executable_extensions; do
4522   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4523     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4524        ac_prog_rejected=yes
4525        continue
4526      fi
4527     ac_cv_prog_CC="cc"
4528     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4529     break 2
4530   fi
4531 done
4532   done
4533 IFS=$as_save_IFS
4534
4535 if test $ac_prog_rejected = yes; then
4536   # We found a bogon in the path, so make sure we never use it.
4537   set dummy $ac_cv_prog_CC
4538   shift
4539   if test $# != 0; then
4540     # We chose a different compiler from the bogus one.
4541     # However, it has the same basename, so the bogon will be chosen
4542     # first if we set CC to just the basename; use the full file name.
4543     shift
4544     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
4545   fi
4546 fi
4547 fi
4548 fi
4549 CC=$ac_cv_prog_CC
4550 if test -n "$CC"; then
4551   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4552 $as_echo "$CC" >&6; }
4553 else
4554   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4555 $as_echo "no" >&6; }
4556 fi
4557
4558
4559 fi
4560 if test -z "$CC"; then
4561   if test -n "$ac_tool_prefix"; then
4562   for ac_prog in cl.exe
4563   do
4564     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4565 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4567 $as_echo_n "checking for $ac_word... " >&6; }
4568 if ${ac_cv_prog_CC+:} false; then :
4569   $as_echo_n "(cached) " >&6
4570 else
4571   if test -n "$CC"; then
4572   ac_cv_prog_CC="$CC" # Let the user override the test.
4573 else
4574 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4575 for as_dir in $PATH
4576 do
4577   IFS=$as_save_IFS
4578   test -z "$as_dir" && as_dir=.
4579     for ac_exec_ext in '' $ac_executable_extensions; do
4580   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4581     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4582     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4583     break 2
4584   fi
4585 done
4586   done
4587 IFS=$as_save_IFS
4588
4589 fi
4590 fi
4591 CC=$ac_cv_prog_CC
4592 if test -n "$CC"; then
4593   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4594 $as_echo "$CC" >&6; }
4595 else
4596   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4597 $as_echo "no" >&6; }
4598 fi
4599
4600
4601     test -n "$CC" && break
4602   done
4603 fi
4604 if test -z "$CC"; then
4605   ac_ct_CC=$CC
4606   for ac_prog in cl.exe
4607 do
4608   # Extract the first word of "$ac_prog", so it can be a program name with args.
4609 set dummy $ac_prog; ac_word=$2
4610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4611 $as_echo_n "checking for $ac_word... " >&6; }
4612 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4613   $as_echo_n "(cached) " >&6
4614 else
4615   if test -n "$ac_ct_CC"; then
4616   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4617 else
4618 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4619 for as_dir in $PATH
4620 do
4621   IFS=$as_save_IFS
4622   test -z "$as_dir" && as_dir=.
4623     for ac_exec_ext in '' $ac_executable_extensions; do
4624   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4625     ac_cv_prog_ac_ct_CC="$ac_prog"
4626     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4627     break 2
4628   fi
4629 done
4630   done
4631 IFS=$as_save_IFS
4632
4633 fi
4634 fi
4635 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4636 if test -n "$ac_ct_CC"; then
4637   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4638 $as_echo "$ac_ct_CC" >&6; }
4639 else
4640   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4641 $as_echo "no" >&6; }
4642 fi
4643
4644
4645   test -n "$ac_ct_CC" && break
4646 done
4647
4648   if test "x$ac_ct_CC" = x; then
4649     CC=""
4650   else
4651     case $cross_compiling:$ac_tool_warned in
4652 yes:)
4653 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4654 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4655 ac_tool_warned=yes ;;
4656 esac
4657     CC=$ac_ct_CC
4658   fi
4659 fi
4660
4661 fi
4662
4663
4664 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4665 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4666 as_fn_error $? "no acceptable C compiler found in \$PATH
4667 See \`config.log' for more details" "$LINENO" 5; }
4668
4669 # Provide some information about the compiler.
4670 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4671 set X $ac_compile
4672 ac_compiler=$2
4673 for ac_option in --version -v -V -qversion; do
4674   { { ac_try="$ac_compiler $ac_option >&5"
4675 case "(($ac_try" in
4676   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4677   *) ac_try_echo=$ac_try;;
4678 esac
4679 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4680 $as_echo "$ac_try_echo"; } >&5
4681   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4682   ac_status=$?
4683   if test -s conftest.err; then
4684     sed '10a\
4685 ... rest of stderr output deleted ...
4686          10q' conftest.err >conftest.er1
4687     cat conftest.er1 >&5
4688   fi
4689   rm -f conftest.er1 conftest.err
4690   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4691   test $ac_status = 0; }
4692 done
4693
4694 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4695 /* end confdefs.h.  */
4696
4697 int
4698 main ()
4699 {
4700
4701   ;
4702   return 0;
4703 }
4704 _ACEOF
4705 ac_clean_files_save=$ac_clean_files
4706 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
4707 # Try to create an executable without -o first, disregard a.out.
4708 # It will help us diagnose broken compilers, and finding out an intuition
4709 # of exeext.
4710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4711 $as_echo_n "checking whether the C compiler works... " >&6; }
4712 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4713
4714 # The possible output files:
4715 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4716
4717 ac_rmfiles=
4718 for ac_file in $ac_files
4719 do
4720   case $ac_file in
4721     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4722     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4723   esac
4724 done
4725 rm -f $ac_rmfiles
4726
4727 if { { ac_try="$ac_link_default"
4728 case "(($ac_try" in
4729   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4730   *) ac_try_echo=$ac_try;;
4731 esac
4732 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4733 $as_echo "$ac_try_echo"; } >&5
4734   (eval "$ac_link_default") 2>&5
4735   ac_status=$?
4736   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4737   test $ac_status = 0; }; then :
4738   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4739 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4740 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
4741 # so that the user can short-circuit this test for compilers unknown to
4742 # Autoconf.
4743 for ac_file in $ac_files ''
4744 do
4745   test -f "$ac_file" || continue
4746   case $ac_file in
4747     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4748         ;;
4749     [ab].out )
4750         # We found the default executable, but exeext='' is most
4751         # certainly right.
4752         break;;
4753     *.* )
4754         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4755         then :; else
4756            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4757         fi
4758         # We set ac_cv_exeext here because the later test for it is not
4759         # safe: cross compilers may not add the suffix if given an `-o'
4760         # argument, so we may need to know it at that point already.
4761         # Even if this section looks crufty: it has the advantage of
4762         # actually working.
4763         break;;
4764     * )
4765         break;;
4766   esac
4767 done
4768 test "$ac_cv_exeext" = no && ac_cv_exeext=
4769
4770 else
4771   ac_file=''
4772 fi
4773 if test -z "$ac_file"; then :
4774   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4775 $as_echo "no" >&6; }
4776 $as_echo "$as_me: failed program was:" >&5
4777 sed 's/^/| /' conftest.$ac_ext >&5
4778
4779 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4780 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4781 as_fn_error 77 "C compiler cannot create executables
4782 See \`config.log' for more details" "$LINENO" 5; }
4783 else
4784   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4785 $as_echo "yes" >&6; }
4786 fi
4787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4788 $as_echo_n "checking for C compiler default output file name... " >&6; }
4789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4790 $as_echo "$ac_file" >&6; }
4791 ac_exeext=$ac_cv_exeext
4792
4793 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4794 ac_clean_files=$ac_clean_files_save
4795 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4796 $as_echo_n "checking for suffix of executables... " >&6; }
4797 if { { ac_try="$ac_link"
4798 case "(($ac_try" in
4799   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4800   *) ac_try_echo=$ac_try;;
4801 esac
4802 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4803 $as_echo "$ac_try_echo"; } >&5
4804   (eval "$ac_link") 2>&5
4805   ac_status=$?
4806   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4807   test $ac_status = 0; }; then :
4808   # If both `conftest.exe' and `conftest' are `present' (well, observable)
4809 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
4810 # work properly (i.e., refer to `conftest.exe'), while it won't with
4811 # `rm'.
4812 for ac_file in conftest.exe conftest conftest.*; do
4813   test -f "$ac_file" || continue
4814   case $ac_file in
4815     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4816     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4817           break;;
4818     * ) break;;
4819   esac
4820 done
4821 else
4822   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4823 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4824 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4825 See \`config.log' for more details" "$LINENO" 5; }
4826 fi
4827 rm -f conftest conftest$ac_cv_exeext
4828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4829 $as_echo "$ac_cv_exeext" >&6; }
4830
4831 rm -f conftest.$ac_ext
4832 EXEEXT=$ac_cv_exeext
4833 ac_exeext=$EXEEXT
4834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4835 /* end confdefs.h.  */
4836 #include <stdio.h>
4837 int
4838 main ()
4839 {
4840 FILE *f = fopen ("conftest.out", "w");
4841  return ferror (f) || fclose (f) != 0;
4842
4843   ;
4844   return 0;
4845 }
4846 _ACEOF
4847 ac_clean_files="$ac_clean_files conftest.out"
4848 # Check that the compiler produces executables we can run.  If not, either
4849 # the compiler is broken, or we cross compile.
4850 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4851 $as_echo_n "checking whether we are cross compiling... " >&6; }
4852 if test "$cross_compiling" != yes; then
4853   { { ac_try="$ac_link"
4854 case "(($ac_try" in
4855   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4856   *) ac_try_echo=$ac_try;;
4857 esac
4858 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4859 $as_echo "$ac_try_echo"; } >&5
4860   (eval "$ac_link") 2>&5
4861   ac_status=$?
4862   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4863   test $ac_status = 0; }
4864   if { ac_try='./conftest$ac_cv_exeext'
4865   { { case "(($ac_try" in
4866   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4867   *) ac_try_echo=$ac_try;;
4868 esac
4869 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4870 $as_echo "$ac_try_echo"; } >&5
4871   (eval "$ac_try") 2>&5
4872   ac_status=$?
4873   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4874   test $ac_status = 0; }; }; then
4875     cross_compiling=no
4876   else
4877     if test "$cross_compiling" = maybe; then
4878         cross_compiling=yes
4879     else
4880         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4881 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4882 as_fn_error $? "cannot run C compiled programs.
4883 If you meant to cross compile, use \`--host'.
4884 See \`config.log' for more details" "$LINENO" 5; }
4885     fi
4886   fi
4887 fi
4888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4889 $as_echo "$cross_compiling" >&6; }
4890
4891 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4892 ac_clean_files=$ac_clean_files_save
4893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4894 $as_echo_n "checking for suffix of object files... " >&6; }
4895 if ${ac_cv_objext+:} false; then :
4896   $as_echo_n "(cached) " >&6
4897 else
4898   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4899 /* end confdefs.h.  */
4900
4901 int
4902 main ()
4903 {
4904
4905   ;
4906   return 0;
4907 }
4908 _ACEOF
4909 rm -f conftest.o conftest.obj
4910 if { { ac_try="$ac_compile"
4911 case "(($ac_try" in
4912   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4913   *) ac_try_echo=$ac_try;;
4914 esac
4915 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4916 $as_echo "$ac_try_echo"; } >&5
4917   (eval "$ac_compile") 2>&5
4918   ac_status=$?
4919   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4920   test $ac_status = 0; }; then :
4921   for ac_file in conftest.o conftest.obj conftest.*; do
4922   test -f "$ac_file" || continue;
4923   case $ac_file in
4924     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4925     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4926        break;;
4927   esac
4928 done
4929 else
4930   $as_echo "$as_me: failed program was:" >&5
4931 sed 's/^/| /' conftest.$ac_ext >&5
4932
4933 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4934 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4935 as_fn_error $? "cannot compute suffix of object files: cannot compile
4936 See \`config.log' for more details" "$LINENO" 5; }
4937 fi
4938 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4939 fi
4940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4941 $as_echo "$ac_cv_objext" >&6; }
4942 OBJEXT=$ac_cv_objext
4943 ac_objext=$OBJEXT
4944 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4945 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4946 if ${ac_cv_c_compiler_gnu+:} false; then :
4947   $as_echo_n "(cached) " >&6
4948 else
4949   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4950 /* end confdefs.h.  */
4951
4952 int
4953 main ()
4954 {
4955 #ifndef __GNUC__
4956        choke me
4957 #endif
4958
4959   ;
4960   return 0;
4961 }
4962 _ACEOF
4963 if ac_fn_c_try_compile "$LINENO"; then :
4964   ac_compiler_gnu=yes
4965 else
4966   ac_compiler_gnu=no
4967 fi
4968 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4969 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4970
4971 fi
4972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4973 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4974 if test $ac_compiler_gnu = yes; then
4975   GCC=yes
4976 else
4977   GCC=
4978 fi
4979 ac_test_CFLAGS=${CFLAGS+set}
4980 ac_save_CFLAGS=$CFLAGS
4981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4982 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4983 if ${ac_cv_prog_cc_g+:} false; then :
4984   $as_echo_n "(cached) " >&6
4985 else
4986   ac_save_c_werror_flag=$ac_c_werror_flag
4987    ac_c_werror_flag=yes
4988    ac_cv_prog_cc_g=no
4989    CFLAGS="-g"
4990    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4991 /* end confdefs.h.  */
4992
4993 int
4994 main ()
4995 {
4996
4997   ;
4998   return 0;
4999 }
5000 _ACEOF
5001 if ac_fn_c_try_compile "$LINENO"; then :
5002   ac_cv_prog_cc_g=yes
5003 else
5004   CFLAGS=""
5005       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5006 /* end confdefs.h.  */
5007
5008 int
5009 main ()
5010 {
5011
5012   ;
5013   return 0;
5014 }
5015 _ACEOF
5016 if ac_fn_c_try_compile "$LINENO"; then :
5017
5018 else
5019   ac_c_werror_flag=$ac_save_c_werror_flag
5020          CFLAGS="-g"
5021          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5022 /* end confdefs.h.  */
5023
5024 int
5025 main ()
5026 {
5027
5028   ;
5029   return 0;
5030 }
5031 _ACEOF
5032 if ac_fn_c_try_compile "$LINENO"; then :
5033   ac_cv_prog_cc_g=yes
5034 fi
5035 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5036 fi
5037 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5038 fi
5039 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5040    ac_c_werror_flag=$ac_save_c_werror_flag
5041 fi
5042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
5043 $as_echo "$ac_cv_prog_cc_g" >&6; }
5044 if test "$ac_test_CFLAGS" = set; then
5045   CFLAGS=$ac_save_CFLAGS
5046 elif test $ac_cv_prog_cc_g = yes; then
5047   if test "$GCC" = yes; then
5048     CFLAGS="-g -O2"
5049   else
5050     CFLAGS="-g"
5051   fi
5052 else
5053   if test "$GCC" = yes; then
5054     CFLAGS="-O2"
5055   else
5056     CFLAGS=
5057   fi
5058 fi
5059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
5060 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
5061 if ${ac_cv_prog_cc_c89+:} false; then :
5062   $as_echo_n "(cached) " >&6
5063 else
5064   ac_cv_prog_cc_c89=no
5065 ac_save_CC=$CC
5066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5067 /* end confdefs.h.  */
5068 #include <stdarg.h>
5069 #include <stdio.h>
5070 struct stat;
5071 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
5072 struct buf { int x; };
5073 FILE * (*rcsopen) (struct buf *, struct stat *, int);
5074 static char *e (p, i)
5075      char **p;
5076      int i;
5077 {
5078   return p[i];
5079 }
5080 static char *f (char * (*g) (char **, int), char **p, ...)
5081 {
5082   char *s;
5083   va_list v;
5084   va_start (v,p);
5085   s = g (p, va_arg (v,int));
5086   va_end (v);
5087   return s;
5088 }
5089
5090 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
5091    function prototypes and stuff, but not '\xHH' hex character constants.
5092    These don't provoke an error unfortunately, instead are silently treated
5093    as 'x'.  The following induces an error, until -std is added to get
5094    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
5095    array size at least.  It's necessary to write '\x00'==0 to get something
5096    that's true only with -std.  */
5097 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5098
5099 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5100    inside strings and character constants.  */
5101 #define FOO(x) 'x'
5102 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5103
5104 int test (int i, double x);
5105 struct s1 {int (*f) (int a);};
5106 struct s2 {int (*f) (double a);};
5107 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5108 int argc;
5109 char **argv;
5110 int
5111 main ()
5112 {
5113 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
5114   ;
5115   return 0;
5116 }
5117 _ACEOF
5118 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5119         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5120 do
5121   CC="$ac_save_CC $ac_arg"
5122   if ac_fn_c_try_compile "$LINENO"; then :
5123   ac_cv_prog_cc_c89=$ac_arg
5124 fi
5125 rm -f core conftest.err conftest.$ac_objext
5126   test "x$ac_cv_prog_cc_c89" != "xno" && break
5127 done
5128 rm -f conftest.$ac_ext
5129 CC=$ac_save_CC
5130
5131 fi
5132 # AC_CACHE_VAL
5133 case "x$ac_cv_prog_cc_c89" in
5134   x)
5135     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5136 $as_echo "none needed" >&6; } ;;
5137   xno)
5138     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5139 $as_echo "unsupported" >&6; } ;;
5140   *)
5141     CC="$CC $ac_cv_prog_cc_c89"
5142     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5143 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5144 esac
5145 if test "x$ac_cv_prog_cc_c89" != xno; then :
5146
5147 fi
5148
5149 ac_ext=c
5150 ac_cpp='$CPP $CPPFLAGS'
5151 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5152 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5153 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5154
5155 ac_ext=c
5156 ac_cpp='$CPP $CPPFLAGS'
5157 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5158 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5159 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5160 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
5161 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
5162 if ${am_cv_prog_cc_c_o+:} false; then :
5163   $as_echo_n "(cached) " >&6
5164 else
5165   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5166 /* end confdefs.h.  */
5167
5168 int
5169 main ()
5170 {
5171
5172   ;
5173   return 0;
5174 }
5175 _ACEOF
5176   # Make sure it works both with $CC and with simple cc.
5177   # Following AC_PROG_CC_C_O, we do the test twice because some
5178   # compilers refuse to overwrite an existing .o file with -o,
5179   # though they will create one.
5180   am_cv_prog_cc_c_o=yes
5181   for am_i in 1 2; do
5182     if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
5183    ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
5184    ac_status=$?
5185    echo "$as_me:$LINENO: \$? = $ac_status" >&5
5186    (exit $ac_status); } \
5187          && test -f conftest2.$ac_objext; then
5188       : OK
5189     else
5190       am_cv_prog_cc_c_o=no
5191       break
5192     fi
5193   done
5194   rm -f core conftest*
5195   unset am_i
5196 fi
5197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
5198 $as_echo "$am_cv_prog_cc_c_o" >&6; }
5199 if test "$am_cv_prog_cc_c_o" != yes; then
5200    # Losing compiler, so override with the script.
5201    # FIXME: It is wrong to rewrite CC.
5202    # But if we don't then we get into trouble of one sort or another.
5203    # A longer-term fix would be to have automake use am__CC in this case,
5204    # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
5205    CC="$am_aux_dir/compile $CC"
5206 fi
5207 ac_ext=c
5208 ac_cpp='$CPP $CPPFLAGS'
5209 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5210 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5211 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5212
5213
5214 depcc="$CC"   am_compiler_list=
5215
5216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
5217 $as_echo_n "checking dependency style of $depcc... " >&6; }
5218 if ${am_cv_CC_dependencies_compiler_type+:} false; then :
5219   $as_echo_n "(cached) " >&6
5220 else
5221   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
5222   # We make a subdir and do the tests there.  Otherwise we can end up
5223   # making bogus files that we don't know about and never remove.  For
5224   # instance it was reported that on HP-UX the gcc test will end up
5225   # making a dummy file named 'D' -- because '-MD' means "put the output
5226   # in D".
5227   rm -rf conftest.dir
5228   mkdir conftest.dir
5229   # Copy depcomp to subdir because otherwise we won't find it if we're
5230   # using a relative directory.
5231   cp "$am_depcomp" conftest.dir
5232   cd conftest.dir
5233   # We will build objects and dependencies in a subdirectory because
5234   # it helps to detect inapplicable dependency modes.  For instance
5235   # both Tru64's cc and ICC support -MD to output dependencies as a
5236   # side effect of compilation, but ICC will put the dependencies in
5237   # the current directory while Tru64 will put them in the object
5238   # directory.
5239   mkdir sub
5240
5241   am_cv_CC_dependencies_compiler_type=none
5242   if test "$am_compiler_list" = ""; then
5243      am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5244   fi
5245   am__universal=false
5246   case " $depcc " in #(
5247      *\ -arch\ *\ -arch\ *) am__universal=true ;;
5248      esac
5249
5250   for depmode in $am_compiler_list; do
5251     # Setup a source with many dependencies, because some compilers
5252     # like to wrap large dependency lists on column 80 (with \), and
5253     # we should not choose a depcomp mode which is confused by this.
5254     #
5255     # We need to recreate these files for each test, as the compiler may
5256     # overwrite some of them when testing with obscure command lines.
5257     # This happens at least with the AIX C compiler.
5258     : > sub/conftest.c
5259     for i in 1 2 3 4 5 6; do
5260       echo '#include "conftst'$i'.h"' >> sub/conftest.c
5261       # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
5262       # Solaris 10 /bin/sh.
5263       echo '/* dummy */' > sub/conftst$i.h
5264     done
5265     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
5266
5267     # We check with '-c' and '-o' for the sake of the "dashmstdout"
5268     # mode.  It turns out that the SunPro C++ compiler does not properly
5269     # handle '-M -o', and we need to detect this.  Also, some Intel
5270     # versions had trouble with output in subdirs.
5271     am__obj=sub/conftest.${OBJEXT-o}
5272     am__minus_obj="-o $am__obj"
5273     case $depmode in
5274     gcc)
5275       # This depmode causes a compiler race in universal mode.
5276       test "$am__universal" = false || continue
5277       ;;
5278     nosideeffect)
5279       # After this tag, mechanisms are not by side-effect, so they'll
5280       # only be used when explicitly requested.
5281       if test "x$enable_dependency_tracking" = xyes; then
5282         continue
5283       else
5284         break
5285       fi
5286       ;;
5287     msvc7 | msvc7msys | msvisualcpp | msvcmsys)
5288       # This compiler won't grok '-c -o', but also, the minuso test has
5289       # not run yet.  These depmodes are late enough in the game, and
5290       # so weak that their functioning should not be impacted.
5291       am__obj=conftest.${OBJEXT-o}
5292       am__minus_obj=
5293       ;;
5294     none) break ;;
5295     esac
5296     if depmode=$depmode \
5297        source=sub/conftest.c object=$am__obj \
5298        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5299        $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
5300          >/dev/null 2>conftest.err &&
5301        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
5302        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
5303        grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
5304        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
5305       # icc doesn't choke on unknown options, it will just issue warnings
5306       # or remarks (even with -Werror).  So we grep stderr for any message
5307       # that says an option was ignored or not supported.
5308       # When given -MP, icc 7.0 and 7.1 complain thusly:
5309       #   icc: Command line warning: ignoring option '-M'; no argument required
5310       # The diagnosis changed in icc 8.0:
5311       #   icc: Command line remark: option '-MP' not supported
5312       if (grep 'ignoring option' conftest.err ||
5313           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
5314         am_cv_CC_dependencies_compiler_type=$depmode
5315         break
5316       fi
5317     fi
5318   done
5319
5320   cd ..
5321   rm -rf conftest.dir
5322 else
5323   am_cv_CC_dependencies_compiler_type=none
5324 fi
5325
5326 fi
5327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
5328 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
5329 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
5330
5331  if
5332   test "x$enable_dependency_tracking" != xno \
5333   && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
5334   am__fastdepCC_TRUE=
5335   am__fastdepCC_FALSE='#'
5336 else
5337   am__fastdepCC_TRUE='#'
5338   am__fastdepCC_FALSE=
5339 fi
5340
5341
5342    case $ac_cv_prog_cc_stdc in #(
5343   no) :
5344     ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #(
5345   *) :
5346     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
5347 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
5348 if ${ac_cv_prog_cc_c99+:} false; then :
5349   $as_echo_n "(cached) " >&6
5350 else
5351   ac_cv_prog_cc_c99=no
5352 ac_save_CC=$CC
5353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5354 /* end confdefs.h.  */
5355 #include <stdarg.h>
5356 #include <stdbool.h>
5357 #include <stdlib.h>
5358 #include <wchar.h>
5359 #include <stdio.h>
5360
5361 // Check varargs macros.  These examples are taken from C99 6.10.3.5.
5362 #define debug(...) fprintf (stderr, __VA_ARGS__)
5363 #define showlist(...) puts (#__VA_ARGS__)
5364 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
5365 static void
5366 test_varargs_macros (void)
5367 {
5368   int x = 1234;
5369   int y = 5678;
5370   debug ("Flag");
5371   debug ("X = %d\n", x);
5372   showlist (The first, second, and third items.);
5373   report (x>y, "x is %d but y is %d", x, y);
5374 }
5375
5376 // Check long long types.
5377 #define BIG64 18446744073709551615ull
5378 #define BIG32 4294967295ul
5379 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
5380 #if !BIG_OK
5381   your preprocessor is broken;
5382 #endif
5383 #if BIG_OK
5384 #else
5385   your preprocessor is broken;
5386 #endif
5387 static long long int bignum = -9223372036854775807LL;
5388 static unsigned long long int ubignum = BIG64;
5389
5390 struct incomplete_array
5391 {
5392   int datasize;
5393   double data[];
5394 };
5395
5396 struct named_init {
5397   int number;
5398   const wchar_t *name;
5399   double average;
5400 };
5401
5402 typedef const char *ccp;
5403
5404 static inline int
5405 test_restrict (ccp restrict text)
5406 {
5407   // See if C++-style comments work.
5408   // Iterate through items via the restricted pointer.
5409   // Also check for declarations in for loops.
5410   for (unsigned int i = 0; *(text+i) != '\0'; ++i)
5411     continue;
5412   return 0;
5413 }
5414
5415 // Check varargs and va_copy.
5416 static void
5417 test_varargs (const char *format, ...)
5418 {
5419   va_list args;
5420   va_start (args, format);
5421   va_list args_copy;
5422   va_copy (args_copy, args);
5423
5424   const char *str;
5425   int number;
5426   float fnumber;
5427
5428   while (*format)
5429     {
5430       switch (*format++)
5431         {
5432         case 's': // string
5433           str = va_arg (args_copy, const char *);
5434           break;
5435         case 'd': // int
5436           number = va_arg (args_copy, int);
5437           break;
5438         case 'f': // float
5439           fnumber = va_arg (args_copy, double);
5440           break;
5441         default:
5442           break;
5443         }
5444     }
5445   va_end (args_copy);
5446   va_end (args);
5447 }
5448
5449 int
5450 main ()
5451 {
5452
5453   // Check bool.
5454   _Bool success = false;
5455
5456   // Check restrict.
5457   if (test_restrict ("String literal") == 0)
5458     success = true;
5459   char *restrict newvar = "Another string";
5460
5461   // Check varargs.
5462   test_varargs ("s, d' f .", "string", 65, 34.234);
5463   test_varargs_macros ();
5464
5465   // Check flexible array members.
5466   struct incomplete_array *ia =
5467     malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
5468   ia->datasize = 10;
5469   for (int i = 0; i < ia->datasize; ++i)
5470     ia->data[i] = i * 1.234;
5471
5472   // Check named initializers.
5473   struct named_init ni = {
5474     .number = 34,
5475     .name = L"Test wide string",
5476     .average = 543.34343,
5477   };
5478
5479   ni.number = 58;
5480
5481   int dynamic_array[ni.number];
5482   dynamic_array[ni.number - 1] = 543;
5483
5484   // work around unused variable warnings
5485   return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
5486           || dynamic_array[ni.number - 1] != 543);
5487
5488   ;
5489   return 0;
5490 }
5491 _ACEOF
5492 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
5493 do
5494   CC="$ac_save_CC $ac_arg"
5495   if ac_fn_c_try_compile "$LINENO"; then :
5496   ac_cv_prog_cc_c99=$ac_arg
5497 fi
5498 rm -f core conftest.err conftest.$ac_objext
5499   test "x$ac_cv_prog_cc_c99" != "xno" && break
5500 done
5501 rm -f conftest.$ac_ext
5502 CC=$ac_save_CC
5503
5504 fi
5505 # AC_CACHE_VAL
5506 case "x$ac_cv_prog_cc_c99" in
5507   x)
5508     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5509 $as_echo "none needed" >&6; } ;;
5510   xno)
5511     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5512 $as_echo "unsupported" >&6; } ;;
5513   *)
5514     CC="$CC $ac_cv_prog_cc_c99"
5515     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
5516 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
5517 esac
5518 if test "x$ac_cv_prog_cc_c99" != xno; then :
5519   ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
5520 else
5521   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
5522 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
5523 if ${ac_cv_prog_cc_c89+:} false; then :
5524   $as_echo_n "(cached) " >&6
5525 else
5526   ac_cv_prog_cc_c89=no
5527 ac_save_CC=$CC
5528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5529 /* end confdefs.h.  */
5530 #include <stdarg.h>
5531 #include <stdio.h>
5532 struct stat;
5533 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
5534 struct buf { int x; };
5535 FILE * (*rcsopen) (struct buf *, struct stat *, int);
5536 static char *e (p, i)
5537      char **p;
5538      int i;
5539 {
5540   return p[i];
5541 }
5542 static char *f (char * (*g) (char **, int), char **p, ...)
5543 {
5544   char *s;
5545   va_list v;
5546   va_start (v,p);
5547   s = g (p, va_arg (v,int));
5548   va_end (v);
5549   return s;
5550 }
5551
5552 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
5553    function prototypes and stuff, but not '\xHH' hex character constants.
5554    These don't provoke an error unfortunately, instead are silently treated
5555    as 'x'.  The following induces an error, until -std is added to get
5556    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
5557    array size at least.  It's necessary to write '\x00'==0 to get something
5558    that's true only with -std.  */
5559 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5560
5561 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5562    inside strings and character constants.  */
5563 #define FOO(x) 'x'
5564 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5565
5566 int test (int i, double x);
5567 struct s1 {int (*f) (int a);};
5568 struct s2 {int (*f) (double a);};
5569 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5570 int argc;
5571 char **argv;
5572 int
5573 main ()
5574 {
5575 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
5576   ;
5577   return 0;
5578 }
5579 _ACEOF
5580 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5581         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5582 do
5583   CC="$ac_save_CC $ac_arg"
5584   if ac_fn_c_try_compile "$LINENO"; then :
5585   ac_cv_prog_cc_c89=$ac_arg
5586 fi
5587 rm -f core conftest.err conftest.$ac_objext
5588   test "x$ac_cv_prog_cc_c89" != "xno" && break
5589 done
5590 rm -f conftest.$ac_ext
5591 CC=$ac_save_CC
5592
5593 fi
5594 # AC_CACHE_VAL
5595 case "x$ac_cv_prog_cc_c89" in
5596   x)
5597     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5598 $as_echo "none needed" >&6; } ;;
5599   xno)
5600     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5601 $as_echo "unsupported" >&6; } ;;
5602   *)
5603     CC="$CC $ac_cv_prog_cc_c89"
5604     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5605 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5606 esac
5607 if test "x$ac_cv_prog_cc_c89" != xno; then :
5608   ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
5609 else
5610   ac_cv_prog_cc_stdc=no
5611 fi
5612
5613 fi
5614  ;;
5615 esac
5616   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5
5617 $as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; }
5618   if ${ac_cv_prog_cc_stdc+:} false; then :
5619   $as_echo_n "(cached) " >&6
5620 fi
5621
5622   case $ac_cv_prog_cc_stdc in #(
5623   no) :
5624     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5625 $as_echo "unsupported" >&6; } ;; #(
5626   '') :
5627     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5628 $as_echo "none needed" >&6; } ;; #(
5629   *) :
5630     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5
5631 $as_echo "$ac_cv_prog_cc_stdc" >&6; } ;;
5632 esac
5633
5634
5635 if test -n "$ac_tool_prefix"; then
5636   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5637 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
5638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5639 $as_echo_n "checking for $ac_word... " >&6; }
5640 if ${ac_cv_prog_RANLIB+:} false; then :
5641   $as_echo_n "(cached) " >&6
5642 else
5643   if test -n "$RANLIB"; then
5644   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5645 else
5646 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5647 for as_dir in $PATH
5648 do
5649   IFS=$as_save_IFS
5650   test -z "$as_dir" && as_dir=.
5651     for ac_exec_ext in '' $ac_executable_extensions; do
5652   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5653     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5654     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5655     break 2
5656   fi
5657 done
5658   done
5659 IFS=$as_save_IFS
5660
5661 fi
5662 fi
5663 RANLIB=$ac_cv_prog_RANLIB
5664 if test -n "$RANLIB"; then
5665   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5666 $as_echo "$RANLIB" >&6; }
5667 else
5668   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5669 $as_echo "no" >&6; }
5670 fi
5671
5672
5673 fi
5674 if test -z "$ac_cv_prog_RANLIB"; then
5675   ac_ct_RANLIB=$RANLIB
5676   # Extract the first word of "ranlib", so it can be a program name with args.
5677 set dummy ranlib; ac_word=$2
5678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5679 $as_echo_n "checking for $ac_word... " >&6; }
5680 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
5681   $as_echo_n "(cached) " >&6
5682 else
5683   if test -n "$ac_ct_RANLIB"; then
5684   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5685 else
5686 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5687 for as_dir in $PATH
5688 do
5689   IFS=$as_save_IFS
5690   test -z "$as_dir" && as_dir=.
5691     for ac_exec_ext in '' $ac_executable_extensions; do
5692   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5693     ac_cv_prog_ac_ct_RANLIB="ranlib"
5694     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5695     break 2
5696   fi
5697 done
5698   done
5699 IFS=$as_save_IFS
5700
5701 fi
5702 fi
5703 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5704 if test -n "$ac_ct_RANLIB"; then
5705   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5706 $as_echo "$ac_ct_RANLIB" >&6; }
5707 else
5708   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5709 $as_echo "no" >&6; }
5710 fi
5711
5712   if test "x$ac_ct_RANLIB" = x; then
5713     RANLIB=":"
5714   else
5715     case $cross_compiling:$ac_tool_warned in
5716 yes:)
5717 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5718 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5719 ac_tool_warned=yes ;;
5720 esac
5721     RANLIB=$ac_ct_RANLIB
5722   fi
5723 else
5724   RANLIB="$ac_cv_prog_RANLIB"
5725 fi
5726
5727 for ac_prog in 'bison -y' byacc
5728 do
5729   # Extract the first word of "$ac_prog", so it can be a program name with args.
5730 set dummy $ac_prog; ac_word=$2
5731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5732 $as_echo_n "checking for $ac_word... " >&6; }
5733 if ${ac_cv_prog_YACC+:} false; then :
5734   $as_echo_n "(cached) " >&6
5735 else
5736   if test -n "$YACC"; then
5737   ac_cv_prog_YACC="$YACC" # Let the user override the test.
5738 else
5739 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5740 for as_dir in $PATH
5741 do
5742   IFS=$as_save_IFS
5743   test -z "$as_dir" && as_dir=.
5744     for ac_exec_ext in '' $ac_executable_extensions; do
5745   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5746     ac_cv_prog_YACC="$ac_prog"
5747     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5748     break 2
5749   fi
5750 done
5751   done
5752 IFS=$as_save_IFS
5753
5754 fi
5755 fi
5756 YACC=$ac_cv_prog_YACC
5757 if test -n "$YACC"; then
5758   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
5759 $as_echo "$YACC" >&6; }
5760 else
5761   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5762 $as_echo "no" >&6; }
5763 fi
5764
5765
5766   test -n "$YACC" && break
5767 done
5768 test -n "$YACC" || YACC="yacc"
5769
5770
5771 ac_ext=c
5772 ac_cpp='$CPP $CPPFLAGS'
5773 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5774 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5775 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5776 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5777 $as_echo_n "checking how to run the C preprocessor... " >&6; }
5778 # On Suns, sometimes $CPP names a directory.
5779 if test -n "$CPP" && test -d "$CPP"; then
5780   CPP=
5781 fi
5782 if test -z "$CPP"; then
5783   if ${ac_cv_prog_CPP+:} false; then :
5784   $as_echo_n "(cached) " >&6
5785 else
5786       # Double quotes because CPP needs to be expanded
5787     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5788     do
5789       ac_preproc_ok=false
5790 for ac_c_preproc_warn_flag in '' yes
5791 do
5792   # Use a header file that comes with gcc, so configuring glibc
5793   # with a fresh cross-compiler works.
5794   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5795   # <limits.h> exists even on freestanding compilers.
5796   # On the NeXT, cc -E runs the code through the compiler's parser,
5797   # not just through cpp. "Syntax error" is here to catch this case.
5798   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5799 /* end confdefs.h.  */
5800 #ifdef __STDC__
5801 # include <limits.h>
5802 #else
5803 # include <assert.h>
5804 #endif
5805                      Syntax error
5806 _ACEOF
5807 if ac_fn_c_try_cpp "$LINENO"; then :
5808
5809 else
5810   # Broken: fails on valid input.
5811 continue
5812 fi
5813 rm -f conftest.err conftest.i conftest.$ac_ext
5814
5815   # OK, works on sane cases.  Now check whether nonexistent headers
5816   # can be detected and how.
5817   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5818 /* end confdefs.h.  */
5819 #include <ac_nonexistent.h>
5820 _ACEOF
5821 if ac_fn_c_try_cpp "$LINENO"; then :
5822   # Broken: success on invalid input.
5823 continue
5824 else
5825   # Passes both tests.
5826 ac_preproc_ok=:
5827 break
5828 fi
5829 rm -f conftest.err conftest.i conftest.$ac_ext
5830
5831 done
5832 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5833 rm -f conftest.i conftest.err conftest.$ac_ext
5834 if $ac_preproc_ok; then :
5835   break
5836 fi
5837
5838     done
5839     ac_cv_prog_CPP=$CPP
5840
5841 fi
5842   CPP=$ac_cv_prog_CPP
5843 else
5844   ac_cv_prog_CPP=$CPP
5845 fi
5846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5847 $as_echo "$CPP" >&6; }
5848 ac_preproc_ok=false
5849 for ac_c_preproc_warn_flag in '' yes
5850 do
5851   # Use a header file that comes with gcc, so configuring glibc
5852   # with a fresh cross-compiler works.
5853   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5854   # <limits.h> exists even on freestanding compilers.
5855   # On the NeXT, cc -E runs the code through the compiler's parser,
5856   # not just through cpp. "Syntax error" is here to catch this case.
5857   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5858 /* end confdefs.h.  */
5859 #ifdef __STDC__
5860 # include <limits.h>
5861 #else
5862 # include <assert.h>
5863 #endif
5864                      Syntax error
5865 _ACEOF
5866 if ac_fn_c_try_cpp "$LINENO"; then :
5867
5868 else
5869   # Broken: fails on valid input.
5870 continue
5871 fi
5872 rm -f conftest.err conftest.i conftest.$ac_ext
5873
5874   # OK, works on sane cases.  Now check whether nonexistent headers
5875   # can be detected and how.
5876   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5877 /* end confdefs.h.  */
5878 #include <ac_nonexistent.h>
5879 _ACEOF
5880 if ac_fn_c_try_cpp "$LINENO"; then :
5881   # Broken: success on invalid input.
5882 continue
5883 else
5884   # Passes both tests.
5885 ac_preproc_ok=:
5886 break
5887 fi
5888 rm -f conftest.err conftest.i conftest.$ac_ext
5889
5890 done
5891 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5892 rm -f conftest.i conftest.err conftest.$ac_ext
5893 if $ac_preproc_ok; then :
5894
5895 else
5896   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5897 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5898 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
5899 See \`config.log' for more details" "$LINENO" 5; }
5900 fi
5901
5902 ac_ext=c
5903 ac_cpp='$CPP $CPPFLAGS'
5904 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5905 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5906 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5907
5908
5909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5910 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5911 if ${ac_cv_path_GREP+:} false; then :
5912   $as_echo_n "(cached) " >&6
5913 else
5914   if test -z "$GREP"; then
5915   ac_path_GREP_found=false
5916   # Loop through the user's path and test for each of PROGNAME-LIST
5917   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5918 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5919 do
5920   IFS=$as_save_IFS
5921   test -z "$as_dir" && as_dir=.
5922     for ac_prog in grep ggrep; do
5923     for ac_exec_ext in '' $ac_executable_extensions; do
5924       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5925       as_fn_executable_p "$ac_path_GREP" || continue
5926 # Check for GNU ac_path_GREP and select it if it is found.
5927   # Check for GNU $ac_path_GREP
5928 case `"$ac_path_GREP" --version 2>&1` in
5929 *GNU*)
5930   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5931 *)
5932   ac_count=0
5933   $as_echo_n 0123456789 >"conftest.in"
5934   while :
5935   do
5936     cat "conftest.in" "conftest.in" >"conftest.tmp"
5937     mv "conftest.tmp" "conftest.in"
5938     cp "conftest.in" "conftest.nl"
5939     $as_echo 'GREP' >> "conftest.nl"
5940     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5941     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5942     as_fn_arith $ac_count + 1 && ac_count=$as_val
5943     if test $ac_count -gt ${ac_path_GREP_max-0}; then
5944       # Best one so far, save it but keep looking for a better one
5945       ac_cv_path_GREP="$ac_path_GREP"
5946       ac_path_GREP_max=$ac_count
5947     fi
5948     # 10*(2^10) chars as input seems more than enough
5949     test $ac_count -gt 10 && break
5950   done
5951   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5952 esac
5953
5954       $ac_path_GREP_found && break 3
5955     done
5956   done
5957   done
5958 IFS=$as_save_IFS
5959   if test -z "$ac_cv_path_GREP"; then
5960     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5961   fi
5962 else
5963   ac_cv_path_GREP=$GREP
5964 fi
5965
5966 fi
5967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5968 $as_echo "$ac_cv_path_GREP" >&6; }
5969  GREP="$ac_cv_path_GREP"
5970
5971
5972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5973 $as_echo_n "checking for egrep... " >&6; }
5974 if ${ac_cv_path_EGREP+:} false; then :
5975   $as_echo_n "(cached) " >&6
5976 else
5977   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5978    then ac_cv_path_EGREP="$GREP -E"
5979    else
5980      if test -z "$EGREP"; then
5981   ac_path_EGREP_found=false
5982   # Loop through the user's path and test for each of PROGNAME-LIST
5983   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5984 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5985 do
5986   IFS=$as_save_IFS
5987   test -z "$as_dir" && as_dir=.
5988     for ac_prog in egrep; do
5989     for ac_exec_ext in '' $ac_executable_extensions; do
5990       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5991       as_fn_executable_p "$ac_path_EGREP" || continue
5992 # Check for GNU ac_path_EGREP and select it if it is found.
5993   # Check for GNU $ac_path_EGREP
5994 case `"$ac_path_EGREP" --version 2>&1` in
5995 *GNU*)
5996   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5997 *)
5998   ac_count=0
5999   $as_echo_n 0123456789 >"conftest.in"
6000   while :
6001   do
6002     cat "conftest.in" "conftest.in" >"conftest.tmp"
6003     mv "conftest.tmp" "conftest.in"
6004     cp "conftest.in" "conftest.nl"
6005     $as_echo 'EGREP' >> "conftest.nl"
6006     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6007     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6008     as_fn_arith $ac_count + 1 && ac_count=$as_val
6009     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6010       # Best one so far, save it but keep looking for a better one
6011       ac_cv_path_EGREP="$ac_path_EGREP"
6012       ac_path_EGREP_max=$ac_count
6013     fi
6014     # 10*(2^10) chars as input seems more than enough
6015     test $ac_count -gt 10 && break
6016   done
6017   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6018 esac
6019
6020       $ac_path_EGREP_found && break 3
6021     done
6022   done
6023   done
6024 IFS=$as_save_IFS
6025   if test -z "$ac_cv_path_EGREP"; then
6026     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6027   fi
6028 else
6029   ac_cv_path_EGREP=$EGREP
6030 fi
6031
6032    fi
6033 fi
6034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6035 $as_echo "$ac_cv_path_EGREP" >&6; }
6036  EGREP="$ac_cv_path_EGREP"
6037
6038
6039
6040
6041   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
6042 $as_echo_n "checking for Minix Amsterdam compiler... " >&6; }
6043 if ${gl_cv_c_amsterdam_compiler+:} false; then :
6044   $as_echo_n "(cached) " >&6
6045 else
6046
6047       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6048 /* end confdefs.h.  */
6049
6050 #ifdef __ACK__
6051 Amsterdam
6052 #endif
6053
6054 _ACEOF
6055 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6056   $EGREP "Amsterdam" >/dev/null 2>&1; then :
6057   gl_cv_c_amsterdam_compiler=yes
6058 else
6059   gl_cv_c_amsterdam_compiler=no
6060 fi
6061 rm -f conftest*
6062
6063
6064 fi
6065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
6066 $as_echo "$gl_cv_c_amsterdam_compiler" >&6; }
6067   if test -z "$AR"; then
6068     if test $gl_cv_c_amsterdam_compiler = yes; then
6069       AR='cc -c.a'
6070       if test -z "$ARFLAGS"; then
6071         ARFLAGS='-o'
6072       fi
6073     else
6074                   if test -n "$ac_tool_prefix"; then
6075   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6076 set dummy ${ac_tool_prefix}ar; ac_word=$2
6077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6078 $as_echo_n "checking for $ac_word... " >&6; }
6079 if ${ac_cv_prog_AR+:} false; then :
6080   $as_echo_n "(cached) " >&6
6081 else
6082   if test -n "$AR"; then
6083   ac_cv_prog_AR="$AR" # Let the user override the test.
6084 else
6085 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6086 for as_dir in $PATH
6087 do
6088   IFS=$as_save_IFS
6089   test -z "$as_dir" && as_dir=.
6090     for ac_exec_ext in '' $ac_executable_extensions; do
6091   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6092     ac_cv_prog_AR="${ac_tool_prefix}ar"
6093     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6094     break 2
6095   fi
6096 done
6097   done
6098 IFS=$as_save_IFS
6099
6100 fi
6101 fi
6102 AR=$ac_cv_prog_AR
6103 if test -n "$AR"; then
6104   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6105 $as_echo "$AR" >&6; }
6106 else
6107   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6108 $as_echo "no" >&6; }
6109 fi
6110
6111
6112 fi
6113 if test -z "$ac_cv_prog_AR"; then
6114   ac_ct_AR=$AR
6115   # Extract the first word of "ar", so it can be a program name with args.
6116 set dummy ar; ac_word=$2
6117 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6118 $as_echo_n "checking for $ac_word... " >&6; }
6119 if ${ac_cv_prog_ac_ct_AR+:} false; then :
6120   $as_echo_n "(cached) " >&6
6121 else
6122   if test -n "$ac_ct_AR"; then
6123   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6124 else
6125 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6126 for as_dir in $PATH
6127 do
6128   IFS=$as_save_IFS
6129   test -z "$as_dir" && as_dir=.
6130     for ac_exec_ext in '' $ac_executable_extensions; do
6131   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6132     ac_cv_prog_ac_ct_AR="ar"
6133     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6134     break 2
6135   fi
6136 done
6137   done
6138 IFS=$as_save_IFS
6139
6140 fi
6141 fi
6142 ac_ct_AR=$ac_cv_prog_ac_ct_AR
6143 if test -n "$ac_ct_AR"; then
6144   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6145 $as_echo "$ac_ct_AR" >&6; }
6146 else
6147   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6148 $as_echo "no" >&6; }
6149 fi
6150
6151   if test "x$ac_ct_AR" = x; then
6152     AR="ar"
6153   else
6154     case $cross_compiling:$ac_tool_warned in
6155 yes:)
6156 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6157 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6158 ac_tool_warned=yes ;;
6159 esac
6160     AR=$ac_ct_AR
6161   fi
6162 else
6163   AR="$ac_cv_prog_AR"
6164 fi
6165
6166       if test -z "$ARFLAGS"; then
6167         ARFLAGS='cru'
6168       fi
6169     fi
6170   else
6171     if test -z "$ARFLAGS"; then
6172       ARFLAGS='cru'
6173     fi
6174   fi
6175
6176
6177   if test -z "$RANLIB"; then
6178     if test $gl_cv_c_amsterdam_compiler = yes; then
6179       RANLIB=':'
6180     else
6181             if test -n "$ac_tool_prefix"; then
6182   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6183 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6185 $as_echo_n "checking for $ac_word... " >&6; }
6186 if ${ac_cv_prog_RANLIB+:} false; then :
6187   $as_echo_n "(cached) " >&6
6188 else
6189   if test -n "$RANLIB"; then
6190   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6191 else
6192 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6193 for as_dir in $PATH
6194 do
6195   IFS=$as_save_IFS
6196   test -z "$as_dir" && as_dir=.
6197     for ac_exec_ext in '' $ac_executable_extensions; do
6198   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6199     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6200     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6201     break 2
6202   fi
6203 done
6204   done
6205 IFS=$as_save_IFS
6206
6207 fi
6208 fi
6209 RANLIB=$ac_cv_prog_RANLIB
6210 if test -n "$RANLIB"; then
6211   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6212 $as_echo "$RANLIB" >&6; }
6213 else
6214   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6215 $as_echo "no" >&6; }
6216 fi
6217
6218
6219 fi
6220 if test -z "$ac_cv_prog_RANLIB"; then
6221   ac_ct_RANLIB=$RANLIB
6222   # Extract the first word of "ranlib", so it can be a program name with args.
6223 set dummy ranlib; ac_word=$2
6224 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6225 $as_echo_n "checking for $ac_word... " >&6; }
6226 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
6227   $as_echo_n "(cached) " >&6
6228 else
6229   if test -n "$ac_ct_RANLIB"; then
6230   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6231 else
6232 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6233 for as_dir in $PATH
6234 do
6235   IFS=$as_save_IFS
6236   test -z "$as_dir" && as_dir=.
6237     for ac_exec_ext in '' $ac_executable_extensions; do
6238   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6239     ac_cv_prog_ac_ct_RANLIB="ranlib"
6240     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6241     break 2
6242   fi
6243 done
6244   done
6245 IFS=$as_save_IFS
6246
6247 fi
6248 fi
6249 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6250 if test -n "$ac_ct_RANLIB"; then
6251   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6252 $as_echo "$ac_ct_RANLIB" >&6; }
6253 else
6254   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6255 $as_echo "no" >&6; }
6256 fi
6257
6258   if test "x$ac_ct_RANLIB" = x; then
6259     RANLIB=":"
6260   else
6261     case $cross_compiling:$ac_tool_warned in
6262 yes:)
6263 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6264 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6265 ac_tool_warned=yes ;;
6266 esac
6267     RANLIB=$ac_ct_RANLIB
6268   fi
6269 else
6270   RANLIB="$ac_cv_prog_RANLIB"
6271 fi
6272
6273     fi
6274   fi
6275
6276
6277
6278 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6279 $as_echo_n "checking for ANSI C header files... " >&6; }
6280 if ${ac_cv_header_stdc+:} false; then :
6281   $as_echo_n "(cached) " >&6
6282 else
6283   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6284 /* end confdefs.h.  */
6285 #include <stdlib.h>
6286 #include <stdarg.h>
6287 #include <string.h>
6288 #include <float.h>
6289
6290 int
6291 main ()
6292 {
6293
6294   ;
6295   return 0;
6296 }
6297 _ACEOF
6298 if ac_fn_c_try_compile "$LINENO"; then :
6299   ac_cv_header_stdc=yes
6300 else
6301   ac_cv_header_stdc=no
6302 fi
6303 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6304
6305 if test $ac_cv_header_stdc = yes; then
6306   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6307   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6308 /* end confdefs.h.  */
6309 #include <string.h>
6310
6311 _ACEOF
6312 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6313   $EGREP "memchr" >/dev/null 2>&1; then :
6314
6315 else
6316   ac_cv_header_stdc=no
6317 fi
6318 rm -f conftest*
6319
6320 fi
6321
6322 if test $ac_cv_header_stdc = yes; then
6323   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6324   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6325 /* end confdefs.h.  */
6326 #include <stdlib.h>
6327
6328 _ACEOF
6329 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6330   $EGREP "free" >/dev/null 2>&1; then :
6331
6332 else
6333   ac_cv_header_stdc=no
6334 fi
6335 rm -f conftest*
6336
6337 fi
6338
6339 if test $ac_cv_header_stdc = yes; then
6340   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6341   if test "$cross_compiling" = yes; then :
6342   :
6343 else
6344   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6345 /* end confdefs.h.  */
6346 #include <ctype.h>
6347 #include <stdlib.h>
6348 #if ((' ' & 0x0FF) == 0x020)
6349 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6350 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6351 #else
6352 # define ISLOWER(c) \
6353                    (('a' <= (c) && (c) <= 'i') \
6354                      || ('j' <= (c) && (c) <= 'r') \
6355                      || ('s' <= (c) && (c) <= 'z'))
6356 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6357 #endif
6358
6359 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6360 int
6361 main ()
6362 {
6363   int i;
6364   for (i = 0; i < 256; i++)
6365     if (XOR (islower (i), ISLOWER (i))
6366         || toupper (i) != TOUPPER (i))
6367       return 2;
6368   return 0;
6369 }
6370 _ACEOF
6371 if ac_fn_c_try_run "$LINENO"; then :
6372
6373 else
6374   ac_cv_header_stdc=no
6375 fi
6376 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6377   conftest.$ac_objext conftest.beam conftest.$ac_ext
6378 fi
6379
6380 fi
6381 fi
6382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6383 $as_echo "$ac_cv_header_stdc" >&6; }
6384 if test $ac_cv_header_stdc = yes; then
6385
6386 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
6387
6388 fi
6389
6390 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
6391 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
6392                   inttypes.h stdint.h unistd.h
6393 do :
6394   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6395 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
6396 "
6397 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6398   cat >>confdefs.h <<_ACEOF
6399 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6400 _ACEOF
6401
6402 fi
6403
6404 done
6405
6406
6407
6408   ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
6409 if test "x$ac_cv_header_minix_config_h" = xyes; then :
6410   MINIX=yes
6411 else
6412   MINIX=
6413 fi
6414
6415
6416   if test "$MINIX" = yes; then
6417
6418 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
6419
6420
6421 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
6422
6423
6424 $as_echo "#define _MINIX 1" >>confdefs.h
6425
6426
6427 $as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
6428
6429   fi
6430
6431
6432   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
6433 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
6434 if ${ac_cv_safe_to_define___extensions__+:} false; then :
6435   $as_echo_n "(cached) " >&6
6436 else
6437   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6438 /* end confdefs.h.  */
6439
6440 #         define __EXTENSIONS__ 1
6441           $ac_includes_default
6442 int
6443 main ()
6444 {
6445
6446   ;
6447   return 0;
6448 }
6449 _ACEOF
6450 if ac_fn_c_try_compile "$LINENO"; then :
6451   ac_cv_safe_to_define___extensions__=yes
6452 else
6453   ac_cv_safe_to_define___extensions__=no
6454 fi
6455 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6456 fi
6457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
6458 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
6459   test $ac_cv_safe_to_define___extensions__ = yes &&
6460     $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
6461
6462   $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
6463
6464   $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
6465
6466   $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
6467
6468   $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
6469
6470   $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
6471
6472   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
6473 $as_echo_n "checking whether _XOPEN_SOURCE should be defined... " >&6; }
6474 if ${ac_cv_should_define__xopen_source+:} false; then :
6475   $as_echo_n "(cached) " >&6
6476 else
6477   ac_cv_should_define__xopen_source=no
6478      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6479 /* end confdefs.h.  */
6480
6481           #include <wchar.h>
6482           mbstate_t x;
6483 int
6484 main ()
6485 {
6486
6487   ;
6488   return 0;
6489 }
6490 _ACEOF
6491 if ac_fn_c_try_compile "$LINENO"; then :
6492
6493 else
6494   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6495 /* end confdefs.h.  */
6496
6497              #define _XOPEN_SOURCE 500
6498              #include <wchar.h>
6499              mbstate_t x;
6500 int
6501 main ()
6502 {
6503
6504   ;
6505   return 0;
6506 }
6507 _ACEOF
6508 if ac_fn_c_try_compile "$LINENO"; then :
6509   ac_cv_should_define__xopen_source=yes
6510 fi
6511 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6512 fi
6513 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6514 fi
6515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
6516 $as_echo "$ac_cv_should_define__xopen_source" >&6; }
6517   test $ac_cv_should_define__xopen_source = yes &&
6518     $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
6519
6520
6521
6522
6523
6524
6525
6526
6527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
6528 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
6529 if ${ac_cv_sys_largefile_source+:} false; then :
6530   $as_echo_n "(cached) " >&6
6531 else
6532   while :; do
6533   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6534 /* end confdefs.h.  */
6535 #include <sys/types.h> /* for off_t */
6536      #include <stdio.h>
6537 int
6538 main ()
6539 {
6540 int (*fp) (FILE *, off_t, int) = fseeko;
6541      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
6542   ;
6543   return 0;
6544 }
6545 _ACEOF
6546 if ac_fn_c_try_link "$LINENO"; then :
6547   ac_cv_sys_largefile_source=no; break
6548 fi
6549 rm -f core conftest.err conftest.$ac_objext \
6550     conftest$ac_exeext conftest.$ac_ext
6551   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6552 /* end confdefs.h.  */
6553 #define _LARGEFILE_SOURCE 1
6554 #include <sys/types.h> /* for off_t */
6555      #include <stdio.h>
6556 int
6557 main ()
6558 {
6559 int (*fp) (FILE *, off_t, int) = fseeko;
6560      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
6561   ;
6562   return 0;
6563 }
6564 _ACEOF
6565 if ac_fn_c_try_link "$LINENO"; then :
6566   ac_cv_sys_largefile_source=1; break
6567 fi
6568 rm -f core conftest.err conftest.$ac_objext \
6569     conftest$ac_exeext conftest.$ac_ext
6570   ac_cv_sys_largefile_source=unknown
6571   break
6572 done
6573 fi
6574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
6575 $as_echo "$ac_cv_sys_largefile_source" >&6; }
6576 case $ac_cv_sys_largefile_source in #(
6577   no | unknown) ;;
6578   *)
6579 cat >>confdefs.h <<_ACEOF
6580 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
6581 _ACEOF
6582 ;;
6583 esac
6584 rm -rf conftest*
6585
6586 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
6587 # in glibc 2.1.3, but that breaks too many other things.
6588 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
6589 if test $ac_cv_sys_largefile_source != unknown; then
6590
6591 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
6592
6593 fi
6594
6595 # Check whether --enable-largefile was given.
6596 if test "${enable_largefile+set}" = set; then :
6597   enableval=$enable_largefile;
6598 fi
6599
6600 if test "$enable_largefile" != no; then
6601
6602   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
6603 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
6604 if ${ac_cv_sys_largefile_CC+:} false; then :
6605   $as_echo_n "(cached) " >&6
6606 else
6607   ac_cv_sys_largefile_CC=no
6608      if test "$GCC" != yes; then
6609        ac_save_CC=$CC
6610        while :; do
6611          # IRIX 6.2 and later do not support large files by default,
6612          # so use the C compiler's -n32 option if that helps.
6613          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6614 /* end confdefs.h.  */
6615 #include <sys/types.h>
6616  /* Check that off_t can represent 2**63 - 1 correctly.
6617     We can't simply define LARGE_OFF_T to be 9223372036854775807,
6618     since some C++ compilers masquerading as C compilers
6619     incorrectly reject 9223372036854775807.  */
6620 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6621   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6622                        && LARGE_OFF_T % 2147483647 == 1)
6623                       ? 1 : -1];
6624 int
6625 main ()
6626 {
6627
6628   ;
6629   return 0;
6630 }
6631 _ACEOF
6632          if ac_fn_c_try_compile "$LINENO"; then :
6633   break
6634 fi
6635 rm -f core conftest.err conftest.$ac_objext
6636          CC="$CC -n32"
6637          if ac_fn_c_try_compile "$LINENO"; then :
6638   ac_cv_sys_largefile_CC=' -n32'; break
6639 fi
6640 rm -f core conftest.err conftest.$ac_objext
6641          break
6642        done
6643        CC=$ac_save_CC
6644        rm -f conftest.$ac_ext
6645     fi
6646 fi
6647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
6648 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
6649   if test "$ac_cv_sys_largefile_CC" != no; then
6650     CC=$CC$ac_cv_sys_largefile_CC
6651   fi
6652
6653   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
6654 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
6655 if ${ac_cv_sys_file_offset_bits+:} false; then :
6656   $as_echo_n "(cached) " >&6
6657 else
6658   while :; do
6659   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6660 /* end confdefs.h.  */
6661 #include <sys/types.h>
6662  /* Check that off_t can represent 2**63 - 1 correctly.
6663     We can't simply define LARGE_OFF_T to be 9223372036854775807,
6664     since some C++ compilers masquerading as C compilers
6665     incorrectly reject 9223372036854775807.  */
6666 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6667   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6668                        && LARGE_OFF_T % 2147483647 == 1)
6669                       ? 1 : -1];
6670 int
6671 main ()
6672 {
6673
6674   ;
6675   return 0;
6676 }
6677 _ACEOF
6678 if ac_fn_c_try_compile "$LINENO"; then :
6679   ac_cv_sys_file_offset_bits=no; break
6680 fi
6681 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6682   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6683 /* end confdefs.h.  */
6684 #define _FILE_OFFSET_BITS 64
6685 #include <sys/types.h>
6686  /* Check that off_t can represent 2**63 - 1 correctly.
6687     We can't simply define LARGE_OFF_T to be 9223372036854775807,
6688     since some C++ compilers masquerading as C compilers
6689     incorrectly reject 9223372036854775807.  */
6690 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6691   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6692                        && LARGE_OFF_T % 2147483647 == 1)
6693                       ? 1 : -1];
6694 int
6695 main ()
6696 {
6697
6698   ;
6699   return 0;
6700 }
6701 _ACEOF
6702 if ac_fn_c_try_compile "$LINENO"; then :
6703   ac_cv_sys_file_offset_bits=64; break
6704 fi
6705 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6706   ac_cv_sys_file_offset_bits=unknown
6707   break
6708 done
6709 fi
6710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
6711 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
6712 case $ac_cv_sys_file_offset_bits in #(
6713   no | unknown) ;;
6714   *)
6715 cat >>confdefs.h <<_ACEOF
6716 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
6717 _ACEOF
6718 ;;
6719 esac
6720 rm -rf conftest*
6721   if test $ac_cv_sys_file_offset_bits = unknown; then
6722     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
6723 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
6724 if ${ac_cv_sys_large_files+:} false; then :
6725   $as_echo_n "(cached) " >&6
6726 else
6727   while :; do
6728   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6729 /* end confdefs.h.  */
6730 #include <sys/types.h>
6731  /* Check that off_t can represent 2**63 - 1 correctly.
6732     We can't simply define LARGE_OFF_T to be 9223372036854775807,
6733     since some C++ compilers masquerading as C compilers
6734     incorrectly reject 9223372036854775807.  */
6735 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6736   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6737                        && LARGE_OFF_T % 2147483647 == 1)
6738                       ? 1 : -1];
6739 int
6740 main ()
6741 {
6742
6743   ;
6744   return 0;
6745 }
6746 _ACEOF
6747 if ac_fn_c_try_compile "$LINENO"; then :
6748   ac_cv_sys_large_files=no; break
6749 fi
6750 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6751   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6752 /* end confdefs.h.  */
6753 #define _LARGE_FILES 1
6754 #include <sys/types.h>
6755  /* Check that off_t can represent 2**63 - 1 correctly.
6756     We can't simply define LARGE_OFF_T to be 9223372036854775807,
6757     since some C++ compilers masquerading as C compilers
6758     incorrectly reject 9223372036854775807.  */
6759 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6760   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6761                        && LARGE_OFF_T % 2147483647 == 1)
6762                       ? 1 : -1];
6763 int
6764 main ()
6765 {
6766
6767   ;
6768   return 0;
6769 }
6770 _ACEOF
6771 if ac_fn_c_try_compile "$LINENO"; then :
6772   ac_cv_sys_large_files=1; break
6773 fi
6774 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6775   ac_cv_sys_large_files=unknown
6776   break
6777 done
6778 fi
6779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
6780 $as_echo "$ac_cv_sys_large_files" >&6; }
6781 case $ac_cv_sys_large_files in #(
6782   no | unknown) ;;
6783   *)
6784 cat >>confdefs.h <<_ACEOF
6785 #define _LARGE_FILES $ac_cv_sys_large_files
6786 _ACEOF
6787 ;;
6788 esac
6789 rm -rf conftest*
6790   fi
6791
6792
6793 $as_echo "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h
6794
6795 fi
6796
6797
6798
6799
6800   # Code from module absolute-header:
6801   # Code from module acl:
6802   # Code from module alloca:
6803   # Code from module alloca-opt:
6804   # Code from module allocator:
6805   # Code from module areadlink:
6806   # Code from module areadlinkat:
6807   # Code from module argmatch:
6808   # Code from module argp:
6809   # Code from module argp-version-etc:
6810   # Code from module at-internal:
6811   # Code from module backupfile:
6812   # Code from module bitrotate:
6813   # Code from module btowc:
6814   # Code from module c-ctype:
6815   # Code from module c-strcase:
6816   # Code from module c-strcaseeq:
6817   # Code from module canonicalize-lgpl:
6818   # Code from module careadlinkat:
6819   # Code from module chdir:
6820   # Code from module chdir-long:
6821   # Code from module chown:
6822   # Code from module clock-time:
6823   # Code from module cloexec:
6824   # Code from module close:
6825   # Code from module close-stream:
6826   # Code from module closedir:
6827   # Code from module closeout:
6828   # Code from module configmake:
6829   # Code from module d-ino:
6830   # Code from module dirent:
6831   # Code from module dirent-safer:
6832   # Code from module dirfd:
6833   # Code from module dirname:
6834   # Code from module dirname-lgpl:
6835   # Code from module dosname:
6836   # Code from module double-slash-root:
6837   # Code from module dup:
6838   # Code from module dup2:
6839   # Code from module environ:
6840   # Code from module errno:
6841   # Code from module error:
6842   # Code from module euidaccess:
6843   # Code from module exclude:
6844   # Code from module exitfail:
6845   # Code from module extensions:
6846
6847   # Code from module extern-inline:
6848   # Code from module faccessat:
6849   # Code from module fchdir:
6850   # Code from module fchmodat:
6851   # Code from module fchownat:
6852   # Code from module fcntl:
6853   # Code from module fcntl-h:
6854   # Code from module fd-hook:
6855   # Code from module fdopendir:
6856   # Code from module fdutimensat:
6857   # Code from module fileblocks:
6858   # Code from module filename:
6859   # Code from module filenamecat-lgpl:
6860   # Code from module float:
6861   # Code from module fnmatch:
6862   # Code from module fnmatch-gnu:
6863   # Code from module fpending:
6864   # Code from module fprintftime:
6865   # Code from module fseek:
6866   # Code from module fseeko:
6867
6868   # Code from module fstat:
6869   # Code from module fstatat:
6870   # Code from module full-write:
6871   # Code from module futimens:
6872   # Code from module getcwd:
6873   # Code from module getcwd-lgpl:
6874   # Code from module getdelim:
6875   # Code from module getdtablesize:
6876   # Code from module getgroups:
6877   # Code from module getline:
6878   # Code from module getopt-gnu:
6879   # Code from module getopt-posix:
6880   # Code from module getpagesize:
6881   # Code from module gettext:
6882   # Code from module gettext-h:
6883   # Code from module gettime:
6884   # Code from module gettimeofday:
6885   # Code from module gitlog-to-changelog:
6886   # Code from module group-member:
6887   # Code from module hash:
6888   # Code from module havelib:
6889   # Code from module human:
6890   # Code from module include_next:
6891   # Code from module intprops:
6892   # Code from module inttostr:
6893   # Code from module inttypes:
6894   # Code from module inttypes-incomplete:
6895   # Code from module isatty:
6896   # Code from module iswblank:
6897   # Code from module langinfo:
6898   # Code from module largefile:
6899
6900   # Code from module lchown:
6901   # Code from module link:
6902   # Code from module link-follow:
6903   # Code from module linkat:
6904   # Code from module localcharset:
6905   # Code from module locale:
6906   # Code from module localeconv:
6907   # Code from module lseek:
6908   # Code from module lstat:
6909   # Code from module malloc-gnu:
6910   # Code from module malloc-posix:
6911   # Code from module malloca:
6912   # Code from module manywarnings:
6913   # Code from module mbchar:
6914   # Code from module mbrtowc:
6915   # Code from module mbscasecmp:
6916   # Code from module mbsinit:
6917   # Code from module mbsrtowcs:
6918   # Code from module mbtowc:
6919   # Code from module mbuiter:
6920   # Code from module memchr:
6921   # Code from module mempcpy:
6922   # Code from module memrchr:
6923   # Code from module mkdir:
6924   # Code from module mkdirat:
6925   # Code from module mkdtemp:
6926   # Code from module mkfifo:
6927   # Code from module mkfifoat:
6928   # Code from module mknod:
6929   # Code from module mktime:
6930   # Code from module modechange:
6931   # Code from module msvc-inval:
6932   # Code from module msvc-nothrow:
6933   # Code from module multiarch:
6934   # Code from module nl_langinfo:
6935   # Code from module nocrash:
6936   # Code from module obstack:
6937   # Code from module open:
6938   # Code from module openat:
6939   # Code from module openat-die:
6940   # Code from module openat-h:
6941   # Code from module opendir:
6942   # Code from module parse-datetime:
6943   # Code from module pathmax:
6944   # Code from module posix_openpt:
6945   # Code from module priv-set:
6946   # Code from module progname:
6947   # Code from module ptsname:
6948   # Code from module ptsname_r:
6949   # Code from module qacl:
6950   # Code from module quote:
6951   # Code from module quotearg:
6952   # Code from module quotearg-simple:
6953   # Code from module raise:
6954   # Code from module rawmemchr:
6955   # Code from module read:
6956   # Code from module readdir:
6957   # Code from module readlink:
6958   # Code from module readlinkat:
6959   # Code from module realloc-posix:
6960   # Code from module regex:
6961   # Code from module rename:
6962   # Code from module renameat:
6963   # Code from module rewinddir:
6964   # Code from module rmdir:
6965   # Code from module root-uid:
6966   # Code from module rpmatch:
6967   # Code from module safe-read:
6968   # Code from module safe-write:
6969   # Code from module same-inode:
6970   # Code from module save-cwd:
6971   # Code from module savedir:
6972   # Code from module secure_getenv:
6973   # Code from module selinux-at:
6974   # Code from module selinux-h:
6975   # Code from module setenv:
6976   # Code from module signal-h:
6977   # Code from module size_max:
6978   # Code from module sleep:
6979   # Code from module snippet/_Noreturn:
6980   # Code from module snippet/arg-nonnull:
6981   # Code from module snippet/c++defs:
6982   # Code from module snippet/unused-parameter:
6983   # Code from module snippet/warn-on-use:
6984   # Code from module snprintf:
6985   # Code from module ssize_t:
6986   # Code from module stat:
6987   # Code from module stat-macros:
6988   # Code from module stat-time:
6989   # Code from module statat:
6990   # Code from module stdalign:
6991   # Code from module stdarg:
6992
6993
6994
6995   # Code from module stdbool:
6996   # Code from module stddef:
6997   # Code from module stdint:
6998   # Code from module stdio:
6999   # Code from module stdlib:
7000   # Code from module stpcpy:
7001   # Code from module strcase:
7002   # Code from module strchrnul:
7003   # Code from module strdup-posix:
7004   # Code from module streq:
7005   # Code from module strerror:
7006   # Code from module strerror-override:
7007   # Code from module strftime:
7008   # Code from module string:
7009   # Code from module strings:
7010   # Code from module strndup:
7011   # Code from module strnlen:
7012   # Code from module strnlen1:
7013   # Code from module strtoimax:
7014   # Code from module strtol:
7015   # Code from module strtoll:
7016   # Code from module strtoul:
7017   # Code from module strtoull:
7018   # Code from module strtoumax:
7019   # Code from module symlink:
7020   # Code from module symlinkat:
7021   # Code from module sys_stat:
7022   # Code from module sys_time:
7023   # Code from module sys_types:
7024   # Code from module sysexits:
7025   # Code from module tempname:
7026   # Code from module time:
7027   # Code from module time_r:
7028   # Code from module timespec:
7029   # Code from module ttyname_r:
7030   # Code from module unistd:
7031   # Code from module unistd-safer:
7032   # Code from module unitypes:
7033   # Code from module uniwidth/base:
7034   # Code from module uniwidth/width:
7035   # Code from module unlink:
7036   # Code from module unlinkat:
7037   # Code from module unlinkdir:
7038   # Code from module unlocked-io:
7039   # Code from module unlockpt:
7040   # Code from module unsetenv:
7041   # Code from module utimens:
7042   # Code from module utimensat:
7043   # Code from module vasnprintf:
7044   # Code from module vasprintf:
7045   # Code from module verify:
7046   # Code from module version-etc:
7047   # Code from module version-etc-fsf:
7048   # Code from module vsnprintf:
7049   # Code from module warnings:
7050   # Code from module wchar:
7051   # Code from module wcrtomb:
7052   # Code from module wctype-h:
7053   # Code from module wcwidth:
7054   # Code from module write:
7055   # Code from module xalloc:
7056   # Code from module xalloc-die:
7057   # Code from module xalloc-oversized:
7058   # Code from module xgetcwd:
7059   # Code from module xsize:
7060   # Code from module xstrndup:
7061   # Code from module xstrtol:
7062   # Code from module xstrtoumax:
7063   # Code from module xvasprintf:
7064
7065 if test -n "$ac_tool_prefix"; then
7066   for ac_prog in ar
7067   do
7068     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7069 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7070 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7071 $as_echo_n "checking for $ac_word... " >&6; }
7072 if ${ac_cv_prog_AR+:} false; then :
7073   $as_echo_n "(cached) " >&6
7074 else
7075   if test -n "$AR"; then
7076   ac_cv_prog_AR="$AR" # Let the user override the test.
7077 else
7078 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7079 for as_dir in $PATH
7080 do
7081   IFS=$as_save_IFS
7082   test -z "$as_dir" && as_dir=.
7083     for ac_exec_ext in '' $ac_executable_extensions; do
7084   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7085     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
7086     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7087     break 2
7088   fi
7089 done
7090   done
7091 IFS=$as_save_IFS
7092
7093 fi
7094 fi
7095 AR=$ac_cv_prog_AR
7096 if test -n "$AR"; then
7097   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7098 $as_echo "$AR" >&6; }
7099 else
7100   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7101 $as_echo "no" >&6; }
7102 fi
7103
7104
7105     test -n "$AR" && break
7106   done
7107 fi
7108 if test -z "$AR"; then
7109   ac_ct_AR=$AR
7110   for ac_prog in ar
7111 do
7112   # Extract the first word of "$ac_prog", so it can be a program name with args.
7113 set dummy $ac_prog; ac_word=$2
7114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7115 $as_echo_n "checking for $ac_word... " >&6; }
7116 if ${ac_cv_prog_ac_ct_AR+:} false; then :
7117   $as_echo_n "(cached) " >&6
7118 else
7119   if test -n "$ac_ct_AR"; then
7120   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7121 else
7122 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7123 for as_dir in $PATH
7124 do
7125   IFS=$as_save_IFS
7126   test -z "$as_dir" && as_dir=.
7127     for ac_exec_ext in '' $ac_executable_extensions; do
7128   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7129     ac_cv_prog_ac_ct_AR="$ac_prog"
7130     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7131     break 2
7132   fi
7133 done
7134   done
7135 IFS=$as_save_IFS
7136
7137 fi
7138 fi
7139 ac_ct_AR=$ac_cv_prog_ac_ct_AR
7140 if test -n "$ac_ct_AR"; then
7141   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
7142 $as_echo "$ac_ct_AR" >&6; }
7143 else
7144   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7145 $as_echo "no" >&6; }
7146 fi
7147
7148
7149   test -n "$ac_ct_AR" && break
7150 done
7151
7152   if test "x$ac_ct_AR" = x; then
7153     AR=""
7154   else
7155     case $cross_compiling:$ac_tool_warned in
7156 yes:)
7157 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7158 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7159 ac_tool_warned=yes ;;
7160 esac
7161     AR=$ac_ct_AR
7162   fi
7163 fi
7164
7165
7166 # Check whether --enable-largefile was given.
7167 if test "${enable_largefile+set}" = set; then :
7168   enableval=$enable_largefile;
7169 fi
7170
7171 if test "$enable_largefile" != no; then
7172
7173   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
7174 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
7175 if ${ac_cv_sys_largefile_CC+:} false; then :
7176   $as_echo_n "(cached) " >&6
7177 else
7178   ac_cv_sys_largefile_CC=no
7179      if test "$GCC" != yes; then
7180        ac_save_CC=$CC
7181        while :; do
7182          # IRIX 6.2 and later do not support large files by default,
7183          # so use the C compiler's -n32 option if that helps.
7184          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7185 /* end confdefs.h.  */
7186 #include <sys/types.h>
7187  /* Check that off_t can represent 2**63 - 1 correctly.
7188     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7189     since some C++ compilers masquerading as C compilers
7190     incorrectly reject 9223372036854775807.  */
7191 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7192   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7193                        && LARGE_OFF_T % 2147483647 == 1)
7194                       ? 1 : -1];
7195 int
7196 main ()
7197 {
7198
7199   ;
7200   return 0;
7201 }
7202 _ACEOF
7203          if ac_fn_c_try_compile "$LINENO"; then :
7204   break
7205 fi
7206 rm -f core conftest.err conftest.$ac_objext
7207          CC="$CC -n32"
7208          if ac_fn_c_try_compile "$LINENO"; then :
7209   ac_cv_sys_largefile_CC=' -n32'; break
7210 fi
7211 rm -f core conftest.err conftest.$ac_objext
7212          break
7213        done
7214        CC=$ac_save_CC
7215        rm -f conftest.$ac_ext
7216     fi
7217 fi
7218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
7219 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
7220   if test "$ac_cv_sys_largefile_CC" != no; then
7221     CC=$CC$ac_cv_sys_largefile_CC
7222   fi
7223
7224   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
7225 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
7226 if ${ac_cv_sys_file_offset_bits+:} false; then :
7227   $as_echo_n "(cached) " >&6
7228 else
7229   while :; do
7230   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7231 /* end confdefs.h.  */
7232 #include <sys/types.h>
7233  /* Check that off_t can represent 2**63 - 1 correctly.
7234     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7235     since some C++ compilers masquerading as C compilers
7236     incorrectly reject 9223372036854775807.  */
7237 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7238   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7239                        && LARGE_OFF_T % 2147483647 == 1)
7240                       ? 1 : -1];
7241 int
7242 main ()
7243 {
7244
7245   ;
7246   return 0;
7247 }
7248 _ACEOF
7249 if ac_fn_c_try_compile "$LINENO"; then :
7250   ac_cv_sys_file_offset_bits=no; break
7251 fi
7252 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7253   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7254 /* end confdefs.h.  */
7255 #define _FILE_OFFSET_BITS 64
7256 #include <sys/types.h>
7257  /* Check that off_t can represent 2**63 - 1 correctly.
7258     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7259     since some C++ compilers masquerading as C compilers
7260     incorrectly reject 9223372036854775807.  */
7261 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7262   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7263                        && LARGE_OFF_T % 2147483647 == 1)
7264                       ? 1 : -1];
7265 int
7266 main ()
7267 {
7268
7269   ;
7270   return 0;
7271 }
7272 _ACEOF
7273 if ac_fn_c_try_compile "$LINENO"; then :
7274   ac_cv_sys_file_offset_bits=64; break
7275 fi
7276 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7277   ac_cv_sys_file_offset_bits=unknown
7278   break
7279 done
7280 fi
7281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
7282 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
7283 case $ac_cv_sys_file_offset_bits in #(
7284   no | unknown) ;;
7285   *)
7286 cat >>confdefs.h <<_ACEOF
7287 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
7288 _ACEOF
7289 ;;
7290 esac
7291 rm -rf conftest*
7292   if test $ac_cv_sys_file_offset_bits = unknown; then
7293     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
7294 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
7295 if ${ac_cv_sys_large_files+:} false; then :
7296   $as_echo_n "(cached) " >&6
7297 else
7298   while :; do
7299   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7300 /* end confdefs.h.  */
7301 #include <sys/types.h>
7302  /* Check that off_t can represent 2**63 - 1 correctly.
7303     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7304     since some C++ compilers masquerading as C compilers
7305     incorrectly reject 9223372036854775807.  */
7306 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7307   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7308                        && LARGE_OFF_T % 2147483647 == 1)
7309                       ? 1 : -1];
7310 int
7311 main ()
7312 {
7313
7314   ;
7315   return 0;
7316 }
7317 _ACEOF
7318 if ac_fn_c_try_compile "$LINENO"; then :
7319   ac_cv_sys_large_files=no; break
7320 fi
7321 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7322   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7323 /* end confdefs.h.  */
7324 #define _LARGE_FILES 1
7325 #include <sys/types.h>
7326  /* Check that off_t can represent 2**63 - 1 correctly.
7327     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7328     since some C++ compilers masquerading as C compilers
7329     incorrectly reject 9223372036854775807.  */
7330 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7331   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7332                        && LARGE_OFF_T % 2147483647 == 1)
7333                       ? 1 : -1];
7334 int
7335 main ()
7336 {
7337
7338   ;
7339   return 0;
7340 }
7341 _ACEOF
7342 if ac_fn_c_try_compile "$LINENO"; then :
7343   ac_cv_sys_large_files=1; break
7344 fi
7345 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7346   ac_cv_sys_large_files=unknown
7347   break
7348 done
7349 fi
7350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
7351 $as_echo "$ac_cv_sys_large_files" >&6; }
7352 case $ac_cv_sys_large_files in #(
7353   no | unknown) ;;
7354   *)
7355 cat >>confdefs.h <<_ACEOF
7356 #define _LARGE_FILES $ac_cv_sys_large_files
7357 _ACEOF
7358 ;;
7359 esac
7360 rm -rf conftest*
7361   fi
7362
7363
7364 $as_echo "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h
7365
7366 fi
7367
7368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
7369 $as_echo_n "checking for inline... " >&6; }
7370 if ${ac_cv_c_inline+:} false; then :
7371   $as_echo_n "(cached) " >&6
7372 else
7373   ac_cv_c_inline=no
7374 for ac_kw in inline __inline__ __inline; do
7375   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7376 /* end confdefs.h.  */
7377 #ifndef __cplusplus
7378 typedef int foo_t;
7379 static $ac_kw foo_t static_foo () {return 0; }
7380 $ac_kw foo_t foo () {return 0; }
7381 #endif
7382
7383 _ACEOF
7384 if ac_fn_c_try_compile "$LINENO"; then :
7385   ac_cv_c_inline=$ac_kw
7386 fi
7387 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7388   test "$ac_cv_c_inline" != no && break
7389 done
7390
7391 fi
7392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
7393 $as_echo "$ac_cv_c_inline" >&6; }
7394
7395 case $ac_cv_c_inline in
7396   inline | yes) ;;
7397   *)
7398     case $ac_cv_c_inline in
7399       no) ac_val=;;
7400       *) ac_val=$ac_cv_c_inline;;
7401     esac
7402     cat >>confdefs.h <<_ACEOF
7403 #ifndef __cplusplus
7404 #define inline $ac_val
7405 #endif
7406 _ACEOF
7407     ;;
7408 esac
7409
7410
7411
7412
7413
7414   for ac_header in $ac_header_list
7415 do :
7416   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7417 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
7418 "
7419 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7420   cat >>confdefs.h <<_ACEOF
7421 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7422 _ACEOF
7423
7424 fi
7425
7426 done
7427
7428
7429
7430
7431
7432
7433
7434
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 for ac_header in sys/buf.h
7465 do :
7466   ac_fn_c_check_header_compile "$LINENO" "sys/buf.h" "ac_cv_header_sys_buf_h" "#if HAVE_SYS_PARAM_H
7467 #include <sys/param.h>
7468 #endif
7469 "
7470 if test "x$ac_cv_header_sys_buf_h" = xyes; then :
7471   cat >>confdefs.h <<_ACEOF
7472 #define HAVE_SYS_BUF_H 1
7473 _ACEOF
7474
7475 fi
7476
7477 done
7478
7479
7480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7481 $as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
7482 if ${ac_cv_header_sys_types_h_makedev+:} false; then :
7483   $as_echo_n "(cached) " >&6
7484 else
7485   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7486 /* end confdefs.h.  */
7487 #include <sys/types.h>
7488 int
7489 main ()
7490 {
7491 return makedev(0, 0);
7492   ;
7493   return 0;
7494 }
7495 _ACEOF
7496 if ac_fn_c_try_link "$LINENO"; then :
7497   ac_cv_header_sys_types_h_makedev=yes
7498 else
7499   ac_cv_header_sys_types_h_makedev=no
7500 fi
7501 rm -f core conftest.err conftest.$ac_objext \
7502     conftest$ac_exeext conftest.$ac_ext
7503
7504 fi
7505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7506 $as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
7507
7508 if test $ac_cv_header_sys_types_h_makedev = no; then
7509 ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
7510 if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
7511
7512 $as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
7513
7514 fi
7515
7516
7517
7518   if test $ac_cv_header_sys_mkdev_h = no; then
7519     ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
7520 if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
7521
7522 $as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
7523
7524 fi
7525
7526
7527   fi
7528 fi
7529
7530
7531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for st_fstype string in struct stat" >&5
7532 $as_echo_n "checking for st_fstype string in struct stat... " >&6; }
7533 if ${diff_cv_st_fstype_string+:} false; then :
7534   $as_echo_n "(cached) " >&6
7535 else
7536   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7537 /* end confdefs.h.  */
7538 #include <sys/types.h>
7539 #include <sys/stat.h>
7540 int
7541 main ()
7542 {
7543 struct stat s; s.st_fstype[0] = 'x';
7544   ;
7545   return 0;
7546 }
7547 _ACEOF
7548 if ac_fn_c_try_compile "$LINENO"; then :
7549   diff_cv_st_fstype_string=yes
7550 else
7551   diff_cv_st_fstype_string=no
7552 fi
7553 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7554 fi
7555
7556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $diff_cv_st_fstype_string" >&5
7557 $as_echo "$diff_cv_st_fstype_string" >&6; }
7558 if test $diff_cv_st_fstype_string = yes; then
7559
7560 $as_echo "#define HAVE_ST_FSTYPE_STRING 1" >>confdefs.h
7561
7562 fi
7563
7564 # even if we use gnulib's acl.h with integrated m4 file later on (used because
7565 # of very useful file_has_acl() function) we need following checks that restrict
7566 # tar to use POSIX.1e ACLs only.
7567
7568 # Check whether --with-posix-acls was given.
7569 if test "${with_posix_acls+set}" = set; then :
7570   withval=$with_posix_acls;
7571 else
7572   with_posix_acls=yes
7573 fi
7574
7575 if test "x$with_posix_acls" != "xno"; then
7576   for ac_header in sys/acl.h
7577 do :
7578   ac_fn_c_check_header_mongrel "$LINENO" "sys/acl.h" "ac_cv_header_sys_acl_h" "$ac_includes_default"
7579 if test "x$ac_cv_header_sys_acl_h" = xyes; then :
7580   cat >>confdefs.h <<_ACEOF
7581 #define HAVE_SYS_ACL_H 1
7582 _ACEOF
7583
7584 else
7585   with_posix_acls=no
7586 fi
7587
7588 done
7589
7590   for tar_acl_func in acl_get_file acl_get_fd acl_set_file acl_set_fd \
7591                       acl_to_text acl_from_text acl_delete_def_file \
7592                       acl_free; do \
7593     test "x$with_posix_acls" = xno && break
7594     as_ac_Search=`$as_echo "ac_cv_search_$tar_acl_func" | $as_tr_sh`
7595 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing $tar_acl_func" >&5
7596 $as_echo_n "checking for library containing $tar_acl_func... " >&6; }
7597 if eval \${$as_ac_Search+:} false; then :
7598   $as_echo_n "(cached) " >&6
7599 else
7600   ac_func_search_save_LIBS=$LIBS
7601 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7602 /* end confdefs.h.  */
7603
7604 /* Override any GCC internal prototype to avoid an error.
7605    Use char because int might match the return type of a GCC
7606    builtin and then its argument prototype would still apply.  */
7607 #ifdef __cplusplus
7608 extern "C"
7609 #endif
7610 char $tar_acl_func ();
7611 int
7612 main ()
7613 {
7614 return $tar_acl_func ();
7615   ;
7616   return 0;
7617 }
7618 _ACEOF
7619 for ac_lib in '' acl pacl; do
7620   if test -z "$ac_lib"; then
7621     ac_res="none required"
7622   else
7623     ac_res=-l$ac_lib
7624     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7625   fi
7626   if ac_fn_c_try_link "$LINENO"; then :
7627   eval "$as_ac_Search=\$ac_res"
7628 fi
7629 rm -f core conftest.err conftest.$ac_objext \
7630     conftest$ac_exeext
7631   if eval \${$as_ac_Search+:} false; then :
7632   break
7633 fi
7634 done
7635 if eval \${$as_ac_Search+:} false; then :
7636
7637 else
7638   eval "$as_ac_Search=no"
7639 fi
7640 rm conftest.$ac_ext
7641 LIBS=$ac_func_search_save_LIBS
7642 fi
7643 eval ac_res=\$$as_ac_Search
7644                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7645 $as_echo "$ac_res" >&6; }
7646 eval ac_res=\$$as_ac_Search
7647 if test "$ac_res" != no; then :
7648   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7649
7650 else
7651   with_posix_acls=no
7652 fi
7653
7654   done
7655   if test "x$with_posix_acls" != xno; then
7656
7657 $as_echo "#define HAVE_POSIX_ACLS /**/" >>confdefs.h
7658
7659   fi
7660 else
7661   # disable acls in gnulib's checks
7662   export enable_acl=no
7663 fi
7664
7665 ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
7666 if test "x$ac_cv_type_mode_t" = xyes; then :
7667
7668 else
7669
7670 cat >>confdefs.h <<_ACEOF
7671 #define mode_t int
7672 _ACEOF
7673
7674 fi
7675
7676 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
7677 if test "x$ac_cv_type_pid_t" = xyes; then :
7678
7679 else
7680
7681 cat >>confdefs.h <<_ACEOF
7682 #define pid_t int
7683 _ACEOF
7684
7685 fi
7686
7687 ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
7688 if test "x$ac_cv_type_off_t" = xyes; then :
7689
7690 else
7691
7692 cat >>confdefs.h <<_ACEOF
7693 #define off_t long int
7694 _ACEOF
7695
7696 fi
7697
7698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7699 $as_echo_n "checking for uid_t in sys/types.h... " >&6; }
7700 if ${ac_cv_type_uid_t+:} false; then :
7701   $as_echo_n "(cached) " >&6
7702 else
7703   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7704 /* end confdefs.h.  */
7705 #include <sys/types.h>
7706
7707 _ACEOF
7708 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7709   $EGREP "uid_t" >/dev/null 2>&1; then :
7710   ac_cv_type_uid_t=yes
7711 else
7712   ac_cv_type_uid_t=no
7713 fi
7714 rm -f conftest*
7715
7716 fi
7717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7718 $as_echo "$ac_cv_type_uid_t" >&6; }
7719 if test $ac_cv_type_uid_t = no; then
7720
7721 $as_echo "#define uid_t int" >>confdefs.h
7722
7723
7724 $as_echo "#define gid_t int" >>confdefs.h
7725
7726 fi
7727
7728 ac_fn_c_check_type "$LINENO" "major_t" "ac_cv_type_major_t" "$ac_includes_default"
7729 if test "x$ac_cv_type_major_t" = xyes; then :
7730
7731 else
7732
7733 $as_echo "#define major_t int" >>confdefs.h
7734
7735 fi
7736
7737 ac_fn_c_check_type "$LINENO" "minor_t" "ac_cv_type_minor_t" "$ac_includes_default"
7738 if test "x$ac_cv_type_minor_t" = xyes; then :
7739
7740 else
7741
7742 $as_echo "#define minor_t int" >>confdefs.h
7743
7744 fi
7745
7746 ac_fn_c_check_type "$LINENO" "dev_t" "ac_cv_type_dev_t" "$ac_includes_default"
7747 if test "x$ac_cv_type_dev_t" = xyes; then :
7748
7749 else
7750
7751 cat >>confdefs.h <<_ACEOF
7752 #define dev_t unsigned
7753 _ACEOF
7754
7755 fi
7756
7757 ac_fn_c_check_type "$LINENO" "ino_t" "ac_cv_type_ino_t" "$ac_includes_default"
7758 if test "x$ac_cv_type_ino_t" = xyes; then :
7759
7760 else
7761
7762 cat >>confdefs.h <<_ACEOF
7763 #define ino_t unsigned
7764 _ACEOF
7765
7766 fi
7767
7768
7769
7770   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
7771 $as_echo_n "checking for ssize_t... " >&6; }
7772 if ${gt_cv_ssize_t+:} false; then :
7773   $as_echo_n "(cached) " >&6
7774 else
7775   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7776 /* end confdefs.h.  */
7777 #include <sys/types.h>
7778 int
7779 main ()
7780 {
7781 int x = sizeof (ssize_t *) + sizeof (ssize_t);
7782             return !x;
7783   ;
7784   return 0;
7785 }
7786 _ACEOF
7787 if ac_fn_c_try_compile "$LINENO"; then :
7788   gt_cv_ssize_t=yes
7789 else
7790   gt_cv_ssize_t=no
7791 fi
7792 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7793 fi
7794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
7795 $as_echo "$gt_cv_ssize_t" >&6; }
7796   if test $gt_cv_ssize_t = no; then
7797
7798 $as_echo "#define ssize_t int" >>confdefs.h
7799
7800   fi
7801
7802
7803 # gnulib modules
7804
7805
7806
7807
7808
7809           LIBC_FATAL_STDERR_=1
7810   export LIBC_FATAL_STDERR_
7811
7812 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
7813 if test "x$ac_cv_type_size_t" = xyes; then :
7814
7815 else
7816
7817 cat >>confdefs.h <<_ACEOF
7818 #define size_t unsigned int
7819 _ACEOF
7820
7821 fi
7822
7823 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
7824 # for constant arguments.  Useless!
7825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
7826 $as_echo_n "checking for working alloca.h... " >&6; }
7827 if ${ac_cv_working_alloca_h+:} false; then :
7828   $as_echo_n "(cached) " >&6
7829 else
7830   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7831 /* end confdefs.h.  */
7832 #include <alloca.h>
7833 int
7834 main ()
7835 {
7836 char *p = (char *) alloca (2 * sizeof (int));
7837                           if (p) return 0;
7838   ;
7839   return 0;
7840 }
7841 _ACEOF
7842 if ac_fn_c_try_link "$LINENO"; then :
7843   ac_cv_working_alloca_h=yes
7844 else
7845   ac_cv_working_alloca_h=no
7846 fi
7847 rm -f core conftest.err conftest.$ac_objext \
7848     conftest$ac_exeext conftest.$ac_ext
7849 fi
7850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
7851 $as_echo "$ac_cv_working_alloca_h" >&6; }
7852 if test $ac_cv_working_alloca_h = yes; then
7853
7854 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
7855
7856 fi
7857
7858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
7859 $as_echo_n "checking for alloca... " >&6; }
7860 if ${ac_cv_func_alloca_works+:} false; then :
7861   $as_echo_n "(cached) " >&6
7862 else
7863   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7864 /* end confdefs.h.  */
7865 #ifdef __GNUC__
7866 # define alloca __builtin_alloca
7867 #else
7868 # ifdef _MSC_VER
7869 #  include <malloc.h>
7870 #  define alloca _alloca
7871 # else
7872 #  ifdef HAVE_ALLOCA_H
7873 #   include <alloca.h>
7874 #  else
7875 #   ifdef _AIX
7876  #pragma alloca
7877 #   else
7878 #    ifndef alloca /* predefined by HP cc +Olibcalls */
7879 void *alloca (size_t);
7880 #    endif
7881 #   endif
7882 #  endif
7883 # endif
7884 #endif
7885
7886 int
7887 main ()
7888 {
7889 char *p = (char *) alloca (1);
7890                                     if (p) return 0;
7891   ;
7892   return 0;
7893 }
7894 _ACEOF
7895 if ac_fn_c_try_link "$LINENO"; then :
7896   ac_cv_func_alloca_works=yes
7897 else
7898   ac_cv_func_alloca_works=no
7899 fi
7900 rm -f core conftest.err conftest.$ac_objext \
7901     conftest$ac_exeext conftest.$ac_ext
7902 fi
7903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
7904 $as_echo "$ac_cv_func_alloca_works" >&6; }
7905
7906 if test $ac_cv_func_alloca_works = yes; then
7907
7908 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
7909
7910 else
7911   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
7912 # that cause trouble.  Some versions do not even contain alloca or
7913 # contain a buggy version.  If you still want to use their alloca,
7914 # use ar to extract alloca.o from them instead of compiling alloca.c.
7915
7916
7917
7918
7919
7920 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
7921
7922 $as_echo "#define C_ALLOCA 1" >>confdefs.h
7923
7924
7925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
7926 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
7927 if ${ac_cv_os_cray+:} false; then :
7928   $as_echo_n "(cached) " >&6
7929 else
7930   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7931 /* end confdefs.h.  */
7932 #if defined CRAY && ! defined CRAY2
7933 webecray
7934 #else
7935 wenotbecray
7936 #endif
7937
7938 _ACEOF
7939 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7940   $EGREP "webecray" >/dev/null 2>&1; then :
7941   ac_cv_os_cray=yes
7942 else
7943   ac_cv_os_cray=no
7944 fi
7945 rm -f conftest*
7946
7947 fi
7948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
7949 $as_echo "$ac_cv_os_cray" >&6; }
7950 if test $ac_cv_os_cray = yes; then
7951   for ac_func in _getb67 GETB67 getb67; do
7952     as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7953 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7954 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
7955
7956 cat >>confdefs.h <<_ACEOF
7957 #define CRAY_STACKSEG_END $ac_func
7958 _ACEOF
7959
7960     break
7961 fi
7962
7963   done
7964 fi
7965
7966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
7967 $as_echo_n "checking stack direction for C alloca... " >&6; }
7968 if ${ac_cv_c_stack_direction+:} false; then :
7969   $as_echo_n "(cached) " >&6
7970 else
7971   if test "$cross_compiling" = yes; then :
7972   ac_cv_c_stack_direction=0
7973 else
7974   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7975 /* end confdefs.h.  */
7976 $ac_includes_default
7977 int
7978 find_stack_direction (int *addr, int depth)
7979 {
7980   int dir, dummy = 0;
7981   if (! addr)
7982     addr = &dummy;
7983   *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
7984   dir = depth ? find_stack_direction (addr, depth - 1) : 0;
7985   return dir + dummy;
7986 }
7987
7988 int
7989 main (int argc, char **argv)
7990 {
7991   return find_stack_direction (0, argc + !argv + 20) < 0;
7992 }
7993 _ACEOF
7994 if ac_fn_c_try_run "$LINENO"; then :
7995   ac_cv_c_stack_direction=1
7996 else
7997   ac_cv_c_stack_direction=-1
7998 fi
7999 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8000   conftest.$ac_objext conftest.beam conftest.$ac_ext
8001 fi
8002
8003 fi
8004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
8005 $as_echo "$ac_cv_c_stack_direction" >&6; }
8006 cat >>confdefs.h <<_ACEOF
8007 #define STACK_DIRECTION $ac_cv_c_stack_direction
8008 _ACEOF
8009
8010
8011 fi
8012
8013 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
8014 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
8015 if ${ac_cv_c_restrict+:} false; then :
8016   $as_echo_n "(cached) " >&6
8017 else
8018   ac_cv_c_restrict=no
8019    # The order here caters to the fact that C++ does not require restrict.
8020    for ac_kw in __restrict __restrict__ _Restrict restrict; do
8021      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8022 /* end confdefs.h.  */
8023 typedef int * int_ptr;
8024         int foo (int_ptr $ac_kw ip) {
8025         return ip[0];
8026        }
8027 int
8028 main ()
8029 {
8030 int s[1];
8031         int * $ac_kw t = s;
8032         t[0] = 0;
8033         return foo(t)
8034   ;
8035   return 0;
8036 }
8037 _ACEOF
8038 if ac_fn_c_try_compile "$LINENO"; then :
8039   ac_cv_c_restrict=$ac_kw
8040 fi
8041 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8042      test "$ac_cv_c_restrict" != no && break
8043    done
8044
8045 fi
8046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
8047 $as_echo "$ac_cv_c_restrict" >&6; }
8048
8049  case $ac_cv_c_restrict in
8050    restrict) ;;
8051    no) $as_echo "#define restrict /**/" >>confdefs.h
8052  ;;
8053    *)  cat >>confdefs.h <<_ACEOF
8054 #define restrict $ac_cv_c_restrict
8055 _ACEOF
8056  ;;
8057  esac
8058
8059 ac_fn_c_check_decl "$LINENO" "clearerr_unlocked" "ac_cv_have_decl_clearerr_unlocked" "$ac_includes_default"
8060 if test "x$ac_cv_have_decl_clearerr_unlocked" = xyes; then :
8061   ac_have_decl=1
8062 else
8063   ac_have_decl=0
8064 fi
8065
8066 cat >>confdefs.h <<_ACEOF
8067 #define HAVE_DECL_CLEARERR_UNLOCKED $ac_have_decl
8068 _ACEOF
8069
8070 ac_fn_c_check_decl "$LINENO" "feof_unlocked" "ac_cv_have_decl_feof_unlocked" "$ac_includes_default"
8071 if test "x$ac_cv_have_decl_feof_unlocked" = xyes; then :
8072   ac_have_decl=1
8073 else
8074   ac_have_decl=0
8075 fi
8076
8077 cat >>confdefs.h <<_ACEOF
8078 #define HAVE_DECL_FEOF_UNLOCKED $ac_have_decl
8079 _ACEOF
8080
8081 ac_fn_c_check_decl "$LINENO" "ferror_unlocked" "ac_cv_have_decl_ferror_unlocked" "$ac_includes_default"
8082 if test "x$ac_cv_have_decl_ferror_unlocked" = xyes; then :
8083   ac_have_decl=1
8084 else
8085   ac_have_decl=0
8086 fi
8087
8088 cat >>confdefs.h <<_ACEOF
8089 #define HAVE_DECL_FERROR_UNLOCKED $ac_have_decl
8090 _ACEOF
8091
8092 ac_fn_c_check_decl "$LINENO" "fflush_unlocked" "ac_cv_have_decl_fflush_unlocked" "$ac_includes_default"
8093 if test "x$ac_cv_have_decl_fflush_unlocked" = xyes; then :
8094   ac_have_decl=1
8095 else
8096   ac_have_decl=0
8097 fi
8098
8099 cat >>confdefs.h <<_ACEOF
8100 #define HAVE_DECL_FFLUSH_UNLOCKED $ac_have_decl
8101 _ACEOF
8102
8103 ac_fn_c_check_decl "$LINENO" "fgets_unlocked" "ac_cv_have_decl_fgets_unlocked" "$ac_includes_default"
8104 if test "x$ac_cv_have_decl_fgets_unlocked" = xyes; then :
8105   ac_have_decl=1
8106 else
8107   ac_have_decl=0
8108 fi
8109
8110 cat >>confdefs.h <<_ACEOF
8111 #define HAVE_DECL_FGETS_UNLOCKED $ac_have_decl
8112 _ACEOF
8113
8114 ac_fn_c_check_decl "$LINENO" "fputc_unlocked" "ac_cv_have_decl_fputc_unlocked" "$ac_includes_default"
8115 if test "x$ac_cv_have_decl_fputc_unlocked" = xyes; then :
8116   ac_have_decl=1
8117 else
8118   ac_have_decl=0
8119 fi
8120
8121 cat >>confdefs.h <<_ACEOF
8122 #define HAVE_DECL_FPUTC_UNLOCKED $ac_have_decl
8123 _ACEOF
8124
8125 ac_fn_c_check_decl "$LINENO" "fputs_unlocked" "ac_cv_have_decl_fputs_unlocked" "$ac_includes_default"
8126 if test "x$ac_cv_have_decl_fputs_unlocked" = xyes; then :
8127   ac_have_decl=1
8128 else
8129   ac_have_decl=0
8130 fi
8131
8132 cat >>confdefs.h <<_ACEOF
8133 #define HAVE_DECL_FPUTS_UNLOCKED $ac_have_decl
8134 _ACEOF
8135
8136 ac_fn_c_check_decl "$LINENO" "fread_unlocked" "ac_cv_have_decl_fread_unlocked" "$ac_includes_default"
8137 if test "x$ac_cv_have_decl_fread_unlocked" = xyes; then :
8138   ac_have_decl=1
8139 else
8140   ac_have_decl=0
8141 fi
8142
8143 cat >>confdefs.h <<_ACEOF
8144 #define HAVE_DECL_FREAD_UNLOCKED $ac_have_decl
8145 _ACEOF
8146
8147 ac_fn_c_check_decl "$LINENO" "fwrite_unlocked" "ac_cv_have_decl_fwrite_unlocked" "$ac_includes_default"
8148 if test "x$ac_cv_have_decl_fwrite_unlocked" = xyes; then :
8149   ac_have_decl=1
8150 else
8151   ac_have_decl=0
8152 fi
8153
8154 cat >>confdefs.h <<_ACEOF
8155 #define HAVE_DECL_FWRITE_UNLOCKED $ac_have_decl
8156 _ACEOF
8157
8158 ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
8159 if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then :
8160   ac_have_decl=1
8161 else
8162   ac_have_decl=0
8163 fi
8164
8165 cat >>confdefs.h <<_ACEOF
8166 #define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
8167 _ACEOF
8168
8169 ac_fn_c_check_decl "$LINENO" "getchar_unlocked" "ac_cv_have_decl_getchar_unlocked" "$ac_includes_default"
8170 if test "x$ac_cv_have_decl_getchar_unlocked" = xyes; then :
8171   ac_have_decl=1
8172 else
8173   ac_have_decl=0
8174 fi
8175
8176 cat >>confdefs.h <<_ACEOF
8177 #define HAVE_DECL_GETCHAR_UNLOCKED $ac_have_decl
8178 _ACEOF
8179
8180 ac_fn_c_check_decl "$LINENO" "putc_unlocked" "ac_cv_have_decl_putc_unlocked" "$ac_includes_default"
8181 if test "x$ac_cv_have_decl_putc_unlocked" = xyes; then :
8182   ac_have_decl=1
8183 else
8184   ac_have_decl=0
8185 fi
8186
8187 cat >>confdefs.h <<_ACEOF
8188 #define HAVE_DECL_PUTC_UNLOCKED $ac_have_decl
8189 _ACEOF
8190
8191 ac_fn_c_check_decl "$LINENO" "putchar_unlocked" "ac_cv_have_decl_putchar_unlocked" "$ac_includes_default"
8192 if test "x$ac_cv_have_decl_putchar_unlocked" = xyes; then :
8193   ac_have_decl=1
8194 else
8195   ac_have_decl=0
8196 fi
8197
8198 cat >>confdefs.h <<_ACEOF
8199 #define HAVE_DECL_PUTCHAR_UNLOCKED $ac_have_decl
8200 _ACEOF
8201
8202
8203
8204
8205   for ac_func in $ac_func_list
8206 do :
8207   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8208 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8209 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
8210   cat >>confdefs.h <<_ACEOF
8211 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
8212 _ACEOF
8213
8214 fi
8215 done
8216
8217
8218
8219
8220
8221
8222
8223
8224
8225
8226   XGETTEXT_EXTRA_OPTIONS=
8227
8228 # Make sure we can run config.sub.
8229 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
8230   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
8231
8232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
8233 $as_echo_n "checking build system type... " >&6; }
8234 if ${ac_cv_build+:} false; then :
8235   $as_echo_n "(cached) " >&6
8236 else
8237   ac_build_alias=$build_alias
8238 test "x$ac_build_alias" = x &&
8239   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
8240 test "x$ac_build_alias" = x &&
8241   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
8242 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
8243   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
8244
8245 fi
8246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
8247 $as_echo "$ac_cv_build" >&6; }
8248 case $ac_cv_build in
8249 *-*-*) ;;
8250 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
8251 esac
8252 build=$ac_cv_build
8253 ac_save_IFS=$IFS; IFS='-'
8254 set x $ac_cv_build
8255 shift
8256 build_cpu=$1
8257 build_vendor=$2
8258 shift; shift
8259 # Remember, the first character of IFS is used to create $*,
8260 # except with old shells:
8261 build_os=$*
8262 IFS=$ac_save_IFS
8263 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
8264
8265
8266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
8267 $as_echo_n "checking host system type... " >&6; }
8268 if ${ac_cv_host+:} false; then :
8269   $as_echo_n "(cached) " >&6
8270 else
8271   if test "x$host_alias" = x; then
8272   ac_cv_host=$ac_cv_build
8273 else
8274   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
8275     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
8276 fi
8277
8278 fi
8279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
8280 $as_echo "$ac_cv_host" >&6; }
8281 case $ac_cv_host in
8282 *-*-*) ;;
8283 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
8284 esac
8285 host=$ac_cv_host
8286 ac_save_IFS=$IFS; IFS='-'
8287 set x $ac_cv_host
8288 shift
8289 host_cpu=$1
8290 host_vendor=$2
8291 shift; shift
8292 # Remember, the first character of IFS is used to create $*,
8293 # except with old shells:
8294 host_os=$*
8295 IFS=$ac_save_IFS
8296 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
8297
8298
8299     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_ino member in directory struct" >&5
8300 $as_echo_n "checking for d_ino member in directory struct... " >&6; }
8301 if ${gl_cv_struct_dirent_d_ino+:} false; then :
8302   $as_echo_n "(cached) " >&6
8303 else
8304   if test "$cross_compiling" = yes; then :
8305   case "$host_os" in
8306                            # Guess yes on glibc systems with Linux kernel.
8307               linux*-gnu*) gl_cv_struct_dirent_d_ino="guessing yes" ;;
8308                            # If we don't know, assume the worst.
8309               *)           gl_cv_struct_dirent_d_ino="guessing no" ;;
8310             esac
8311
8312 else
8313   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8314 /* end confdefs.h.  */
8315 #include <sys/types.h>
8316              #include <sys/stat.h>
8317              #include <dirent.h>
8318
8319 int
8320 main ()
8321 {
8322 DIR *dp = opendir (".");
8323              struct dirent *e;
8324              struct stat st;
8325              if (! dp)
8326                return 1;
8327              e = readdir (dp);
8328              if (! e)
8329                return 2;
8330              if (lstat (e->d_name, &st) != 0)
8331                return 3;
8332              if (e->d_ino != st.st_ino)
8333                return 4;
8334              return 0;
8335
8336   ;
8337   return 0;
8338 }
8339 _ACEOF
8340 if ac_fn_c_try_run "$LINENO"; then :
8341   gl_cv_struct_dirent_d_ino=yes
8342 else
8343   gl_cv_struct_dirent_d_ino=no
8344 fi
8345 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8346   conftest.$ac_objext conftest.beam conftest.$ac_ext
8347 fi
8348
8349 fi
8350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_ino" >&5
8351 $as_echo "$gl_cv_struct_dirent_d_ino" >&6; }
8352    case "$gl_cv_struct_dirent_d_ino" in
8353      *yes)
8354
8355 $as_echo "#define D_INO_IN_DIRENT 1" >>confdefs.h
8356
8357        ;;
8358    esac
8359
8360
8361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long file names" >&5
8362 $as_echo_n "checking for long file names... " >&6; }
8363 if ${ac_cv_sys_long_file_names+:} false; then :
8364   $as_echo_n "(cached) " >&6
8365 else
8366   ac_cv_sys_long_file_names=yes
8367 # Test for long file names in all the places we know might matter:
8368 #      .                the current directory, where building will happen
8369 #      $prefix/lib      where we will be installing things
8370 #      $exec_prefix/lib likewise
8371 #      $TMPDIR          if set, where it might want to write temporary files
8372 #      /tmp             where it might want to write temporary files
8373 #      /var/tmp         likewise
8374 #      /usr/tmp         likewise
8375 for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do
8376   # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib
8377   # in the usual case where exec_prefix is '${prefix}'.
8378   case $ac_dir in #(
8379     . | /* | ?:[\\/]*) ;; #(
8380     *) continue;;
8381   esac
8382   test -w "$ac_dir/." || continue # It is less confusing to not echo anything here.
8383   ac_xdir=$ac_dir/cf$$
8384   (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
8385   ac_tf1=$ac_xdir/conftest9012345
8386   ac_tf2=$ac_xdir/conftest9012346
8387   touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" ||
8388     ac_cv_sys_long_file_names=no
8389   rm -f -r "$ac_xdir" 2>/dev/null
8390   test $ac_cv_sys_long_file_names = no && break
8391 done
8392 fi
8393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_long_file_names" >&5
8394 $as_echo "$ac_cv_sys_long_file_names" >&6; }
8395 if test $ac_cv_sys_long_file_names = yes; then
8396
8397 $as_echo "#define HAVE_LONG_FILE_NAMES 1" >>confdefs.h
8398
8399 fi
8400
8401
8402
8403
8404   GNULIB_BTOWC=0;
8405   GNULIB_WCTOB=0;
8406   GNULIB_MBSINIT=0;
8407   GNULIB_MBRTOWC=0;
8408   GNULIB_MBRLEN=0;
8409   GNULIB_MBSRTOWCS=0;
8410   GNULIB_MBSNRTOWCS=0;
8411   GNULIB_WCRTOMB=0;
8412   GNULIB_WCSRTOMBS=0;
8413   GNULIB_WCSNRTOMBS=0;
8414   GNULIB_WCWIDTH=0;
8415   GNULIB_WMEMCHR=0;
8416   GNULIB_WMEMCMP=0;
8417   GNULIB_WMEMCPY=0;
8418   GNULIB_WMEMMOVE=0;
8419   GNULIB_WMEMSET=0;
8420   GNULIB_WCSLEN=0;
8421   GNULIB_WCSNLEN=0;
8422   GNULIB_WCSCPY=0;
8423   GNULIB_WCPCPY=0;
8424   GNULIB_WCSNCPY=0;
8425   GNULIB_WCPNCPY=0;
8426   GNULIB_WCSCAT=0;
8427   GNULIB_WCSNCAT=0;
8428   GNULIB_WCSCMP=0;
8429   GNULIB_WCSNCMP=0;
8430   GNULIB_WCSCASECMP=0;
8431   GNULIB_WCSNCASECMP=0;
8432   GNULIB_WCSCOLL=0;
8433   GNULIB_WCSXFRM=0;
8434   GNULIB_WCSDUP=0;
8435   GNULIB_WCSCHR=0;
8436   GNULIB_WCSRCHR=0;
8437   GNULIB_WCSCSPN=0;
8438   GNULIB_WCSSPN=0;
8439   GNULIB_WCSPBRK=0;
8440   GNULIB_WCSSTR=0;
8441   GNULIB_WCSTOK=0;
8442   GNULIB_WCSWIDTH=0;
8443     HAVE_BTOWC=1;
8444   HAVE_MBSINIT=1;
8445   HAVE_MBRTOWC=1;
8446   HAVE_MBRLEN=1;
8447   HAVE_MBSRTOWCS=1;
8448   HAVE_MBSNRTOWCS=1;
8449   HAVE_WCRTOMB=1;
8450   HAVE_WCSRTOMBS=1;
8451   HAVE_WCSNRTOMBS=1;
8452   HAVE_WMEMCHR=1;
8453   HAVE_WMEMCMP=1;
8454   HAVE_WMEMCPY=1;
8455   HAVE_WMEMMOVE=1;
8456   HAVE_WMEMSET=1;
8457   HAVE_WCSLEN=1;
8458   HAVE_WCSNLEN=1;
8459   HAVE_WCSCPY=1;
8460   HAVE_WCPCPY=1;
8461   HAVE_WCSNCPY=1;
8462   HAVE_WCPNCPY=1;
8463   HAVE_WCSCAT=1;
8464   HAVE_WCSNCAT=1;
8465   HAVE_WCSCMP=1;
8466   HAVE_WCSNCMP=1;
8467   HAVE_WCSCASECMP=1;
8468   HAVE_WCSNCASECMP=1;
8469   HAVE_WCSCOLL=1;
8470   HAVE_WCSXFRM=1;
8471   HAVE_WCSDUP=1;
8472   HAVE_WCSCHR=1;
8473   HAVE_WCSRCHR=1;
8474   HAVE_WCSCSPN=1;
8475   HAVE_WCSSPN=1;
8476   HAVE_WCSPBRK=1;
8477   HAVE_WCSSTR=1;
8478   HAVE_WCSTOK=1;
8479   HAVE_WCSWIDTH=1;
8480   HAVE_DECL_WCTOB=1;
8481   HAVE_DECL_WCWIDTH=1;
8482   REPLACE_MBSTATE_T=0;
8483   REPLACE_BTOWC=0;
8484   REPLACE_WCTOB=0;
8485   REPLACE_MBSINIT=0;
8486   REPLACE_MBRTOWC=0;
8487   REPLACE_MBRLEN=0;
8488   REPLACE_MBSRTOWCS=0;
8489   REPLACE_MBSNRTOWCS=0;
8490   REPLACE_WCRTOMB=0;
8491   REPLACE_WCSRTOMBS=0;
8492   REPLACE_WCSNRTOMBS=0;
8493   REPLACE_WCWIDTH=0;
8494   REPLACE_WCSWIDTH=0;
8495
8496
8497             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
8498 $as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
8499 if ${gl_cv_header_wchar_h_correct_inline+:} false; then :
8500   $as_echo_n "(cached) " >&6
8501 else
8502   gl_cv_header_wchar_h_correct_inline=yes
8503      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8504 /* end confdefs.h.  */
8505
8506        #define wcstod renamed_wcstod
8507 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
8508    <wchar.h>.
8509    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
8510    included before <wchar.h>.  */
8511 #include <stddef.h>
8512 #include <stdio.h>
8513 #include <time.h>
8514 #include <wchar.h>
8515 extern int zero (void);
8516 int main () { return zero(); }
8517
8518 _ACEOF
8519      if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
8520   (eval $ac_compile) 2>&5
8521   ac_status=$?
8522   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8523   test $ac_status = 0; }; then
8524        mv conftest.$ac_objext conftest1.$ac_objext
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 int zero (void) { return 0; }
8538
8539 _ACEOF
8540        if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
8541   (eval $ac_compile) 2>&5
8542   ac_status=$?
8543   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8544   test $ac_status = 0; }; then
8545          mv conftest.$ac_objext conftest2.$ac_objext
8546          if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
8547            :
8548          else
8549            gl_cv_header_wchar_h_correct_inline=no
8550          fi
8551        fi
8552      fi
8553      rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext
8554
8555 fi
8556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
8557 $as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; }
8558   if test $gl_cv_header_wchar_h_correct_inline = no; then
8559     as_fn_error $? "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
8560 This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
8561 C99 mode. You have four options:
8562   - Add the flag -fgnu89-inline to CC and reconfigure, or
8563   - Fix your include files, using parts of
8564     <http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
8565   - Use a gcc version older than 4.3, or
8566   - Don't use the flags -std=c99 or -std=gnu99.
8567 Configuration aborted." "$LINENO" 5
8568   fi
8569
8570
8571
8572
8573   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
8574 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
8575 if ${am_cv_langinfo_codeset+:} false; then :
8576   $as_echo_n "(cached) " >&6
8577 else
8578   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8579 /* end confdefs.h.  */
8580 #include <langinfo.h>
8581 int
8582 main ()
8583 {
8584 char* cs = nl_langinfo(CODESET); return !cs;
8585   ;
8586   return 0;
8587 }
8588 _ACEOF
8589 if ac_fn_c_try_link "$LINENO"; then :
8590   am_cv_langinfo_codeset=yes
8591 else
8592   am_cv_langinfo_codeset=no
8593 fi
8594 rm -f core conftest.err conftest.$ac_objext \
8595     conftest$ac_exeext conftest.$ac_ext
8596
8597 fi
8598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
8599 $as_echo "$am_cv_langinfo_codeset" >&6; }
8600   if test $am_cv_langinfo_codeset = yes; then
8601
8602 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
8603
8604   fi
8605
8606
8607
8608
8609   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
8610 $as_echo_n "checking for a traditional french locale... " >&6; }
8611 if ${gt_cv_locale_fr+:} false; then :
8612   $as_echo_n "(cached) " >&6
8613 else
8614
8615     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8616 /* end confdefs.h.  */
8617
8618 #include <locale.h>
8619 #include <time.h>
8620 #if HAVE_LANGINFO_CODESET
8621 # include <langinfo.h>
8622 #endif
8623 #include <stdlib.h>
8624 #include <string.h>
8625 struct tm t;
8626 char buf[16];
8627 int main () {
8628   /* Check whether the given locale name is recognized by the system.  */
8629 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
8630   /* On native Windows, setlocale(category, "") looks at the system settings,
8631      not at the environment variables.  Also, when an encoding suffix such
8632      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
8633      category of the locale to "C".  */
8634   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
8635       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
8636     return 1;
8637 #else
8638   if (setlocale (LC_ALL, "") == NULL) return 1;
8639 #endif
8640   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
8641      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
8642      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
8643      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
8644      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
8645      some unit tests fail.
8646      On MirBSD 10, when an unsupported locale is specified, setlocale()
8647      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
8648 #if HAVE_LANGINFO_CODESET
8649   {
8650     const char *cs = nl_langinfo (CODESET);
8651     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
8652         || strcmp (cs, "UTF-8") == 0)
8653       return 1;
8654   }
8655 #endif
8656 #ifdef __CYGWIN__
8657   /* On Cygwin, avoid locale names without encoding suffix, because the
8658      locale_charset() function relies on the encoding suffix.  Note that
8659      LC_ALL is set on the command line.  */
8660   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
8661 #endif
8662   /* Check whether in the abbreviation of the second month, the second
8663      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
8664      one byte long. This excludes the UTF-8 encoding.  */
8665   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
8666   if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
8667 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
8668   /* Check whether the decimal separator is a comma.
8669      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
8670      are nl_langinfo(RADIXCHAR) are both ".".  */
8671   if (localeconv () ->decimal_point[0] != ',') return 1;
8672 #endif
8673   return 0;
8674 }
8675
8676 _ACEOF
8677     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
8678   (eval $ac_link) 2>&5
8679   ac_status=$?
8680   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8681   test $ac_status = 0; } && test -s conftest$ac_exeext; then
8682       case "$host_os" in
8683         # Handle native Windows specially, because there setlocale() interprets
8684         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
8685         # "fr" or "fra" as "French" or "French_France.1252",
8686         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
8687         # "ja" as "Japanese" or "Japanese_Japan.932",
8688         # and similar.
8689         mingw*)
8690           # Test for the native Windows locale name.
8691           if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8692             gt_cv_locale_fr=French_France.1252
8693           else
8694             # None found.
8695             gt_cv_locale_fr=none
8696           fi
8697           ;;
8698         *)
8699           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
8700           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
8701           # configure script would override the LC_ALL setting. Likewise for
8702           # LC_CTYPE, which is also set at the beginning of the configure script.
8703           # Test for the usual locale name.
8704           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8705             gt_cv_locale_fr=fr_FR
8706           else
8707             # Test for the locale name with explicit encoding suffix.
8708             if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8709               gt_cv_locale_fr=fr_FR.ISO-8859-1
8710             else
8711               # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
8712               if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8713                 gt_cv_locale_fr=fr_FR.ISO8859-1
8714               else
8715                 # Test for the HP-UX locale name.
8716                 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8717                   gt_cv_locale_fr=fr_FR.iso88591
8718                 else
8719                   # Test for the Solaris 7 locale name.
8720                   if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8721                     gt_cv_locale_fr=fr
8722                   else
8723                     # None found.
8724                     gt_cv_locale_fr=none
8725                   fi
8726                 fi
8727               fi
8728             fi
8729           fi
8730           ;;
8731       esac
8732     fi
8733     rm -fr conftest*
8734
8735 fi
8736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
8737 $as_echo "$gt_cv_locale_fr" >&6; }
8738   LOCALE_FR=$gt_cv_locale_fr
8739
8740
8741
8742   GNULIB__EXIT=0;
8743   GNULIB_ATOLL=0;
8744   GNULIB_CALLOC_POSIX=0;
8745   GNULIB_CANONICALIZE_FILE_NAME=0;
8746   GNULIB_GETLOADAVG=0;
8747   GNULIB_GETSUBOPT=0;
8748   GNULIB_GRANTPT=0;
8749   GNULIB_MALLOC_POSIX=0;
8750   GNULIB_MBTOWC=0;
8751   GNULIB_MKDTEMP=0;
8752   GNULIB_MKOSTEMP=0;
8753   GNULIB_MKOSTEMPS=0;
8754   GNULIB_MKSTEMP=0;
8755   GNULIB_MKSTEMPS=0;
8756   GNULIB_POSIX_OPENPT=0;
8757   GNULIB_PTSNAME=0;
8758   GNULIB_PTSNAME_R=0;
8759   GNULIB_PUTENV=0;
8760   GNULIB_RANDOM=0;
8761   GNULIB_RANDOM_R=0;
8762   GNULIB_REALLOC_POSIX=0;
8763   GNULIB_REALPATH=0;
8764   GNULIB_RPMATCH=0;
8765   GNULIB_SECURE_GETENV=0;
8766   GNULIB_SETENV=0;
8767   GNULIB_STRTOD=0;
8768   GNULIB_STRTOLL=0;
8769   GNULIB_STRTOULL=0;
8770   GNULIB_SYSTEM_POSIX=0;
8771   GNULIB_UNLOCKPT=0;
8772   GNULIB_UNSETENV=0;
8773   GNULIB_WCTOMB=0;
8774     HAVE__EXIT=1;
8775   HAVE_ATOLL=1;
8776   HAVE_CANONICALIZE_FILE_NAME=1;
8777   HAVE_DECL_GETLOADAVG=1;
8778   HAVE_GETSUBOPT=1;
8779   HAVE_GRANTPT=1;
8780   HAVE_MKDTEMP=1;
8781   HAVE_MKOSTEMP=1;
8782   HAVE_MKOSTEMPS=1;
8783   HAVE_MKSTEMP=1;
8784   HAVE_MKSTEMPS=1;
8785   HAVE_POSIX_OPENPT=1;
8786   HAVE_PTSNAME=1;
8787   HAVE_PTSNAME_R=1;
8788   HAVE_RANDOM=1;
8789   HAVE_RANDOM_H=1;
8790   HAVE_RANDOM_R=1;
8791   HAVE_REALPATH=1;
8792   HAVE_RPMATCH=1;
8793   HAVE_SECURE_GETENV=1;
8794   HAVE_SETENV=1;
8795   HAVE_DECL_SETENV=1;
8796   HAVE_STRTOD=1;
8797   HAVE_STRTOLL=1;
8798   HAVE_STRTOULL=1;
8799   HAVE_STRUCT_RANDOM_DATA=1;
8800   HAVE_SYS_LOADAVG_H=0;
8801   HAVE_UNLOCKPT=1;
8802   HAVE_DECL_UNSETENV=1;
8803   REPLACE_CALLOC=0;
8804   REPLACE_CANONICALIZE_FILE_NAME=0;
8805   REPLACE_MALLOC=0;
8806   REPLACE_MBTOWC=0;
8807   REPLACE_MKSTEMP=0;
8808   REPLACE_PTSNAME=0;
8809   REPLACE_PTSNAME_R=0;
8810   REPLACE_PUTENV=0;
8811   REPLACE_RANDOM_R=0;
8812   REPLACE_REALLOC=0;
8813   REPLACE_REALPATH=0;
8814   REPLACE_SETENV=0;
8815   REPLACE_STRTOD=0;
8816   REPLACE_UNSETENV=0;
8817   REPLACE_WCTOMB=0;
8818
8819
8820
8821
8822
8823
8824
8825
8826
8827   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
8828 $as_echo_n "checking whether // is distinct from /... " >&6; }
8829 if ${gl_cv_double_slash_root+:} false; then :
8830   $as_echo_n "(cached) " >&6
8831 else
8832    if test x"$cross_compiling" = xyes ; then
8833         # When cross-compiling, there is no way to tell whether // is special
8834         # short of a list of hosts.  However, the only known hosts to date
8835         # that have a distinct // are Apollo DomainOS (too old to port to),
8836         # Cygwin, and z/OS.  If anyone knows of another system for which // has
8837         # special semantics and is distinct from /, please report it to
8838         # <bug-gnulib@gnu.org>.
8839         case $host in
8840           *-cygwin | i370-ibm-openedition)
8841             gl_cv_double_slash_root=yes ;;
8842           *)
8843             # Be optimistic and assume that / and // are the same when we
8844             # don't know.
8845             gl_cv_double_slash_root='unknown, assuming no' ;;
8846         esac
8847       else
8848         set x `ls -di / // 2>/dev/null`
8849         if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
8850           gl_cv_double_slash_root=no
8851         else
8852           gl_cv_double_slash_root=yes
8853         fi
8854       fi
8855 fi
8856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
8857 $as_echo "$gl_cv_double_slash_root" >&6; }
8858   if test "$gl_cv_double_slash_root" = yes; then
8859
8860 $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
8861
8862   fi
8863
8864
8865
8866
8867
8868      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether realpath works" >&5
8869 $as_echo_n "checking whether realpath works... " >&6; }
8870 if ${gl_cv_func_realpath_works+:} false; then :
8871   $as_echo_n "(cached) " >&6
8872 else
8873
8874     touch conftest.a
8875     mkdir conftest.d
8876     if test "$cross_compiling" = yes; then :
8877   case "$host_os" in
8878                        # Guess yes on glibc systems.
8879         *-gnu* | gnu*) gl_cv_func_realpath_works="guessing yes" ;;
8880                        # If we don't know, assume the worst.
8881         *)             gl_cv_func_realpath_works="guessing no" ;;
8882       esac
8883
8884 else
8885   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8886 /* end confdefs.h.  */
8887
8888
8889
8890 #include <stdlib.h>
8891 #if defined __MACH__ && defined __APPLE__
8892 /* Avoid a crash on Mac OS X.  */
8893 #include <mach/mach.h>
8894 #include <mach/mach_error.h>
8895 #include <mach/thread_status.h>
8896 #include <mach/exception.h>
8897 #include <mach/task.h>
8898 #include <pthread.h>
8899 /* The exception port on which our thread listens.  */
8900 static mach_port_t our_exception_port;
8901 /* The main function of the thread listening for exceptions of type
8902    EXC_BAD_ACCESS.  */
8903 static void *
8904 mach_exception_thread (void *arg)
8905 {
8906   /* Buffer for a message to be received.  */
8907   struct {
8908     mach_msg_header_t head;
8909     mach_msg_body_t msgh_body;
8910     char data[1024];
8911   } msg;
8912   mach_msg_return_t retval;
8913   /* Wait for a message on the exception port.  */
8914   retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
8915                      our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
8916   if (retval != MACH_MSG_SUCCESS)
8917     abort ();
8918   exit (1);
8919 }
8920 static void
8921 nocrash_init (void)
8922 {
8923   mach_port_t self = mach_task_self ();
8924   /* Allocate a port on which the thread shall listen for exceptions.  */
8925   if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
8926       == KERN_SUCCESS) {
8927     /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html.  */
8928     if (mach_port_insert_right (self, our_exception_port, our_exception_port,
8929                                 MACH_MSG_TYPE_MAKE_SEND)
8930         == KERN_SUCCESS) {
8931       /* The exceptions we want to catch.  Only EXC_BAD_ACCESS is interesting
8932          for us.  */
8933       exception_mask_t mask = EXC_MASK_BAD_ACCESS;
8934       /* Create the thread listening on the exception port.  */
8935       pthread_attr_t attr;
8936       pthread_t thread;
8937       if (pthread_attr_init (&attr) == 0
8938           && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
8939           && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
8940         pthread_attr_destroy (&attr);
8941         /* Replace the exception port info for these exceptions with our own.
8942            Note that we replace the exception port for the entire task, not only
8943            for a particular thread.  This has the effect that when our exception
8944            port gets the message, the thread specific exception port has already
8945            been asked, and we don't need to bother about it.
8946            See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html.  */
8947         task_set_exception_ports (self, mask, our_exception_port,
8948                                   EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
8949       }
8950     }
8951   }
8952 }
8953 #elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
8954 /* Avoid a crash on native Windows.  */
8955 #define WIN32_LEAN_AND_MEAN
8956 #include <windows.h>
8957 #include <winerror.h>
8958 static LONG WINAPI
8959 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
8960 {
8961   switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
8962     {
8963     case EXCEPTION_ACCESS_VIOLATION:
8964     case EXCEPTION_IN_PAGE_ERROR:
8965     case EXCEPTION_STACK_OVERFLOW:
8966     case EXCEPTION_GUARD_PAGE:
8967     case EXCEPTION_PRIV_INSTRUCTION:
8968     case EXCEPTION_ILLEGAL_INSTRUCTION:
8969     case EXCEPTION_DATATYPE_MISALIGNMENT:
8970     case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
8971     case EXCEPTION_NONCONTINUABLE_EXCEPTION:
8972       exit (1);
8973     }
8974   return EXCEPTION_CONTINUE_SEARCH;
8975 }
8976 static void
8977 nocrash_init (void)
8978 {
8979   SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
8980 }
8981 #else
8982 /* Avoid a crash on POSIX systems.  */
8983 #include <signal.h>
8984 /* A POSIX signal handler.  */
8985 static void
8986 exception_handler (int sig)
8987 {
8988   exit (1);
8989 }
8990 static void
8991 nocrash_init (void)
8992 {
8993 #ifdef SIGSEGV
8994   signal (SIGSEGV, exception_handler);
8995 #endif
8996 #ifdef SIGBUS
8997   signal (SIGBUS, exception_handler);
8998 #endif
8999 }
9000 #endif
9001
9002         #include <stdlib.h>
9003         #include <string.h>
9004
9005 int
9006 main ()
9007 {
9008
9009         int result = 0;
9010         {
9011           char *name = realpath ("conftest.a", NULL);
9012           if (!(name && *name == '/'))
9013             result |= 1;
9014         }
9015         {
9016           char *name = realpath ("conftest.b/../conftest.a", NULL);
9017           if (name != NULL)
9018             result |= 2;
9019         }
9020         {
9021           char *name = realpath ("conftest.a/", NULL);
9022           if (name != NULL)
9023             result |= 4;
9024         }
9025         {
9026           char *name1 = realpath (".", NULL);
9027           char *name2 = realpath ("conftest.d//./..", NULL);
9028           if (strcmp (name1, name2) != 0)
9029             result |= 8;
9030         }
9031         return result;
9032
9033   ;
9034   return 0;
9035 }
9036
9037 _ACEOF
9038 if ac_fn_c_try_run "$LINENO"; then :
9039   gl_cv_func_realpath_works=yes
9040 else
9041   gl_cv_func_realpath_works=no
9042 fi
9043 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9044   conftest.$ac_objext conftest.beam conftest.$ac_ext
9045 fi
9046
9047     rm -rf conftest.a conftest.d
9048
9049 fi
9050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_realpath_works" >&5
9051 $as_echo "$gl_cv_func_realpath_works" >&6; }
9052   case "$gl_cv_func_realpath_works" in
9053     *yes)
9054
9055 $as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
9056
9057       ;;
9058   esac
9059
9060
9061
9062
9063
9064
9065
9066
9067
9068
9069
9070   GNULIB_CHDIR=0;
9071   GNULIB_CHOWN=0;
9072   GNULIB_CLOSE=0;
9073   GNULIB_DUP=0;
9074   GNULIB_DUP2=0;
9075   GNULIB_DUP3=0;
9076   GNULIB_ENVIRON=0;
9077   GNULIB_EUIDACCESS=0;
9078   GNULIB_FACCESSAT=0;
9079   GNULIB_FCHDIR=0;
9080   GNULIB_FCHOWNAT=0;
9081   GNULIB_FDATASYNC=0;
9082   GNULIB_FSYNC=0;
9083   GNULIB_FTRUNCATE=0;
9084   GNULIB_GETCWD=0;
9085   GNULIB_GETDOMAINNAME=0;
9086   GNULIB_GETDTABLESIZE=0;
9087   GNULIB_GETGROUPS=0;
9088   GNULIB_GETHOSTNAME=0;
9089   GNULIB_GETLOGIN=0;
9090   GNULIB_GETLOGIN_R=0;
9091   GNULIB_GETPAGESIZE=0;
9092   GNULIB_GETUSERSHELL=0;
9093   GNULIB_GROUP_MEMBER=0;
9094   GNULIB_ISATTY=0;
9095   GNULIB_LCHOWN=0;
9096   GNULIB_LINK=0;
9097   GNULIB_LINKAT=0;
9098   GNULIB_LSEEK=0;
9099   GNULIB_PIPE=0;
9100   GNULIB_PIPE2=0;
9101   GNULIB_PREAD=0;
9102   GNULIB_PWRITE=0;
9103   GNULIB_READ=0;
9104   GNULIB_READLINK=0;
9105   GNULIB_READLINKAT=0;
9106   GNULIB_RMDIR=0;
9107   GNULIB_SETHOSTNAME=0;
9108   GNULIB_SLEEP=0;
9109   GNULIB_SYMLINK=0;
9110   GNULIB_SYMLINKAT=0;
9111   GNULIB_TTYNAME_R=0;
9112   GNULIB_UNISTD_H_NONBLOCKING=0;
9113   GNULIB_UNISTD_H_SIGPIPE=0;
9114   GNULIB_UNLINK=0;
9115   GNULIB_UNLINKAT=0;
9116   GNULIB_USLEEP=0;
9117   GNULIB_WRITE=0;
9118     HAVE_CHOWN=1;
9119   HAVE_DUP2=1;
9120   HAVE_DUP3=1;
9121   HAVE_EUIDACCESS=1;
9122   HAVE_FACCESSAT=1;
9123   HAVE_FCHDIR=1;
9124   HAVE_FCHOWNAT=1;
9125   HAVE_FDATASYNC=1;
9126   HAVE_FSYNC=1;
9127   HAVE_FTRUNCATE=1;
9128   HAVE_GETDTABLESIZE=1;
9129   HAVE_GETGROUPS=1;
9130   HAVE_GETHOSTNAME=1;
9131   HAVE_GETLOGIN=1;
9132   HAVE_GETPAGESIZE=1;
9133   HAVE_GROUP_MEMBER=1;
9134   HAVE_LCHOWN=1;
9135   HAVE_LINK=1;
9136   HAVE_LINKAT=1;
9137   HAVE_PIPE=1;
9138   HAVE_PIPE2=1;
9139   HAVE_PREAD=1;
9140   HAVE_PWRITE=1;
9141   HAVE_READLINK=1;
9142   HAVE_READLINKAT=1;
9143   HAVE_SETHOSTNAME=1;
9144   HAVE_SLEEP=1;
9145   HAVE_SYMLINK=1;
9146   HAVE_SYMLINKAT=1;
9147   HAVE_UNLINKAT=1;
9148   HAVE_USLEEP=1;
9149   HAVE_DECL_ENVIRON=1;
9150   HAVE_DECL_FCHDIR=1;
9151   HAVE_DECL_FDATASYNC=1;
9152   HAVE_DECL_GETDOMAINNAME=1;
9153   HAVE_DECL_GETLOGIN_R=1;
9154   HAVE_DECL_GETPAGESIZE=1;
9155   HAVE_DECL_GETUSERSHELL=1;
9156   HAVE_DECL_SETHOSTNAME=1;
9157   HAVE_DECL_TTYNAME_R=1;
9158   HAVE_OS_H=0;
9159   HAVE_SYS_PARAM_H=0;
9160   REPLACE_CHOWN=0;
9161   REPLACE_CLOSE=0;
9162   REPLACE_DUP=0;
9163   REPLACE_DUP2=0;
9164   REPLACE_FCHOWNAT=0;
9165   REPLACE_FTRUNCATE=0;
9166   REPLACE_GETCWD=0;
9167   REPLACE_GETDOMAINNAME=0;
9168   REPLACE_GETDTABLESIZE=0;
9169   REPLACE_GETLOGIN_R=0;
9170   REPLACE_GETGROUPS=0;
9171   REPLACE_GETPAGESIZE=0;
9172   REPLACE_ISATTY=0;
9173   REPLACE_LCHOWN=0;
9174   REPLACE_LINK=0;
9175   REPLACE_LINKAT=0;
9176   REPLACE_LSEEK=0;
9177   REPLACE_PREAD=0;
9178   REPLACE_PWRITE=0;
9179   REPLACE_READ=0;
9180   REPLACE_READLINK=0;
9181   REPLACE_RMDIR=0;
9182   REPLACE_SLEEP=0;
9183   REPLACE_SYMLINK=0;
9184   REPLACE_TTYNAME_R=0;
9185   REPLACE_UNLINK=0;
9186   REPLACE_UNLINKAT=0;
9187   REPLACE_USLEEP=0;
9188   REPLACE_WRITE=0;
9189   UNISTD_H_HAVE_WINSOCK2_H=0;
9190   UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
9191
9192
9193
9194
9195
9196
9197       for ac_header in unistd.h
9198 do :
9199   ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
9200 if test "x$ac_cv_header_unistd_h" = xyes; then :
9201   cat >>confdefs.h <<_ACEOF
9202 #define HAVE_UNISTD_H 1
9203 _ACEOF
9204
9205 fi
9206
9207 done
9208
9209   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working chown" >&5
9210 $as_echo_n "checking for working chown... " >&6; }
9211 if ${ac_cv_func_chown_works+:} false; then :
9212   $as_echo_n "(cached) " >&6
9213 else
9214   if test "$cross_compiling" = yes; then :
9215   case "$host_os" in # ((
9216                   # Guess yes on glibc systems.
9217           *-gnu*) ac_cv_func_chown_works=yes ;;
9218                   # If we don't know, assume the worst.
9219           *)      ac_cv_func_chown_works=no ;;
9220         esac
9221
9222 else
9223   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9224 /* end confdefs.h.  */
9225 $ac_includes_default
9226            #include <fcntl.h>
9227
9228 int
9229 main ()
9230 {
9231
9232             char *f = "conftest.chown";
9233             struct stat before, after;
9234
9235             if (creat (f, 0600) < 0)
9236               return 1;
9237             if (stat (f, &before) < 0)
9238               return 1;
9239             if (chown (f, (uid_t) -1, (gid_t) -1) == -1)
9240               return 1;
9241             if (stat (f, &after) < 0)
9242               return 1;
9243             return ! (before.st_uid == after.st_uid && before.st_gid == after.st_gid);
9244
9245   ;
9246   return 0;
9247 }
9248
9249 _ACEOF
9250 if ac_fn_c_try_run "$LINENO"; then :
9251   ac_cv_func_chown_works=yes
9252 else
9253   ac_cv_func_chown_works=no
9254 fi
9255 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9256   conftest.$ac_objext conftest.beam conftest.$ac_ext
9257 fi
9258
9259      rm -f conftest.chown
9260
9261 fi
9262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_chown_works" >&5
9263 $as_echo "$ac_cv_func_chown_works" >&6; }
9264   if test $ac_cv_func_chown_works = yes; then
9265
9266 $as_echo "#define HAVE_CHOWN 1" >>confdefs.h
9267
9268   fi
9269
9270
9271   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether chown dereferences symlinks" >&5
9272 $as_echo_n "checking whether chown dereferences symlinks... " >&6; }
9273 if ${gl_cv_func_chown_follows_symlink+:} false; then :
9274   $as_echo_n "(cached) " >&6
9275 else
9276
9277       if test "$cross_compiling" = yes; then :
9278   gl_cv_func_chown_follows_symlink=yes
9279
9280 else
9281   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9282 /* end confdefs.h.  */
9283
9284 #include <unistd.h>
9285 #include <stdlib.h>
9286 #include <errno.h>
9287
9288         int
9289         main ()
9290         {
9291           int result = 0;
9292           char const *dangling_symlink = "conftest.dangle";
9293
9294           unlink (dangling_symlink);
9295           if (symlink ("conftest.no-such", dangling_symlink))
9296             abort ();
9297
9298           /* Exit successfully on a conforming system,
9299              i.e., where chown must fail with ENOENT.  */
9300           if (chown (dangling_symlink, getuid (), getgid ()) == 0)
9301             result |= 1;
9302           if (errno != ENOENT)
9303             result |= 2;
9304           return result;
9305         }
9306
9307 _ACEOF
9308 if ac_fn_c_try_run "$LINENO"; then :
9309   gl_cv_func_chown_follows_symlink=yes
9310 else
9311   gl_cv_func_chown_follows_symlink=no
9312 fi
9313 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9314   conftest.$ac_objext conftest.beam conftest.$ac_ext
9315 fi
9316
9317
9318
9319 fi
9320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_chown_follows_symlink" >&5
9321 $as_echo "$gl_cv_func_chown_follows_symlink" >&6; }
9322
9323   if test $gl_cv_func_chown_follows_symlink = no; then
9324
9325 $as_echo "#define CHOWN_MODIFIES_SYMLINK 1" >>confdefs.h
9326
9327   fi
9328
9329
9330
9331
9332
9333
9334
9335
9336
9337
9338
9339
9340     if test $ac_cv_func_chown = no; then
9341     HAVE_CHOWN=0
9342   else
9343         if test $gl_cv_func_chown_follows_symlink = no; then
9344       REPLACE_CHOWN=1
9345     fi
9346
9347         if test $ac_cv_func_chown_works = no; then
9348
9349 $as_echo "#define CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE 1" >>confdefs.h
9350
9351       REPLACE_CHOWN=1
9352     fi
9353
9354                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether chown honors trailing slash" >&5
9355 $as_echo_n "checking whether chown honors trailing slash... " >&6; }
9356 if ${gl_cv_func_chown_slash_works+:} false; then :
9357   $as_echo_n "(cached) " >&6
9358 else
9359   touch conftest.file && rm -f conftest.link
9360        if test "$cross_compiling" = yes; then :
9361   case "$host_os" in
9362                    # Guess yes on glibc systems.
9363            *-gnu*) gl_cv_func_chown_slash_works="guessing yes" ;;
9364                    # If we don't know, assume the worst.
9365            *)      gl_cv_func_chown_slash_works="guessing no" ;;
9366          esac
9367
9368 else
9369   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9370 /* end confdefs.h.  */
9371
9372 #include <unistd.h>
9373 #include <stdlib.h>
9374 #include <errno.h>
9375
9376 int
9377 main ()
9378 {
9379     if (symlink ("conftest.file", "conftest.link")) return 1;
9380           if (chown ("conftest.link/", getuid (), getgid ()) == 0) return 2;
9381
9382   ;
9383   return 0;
9384 }
9385 _ACEOF
9386 if ac_fn_c_try_run "$LINENO"; then :
9387   gl_cv_func_chown_slash_works=yes
9388 else
9389   gl_cv_func_chown_slash_works=no
9390 fi
9391 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9392   conftest.$ac_objext conftest.beam conftest.$ac_ext
9393 fi
9394
9395       rm -f conftest.link conftest.file
9396 fi
9397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_chown_slash_works" >&5
9398 $as_echo "$gl_cv_func_chown_slash_works" >&6; }
9399     case "$gl_cv_func_chown_slash_works" in
9400       *yes) ;;
9401       *)
9402
9403 $as_echo "#define CHOWN_TRAILING_SLASH_BUG 1" >>confdefs.h
9404
9405         REPLACE_CHOWN=1
9406         ;;
9407     esac
9408
9409         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether chown always updates ctime" >&5
9410 $as_echo_n "checking whether chown always updates ctime... " >&6; }
9411 if ${gl_cv_func_chown_ctime_works+:} false; then :
9412   $as_echo_n "(cached) " >&6
9413 else
9414   if test "$cross_compiling" = yes; then :
9415   case "$host_os" in
9416                    # Guess yes on glibc systems.
9417            *-gnu*) gl_cv_func_chown_ctime_works="guessing yes" ;;
9418                    # If we don't know, assume the worst.
9419            *)      gl_cv_func_chown_ctime_works="guessing no" ;;
9420          esac
9421
9422 else
9423   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9424 /* end confdefs.h.  */
9425
9426 #include <unistd.h>
9427 #include <stdlib.h>
9428 #include <errno.h>
9429 #include <fcntl.h>
9430 #include <sys/stat.h>
9431
9432 int
9433 main ()
9434 {
9435     struct stat st1, st2;
9436           if (close (creat ("conftest.file", 0600))) return 1;
9437           if (stat ("conftest.file", &st1)) return 2;
9438           sleep (1);
9439           if (chown ("conftest.file", st1.st_uid, st1.st_gid)) return 3;
9440           if (stat ("conftest.file", &st2)) return 4;
9441           if (st2.st_ctime <= st1.st_ctime) return 5;
9442
9443   ;
9444   return 0;
9445 }
9446 _ACEOF
9447 if ac_fn_c_try_run "$LINENO"; then :
9448   gl_cv_func_chown_ctime_works=yes
9449 else
9450   gl_cv_func_chown_ctime_works=no
9451 fi
9452 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9453   conftest.$ac_objext conftest.beam conftest.$ac_ext
9454 fi
9455
9456       rm -f conftest.file
9457 fi
9458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_chown_ctime_works" >&5
9459 $as_echo "$gl_cv_func_chown_ctime_works" >&6; }
9460     case "$gl_cv_func_chown_ctime_works" in
9461       *yes) ;;
9462       *)
9463
9464 $as_echo "#define CHOWN_CHANGE_TIME_BUG 1" >>confdefs.h
9465
9466         REPLACE_CHOWN=1
9467         ;;
9468     esac
9469   fi
9470
9471
9472
9473
9474
9475   if test $ac_cv_func__set_invalid_parameter_handler = yes; then
9476     HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
9477
9478 $as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
9479
9480   else
9481     HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
9482   fi
9483
9484
9485
9486
9487
9488
9489
9490      GNULIB_OPENDIR=0;
9491   GNULIB_READDIR=0;
9492   GNULIB_REWINDDIR=0;
9493   GNULIB_CLOSEDIR=0;
9494   GNULIB_DIRFD=0;
9495   GNULIB_FDOPENDIR=0;
9496   GNULIB_SCANDIR=0;
9497   GNULIB_ALPHASORT=0;
9498     HAVE_OPENDIR=1;
9499   HAVE_READDIR=1;
9500   HAVE_REWINDDIR=1;
9501   HAVE_CLOSEDIR=1;
9502   HAVE_DECL_DIRFD=1;
9503   HAVE_DECL_FDOPENDIR=1;
9504   HAVE_FDOPENDIR=1;
9505   HAVE_SCANDIR=1;
9506   HAVE_ALPHASORT=1;
9507   REPLACE_OPENDIR=0;
9508   REPLACE_CLOSEDIR=0;
9509   REPLACE_DIRFD=0;
9510   REPLACE_FDOPENDIR=0;
9511
9512
9513
9514   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
9515 $as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
9516 if ${gl_cv_have_include_next+:} false; then :
9517   $as_echo_n "(cached) " >&6
9518 else
9519   rm -rf conftestd1a conftestd1b conftestd2
9520      mkdir conftestd1a conftestd1b conftestd2
9521                                                   cat <<EOF > conftestd1a/conftest.h
9522 #define DEFINED_IN_CONFTESTD1
9523 #include_next <conftest.h>
9524 #ifdef DEFINED_IN_CONFTESTD2
9525 int foo;
9526 #else
9527 #error "include_next doesn't work"
9528 #endif
9529 EOF
9530      cat <<EOF > conftestd1b/conftest.h
9531 #define DEFINED_IN_CONFTESTD1
9532 #include <stdio.h>
9533 #include_next <conftest.h>
9534 #ifdef DEFINED_IN_CONFTESTD2
9535 int foo;
9536 #else
9537 #error "include_next doesn't work"
9538 #endif
9539 EOF
9540      cat <<EOF > conftestd2/conftest.h
9541 #ifndef DEFINED_IN_CONFTESTD1
9542 #error "include_next test doesn't work"
9543 #endif
9544 #define DEFINED_IN_CONFTESTD2
9545 EOF
9546      gl_save_CPPFLAGS="$CPPFLAGS"
9547      CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
9548      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9549 /* end confdefs.h.  */
9550 #include <conftest.h>
9551 _ACEOF
9552 if ac_fn_c_try_compile "$LINENO"; then :
9553   gl_cv_have_include_next=yes
9554 else
9555   CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
9556         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9557 /* end confdefs.h.  */
9558 #include <conftest.h>
9559 _ACEOF
9560 if ac_fn_c_try_compile "$LINENO"; then :
9561   gl_cv_have_include_next=buggy
9562 else
9563   gl_cv_have_include_next=no
9564 fi
9565 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9566
9567 fi
9568 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9569      CPPFLAGS="$gl_save_CPPFLAGS"
9570      rm -rf conftestd1a conftestd1b conftestd2
9571
9572 fi
9573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
9574 $as_echo "$gl_cv_have_include_next" >&6; }
9575   PRAGMA_SYSTEM_HEADER=
9576   if test $gl_cv_have_include_next = yes; then
9577     INCLUDE_NEXT=include_next
9578     INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
9579     if test -n "$GCC"; then
9580       PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
9581     fi
9582   else
9583     if test $gl_cv_have_include_next = buggy; then
9584       INCLUDE_NEXT=include
9585       INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
9586     else
9587       INCLUDE_NEXT=include
9588       INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
9589     fi
9590   fi
9591
9592
9593
9594   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5
9595 $as_echo_n "checking whether system header files limit the line length... " >&6; }
9596 if ${gl_cv_pragma_columns+:} false; then :
9597   $as_echo_n "(cached) " >&6
9598 else
9599        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9600 /* end confdefs.h.  */
9601
9602 #ifdef __TANDEM
9603 choke me
9604 #endif
9605
9606 _ACEOF
9607 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9608   $EGREP "choke me" >/dev/null 2>&1; then :
9609   gl_cv_pragma_columns=yes
9610 else
9611   gl_cv_pragma_columns=no
9612 fi
9613 rm -f conftest*
9614
9615
9616 fi
9617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5
9618 $as_echo "$gl_cv_pragma_columns" >&6; }
9619   if test $gl_cv_pragma_columns = yes; then
9620     PRAGMA_COLUMNS="#pragma COLUMNS 10000"
9621   else
9622     PRAGMA_COLUMNS=
9623   fi
9624
9625
9626
9627
9628
9629
9630
9631
9632
9633
9634
9635
9636
9637
9638
9639
9640
9641   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
9642 $as_echo_n "checking if environ is properly declared... " >&6; }
9643   if ${gt_cv_var_environ_declaration+:} false; then :
9644   $as_echo_n "(cached) " >&6
9645 else
9646
9647     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9648 /* end confdefs.h.  */
9649 #if HAVE_UNISTD_H
9650      #include <unistd.h>
9651      #endif
9652      /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>.  */
9653      #include <stdlib.h>
9654
9655            extern struct { int foo; } environ;
9656 int
9657 main ()
9658 {
9659 environ.foo = 1;
9660   ;
9661   return 0;
9662 }
9663 _ACEOF
9664 if ac_fn_c_try_compile "$LINENO"; then :
9665   gt_cv_var_environ_declaration=no
9666 else
9667   gt_cv_var_environ_declaration=yes
9668 fi
9669 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9670 fi
9671
9672   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
9673 $as_echo "$gt_cv_var_environ_declaration" >&6; }
9674   if test $gt_cv_var_environ_declaration = yes; then
9675
9676 $as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
9677
9678   fi
9679
9680
9681   if test $gt_cv_var_environ_declaration != yes; then
9682     HAVE_DECL_ENVIRON=0
9683   fi
9684
9685
9686
9687   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
9688 $as_echo_n "checking for complete errno.h... " >&6; }
9689 if ${gl_cv_header_errno_h_complete+:} false; then :
9690   $as_echo_n "(cached) " >&6
9691 else
9692
9693     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9694 /* end confdefs.h.  */
9695
9696 #include <errno.h>
9697 #if !defined ETXTBSY
9698 booboo
9699 #endif
9700 #if !defined ENOMSG
9701 booboo
9702 #endif
9703 #if !defined EIDRM
9704 booboo
9705 #endif
9706 #if !defined ENOLINK
9707 booboo
9708 #endif
9709 #if !defined EPROTO
9710 booboo
9711 #endif
9712 #if !defined EMULTIHOP
9713 booboo
9714 #endif
9715 #if !defined EBADMSG
9716 booboo
9717 #endif
9718 #if !defined EOVERFLOW
9719 booboo
9720 #endif
9721 #if !defined ENOTSUP
9722 booboo
9723 #endif
9724 #if !defined ENETRESET
9725 booboo
9726 #endif
9727 #if !defined ECONNABORTED
9728 booboo
9729 #endif
9730 #if !defined ESTALE
9731 booboo
9732 #endif
9733 #if !defined EDQUOT
9734 booboo
9735 #endif
9736 #if !defined ECANCELED
9737 booboo
9738 #endif
9739 #if !defined EOWNERDEAD
9740 booboo
9741 #endif
9742 #if !defined ENOTRECOVERABLE
9743 booboo
9744 #endif
9745 #if !defined EILSEQ
9746 booboo
9747 #endif
9748
9749 _ACEOF
9750 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9751   $EGREP "booboo" >/dev/null 2>&1; then :
9752   gl_cv_header_errno_h_complete=no
9753 else
9754   gl_cv_header_errno_h_complete=yes
9755 fi
9756 rm -f conftest*
9757
9758
9759 fi
9760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
9761 $as_echo "$gl_cv_header_errno_h_complete" >&6; }
9762   if test $gl_cv_header_errno_h_complete = yes; then
9763     ERRNO_H=''
9764   else
9765
9766
9767
9768
9769
9770
9771
9772
9773      if test $gl_cv_have_include_next = yes; then
9774        gl_cv_next_errno_h='<'errno.h'>'
9775      else
9776        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
9777 $as_echo_n "checking absolute name of <errno.h>... " >&6; }
9778 if ${gl_cv_next_errno_h+:} false; then :
9779   $as_echo_n "(cached) " >&6
9780 else
9781
9782
9783
9784   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9785 /* end confdefs.h.  */
9786 #include <errno.h>
9787 _ACEOF
9788                 case "$host_os" in
9789     aix*) gl_absname_cpp="$ac_cpp -C" ;;
9790     *)    gl_absname_cpp="$ac_cpp" ;;
9791   esac
9792
9793   case "$host_os" in
9794     mingw*)
9795                                           gl_dirsep_regex='[/\\]'
9796       ;;
9797     *)
9798       gl_dirsep_regex='\/'
9799       ;;
9800   esac
9801       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
9802   gl_header_literal_regex=`echo 'errno.h' \
9803                            | sed -e "$gl_make_literal_regex_sed"`
9804   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
9805       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
9806       s|^/[^/]|//&|
9807       p
9808       q
9809     }'
9810
9811         gl_cv_absolute_errno_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
9812   sed -n "$gl_absolute_header_sed"`
9813
9814            gl_header=$gl_cv_absolute_errno_h
9815            gl_cv_next_errno_h='"'$gl_header'"'
9816
9817
9818 fi
9819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
9820 $as_echo "$gl_cv_next_errno_h" >&6; }
9821      fi
9822      NEXT_ERRNO_H=$gl_cv_next_errno_h
9823
9824      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
9825        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
9826        gl_next_as_first_directive='<'errno.h'>'
9827      else
9828        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
9829        gl_next_as_first_directive=$gl_cv_next_errno_h
9830      fi
9831      NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
9832
9833
9834
9835
9836     ERRNO_H='errno.h'
9837   fi
9838
9839    if test -n "$ERRNO_H"; then
9840   GL_GENERATE_ERRNO_H_TRUE=
9841   GL_GENERATE_ERRNO_H_FALSE='#'
9842 else
9843   GL_GENERATE_ERRNO_H_TRUE='#'
9844   GL_GENERATE_ERRNO_H_FALSE=
9845 fi
9846
9847
9848   if test -n "$ERRNO_H"; then
9849     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
9850 $as_echo_n "checking for EMULTIHOP value... " >&6; }
9851 if ${gl_cv_header_errno_h_EMULTIHOP+:} false; then :
9852   $as_echo_n "(cached) " >&6
9853 else
9854
9855       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9856 /* end confdefs.h.  */
9857
9858 #include <errno.h>
9859 #ifdef EMULTIHOP
9860 yes
9861 #endif
9862
9863 _ACEOF
9864 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9865   $EGREP "yes" >/dev/null 2>&1; then :
9866   gl_cv_header_errno_h_EMULTIHOP=yes
9867 else
9868   gl_cv_header_errno_h_EMULTIHOP=no
9869 fi
9870 rm -f conftest*
9871
9872       if test $gl_cv_header_errno_h_EMULTIHOP = no; then
9873         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9874 /* end confdefs.h.  */
9875
9876 #define _XOPEN_SOURCE_EXTENDED 1
9877 #include <errno.h>
9878 #ifdef EMULTIHOP
9879 yes
9880 #endif
9881
9882 _ACEOF
9883 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9884   $EGREP "yes" >/dev/null 2>&1; then :
9885   gl_cv_header_errno_h_EMULTIHOP=hidden
9886 fi
9887 rm -f conftest*
9888
9889         if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
9890                               if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP"        "
9891 #define _XOPEN_SOURCE_EXTENDED 1
9892 #include <errno.h>
9893 /* The following two lines are a workaround against an autoconf-2.52 bug.  */
9894 #include <stdio.h>
9895 #include <stdlib.h>
9896 "; then :
9897
9898 fi
9899
9900         fi
9901       fi
9902
9903 fi
9904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
9905 $as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
9906     case $gl_cv_header_errno_h_EMULTIHOP in
9907       yes | no)
9908         EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
9909         ;;
9910       *)
9911         EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
9912         ;;
9913     esac
9914
9915
9916   fi
9917
9918
9919   if test -n "$ERRNO_H"; then
9920     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
9921 $as_echo_n "checking for ENOLINK value... " >&6; }
9922 if ${gl_cv_header_errno_h_ENOLINK+:} false; then :
9923   $as_echo_n "(cached) " >&6
9924 else
9925
9926       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9927 /* end confdefs.h.  */
9928
9929 #include <errno.h>
9930 #ifdef ENOLINK
9931 yes
9932 #endif
9933
9934 _ACEOF
9935 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9936   $EGREP "yes" >/dev/null 2>&1; then :
9937   gl_cv_header_errno_h_ENOLINK=yes
9938 else
9939   gl_cv_header_errno_h_ENOLINK=no
9940 fi
9941 rm -f conftest*
9942
9943       if test $gl_cv_header_errno_h_ENOLINK = no; then
9944         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9945 /* end confdefs.h.  */
9946
9947 #define _XOPEN_SOURCE_EXTENDED 1
9948 #include <errno.h>
9949 #ifdef ENOLINK
9950 yes
9951 #endif
9952
9953 _ACEOF
9954 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9955   $EGREP "yes" >/dev/null 2>&1; then :
9956   gl_cv_header_errno_h_ENOLINK=hidden
9957 fi
9958 rm -f conftest*
9959
9960         if test $gl_cv_header_errno_h_ENOLINK = hidden; then
9961                               if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK"        "
9962 #define _XOPEN_SOURCE_EXTENDED 1
9963 #include <errno.h>
9964 /* The following two lines are a workaround against an autoconf-2.52 bug.  */
9965 #include <stdio.h>
9966 #include <stdlib.h>
9967 "; then :
9968
9969 fi
9970
9971         fi
9972       fi
9973
9974 fi
9975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
9976 $as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; }
9977     case $gl_cv_header_errno_h_ENOLINK in
9978       yes | no)
9979         ENOLINK_HIDDEN=0; ENOLINK_VALUE=
9980         ;;
9981       *)
9982         ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
9983         ;;
9984     esac
9985
9986
9987   fi
9988
9989
9990   if test -n "$ERRNO_H"; then
9991     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
9992 $as_echo_n "checking for EOVERFLOW value... " >&6; }
9993 if ${gl_cv_header_errno_h_EOVERFLOW+:} false; then :
9994   $as_echo_n "(cached) " >&6
9995 else
9996
9997       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9998 /* end confdefs.h.  */
9999
10000 #include <errno.h>
10001 #ifdef EOVERFLOW
10002 yes
10003 #endif
10004
10005 _ACEOF
10006 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10007   $EGREP "yes" >/dev/null 2>&1; then :
10008   gl_cv_header_errno_h_EOVERFLOW=yes
10009 else
10010   gl_cv_header_errno_h_EOVERFLOW=no
10011 fi
10012 rm -f conftest*
10013
10014       if test $gl_cv_header_errno_h_EOVERFLOW = no; then
10015         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10016 /* end confdefs.h.  */
10017
10018 #define _XOPEN_SOURCE_EXTENDED 1
10019 #include <errno.h>
10020 #ifdef EOVERFLOW
10021 yes
10022 #endif
10023
10024 _ACEOF
10025 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10026   $EGREP "yes" >/dev/null 2>&1; then :
10027   gl_cv_header_errno_h_EOVERFLOW=hidden
10028 fi
10029 rm -f conftest*
10030
10031         if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
10032                               if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW"        "
10033 #define _XOPEN_SOURCE_EXTENDED 1
10034 #include <errno.h>
10035 /* The following two lines are a workaround against an autoconf-2.52 bug.  */
10036 #include <stdio.h>
10037 #include <stdlib.h>
10038 "; then :
10039
10040 fi
10041
10042         fi
10043       fi
10044
10045 fi
10046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
10047 $as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
10048     case $gl_cv_header_errno_h_EOVERFLOW in
10049       yes | no)
10050         EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
10051         ;;
10052       *)
10053         EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
10054         ;;
10055     esac
10056
10057
10058   fi
10059
10060
10061 ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
10062 if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
10063   ac_have_decl=1
10064 else
10065   ac_have_decl=0
10066 fi
10067
10068 cat >>confdefs.h <<_ACEOF
10069 #define HAVE_DECL_STRERROR_R $ac_have_decl
10070 _ACEOF
10071
10072 for ac_func in strerror_r
10073 do :
10074   ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
10075 if test "x$ac_cv_func_strerror_r" = xyes; then :
10076   cat >>confdefs.h <<_ACEOF
10077 #define HAVE_STRERROR_R 1
10078 _ACEOF
10079
10080 fi
10081 done
10082
10083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
10084 $as_echo_n "checking whether strerror_r returns char *... " >&6; }
10085 if ${ac_cv_func_strerror_r_char_p+:} false; then :
10086   $as_echo_n "(cached) " >&6
10087 else
10088
10089     ac_cv_func_strerror_r_char_p=no
10090     if test $ac_cv_have_decl_strerror_r = yes; then
10091       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10092 /* end confdefs.h.  */
10093 $ac_includes_default
10094 int
10095 main ()
10096 {
10097
10098           char buf[100];
10099           char x = *strerror_r (0, buf, sizeof buf);
10100           char *p = strerror_r (0, buf, sizeof buf);
10101           return !p || x;
10102
10103   ;
10104   return 0;
10105 }
10106 _ACEOF
10107 if ac_fn_c_try_compile "$LINENO"; then :
10108   ac_cv_func_strerror_r_char_p=yes
10109 fi
10110 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10111     else
10112       # strerror_r is not declared.  Choose between
10113       # systems that have relatively inaccessible declarations for the
10114       # function.  BeOS and DEC UNIX 4.0 fall in this category, but the
10115       # former has a strerror_r that returns char*, while the latter
10116       # has a strerror_r that returns `int'.
10117       # This test should segfault on the DEC system.
10118       if test "$cross_compiling" = yes; then :
10119   :
10120 else
10121   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10122 /* end confdefs.h.  */
10123 $ac_includes_default
10124         extern char *strerror_r ();
10125 int
10126 main ()
10127 {
10128 char buf[100];
10129           char x = *strerror_r (0, buf, sizeof buf);
10130           return ! isalpha (x);
10131   ;
10132   return 0;
10133 }
10134 _ACEOF
10135 if ac_fn_c_try_run "$LINENO"; then :
10136   ac_cv_func_strerror_r_char_p=yes
10137 fi
10138 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10139   conftest.$ac_objext conftest.beam conftest.$ac_ext
10140 fi
10141
10142     fi
10143
10144 fi
10145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
10146 $as_echo "$ac_cv_func_strerror_r_char_p" >&6; }
10147 if test $ac_cv_func_strerror_r_char_p = yes; then
10148
10149 $as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h
10150
10151 fi
10152
10153
10154
10155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking type of array argument to getgroups" >&5
10156 $as_echo_n "checking type of array argument to getgroups... " >&6; }
10157 if ${ac_cv_type_getgroups+:} false; then :
10158   $as_echo_n "(cached) " >&6
10159 else
10160   if test "$cross_compiling" = yes; then :
10161   ac_cv_type_getgroups=cross
10162 else
10163   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10164 /* end confdefs.h.  */
10165 /* Thanks to Mike Rendell for this test.  */
10166 $ac_includes_default
10167 #define NGID 256
10168 #undef MAX
10169 #define MAX(x, y) ((x) > (y) ? (x) : (y))
10170
10171 int
10172 main ()
10173 {
10174   gid_t gidset[NGID];
10175   int i, n;
10176   union { gid_t gval; long int lval; }  val;
10177
10178   val.lval = -1;
10179   for (i = 0; i < NGID; i++)
10180     gidset[i] = val.gval;
10181   n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
10182                  gidset);
10183   /* Exit non-zero if getgroups seems to require an array of ints.  This
10184      happens when gid_t is short int but getgroups modifies an array
10185      of ints.  */
10186   return n > 0 && gidset[n] != val.gval;
10187 }
10188 _ACEOF
10189 if ac_fn_c_try_run "$LINENO"; then :
10190   ac_cv_type_getgroups=gid_t
10191 else
10192   ac_cv_type_getgroups=int
10193 fi
10194 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10195   conftest.$ac_objext conftest.beam conftest.$ac_ext
10196 fi
10197
10198 if test $ac_cv_type_getgroups = cross; then
10199         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10200 /* end confdefs.h.  */
10201 #include <unistd.h>
10202
10203 _ACEOF
10204 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10205   $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then :
10206   ac_cv_type_getgroups=gid_t
10207 else
10208   ac_cv_type_getgroups=int
10209 fi
10210 rm -f conftest*
10211
10212 fi
10213 fi
10214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_getgroups" >&5
10215 $as_echo "$ac_cv_type_getgroups" >&6; }
10216
10217 cat >>confdefs.h <<_ACEOF
10218 #define GETGROUPS_T $ac_cv_type_getgroups
10219 _ACEOF
10220
10221
10222
10223
10224
10225 ac_fn_c_check_decl "$LINENO" "fchdir" "ac_cv_have_decl_fchdir" "$ac_includes_default"
10226 if test "x$ac_cv_have_decl_fchdir" = xyes; then :
10227   ac_have_decl=1
10228 else
10229   ac_have_decl=0
10230 fi
10231
10232 cat >>confdefs.h <<_ACEOF
10233 #define HAVE_DECL_FCHDIR $ac_have_decl
10234 _ACEOF
10235
10236
10237      GNULIB_FCHMODAT=0;
10238   GNULIB_FSTAT=0;
10239   GNULIB_FSTATAT=0;
10240   GNULIB_FUTIMENS=0;
10241   GNULIB_LCHMOD=0;
10242   GNULIB_LSTAT=0;
10243   GNULIB_MKDIRAT=0;
10244   GNULIB_MKFIFO=0;
10245   GNULIB_MKFIFOAT=0;
10246   GNULIB_MKNOD=0;
10247   GNULIB_MKNODAT=0;
10248   GNULIB_STAT=0;
10249   GNULIB_UTIMENSAT=0;
10250     HAVE_FCHMODAT=1;
10251   HAVE_FSTATAT=1;
10252   HAVE_FUTIMENS=1;
10253   HAVE_LCHMOD=1;
10254   HAVE_LSTAT=1;
10255   HAVE_MKDIRAT=1;
10256   HAVE_MKFIFO=1;
10257   HAVE_MKFIFOAT=1;
10258   HAVE_MKNOD=1;
10259   HAVE_MKNODAT=1;
10260   HAVE_UTIMENSAT=1;
10261   REPLACE_FSTAT=0;
10262   REPLACE_FSTATAT=0;
10263   REPLACE_FUTIMENS=0;
10264   REPLACE_LSTAT=0;
10265   REPLACE_MKDIR=0;
10266   REPLACE_MKFIFO=0;
10267   REPLACE_MKNOD=0;
10268   REPLACE_STAT=0;
10269   REPLACE_UTIMENSAT=0;
10270
10271
10272
10273
10274
10275
10276   GNULIB_FCNTL=0;
10277   GNULIB_NONBLOCKING=0;
10278   GNULIB_OPEN=0;
10279   GNULIB_OPENAT=0;
10280     HAVE_FCNTL=1;
10281   HAVE_OPENAT=1;
10282   REPLACE_FCNTL=0;
10283   REPLACE_OPEN=0;
10284   REPLACE_OPENAT=0;
10285
10286
10287
10288
10289
10290
10291
10292
10293
10294
10295   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
10296 $as_echo_n "checking for working fcntl.h... " >&6; }
10297 if ${gl_cv_header_working_fcntl_h+:} false; then :
10298   $as_echo_n "(cached) " >&6
10299 else
10300   if test "$cross_compiling" = yes; then :
10301   gl_cv_header_working_fcntl_h=cross-compiling
10302 else
10303   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10304 /* end confdefs.h.  */
10305 #include <sys/types.h>
10306            #include <sys/stat.h>
10307            #if HAVE_UNISTD_H
10308            # include <unistd.h>
10309            #else /* on Windows with MSVC */
10310            # include <io.h>
10311            # include <stdlib.h>
10312            # defined sleep(n) _sleep ((n) * 1000)
10313            #endif
10314            #include <fcntl.h>
10315            #ifndef O_NOATIME
10316             #define O_NOATIME 0
10317            #endif
10318            #ifndef O_NOFOLLOW
10319             #define O_NOFOLLOW 0
10320            #endif
10321            static int const constants[] =
10322             {
10323               O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
10324               O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
10325             };
10326
10327 int
10328 main ()
10329 {
10330
10331             int result = !constants;
10332             #if HAVE_SYMLINK
10333             {
10334               static char const sym[] = "conftest.sym";
10335               if (symlink ("/dev/null", sym) != 0)
10336                 result |= 2;
10337               else
10338                 {
10339                   int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
10340                   if (fd >= 0)
10341                     {
10342                       close (fd);
10343                       result |= 4;
10344                     }
10345                 }
10346               if (unlink (sym) != 0 || symlink (".", sym) != 0)
10347                 result |= 2;
10348               else
10349                 {
10350                   int fd = open (sym, O_RDONLY | O_NOFOLLOW);
10351                   if (fd >= 0)
10352                     {
10353                       close (fd);
10354                       result |= 4;
10355                     }
10356                 }
10357               unlink (sym);
10358             }
10359             #endif
10360             {
10361               static char const file[] = "confdefs.h";
10362               int fd = open (file, O_RDONLY | O_NOATIME);
10363               if (fd < 0)
10364                 result |= 8;
10365               else
10366                 {
10367                   struct stat st0;
10368                   if (fstat (fd, &st0) != 0)
10369                     result |= 16;
10370                   else
10371                     {
10372                       char c;
10373                       sleep (1);
10374                       if (read (fd, &c, 1) != 1)
10375                         result |= 24;
10376                       else
10377                         {
10378                           if (close (fd) != 0)
10379                             result |= 32;
10380                           else
10381                             {
10382                               struct stat st1;
10383                               if (stat (file, &st1) != 0)
10384                                 result |= 40;
10385                               else
10386                                 if (st0.st_atime != st1.st_atime)
10387                                   result |= 64;
10388                             }
10389                         }
10390                     }
10391                 }
10392             }
10393             return result;
10394   ;
10395   return 0;
10396 }
10397 _ACEOF
10398 if ac_fn_c_try_run "$LINENO"; then :
10399   gl_cv_header_working_fcntl_h=yes
10400 else
10401   case $? in #(
10402         4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
10403         64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
10404         68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
10405          *) gl_cv_header_working_fcntl_h='no';;
10406         esac
10407 fi
10408 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10409   conftest.$ac_objext conftest.beam conftest.$ac_ext
10410 fi
10411
10412 fi
10413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
10414 $as_echo "$gl_cv_header_working_fcntl_h" >&6; }
10415
10416   case $gl_cv_header_working_fcntl_h in #(
10417   *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
10418   *) ac_val=1;;
10419   esac
10420
10421 cat >>confdefs.h <<_ACEOF
10422 #define HAVE_WORKING_O_NOATIME $ac_val
10423 _ACEOF
10424
10425
10426   case $gl_cv_header_working_fcntl_h in #(
10427   *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
10428   *) ac_val=1;;
10429   esac
10430
10431 cat >>confdefs.h <<_ACEOF
10432 #define HAVE_WORKING_O_NOFOLLOW $ac_val
10433 _ACEOF
10434
10435
10436
10437
10438
10439
10440    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
10441 $as_echo_n "checking for mbstate_t... " >&6; }
10442 if ${ac_cv_type_mbstate_t+:} false; then :
10443   $as_echo_n "(cached) " >&6
10444 else
10445   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10446 /* end confdefs.h.  */
10447 $ac_includes_default
10448 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
10449    <wchar.h>.
10450    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
10451    included before <wchar.h>.  */
10452 #include <stddef.h>
10453 #include <stdio.h>
10454 #include <time.h>
10455 #include <wchar.h>
10456 int
10457 main ()
10458 {
10459 mbstate_t x; return sizeof x;
10460   ;
10461   return 0;
10462 }
10463 _ACEOF
10464 if ac_fn_c_try_compile "$LINENO"; then :
10465   ac_cv_type_mbstate_t=yes
10466 else
10467   ac_cv_type_mbstate_t=no
10468 fi
10469 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10470 fi
10471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
10472 $as_echo "$ac_cv_type_mbstate_t" >&6; }
10473    if test $ac_cv_type_mbstate_t = yes; then
10474
10475 $as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
10476
10477    else
10478
10479 $as_echo "#define mbstate_t int" >>confdefs.h
10480
10481    fi
10482
10483
10484
10485
10486
10487
10488
10489
10490
10491
10492
10493
10494
10495
10496
10497
10498
10499
10500   GNULIB_DPRINTF=0;
10501   GNULIB_FCLOSE=0;
10502   GNULIB_FDOPEN=0;
10503   GNULIB_FFLUSH=0;
10504   GNULIB_FGETC=0;
10505   GNULIB_FGETS=0;
10506   GNULIB_FOPEN=0;
10507   GNULIB_FPRINTF=0;
10508   GNULIB_FPRINTF_POSIX=0;
10509   GNULIB_FPURGE=0;
10510   GNULIB_FPUTC=0;
10511   GNULIB_FPUTS=0;
10512   GNULIB_FREAD=0;
10513   GNULIB_FREOPEN=0;
10514   GNULIB_FSCANF=0;
10515   GNULIB_FSEEK=0;
10516   GNULIB_FSEEKO=0;
10517   GNULIB_FTELL=0;
10518   GNULIB_FTELLO=0;
10519   GNULIB_FWRITE=0;
10520   GNULIB_GETC=0;
10521   GNULIB_GETCHAR=0;
10522   GNULIB_GETDELIM=0;
10523   GNULIB_GETLINE=0;
10524   GNULIB_OBSTACK_PRINTF=0;
10525   GNULIB_OBSTACK_PRINTF_POSIX=0;
10526   GNULIB_PCLOSE=0;
10527   GNULIB_PERROR=0;
10528   GNULIB_POPEN=0;
10529   GNULIB_PRINTF=0;
10530   GNULIB_PRINTF_POSIX=0;
10531   GNULIB_PUTC=0;
10532   GNULIB_PUTCHAR=0;
10533   GNULIB_PUTS=0;
10534   GNULIB_REMOVE=0;
10535   GNULIB_RENAME=0;
10536   GNULIB_RENAMEAT=0;
10537   GNULIB_SCANF=0;
10538   GNULIB_SNPRINTF=0;
10539   GNULIB_SPRINTF_POSIX=0;
10540   GNULIB_STDIO_H_NONBLOCKING=0;
10541   GNULIB_STDIO_H_SIGPIPE=0;
10542   GNULIB_TMPFILE=0;
10543   GNULIB_VASPRINTF=0;
10544   GNULIB_VFSCANF=0;
10545   GNULIB_VSCANF=0;
10546   GNULIB_VDPRINTF=0;
10547   GNULIB_VFPRINTF=0;
10548   GNULIB_VFPRINTF_POSIX=0;
10549   GNULIB_VPRINTF=0;
10550   GNULIB_VPRINTF_POSIX=0;
10551   GNULIB_VSNPRINTF=0;
10552   GNULIB_VSPRINTF_POSIX=0;
10553     HAVE_DECL_FPURGE=1;
10554   HAVE_DECL_FSEEKO=1;
10555   HAVE_DECL_FTELLO=1;
10556   HAVE_DECL_GETDELIM=1;
10557   HAVE_DECL_GETLINE=1;
10558   HAVE_DECL_OBSTACK_PRINTF=1;
10559   HAVE_DECL_SNPRINTF=1;
10560   HAVE_DECL_VSNPRINTF=1;
10561   HAVE_DPRINTF=1;
10562   HAVE_FSEEKO=1;
10563   HAVE_FTELLO=1;
10564   HAVE_PCLOSE=1;
10565   HAVE_POPEN=1;
10566   HAVE_RENAMEAT=1;
10567   HAVE_VASPRINTF=1;
10568   HAVE_VDPRINTF=1;
10569   REPLACE_DPRINTF=0;
10570   REPLACE_FCLOSE=0;
10571   REPLACE_FDOPEN=0;
10572   REPLACE_FFLUSH=0;
10573   REPLACE_FOPEN=0;
10574   REPLACE_FPRINTF=0;
10575   REPLACE_FPURGE=0;
10576   REPLACE_FREOPEN=0;
10577   REPLACE_FSEEK=0;
10578   REPLACE_FSEEKO=0;
10579   REPLACE_FTELL=0;
10580   REPLACE_FTELLO=0;
10581   REPLACE_GETDELIM=0;
10582   REPLACE_GETLINE=0;
10583   REPLACE_OBSTACK_PRINTF=0;
10584   REPLACE_PERROR=0;
10585   REPLACE_POPEN=0;
10586   REPLACE_PRINTF=0;
10587   REPLACE_REMOVE=0;
10588   REPLACE_RENAME=0;
10589   REPLACE_RENAMEAT=0;
10590   REPLACE_SNPRINTF=0;
10591   REPLACE_SPRINTF=0;
10592   REPLACE_STDIO_READ_FUNCS=0;
10593   REPLACE_STDIO_WRITE_FUNCS=0;
10594   REPLACE_TMPFILE=0;
10595   REPLACE_VASPRINTF=0;
10596   REPLACE_VDPRINTF=0;
10597   REPLACE_VFPRINTF=0;
10598   REPLACE_VPRINTF=0;
10599   REPLACE_VSNPRINTF=0;
10600   REPLACE_VSPRINTF=0;
10601
10602
10603     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdin defaults to large file offsets" >&5
10604 $as_echo_n "checking whether stdin defaults to large file offsets... " >&6; }
10605 if ${gl_cv_var_stdin_large_offset+:} false; then :
10606   $as_echo_n "(cached) " >&6
10607 else
10608   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10609 /* end confdefs.h.  */
10610 #include <stdio.h>
10611 int
10612 main ()
10613 {
10614 #if defined __SL64 && defined __SCLE /* cygwin */
10615   /* Cygwin 1.5.24 and earlier fail to put stdin in 64-bit mode, making
10616      fseeko/ftello needlessly fail.  This bug was fixed in 1.5.25, and
10617      it is easier to do a version check than building a runtime test.  */
10618 # include <cygwin/version.h>
10619 # if CYGWIN_VERSION_DLL_COMBINED < CYGWIN_VERSION_DLL_MAKE_COMBINED (1005, 25)
10620   choke me
10621 # endif
10622 #endif
10623   ;
10624   return 0;
10625 }
10626 _ACEOF
10627 if ac_fn_c_try_link "$LINENO"; then :
10628   gl_cv_var_stdin_large_offset=yes
10629 else
10630   gl_cv_var_stdin_large_offset=no
10631 fi
10632 rm -f core conftest.err conftest.$ac_objext \
10633     conftest$ac_exeext conftest.$ac_ext
10634 fi
10635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var_stdin_large_offset" >&5
10636 $as_echo "$gl_cv_var_stdin_large_offset" >&6; }
10637
10638
10639
10640
10641
10642   case "$host_os" in
10643     mingw*)
10644                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
10645 $as_echo_n "checking for 64-bit off_t... " >&6; }
10646 if ${gl_cv_type_off_t_64+:} false; then :
10647   $as_echo_n "(cached) " >&6
10648 else
10649   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10650 /* end confdefs.h.  */
10651 #include <sys/types.h>
10652                 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
10653
10654 int
10655 main ()
10656 {
10657
10658   ;
10659   return 0;
10660 }
10661 _ACEOF
10662 if ac_fn_c_try_compile "$LINENO"; then :
10663   gl_cv_type_off_t_64=yes
10664 else
10665   gl_cv_type_off_t_64=no
10666 fi
10667 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10668
10669 fi
10670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
10671 $as_echo "$gl_cv_type_off_t_64" >&6; }
10672       if test $gl_cv_type_off_t_64 = no; then
10673         WINDOWS_64_BIT_OFF_T=1
10674       else
10675         WINDOWS_64_BIT_OFF_T=0
10676       fi
10677                   WINDOWS_64_BIT_ST_SIZE=1
10678       ;;
10679     *)
10680                                                       WINDOWS_64_BIT_OFF_T=0
10681       WINDOWS_64_BIT_ST_SIZE=0
10682       ;;
10683   esac
10684
10685
10686
10687
10688
10689
10690
10691
10692
10693
10694
10695
10696
10697
10698
10699
10700
10701      if test $gl_cv_have_include_next = yes; then
10702        gl_cv_next_sys_types_h='<'sys/types.h'>'
10703      else
10704        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
10705 $as_echo_n "checking absolute name of <sys/types.h>... " >&6; }
10706 if ${gl_cv_next_sys_types_h+:} false; then :
10707   $as_echo_n "(cached) " >&6
10708 else
10709
10710
10711
10712   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10713 /* end confdefs.h.  */
10714 #include <sys/types.h>
10715 _ACEOF
10716                 case "$host_os" in
10717     aix*) gl_absname_cpp="$ac_cpp -C" ;;
10718     *)    gl_absname_cpp="$ac_cpp" ;;
10719   esac
10720
10721   case "$host_os" in
10722     mingw*)
10723                                           gl_dirsep_regex='[/\\]'
10724       ;;
10725     *)
10726       gl_dirsep_regex='\/'
10727       ;;
10728   esac
10729       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
10730   gl_header_literal_regex=`echo 'sys/types.h' \
10731                            | sed -e "$gl_make_literal_regex_sed"`
10732   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10733       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10734       s|^/[^/]|//&|
10735       p
10736       q
10737     }'
10738
10739         gl_cv_absolute_sys_types_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10740   sed -n "$gl_absolute_header_sed"`
10741
10742            gl_header=$gl_cv_absolute_sys_types_h
10743            gl_cv_next_sys_types_h='"'$gl_header'"'
10744
10745
10746 fi
10747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
10748 $as_echo "$gl_cv_next_sys_types_h" >&6; }
10749      fi
10750      NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h
10751
10752      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10753        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10754        gl_next_as_first_directive='<'sys/types.h'>'
10755      else
10756        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10757        gl_next_as_first_directive=$gl_cv_next_sys_types_h
10758      fi
10759      NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
10760
10761
10762
10763
10764
10765
10766
10767
10768
10769
10770
10771 ac_fn_c_check_decl "$LINENO" "fseeko" "ac_cv_have_decl_fseeko" "$ac_includes_default"
10772 if test "x$ac_cv_have_decl_fseeko" = xyes; then :
10773   ac_have_decl=1
10774 else
10775   ac_have_decl=0
10776 fi
10777
10778 cat >>confdefs.h <<_ACEOF
10779 #define HAVE_DECL_FSEEKO $ac_have_decl
10780 _ACEOF
10781
10782
10783
10784
10785
10786
10787
10788
10789
10790   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fseeko" >&5
10791 $as_echo_n "checking for fseeko... " >&6; }
10792 if ${gl_cv_func_fseeko+:} false; then :
10793   $as_echo_n "(cached) " >&6
10794 else
10795
10796       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10797 /* end confdefs.h.  */
10798 #include <stdio.h>
10799
10800 int
10801 main ()
10802 {
10803 fseeko (stdin, 0, 0);
10804   ;
10805   return 0;
10806 }
10807 _ACEOF
10808 if ac_fn_c_try_link "$LINENO"; then :
10809   gl_cv_func_fseeko=yes
10810 else
10811   gl_cv_func_fseeko=no
10812 fi
10813 rm -f core conftest.err conftest.$ac_objext \
10814     conftest$ac_exeext conftest.$ac_ext
10815
10816 fi
10817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fseeko" >&5
10818 $as_echo "$gl_cv_func_fseeko" >&6; }
10819
10820
10821   if test $ac_cv_have_decl_fseeko = no; then
10822     HAVE_DECL_FSEEKO=0
10823   fi
10824
10825   if test $gl_cv_func_fseeko = no; then
10826     HAVE_FSEEKO=0
10827   else
10828     if test $WINDOWS_64_BIT_OFF_T = 1; then
10829       REPLACE_FSEEKO=1
10830     fi
10831     if test $gl_cv_var_stdin_large_offset = no; then
10832       REPLACE_FSEEKO=1
10833     fi
10834
10835   fi
10836
10837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
10838 $as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
10839 if ${ac_cv_header_stat_broken+:} false; then :
10840   $as_echo_n "(cached) " >&6
10841 else
10842   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10843 /* end confdefs.h.  */
10844 #include <sys/types.h>
10845 #include <sys/stat.h>
10846
10847 #if defined S_ISBLK && defined S_IFDIR
10848 extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
10849 #endif
10850
10851 #if defined S_ISBLK && defined S_IFCHR
10852 extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
10853 #endif
10854
10855 #if defined S_ISLNK && defined S_IFREG
10856 extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
10857 #endif
10858
10859 #if defined S_ISSOCK && defined S_IFREG
10860 extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
10861 #endif
10862
10863 _ACEOF
10864 if ac_fn_c_try_compile "$LINENO"; then :
10865   ac_cv_header_stat_broken=no
10866 else
10867   ac_cv_header_stat_broken=yes
10868 fi
10869 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10870 fi
10871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
10872 $as_echo "$ac_cv_header_stat_broken" >&6; }
10873 if test $ac_cv_header_stat_broken = yes; then
10874
10875 $as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
10876
10877 fi
10878
10879
10880
10881
10882
10883
10884
10885
10886
10887
10888
10889
10890
10891
10892
10893
10894
10895      if test $gl_cv_have_include_next = yes; then
10896        gl_cv_next_sys_stat_h='<'sys/stat.h'>'
10897      else
10898        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
10899 $as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
10900 if ${gl_cv_next_sys_stat_h+:} false; then :
10901   $as_echo_n "(cached) " >&6
10902 else
10903
10904              if test $ac_cv_header_sys_stat_h = yes; then
10905
10906
10907
10908
10909   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10910 /* end confdefs.h.  */
10911 #include <sys/stat.h>
10912 _ACEOF
10913                 case "$host_os" in
10914     aix*) gl_absname_cpp="$ac_cpp -C" ;;
10915     *)    gl_absname_cpp="$ac_cpp" ;;
10916   esac
10917
10918   case "$host_os" in
10919     mingw*)
10920                                           gl_dirsep_regex='[/\\]'
10921       ;;
10922     *)
10923       gl_dirsep_regex='\/'
10924       ;;
10925   esac
10926       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
10927   gl_header_literal_regex=`echo 'sys/stat.h' \
10928                            | sed -e "$gl_make_literal_regex_sed"`
10929   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10930       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10931       s|^/[^/]|//&|
10932       p
10933       q
10934     }'
10935
10936         gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10937   sed -n "$gl_absolute_header_sed"`
10938
10939            gl_header=$gl_cv_absolute_sys_stat_h
10940            gl_cv_next_sys_stat_h='"'$gl_header'"'
10941           else
10942                gl_cv_next_sys_stat_h='<'sys/stat.h'>'
10943              fi
10944
10945
10946 fi
10947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
10948 $as_echo "$gl_cv_next_sys_stat_h" >&6; }
10949      fi
10950      NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
10951
10952      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10953        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10954        gl_next_as_first_directive='<'sys/stat.h'>'
10955      else
10956        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10957        gl_next_as_first_directive=$gl_cv_next_sys_stat_h
10958      fi
10959      NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
10960
10961
10962
10963
10964
10965
10966
10967
10968
10969
10970
10971   if test $WINDOWS_64_BIT_ST_SIZE = 1; then
10972
10973 $as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
10974
10975   fi
10976
10977       ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
10978      #include <sys/stat.h>
10979 "
10980 if test "x$ac_cv_type_nlink_t" = xyes; then :
10981
10982 else
10983
10984 $as_echo "#define nlink_t int" >>confdefs.h
10985
10986 fi
10987
10988
10989
10990     for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat     mknod mknodat stat utimensat; do
10991     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
10992     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
10993 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
10994 if eval \${$as_gl_Symbol+:} false; then :
10995   $as_echo_n "(cached) " >&6
10996 else
10997   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10998 /* end confdefs.h.  */
10999 #include <sys/stat.h>
11000
11001 int
11002 main ()
11003 {
11004 #undef $gl_func
11005   (void) $gl_func;
11006   ;
11007   return 0;
11008 }
11009 _ACEOF
11010 if ac_fn_c_try_compile "$LINENO"; then :
11011   eval "$as_gl_Symbol=yes"
11012 else
11013   eval "$as_gl_Symbol=no"
11014 fi
11015 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11016 fi
11017 eval ac_res=\$$as_gl_Symbol
11018                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11019 $as_echo "$ac_res" >&6; }
11020     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
11021   cat >>confdefs.h <<_ACEOF
11022 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
11023 _ACEOF
11024
11025                      eval ac_cv_have_decl_$gl_func=yes
11026 fi
11027       done
11028
11029
11030
11031       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
11032 $as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
11033 if ${gl_cv_func_lstat_dereferences_slashed_symlink+:} false; then :
11034   $as_echo_n "(cached) " >&6
11035 else
11036   rm -f conftest.sym conftest.file
11037      echo >conftest.file
11038      if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then
11039        if test "$cross_compiling" = yes; then :
11040   case "$host_os" in
11041                     # Guess yes on glibc systems.
11042             *-gnu*) gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
11043                     # If we don't know, assume the worst.
11044             *)      gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
11045           esac
11046
11047 else
11048   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11049 /* end confdefs.h.  */
11050 $ac_includes_default
11051 int
11052 main ()
11053 {
11054 struct stat sbuf;
11055               /* Linux will dereference the symlink and fail, as required by
11056                  POSIX.  That is better in the sense that it means we will not
11057                  have to compile and use the lstat wrapper.  */
11058               return lstat ("conftest.sym/", &sbuf) == 0;
11059
11060   ;
11061   return 0;
11062 }
11063 _ACEOF
11064 if ac_fn_c_try_run "$LINENO"; then :
11065   gl_cv_func_lstat_dereferences_slashed_symlink=yes
11066 else
11067   gl_cv_func_lstat_dereferences_slashed_symlink=no
11068 fi
11069 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11070   conftest.$ac_objext conftest.beam conftest.$ac_ext
11071 fi
11072
11073      else
11074        # If the 'ln -s' command failed, then we probably don't even
11075        # have an lstat function.
11076        gl_cv_func_lstat_dereferences_slashed_symlink="guessing no"
11077      fi
11078      rm -f conftest.sym conftest.file
11079
11080 fi
11081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
11082 $as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
11083   case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
11084     *yes)
11085
11086 cat >>confdefs.h <<_ACEOF
11087 #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
11088 _ACEOF
11089
11090       ;;
11091   esac
11092
11093
11094
11095
11096
11097
11098
11099    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5
11100 $as_echo_n "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; }
11101 if ${gl_cv_func_getcwd_null+:} false; then :
11102   $as_echo_n "(cached) " >&6
11103 else
11104   if test "$cross_compiling" = yes; then :
11105   case "$host_os" in
11106                      # Guess yes on glibc systems.
11107             *-gnu*)  gl_cv_func_getcwd_null="guessing yes";;
11108                      # Guess yes on Cygwin.
11109             cygwin*) gl_cv_func_getcwd_null="guessing yes";;
11110                      # If we don't know, assume the worst.
11111             *)       gl_cv_func_getcwd_null="guessing no";;
11112           esac
11113
11114 else
11115   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11116 /* end confdefs.h.  */
11117
11118 #        if HAVE_UNISTD_H
11119 #         include <unistd.h>
11120 #        else /* on Windows with MSVC */
11121 #         include <direct.h>
11122 #        endif
11123 #        ifndef getcwd
11124          char *getcwd ();
11125 #        endif
11126
11127 int
11128 main ()
11129 {
11130
11131 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
11132 /* mingw cwd does not start with '/', but getcwd does allocate.
11133    However, mingw fails to honor non-zero size.  */
11134 #else
11135            if (chdir ("/") != 0)
11136              return 1;
11137            else
11138              {
11139                char *f = getcwd (NULL, 0);
11140                if (! f)
11141                  return 2;
11142                if (f[0] != '/')
11143                  return 3;
11144                if (f[1] != '\0')
11145                  return 4;
11146                return 0;
11147              }
11148 #endif
11149
11150   ;
11151   return 0;
11152 }
11153 _ACEOF
11154 if ac_fn_c_try_run "$LINENO"; then :
11155   gl_cv_func_getcwd_null=yes
11156 else
11157   gl_cv_func_getcwd_null=no
11158 fi
11159 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11160   conftest.$ac_objext conftest.beam conftest.$ac_ext
11161 fi
11162
11163 fi
11164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_null" >&5
11165 $as_echo "$gl_cv_func_getcwd_null" >&6; }
11166
11167
11168   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getcwd with POSIX signature" >&5
11169 $as_echo_n "checking for getcwd with POSIX signature... " >&6; }
11170 if ${gl_cv_func_getcwd_posix_signature+:} false; then :
11171   $as_echo_n "(cached) " >&6
11172 else
11173   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11174 /* end confdefs.h.  */
11175 #include <unistd.h>
11176 int
11177 main ()
11178 {
11179 extern
11180            #ifdef __cplusplus
11181            "C"
11182            #endif
11183            char *getcwd (char *, size_t);
11184
11185   ;
11186   return 0;
11187 }
11188
11189 _ACEOF
11190 if ac_fn_c_try_compile "$LINENO"; then :
11191   gl_cv_func_getcwd_posix_signature=yes
11192 else
11193   gl_cv_func_getcwd_posix_signature=no
11194 fi
11195 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11196
11197 fi
11198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_posix_signature" >&5
11199 $as_echo "$gl_cv_func_getcwd_posix_signature" >&6; }
11200
11201 ac_fn_c_check_decl "$LINENO" "getcwd" "ac_cv_have_decl_getcwd" "$ac_includes_default"
11202 if test "x$ac_cv_have_decl_getcwd" = xyes; then :
11203   ac_have_decl=1
11204 else
11205   ac_have_decl=0
11206 fi
11207
11208 cat >>confdefs.h <<_ACEOF
11209 #define HAVE_DECL_GETCWD $ac_have_decl
11210 _ACEOF
11211
11212 ac_fn_c_check_decl "$LINENO" "getdelim" "ac_cv_have_decl_getdelim" "$ac_includes_default"
11213 if test "x$ac_cv_have_decl_getdelim" = xyes; then :
11214   ac_have_decl=1
11215 else
11216   ac_have_decl=0
11217 fi
11218
11219 cat >>confdefs.h <<_ACEOF
11220 #define HAVE_DECL_GETDELIM $ac_have_decl
11221 _ACEOF
11222
11223
11224
11225
11226
11227 ac_fn_c_check_decl "$LINENO" "getline" "ac_cv_have_decl_getline" "$ac_includes_default"
11228 if test "x$ac_cv_have_decl_getline" = xyes; then :
11229   ac_have_decl=1
11230 else
11231   ac_have_decl=0
11232 fi
11233
11234 cat >>confdefs.h <<_ACEOF
11235 #define HAVE_DECL_GETLINE $ac_have_decl
11236 _ACEOF
11237
11238
11239
11240
11241
11242
11243
11244
11245
11246
11247
11248
11249
11250
11251
11252
11253      if test $gl_cv_have_include_next = yes; then
11254        gl_cv_next_getopt_h='<'getopt.h'>'
11255      else
11256        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5
11257 $as_echo_n "checking absolute name of <getopt.h>... " >&6; }
11258 if ${gl_cv_next_getopt_h+:} false; then :
11259   $as_echo_n "(cached) " >&6
11260 else
11261
11262              if test $ac_cv_header_getopt_h = yes; then
11263
11264
11265
11266
11267   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11268 /* end confdefs.h.  */
11269 #include <getopt.h>
11270 _ACEOF
11271                 case "$host_os" in
11272     aix*) gl_absname_cpp="$ac_cpp -C" ;;
11273     *)    gl_absname_cpp="$ac_cpp" ;;
11274   esac
11275
11276   case "$host_os" in
11277     mingw*)
11278                                           gl_dirsep_regex='[/\\]'
11279       ;;
11280     *)
11281       gl_dirsep_regex='\/'
11282       ;;
11283   esac
11284       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11285   gl_header_literal_regex=`echo 'getopt.h' \
11286                            | sed -e "$gl_make_literal_regex_sed"`
11287   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11288       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11289       s|^/[^/]|//&|
11290       p
11291       q
11292     }'
11293
11294         gl_cv_absolute_getopt_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11295   sed -n "$gl_absolute_header_sed"`
11296
11297            gl_header=$gl_cv_absolute_getopt_h
11298            gl_cv_next_getopt_h='"'$gl_header'"'
11299           else
11300                gl_cv_next_getopt_h='<'getopt.h'>'
11301              fi
11302
11303
11304 fi
11305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5
11306 $as_echo "$gl_cv_next_getopt_h" >&6; }
11307      fi
11308      NEXT_GETOPT_H=$gl_cv_next_getopt_h
11309
11310      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11311        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11312        gl_next_as_first_directive='<'getopt.h'>'
11313      else
11314        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11315        gl_next_as_first_directive=$gl_cv_next_getopt_h
11316      fi
11317      NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive
11318
11319
11320
11321
11322   if test $ac_cv_header_getopt_h = yes; then
11323     HAVE_GETOPT_H=1
11324   else
11325     HAVE_GETOPT_H=0
11326   fi
11327
11328
11329   gl_replace_getopt=
11330
11331     if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
11332     for ac_header in getopt.h
11333 do :
11334   ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
11335 if test "x$ac_cv_header_getopt_h" = xyes; then :
11336   cat >>confdefs.h <<_ACEOF
11337 #define HAVE_GETOPT_H 1
11338 _ACEOF
11339
11340 else
11341   gl_replace_getopt=yes
11342 fi
11343
11344 done
11345
11346   fi
11347
11348     if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
11349     for ac_func in getopt_long_only
11350 do :
11351   ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
11352 if test "x$ac_cv_func_getopt_long_only" = xyes; then :
11353   cat >>confdefs.h <<_ACEOF
11354 #define HAVE_GETOPT_LONG_ONLY 1
11355 _ACEOF
11356
11357 else
11358   gl_replace_getopt=yes
11359 fi
11360 done
11361
11362   fi
11363
11364           if test -z "$gl_replace_getopt"; then
11365     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5
11366 $as_echo_n "checking whether getopt is POSIX compatible... " >&6; }
11367 if ${gl_cv_func_getopt_posix+:} false; then :
11368   $as_echo_n "(cached) " >&6
11369 else
11370
11371                                                 if test $cross_compiling = no; then
11372                               if test "$cross_compiling" = yes; then :
11373   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11374 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11375 as_fn_error $? "cannot run test program while cross compiling
11376 See \`config.log' for more details" "$LINENO" 5; }
11377 else
11378   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11379 /* end confdefs.h.  */
11380
11381 #include <unistd.h>
11382 #include <stdlib.h>
11383 #include <string.h>
11384
11385 int
11386 main ()
11387 {
11388   static char program[] = "program";
11389   static char a[] = "-a";
11390   static char foo[] = "foo";
11391   static char bar[] = "bar";
11392   char *argv[] = { program, a, foo, bar, NULL };
11393   int c;
11394
11395   c = getopt (4, argv, "ab");
11396   if (!(c == 'a'))
11397     return 1;
11398   c = getopt (4, argv, "ab");
11399   if (!(c == -1))
11400     return 2;
11401   if (!(optind == 2))
11402     return 3;
11403   return 0;
11404 }
11405
11406 _ACEOF
11407 if ac_fn_c_try_run "$LINENO"; then :
11408   gl_cv_func_getopt_posix=maybe
11409 else
11410   gl_cv_func_getopt_posix=no
11411 fi
11412 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11413   conftest.$ac_objext conftest.beam conftest.$ac_ext
11414 fi
11415
11416           if test $gl_cv_func_getopt_posix = maybe; then
11417                                     if test "$cross_compiling" = yes; then :
11418   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11419 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11420 as_fn_error $? "cannot run test program while cross compiling
11421 See \`config.log' for more details" "$LINENO" 5; }
11422 else
11423   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11424 /* end confdefs.h.  */
11425
11426 #include <unistd.h>
11427 #include <stdlib.h>
11428 #include <string.h>
11429
11430 int
11431 main ()
11432 {
11433   static char program[] = "program";
11434   static char donald[] = "donald";
11435   static char p[] = "-p";
11436   static char billy[] = "billy";
11437   static char duck[] = "duck";
11438   static char a[] = "-a";
11439   static char bar[] = "bar";
11440   char *argv[] = { program, donald, p, billy, duck, a, bar, NULL };
11441   int c;
11442
11443   c = getopt (7, argv, "+abp:q:");
11444   if (!(c == -1))
11445     return 4;
11446   if (!(strcmp (argv[0], "program") == 0))
11447     return 5;
11448   if (!(strcmp (argv[1], "donald") == 0))
11449     return 6;
11450   if (!(strcmp (argv[2], "-p") == 0))
11451     return 7;
11452   if (!(strcmp (argv[3], "billy") == 0))
11453     return 8;
11454   if (!(strcmp (argv[4], "duck") == 0))
11455     return 9;
11456   if (!(strcmp (argv[5], "-a") == 0))
11457     return 10;
11458   if (!(strcmp (argv[6], "bar") == 0))
11459     return 11;
11460   if (!(optind == 1))
11461     return 12;
11462   return 0;
11463 }
11464
11465 _ACEOF
11466 if ac_fn_c_try_run "$LINENO"; then :
11467   gl_cv_func_getopt_posix=maybe
11468 else
11469   gl_cv_func_getopt_posix=no
11470 fi
11471 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11472   conftest.$ac_objext conftest.beam conftest.$ac_ext
11473 fi
11474
11475           fi
11476           if test $gl_cv_func_getopt_posix = maybe; then
11477                         if test "$cross_compiling" = yes; then :
11478   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11479 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11480 as_fn_error $? "cannot run test program while cross compiling
11481 See \`config.log' for more details" "$LINENO" 5; }
11482 else
11483   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11484 /* end confdefs.h.  */
11485
11486 #include <unistd.h>
11487 #include <stdlib.h>
11488 #include <string.h>
11489
11490 int
11491 main ()
11492 {
11493   static char program[] = "program";
11494   static char ab[] = "-ab";
11495   char *argv[3] = { program, ab, NULL };
11496   if (getopt (2, argv, "ab:") != 'a')
11497     return 13;
11498   if (getopt (2, argv, "ab:") != '?')
11499     return 14;
11500   if (optopt != 'b')
11501     return 15;
11502   if (optind != 2)
11503     return 16;
11504   return 0;
11505 }
11506
11507 _ACEOF
11508 if ac_fn_c_try_run "$LINENO"; then :
11509   gl_cv_func_getopt_posix=yes
11510 else
11511   gl_cv_func_getopt_posix=no
11512 fi
11513 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11514   conftest.$ac_objext conftest.beam conftest.$ac_ext
11515 fi
11516
11517           fi
11518         else
11519           case "$host_os" in
11520             darwin* | aix* | mingw*) gl_cv_func_getopt_posix="guessing no";;
11521             *)                       gl_cv_func_getopt_posix="guessing yes";;
11522           esac
11523         fi
11524
11525 fi
11526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5
11527 $as_echo "$gl_cv_func_getopt_posix" >&6; }
11528     case "$gl_cv_func_getopt_posix" in
11529       *no) gl_replace_getopt=yes ;;
11530     esac
11531   fi
11532
11533   if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
11534     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
11535 $as_echo_n "checking for working GNU getopt function... " >&6; }
11536 if ${gl_cv_func_getopt_gnu+:} false; then :
11537   $as_echo_n "(cached) " >&6
11538 else
11539   # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the
11540        # optstring is necessary for programs like m4 that have POSIX-mandated
11541        # semantics for supporting options interspersed with files.
11542        # Also, since getopt_long is a GNU extension, we require optind=0.
11543        # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT;
11544        # so take care to revert to the correct (non-)export state.
11545        gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }'
11546        case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in
11547          xx) gl_had_POSIXLY_CORRECT=exported ;;
11548          x)  gl_had_POSIXLY_CORRECT=yes      ;;
11549          *)  gl_had_POSIXLY_CORRECT=         ;;
11550        esac
11551        POSIXLY_CORRECT=1
11552        export POSIXLY_CORRECT
11553        if test "$cross_compiling" = yes; then :
11554            gl_cv_func_getopt_gnu="guessing no"
11555
11556 else
11557   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11558 /* end confdefs.h.  */
11559 #include <getopt.h>
11560                            #include <stddef.h>
11561                            #include <string.h>
11562
11563 #include <stdlib.h>
11564 #if defined __MACH__ && defined __APPLE__
11565 /* Avoid a crash on Mac OS X.  */
11566 #include <mach/mach.h>
11567 #include <mach/mach_error.h>
11568 #include <mach/thread_status.h>
11569 #include <mach/exception.h>
11570 #include <mach/task.h>
11571 #include <pthread.h>
11572 /* The exception port on which our thread listens.  */
11573 static mach_port_t our_exception_port;
11574 /* The main function of the thread listening for exceptions of type
11575    EXC_BAD_ACCESS.  */
11576 static void *
11577 mach_exception_thread (void *arg)
11578 {
11579   /* Buffer for a message to be received.  */
11580   struct {
11581     mach_msg_header_t head;
11582     mach_msg_body_t msgh_body;
11583     char data[1024];
11584   } msg;
11585   mach_msg_return_t retval;
11586   /* Wait for a message on the exception port.  */
11587   retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
11588                      our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
11589   if (retval != MACH_MSG_SUCCESS)
11590     abort ();
11591   exit (1);
11592 }
11593 static void
11594 nocrash_init (void)
11595 {
11596   mach_port_t self = mach_task_self ();
11597   /* Allocate a port on which the thread shall listen for exceptions.  */
11598   if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
11599       == KERN_SUCCESS) {
11600     /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html.  */
11601     if (mach_port_insert_right (self, our_exception_port, our_exception_port,
11602                                 MACH_MSG_TYPE_MAKE_SEND)
11603         == KERN_SUCCESS) {
11604       /* The exceptions we want to catch.  Only EXC_BAD_ACCESS is interesting
11605          for us.  */
11606       exception_mask_t mask = EXC_MASK_BAD_ACCESS;
11607       /* Create the thread listening on the exception port.  */
11608       pthread_attr_t attr;
11609       pthread_t thread;
11610       if (pthread_attr_init (&attr) == 0
11611           && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
11612           && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
11613         pthread_attr_destroy (&attr);
11614         /* Replace the exception port info for these exceptions with our own.
11615            Note that we replace the exception port for the entire task, not only
11616            for a particular thread.  This has the effect that when our exception
11617            port gets the message, the thread specific exception port has already
11618            been asked, and we don't need to bother about it.
11619            See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html.  */
11620         task_set_exception_ports (self, mask, our_exception_port,
11621                                   EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
11622       }
11623     }
11624   }
11625 }
11626 #elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
11627 /* Avoid a crash on native Windows.  */
11628 #define WIN32_LEAN_AND_MEAN
11629 #include <windows.h>
11630 #include <winerror.h>
11631 static LONG WINAPI
11632 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
11633 {
11634   switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
11635     {
11636     case EXCEPTION_ACCESS_VIOLATION:
11637     case EXCEPTION_IN_PAGE_ERROR:
11638     case EXCEPTION_STACK_OVERFLOW:
11639     case EXCEPTION_GUARD_PAGE:
11640     case EXCEPTION_PRIV_INSTRUCTION:
11641     case EXCEPTION_ILLEGAL_INSTRUCTION:
11642     case EXCEPTION_DATATYPE_MISALIGNMENT:
11643     case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
11644     case EXCEPTION_NONCONTINUABLE_EXCEPTION:
11645       exit (1);
11646     }
11647   return EXCEPTION_CONTINUE_SEARCH;
11648 }
11649 static void
11650 nocrash_init (void)
11651 {
11652   SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
11653 }
11654 #else
11655 /* Avoid a crash on POSIX systems.  */
11656 #include <signal.h>
11657 /* A POSIX signal handler.  */
11658 static void
11659 exception_handler (int sig)
11660 {
11661   exit (1);
11662 }
11663 static void
11664 nocrash_init (void)
11665 {
11666 #ifdef SIGSEGV
11667   signal (SIGSEGV, exception_handler);
11668 #endif
11669 #ifdef SIGBUS
11670   signal (SIGBUS, exception_handler);
11671 #endif
11672 }
11673 #endif
11674
11675
11676 int
11677 main ()
11678 {
11679
11680              int result = 0;
11681
11682              nocrash_init();
11683
11684              /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
11685                 and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
11686                 OSF/1 5.1, Solaris 10.  */
11687              {
11688                static char conftest[] = "conftest";
11689                static char plus[] = "-+";
11690                char *argv[3] = { conftest, plus, NULL };
11691                opterr = 0;
11692                if (getopt (2, argv, "+a") != '?')
11693                  result |= 1;
11694              }
11695              /* This code succeeds on glibc 2.8, mingw,
11696                 and fails on Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
11697                 IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x.  */
11698              {
11699                static char program[] = "program";
11700                static char p[] = "-p";
11701                static char foo[] = "foo";
11702                static char bar[] = "bar";
11703                char *argv[] = { program, p, foo, bar, NULL };
11704
11705                optind = 1;
11706                if (getopt (4, argv, "p::") != 'p')
11707                  result |= 2;
11708                else if (optarg != NULL)
11709                  result |= 4;
11710                else if (getopt (4, argv, "p::") != -1)
11711                  result |= 6;
11712                else if (optind != 2)
11713                  result |= 8;
11714              }
11715              /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0.  */
11716              {
11717                static char program[] = "program";
11718                static char foo[] = "foo";
11719                static char p[] = "-p";
11720                char *argv[] = { program, foo, p, NULL };
11721                optind = 0;
11722                if (getopt (3, argv, "-p") != 1)
11723                  result |= 16;
11724                else if (getopt (3, argv, "-p") != 'p')
11725                  result |= 16;
11726              }
11727              /* This code fails on glibc 2.11.  */
11728              {
11729                static char program[] = "program";
11730                static char b[] = "-b";
11731                static char a[] = "-a";
11732                char *argv[] = { program, b, a, NULL };
11733                optind = opterr = 0;
11734                if (getopt (3, argv, "+:a:b") != 'b')
11735                  result |= 32;
11736                else if (getopt (3, argv, "+:a:b") != ':')
11737                  result |= 32;
11738              }
11739              /* This code dumps core on glibc 2.14.  */
11740              {
11741                static char program[] = "program";
11742                static char w[] = "-W";
11743                static char dummy[] = "dummy";
11744                char *argv[] = { program, w, dummy, NULL };
11745                optind = opterr = 1;
11746                if (getopt (3, argv, "W;") != 'W')
11747                  result |= 64;
11748              }
11749              return result;
11750
11751   ;
11752   return 0;
11753 }
11754 _ACEOF
11755 if ac_fn_c_try_run "$LINENO"; then :
11756   gl_cv_func_getopt_gnu=yes
11757 else
11758   gl_cv_func_getopt_gnu=no
11759 fi
11760 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11761   conftest.$ac_objext conftest.beam conftest.$ac_ext
11762 fi
11763
11764        case $gl_had_POSIXLY_CORRECT in
11765          exported) ;;
11766          yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;;
11767          *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;;
11768        esac
11769
11770 fi
11771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5
11772 $as_echo "$gl_cv_func_getopt_gnu" >&6; }
11773     if test "$gl_cv_func_getopt_gnu" != yes; then
11774       gl_replace_getopt=yes
11775     else
11776       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt_long function" >&5
11777 $as_echo_n "checking for working GNU getopt_long function... " >&6; }
11778 if ${gl_cv_func_getopt_long_gnu+:} false; then :
11779   $as_echo_n "(cached) " >&6
11780 else
11781   if test "$cross_compiling" = yes; then :
11782               case "$host_os" in
11783               openbsd*) gl_cv_func_getopt_long_gnu="guessing no";;
11784               *)        gl_cv_func_getopt_long_gnu="guessing yes";;
11785             esac
11786
11787 else
11788   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11789 /* end confdefs.h.  */
11790 #include <getopt.h>
11791                 #include <stddef.h>
11792                 #include <string.h>
11793
11794 int
11795 main ()
11796 {
11797 static const struct option long_options[] =
11798                   {
11799                     { "xtremely-",no_argument,       NULL, 1003 },
11800                     { "xtra",     no_argument,       NULL, 1001 },
11801                     { "xtreme",   no_argument,       NULL, 1002 },
11802                     { "xtremely", no_argument,       NULL, 1003 },
11803                     { NULL,       0,                 NULL, 0 }
11804                   };
11805                 /* This code fails on OpenBSD 5.0.  */
11806                 {
11807                   static char program[] = "program";
11808                   static char xtremel[] = "--xtremel";
11809                   char *argv[] = { program, xtremel, NULL };
11810                   int option_index;
11811                   optind = 1; opterr = 0;
11812                   if (getopt_long (2, argv, "", long_options, &option_index) != 1003)
11813                     return 1;
11814                 }
11815                 return 0;
11816
11817   ;
11818   return 0;
11819 }
11820 _ACEOF
11821 if ac_fn_c_try_run "$LINENO"; then :
11822   gl_cv_func_getopt_long_gnu=yes
11823 else
11824   gl_cv_func_getopt_long_gnu=no
11825 fi
11826 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11827   conftest.$ac_objext conftest.beam conftest.$ac_ext
11828 fi
11829
11830
11831 fi
11832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_long_gnu" >&5
11833 $as_echo "$gl_cv_func_getopt_long_gnu" >&6; }
11834       case "$gl_cv_func_getopt_long_gnu" in
11835         *yes) ;;
11836         *) gl_replace_getopt=yes ;;
11837       esac
11838     fi
11839   fi
11840
11841
11842
11843
11844
11845
11846     REPLACE_GETOPT=1
11847
11848   if test $REPLACE_GETOPT = 1; then
11849
11850   GETOPT_H=getopt.h
11851
11852 $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
11853
11854
11855
11856   fi
11857
11858 ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default"
11859 if test "x$ac_cv_have_decl_getenv" = xyes; then :
11860   ac_have_decl=1
11861 else
11862   ac_have_decl=0
11863 fi
11864
11865 cat >>confdefs.h <<_ACEOF
11866 #define HAVE_DECL_GETENV $ac_have_decl
11867 _ACEOF
11868
11869 :
11870
11871
11872
11873
11874
11875   GNULIB_GETTIMEOFDAY=0;
11876     HAVE_GETTIMEOFDAY=1;
11877   HAVE_STRUCT_TIMEVAL=1;
11878   HAVE_SYS_TIME_H=1;
11879   REPLACE_GETTIMEOFDAY=0;
11880   REPLACE_STRUCT_TIMEVAL=0;
11881
11882
11883
11884
11885
11886
11887
11888
11889
11890
11891
11892
11893
11894
11895      if test $gl_cv_have_include_next = yes; then
11896        gl_cv_next_sys_time_h='<'sys/time.h'>'
11897      else
11898        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
11899 $as_echo_n "checking absolute name of <sys/time.h>... " >&6; }
11900 if ${gl_cv_next_sys_time_h+:} false; then :
11901   $as_echo_n "(cached) " >&6
11902 else
11903
11904              if test $ac_cv_header_sys_time_h = yes; then
11905
11906
11907
11908
11909   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11910 /* end confdefs.h.  */
11911 #include <sys/time.h>
11912 _ACEOF
11913                 case "$host_os" in
11914     aix*) gl_absname_cpp="$ac_cpp -C" ;;
11915     *)    gl_absname_cpp="$ac_cpp" ;;
11916   esac
11917
11918   case "$host_os" in
11919     mingw*)
11920                                           gl_dirsep_regex='[/\\]'
11921       ;;
11922     *)
11923       gl_dirsep_regex='\/'
11924       ;;
11925   esac
11926       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11927   gl_header_literal_regex=`echo 'sys/time.h' \
11928                            | sed -e "$gl_make_literal_regex_sed"`
11929   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11930       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11931       s|^/[^/]|//&|
11932       p
11933       q
11934     }'
11935
11936         gl_cv_absolute_sys_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11937   sed -n "$gl_absolute_header_sed"`
11938
11939            gl_header=$gl_cv_absolute_sys_time_h
11940            gl_cv_next_sys_time_h='"'$gl_header'"'
11941           else
11942                gl_cv_next_sys_time_h='<'sys/time.h'>'
11943              fi
11944
11945
11946 fi
11947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
11948 $as_echo "$gl_cv_next_sys_time_h" >&6; }
11949      fi
11950      NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
11951
11952      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11953        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11954        gl_next_as_first_directive='<'sys/time.h'>'
11955      else
11956        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11957        gl_next_as_first_directive=$gl_cv_next_sys_time_h
11958      fi
11959      NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
11960
11961
11962
11963
11964
11965   if test $ac_cv_header_sys_time_h != yes; then
11966     HAVE_SYS_TIME_H=0
11967   fi
11968
11969
11970
11971
11972
11973   if test $ac_cv_header_sys_socket_h != yes; then
11974                     for ac_header in winsock2.h
11975 do :
11976   ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
11977 if test "x$ac_cv_header_winsock2_h" = xyes; then :
11978   cat >>confdefs.h <<_ACEOF
11979 #define HAVE_WINSOCK2_H 1
11980 _ACEOF
11981
11982 fi
11983
11984 done
11985
11986   fi
11987   if test "$ac_cv_header_winsock2_h" = yes; then
11988     HAVE_WINSOCK2_H=1
11989     UNISTD_H_HAVE_WINSOCK2_H=1
11990     SYS_IOCTL_H_HAVE_WINSOCK2_H=1
11991   else
11992     HAVE_WINSOCK2_H=0
11993   fi
11994
11995
11996   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
11997 $as_echo_n "checking for struct timeval... " >&6; }
11998 if ${gl_cv_sys_struct_timeval+:} false; then :
11999   $as_echo_n "(cached) " >&6
12000 else
12001   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12002 /* end confdefs.h.  */
12003 #if HAVE_SYS_TIME_H
12004              #include <sys/time.h>
12005             #endif
12006             #include <time.h>
12007             #if HAVE_WINSOCK2_H
12008             # include <winsock2.h>
12009             #endif
12010
12011 int
12012 main ()
12013 {
12014 static struct timeval x; x.tv_sec = x.tv_usec;
12015   ;
12016   return 0;
12017 }
12018 _ACEOF
12019 if ac_fn_c_try_compile "$LINENO"; then :
12020   gl_cv_sys_struct_timeval=yes
12021 else
12022   gl_cv_sys_struct_timeval=no
12023 fi
12024 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12025
12026 fi
12027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
12028 $as_echo "$gl_cv_sys_struct_timeval" >&6; }
12029   if test $gl_cv_sys_struct_timeval != yes; then
12030     HAVE_STRUCT_TIMEVAL=0
12031   else
12032                             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
12033 $as_echo_n "checking for wide-enough struct timeval.tv_sec member... " >&6; }
12034 if ${gl_cv_sys_struct_timeval_tv_sec+:} 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;
12051               typedef int verify_tv_sec_type[
12052                 sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
12053               ];
12054
12055   ;
12056   return 0;
12057 }
12058 _ACEOF
12059 if ac_fn_c_try_compile "$LINENO"; then :
12060   gl_cv_sys_struct_timeval_tv_sec=yes
12061 else
12062   gl_cv_sys_struct_timeval_tv_sec=no
12063 fi
12064 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12065
12066 fi
12067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
12068 $as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
12069     if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
12070       REPLACE_STRUCT_TIMEVAL=1
12071     fi
12072   fi
12073
12074
12075     for gl_func in gettimeofday; do
12076     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
12077     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
12078 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
12079 if eval \${$as_gl_Symbol+:} false; then :
12080   $as_echo_n "(cached) " >&6
12081 else
12082   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12083 /* end confdefs.h.  */
12084
12085 #if HAVE_SYS_TIME_H
12086 # include <sys/time.h>
12087 #endif
12088 #include <time.h>
12089
12090 int
12091 main ()
12092 {
12093 #undef $gl_func
12094   (void) $gl_func;
12095   ;
12096   return 0;
12097 }
12098 _ACEOF
12099 if ac_fn_c_try_compile "$LINENO"; then :
12100   eval "$as_gl_Symbol=yes"
12101 else
12102   eval "$as_gl_Symbol=no"
12103 fi
12104 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12105 fi
12106 eval ac_res=\$$as_gl_Symbol
12107                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12108 $as_echo "$ac_res" >&6; }
12109     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
12110   cat >>confdefs.h <<_ACEOF
12111 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
12112 _ACEOF
12113
12114                      eval ac_cv_have_decl_$gl_func=yes
12115 fi
12116       done
12117
12118
12119
12120
12121
12122
12123   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
12124 $as_echo_n "checking for unsigned long long int... " >&6; }
12125 if ${ac_cv_type_unsigned_long_long_int+:} false; then :
12126   $as_echo_n "(cached) " >&6
12127 else
12128   ac_cv_type_unsigned_long_long_int=yes
12129      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
12130        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12131 /* end confdefs.h.  */
12132
12133   /* For now, do not test the preprocessor; as of 2007 there are too many
12134          implementations with broken preprocessors.  Perhaps this can
12135          be revisited in 2012.  In the meantime, code should not expect
12136          #if to work with literals wider than 32 bits.  */
12137       /* Test literals.  */
12138       long long int ll = 9223372036854775807ll;
12139       long long int nll = -9223372036854775807LL;
12140       unsigned long long int ull = 18446744073709551615ULL;
12141       /* Test constant expressions.   */
12142       typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
12143                      ? 1 : -1)];
12144       typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
12145                      ? 1 : -1)];
12146       int i = 63;
12147 int
12148 main ()
12149 {
12150 /* Test availability of runtime routines for shift and division.  */
12151       long long int llmax = 9223372036854775807ll;
12152       unsigned long long int ullmax = 18446744073709551615ull;
12153       return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
12154               | (llmax / ll) | (llmax % ll)
12155               | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
12156               | (ullmax / ull) | (ullmax % ull));
12157   ;
12158   return 0;
12159 }
12160
12161 _ACEOF
12162 if ac_fn_c_try_link "$LINENO"; then :
12163
12164 else
12165   ac_cv_type_unsigned_long_long_int=no
12166 fi
12167 rm -f core conftest.err conftest.$ac_objext \
12168     conftest$ac_exeext conftest.$ac_ext
12169      fi
12170 fi
12171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
12172 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
12173   if test $ac_cv_type_unsigned_long_long_int = yes; then
12174
12175 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
12176
12177   fi
12178
12179
12180
12181   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
12182 $as_echo_n "checking for long long int... " >&6; }
12183 if ${ac_cv_type_long_long_int+:} false; then :
12184   $as_echo_n "(cached) " >&6
12185 else
12186   ac_cv_type_long_long_int=yes
12187       if test "x${ac_cv_prog_cc_c99-no}" = xno; then
12188         ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
12189         if test $ac_cv_type_long_long_int = yes; then
12190                                         if test "$cross_compiling" = yes; then :
12191   :
12192 else
12193   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12194 /* end confdefs.h.  */
12195 #include <limits.h>
12196                  #ifndef LLONG_MAX
12197                  # define HALF \
12198                           (1LL << (sizeof (long long int) * CHAR_BIT - 2))
12199                  # define LLONG_MAX (HALF - 1 + HALF)
12200                  #endif
12201 int
12202 main ()
12203 {
12204 long long int n = 1;
12205                  int i;
12206                  for (i = 0; ; i++)
12207                    {
12208                      long long int m = n << i;
12209                      if (m >> i != n)
12210                        return 1;
12211                      if (LLONG_MAX / 2 < m)
12212                        break;
12213                    }
12214                  return 0;
12215   ;
12216   return 0;
12217 }
12218 _ACEOF
12219 if ac_fn_c_try_run "$LINENO"; then :
12220
12221 else
12222   ac_cv_type_long_long_int=no
12223 fi
12224 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12225   conftest.$ac_objext conftest.beam conftest.$ac_ext
12226 fi
12227
12228         fi
12229       fi
12230 fi
12231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
12232 $as_echo "$ac_cv_type_long_long_int" >&6; }
12233   if test $ac_cv_type_long_long_int = yes; then
12234
12235 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
12236
12237   fi
12238
12239
12240
12241
12242
12243
12244     gl_cv_c_multiarch=no
12245   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12246 /* end confdefs.h.  */
12247 #ifndef __APPLE_CC__
12248          not a universal capable compiler
12249         #endif
12250         typedef int dummy;
12251
12252 _ACEOF
12253 if ac_fn_c_try_compile "$LINENO"; then :
12254
12255                arch=
12256      prev=
12257      for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
12258        if test -n "$prev"; then
12259          case $word in
12260            i?86 | x86_64 | ppc | ppc64)
12261              if test -z "$arch" || test "$arch" = "$word"; then
12262                arch="$word"
12263              else
12264                gl_cv_c_multiarch=yes
12265              fi
12266              ;;
12267          esac
12268          prev=
12269        else
12270          if test "x$word" = "x-arch"; then
12271            prev=arch
12272          fi
12273        fi
12274      done
12275
12276 fi
12277 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12278   if test $gl_cv_c_multiarch = yes; then
12279     APPLE_UNIVERSAL_BUILD=1
12280   else
12281     APPLE_UNIVERSAL_BUILD=0
12282   fi
12283
12284
12285
12286
12287
12288   if test $ac_cv_type_long_long_int = yes; then
12289     HAVE_LONG_LONG_INT=1
12290   else
12291     HAVE_LONG_LONG_INT=0
12292   fi
12293
12294
12295   if test $ac_cv_type_unsigned_long_long_int = yes; then
12296     HAVE_UNSIGNED_LONG_LONG_INT=1
12297   else
12298     HAVE_UNSIGNED_LONG_LONG_INT=0
12299   fi
12300
12301
12302
12303   if test $ac_cv_header_wchar_h = yes; then
12304     HAVE_WCHAR_H=1
12305   else
12306     HAVE_WCHAR_H=0
12307   fi
12308
12309
12310       if test $ac_cv_header_inttypes_h = yes; then
12311     HAVE_INTTYPES_H=1
12312   else
12313     HAVE_INTTYPES_H=0
12314   fi
12315
12316
12317       if test $ac_cv_header_sys_types_h = yes; then
12318     HAVE_SYS_TYPES_H=1
12319   else
12320     HAVE_SYS_TYPES_H=0
12321   fi
12322
12323
12324
12325
12326
12327
12328
12329
12330
12331
12332
12333      if test $gl_cv_have_include_next = yes; then
12334        gl_cv_next_stdint_h='<'stdint.h'>'
12335      else
12336        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
12337 $as_echo_n "checking absolute name of <stdint.h>... " >&6; }
12338 if ${gl_cv_next_stdint_h+:} false; then :
12339   $as_echo_n "(cached) " >&6
12340 else
12341
12342              if test $ac_cv_header_stdint_h = yes; then
12343
12344
12345
12346
12347   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12348 /* end confdefs.h.  */
12349 #include <stdint.h>
12350 _ACEOF
12351                 case "$host_os" in
12352     aix*) gl_absname_cpp="$ac_cpp -C" ;;
12353     *)    gl_absname_cpp="$ac_cpp" ;;
12354   esac
12355
12356   case "$host_os" in
12357     mingw*)
12358                                           gl_dirsep_regex='[/\\]'
12359       ;;
12360     *)
12361       gl_dirsep_regex='\/'
12362       ;;
12363   esac
12364       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12365   gl_header_literal_regex=`echo 'stdint.h' \
12366                            | sed -e "$gl_make_literal_regex_sed"`
12367   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12368       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12369       s|^/[^/]|//&|
12370       p
12371       q
12372     }'
12373
12374         gl_cv_absolute_stdint_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12375   sed -n "$gl_absolute_header_sed"`
12376
12377            gl_header=$gl_cv_absolute_stdint_h
12378            gl_cv_next_stdint_h='"'$gl_header'"'
12379           else
12380                gl_cv_next_stdint_h='<'stdint.h'>'
12381              fi
12382
12383
12384 fi
12385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
12386 $as_echo "$gl_cv_next_stdint_h" >&6; }
12387      fi
12388      NEXT_STDINT_H=$gl_cv_next_stdint_h
12389
12390      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12391        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12392        gl_next_as_first_directive='<'stdint.h'>'
12393      else
12394        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12395        gl_next_as_first_directive=$gl_cv_next_stdint_h
12396      fi
12397      NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
12398
12399
12400
12401
12402   if test $ac_cv_header_stdint_h = yes; then
12403     HAVE_STDINT_H=1
12404   else
12405     HAVE_STDINT_H=0
12406   fi
12407
12408
12409     if test $ac_cv_header_stdint_h = yes; then
12410     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
12411 $as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
12412 if ${gl_cv_header_working_stdint_h+:} false; then :
12413   $as_echo_n "(cached) " >&6
12414 else
12415   gl_cv_header_working_stdint_h=no
12416        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12417 /* end confdefs.h.  */
12418
12419
12420 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
12421 #include <stdint.h>
12422 /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>.  */
12423 #if !(defined WCHAR_MIN && defined WCHAR_MAX)
12424 #error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
12425 #endif
12426
12427
12428   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12429      included before <wchar.h>.  */
12430   #include <stddef.h>
12431   #include <signal.h>
12432   #if HAVE_WCHAR_H
12433   # include <stdio.h>
12434   # include <time.h>
12435   # include <wchar.h>
12436   #endif
12437
12438
12439 #ifdef INT8_MAX
12440 int8_t a1 = INT8_MAX;
12441 int8_t a1min = INT8_MIN;
12442 #endif
12443 #ifdef INT16_MAX
12444 int16_t a2 = INT16_MAX;
12445 int16_t a2min = INT16_MIN;
12446 #endif
12447 #ifdef INT32_MAX
12448 int32_t a3 = INT32_MAX;
12449 int32_t a3min = INT32_MIN;
12450 #endif
12451 #ifdef INT64_MAX
12452 int64_t a4 = INT64_MAX;
12453 int64_t a4min = INT64_MIN;
12454 #endif
12455 #ifdef UINT8_MAX
12456 uint8_t b1 = UINT8_MAX;
12457 #else
12458 typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
12459 #endif
12460 #ifdef UINT16_MAX
12461 uint16_t b2 = UINT16_MAX;
12462 #endif
12463 #ifdef UINT32_MAX
12464 uint32_t b3 = UINT32_MAX;
12465 #endif
12466 #ifdef UINT64_MAX
12467 uint64_t b4 = UINT64_MAX;
12468 #endif
12469 int_least8_t c1 = INT8_C (0x7f);
12470 int_least8_t c1max = INT_LEAST8_MAX;
12471 int_least8_t c1min = INT_LEAST8_MIN;
12472 int_least16_t c2 = INT16_C (0x7fff);
12473 int_least16_t c2max = INT_LEAST16_MAX;
12474 int_least16_t c2min = INT_LEAST16_MIN;
12475 int_least32_t c3 = INT32_C (0x7fffffff);
12476 int_least32_t c3max = INT_LEAST32_MAX;
12477 int_least32_t c3min = INT_LEAST32_MIN;
12478 int_least64_t c4 = INT64_C (0x7fffffffffffffff);
12479 int_least64_t c4max = INT_LEAST64_MAX;
12480 int_least64_t c4min = INT_LEAST64_MIN;
12481 uint_least8_t d1 = UINT8_C (0xff);
12482 uint_least8_t d1max = UINT_LEAST8_MAX;
12483 uint_least16_t d2 = UINT16_C (0xffff);
12484 uint_least16_t d2max = UINT_LEAST16_MAX;
12485 uint_least32_t d3 = UINT32_C (0xffffffff);
12486 uint_least32_t d3max = UINT_LEAST32_MAX;
12487 uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
12488 uint_least64_t d4max = UINT_LEAST64_MAX;
12489 int_fast8_t e1 = INT_FAST8_MAX;
12490 int_fast8_t e1min = INT_FAST8_MIN;
12491 int_fast16_t e2 = INT_FAST16_MAX;
12492 int_fast16_t e2min = INT_FAST16_MIN;
12493 int_fast32_t e3 = INT_FAST32_MAX;
12494 int_fast32_t e3min = INT_FAST32_MIN;
12495 int_fast64_t e4 = INT_FAST64_MAX;
12496 int_fast64_t e4min = INT_FAST64_MIN;
12497 uint_fast8_t f1 = UINT_FAST8_MAX;
12498 uint_fast16_t f2 = UINT_FAST16_MAX;
12499 uint_fast32_t f3 = UINT_FAST32_MAX;
12500 uint_fast64_t f4 = UINT_FAST64_MAX;
12501 #ifdef INTPTR_MAX
12502 intptr_t g = INTPTR_MAX;
12503 intptr_t gmin = INTPTR_MIN;
12504 #endif
12505 #ifdef UINTPTR_MAX
12506 uintptr_t h = UINTPTR_MAX;
12507 #endif
12508 intmax_t i = INTMAX_MAX;
12509 uintmax_t j = UINTMAX_MAX;
12510
12511 #include <limits.h> /* for CHAR_BIT */
12512 #define TYPE_MINIMUM(t) \
12513   ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
12514 #define TYPE_MAXIMUM(t) \
12515   ((t) ((t) 0 < (t) -1 \
12516         ? (t) -1 \
12517         : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
12518 struct s {
12519   int check_PTRDIFF:
12520       PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
12521       && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
12522       ? 1 : -1;
12523   /* Detect bug in FreeBSD 6.0 / ia64.  */
12524   int check_SIG_ATOMIC:
12525       SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
12526       && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
12527       ? 1 : -1;
12528   int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
12529   int check_WCHAR:
12530       WCHAR_MIN == TYPE_MINIMUM (wchar_t)
12531       && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
12532       ? 1 : -1;
12533   /* Detect bug in mingw.  */
12534   int check_WINT:
12535       WINT_MIN == TYPE_MINIMUM (wint_t)
12536       && WINT_MAX == TYPE_MAXIMUM (wint_t)
12537       ? 1 : -1;
12538
12539   /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others.  */
12540   int check_UINT8_C:
12541         (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
12542   int check_UINT16_C:
12543         (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
12544
12545   /* Detect bugs in OpenBSD 3.9 stdint.h.  */
12546 #ifdef UINT8_MAX
12547   int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
12548 #endif
12549 #ifdef UINT16_MAX
12550   int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
12551 #endif
12552 #ifdef UINT32_MAX
12553   int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
12554 #endif
12555 #ifdef UINT64_MAX
12556   int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
12557 #endif
12558   int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
12559   int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
12560   int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
12561   int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
12562   int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
12563   int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
12564   int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
12565   int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
12566   int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
12567   int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
12568   int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
12569 };
12570
12571 int
12572 main ()
12573 {
12574
12575   ;
12576   return 0;
12577 }
12578 _ACEOF
12579 if ac_fn_c_try_compile "$LINENO"; then :
12580                                                     if test "$cross_compiling" = yes; then :
12581                  gl_cv_header_working_stdint_h=yes
12582
12583 else
12584   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12585 /* end confdefs.h.  */
12586
12587
12588 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
12589 #include <stdint.h>
12590
12591
12592   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12593      included before <wchar.h>.  */
12594   #include <stddef.h>
12595   #include <signal.h>
12596   #if HAVE_WCHAR_H
12597   # include <stdio.h>
12598   # include <time.h>
12599   # include <wchar.h>
12600   #endif
12601
12602
12603 #include <stdio.h>
12604 #include <string.h>
12605 #define MVAL(macro) MVAL1(macro)
12606 #define MVAL1(expression) #expression
12607 static const char *macro_values[] =
12608   {
12609 #ifdef INT8_MAX
12610     MVAL (INT8_MAX),
12611 #endif
12612 #ifdef INT16_MAX
12613     MVAL (INT16_MAX),
12614 #endif
12615 #ifdef INT32_MAX
12616     MVAL (INT32_MAX),
12617 #endif
12618 #ifdef INT64_MAX
12619     MVAL (INT64_MAX),
12620 #endif
12621 #ifdef UINT8_MAX
12622     MVAL (UINT8_MAX),
12623 #endif
12624 #ifdef UINT16_MAX
12625     MVAL (UINT16_MAX),
12626 #endif
12627 #ifdef UINT32_MAX
12628     MVAL (UINT32_MAX),
12629 #endif
12630 #ifdef UINT64_MAX
12631     MVAL (UINT64_MAX),
12632 #endif
12633     NULL
12634   };
12635
12636 int
12637 main ()
12638 {
12639
12640   const char **mv;
12641   for (mv = macro_values; *mv != NULL; mv++)
12642     {
12643       const char *value = *mv;
12644       /* Test whether it looks like a cast expression.  */
12645       if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
12646           || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
12647           || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
12648           || strncmp (value, "((int)"/*)*/, 6) == 0
12649           || strncmp (value, "((signed short)"/*)*/, 15) == 0
12650           || strncmp (value, "((signed char)"/*)*/, 14) == 0)
12651         return mv - macro_values + 1;
12652     }
12653   return 0;
12654
12655   ;
12656   return 0;
12657 }
12658 _ACEOF
12659 if ac_fn_c_try_run "$LINENO"; then :
12660   gl_cv_header_working_stdint_h=yes
12661 fi
12662 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12663   conftest.$ac_objext conftest.beam conftest.$ac_ext
12664 fi
12665
12666
12667 fi
12668 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12669
12670 fi
12671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
12672 $as_echo "$gl_cv_header_working_stdint_h" >&6; }
12673   fi
12674   if test "$gl_cv_header_working_stdint_h" = yes; then
12675     STDINT_H=
12676   else
12677             for ac_header in sys/inttypes.h sys/bitypes.h
12678 do :
12679   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12680 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12681 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12682   cat >>confdefs.h <<_ACEOF
12683 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12684 _ACEOF
12685
12686 fi
12687
12688 done
12689
12690     if test $ac_cv_header_sys_inttypes_h = yes; then
12691       HAVE_SYS_INTTYPES_H=1
12692     else
12693       HAVE_SYS_INTTYPES_H=0
12694     fi
12695
12696     if test $ac_cv_header_sys_bitypes_h = yes; then
12697       HAVE_SYS_BITYPES_H=1
12698     else
12699       HAVE_SYS_BITYPES_H=0
12700     fi
12701
12702
12703
12704
12705   if test $APPLE_UNIVERSAL_BUILD = 0; then
12706
12707
12708   for gltype in ptrdiff_t size_t ; do
12709     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
12710 $as_echo_n "checking for bit size of $gltype... " >&6; }
12711 if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
12712   $as_echo_n "(cached) " >&6
12713 else
12714   if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result"        "
12715   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12716      included before <wchar.h>.  */
12717   #include <stddef.h>
12718   #include <signal.h>
12719   #if HAVE_WCHAR_H
12720   # include <stdio.h>
12721   # include <time.h>
12722   # include <wchar.h>
12723   #endif
12724
12725 #include <limits.h>"; then :
12726
12727 else
12728   result=unknown
12729 fi
12730
12731        eval gl_cv_bitsizeof_${gltype}=\$result
12732
12733 fi
12734 eval ac_res=\$gl_cv_bitsizeof_${gltype}
12735                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12736 $as_echo "$ac_res" >&6; }
12737     eval result=\$gl_cv_bitsizeof_${gltype}
12738     if test $result = unknown; then
12739                                                 result=0
12740     fi
12741     GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
12742     cat >>confdefs.h <<_ACEOF
12743 #define BITSIZEOF_${GLTYPE} $result
12744 _ACEOF
12745
12746     eval BITSIZEOF_${GLTYPE}=\$result
12747   done
12748
12749
12750   fi
12751
12752
12753   for gltype in sig_atomic_t wchar_t wint_t ; do
12754     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
12755 $as_echo_n "checking for bit size of $gltype... " >&6; }
12756 if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
12757   $as_echo_n "(cached) " >&6
12758 else
12759   if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result"        "
12760   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12761      included before <wchar.h>.  */
12762   #include <stddef.h>
12763   #include <signal.h>
12764   #if HAVE_WCHAR_H
12765   # include <stdio.h>
12766   # include <time.h>
12767   # include <wchar.h>
12768   #endif
12769
12770 #include <limits.h>"; then :
12771
12772 else
12773   result=unknown
12774 fi
12775
12776        eval gl_cv_bitsizeof_${gltype}=\$result
12777
12778 fi
12779 eval ac_res=\$gl_cv_bitsizeof_${gltype}
12780                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12781 $as_echo "$ac_res" >&6; }
12782     eval result=\$gl_cv_bitsizeof_${gltype}
12783     if test $result = unknown; then
12784                                                 result=0
12785     fi
12786     GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
12787     cat >>confdefs.h <<_ACEOF
12788 #define BITSIZEOF_${GLTYPE} $result
12789 _ACEOF
12790
12791     eval BITSIZEOF_${GLTYPE}=\$result
12792   done
12793
12794
12795
12796
12797   for gltype in sig_atomic_t wchar_t wint_t ; do
12798     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
12799 $as_echo_n "checking whether $gltype is signed... " >&6; }
12800 if eval \${gl_cv_type_${gltype}_signed+:} false; then :
12801   $as_echo_n "(cached) " >&6
12802 else
12803   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12804 /* end confdefs.h.  */
12805
12806   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12807      included before <wchar.h>.  */
12808   #include <stddef.h>
12809   #include <signal.h>
12810   #if HAVE_WCHAR_H
12811   # include <stdio.h>
12812   # include <time.h>
12813   # include <wchar.h>
12814   #endif
12815
12816             int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
12817 int
12818 main ()
12819 {
12820
12821   ;
12822   return 0;
12823 }
12824 _ACEOF
12825 if ac_fn_c_try_compile "$LINENO"; then :
12826   result=yes
12827 else
12828   result=no
12829 fi
12830 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12831        eval gl_cv_type_${gltype}_signed=\$result
12832
12833 fi
12834 eval ac_res=\$gl_cv_type_${gltype}_signed
12835                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12836 $as_echo "$ac_res" >&6; }
12837     eval result=\$gl_cv_type_${gltype}_signed
12838     GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
12839     if test "$result" = yes; then
12840       cat >>confdefs.h <<_ACEOF
12841 #define HAVE_SIGNED_${GLTYPE} 1
12842 _ACEOF
12843
12844       eval HAVE_SIGNED_${GLTYPE}=1
12845     else
12846       eval HAVE_SIGNED_${GLTYPE}=0
12847     fi
12848   done
12849
12850
12851   gl_cv_type_ptrdiff_t_signed=yes
12852   gl_cv_type_size_t_signed=no
12853   if test $APPLE_UNIVERSAL_BUILD = 0; then
12854
12855
12856   for gltype in ptrdiff_t size_t ; do
12857     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
12858 $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
12859 if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
12860   $as_echo_n "(cached) " >&6
12861 else
12862   eval gl_cv_type_${gltype}_suffix=no
12863        eval result=\$gl_cv_type_${gltype}_signed
12864        if test "$result" = yes; then
12865          glsufu=
12866        else
12867          glsufu=u
12868        fi
12869        for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
12870          case $glsuf in
12871            '')  gltype1='int';;
12872            l)   gltype1='long int';;
12873            ll)  gltype1='long long int';;
12874            i64) gltype1='__int64';;
12875            u)   gltype1='unsigned int';;
12876            ul)  gltype1='unsigned long int';;
12877            ull) gltype1='unsigned long long int';;
12878            ui64)gltype1='unsigned __int64';;
12879          esac
12880          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12881 /* end confdefs.h.  */
12882
12883   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12884      included before <wchar.h>.  */
12885   #include <stddef.h>
12886   #include <signal.h>
12887   #if HAVE_WCHAR_H
12888   # include <stdio.h>
12889   # include <time.h>
12890   # include <wchar.h>
12891   #endif
12892
12893               extern $gltype foo;
12894               extern $gltype1 foo;
12895 int
12896 main ()
12897 {
12898
12899   ;
12900   return 0;
12901 }
12902 _ACEOF
12903 if ac_fn_c_try_compile "$LINENO"; then :
12904   eval gl_cv_type_${gltype}_suffix=\$glsuf
12905 fi
12906 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12907          eval result=\$gl_cv_type_${gltype}_suffix
12908          test "$result" != no && break
12909        done
12910 fi
12911 eval ac_res=\$gl_cv_type_${gltype}_suffix
12912                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12913 $as_echo "$ac_res" >&6; }
12914     GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
12915     eval result=\$gl_cv_type_${gltype}_suffix
12916     test "$result" = no && result=
12917     eval ${GLTYPE}_SUFFIX=\$result
12918     cat >>confdefs.h <<_ACEOF
12919 #define ${GLTYPE}_SUFFIX $result
12920 _ACEOF
12921
12922   done
12923
12924
12925   fi
12926
12927
12928   for gltype in sig_atomic_t wchar_t wint_t ; do
12929     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
12930 $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
12931 if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
12932   $as_echo_n "(cached) " >&6
12933 else
12934   eval gl_cv_type_${gltype}_suffix=no
12935        eval result=\$gl_cv_type_${gltype}_signed
12936        if test "$result" = yes; then
12937          glsufu=
12938        else
12939          glsufu=u
12940        fi
12941        for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
12942          case $glsuf in
12943            '')  gltype1='int';;
12944            l)   gltype1='long int';;
12945            ll)  gltype1='long long int';;
12946            i64) gltype1='__int64';;
12947            u)   gltype1='unsigned int';;
12948            ul)  gltype1='unsigned long int';;
12949            ull) gltype1='unsigned long long int';;
12950            ui64)gltype1='unsigned __int64';;
12951          esac
12952          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12953 /* end confdefs.h.  */
12954
12955   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12956      included before <wchar.h>.  */
12957   #include <stddef.h>
12958   #include <signal.h>
12959   #if HAVE_WCHAR_H
12960   # include <stdio.h>
12961   # include <time.h>
12962   # include <wchar.h>
12963   #endif
12964
12965               extern $gltype foo;
12966               extern $gltype1 foo;
12967 int
12968 main ()
12969 {
12970
12971   ;
12972   return 0;
12973 }
12974 _ACEOF
12975 if ac_fn_c_try_compile "$LINENO"; then :
12976   eval gl_cv_type_${gltype}_suffix=\$glsuf
12977 fi
12978 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12979          eval result=\$gl_cv_type_${gltype}_suffix
12980          test "$result" != no && break
12981        done
12982 fi
12983 eval ac_res=\$gl_cv_type_${gltype}_suffix
12984                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12985 $as_echo "$ac_res" >&6; }
12986     GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
12987     eval result=\$gl_cv_type_${gltype}_suffix
12988     test "$result" = no && result=
12989     eval ${GLTYPE}_SUFFIX=\$result
12990     cat >>confdefs.h <<_ACEOF
12991 #define ${GLTYPE}_SUFFIX $result
12992 _ACEOF
12993
12994   done
12995
12996
12997
12998           if test $BITSIZEOF_WINT_T -lt 32; then
12999     BITSIZEOF_WINT_T=32
13000   fi
13001
13002     STDINT_H=stdint.h
13003   fi
13004
13005    if test -n "$STDINT_H"; then
13006   GL_GENERATE_STDINT_H_TRUE=
13007   GL_GENERATE_STDINT_H_FALSE='#'
13008 else
13009   GL_GENERATE_STDINT_H_TRUE='#'
13010   GL_GENERATE_STDINT_H_FALSE=
13011 fi
13012
13013
13014
13015
13016
13017   GNULIB_IMAXABS=0;
13018   GNULIB_IMAXDIV=0;
13019   GNULIB_STRTOIMAX=0;
13020   GNULIB_STRTOUMAX=0;
13021     HAVE_DECL_IMAXABS=1;
13022   HAVE_DECL_IMAXDIV=1;
13023   HAVE_DECL_STRTOIMAX=1;
13024   HAVE_DECL_STRTOUMAX=1;
13025   REPLACE_STRTOIMAX=0;
13026   REPLACE_STRTOUMAX=0;
13027   INT32_MAX_LT_INTMAX_MAX=1;
13028   INT64_MAX_EQ_LONG_MAX='defined _LP64';
13029   PRI_MACROS_BROKEN=0;
13030   PRIPTR_PREFIX=__PRIPTR_PREFIX;
13031   UINT32_MAX_LT_UINTMAX_MAX=1;
13032   UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
13033
13034
13035
13036
13037
13038
13039
13040
13041
13042
13043
13044
13045
13046
13047
13048      if test $gl_cv_have_include_next = yes; then
13049        gl_cv_next_inttypes_h='<'inttypes.h'>'
13050      else
13051        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
13052 $as_echo_n "checking absolute name of <inttypes.h>... " >&6; }
13053 if ${gl_cv_next_inttypes_h+:} false; then :
13054   $as_echo_n "(cached) " >&6
13055 else
13056
13057              if test $ac_cv_header_inttypes_h = yes; then
13058
13059
13060
13061
13062   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13063 /* end confdefs.h.  */
13064 #include <inttypes.h>
13065 _ACEOF
13066                 case "$host_os" in
13067     aix*) gl_absname_cpp="$ac_cpp -C" ;;
13068     *)    gl_absname_cpp="$ac_cpp" ;;
13069   esac
13070
13071   case "$host_os" in
13072     mingw*)
13073                                           gl_dirsep_regex='[/\\]'
13074       ;;
13075     *)
13076       gl_dirsep_regex='\/'
13077       ;;
13078   esac
13079       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13080   gl_header_literal_regex=`echo 'inttypes.h' \
13081                            | sed -e "$gl_make_literal_regex_sed"`
13082   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13083       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13084       s|^/[^/]|//&|
13085       p
13086       q
13087     }'
13088
13089         gl_cv_absolute_inttypes_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13090   sed -n "$gl_absolute_header_sed"`
13091
13092            gl_header=$gl_cv_absolute_inttypes_h
13093            gl_cv_next_inttypes_h='"'$gl_header'"'
13094           else
13095                gl_cv_next_inttypes_h='<'inttypes.h'>'
13096              fi
13097
13098
13099 fi
13100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
13101 $as_echo "$gl_cv_next_inttypes_h" >&6; }
13102      fi
13103      NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
13104
13105      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13106        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13107        gl_next_as_first_directive='<'inttypes.h'>'
13108      else
13109        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13110        gl_next_as_first_directive=$gl_cv_next_inttypes_h
13111      fi
13112      NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
13113
13114
13115
13116
13117
13118
13119
13120
13121     for gl_func in imaxabs imaxdiv strtoimax strtoumax; do
13122     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
13123     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
13124 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
13125 if eval \${$as_gl_Symbol+:} false; then :
13126   $as_echo_n "(cached) " >&6
13127 else
13128   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13129 /* end confdefs.h.  */
13130 #include <inttypes.h>
13131
13132 int
13133 main ()
13134 {
13135 #undef $gl_func
13136   (void) $gl_func;
13137   ;
13138   return 0;
13139 }
13140 _ACEOF
13141 if ac_fn_c_try_compile "$LINENO"; then :
13142   eval "$as_gl_Symbol=yes"
13143 else
13144   eval "$as_gl_Symbol=no"
13145 fi
13146 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13147 fi
13148 eval ac_res=\$$as_gl_Symbol
13149                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13150 $as_echo "$ac_res" >&6; }
13151     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
13152   cat >>confdefs.h <<_ACEOF
13153 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
13154 _ACEOF
13155
13156                      eval ac_cv_have_decl_$gl_func=yes
13157 fi
13158       done
13159
13160
13161
13162   for ac_header in inttypes.h
13163 do :
13164   ac_fn_c_check_header_mongrel "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
13165 if test "x$ac_cv_header_inttypes_h" = xyes; then :
13166   cat >>confdefs.h <<_ACEOF
13167 #define HAVE_INTTYPES_H 1
13168 _ACEOF
13169
13170 fi
13171
13172 done
13173
13174   if test $ac_cv_header_inttypes_h = yes; then
13175     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the inttypes.h PRIxNN macros are broken" >&5
13176 $as_echo_n "checking whether the inttypes.h PRIxNN macros are broken... " >&6; }
13177 if ${gt_cv_inttypes_pri_broken+:} false; then :
13178   $as_echo_n "(cached) " >&6
13179 else
13180
13181         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13182 /* end confdefs.h.  */
13183
13184 #include <inttypes.h>
13185 #ifdef PRId32
13186 char *p = PRId32;
13187 #endif
13188
13189 int
13190 main ()
13191 {
13192
13193   ;
13194   return 0;
13195 }
13196 _ACEOF
13197 if ac_fn_c_try_compile "$LINENO"; then :
13198   gt_cv_inttypes_pri_broken=no
13199 else
13200   gt_cv_inttypes_pri_broken=yes
13201 fi
13202 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13203
13204 fi
13205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_inttypes_pri_broken" >&5
13206 $as_echo "$gt_cv_inttypes_pri_broken" >&6; }
13207   fi
13208   if test "$gt_cv_inttypes_pri_broken" = yes; then
13209
13210 cat >>confdefs.h <<_ACEOF
13211 #define PRI_MACROS_BROKEN 1
13212 _ACEOF
13213
13214     PRI_MACROS_BROKEN=1
13215   else
13216     PRI_MACROS_BROKEN=0
13217   fi
13218
13219
13220
13221   GNULIB_ISWBLANK=0;
13222   GNULIB_WCTYPE=0;
13223   GNULIB_ISWCTYPE=0;
13224   GNULIB_WCTRANS=0;
13225   GNULIB_TOWCTRANS=0;
13226     HAVE_ISWBLANK=1;
13227   HAVE_WCTYPE_T=1;
13228   HAVE_WCTRANS_T=1;
13229   REPLACE_ISWBLANK=0;
13230
13231
13232
13233
13234   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
13235 $as_echo_n "checking for wint_t... " >&6; }
13236 if ${gt_cv_c_wint_t+:} false; then :
13237   $as_echo_n "(cached) " >&6
13238 else
13239   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13240 /* end confdefs.h.  */
13241
13242 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
13243    <wchar.h>.
13244    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
13245    before <wchar.h>.  */
13246 #include <stddef.h>
13247 #include <stdio.h>
13248 #include <time.h>
13249 #include <wchar.h>
13250             wint_t foo = (wchar_t)'\0';
13251 int
13252 main ()
13253 {
13254
13255   ;
13256   return 0;
13257 }
13258 _ACEOF
13259 if ac_fn_c_try_compile "$LINENO"; then :
13260   gt_cv_c_wint_t=yes
13261 else
13262   gt_cv_c_wint_t=no
13263 fi
13264 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13265 fi
13266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
13267 $as_echo "$gt_cv_c_wint_t" >&6; }
13268   if test $gt_cv_c_wint_t = yes; then
13269
13270 $as_echo "#define HAVE_WINT_T 1" >>confdefs.h
13271
13272   fi
13273
13274
13275
13276
13277
13278
13279   if test $ac_cv_func_iswcntrl = yes; then
13280     HAVE_ISWCNTRL=1
13281   else
13282     HAVE_ISWCNTRL=0
13283   fi
13284
13285
13286
13287   if test $gt_cv_c_wint_t = yes; then
13288     HAVE_WINT_T=1
13289   else
13290     HAVE_WINT_T=0
13291   fi
13292
13293
13294
13295
13296
13297
13298
13299
13300
13301
13302
13303      if test $gl_cv_have_include_next = yes; then
13304        gl_cv_next_wctype_h='<'wctype.h'>'
13305      else
13306        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
13307 $as_echo_n "checking absolute name of <wctype.h>... " >&6; }
13308 if ${gl_cv_next_wctype_h+:} false; then :
13309   $as_echo_n "(cached) " >&6
13310 else
13311
13312              if test $ac_cv_header_wctype_h = yes; then
13313
13314
13315
13316
13317   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13318 /* end confdefs.h.  */
13319 #include <wctype.h>
13320 _ACEOF
13321                 case "$host_os" in
13322     aix*) gl_absname_cpp="$ac_cpp -C" ;;
13323     *)    gl_absname_cpp="$ac_cpp" ;;
13324   esac
13325
13326   case "$host_os" in
13327     mingw*)
13328                                           gl_dirsep_regex='[/\\]'
13329       ;;
13330     *)
13331       gl_dirsep_regex='\/'
13332       ;;
13333   esac
13334       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13335   gl_header_literal_regex=`echo 'wctype.h' \
13336                            | sed -e "$gl_make_literal_regex_sed"`
13337   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13338       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13339       s|^/[^/]|//&|
13340       p
13341       q
13342     }'
13343
13344         gl_cv_absolute_wctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13345   sed -n "$gl_absolute_header_sed"`
13346
13347            gl_header=$gl_cv_absolute_wctype_h
13348            gl_cv_next_wctype_h='"'$gl_header'"'
13349           else
13350                gl_cv_next_wctype_h='<'wctype.h'>'
13351              fi
13352
13353
13354 fi
13355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
13356 $as_echo "$gl_cv_next_wctype_h" >&6; }
13357      fi
13358      NEXT_WCTYPE_H=$gl_cv_next_wctype_h
13359
13360      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13361        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13362        gl_next_as_first_directive='<'wctype.h'>'
13363      else
13364        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13365        gl_next_as_first_directive=$gl_cv_next_wctype_h
13366      fi
13367      NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
13368
13369
13370
13371
13372   if test $ac_cv_header_wctype_h = yes; then
13373     if test $ac_cv_func_iswcntrl = yes; then
13374                   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
13375 $as_echo_n "checking whether iswcntrl works... " >&6; }
13376 if ${gl_cv_func_iswcntrl_works+:} false; then :
13377   $as_echo_n "(cached) " >&6
13378 else
13379
13380           if test "$cross_compiling" = yes; then :
13381   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13382 /* end confdefs.h.  */
13383 #include <stdlib.h>
13384                           #if __GNU_LIBRARY__ == 1
13385                           Linux libc5 i18n is broken.
13386                           #endif
13387 int
13388 main ()
13389 {
13390
13391   ;
13392   return 0;
13393 }
13394 _ACEOF
13395 if ac_fn_c_try_compile "$LINENO"; then :
13396   gl_cv_func_iswcntrl_works="guessing yes"
13397 else
13398   gl_cv_func_iswcntrl_works="guessing no"
13399 fi
13400 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13401
13402 else
13403   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13404 /* end confdefs.h.  */
13405
13406                /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
13407                   included before <wchar.h>.
13408                   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
13409                   must be included before <wchar.h>.  */
13410                #include <stddef.h>
13411                #include <stdio.h>
13412                #include <time.h>
13413                #include <wchar.h>
13414                #include <wctype.h>
13415                int main () { return iswprint ('x') == 0; }
13416
13417 _ACEOF
13418 if ac_fn_c_try_run "$LINENO"; then :
13419   gl_cv_func_iswcntrl_works=yes
13420 else
13421   gl_cv_func_iswcntrl_works=no
13422 fi
13423 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13424   conftest.$ac_objext conftest.beam conftest.$ac_ext
13425 fi
13426
13427
13428 fi
13429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
13430 $as_echo "$gl_cv_func_iswcntrl_works" >&6; }
13431     fi
13432     HAVE_WCTYPE_H=1
13433   else
13434     HAVE_WCTYPE_H=0
13435   fi
13436
13437
13438   case "$gl_cv_func_iswcntrl_works" in
13439     *yes) REPLACE_ISWCNTRL=0 ;;
13440     *)    REPLACE_ISWCNTRL=1 ;;
13441   esac
13442
13443
13444   if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
13445         :
13446   fi
13447
13448   if test $REPLACE_ISWCNTRL = 1; then
13449     REPLACE_TOWLOWER=1
13450   else
13451     for ac_func in towlower
13452 do :
13453   ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
13454 if test "x$ac_cv_func_towlower" = xyes; then :
13455   cat >>confdefs.h <<_ACEOF
13456 #define HAVE_TOWLOWER 1
13457 _ACEOF
13458
13459 fi
13460 done
13461
13462     if test $ac_cv_func_towlower = yes; then
13463       REPLACE_TOWLOWER=0
13464     else
13465       ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
13466              included before <wchar.h>.
13467              BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
13468              must be included before <wchar.h>.  */
13469           #include <stddef.h>
13470           #include <stdio.h>
13471           #include <time.h>
13472           #include <wchar.h>
13473           #if HAVE_WCTYPE_H
13474           # include <wctype.h>
13475           #endif
13476
13477 "
13478 if test "x$ac_cv_have_decl_towlower" = xyes; then :
13479   ac_have_decl=1
13480 else
13481   ac_have_decl=0
13482 fi
13483
13484 cat >>confdefs.h <<_ACEOF
13485 #define HAVE_DECL_TOWLOWER $ac_have_decl
13486 _ACEOF
13487
13488       if test $ac_cv_have_decl_towlower = yes; then
13489                                 REPLACE_TOWLOWER=1
13490       else
13491         REPLACE_TOWLOWER=0
13492       fi
13493     fi
13494   fi
13495
13496
13497   if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
13498         :
13499   fi
13500
13501           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
13502 $as_echo_n "checking for wctype_t... " >&6; }
13503 if ${gl_cv_type_wctype_t+:} false; then :
13504   $as_echo_n "(cached) " >&6
13505 else
13506   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13507 /* end confdefs.h.  */
13508 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
13509                included before <wchar.h>.
13510                BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
13511                must be included before <wchar.h>.  */
13512             #include <stddef.h>
13513             #include <stdio.h>
13514             #include <time.h>
13515             #include <wchar.h>
13516             #if HAVE_WCTYPE_H
13517             # include <wctype.h>
13518             #endif
13519             wctype_t a;
13520
13521 int
13522 main ()
13523 {
13524
13525   ;
13526   return 0;
13527 }
13528 _ACEOF
13529 if ac_fn_c_try_compile "$LINENO"; then :
13530   gl_cv_type_wctype_t=yes
13531 else
13532   gl_cv_type_wctype_t=no
13533 fi
13534 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13535
13536 fi
13537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
13538 $as_echo "$gl_cv_type_wctype_t" >&6; }
13539   if test $gl_cv_type_wctype_t = no; then
13540     HAVE_WCTYPE_T=0
13541   fi
13542
13543       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
13544 $as_echo_n "checking for wctrans_t... " >&6; }
13545 if ${gl_cv_type_wctrans_t+:} false; then :
13546   $as_echo_n "(cached) " >&6
13547 else
13548   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13549 /* end confdefs.h.  */
13550 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
13551                included before <wchar.h>.
13552                BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
13553                must be included before <wchar.h>.  */
13554             #include <stddef.h>
13555             #include <stdio.h>
13556             #include <time.h>
13557             #include <wchar.h>
13558             #include <wctype.h>
13559             wctrans_t a;
13560
13561 int
13562 main ()
13563 {
13564
13565   ;
13566   return 0;
13567 }
13568 _ACEOF
13569 if ac_fn_c_try_compile "$LINENO"; then :
13570   gl_cv_type_wctrans_t=yes
13571 else
13572   gl_cv_type_wctrans_t=no
13573 fi
13574 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13575
13576 fi
13577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
13578 $as_echo "$gl_cv_type_wctrans_t" >&6; }
13579   if test $gl_cv_type_wctrans_t = no; then
13580     HAVE_WCTRANS_T=0
13581   fi
13582
13583
13584     for gl_func in wctype iswctype wctrans towctrans     ; do
13585     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
13586     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
13587 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
13588 if eval \${$as_gl_Symbol+:} false; then :
13589   $as_echo_n "(cached) " >&6
13590 else
13591   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13592 /* end confdefs.h.  */
13593
13594 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
13595    <wchar.h>.
13596    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
13597    included before <wchar.h>.  */
13598 #if !(defined __GLIBC__ && !defined __UCLIBC__)
13599 # include <stddef.h>
13600 # include <stdio.h>
13601 # include <time.h>
13602 # include <wchar.h>
13603 #endif
13604 #include <wctype.h>
13605
13606 int
13607 main ()
13608 {
13609 #undef $gl_func
13610   (void) $gl_func;
13611   ;
13612   return 0;
13613 }
13614 _ACEOF
13615 if ac_fn_c_try_compile "$LINENO"; then :
13616   eval "$as_gl_Symbol=yes"
13617 else
13618   eval "$as_gl_Symbol=no"
13619 fi
13620 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13621 fi
13622 eval ac_res=\$$as_gl_Symbol
13623                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13624 $as_echo "$ac_res" >&6; }
13625     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
13626   cat >>confdefs.h <<_ACEOF
13627 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
13628 _ACEOF
13629
13630                      eval ac_cv_have_decl_$gl_func=yes
13631 fi
13632       done
13633
13634
13635
13636
13637
13638   GNULIB_NL_LANGINFO=0;
13639     HAVE_NL_LANGINFO=1;
13640   REPLACE_NL_LANGINFO=0;
13641
13642
13643
13644
13645
13646
13647
13648
13649
13650
13651
13652
13653   case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink in
13654   yes+*yes)
13655     ;;
13656   yes+*)
13657     # Solaris 9 has *at functions, but uniformly mishandles trailing
13658     # slash in all of them.
13659     REPLACE_OPENAT=1
13660     ;;
13661   *)
13662     HAVE_OPENAT=0
13663     ;;
13664   esac
13665
13666
13667
13668
13669     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library >= 2.1 or uClibc" >&5
13670 $as_echo_n "checking whether we are using the GNU C Library >= 2.1 or uClibc... " >&6; }
13671 if ${ac_cv_gnu_library_2_1+:} false; then :
13672   $as_echo_n "(cached) " >&6
13673 else
13674   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13675 /* end confdefs.h.  */
13676
13677 #include <features.h>
13678 #ifdef __GNU_LIBRARY__
13679  #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
13680   Lucky GNU user
13681  #endif
13682 #endif
13683 #ifdef __UCLIBC__
13684  Lucky user
13685 #endif
13686
13687 _ACEOF
13688 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13689   $EGREP "Lucky" >/dev/null 2>&1; then :
13690   ac_cv_gnu_library_2_1=yes
13691 else
13692   ac_cv_gnu_library_2_1=no
13693 fi
13694 rm -f conftest*
13695
13696
13697
13698 fi
13699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2_1" >&5
13700 $as_echo "$ac_cv_gnu_library_2_1" >&6; }
13701
13702     GLIBC21="$ac_cv_gnu_library_2_1"
13703
13704
13705
13706   GNULIB_LOCALECONV=0;
13707   GNULIB_SETLOCALE=0;
13708   GNULIB_DUPLOCALE=0;
13709     HAVE_DUPLOCALE=1;
13710   REPLACE_LOCALECONV=0;
13711   REPLACE_SETLOCALE=0;
13712   REPLACE_DUPLOCALE=0;
13713   REPLACE_STRUCT_LCONV=0;
13714
13715
13716     REPLACE_NULL=0;
13717   HAVE_WCHAR_T=1;
13718
13719
13720   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
13721 $as_echo_n "checking for wchar_t... " >&6; }
13722 if ${gt_cv_c_wchar_t+:} false; then :
13723   $as_echo_n "(cached) " >&6
13724 else
13725   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13726 /* end confdefs.h.  */
13727 #include <stddef.h>
13728             wchar_t foo = (wchar_t)'\0';
13729 int
13730 main ()
13731 {
13732
13733   ;
13734   return 0;
13735 }
13736 _ACEOF
13737 if ac_fn_c_try_compile "$LINENO"; then :
13738   gt_cv_c_wchar_t=yes
13739 else
13740   gt_cv_c_wchar_t=no
13741 fi
13742 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13743 fi
13744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
13745 $as_echo "$gt_cv_c_wchar_t" >&6; }
13746   if test $gt_cv_c_wchar_t = yes; then
13747
13748 $as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
13749
13750   fi
13751
13752
13753
13754
13755   STDDEF_H=
13756   if test $gt_cv_c_wchar_t = no; then
13757     HAVE_WCHAR_T=0
13758     STDDEF_H=stddef.h
13759   fi
13760   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
13761 $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
13762 if ${gl_cv_decl_null_works+:} false; then :
13763   $as_echo_n "(cached) " >&6
13764 else
13765   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13766 /* end confdefs.h.  */
13767 #include <stddef.h>
13768       int test[2 * (sizeof NULL == sizeof (void *)) -1];
13769
13770 int
13771 main ()
13772 {
13773
13774   ;
13775   return 0;
13776 }
13777 _ACEOF
13778 if ac_fn_c_try_compile "$LINENO"; then :
13779   gl_cv_decl_null_works=yes
13780 else
13781   gl_cv_decl_null_works=no
13782 fi
13783 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13784 fi
13785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
13786 $as_echo "$gl_cv_decl_null_works" >&6; }
13787   if test $gl_cv_decl_null_works = no; then
13788     REPLACE_NULL=1
13789     STDDEF_H=stddef.h
13790   fi
13791
13792    if test -n "$STDDEF_H"; then
13793   GL_GENERATE_STDDEF_H_TRUE=
13794   GL_GENERATE_STDDEF_H_FALSE='#'
13795 else
13796   GL_GENERATE_STDDEF_H_TRUE='#'
13797   GL_GENERATE_STDDEF_H_FALSE=
13798 fi
13799
13800   if test -n "$STDDEF_H"; then
13801
13802
13803
13804
13805
13806
13807
13808
13809      if test $gl_cv_have_include_next = yes; then
13810        gl_cv_next_stddef_h='<'stddef.h'>'
13811      else
13812        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
13813 $as_echo_n "checking absolute name of <stddef.h>... " >&6; }
13814 if ${gl_cv_next_stddef_h+:} false; then :
13815   $as_echo_n "(cached) " >&6
13816 else
13817
13818
13819
13820   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13821 /* end confdefs.h.  */
13822 #include <stddef.h>
13823 _ACEOF
13824                 case "$host_os" in
13825     aix*) gl_absname_cpp="$ac_cpp -C" ;;
13826     *)    gl_absname_cpp="$ac_cpp" ;;
13827   esac
13828
13829   case "$host_os" in
13830     mingw*)
13831                                           gl_dirsep_regex='[/\\]'
13832       ;;
13833     *)
13834       gl_dirsep_regex='\/'
13835       ;;
13836   esac
13837       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13838   gl_header_literal_regex=`echo 'stddef.h' \
13839                            | sed -e "$gl_make_literal_regex_sed"`
13840   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13841       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13842       s|^/[^/]|//&|
13843       p
13844       q
13845     }'
13846
13847         gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13848   sed -n "$gl_absolute_header_sed"`
13849
13850            gl_header=$gl_cv_absolute_stddef_h
13851            gl_cv_next_stddef_h='"'$gl_header'"'
13852
13853
13854 fi
13855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
13856 $as_echo "$gl_cv_next_stddef_h" >&6; }
13857      fi
13858      NEXT_STDDEF_H=$gl_cv_next_stddef_h
13859
13860      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13861        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13862        gl_next_as_first_directive='<'stddef.h'>'
13863      else
13864        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13865        gl_next_as_first_directive=$gl_cv_next_stddef_h
13866      fi
13867      NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
13868
13869
13870
13871
13872   fi
13873
13874
13875
13876
13877
13878
13879   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5
13880 $as_echo_n "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; }
13881 if ${gl_cv_func_malloc_posix+:} false; then :
13882   $as_echo_n "(cached) " >&6
13883 else
13884
13885                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13886 /* end confdefs.h.  */
13887
13888 int
13889 main ()
13890 {
13891 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
13892              choke me
13893              #endif
13894
13895   ;
13896   return 0;
13897 }
13898 _ACEOF
13899 if ac_fn_c_try_compile "$LINENO"; then :
13900   gl_cv_func_malloc_posix=yes
13901 else
13902   gl_cv_func_malloc_posix=no
13903 fi
13904 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13905
13906 fi
13907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
13908 $as_echo "$gl_cv_func_malloc_posix" >&6; }
13909
13910
13911
13912       for ac_header in stdlib.h
13913 do :
13914   ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
13915 if test "x$ac_cv_header_stdlib_h" = xyes; then :
13916   cat >>confdefs.h <<_ACEOF
13917 #define HAVE_STDLIB_H 1
13918 _ACEOF
13919
13920 fi
13921
13922 done
13923
13924   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
13925 $as_echo_n "checking for GNU libc compatible malloc... " >&6; }
13926 if ${ac_cv_func_malloc_0_nonnull+:} false; then :
13927   $as_echo_n "(cached) " >&6
13928 else
13929   if test "$cross_compiling" = yes; then :
13930   case "$host_os" in
13931           # Guess yes on platforms where we know the result.
13932           *-gnu* | freebsd* | netbsd* | openbsd* \
13933           | hpux* | solaris* | cygwin* | mingw*)
13934             ac_cv_func_malloc_0_nonnull=yes ;;
13935           # If we don't know, assume the worst.
13936           *) ac_cv_func_malloc_0_nonnull=no ;;
13937         esac
13938
13939 else
13940   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13941 /* end confdefs.h.  */
13942 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
13943             # include <stdlib.h>
13944             #else
13945             char *malloc ();
13946             #endif
13947
13948 int
13949 main ()
13950 {
13951 return ! malloc (0);
13952   ;
13953   return 0;
13954 }
13955
13956 _ACEOF
13957 if ac_fn_c_try_run "$LINENO"; then :
13958   ac_cv_func_malloc_0_nonnull=yes
13959 else
13960   ac_cv_func_malloc_0_nonnull=no
13961 fi
13962 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13963   conftest.$ac_objext conftest.beam conftest.$ac_ext
13964 fi
13965
13966
13967 fi
13968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
13969 $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
13970   if test $ac_cv_func_malloc_0_nonnull = yes; then :
13971   gl_cv_func_malloc_0_nonnull=1
13972 else
13973   gl_cv_func_malloc_0_nonnull=0
13974 fi
13975
13976
13977 cat >>confdefs.h <<_ACEOF
13978 #define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull
13979 _ACEOF
13980
13981
13982
13983
13984
13985
13986
13987
13988
13989   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
13990 $as_echo_n "checking for a traditional japanese locale... " >&6; }
13991 if ${gt_cv_locale_ja+:} false; then :
13992   $as_echo_n "(cached) " >&6
13993 else
13994
13995     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13996 /* end confdefs.h.  */
13997
13998 #include <locale.h>
13999 #include <time.h>
14000 #if HAVE_LANGINFO_CODESET
14001 # include <langinfo.h>
14002 #endif
14003 #include <stdlib.h>
14004 #include <string.h>
14005 struct tm t;
14006 char buf[16];
14007 int main ()
14008 {
14009   const char *p;
14010   /* Check whether the given locale name is recognized by the system.  */
14011 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
14012   /* On native Windows, setlocale(category, "") looks at the system settings,
14013      not at the environment variables.  Also, when an encoding suffix such
14014      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
14015      category of the locale to "C".  */
14016   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
14017       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
14018     return 1;
14019 #else
14020   if (setlocale (LC_ALL, "") == NULL) return 1;
14021 #endif
14022   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
14023      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
14024      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
14025      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
14026      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
14027      some unit tests fail.
14028      On MirBSD 10, when an unsupported locale is specified, setlocale()
14029      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
14030 #if HAVE_LANGINFO_CODESET
14031   {
14032     const char *cs = nl_langinfo (CODESET);
14033     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
14034         || strcmp (cs, "UTF-8") == 0)
14035       return 1;
14036   }
14037 #endif
14038 #ifdef __CYGWIN__
14039   /* On Cygwin, avoid locale names without encoding suffix, because the
14040      locale_charset() function relies on the encoding suffix.  Note that
14041      LC_ALL is set on the command line.  */
14042   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
14043 #endif
14044   /* Check whether MB_CUR_MAX is > 1.  This excludes the dysfunctional locales
14045      on Cygwin 1.5.x.  */
14046   if (MB_CUR_MAX == 1)
14047     return 1;
14048   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
14049      This excludes the UTF-8 encoding (except on MirBSD).  */
14050   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
14051   if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
14052   for (p = buf; *p != '\0'; p++)
14053     if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
14054       return 1;
14055   return 0;
14056 }
14057
14058 _ACEOF
14059     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14060   (eval $ac_link) 2>&5
14061   ac_status=$?
14062   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14063   test $ac_status = 0; } && test -s conftest$ac_exeext; then
14064       case "$host_os" in
14065         # Handle native Windows specially, because there setlocale() interprets
14066         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
14067         # "fr" or "fra" as "French" or "French_France.1252",
14068         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
14069         # "ja" as "Japanese" or "Japanese_Japan.932",
14070         # and similar.
14071         mingw*)
14072           # Note that on native Windows, the Japanese locale is
14073           # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
14074           # cannot use it here.
14075           gt_cv_locale_ja=none
14076           ;;
14077         *)
14078           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
14079           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
14080           # configure script would override the LC_ALL setting. Likewise for
14081           # LC_CTYPE, which is also set at the beginning of the configure script.
14082           # Test for the AIX locale name.
14083           if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14084             gt_cv_locale_ja=ja_JP
14085           else
14086             # Test for the locale name with explicit encoding suffix.
14087             if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14088               gt_cv_locale_ja=ja_JP.EUC-JP
14089             else
14090               # Test for the HP-UX, OSF/1, NetBSD locale name.
14091               if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14092                 gt_cv_locale_ja=ja_JP.eucJP
14093               else
14094                 # Test for the IRIX, FreeBSD locale name.
14095                 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14096                   gt_cv_locale_ja=ja_JP.EUC
14097                 else
14098                   # Test for the Solaris 7 locale name.
14099                   if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14100                     gt_cv_locale_ja=ja
14101                   else
14102                     # Special test for NetBSD 1.6.
14103                     if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
14104                       gt_cv_locale_ja=ja_JP.eucJP
14105                     else
14106                       # None found.
14107                       gt_cv_locale_ja=none
14108                     fi
14109                   fi
14110                 fi
14111               fi
14112             fi
14113           fi
14114           ;;
14115       esac
14116     fi
14117     rm -fr conftest*
14118
14119 fi
14120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
14121 $as_echo "$gt_cv_locale_ja" >&6; }
14122   LOCALE_JA=$gt_cv_locale_ja
14123
14124
14125
14126
14127
14128   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
14129 $as_echo_n "checking for a transitional chinese locale... " >&6; }
14130 if ${gt_cv_locale_zh_CN+:} false; then :
14131   $as_echo_n "(cached) " >&6
14132 else
14133
14134     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14135 /* end confdefs.h.  */
14136
14137 #include <locale.h>
14138 #include <stdlib.h>
14139 #include <time.h>
14140 #if HAVE_LANGINFO_CODESET
14141 # include <langinfo.h>
14142 #endif
14143 #include <stdlib.h>
14144 #include <string.h>
14145 struct tm t;
14146 char buf[16];
14147 int main ()
14148 {
14149   const char *p;
14150   /* Check whether the given locale name is recognized by the system.  */
14151 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
14152   /* On native Windows, setlocale(category, "") looks at the system settings,
14153      not at the environment variables.  Also, when an encoding suffix such
14154      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
14155      category of the locale to "C".  */
14156   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
14157       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
14158     return 1;
14159 #else
14160   if (setlocale (LC_ALL, "") == NULL) return 1;
14161 #endif
14162   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
14163      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
14164      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
14165      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
14166      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
14167      some unit tests fail.
14168      On MirBSD 10, when an unsupported locale is specified, setlocale()
14169      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
14170 #if HAVE_LANGINFO_CODESET
14171   {
14172     const char *cs = nl_langinfo (CODESET);
14173     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
14174         || strcmp (cs, "UTF-8") == 0)
14175       return 1;
14176   }
14177 #endif
14178 #ifdef __CYGWIN__
14179   /* On Cygwin, avoid locale names without encoding suffix, because the
14180      locale_charset() function relies on the encoding suffix.  Note that
14181      LC_ALL is set on the command line.  */
14182   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
14183 #endif
14184   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
14185      This excludes the UTF-8 encoding (except on MirBSD).  */
14186   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
14187   if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
14188   for (p = buf; *p != '\0'; p++)
14189     if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
14190       return 1;
14191   /* Check whether a typical GB18030 multibyte sequence is recognized as a
14192      single wide character.  This excludes the GB2312 and GBK encodings.  */
14193   if (mblen ("\203\062\332\066", 5) != 4)
14194     return 1;
14195   return 0;
14196 }
14197
14198 _ACEOF
14199     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14200   (eval $ac_link) 2>&5
14201   ac_status=$?
14202   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14203   test $ac_status = 0; } && test -s conftest$ac_exeext; then
14204       case "$host_os" in
14205         # Handle native Windows specially, because there setlocale() interprets
14206         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
14207         # "fr" or "fra" as "French" or "French_France.1252",
14208         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
14209         # "ja" as "Japanese" or "Japanese_Japan.932",
14210         # and similar.
14211         mingw*)
14212           # Test for the hypothetical native Windows locale name.
14213           if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14214             gt_cv_locale_zh_CN=Chinese_China.54936
14215           else
14216             # None found.
14217             gt_cv_locale_zh_CN=none
14218           fi
14219           ;;
14220         solaris2.8)
14221           # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
14222           # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
14223           # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
14224           gt_cv_locale_zh_CN=none
14225           ;;
14226         *)
14227           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
14228           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
14229           # configure script would override the LC_ALL setting. Likewise for
14230           # LC_CTYPE, which is also set at the beginning of the configure script.
14231           # Test for the locale name without encoding suffix.
14232           if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14233             gt_cv_locale_zh_CN=zh_CN
14234           else
14235             # Test for the locale name with explicit encoding suffix.
14236             if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14237               gt_cv_locale_zh_CN=zh_CN.GB18030
14238             else
14239               # None found.
14240               gt_cv_locale_zh_CN=none
14241             fi
14242           fi
14243           ;;
14244       esac
14245     else
14246       # If there was a link error, due to mblen(), the system is so old that
14247       # it certainly doesn't have a chinese locale.
14248       gt_cv_locale_zh_CN=none
14249     fi
14250     rm -fr conftest*
14251
14252 fi
14253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
14254 $as_echo "$gt_cv_locale_zh_CN" >&6; }
14255   LOCALE_ZH_CN=$gt_cv_locale_zh_CN
14256
14257
14258
14259
14260   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
14261 $as_echo_n "checking for a french Unicode locale... " >&6; }
14262 if ${gt_cv_locale_fr_utf8+:} false; then :
14263   $as_echo_n "(cached) " >&6
14264 else
14265
14266     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14267 /* end confdefs.h.  */
14268
14269 #include <locale.h>
14270 #include <time.h>
14271 #if HAVE_LANGINFO_CODESET
14272 # include <langinfo.h>
14273 #endif
14274 #include <stdlib.h>
14275 #include <string.h>
14276 struct tm t;
14277 char buf[16];
14278 int main () {
14279   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
14280      imitates locale dependent behaviour by looking at the environment
14281      variables, and all locales use the UTF-8 encoding.  */
14282 #if !(defined __BEOS__ || defined __HAIKU__)
14283   /* Check whether the given locale name is recognized by the system.  */
14284 # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
14285   /* On native Windows, setlocale(category, "") looks at the system settings,
14286      not at the environment variables.  Also, when an encoding suffix such
14287      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
14288      category of the locale to "C".  */
14289   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
14290       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
14291     return 1;
14292 # else
14293   if (setlocale (LC_ALL, "") == NULL) return 1;
14294 # endif
14295   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
14296      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
14297      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
14298      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
14299      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
14300      some unit tests fail.  */
14301 # if HAVE_LANGINFO_CODESET
14302   {
14303     const char *cs = nl_langinfo (CODESET);
14304     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
14305       return 1;
14306   }
14307 # endif
14308 # ifdef __CYGWIN__
14309   /* On Cygwin, avoid locale names without encoding suffix, because the
14310      locale_charset() function relies on the encoding suffix.  Note that
14311      LC_ALL is set on the command line.  */
14312   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
14313 # endif
14314   /* Check whether in the abbreviation of the second month, the second
14315      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
14316      two bytes long, with UTF-8 encoding.  */
14317   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
14318   if (strftime (buf, sizeof (buf), "%b", &t) < 4
14319       || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
14320     return 1;
14321 #endif
14322 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
14323   /* Check whether the decimal separator is a comma.
14324      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
14325      are nl_langinfo(RADIXCHAR) are both ".".  */
14326   if (localeconv () ->decimal_point[0] != ',') return 1;
14327 #endif
14328   return 0;
14329 }
14330
14331 _ACEOF
14332     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14333   (eval $ac_link) 2>&5
14334   ac_status=$?
14335   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14336   test $ac_status = 0; } && test -s conftest$ac_exeext; then
14337       case "$host_os" in
14338         # Handle native Windows specially, because there setlocale() interprets
14339         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
14340         # "fr" or "fra" as "French" or "French_France.1252",
14341         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
14342         # "ja" as "Japanese" or "Japanese_Japan.932",
14343         # and similar.
14344         mingw*)
14345           # Test for the hypothetical native Windows locale name.
14346           if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14347             gt_cv_locale_fr_utf8=French_France.65001
14348           else
14349             # None found.
14350             gt_cv_locale_fr_utf8=none
14351           fi
14352           ;;
14353         *)
14354           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
14355           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
14356           # configure script would override the LC_ALL setting. Likewise for
14357           # LC_CTYPE, which is also set at the beginning of the configure script.
14358           # Test for the usual locale name.
14359           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14360             gt_cv_locale_fr_utf8=fr_FR
14361           else
14362             # Test for the locale name with explicit encoding suffix.
14363             if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14364               gt_cv_locale_fr_utf8=fr_FR.UTF-8
14365             else
14366               # Test for the Solaris 7 locale name.
14367               if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14368                 gt_cv_locale_fr_utf8=fr.UTF-8
14369               else
14370                 # None found.
14371                 gt_cv_locale_fr_utf8=none
14372               fi
14373             fi
14374           fi
14375           ;;
14376       esac
14377     fi
14378     rm -fr conftest*
14379
14380 fi
14381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
14382 $as_echo "$gt_cv_locale_fr_utf8" >&6; }
14383   LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
14384
14385
14386
14387   GNULIB_FFSL=0;
14388   GNULIB_FFSLL=0;
14389   GNULIB_MEMCHR=0;
14390   GNULIB_MEMMEM=0;
14391   GNULIB_MEMPCPY=0;
14392   GNULIB_MEMRCHR=0;
14393   GNULIB_RAWMEMCHR=0;
14394   GNULIB_STPCPY=0;
14395   GNULIB_STPNCPY=0;
14396   GNULIB_STRCHRNUL=0;
14397   GNULIB_STRDUP=0;
14398   GNULIB_STRNCAT=0;
14399   GNULIB_STRNDUP=0;
14400   GNULIB_STRNLEN=0;
14401   GNULIB_STRPBRK=0;
14402   GNULIB_STRSEP=0;
14403   GNULIB_STRSTR=0;
14404   GNULIB_STRCASESTR=0;
14405   GNULIB_STRTOK_R=0;
14406   GNULIB_MBSLEN=0;
14407   GNULIB_MBSNLEN=0;
14408   GNULIB_MBSCHR=0;
14409   GNULIB_MBSRCHR=0;
14410   GNULIB_MBSSTR=0;
14411   GNULIB_MBSCASECMP=0;
14412   GNULIB_MBSNCASECMP=0;
14413   GNULIB_MBSPCASECMP=0;
14414   GNULIB_MBSCASESTR=0;
14415   GNULIB_MBSCSPN=0;
14416   GNULIB_MBSPBRK=0;
14417   GNULIB_MBSSPN=0;
14418   GNULIB_MBSSEP=0;
14419   GNULIB_MBSTOK_R=0;
14420   GNULIB_STRERROR=0;
14421   GNULIB_STRERROR_R=0;
14422   GNULIB_STRSIGNAL=0;
14423   GNULIB_STRVERSCMP=0;
14424   HAVE_MBSLEN=0;
14425     HAVE_FFSL=1;
14426   HAVE_FFSLL=1;
14427   HAVE_MEMCHR=1;
14428   HAVE_DECL_MEMMEM=1;
14429   HAVE_MEMPCPY=1;
14430   HAVE_DECL_MEMRCHR=1;
14431   HAVE_RAWMEMCHR=1;
14432   HAVE_STPCPY=1;
14433   HAVE_STPNCPY=1;
14434   HAVE_STRCHRNUL=1;
14435   HAVE_DECL_STRDUP=1;
14436   HAVE_DECL_STRNDUP=1;
14437   HAVE_DECL_STRNLEN=1;
14438   HAVE_STRPBRK=1;
14439   HAVE_STRSEP=1;
14440   HAVE_STRCASESTR=1;
14441   HAVE_DECL_STRTOK_R=1;
14442   HAVE_DECL_STRERROR_R=1;
14443   HAVE_DECL_STRSIGNAL=1;
14444   HAVE_STRVERSCMP=1;
14445   REPLACE_MEMCHR=0;
14446   REPLACE_MEMMEM=0;
14447   REPLACE_STPNCPY=0;
14448   REPLACE_STRDUP=0;
14449   REPLACE_STRSTR=0;
14450   REPLACE_STRCASESTR=0;
14451   REPLACE_STRCHRNUL=0;
14452   REPLACE_STRERROR=0;
14453   REPLACE_STRERROR_R=0;
14454   REPLACE_STRNCAT=0;
14455   REPLACE_STRNDUP=0;
14456   REPLACE_STRNLEN=0;
14457   REPLACE_STRSIGNAL=0;
14458   REPLACE_STRTOK_R=0;
14459   UNDEFINE_STRTOK_R=0;
14460
14461
14462
14463
14464
14465
14466
14467
14468
14469   # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
14470   # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
14471   # irrelevant for anonymous mappings.
14472   ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
14473 if test "x$ac_cv_func_mmap" = xyes; then :
14474   gl_have_mmap=yes
14475 else
14476   gl_have_mmap=no
14477 fi
14478
14479
14480   # Try to allow MAP_ANONYMOUS.
14481   gl_have_mmap_anonymous=no
14482   if test $gl_have_mmap = yes; then
14483     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
14484 $as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
14485     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14486 /* end confdefs.h.  */
14487
14488 #include <sys/mman.h>
14489 #ifdef MAP_ANONYMOUS
14490     I cannot identify this map
14491 #endif
14492
14493 _ACEOF
14494 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14495   $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
14496   gl_have_mmap_anonymous=yes
14497 fi
14498 rm -f conftest*
14499
14500     if test $gl_have_mmap_anonymous != yes; then
14501       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14502 /* end confdefs.h.  */
14503
14504 #include <sys/mman.h>
14505 #ifdef MAP_ANON
14506     I cannot identify this map
14507 #endif
14508
14509 _ACEOF
14510 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14511   $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
14512
14513 $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
14514
14515          gl_have_mmap_anonymous=yes
14516 fi
14517 rm -f conftest*
14518
14519     fi
14520     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
14521 $as_echo "$gl_have_mmap_anonymous" >&6; }
14522     if test $gl_have_mmap_anonymous = yes; then
14523
14524 $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
14525
14526     fi
14527   fi
14528
14529
14530
14531
14532
14533
14534   if test $HAVE_MEMCHR = 1; then
14535     # Detect platform-specific bugs in some versions of glibc:
14536     # memchr should not dereference anything with length 0
14537     #   http://bugzilla.redhat.com/499689
14538     # memchr should not dereference overestimated length after a match
14539     #   http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
14540     #   http://sourceware.org/bugzilla/show_bug.cgi?id=10162
14541     # Assume that memchr works on platforms that lack mprotect.
14542     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
14543 $as_echo_n "checking whether memchr works... " >&6; }
14544 if ${gl_cv_func_memchr_works+:} false; then :
14545   $as_echo_n "(cached) " >&6
14546 else
14547   if test "$cross_compiling" = yes; then :
14548          gl_cv_func_memchr_works="guessing no"
14549 else
14550   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14551 /* end confdefs.h.  */
14552
14553 #include <string.h>
14554 #if HAVE_SYS_MMAN_H
14555 # include <fcntl.h>
14556 # include <unistd.h>
14557 # include <sys/types.h>
14558 # include <sys/mman.h>
14559 # ifndef MAP_FILE
14560 #  define MAP_FILE 0
14561 # endif
14562 #endif
14563
14564 int
14565 main ()
14566 {
14567
14568   int result = 0;
14569   char *fence = NULL;
14570 #if HAVE_SYS_MMAN_H && HAVE_MPROTECT
14571 # if HAVE_MAP_ANONYMOUS
14572   const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
14573   const int fd = -1;
14574 # else /* !HAVE_MAP_ANONYMOUS */
14575   const int flags = MAP_FILE | MAP_PRIVATE;
14576   int fd = open ("/dev/zero", O_RDONLY, 0666);
14577   if (fd >= 0)
14578 # endif
14579     {
14580       int pagesize = getpagesize ();
14581       char *two_pages =
14582         (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
14583                        flags, fd, 0);
14584       if (two_pages != (char *)(-1)
14585           && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
14586         fence = two_pages + pagesize;
14587     }
14588 #endif
14589   if (fence)
14590     {
14591       if (memchr (fence, 0, 0))
14592         result |= 1;
14593       strcpy (fence - 9, "12345678");
14594       if (memchr (fence - 9, 0, 79) != fence - 1)
14595         result |= 2;
14596       if (memchr (fence - 1, 0, 3) != fence - 1)
14597         result |= 4;
14598     }
14599   return result;
14600
14601   ;
14602   return 0;
14603 }
14604 _ACEOF
14605 if ac_fn_c_try_run "$LINENO"; then :
14606   gl_cv_func_memchr_works=yes
14607 else
14608   gl_cv_func_memchr_works=no
14609 fi
14610 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14611   conftest.$ac_objext conftest.beam conftest.$ac_ext
14612 fi
14613
14614 fi
14615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
14616 $as_echo "$gl_cv_func_memchr_works" >&6; }
14617     if test "$gl_cv_func_memchr_works" != yes; then
14618       REPLACE_MEMCHR=1
14619     fi
14620   fi
14621
14622 ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default"
14623 if test "x$ac_cv_have_decl_memrchr" = xyes; then :
14624   ac_have_decl=1
14625 else
14626   ac_have_decl=0
14627 fi
14628
14629 cat >>confdefs.h <<_ACEOF
14630 #define HAVE_DECL_MEMRCHR $ac_have_decl
14631 _ACEOF
14632
14633
14634
14635
14636
14637
14638
14639
14640
14641
14642
14643
14644   GNULIB_MKTIME=0;
14645   GNULIB_NANOSLEEP=0;
14646   GNULIB_STRPTIME=0;
14647   GNULIB_TIMEGM=0;
14648   GNULIB_TIME_R=0;
14649     HAVE_DECL_LOCALTIME_R=1;
14650   HAVE_NANOSLEEP=1;
14651   HAVE_STRPTIME=1;
14652   HAVE_TIMEGM=1;
14653         REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
14654   REPLACE_MKTIME=GNULIB_PORTCHECK;
14655   REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
14656   REPLACE_TIMEGM=GNULIB_PORTCHECK;
14657
14658       : ${GNULIB_GETTIMEOFDAY=0};
14659         REPLACE_GMTIME=0;
14660   REPLACE_LOCALTIME=0;
14661
14662 ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
14663 if test "x$ac_cv_have_decl_alarm" = xyes; then :
14664   ac_have_decl=1
14665 else
14666   ac_have_decl=0
14667 fi
14668
14669 cat >>confdefs.h <<_ACEOF
14670 #define HAVE_DECL_ALARM $ac_have_decl
14671 _ACEOF
14672
14673
14674
14675
14676
14677   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
14678 $as_echo_n "checking for promoted mode_t type... " >&6; }
14679 if ${gl_cv_promoted_mode_t+:} false; then :
14680   $as_echo_n "(cached) " >&6
14681 else
14682
14683                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14684 /* end confdefs.h.  */
14685 #include <sys/types.h>
14686 int
14687 main ()
14688 {
14689 typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
14690   ;
14691   return 0;
14692 }
14693 _ACEOF
14694 if ac_fn_c_try_compile "$LINENO"; then :
14695   gl_cv_promoted_mode_t='int'
14696 else
14697   gl_cv_promoted_mode_t='mode_t'
14698 fi
14699 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14700
14701 fi
14702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
14703 $as_echo "$gl_cv_promoted_mode_t" >&6; }
14704
14705 cat >>confdefs.h <<_ACEOF
14706 #define PROMOTED_MODE_T $gl_cv_promoted_mode_t
14707 _ACEOF
14708
14709
14710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
14711 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
14712 if ${ac_cv_header_stdbool_h+:} false; then :
14713   $as_echo_n "(cached) " >&6
14714 else
14715   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14716 /* end confdefs.h.  */
14717
14718              #include <stdbool.h>
14719              #ifndef bool
14720               "error: bool is not defined"
14721              #endif
14722              #ifndef false
14723               "error: false is not defined"
14724              #endif
14725              #if false
14726               "error: false is not 0"
14727              #endif
14728              #ifndef true
14729               "error: true is not defined"
14730              #endif
14731              #if true != 1
14732               "error: true is not 1"
14733              #endif
14734              #ifndef __bool_true_false_are_defined
14735               "error: __bool_true_false_are_defined is not defined"
14736              #endif
14737
14738              struct s { _Bool s: 1; _Bool t; } s;
14739
14740              char a[true == 1 ? 1 : -1];
14741              char b[false == 0 ? 1 : -1];
14742              char c[__bool_true_false_are_defined == 1 ? 1 : -1];
14743              char d[(bool) 0.5 == true ? 1 : -1];
14744              /* See body of main program for 'e'.  */
14745              char f[(_Bool) 0.0 == false ? 1 : -1];
14746              char g[true];
14747              char h[sizeof (_Bool)];
14748              char i[sizeof s.t];
14749              enum { j = false, k = true, l = false * true, m = true * 256 };
14750              /* The following fails for
14751                 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
14752              _Bool n[m];
14753              char o[sizeof n == m * sizeof n[0] ? 1 : -1];
14754              char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
14755              /* Catch a bug in an HP-UX C compiler.  See
14756                 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
14757                 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
14758               */
14759              _Bool q = true;
14760              _Bool *pq = &q;
14761
14762 int
14763 main ()
14764 {
14765
14766              bool e = &s;
14767              *pq |= q;
14768              *pq |= ! q;
14769              /* Refer to every declared value, to avoid compiler optimizations.  */
14770              return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
14771                      + !m + !n + !o + !p + !q + !pq);
14772
14773   ;
14774   return 0;
14775 }
14776 _ACEOF
14777 if ac_fn_c_try_compile "$LINENO"; then :
14778   ac_cv_header_stdbool_h=yes
14779 else
14780   ac_cv_header_stdbool_h=no
14781 fi
14782 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14783 fi
14784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
14785 $as_echo "$ac_cv_header_stdbool_h" >&6; }
14786    ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
14787 if test "x$ac_cv_type__Bool" = xyes; then :
14788
14789 cat >>confdefs.h <<_ACEOF
14790 #define HAVE__BOOL 1
14791 _ACEOF
14792
14793
14794 fi
14795
14796
14797
14798
14799
14800   # Define two additional variables used in the Makefile substitution.
14801
14802   if test "$ac_cv_header_stdbool_h" = yes; then
14803     STDBOOL_H=''
14804   else
14805     STDBOOL_H='stdbool.h'
14806   fi
14807
14808    if test -n "$STDBOOL_H"; then
14809   GL_GENERATE_STDBOOL_H_TRUE=
14810   GL_GENERATE_STDBOOL_H_FALSE='#'
14811 else
14812   GL_GENERATE_STDBOOL_H_TRUE='#'
14813   GL_GENERATE_STDBOOL_H_FALSE=
14814 fi
14815
14816
14817   if test "$ac_cv_type__Bool" = yes; then
14818     HAVE__BOOL=1
14819   else
14820     HAVE__BOOL=0
14821   fi
14822
14823
14824
14825   # parse-datetime.y works with bison only.
14826   : ${YACC='bison -y'}
14827
14828
14829   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compound literals" >&5
14830 $as_echo_n "checking for compound literals... " >&6; }
14831 if ${gl_cv_compound_literals+:} false; then :
14832   $as_echo_n "(cached) " >&6
14833 else
14834   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14835 /* end confdefs.h.  */
14836 struct s { int i, j; };
14837 int
14838 main ()
14839 {
14840 struct s t = (struct s) { 3, 4 };
14841         if (t.i != 0) return 0;
14842   ;
14843   return 0;
14844 }
14845 _ACEOF
14846 if ac_fn_c_try_compile "$LINENO"; then :
14847   gl_cv_compound_literals=yes
14848 else
14849   gl_cv_compound_literals=no
14850 fi
14851 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14852 fi
14853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compound_literals" >&5
14854 $as_echo "$gl_cv_compound_literals" >&6; }
14855   if test $gl_cv_compound_literals = yes; then
14856
14857 $as_echo "#define HAVE_COMPOUND_LITERALS 1" >>confdefs.h
14858
14859   fi
14860
14861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
14862 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
14863 if ${ac_cv_struct_tm+:} false; then :
14864   $as_echo_n "(cached) " >&6
14865 else
14866   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14867 /* end confdefs.h.  */
14868 #include <sys/types.h>
14869 #include <time.h>
14870
14871 int
14872 main ()
14873 {
14874 struct tm tm;
14875                                      int *p = &tm.tm_sec;
14876                                      return !p;
14877   ;
14878   return 0;
14879 }
14880 _ACEOF
14881 if ac_fn_c_try_compile "$LINENO"; then :
14882   ac_cv_struct_tm=time.h
14883 else
14884   ac_cv_struct_tm=sys/time.h
14885 fi
14886 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14887 fi
14888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
14889 $as_echo "$ac_cv_struct_tm" >&6; }
14890 if test $ac_cv_struct_tm = sys/time.h; then
14891
14892 $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
14893
14894 fi
14895
14896
14897  ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include <time.h>
14898 "
14899 if test "x$ac_cv_member_struct_tm_tm_gmtoff" = xyes; then :
14900
14901 $as_echo "#define HAVE_TM_GMTOFF 1" >>confdefs.h
14902
14903 fi
14904
14905
14906
14907
14908
14909
14910
14911
14912
14913
14914
14915   GNULIB_PTHREAD_SIGMASK=0;
14916   GNULIB_RAISE=0;
14917   GNULIB_SIGNAL_H_SIGPIPE=0;
14918   GNULIB_SIGPROCMASK=0;
14919   GNULIB_SIGACTION=0;
14920     HAVE_POSIX_SIGNALBLOCKING=1;
14921   HAVE_PTHREAD_SIGMASK=1;
14922   HAVE_RAISE=1;
14923   HAVE_SIGSET_T=1;
14924   HAVE_SIGINFO_T=1;
14925   HAVE_SIGACTION=1;
14926   HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
14927
14928   HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
14929
14930   HAVE_SIGHANDLER_T=1;
14931   REPLACE_PTHREAD_SIGMASK=0;
14932   REPLACE_RAISE=0;
14933
14934
14935
14936
14937
14938
14939
14940
14941
14942
14943
14944
14945 # Check whether --with-selinux was given.
14946 if test "${with_selinux+set}" = set; then :
14947   withval=$with_selinux;
14948 else
14949   with_selinux=maybe
14950 fi
14951
14952
14953   LIB_SELINUX=
14954   if test "$with_selinux" != no; then
14955     gl_save_LIBS=$LIBS
14956     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setfilecon" >&5
14957 $as_echo_n "checking for library containing setfilecon... " >&6; }
14958 if ${ac_cv_search_setfilecon+:} false; then :
14959   $as_echo_n "(cached) " >&6
14960 else
14961   ac_func_search_save_LIBS=$LIBS
14962 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14963 /* end confdefs.h.  */
14964
14965 /* Override any GCC internal prototype to avoid an error.
14966    Use char because int might match the return type of a GCC
14967    builtin and then its argument prototype would still apply.  */
14968 #ifdef __cplusplus
14969 extern "C"
14970 #endif
14971 char setfilecon ();
14972 int
14973 main ()
14974 {
14975 return setfilecon ();
14976   ;
14977   return 0;
14978 }
14979 _ACEOF
14980 for ac_lib in '' selinux; do
14981   if test -z "$ac_lib"; then
14982     ac_res="none required"
14983   else
14984     ac_res=-l$ac_lib
14985     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14986   fi
14987   if ac_fn_c_try_link "$LINENO"; then :
14988   ac_cv_search_setfilecon=$ac_res
14989 fi
14990 rm -f core conftest.err conftest.$ac_objext \
14991     conftest$ac_exeext
14992   if ${ac_cv_search_setfilecon+:} false; then :
14993   break
14994 fi
14995 done
14996 if ${ac_cv_search_setfilecon+:} false; then :
14997
14998 else
14999   ac_cv_search_setfilecon=no
15000 fi
15001 rm conftest.$ac_ext
15002 LIBS=$ac_func_search_save_LIBS
15003 fi
15004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setfilecon" >&5
15005 $as_echo "$ac_cv_search_setfilecon" >&6; }
15006 ac_res=$ac_cv_search_setfilecon
15007 if test "$ac_res" != no; then :
15008   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15009   test "$ac_cv_search_setfilecon" = "none required" ||
15010                     LIB_SELINUX=$ac_cv_search_setfilecon
15011 fi
15012
15013     LIBS=$gl_save_LIBS
15014   fi
15015
15016
15017   # Warn if SELinux is found but libselinux is absent;
15018   if test "$ac_cv_search_setfilecon" = no; then
15019     if test "$host" = "$build" && test -d /selinux; then
15020       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This system supports SELinux but libselinux is missing." >&5
15021 $as_echo "$as_me: WARNING: This system supports SELinux but libselinux is missing." >&2;}
15022       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GNU tar will be compiled without SELinux support." >&5
15023 $as_echo "$as_me: WARNING: GNU tar will be compiled without SELinux support." >&2;}
15024     fi
15025     with_selinux=no
15026   fi
15027
15028
15029
15030 ac_fn_c_check_decl "$LINENO" "setenv" "ac_cv_have_decl_setenv" "$ac_includes_default"
15031 if test "x$ac_cv_have_decl_setenv" = xyes; then :
15032   ac_have_decl=1
15033 else
15034   ac_have_decl=0
15035 fi
15036
15037 cat >>confdefs.h <<_ACEOF
15038 #define HAVE_DECL_SETENV $ac_have_decl
15039 _ACEOF
15040
15041
15042
15043
15044
15045
15046   if test $ac_cv_have_decl_setenv = no; then
15047     HAVE_DECL_SETENV=0
15048   fi
15049
15050
15051
15052
15053
15054   for ac_header in search.h
15055 do :
15056   ac_fn_c_check_header_mongrel "$LINENO" "search.h" "ac_cv_header_search_h" "$ac_includes_default"
15057 if test "x$ac_cv_header_search_h" = xyes; then :
15058   cat >>confdefs.h <<_ACEOF
15059 #define HAVE_SEARCH_H 1
15060 _ACEOF
15061
15062 fi
15063
15064 done
15065
15066   for ac_func in tsearch
15067 do :
15068   ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch"
15069 if test "x$ac_cv_func_tsearch" = xyes; then :
15070   cat >>confdefs.h <<_ACEOF
15071 #define HAVE_TSEARCH 1
15072 _ACEOF
15073
15074 fi
15075 done
15076
15077
15078
15079
15080   ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
15081       #include <signal.h>
15082       /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>.  */
15083       #include <sys/types.h>
15084
15085 "
15086 if test "x$ac_cv_type_sigset_t" = xyes; then :
15087
15088 cat >>confdefs.h <<_ACEOF
15089 #define HAVE_SIGSET_T 1
15090 _ACEOF
15091
15092 gl_cv_type_sigset_t=yes
15093 else
15094   gl_cv_type_sigset_t=no
15095 fi
15096
15097   if test $gl_cv_type_sigset_t != yes; then
15098     HAVE_SIGSET_T=0
15099   fi
15100
15101
15102
15103
15104
15105
15106
15107
15108
15109
15110
15111   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf returns a byte count as in C99" >&5
15112 $as_echo_n "checking whether snprintf returns a byte count as in C99... " >&6; }
15113 if ${gl_cv_func_snprintf_retval_c99+:} false; then :
15114   $as_echo_n "(cached) " >&6
15115 else
15116
15117       if test "$cross_compiling" = yes; then :
15118
15119          case "$host_os" in
15120                                  # Guess yes on glibc systems.
15121            *-gnu*)               gl_cv_func_snprintf_retval_c99="guessing yes";;
15122                                  # Guess yes on FreeBSD >= 5.
15123            freebsd[1-4]*)        gl_cv_func_snprintf_retval_c99="guessing no";;
15124            freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
15125                                  # Guess yes on Mac OS X >= 10.3.
15126            darwin[1-6].*)        gl_cv_func_snprintf_retval_c99="guessing no";;
15127            darwin*)              gl_cv_func_snprintf_retval_c99="guessing yes";;
15128                                  # Guess yes on OpenBSD >= 3.9.
15129            openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
15130                                  gl_cv_func_snprintf_retval_c99="guessing no";;
15131            openbsd*)             gl_cv_func_snprintf_retval_c99="guessing yes";;
15132                                  # Guess yes on Solaris >= 2.10.
15133            solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";;
15134            solaris*)             gl_cv_func_printf_sizes_c99="guessing no";;
15135                                  # Guess yes on AIX >= 4.
15136            aix[1-3]*)            gl_cv_func_snprintf_retval_c99="guessing no";;
15137            aix*)                 gl_cv_func_snprintf_retval_c99="guessing yes";;
15138                                  # Guess yes on NetBSD >= 3.
15139            netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
15140                                  gl_cv_func_snprintf_retval_c99="guessing no";;
15141            netbsd*)              gl_cv_func_snprintf_retval_c99="guessing yes";;
15142                                  # Guess yes on BeOS.
15143            beos*)                gl_cv_func_snprintf_retval_c99="guessing yes";;
15144                                  # If we don't know, assume the worst.
15145            *)                    gl_cv_func_snprintf_retval_c99="guessing no";;
15146          esac
15147
15148 else
15149   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15150 /* end confdefs.h.  */
15151
15152 #include <stdio.h>
15153 #include <string.h>
15154 #if HAVE_SNPRINTF
15155 # define my_snprintf snprintf
15156 #else
15157 # include <stdarg.h>
15158 static int my_snprintf (char *buf, int size, const char *format, ...)
15159 {
15160   va_list args;
15161   int ret;
15162   va_start (args, format);
15163   ret = vsnprintf (buf, size, format, args);
15164   va_end (args);
15165   return ret;
15166 }
15167 #endif
15168 static char buf[100];
15169 int main ()
15170 {
15171   strcpy (buf, "ABCDEF");
15172   if (my_snprintf (buf, 3, "%d %d", 4567, 89) != 7)
15173     return 1;
15174   if (my_snprintf (buf, 0, "%d %d", 4567, 89) != 7)
15175     return 2;
15176   if (my_snprintf (NULL, 0, "%d %d", 4567, 89) != 7)
15177     return 3;
15178   return 0;
15179 }
15180 _ACEOF
15181 if ac_fn_c_try_run "$LINENO"; then :
15182   gl_cv_func_snprintf_retval_c99=yes
15183 else
15184   gl_cv_func_snprintf_retval_c99=no
15185 fi
15186 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15187   conftest.$ac_objext conftest.beam conftest.$ac_ext
15188 fi
15189
15190
15191 fi
15192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_retval_c99" >&5
15193 $as_echo "$gl_cv_func_snprintf_retval_c99" >&6; }
15194
15195 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
15196 if test "x$ac_cv_have_decl_snprintf" = xyes; then :
15197   ac_have_decl=1
15198 else
15199   ac_have_decl=0
15200 fi
15201
15202 cat >>confdefs.h <<_ACEOF
15203 #define HAVE_DECL_SNPRINTF $ac_have_decl
15204 _ACEOF
15205
15206
15207   GNULIB_FFS=0;
15208     HAVE_FFS=1;
15209   HAVE_STRCASECMP=1;
15210   HAVE_DECL_STRNCASECMP=1;
15211
15212
15213
15214 ac_fn_c_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default"
15215 if test "x$ac_cv_have_decl_strdup" = xyes; then :
15216   ac_have_decl=1
15217 else
15218   ac_have_decl=0
15219 fi
15220
15221 cat >>confdefs.h <<_ACEOF
15222 #define HAVE_DECL_STRDUP $ac_have_decl
15223 _ACEOF
15224
15225
15226      REPLACE_STRERROR_0=0
15227   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5
15228 $as_echo_n "checking whether strerror(0) succeeds... " >&6; }
15229 if ${gl_cv_func_strerror_0_works+:} false; then :
15230   $as_echo_n "(cached) " >&6
15231 else
15232   if test "$cross_compiling" = yes; then :
15233   case "$host_os" in
15234                  # Guess yes on glibc systems.
15235          *-gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
15236                  # If we don't know, assume the worst.
15237          *)      gl_cv_func_strerror_0_works="guessing no" ;;
15238        esac
15239
15240 else
15241   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15242 /* end confdefs.h.  */
15243 #include <string.h>
15244            #include <errno.h>
15245
15246 int
15247 main ()
15248 {
15249 int result = 0;
15250            char *str;
15251            errno = 0;
15252            str = strerror (0);
15253            if (!*str) result |= 1;
15254            if (errno) result |= 2;
15255            if (strstr (str, "nknown") || strstr (str, "ndefined"))
15256              result |= 4;
15257            return result;
15258   ;
15259   return 0;
15260 }
15261 _ACEOF
15262 if ac_fn_c_try_run "$LINENO"; then :
15263   gl_cv_func_strerror_0_works=yes
15264 else
15265   gl_cv_func_strerror_0_works=no
15266 fi
15267 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15268   conftest.$ac_objext conftest.beam conftest.$ac_ext
15269 fi
15270
15271
15272 fi
15273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5
15274 $as_echo "$gl_cv_func_strerror_0_works" >&6; }
15275   case "$gl_cv_func_strerror_0_works" in
15276     *yes) ;;
15277     *)
15278       REPLACE_STRERROR_0=1
15279
15280 $as_echo "#define REPLACE_STRERROR_0 1" >>confdefs.h
15281
15282       ;;
15283   esac
15284
15285
15286
15287
15288
15289
15290
15291
15292
15293
15294
15295
15296
15297
15298      if test $gl_cv_have_include_next = yes; then
15299        gl_cv_next_string_h='<'string.h'>'
15300      else
15301        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
15302 $as_echo_n "checking absolute name of <string.h>... " >&6; }
15303 if ${gl_cv_next_string_h+:} false; then :
15304   $as_echo_n "(cached) " >&6
15305 else
15306
15307
15308
15309   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15310 /* end confdefs.h.  */
15311 #include <string.h>
15312 _ACEOF
15313                 case "$host_os" in
15314     aix*) gl_absname_cpp="$ac_cpp -C" ;;
15315     *)    gl_absname_cpp="$ac_cpp" ;;
15316   esac
15317
15318   case "$host_os" in
15319     mingw*)
15320                                           gl_dirsep_regex='[/\\]'
15321       ;;
15322     *)
15323       gl_dirsep_regex='\/'
15324       ;;
15325   esac
15326       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
15327   gl_header_literal_regex=`echo 'string.h' \
15328                            | sed -e "$gl_make_literal_regex_sed"`
15329   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
15330       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
15331       s|^/[^/]|//&|
15332       p
15333       q
15334     }'
15335
15336         gl_cv_absolute_string_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
15337   sed -n "$gl_absolute_header_sed"`
15338
15339            gl_header=$gl_cv_absolute_string_h
15340            gl_cv_next_string_h='"'$gl_header'"'
15341
15342
15343 fi
15344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
15345 $as_echo "$gl_cv_next_string_h" >&6; }
15346      fi
15347      NEXT_STRING_H=$gl_cv_next_string_h
15348
15349      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
15350        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
15351        gl_next_as_first_directive='<'string.h'>'
15352      else
15353        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
15354        gl_next_as_first_directive=$gl_cv_next_string_h
15355      fi
15356      NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
15357
15358
15359
15360
15361
15362
15363     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
15364     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
15365     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
15366 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
15367 if eval \${$as_gl_Symbol+:} false; then :
15368   $as_echo_n "(cached) " >&6
15369 else
15370   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15371 /* end confdefs.h.  */
15372 #include <string.h>
15373
15374 int
15375 main ()
15376 {
15377 #undef $gl_func
15378   (void) $gl_func;
15379   ;
15380   return 0;
15381 }
15382 _ACEOF
15383 if ac_fn_c_try_compile "$LINENO"; then :
15384   eval "$as_gl_Symbol=yes"
15385 else
15386   eval "$as_gl_Symbol=no"
15387 fi
15388 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15389 fi
15390 eval ac_res=\$$as_gl_Symbol
15391                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15392 $as_echo "$ac_res" >&6; }
15393     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
15394   cat >>confdefs.h <<_ACEOF
15395 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
15396 _ACEOF
15397
15398                      eval ac_cv_have_decl_$gl_func=yes
15399 fi
15400       done
15401
15402
15403
15404
15405
15406
15407
15408
15409
15410
15411
15412
15413
15414
15415
15416
15417      if test $gl_cv_have_include_next = yes; then
15418        gl_cv_next_strings_h='<'strings.h'>'
15419      else
15420        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <strings.h>" >&5
15421 $as_echo_n "checking absolute name of <strings.h>... " >&6; }
15422 if ${gl_cv_next_strings_h+:} false; then :
15423   $as_echo_n "(cached) " >&6
15424 else
15425
15426              if test $ac_cv_header_strings_h = yes; then
15427
15428
15429
15430
15431   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15432 /* end confdefs.h.  */
15433 #include <strings.h>
15434 _ACEOF
15435                 case "$host_os" in
15436     aix*) gl_absname_cpp="$ac_cpp -C" ;;
15437     *)    gl_absname_cpp="$ac_cpp" ;;
15438   esac
15439
15440   case "$host_os" in
15441     mingw*)
15442                                           gl_dirsep_regex='[/\\]'
15443       ;;
15444     *)
15445       gl_dirsep_regex='\/'
15446       ;;
15447   esac
15448       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
15449   gl_header_literal_regex=`echo 'strings.h' \
15450                            | sed -e "$gl_make_literal_regex_sed"`
15451   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
15452       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
15453       s|^/[^/]|//&|
15454       p
15455       q
15456     }'
15457
15458         gl_cv_absolute_strings_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
15459   sed -n "$gl_absolute_header_sed"`
15460
15461            gl_header=$gl_cv_absolute_strings_h
15462            gl_cv_next_strings_h='"'$gl_header'"'
15463           else
15464                gl_cv_next_strings_h='<'strings.h'>'
15465              fi
15466
15467
15468 fi
15469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_strings_h" >&5
15470 $as_echo "$gl_cv_next_strings_h" >&6; }
15471      fi
15472      NEXT_STRINGS_H=$gl_cv_next_strings_h
15473
15474      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
15475        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
15476        gl_next_as_first_directive='<'strings.h'>'
15477      else
15478        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
15479        gl_next_as_first_directive=$gl_cv_next_strings_h
15480      fi
15481      NEXT_AS_FIRST_DIRECTIVE_STRINGS_H=$gl_next_as_first_directive
15482
15483
15484
15485
15486   if test $ac_cv_header_strings_h = yes; then
15487     HAVE_STRINGS_H=1
15488   else
15489     HAVE_STRINGS_H=0
15490   fi
15491
15492
15493
15494     for gl_func in ffs strcasecmp strncasecmp; do
15495     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
15496     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
15497 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
15498 if eval \${$as_gl_Symbol+:} false; then :
15499   $as_echo_n "(cached) " >&6
15500 else
15501   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15502 /* end confdefs.h.  */
15503
15504     /* Minix 3.1.8 has a bug: <sys/types.h> must be included before
15505        <strings.h>.  */
15506     #include <sys/types.h>
15507     #include <strings.h>
15508
15509 int
15510 main ()
15511 {
15512 #undef $gl_func
15513   (void) $gl_func;
15514   ;
15515   return 0;
15516 }
15517 _ACEOF
15518 if ac_fn_c_try_compile "$LINENO"; then :
15519   eval "$as_gl_Symbol=yes"
15520 else
15521   eval "$as_gl_Symbol=no"
15522 fi
15523 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15524 fi
15525 eval ac_res=\$$as_gl_Symbol
15526                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15527 $as_echo "$ac_res" >&6; }
15528     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
15529   cat >>confdefs.h <<_ACEOF
15530 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
15531 _ACEOF
15532
15533                      eval ac_cv_have_decl_$gl_func=yes
15534 fi
15535       done
15536
15537
15538 ac_fn_c_check_decl "$LINENO" "strndup" "ac_cv_have_decl_strndup" "$ac_includes_default"
15539 if test "x$ac_cv_have_decl_strndup" = xyes; then :
15540   ac_have_decl=1
15541 else
15542   ac_have_decl=0
15543 fi
15544
15545 cat >>confdefs.h <<_ACEOF
15546 #define HAVE_DECL_STRNDUP $ac_have_decl
15547 _ACEOF
15548
15549
15550
15551 ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
15552 if test "x$ac_cv_have_decl_strnlen" = xyes; then :
15553   ac_have_decl=1
15554 else
15555   ac_have_decl=0
15556 fi
15557
15558 cat >>confdefs.h <<_ACEOF
15559 #define HAVE_DECL_STRNLEN $ac_have_decl
15560 _ACEOF
15561
15562
15563
15564 ac_fn_c_check_decl "$LINENO" "strtoimax" "ac_cv_have_decl_strtoimax" "$ac_includes_default"
15565 if test "x$ac_cv_have_decl_strtoimax" = xyes; then :
15566   ac_have_decl=1
15567 else
15568   ac_have_decl=0
15569 fi
15570
15571 cat >>confdefs.h <<_ACEOF
15572 #define HAVE_DECL_STRTOIMAX $ac_have_decl
15573 _ACEOF
15574
15575
15576
15577 ac_fn_c_check_decl "$LINENO" "strtoumax" "ac_cv_have_decl_strtoumax" "$ac_includes_default"
15578 if test "x$ac_cv_have_decl_strtoumax" = xyes; then :
15579   ac_have_decl=1
15580 else
15581   ac_have_decl=0
15582 fi
15583
15584 cat >>confdefs.h <<_ACEOF
15585 #define HAVE_DECL_STRTOUMAX $ac_have_decl
15586 _ACEOF
15587
15588
15589
15590
15591
15592
15593
15594   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
15595 $as_echo_n "checking for struct timespec in <time.h>... " >&6; }
15596 if ${gl_cv_sys_struct_timespec_in_time_h+:} false; then :
15597   $as_echo_n "(cached) " >&6
15598 else
15599   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15600 /* end confdefs.h.  */
15601 #include <time.h>
15602
15603 int
15604 main ()
15605 {
15606 static struct timespec x; x.tv_sec = x.tv_nsec;
15607   ;
15608   return 0;
15609 }
15610 _ACEOF
15611 if ac_fn_c_try_compile "$LINENO"; then :
15612   gl_cv_sys_struct_timespec_in_time_h=yes
15613 else
15614   gl_cv_sys_struct_timespec_in_time_h=no
15615 fi
15616 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15617 fi
15618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
15619 $as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
15620
15621   TIME_H_DEFINES_STRUCT_TIMESPEC=0
15622   SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
15623   PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
15624   if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
15625     TIME_H_DEFINES_STRUCT_TIMESPEC=1
15626   else
15627     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
15628 $as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
15629 if ${gl_cv_sys_struct_timespec_in_sys_time_h+:} false; then :
15630   $as_echo_n "(cached) " >&6
15631 else
15632   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15633 /* end confdefs.h.  */
15634 #include <sys/time.h>
15635
15636 int
15637 main ()
15638 {
15639 static struct timespec x; x.tv_sec = x.tv_nsec;
15640   ;
15641   return 0;
15642 }
15643 _ACEOF
15644 if ac_fn_c_try_compile "$LINENO"; then :
15645   gl_cv_sys_struct_timespec_in_sys_time_h=yes
15646 else
15647   gl_cv_sys_struct_timespec_in_sys_time_h=no
15648 fi
15649 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15650 fi
15651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
15652 $as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
15653     if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
15654       SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
15655     else
15656       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
15657 $as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
15658 if ${gl_cv_sys_struct_timespec_in_pthread_h+:} false; then :
15659   $as_echo_n "(cached) " >&6
15660 else
15661   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15662 /* end confdefs.h.  */
15663 #include <pthread.h>
15664
15665 int
15666 main ()
15667 {
15668 static struct timespec x; x.tv_sec = x.tv_nsec;
15669   ;
15670   return 0;
15671 }
15672 _ACEOF
15673 if ac_fn_c_try_compile "$LINENO"; then :
15674   gl_cv_sys_struct_timespec_in_pthread_h=yes
15675 else
15676   gl_cv_sys_struct_timespec_in_pthread_h=no
15677 fi
15678 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15679 fi
15680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
15681 $as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
15682       if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
15683         PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
15684       fi
15685     fi
15686   fi
15687
15688
15689
15690
15691
15692
15693
15694
15695
15696
15697
15698
15699
15700
15701
15702      if test $gl_cv_have_include_next = yes; then
15703        gl_cv_next_time_h='<'time.h'>'
15704      else
15705        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
15706 $as_echo_n "checking absolute name of <time.h>... " >&6; }
15707 if ${gl_cv_next_time_h+:} false; then :
15708   $as_echo_n "(cached) " >&6
15709 else
15710
15711
15712
15713   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15714 /* end confdefs.h.  */
15715 #include <time.h>
15716 _ACEOF
15717                 case "$host_os" in
15718     aix*) gl_absname_cpp="$ac_cpp -C" ;;
15719     *)    gl_absname_cpp="$ac_cpp" ;;
15720   esac
15721
15722   case "$host_os" in
15723     mingw*)
15724                                           gl_dirsep_regex='[/\\]'
15725       ;;
15726     *)
15727       gl_dirsep_regex='\/'
15728       ;;
15729   esac
15730       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
15731   gl_header_literal_regex=`echo 'time.h' \
15732                            | sed -e "$gl_make_literal_regex_sed"`
15733   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
15734       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
15735       s|^/[^/]|//&|
15736       p
15737       q
15738     }'
15739
15740         gl_cv_absolute_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
15741   sed -n "$gl_absolute_header_sed"`
15742
15743            gl_header=$gl_cv_absolute_time_h
15744            gl_cv_next_time_h='"'$gl_header'"'
15745
15746
15747 fi
15748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
15749 $as_echo "$gl_cv_next_time_h" >&6; }
15750      fi
15751      NEXT_TIME_H=$gl_cv_next_time_h
15752
15753      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
15754        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
15755        gl_next_as_first_directive='<'time.h'>'
15756      else
15757        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
15758        gl_next_as_first_directive=$gl_cv_next_time_h
15759      fi
15760      NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
15761
15762
15763
15764
15765
15766
15767
15768
15769 ac_fn_c_check_decl "$LINENO" "ttyname_r" "ac_cv_have_decl_ttyname_r" "$ac_includes_default"
15770 if test "x$ac_cv_have_decl_ttyname_r" = xyes; then :
15771   ac_have_decl=1
15772 else
15773   ac_have_decl=0
15774 fi
15775
15776 cat >>confdefs.h <<_ACEOF
15777 #define HAVE_DECL_TTYNAME_R $ac_have_decl
15778 _ACEOF
15779
15780
15781
15782
15783
15784
15785
15786
15787
15788 gl_libunistring_sed_extract_major='/^[0-9]/{s/^\([0-9]*\).*/\1/p;q;}
15789 i\
15790 0
15791 q
15792 '
15793 gl_libunistring_sed_extract_minor='/^[0-9][0-9]*[.][0-9]/{s/^[0-9]*[.]\([0-9]*\).*/\1/p;q;}
15794 i\
15795 0
15796 q
15797 '
15798 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;}
15799 i\
15800 0
15801 q
15802 '
15803
15804
15805   if test "$HAVE_LIBUNISTRING" = yes; then
15806     LIBUNISTRING_VERSION_MAJOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_major"`
15807     LIBUNISTRING_VERSION_MINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_minor"`
15808     LIBUNISTRING_VERSION_SUBMINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_subminor"`
15809   fi
15810
15811
15812
15813 ac_fn_c_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default"
15814 if test "x$ac_cv_have_decl_unsetenv" = xyes; then :
15815   ac_have_decl=1
15816 else
15817   ac_have_decl=0
15818 fi
15819
15820 cat >>confdefs.h <<_ACEOF
15821 #define HAVE_DECL_UNSETENV $ac_have_decl
15822 _ACEOF
15823
15824
15825   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the utimes function works" >&5
15826 $as_echo_n "checking whether the utimes function works... " >&6; }
15827 if ${gl_cv_func_working_utimes+:} false; then :
15828   $as_echo_n "(cached) " >&6
15829 else
15830
15831   if test "$cross_compiling" = yes; then :
15832   gl_cv_func_working_utimes=no
15833 else
15834   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15835 /* end confdefs.h.  */
15836
15837 #include <sys/types.h>
15838 #include <sys/stat.h>
15839 #include <fcntl.h>
15840 #include <sys/time.h>
15841 #include <time.h>
15842 #include <unistd.h>
15843 #include <stdlib.h>
15844 #include <stdio.h>
15845 #include <utime.h>
15846
15847 static int
15848 inorder (time_t a, time_t b, time_t c)
15849 {
15850   return a <= b && b <= c;
15851 }
15852
15853 int
15854 main ()
15855 {
15856   int result = 0;
15857   char const *file = "conftest.utimes";
15858   static struct timeval timeval[2] = {{9, 10}, {999999, 999999}};
15859
15860   /* Test whether utimes() essentially works.  */
15861   {
15862     struct stat sbuf;
15863     FILE *f = fopen (file, "w");
15864     if (f == NULL)
15865       result |= 1;
15866     else if (fclose (f) != 0)
15867       result |= 1;
15868     else if (utimes (file, timeval) != 0)
15869       result |= 2;
15870     else if (lstat (file, &sbuf) != 0)
15871       result |= 1;
15872     else if (!(sbuf.st_atime == timeval[0].tv_sec
15873                && sbuf.st_mtime == timeval[1].tv_sec))
15874       result |= 4;
15875     if (unlink (file) != 0)
15876       result |= 1;
15877   }
15878
15879   /* Test whether utimes() with a NULL argument sets the file's timestamp
15880      to the current time.  Use 'fstat' as well as 'time' to
15881      determine the "current" time, to accommodate NFS file systems
15882      if there is a time skew between the host and the NFS server.  */
15883   {
15884     int fd = open (file, O_WRONLY|O_CREAT, 0644);
15885     if (fd < 0)
15886       result |= 1;
15887     else
15888       {
15889         time_t t0, t2;
15890         struct stat st0, st1, st2;
15891         if (time (&t0) == (time_t) -1)
15892           result |= 1;
15893         else if (fstat (fd, &st0) != 0)
15894           result |= 1;
15895         else if (utimes (file, timeval) != 0)
15896           result |= 2;
15897         else if (utimes (file, NULL) != 0)
15898           result |= 8;
15899         else if (fstat (fd, &st1) != 0)
15900           result |= 1;
15901         else if (write (fd, "\n", 1) != 1)
15902           result |= 1;
15903         else if (fstat (fd, &st2) != 0)
15904           result |= 1;
15905         else if (time (&t2) == (time_t) -1)
15906           result |= 1;
15907         else
15908           {
15909             int m_ok_POSIX = inorder (t0, st1.st_mtime, t2);
15910             int m_ok_NFS = inorder (st0.st_mtime, st1.st_mtime, st2.st_mtime);
15911             if (! (st1.st_atime == st1.st_mtime))
15912               result |= 16;
15913             if (! (m_ok_POSIX || m_ok_NFS))
15914               result |= 32;
15915           }
15916         if (close (fd) != 0)
15917           result |= 1;
15918       }
15919     if (unlink (file) != 0)
15920       result |= 1;
15921   }
15922
15923   /* Test whether utimes() with a NULL argument works on read-only files.  */
15924   {
15925     int fd = open (file, O_WRONLY|O_CREAT, 0444);
15926     if (fd < 0)
15927       result |= 1;
15928     else if (close (fd) != 0)
15929       result |= 1;
15930     else if (utimes (file, NULL) != 0)
15931       result |= 64;
15932     if (unlink (file) != 0)
15933       result |= 1;
15934   }
15935
15936   return result;
15937 }
15938
15939 _ACEOF
15940 if ac_fn_c_try_run "$LINENO"; then :
15941   gl_cv_func_working_utimes=yes
15942 else
15943   gl_cv_func_working_utimes=no
15944 fi
15945 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15946   conftest.$ac_objext conftest.beam conftest.$ac_ext
15947 fi
15948
15949 fi
15950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_utimes" >&5
15951 $as_echo "$gl_cv_func_working_utimes" >&6; }
15952
15953   if test $gl_cv_func_working_utimes = yes; then
15954
15955 $as_echo "#define HAVE_WORKING_UTIMES 1" >>confdefs.h
15956
15957   fi
15958
15959
15960
15961
15962
15963   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct utimbuf" >&5
15964 $as_echo_n "checking for struct utimbuf... " >&6; }
15965 if ${gl_cv_sys_struct_utimbuf+:} false; then :
15966   $as_echo_n "(cached) " >&6
15967 else
15968   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15969 /* end confdefs.h.  */
15970 #if HAVE_SYS_TIME_H
15971              #include <sys/time.h>
15972             #endif
15973             #include <time.h>
15974             #ifdef HAVE_UTIME_H
15975              #include <utime.h>
15976             #endif
15977
15978 int
15979 main ()
15980 {
15981 static struct utimbuf x; x.actime = x.modtime;
15982   ;
15983   return 0;
15984 }
15985 _ACEOF
15986 if ac_fn_c_try_compile "$LINENO"; then :
15987   gl_cv_sys_struct_utimbuf=yes
15988 else
15989   gl_cv_sys_struct_utimbuf=no
15990 fi
15991 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15992 fi
15993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_utimbuf" >&5
15994 $as_echo "$gl_cv_sys_struct_utimbuf" >&6; }
15995
15996   if test $gl_cv_sys_struct_utimbuf = yes; then
15997
15998 $as_echo "#define HAVE_STRUCT_UTIMBUF 1" >>confdefs.h
15999
16000   fi
16001
16002
16003
16004
16005
16006
16007
16008
16009
16010
16011
16012
16013
16014   if test $ac_cv_header_features_h = yes; then
16015     HAVE_FEATURES_H=1
16016   else
16017     HAVE_FEATURES_H=0
16018   fi
16019
16020
16021
16022   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5
16023 $as_echo_n "checking for inttypes.h... " >&6; }
16024 if ${gl_cv_header_inttypes_h+:} false; then :
16025   $as_echo_n "(cached) " >&6
16026 else
16027   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16028 /* end confdefs.h.  */
16029
16030 #include <sys/types.h>
16031 #include <inttypes.h>
16032
16033 int
16034 main ()
16035 {
16036 uintmax_t i = (uintmax_t) -1; return !i;
16037   ;
16038   return 0;
16039 }
16040 _ACEOF
16041 if ac_fn_c_try_compile "$LINENO"; then :
16042   gl_cv_header_inttypes_h=yes
16043 else
16044   gl_cv_header_inttypes_h=no
16045 fi
16046 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16047 fi
16048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_inttypes_h" >&5
16049 $as_echo "$gl_cv_header_inttypes_h" >&6; }
16050   if test $gl_cv_header_inttypes_h = yes; then
16051
16052 cat >>confdefs.h <<_ACEOF
16053 #define HAVE_INTTYPES_H_WITH_UINTMAX 1
16054 _ACEOF
16055
16056   fi
16057
16058
16059   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint.h" >&5
16060 $as_echo_n "checking for stdint.h... " >&6; }
16061 if ${gl_cv_header_stdint_h+:} false; then :
16062   $as_echo_n "(cached) " >&6
16063 else
16064   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16065 /* end confdefs.h.  */
16066 #include <sys/types.h>
16067             #include <stdint.h>
16068 int
16069 main ()
16070 {
16071 uintmax_t i = (uintmax_t) -1; return !i;
16072   ;
16073   return 0;
16074 }
16075 _ACEOF
16076 if ac_fn_c_try_compile "$LINENO"; then :
16077   gl_cv_header_stdint_h=yes
16078 else
16079   gl_cv_header_stdint_h=no
16080 fi
16081 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16082 fi
16083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_h" >&5
16084 $as_echo "$gl_cv_header_stdint_h" >&6; }
16085   if test $gl_cv_header_stdint_h = yes; then
16086
16087 cat >>confdefs.h <<_ACEOF
16088 #define HAVE_STDINT_H_WITH_UINTMAX 1
16089 _ACEOF
16090
16091   fi
16092
16093
16094
16095
16096   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intmax_t" >&5
16097 $as_echo_n "checking for intmax_t... " >&6; }
16098 if ${gt_cv_c_intmax_t+:} false; then :
16099   $as_echo_n "(cached) " >&6
16100 else
16101   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16102 /* end confdefs.h.  */
16103
16104 #include <stddef.h>
16105 #include <stdlib.h>
16106 #if HAVE_STDINT_H_WITH_UINTMAX
16107 #include <stdint.h>
16108 #endif
16109 #if HAVE_INTTYPES_H_WITH_UINTMAX
16110 #include <inttypes.h>
16111 #endif
16112
16113 int
16114 main ()
16115 {
16116 intmax_t x = -1; return !x;
16117   ;
16118   return 0;
16119 }
16120 _ACEOF
16121 if ac_fn_c_try_compile "$LINENO"; then :
16122   gt_cv_c_intmax_t=yes
16123 else
16124   gt_cv_c_intmax_t=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: $gt_cv_c_intmax_t" >&5
16129 $as_echo "$gt_cv_c_intmax_t" >&6; }
16130   if test $gt_cv_c_intmax_t = yes; then
16131
16132 $as_echo "#define HAVE_INTMAX_T 1" >>confdefs.h
16133
16134   else
16135
16136     test $ac_cv_type_long_long_int = yes \
16137       && ac_type='long long' \
16138       || ac_type='long'
16139
16140 cat >>confdefs.h <<_ACEOF
16141 #define intmax_t $ac_type
16142 _ACEOF
16143
16144   fi
16145
16146
16147   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
16148 $as_echo_n "checking where to find the exponent in a 'double'... " >&6; }
16149 if ${gl_cv_cc_double_expbit0+:} false; then :
16150   $as_echo_n "(cached) " >&6
16151 else
16152
16153       if test "$cross_compiling" = yes; then :
16154
16155                                                                       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16156 /* end confdefs.h.  */
16157
16158 #if defined arm || defined __arm || defined __arm__
16159   mixed_endianness
16160 #endif
16161
16162 _ACEOF
16163 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16164   $EGREP "mixed_endianness" >/dev/null 2>&1; then :
16165   gl_cv_cc_double_expbit0="unknown"
16166 else
16167
16168                                                          :
16169 if ${ac_cv_c_bigendian+:} false; then :
16170   $as_echo_n "(cached) " >&6
16171 else
16172   ac_cv_c_bigendian=unknown
16173     # See if we're dealing with a universal compiler.
16174     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16175 /* end confdefs.h.  */
16176 #ifndef __APPLE_CC__
16177                not a universal capable compiler
16178              #endif
16179              typedef int dummy;
16180
16181 _ACEOF
16182 if ac_fn_c_try_compile "$LINENO"; then :
16183
16184         # Check for potential -arch flags.  It is not universal unless
16185         # there are at least two -arch flags with different values.
16186         ac_arch=
16187         ac_prev=
16188         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
16189          if test -n "$ac_prev"; then
16190            case $ac_word in
16191              i?86 | x86_64 | ppc | ppc64)
16192                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
16193                  ac_arch=$ac_word
16194                else
16195                  ac_cv_c_bigendian=universal
16196                  break
16197                fi
16198                ;;
16199            esac
16200            ac_prev=
16201          elif test "x$ac_word" = "x-arch"; then
16202            ac_prev=arch
16203          fi
16204        done
16205 fi
16206 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16207     if test $ac_cv_c_bigendian = unknown; then
16208       # See if sys/param.h defines the BYTE_ORDER macro.
16209       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16210 /* end confdefs.h.  */
16211 #include <sys/types.h>
16212              #include <sys/param.h>
16213
16214 int
16215 main ()
16216 {
16217 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
16218                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
16219                      && LITTLE_ENDIAN)
16220               bogus endian macros
16221              #endif
16222
16223   ;
16224   return 0;
16225 }
16226 _ACEOF
16227 if ac_fn_c_try_compile "$LINENO"; then :
16228   # It does; now see whether it defined to BIG_ENDIAN or not.
16229          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16230 /* end confdefs.h.  */
16231 #include <sys/types.h>
16232                 #include <sys/param.h>
16233
16234 int
16235 main ()
16236 {
16237 #if BYTE_ORDER != BIG_ENDIAN
16238                  not big endian
16239                 #endif
16240
16241   ;
16242   return 0;
16243 }
16244 _ACEOF
16245 if ac_fn_c_try_compile "$LINENO"; then :
16246   ac_cv_c_bigendian=yes
16247 else
16248   ac_cv_c_bigendian=no
16249 fi
16250 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16251 fi
16252 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16253     fi
16254     if test $ac_cv_c_bigendian = unknown; then
16255       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
16256       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16257 /* end confdefs.h.  */
16258 #include <limits.h>
16259
16260 int
16261 main ()
16262 {
16263 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
16264               bogus endian macros
16265              #endif
16266
16267   ;
16268   return 0;
16269 }
16270 _ACEOF
16271 if ac_fn_c_try_compile "$LINENO"; then :
16272   # It does; now see whether it defined to _BIG_ENDIAN or not.
16273          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16274 /* end confdefs.h.  */
16275 #include <limits.h>
16276
16277 int
16278 main ()
16279 {
16280 #ifndef _BIG_ENDIAN
16281                  not big endian
16282                 #endif
16283
16284   ;
16285   return 0;
16286 }
16287 _ACEOF
16288 if ac_fn_c_try_compile "$LINENO"; then :
16289   ac_cv_c_bigendian=yes
16290 else
16291   ac_cv_c_bigendian=no
16292 fi
16293 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16294 fi
16295 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16296     fi
16297     if test $ac_cv_c_bigendian = unknown; then
16298       # Compile a test program.
16299       if test "$cross_compiling" = yes; then :
16300   # Try to guess by grepping values from an object file.
16301          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16302 /* end confdefs.h.  */
16303 short int ascii_mm[] =
16304                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
16305                 short int ascii_ii[] =
16306                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
16307                 int use_ascii (int i) {
16308                   return ascii_mm[i] + ascii_ii[i];
16309                 }
16310                 short int ebcdic_ii[] =
16311                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
16312                 short int ebcdic_mm[] =
16313                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
16314                 int use_ebcdic (int i) {
16315                   return ebcdic_mm[i] + ebcdic_ii[i];
16316                 }
16317                 extern int foo;
16318
16319 int
16320 main ()
16321 {
16322 return use_ascii (foo) == use_ebcdic (foo);
16323   ;
16324   return 0;
16325 }
16326 _ACEOF
16327 if ac_fn_c_try_compile "$LINENO"; then :
16328   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
16329               ac_cv_c_bigendian=yes
16330             fi
16331             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
16332               if test "$ac_cv_c_bigendian" = unknown; then
16333                 ac_cv_c_bigendian=no
16334               else
16335                 # finding both strings is unlikely to happen, but who knows?
16336                 ac_cv_c_bigendian=unknown
16337               fi
16338             fi
16339 fi
16340 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16341 else
16342   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16343 /* end confdefs.h.  */
16344 $ac_includes_default
16345 int
16346 main ()
16347 {
16348
16349              /* Are we little or big endian?  From Harbison&Steele.  */
16350              union
16351              {
16352                long int l;
16353                char c[sizeof (long int)];
16354              } u;
16355              u.l = 1;
16356              return u.c[sizeof (long int) - 1] == 1;
16357
16358   ;
16359   return 0;
16360 }
16361 _ACEOF
16362 if ac_fn_c_try_run "$LINENO"; then :
16363   ac_cv_c_bigendian=no
16364 else
16365   ac_cv_c_bigendian=yes
16366 fi
16367 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16368   conftest.$ac_objext conftest.beam conftest.$ac_ext
16369 fi
16370
16371     fi
16372 fi
16373 :
16374  case $ac_cv_c_bigendian in #(
16375    yes)
16376      gl_cv_cc_double_expbit0="word 0 bit 20";; #(
16377    no)
16378      gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
16379    universal)
16380
16381 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
16382
16383      ;; #(
16384    *)
16385      gl_cv_cc_double_expbit0="unknown" ;;
16386  esac
16387
16388
16389 fi
16390 rm -f conftest*
16391
16392
16393 else
16394   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16395 /* end confdefs.h.  */
16396
16397 #include <float.h>
16398 #include <stddef.h>
16399 #include <stdio.h>
16400 #include <string.h>
16401 #define NWORDS \
16402   ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
16403 typedef union { double value; unsigned int word[NWORDS]; } memory_double;
16404 static unsigned int ored_words[NWORDS];
16405 static unsigned int anded_words[NWORDS];
16406 static void add_to_ored_words (double x)
16407 {
16408   memory_double m;
16409   size_t i;
16410   /* Clear it first, in case sizeof (double) < sizeof (memory_double).  */
16411   memset (&m, 0, sizeof (memory_double));
16412   m.value = x;
16413   for (i = 0; i < NWORDS; i++)
16414     {
16415       ored_words[i] |= m.word[i];
16416       anded_words[i] &= m.word[i];
16417     }
16418 }
16419 int main ()
16420 {
16421   size_t j;
16422   FILE *fp = fopen ("conftest.out", "w");
16423   if (fp == NULL)
16424     return 1;
16425   for (j = 0; j < NWORDS; j++)
16426     anded_words[j] = ~ (unsigned int) 0;
16427   add_to_ored_words (0.25);
16428   add_to_ored_words (0.5);
16429   add_to_ored_words (1.0);
16430   add_to_ored_words (2.0);
16431   add_to_ored_words (4.0);
16432   /* Remove bits that are common (e.g. if representation of the first mantissa
16433      bit is explicit).  */
16434   for (j = 0; j < NWORDS; j++)
16435     ored_words[j] &= ~anded_words[j];
16436   /* Now find the nonzero word.  */
16437   for (j = 0; j < NWORDS; j++)
16438     if (ored_words[j] != 0)
16439       break;
16440   if (j < NWORDS)
16441     {
16442       size_t i;
16443       for (i = j + 1; i < NWORDS; i++)
16444         if (ored_words[i] != 0)
16445           {
16446             fprintf (fp, "unknown");
16447             return (fclose (fp) != 0);
16448           }
16449       for (i = 0; ; i++)
16450         if ((ored_words[j] >> i) & 1)
16451           {
16452             fprintf (fp, "word %d bit %d", (int) j, (int) i);
16453             return (fclose (fp) != 0);
16454           }
16455     }
16456   fprintf (fp, "unknown");
16457   return (fclose (fp) != 0);
16458 }
16459
16460 _ACEOF
16461 if ac_fn_c_try_run "$LINENO"; then :
16462   gl_cv_cc_double_expbit0=`cat conftest.out`
16463 else
16464   gl_cv_cc_double_expbit0="unknown"
16465 fi
16466 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16467   conftest.$ac_objext conftest.beam conftest.$ac_ext
16468 fi
16469
16470       rm -f conftest.out
16471
16472 fi
16473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
16474 $as_echo "$gl_cv_cc_double_expbit0" >&6; }
16475   case "$gl_cv_cc_double_expbit0" in
16476     word*bit*)
16477       word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
16478       bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
16479
16480 cat >>confdefs.h <<_ACEOF
16481 #define DBL_EXPBIT0_WORD $word
16482 _ACEOF
16483
16484
16485 cat >>confdefs.h <<_ACEOF
16486 #define DBL_EXPBIT0_BIT $bit
16487 _ACEOF
16488
16489       ;;
16490   esac
16491
16492
16493
16494
16495
16496
16497   for ac_func in snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb
16498 do :
16499   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16500 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16501 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16502   cat >>confdefs.h <<_ACEOF
16503 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16504 _ACEOF
16505
16506 fi
16507 done
16508
16509       ac_fn_c_check_decl "$LINENO" "_snprintf" "ac_cv_have_decl__snprintf" "#include <stdio.h>
16510 "
16511 if test "x$ac_cv_have_decl__snprintf" = xyes; then :
16512   ac_have_decl=1
16513 else
16514   ac_have_decl=0
16515 fi
16516
16517 cat >>confdefs.h <<_ACEOF
16518 #define HAVE_DECL__SNPRINTF $ac_have_decl
16519 _ACEOF
16520
16521
16522
16523   case "$gl_cv_func_snprintf_retval_c99" in
16524     *yes)
16525
16526 $as_echo "#define HAVE_SNPRINTF_RETVAL_C99 1" >>confdefs.h
16527
16528       ;;
16529   esac
16530
16531 ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
16532 if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
16533   ac_have_decl=1
16534 else
16535   ac_have_decl=0
16536 fi
16537
16538 cat >>confdefs.h <<_ACEOF
16539 #define HAVE_DECL_VSNPRINTF $ac_have_decl
16540 _ACEOF
16541
16542
16543
16544
16545
16546
16547    if false; then
16548   GL_COND_LIBTOOL_TRUE=
16549   GL_COND_LIBTOOL_FALSE='#'
16550 else
16551   GL_COND_LIBTOOL_TRUE='#'
16552   GL_COND_LIBTOOL_FALSE=
16553 fi
16554
16555   gl_cond_libtool=false
16556   gl_libdeps=
16557   gl_ltlibdeps=
16558   gl_m4_base='m4'
16559
16560
16561
16562
16563
16564
16565
16566
16567
16568   gl_source_base='gnu'
16569
16570
16571   if test $ac_cv_func_alloca_works = no; then
16572     :
16573   fi
16574
16575   # Define an additional variable used in the Makefile substitution.
16576   if test $ac_cv_working_alloca_h = yes; then
16577     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
16578 $as_echo_n "checking for alloca as a compiler built-in... " >&6; }
16579 if ${gl_cv_rpl_alloca+:} false; then :
16580   $as_echo_n "(cached) " >&6
16581 else
16582
16583       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16584 /* end confdefs.h.  */
16585
16586 #if defined __GNUC__ || defined _AIX || defined _MSC_VER
16587         Need own alloca
16588 #endif
16589
16590 _ACEOF
16591 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16592   $EGREP "Need own alloca" >/dev/null 2>&1; then :
16593   gl_cv_rpl_alloca=yes
16594 else
16595   gl_cv_rpl_alloca=no
16596 fi
16597 rm -f conftest*
16598
16599
16600 fi
16601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
16602 $as_echo "$gl_cv_rpl_alloca" >&6; }
16603     if test $gl_cv_rpl_alloca = yes; then
16604
16605 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
16606
16607       ALLOCA_H=alloca.h
16608     else
16609                   ALLOCA_H=
16610     fi
16611   else
16612     ALLOCA_H=alloca.h
16613   fi
16614
16615    if test -n "$ALLOCA_H"; then
16616   GL_GENERATE_ALLOCA_H_TRUE=
16617   GL_GENERATE_ALLOCA_H_FALSE='#'
16618 else
16619   GL_GENERATE_ALLOCA_H_TRUE='#'
16620   GL_GENERATE_ALLOCA_H_FALSE=
16621 fi
16622
16623
16624
16625
16626 cat >>confdefs.h <<_ACEOF
16627 #define GNULIB_AREADLINKAT 1
16628 _ACEOF
16629
16630
16631
16632
16633
16634
16635
16636   ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
16637 "
16638 if test "x$ac_cv_have_decl_program_invocation_name" = xyes; then :
16639   ac_have_decl=1
16640 else
16641   ac_have_decl=0
16642 fi
16643
16644 cat >>confdefs.h <<_ACEOF
16645 #define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl
16646 _ACEOF
16647 if test $ac_have_decl = 1; then :
16648
16649 else
16650
16651 $as_echo "#define GNULIB_PROGRAM_INVOCATION_NAME 1" >>confdefs.h
16652
16653 fi
16654
16655   ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
16656 "
16657 if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes; then :
16658   ac_have_decl=1
16659 else
16660   ac_have_decl=0
16661 fi
16662
16663 cat >>confdefs.h <<_ACEOF
16664 #define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl
16665 _ACEOF
16666 if test $ac_have_decl = 1; then :
16667
16668 else
16669
16670 $as_echo "#define GNULIB_PROGRAM_INVOCATION_SHORT_NAME 1" >>confdefs.h
16671
16672 fi
16673
16674
16675   # Check if program_invocation_name and program_invocation_short_name
16676   # are defined elsewhere. It is improbable that only one of them will
16677   # be defined and other not, I prefer to stay on the safe side and to
16678   # test each one separately.
16679   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether program_invocation_name is defined" >&5
16680 $as_echo_n "checking whether program_invocation_name is defined... " >&6; }
16681   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16682 /* end confdefs.h.  */
16683 #include <argp.h>
16684 int
16685 main ()
16686 {
16687 program_invocation_name = "test";
16688   ;
16689   return 0;
16690 }
16691 _ACEOF
16692 if ac_fn_c_try_link "$LINENO"; then :
16693
16694 $as_echo "#define HAVE_PROGRAM_INVOCATION_NAME 1" >>confdefs.h
16695
16696                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16697 $as_echo "yes" >&6; }
16698 else
16699   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16700 $as_echo "no" >&6; }
16701 fi
16702 rm -f core conftest.err conftest.$ac_objext \
16703     conftest$ac_exeext conftest.$ac_ext
16704
16705   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether program_invocation_short_name is defined" >&5
16706 $as_echo_n "checking whether program_invocation_short_name is defined... " >&6; }
16707   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16708 /* end confdefs.h.  */
16709 #include <argp.h>
16710 int
16711 main ()
16712 {
16713 program_invocation_short_name = "test";
16714   ;
16715   return 0;
16716 }
16717 _ACEOF
16718 if ac_fn_c_try_link "$LINENO"; then :
16719
16720 $as_echo "#define HAVE_PROGRAM_INVOCATION_SHORT_NAME 1" >>confdefs.h
16721
16722                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16723 $as_echo "yes" >&6; }
16724 else
16725   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16726 $as_echo "no" >&6; }
16727 fi
16728 rm -f core conftest.err conftest.$ac_objext \
16729     conftest$ac_exeext conftest.$ac_ext
16730
16731
16732
16733
16734
16735
16736
16737
16738
16739
16740
16741
16742
16743
16744
16745
16746
16747
16748
16749   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=argp_error:2:c-format"
16750
16751
16752
16753   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=argp_failure:4:c-format"
16754
16755
16756
16757
16758
16759
16760
16761
16762
16763   gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext"
16764
16765
16766
16767
16768
16769
16770
16771
16772
16773
16774
16775
16776   if test $ac_cv_func_btowc = no; then
16777     HAVE_BTOWC=0
16778   else
16779
16780
16781
16782
16783         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(0) is correct" >&5
16784 $as_echo_n "checking whether btowc(0) is correct... " >&6; }
16785 if ${gl_cv_func_btowc_nul+:} false; then :
16786   $as_echo_n "(cached) " >&6
16787 else
16788
16789         if test "$cross_compiling" = yes; then :
16790
16791            case "$host_os" in
16792                       # Guess no on Cygwin.
16793              cygwin*) gl_cv_func_btowc_nul="guessing no" ;;
16794                       # Guess yes otherwise.
16795              *)       gl_cv_func_btowc_nul="guessing yes" ;;
16796            esac
16797
16798 else
16799   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16800 /* end confdefs.h.  */
16801
16802 #include <string.h>
16803 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
16804    <wchar.h>.
16805    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
16806    included before <wchar.h>.  */
16807 #include <stddef.h>
16808 #include <stdio.h>
16809 #include <time.h>
16810 #include <wchar.h>
16811 int main ()
16812 {
16813   if (btowc ('\0') != 0)
16814     return 1;
16815   return 0;
16816 }
16817 _ACEOF
16818 if ac_fn_c_try_run "$LINENO"; then :
16819   gl_cv_func_btowc_nul=yes
16820 else
16821   gl_cv_func_btowc_nul=no
16822 fi
16823 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16824   conftest.$ac_objext conftest.beam conftest.$ac_ext
16825 fi
16826
16827
16828 fi
16829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_nul" >&5
16830 $as_echo "$gl_cv_func_btowc_nul" >&6; }
16831
16832         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(EOF) is correct" >&5
16833 $as_echo_n "checking whether btowc(EOF) is correct... " >&6; }
16834 if ${gl_cv_func_btowc_eof+:} false; then :
16835   $as_echo_n "(cached) " >&6
16836 else
16837
16838                         case "$host_os" in
16839                  # Guess no on IRIX.
16840           irix*) gl_cv_func_btowc_eof="guessing no" ;;
16841                  # Guess yes otherwise.
16842           *)     gl_cv_func_btowc_eof="guessing yes" ;;
16843         esac
16844         if test $LOCALE_FR != none; then
16845           if test "$cross_compiling" = yes; then :
16846   :
16847 else
16848   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16849 /* end confdefs.h.  */
16850
16851 #include <locale.h>
16852 #include <string.h>
16853 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
16854    <wchar.h>.
16855    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
16856    included before <wchar.h>.  */
16857 #include <stddef.h>
16858 #include <stdio.h>
16859 #include <time.h>
16860 #include <wchar.h>
16861 int main ()
16862 {
16863   if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
16864     {
16865       if (btowc (EOF) != WEOF)
16866         return 1;
16867     }
16868   return 0;
16869 }
16870 _ACEOF
16871 if ac_fn_c_try_run "$LINENO"; then :
16872   gl_cv_func_btowc_eof=yes
16873 else
16874   gl_cv_func_btowc_eof=no
16875 fi
16876 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16877   conftest.$ac_objext conftest.beam conftest.$ac_ext
16878 fi
16879
16880         fi
16881
16882 fi
16883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_eof" >&5
16884 $as_echo "$gl_cv_func_btowc_eof" >&6; }
16885
16886     case "$gl_cv_func_btowc_nul" in
16887       *yes) ;;
16888       *) REPLACE_BTOWC=1 ;;
16889     esac
16890     case "$gl_cv_func_btowc_eof" in
16891       *yes) ;;
16892       *) REPLACE_BTOWC=1 ;;
16893     esac
16894   fi
16895
16896   if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then
16897
16898
16899
16900
16901
16902
16903
16904
16905   gl_LIBOBJS="$gl_LIBOBJS btowc.$ac_objext"
16906
16907
16908   :
16909
16910   fi
16911
16912
16913
16914
16915
16916           GNULIB_BTOWC=1
16917
16918
16919
16920
16921
16922 $as_echo "#define GNULIB_TEST_BTOWC 1" >>confdefs.h
16923
16924
16925
16926
16927
16928
16929   if test $ac_cv_func_canonicalize_file_name = no; then
16930     HAVE_CANONICALIZE_FILE_NAME=0
16931     if test $ac_cv_func_realpath = no; then
16932       HAVE_REALPATH=0
16933     else
16934       case "$gl_cv_func_realpath_works" in
16935         *yes) ;;
16936         *)    REPLACE_REALPATH=1 ;;
16937       esac
16938     fi
16939   else
16940     case "$gl_cv_func_realpath_works" in
16941       *yes)
16942         ;;
16943       *)
16944         REPLACE_CANONICALIZE_FILE_NAME=1
16945         REPLACE_REALPATH=1
16946         ;;
16947     esac
16948   fi
16949
16950   if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then
16951
16952
16953
16954
16955
16956
16957
16958
16959   gl_LIBOBJS="$gl_LIBOBJS canonicalize-lgpl.$ac_objext"
16960
16961   fi
16962
16963
16964 cat >>confdefs.h <<_ACEOF
16965 #define GNULIB_CANONICALIZE_LGPL 1
16966 _ACEOF
16967
16968
16969
16970
16971
16972
16973
16974           GNULIB_CANONICALIZE_FILE_NAME=1
16975
16976
16977
16978
16979
16980 $as_echo "#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1" >>confdefs.h
16981
16982
16983
16984
16985
16986
16987
16988
16989           GNULIB_REALPATH=1
16990
16991
16992
16993
16994
16995 $as_echo "#define GNULIB_TEST_REALPATH 1" >>confdefs.h
16996
16997
16998
16999
17000
17001
17002
17003
17004
17005           GNULIB_CHDIR=1
17006
17007
17008
17009
17010
17011 $as_echo "#define GNULIB_TEST_CHDIR 1" >>confdefs.h
17012
17013
17014
17015
17016
17017   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether this system has an arbitrary file name length limit" >&5
17018 $as_echo_n "checking whether this system has an arbitrary file name length limit... " >&6; }
17019 if ${gl_cv_have_arbitrary_file_name_length_limit+:} false; then :
17020   $as_echo_n "(cached) " >&6
17021 else
17022   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17023 /* end confdefs.h.  */
17024
17025 /* Arrange to define PATH_MAX, like "pathmax.h" does. */
17026 #if HAVE_UNISTD_H
17027 # include <unistd.h>
17028 #endif
17029 #include <limits.h>
17030 #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
17031 # include <sys/param.h>
17032 #endif
17033 #if !defined PATH_MAX && defined MAXPATHLEN
17034 # define PATH_MAX MAXPATHLEN
17035 #endif
17036 #ifdef __hpux
17037 # undef PATH_MAX
17038 # define PATH_MAX 1024
17039 #endif
17040 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
17041 # undef PATH_MAX
17042 # define PATH_MAX 260
17043 #endif
17044
17045 #ifdef PATH_MAX
17046 have_arbitrary_file_name_length_limit
17047 #endif
17048 _ACEOF
17049 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17050   $EGREP "have_arbitrary_file_name_length_limit" >/dev/null 2>&1; then :
17051   gl_cv_have_arbitrary_file_name_length_limit=yes
17052 else
17053   gl_cv_have_arbitrary_file_name_length_limit=no
17054 fi
17055 rm -f conftest*
17056
17057 fi
17058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_arbitrary_file_name_length_limit" >&5
17059 $as_echo "$gl_cv_have_arbitrary_file_name_length_limit" >&6; }
17060
17061   if test $gl_cv_have_arbitrary_file_name_length_limit = yes; then
17062
17063
17064
17065
17066
17067
17068
17069
17070   gl_LIBOBJS="$gl_LIBOBJS chdir-long.$ac_objext"
17071
17072     :
17073   fi
17074
17075   if test $HAVE_CHOWN = 0 || test $REPLACE_CHOWN = 1; then
17076
17077
17078
17079
17080
17081
17082
17083
17084   gl_LIBOBJS="$gl_LIBOBJS chown.$ac_objext"
17085
17086   fi
17087   if test $REPLACE_CHOWN = 1 && test $ac_cv_func_fchown = no; then
17088
17089
17090
17091
17092
17093
17094
17095
17096   gl_LIBOBJS="$gl_LIBOBJS fchown-stub.$ac_objext"
17097
17098   fi
17099
17100
17101
17102
17103
17104           GNULIB_CHOWN=1
17105
17106
17107
17108
17109
17110 $as_echo "#define GNULIB_TEST_CHOWN 1" >>confdefs.h
17111
17112
17113
17114
17115
17116
17117   # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
17118   # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
17119
17120   # Save and restore LIBS so e.g., -lrt, isn't added to it.  Otherwise, *all*
17121   # programs in the package would end up linked with that potentially-shared
17122   # library, inducing unnecessary run-time overhead.
17123   LIB_CLOCK_GETTIME=
17124
17125   gl_saved_libs=$LIBS
17126     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
17127 $as_echo_n "checking for library containing clock_gettime... " >&6; }
17128 if ${ac_cv_search_clock_gettime+:} false; then :
17129   $as_echo_n "(cached) " >&6
17130 else
17131   ac_func_search_save_LIBS=$LIBS
17132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17133 /* end confdefs.h.  */
17134
17135 /* Override any GCC internal prototype to avoid an error.
17136    Use char because int might match the return type of a GCC
17137    builtin and then its argument prototype would still apply.  */
17138 #ifdef __cplusplus
17139 extern "C"
17140 #endif
17141 char clock_gettime ();
17142 int
17143 main ()
17144 {
17145 return clock_gettime ();
17146   ;
17147   return 0;
17148 }
17149 _ACEOF
17150 for ac_lib in '' rt posix4; do
17151   if test -z "$ac_lib"; then
17152     ac_res="none required"
17153   else
17154     ac_res=-l$ac_lib
17155     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17156   fi
17157   if ac_fn_c_try_link "$LINENO"; then :
17158   ac_cv_search_clock_gettime=$ac_res
17159 fi
17160 rm -f core conftest.err conftest.$ac_objext \
17161     conftest$ac_exeext
17162   if ${ac_cv_search_clock_gettime+:} false; then :
17163   break
17164 fi
17165 done
17166 if ${ac_cv_search_clock_gettime+:} false; then :
17167
17168 else
17169   ac_cv_search_clock_gettime=no
17170 fi
17171 rm conftest.$ac_ext
17172 LIBS=$ac_func_search_save_LIBS
17173 fi
17174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
17175 $as_echo "$ac_cv_search_clock_gettime" >&6; }
17176 ac_res=$ac_cv_search_clock_gettime
17177 if test "$ac_res" != no; then :
17178   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17179   test "$ac_cv_search_clock_gettime" = "none required" ||
17180                     LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime
17181 fi
17182
17183     for ac_func in clock_gettime clock_settime
17184 do :
17185   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17186 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17187 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17188   cat >>confdefs.h <<_ACEOF
17189 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17190 _ACEOF
17191
17192 fi
17193 done
17194
17195   LIBS=$gl_saved_libs
17196
17197
17198
17199 $as_echo "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h
17200
17201
17202
17203
17204
17205   if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
17206     REPLACE_CLOSE=1
17207   fi
17208
17209
17210
17211
17212
17213   if test $ac_cv_header_sys_socket_h != yes; then
17214                     for ac_header in winsock2.h
17215 do :
17216   ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
17217 if test "x$ac_cv_header_winsock2_h" = xyes; then :
17218   cat >>confdefs.h <<_ACEOF
17219 #define HAVE_WINSOCK2_H 1
17220 _ACEOF
17221
17222 fi
17223
17224 done
17225
17226   fi
17227   if test "$ac_cv_header_winsock2_h" = yes; then
17228     HAVE_WINSOCK2_H=1
17229     UNISTD_H_HAVE_WINSOCK2_H=1
17230     SYS_IOCTL_H_HAVE_WINSOCK2_H=1
17231   else
17232     HAVE_WINSOCK2_H=0
17233   fi
17234
17235
17236     if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
17237                         REPLACE_CLOSE=1
17238     fi
17239
17240
17241     if test $REPLACE_CLOSE = 0; then
17242
17243
17244
17245   if test $ac_cv_func_fchdir = no; then
17246     HAVE_FCHDIR=0
17247   fi
17248
17249       if test $HAVE_FCHDIR = 0; then
17250         REPLACE_CLOSE=1
17251       fi
17252     fi
17253
17254
17255   if test $REPLACE_CLOSE = 1; then
17256
17257
17258
17259
17260
17261
17262
17263
17264   gl_LIBOBJS="$gl_LIBOBJS close.$ac_objext"
17265
17266   fi
17267
17268
17269
17270
17271
17272           GNULIB_CLOSE=1
17273
17274
17275
17276
17277
17278 $as_echo "#define GNULIB_TEST_CLOSE 1" >>confdefs.h
17279
17280
17281
17282
17283   :
17284
17285
17286
17287 cat >>confdefs.h <<_ACEOF
17288 #define GNULIB_CLOSE_STREAM 1
17289 _ACEOF
17290
17291
17292
17293
17294
17295   for ac_func in closedir
17296 do :
17297   ac_fn_c_check_func "$LINENO" "closedir" "ac_cv_func_closedir"
17298 if test "x$ac_cv_func_closedir" = xyes; then :
17299   cat >>confdefs.h <<_ACEOF
17300 #define HAVE_CLOSEDIR 1
17301 _ACEOF
17302
17303 fi
17304 done
17305
17306   if test $ac_cv_func_closedir = no; then
17307     HAVE_CLOSEDIR=0
17308   fi
17309
17310
17311
17312
17313   if test $ac_cv_func_fchdir = no; then
17314     HAVE_FCHDIR=0
17315   fi
17316
17317     if test $HAVE_FCHDIR = 0; then
17318       if test $HAVE_CLOSEDIR = 1; then
17319         REPLACE_CLOSEDIR=1
17320       fi
17321     fi
17322
17323
17324   if test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1; then
17325
17326
17327
17328
17329
17330
17331
17332
17333   gl_LIBOBJS="$gl_LIBOBJS closedir.$ac_objext"
17334
17335   fi
17336
17337
17338
17339
17340
17341           GNULIB_CLOSEDIR=1
17342
17343
17344
17345
17346
17347 $as_echo "#define GNULIB_TEST_CLOSEDIR 1" >>confdefs.h
17348
17349
17350
17351
17352   :
17353
17354
17355           if test "x$datarootdir" = x; then
17356     datarootdir='${datadir}'
17357
17358   fi
17359     if test "x$docdir" = x; then
17360     docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
17361
17362   fi
17363     if test "x$htmldir" = x; then
17364     htmldir='${docdir}'
17365
17366   fi
17367   if test "x$dvidir" = x; then
17368     dvidir='${docdir}'
17369
17370   fi
17371   if test "x$pdfdir" = x; then
17372     pdfdir='${docdir}'
17373
17374   fi
17375   if test "x$psdir" = x; then
17376     psdir='${docdir}'
17377
17378   fi
17379   if test "x$lispdir" = x; then
17380     lispdir='${datarootdir}/emacs/site-lisp'
17381
17382   fi
17383   if test "x$localedir" = x; then
17384     localedir='${datarootdir}/locale'
17385
17386   fi
17387     if test "x$runstatedir" = x; then
17388     runstatedir='${localstatedir}/run'
17389
17390   fi
17391
17392       pkglibexecdir='${libexecdir}/${PACKAGE}'
17393
17394
17395       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_ino member in directory struct" >&5
17396 $as_echo_n "checking for d_ino member in directory struct... " >&6; }
17397 if ${gl_cv_struct_dirent_d_ino+:} false; then :
17398   $as_echo_n "(cached) " >&6
17399 else
17400   if test "$cross_compiling" = yes; then :
17401   case "$host_os" in
17402                            # Guess yes on glibc systems with Linux kernel.
17403               linux*-gnu*) gl_cv_struct_dirent_d_ino="guessing yes" ;;
17404                            # If we don't know, assume the worst.
17405               *)           gl_cv_struct_dirent_d_ino="guessing no" ;;
17406             esac
17407
17408 else
17409   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17410 /* end confdefs.h.  */
17411 #include <sys/types.h>
17412              #include <sys/stat.h>
17413              #include <dirent.h>
17414
17415 int
17416 main ()
17417 {
17418 DIR *dp = opendir (".");
17419              struct dirent *e;
17420              struct stat st;
17421              if (! dp)
17422                return 1;
17423              e = readdir (dp);
17424              if (! e)
17425                return 2;
17426              if (lstat (e->d_name, &st) != 0)
17427                return 3;
17428              if (e->d_ino != st.st_ino)
17429                return 4;
17430              return 0;
17431
17432   ;
17433   return 0;
17434 }
17435 _ACEOF
17436 if ac_fn_c_try_run "$LINENO"; then :
17437   gl_cv_struct_dirent_d_ino=yes
17438 else
17439   gl_cv_struct_dirent_d_ino=no
17440 fi
17441 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17442   conftest.$ac_objext conftest.beam conftest.$ac_ext
17443 fi
17444
17445 fi
17446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_ino" >&5
17447 $as_echo "$gl_cv_struct_dirent_d_ino" >&6; }
17448    case "$gl_cv_struct_dirent_d_ino" in
17449      *yes)
17450
17451 $as_echo "#define D_INO_IN_DIRENT 1" >>confdefs.h
17452
17453        ;;
17454    esac
17455
17456
17457
17458
17459
17460
17461
17462
17463
17464
17465
17466
17467
17468
17469      if test $gl_cv_have_include_next = yes; then
17470        gl_cv_next_dirent_h='<'dirent.h'>'
17471      else
17472        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
17473 $as_echo_n "checking absolute name of <dirent.h>... " >&6; }
17474 if ${gl_cv_next_dirent_h+:} false; then :
17475   $as_echo_n "(cached) " >&6
17476 else
17477
17478              if test $ac_cv_header_dirent_h = yes; then
17479
17480
17481
17482
17483   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17484 /* end confdefs.h.  */
17485 #include <dirent.h>
17486 _ACEOF
17487                 case "$host_os" in
17488     aix*) gl_absname_cpp="$ac_cpp -C" ;;
17489     *)    gl_absname_cpp="$ac_cpp" ;;
17490   esac
17491
17492   case "$host_os" in
17493     mingw*)
17494                                           gl_dirsep_regex='[/\\]'
17495       ;;
17496     *)
17497       gl_dirsep_regex='\/'
17498       ;;
17499   esac
17500       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17501   gl_header_literal_regex=`echo 'dirent.h' \
17502                            | sed -e "$gl_make_literal_regex_sed"`
17503   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17504       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17505       s|^/[^/]|//&|
17506       p
17507       q
17508     }'
17509
17510         gl_cv_absolute_dirent_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17511   sed -n "$gl_absolute_header_sed"`
17512
17513            gl_header=$gl_cv_absolute_dirent_h
17514            gl_cv_next_dirent_h='"'$gl_header'"'
17515           else
17516                gl_cv_next_dirent_h='<'dirent.h'>'
17517              fi
17518
17519
17520 fi
17521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
17522 $as_echo "$gl_cv_next_dirent_h" >&6; }
17523      fi
17524      NEXT_DIRENT_H=$gl_cv_next_dirent_h
17525
17526      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17527        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17528        gl_next_as_first_directive='<'dirent.h'>'
17529      else
17530        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17531        gl_next_as_first_directive=$gl_cv_next_dirent_h
17532      fi
17533      NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive
17534
17535
17536
17537
17538   if test $ac_cv_header_dirent_h = yes; then
17539     HAVE_DIRENT_H=1
17540   else
17541     HAVE_DIRENT_H=0
17542   fi
17543
17544
17545
17546     for gl_func in alphasort closedir dirfd fdopendir opendir readdir rewinddir scandir; do
17547     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
17548     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
17549 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
17550 if eval \${$as_gl_Symbol+:} false; then :
17551   $as_echo_n "(cached) " >&6
17552 else
17553   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17554 /* end confdefs.h.  */
17555 #include <dirent.h>
17556
17557 int
17558 main ()
17559 {
17560 #undef $gl_func
17561   (void) $gl_func;
17562   ;
17563   return 0;
17564 }
17565 _ACEOF
17566 if ac_fn_c_try_compile "$LINENO"; then :
17567   eval "$as_gl_Symbol=yes"
17568 else
17569   eval "$as_gl_Symbol=no"
17570 fi
17571 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17572 fi
17573 eval ac_res=\$$as_gl_Symbol
17574                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17575 $as_echo "$ac_res" >&6; }
17576     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
17577   cat >>confdefs.h <<_ACEOF
17578 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
17579 _ACEOF
17580
17581                      eval ac_cv_have_decl_$gl_func=yes
17582 fi
17583       done
17584
17585
17586
17587
17588
17589
17590
17591 cat >>confdefs.h <<_ACEOF
17592 #define GNULIB_DIRENT_SAFER 1
17593 _ACEOF
17594
17595
17596
17597
17598
17599
17600
17601   for ac_func in dirfd
17602 do :
17603   ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd"
17604 if test "x$ac_cv_func_dirfd" = xyes; then :
17605   cat >>confdefs.h <<_ACEOF
17606 #define HAVE_DIRFD 1
17607 _ACEOF
17608
17609 fi
17610 done
17611
17612   ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
17613       #include <dirent.h>
17614 "
17615 if test "x$ac_cv_have_decl_dirfd" = xyes; then :
17616   ac_have_decl=1
17617 else
17618   ac_have_decl=0
17619 fi
17620
17621 cat >>confdefs.h <<_ACEOF
17622 #define HAVE_DECL_DIRFD $ac_have_decl
17623 _ACEOF
17624
17625   if test $ac_cv_have_decl_dirfd = no; then
17626     HAVE_DECL_DIRFD=0
17627   fi
17628
17629   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dirfd is a macro" >&5
17630 $as_echo_n "checking whether dirfd is a macro... " >&6; }
17631 if ${gl_cv_func_dirfd_macro+:} false; then :
17632   $as_echo_n "(cached) " >&6
17633 else
17634   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17635 /* end confdefs.h.  */
17636
17637 #include <sys/types.h>
17638 #include <dirent.h>
17639 #ifdef dirfd
17640  dirent_header_defines_dirfd
17641 #endif
17642 _ACEOF
17643 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17644   $EGREP "dirent_header_defines_dirfd" >/dev/null 2>&1; then :
17645   gl_cv_func_dirfd_macro=yes
17646 else
17647   gl_cv_func_dirfd_macro=no
17648 fi
17649 rm -f conftest*
17650
17651 fi
17652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dirfd_macro" >&5
17653 $as_echo "$gl_cv_func_dirfd_macro" >&6; }
17654
17655   # Use the replacement only if we have no function or macro with that name.
17656   if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no; then
17657     if test $ac_cv_have_decl_dirfd = yes; then
17658       # If the system declares dirfd already, let's declare rpl_dirfd instead.
17659       REPLACE_DIRFD=1
17660     fi
17661   fi
17662
17663   if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no; then
17664
17665
17666
17667
17668
17669
17670
17671
17672   gl_LIBOBJS="$gl_LIBOBJS dirfd.$ac_objext"
17673
17674
17675   { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get the file descriptor associated with an open DIR*" >&5
17676 $as_echo_n "checking how to get the file descriptor associated with an open DIR*... " >&6; }
17677 if ${gl_cv_sys_dir_fd_member_name+:} false; then :
17678   $as_echo_n "(cached) " >&6
17679 else
17680
17681       dirfd_save_CFLAGS=$CFLAGS
17682       for ac_expr in d_fd dd_fd; do
17683
17684         CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr"
17685         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17686 /* end confdefs.h.  */
17687
17688            #include <sys/types.h>
17689            #include <dirent.h>
17690 int
17691 main ()
17692 {
17693 DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;
17694   ;
17695   return 0;
17696 }
17697 _ACEOF
17698 if ac_fn_c_try_compile "$LINENO"; then :
17699   dir_fd_found=yes
17700
17701 fi
17702 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17703         CFLAGS=$dirfd_save_CFLAGS
17704         test "$dir_fd_found" = yes && break
17705       done
17706       test "$dir_fd_found" = yes || ac_expr=no_such_member
17707
17708       gl_cv_sys_dir_fd_member_name=$ac_expr
17709
17710
17711 fi
17712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_dir_fd_member_name" >&5
17713 $as_echo "$gl_cv_sys_dir_fd_member_name" >&6; }
17714   if test $gl_cv_sys_dir_fd_member_name != no_such_member; then
17715
17716 cat >>confdefs.h <<_ACEOF
17717 #define DIR_FD_MEMBER_NAME $gl_cv_sys_dir_fd_member_name
17718 _ACEOF
17719
17720   fi
17721
17722
17723   fi
17724
17725
17726
17727
17728
17729           GNULIB_DIRFD=1
17730
17731
17732
17733
17734
17735 $as_echo "#define GNULIB_TEST_DIRFD 1" >>confdefs.h
17736
17737
17738
17739
17740
17741
17742
17743
17744 cat >>confdefs.h <<_ACEOF
17745 #define GNULIB_DIRNAME 1
17746 _ACEOF
17747
17748
17749
17750
17751
17752
17753
17754
17755   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
17756 $as_echo_n "checking whether // is distinct from /... " >&6; }
17757 if ${gl_cv_double_slash_root+:} false; then :
17758   $as_echo_n "(cached) " >&6
17759 else
17760    if test x"$cross_compiling" = xyes ; then
17761         # When cross-compiling, there is no way to tell whether // is special
17762         # short of a list of hosts.  However, the only known hosts to date
17763         # that have a distinct // are Apollo DomainOS (too old to port to),
17764         # Cygwin, and z/OS.  If anyone knows of another system for which // has
17765         # special semantics and is distinct from /, please report it to
17766         # <bug-gnulib@gnu.org>.
17767         case $host in
17768           *-cygwin | i370-ibm-openedition)
17769             gl_cv_double_slash_root=yes ;;
17770           *)
17771             # Be optimistic and assume that / and // are the same when we
17772             # don't know.
17773             gl_cv_double_slash_root='unknown, assuming no' ;;
17774         esac
17775       else
17776         set x `ls -di / // 2>/dev/null`
17777         if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
17778           gl_cv_double_slash_root=no
17779         else
17780           gl_cv_double_slash_root=yes
17781         fi
17782       fi
17783 fi
17784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
17785 $as_echo "$gl_cv_double_slash_root" >&6; }
17786   if test "$gl_cv_double_slash_root" = yes; then
17787
17788 $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
17789
17790   fi
17791
17792
17793
17794
17795   if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
17796     REPLACE_DUP=1
17797   fi
17798
17799
17800
17801
17802   if test $ac_cv_func_fchdir = no; then
17803     HAVE_FCHDIR=0
17804   fi
17805
17806     if test $HAVE_FCHDIR = 0; then
17807       REPLACE_DUP=1
17808     fi
17809
17810
17811   if test $REPLACE_DUP = 1; then
17812
17813
17814
17815
17816
17817
17818
17819
17820   gl_LIBOBJS="$gl_LIBOBJS dup.$ac_objext"
17821
17822     :
17823   fi
17824
17825
17826
17827
17828
17829           GNULIB_DUP=1
17830
17831
17832
17833
17834
17835 $as_echo "#define GNULIB_TEST_DUP 1" >>confdefs.h
17836
17837
17838
17839
17840
17841
17842
17843
17844 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
17845
17846
17847   if test $HAVE_DUP2 = 1; then
17848     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
17849 $as_echo_n "checking whether dup2 works... " >&6; }
17850 if ${gl_cv_func_dup2_works+:} false; then :
17851   $as_echo_n "(cached) " >&6
17852 else
17853   if test "$cross_compiling" = yes; then :
17854   case "$host_os" in
17855            mingw*) # on this platform, dup2 always returns 0 for success
17856              gl_cv_func_dup2_works="guessing no" ;;
17857            cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
17858              gl_cv_func_dup2_works="guessing no" ;;
17859            linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a
17860                    # closed fd may yield -EBADF instead of -1 / errno=EBADF.
17861              gl_cv_func_dup2_works="guessing no" ;;
17862            freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF.
17863              gl_cv_func_dup2_works="guessing no" ;;
17864            haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
17865              gl_cv_func_dup2_works="guessing no" ;;
17866            *) gl_cv_func_dup2_works="guessing yes" ;;
17867          esac
17868 else
17869   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17870 /* end confdefs.h.  */
17871
17872          #include <unistd.h>
17873 #include <fcntl.h>
17874 #include <errno.h>
17875 int
17876 main ()
17877 {
17878 int result = 0;
17879 #ifdef FD_CLOEXEC
17880             if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
17881               result |= 1;
17882 #endif
17883             if (dup2 (1, 1) == 0)
17884               result |= 2;
17885 #ifdef FD_CLOEXEC
17886             if (fcntl (1, F_GETFD) != FD_CLOEXEC)
17887               result |= 4;
17888 #endif
17889             close (0);
17890             if (dup2 (0, 0) != -1)
17891               result |= 8;
17892             /* Many gnulib modules require POSIX conformance of EBADF.  */
17893             if (dup2 (2, 1000000) == -1 && errno != EBADF)
17894               result |= 16;
17895             /* Flush out some cygwin core dumps.  */
17896             if (dup2 (2, -1) != -1 || errno != EBADF)
17897               result |= 32;
17898             dup2 (2, 255);
17899             dup2 (2, 256);
17900             return result;
17901
17902   ;
17903   return 0;
17904 }
17905
17906 _ACEOF
17907 if ac_fn_c_try_run "$LINENO"; then :
17908   gl_cv_func_dup2_works=yes
17909 else
17910   gl_cv_func_dup2_works=no
17911 fi
17912 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17913   conftest.$ac_objext conftest.beam conftest.$ac_ext
17914 fi
17915
17916
17917 fi
17918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
17919 $as_echo "$gl_cv_func_dup2_works" >&6; }
17920     case "$gl_cv_func_dup2_works" in
17921       *yes) ;;
17922       *)
17923         REPLACE_DUP2=1
17924         for ac_func in setdtablesize
17925 do :
17926   ac_fn_c_check_func "$LINENO" "setdtablesize" "ac_cv_func_setdtablesize"
17927 if test "x$ac_cv_func_setdtablesize" = xyes; then :
17928   cat >>confdefs.h <<_ACEOF
17929 #define HAVE_SETDTABLESIZE 1
17930 _ACEOF
17931
17932 fi
17933 done
17934
17935         ;;
17936     esac
17937   fi
17938
17939
17940
17941
17942   if test $ac_cv_func_fchdir = no; then
17943     HAVE_FCHDIR=0
17944   fi
17945
17946     if test $HAVE_FCHDIR = 0; then
17947       if test $HAVE_DUP2 = 1; then
17948         REPLACE_DUP2=1
17949       fi
17950     fi
17951
17952
17953   if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
17954
17955
17956
17957
17958
17959
17960
17961
17962   gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
17963
17964
17965   fi
17966
17967
17968
17969
17970
17971           GNULIB_DUP2=1
17972
17973
17974
17975
17976
17977 $as_echo "#define GNULIB_TEST_DUP2 1" >>confdefs.h
17978
17979
17980
17981
17982
17983
17984
17985
17986
17987           GNULIB_ENVIRON=1
17988
17989
17990
17991
17992
17993 $as_echo "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h
17994
17995
17996
17997
17998
17999       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
18000 $as_echo_n "checking for error_at_line... " >&6; }
18001 if ${ac_cv_lib_error_at_line+:} false; then :
18002   $as_echo_n "(cached) " >&6
18003 else
18004   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18005 /* end confdefs.h.  */
18006 #include <error.h>
18007 int
18008 main ()
18009 {
18010 error_at_line (0, 0, "", 0, "an error occurred");
18011   ;
18012   return 0;
18013 }
18014 _ACEOF
18015 if ac_fn_c_try_link "$LINENO"; then :
18016   ac_cv_lib_error_at_line=yes
18017 else
18018   ac_cv_lib_error_at_line=no
18019 fi
18020 rm -f core conftest.err conftest.$ac_objext \
18021     conftest$ac_exeext conftest.$ac_ext
18022 fi
18023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
18024 $as_echo "$ac_cv_lib_error_at_line" >&6; }
18025
18026   if test $ac_cv_lib_error_at_line = no; then
18027
18028
18029
18030
18031
18032
18033
18034
18035   gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext"
18036
18037
18038
18039   :
18040
18041   fi
18042
18043
18044   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error:3:c-format"
18045
18046
18047
18048   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error_at_line:5:c-format"
18049
18050
18051
18052
18053
18054
18055   for ac_func in euidaccess
18056 do :
18057   ac_fn_c_check_func "$LINENO" "euidaccess" "ac_cv_func_euidaccess"
18058 if test "x$ac_cv_func_euidaccess" = xyes; then :
18059   cat >>confdefs.h <<_ACEOF
18060 #define HAVE_EUIDACCESS 1
18061 _ACEOF
18062
18063 fi
18064 done
18065
18066   if test $ac_cv_func_euidaccess = no; then
18067     HAVE_EUIDACCESS=0
18068   fi
18069
18070   if test $HAVE_EUIDACCESS = 0; then
18071
18072
18073
18074
18075
18076
18077
18078
18079   gl_LIBOBJS="$gl_LIBOBJS euidaccess.$ac_objext"
18080
18081
18082
18083     for ac_header in libgen.h
18084 do :
18085   ac_fn_c_check_header_mongrel "$LINENO" "libgen.h" "ac_cv_header_libgen_h" "$ac_includes_default"
18086 if test "x$ac_cv_header_libgen_h" = xyes; then :
18087   cat >>confdefs.h <<_ACEOF
18088 #define HAVE_LIBGEN_H 1
18089 _ACEOF
18090
18091 fi
18092
18093 done
18094
18095
18096         ac_fn_c_check_func "$LINENO" "getgroups" "ac_cv_func_getgroups"
18097 if test "x$ac_cv_func_getgroups" = xyes; then :
18098
18099 fi
18100
18101
18102   # If we don't yet have getgroups, see if it's in -lbsd.
18103   # This is reported to be necessary on an ITOS 3000WS running SEIUX 3.1.
18104   ac_save_LIBS=$LIBS
18105   if test $ac_cv_func_getgroups = no; then
18106     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getgroups in -lbsd" >&5
18107 $as_echo_n "checking for getgroups in -lbsd... " >&6; }
18108 if ${ac_cv_lib_bsd_getgroups+:} false; then :
18109   $as_echo_n "(cached) " >&6
18110 else
18111   ac_check_lib_save_LIBS=$LIBS
18112 LIBS="-lbsd  $LIBS"
18113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18114 /* end confdefs.h.  */
18115
18116 /* Override any GCC internal prototype to avoid an error.
18117    Use char because int might match the return type of a GCC
18118    builtin and then its argument prototype would still apply.  */
18119 #ifdef __cplusplus
18120 extern "C"
18121 #endif
18122 char getgroups ();
18123 int
18124 main ()
18125 {
18126 return getgroups ();
18127   ;
18128   return 0;
18129 }
18130 _ACEOF
18131 if ac_fn_c_try_link "$LINENO"; then :
18132   ac_cv_lib_bsd_getgroups=yes
18133 else
18134   ac_cv_lib_bsd_getgroups=no
18135 fi
18136 rm -f core conftest.err conftest.$ac_objext \
18137     conftest$ac_exeext conftest.$ac_ext
18138 LIBS=$ac_check_lib_save_LIBS
18139 fi
18140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_getgroups" >&5
18141 $as_echo "$ac_cv_lib_bsd_getgroups" >&6; }
18142 if test "x$ac_cv_lib_bsd_getgroups" = xyes; then :
18143   GETGROUPS_LIB=-lbsd
18144 fi
18145
18146   fi
18147
18148   # Run the program to test the functionality of the system-supplied
18149   # getgroups function only if there is such a function.
18150   if test $ac_cv_func_getgroups = yes; then
18151     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getgroups" >&5
18152 $as_echo_n "checking for working getgroups... " >&6; }
18153 if ${ac_cv_func_getgroups_works+:} false; then :
18154   $as_echo_n "(cached) " >&6
18155 else
18156   if test "$cross_compiling" = yes; then :
18157   case "$host_os" in # ((
18158                     # Guess yes on glibc systems.
18159             *-gnu*) ac_cv_func_getgroups_works="guessing yes" ;;
18160                     # If we don't know, assume the worst.
18161             *)      ac_cv_func_getgroups_works="guessing no" ;;
18162           esac
18163
18164 else
18165   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18166 /* end confdefs.h.  */
18167 $ac_includes_default
18168 int
18169 main ()
18170 {
18171 /* On Ultrix 4.3, getgroups (0, 0) always fails.  */
18172               return getgroups (0, 0) == -1;
18173   ;
18174   return 0;
18175 }
18176
18177 _ACEOF
18178 if ac_fn_c_try_run "$LINENO"; then :
18179   ac_cv_func_getgroups_works=yes
18180 else
18181   ac_cv_func_getgroups_works=no
18182 fi
18183 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18184   conftest.$ac_objext conftest.beam conftest.$ac_ext
18185 fi
18186
18187
18188 fi
18189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getgroups_works" >&5
18190 $as_echo "$ac_cv_func_getgroups_works" >&6; }
18191   else
18192     ac_cv_func_getgroups_works=no
18193   fi
18194   case "$ac_cv_func_getgroups_works" in
18195     *yes)
18196
18197 $as_echo "#define HAVE_GETGROUPS 1" >>confdefs.h
18198
18199       ;;
18200   esac
18201   LIBS=$ac_save_LIBS
18202
18203
18204   # Solaris 9 and 10 need -lgen to get the eaccess function.
18205   # Save and restore LIBS so -lgen isn't added to it.  Otherwise, *all*
18206   # programs in the package would end up linked with that potentially-shared
18207   # library, inducing unnecessary run-time overhead.
18208   LIB_EACCESS=
18209
18210   gl_saved_libs=$LIBS
18211     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing eaccess" >&5
18212 $as_echo_n "checking for library containing eaccess... " >&6; }
18213 if ${ac_cv_search_eaccess+:} false; then :
18214   $as_echo_n "(cached) " >&6
18215 else
18216   ac_func_search_save_LIBS=$LIBS
18217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18218 /* end confdefs.h.  */
18219
18220 /* Override any GCC internal prototype to avoid an error.
18221    Use char because int might match the return type of a GCC
18222    builtin and then its argument prototype would still apply.  */
18223 #ifdef __cplusplus
18224 extern "C"
18225 #endif
18226 char eaccess ();
18227 int
18228 main ()
18229 {
18230 return eaccess ();
18231   ;
18232   return 0;
18233 }
18234 _ACEOF
18235 for ac_lib in '' gen; do
18236   if test -z "$ac_lib"; then
18237     ac_res="none required"
18238   else
18239     ac_res=-l$ac_lib
18240     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
18241   fi
18242   if ac_fn_c_try_link "$LINENO"; then :
18243   ac_cv_search_eaccess=$ac_res
18244 fi
18245 rm -f core conftest.err conftest.$ac_objext \
18246     conftest$ac_exeext
18247   if ${ac_cv_search_eaccess+:} false; then :
18248   break
18249 fi
18250 done
18251 if ${ac_cv_search_eaccess+:} false; then :
18252
18253 else
18254   ac_cv_search_eaccess=no
18255 fi
18256 rm conftest.$ac_ext
18257 LIBS=$ac_func_search_save_LIBS
18258 fi
18259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_eaccess" >&5
18260 $as_echo "$ac_cv_search_eaccess" >&6; }
18261 ac_res=$ac_cv_search_eaccess
18262 if test "$ac_res" != no; then :
18263   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18264   test "$ac_cv_search_eaccess" = "none required" ||
18265                     LIB_EACCESS=$ac_cv_search_eaccess
18266 fi
18267
18268     for ac_func in eaccess
18269 do :
18270   ac_fn_c_check_func "$LINENO" "eaccess" "ac_cv_func_eaccess"
18271 if test "x$ac_cv_func_eaccess" = xyes; then :
18272   cat >>confdefs.h <<_ACEOF
18273 #define HAVE_EACCESS 1
18274 _ACEOF
18275
18276 fi
18277 done
18278
18279   LIBS=$gl_saved_libs
18280
18281   fi
18282
18283
18284
18285
18286
18287           GNULIB_EUIDACCESS=1
18288
18289
18290
18291
18292
18293 $as_echo "#define GNULIB_TEST_EUIDACCESS 1" >>confdefs.h
18294
18295
18296
18297
18298
18299
18300
18301
18302
18303
18304   if test $ac_cv_func_faccessat = no; then
18305     HAVE_FACCESSAT=0
18306   fi
18307
18308   if test $HAVE_FACCESSAT = 0; then
18309
18310
18311
18312
18313
18314
18315
18316
18317   gl_LIBOBJS="$gl_LIBOBJS faccessat.$ac_objext"
18318
18319
18320   for ac_func in access
18321 do :
18322   ac_fn_c_check_func "$LINENO" "access" "ac_cv_func_access"
18323 if test "x$ac_cv_func_access" = xyes; then :
18324   cat >>confdefs.h <<_ACEOF
18325 #define HAVE_ACCESS 1
18326 _ACEOF
18327
18328 fi
18329 done
18330
18331
18332   fi
18333
18334
18335 cat >>confdefs.h <<_ACEOF
18336 #define GNULIB_FACCESSAT 1
18337 _ACEOF
18338
18339
18340
18341
18342
18343
18344
18345           GNULIB_FACCESSAT=1
18346
18347
18348
18349
18350
18351 $as_echo "#define GNULIB_TEST_FACCESSAT 1" >>confdefs.h
18352
18353
18354
18355
18356
18357
18358
18359
18360   if test $ac_cv_have_decl_fchdir = no; then
18361     HAVE_DECL_FCHDIR=0
18362   fi
18363
18364
18365   if test $HAVE_FCHDIR = 0; then
18366
18367
18368
18369
18370
18371
18372
18373
18374   gl_LIBOBJS="$gl_LIBOBJS fchdir.$ac_objext"
18375
18376     :
18377
18378 $as_echo "#define REPLACE_FCHDIR 1" >>confdefs.h
18379
18380                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open can visit directories" >&5
18381 $as_echo_n "checking whether open can visit directories... " >&6; }
18382 if ${gl_cv_func_open_directory_works+:} false; then :
18383   $as_echo_n "(cached) " >&6
18384 else
18385   if test "$cross_compiling" = yes; then :
18386   case "$host_os" in
18387                    # Guess yes on glibc systems.
18388            *-gnu*) gl_cv_func_open_directory_works="guessing yes" ;;
18389                    # If we don't know, assume the worst.
18390            *)      gl_cv_func_open_directory_works="guessing no" ;;
18391          esac
18392
18393 else
18394   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18395 /* end confdefs.h.  */
18396 #include <fcntl.h>
18397
18398 int
18399 main ()
18400 {
18401 return open(".", O_RDONLY) < 0;
18402   ;
18403   return 0;
18404 }
18405 _ACEOF
18406 if ac_fn_c_try_run "$LINENO"; then :
18407   gl_cv_func_open_directory_works=yes
18408 else
18409   gl_cv_func_open_directory_works=no
18410 fi
18411 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18412   conftest.$ac_objext conftest.beam conftest.$ac_ext
18413 fi
18414
18415 fi
18416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_directory_works" >&5
18417 $as_echo "$gl_cv_func_open_directory_works" >&6; }
18418     case "$gl_cv_func_open_directory_works" in
18419       *yes) ;;
18420       *)
18421
18422 $as_echo "#define REPLACE_OPEN_DIRECTORY 1" >>confdefs.h
18423
18424         ;;
18425     esac
18426   fi
18427
18428
18429
18430
18431
18432
18433           GNULIB_FCHDIR=1
18434
18435
18436
18437
18438
18439 $as_echo "#define GNULIB_TEST_FCHDIR 1" >>confdefs.h
18440
18441
18442
18443
18444
18445
18446
18447   if test $ac_cv_func_fchmodat != yes; then
18448     HAVE_FCHMODAT=0
18449   fi
18450
18451   if test $HAVE_FCHMODAT = 0; then
18452
18453
18454
18455
18456
18457
18458
18459
18460   gl_LIBOBJS="$gl_LIBOBJS fchmodat.$ac_objext"
18461
18462   fi
18463
18464
18465 cat >>confdefs.h <<_ACEOF
18466 #define GNULIB_FCHMODAT 1
18467 _ACEOF
18468
18469
18470
18471
18472
18473
18474           GNULIB_FCHMODAT=1
18475
18476
18477
18478
18479
18480 $as_echo "#define GNULIB_TEST_FCHMODAT 1" >>confdefs.h
18481
18482
18483
18484
18485
18486
18487
18488   ac_fn_c_check_func "$LINENO" "fchownat" "ac_cv_func_fchownat"
18489 if test "x$ac_cv_func_fchownat" = xyes; then :
18490
18491
18492
18493   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fchownat works with AT_SYMLINK_NOFOLLOW" >&5
18494 $as_echo_n "checking whether fchownat works with AT_SYMLINK_NOFOLLOW... " >&6; }
18495 if ${gl_cv_func_fchownat_nofollow_works+:} false; then :
18496   $as_echo_n "(cached) " >&6
18497 else
18498
18499      gl_dangle=conftest.dangle
18500      # Remove any remnants of a previous test.
18501      rm -f $gl_dangle
18502      # Arrange for deletion of the temporary file this test creates.
18503      ac_clean_files="$ac_clean_files $gl_dangle"
18504      ln -s conftest.no-such $gl_dangle
18505      if test "$cross_compiling" = yes; then :
18506   gl_cv_func_fchownat_nofollow_works=no
18507 else
18508   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18509 /* end confdefs.h.  */
18510
18511 #include <fcntl.h>
18512 #include <unistd.h>
18513 #include <stdlib.h>
18514 #include <errno.h>
18515 #include <sys/types.h>
18516 int
18517 main ()
18518 {
18519   return (fchownat (AT_FDCWD, "$gl_dangle", -1, getgid (),
18520                     AT_SYMLINK_NOFOLLOW) != 0
18521           && errno == ENOENT);
18522 }
18523
18524 _ACEOF
18525 if ac_fn_c_try_run "$LINENO"; then :
18526   gl_cv_func_fchownat_nofollow_works=yes
18527 else
18528   gl_cv_func_fchownat_nofollow_works=no
18529 fi
18530 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18531   conftest.$ac_objext conftest.beam conftest.$ac_ext
18532 fi
18533
18534
18535 fi
18536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fchownat_nofollow_works" >&5
18537 $as_echo "$gl_cv_func_fchownat_nofollow_works" >&6; }
18538   if test $gl_cv_func_fchownat_nofollow_works = no; then :
18539   REPLACE_FCHOWNAT=1
18540
18541 $as_echo "#define FCHOWNAT_NOFOLLOW_BUG 1" >>confdefs.h
18542
18543
18544 fi
18545
18546
18547
18548
18549   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fchownat works with an empty file name" >&5
18550 $as_echo_n "checking whether fchownat works with an empty file name... " >&6; }
18551 if ${gl_cv_func_fchownat_empty_filename_works+:} false; then :
18552   $as_echo_n "(cached) " >&6
18553 else
18554   if test "$cross_compiling" = yes; then :
18555   gl_cv_func_fchownat_empty_filename_works="guessing no"
18556 else
18557   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18558 /* end confdefs.h.  */
18559 #include <unistd.h>
18560             #include <fcntl.h>
18561
18562 int
18563 main ()
18564 {
18565 int fd;
18566             int ret;
18567             if (mkdir ("conftestdir", 0700) < 0)
18568               return 2;
18569             fd = open ("conftestdir", O_RDONLY);
18570             if (fd < 0)
18571               return 3;
18572             ret = fchownat (fd, "", -1, -1, 0);
18573             close (fd);
18574             rmdir ("conftestdir");
18575             return ret == 0;
18576
18577   ;
18578   return 0;
18579 }
18580 _ACEOF
18581 if ac_fn_c_try_run "$LINENO"; then :
18582   gl_cv_func_fchownat_empty_filename_works=yes
18583 else
18584   gl_cv_func_fchownat_empty_filename_works=no
18585 fi
18586 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18587   conftest.$ac_objext conftest.beam conftest.$ac_ext
18588 fi
18589
18590
18591 fi
18592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fchownat_empty_filename_works" >&5
18593 $as_echo "$gl_cv_func_fchownat_empty_filename_works" >&6; }
18594   if test "$gl_cv_func_fchownat_empty_filename_works" != yes; then :
18595   REPLACE_FCHOWNAT=1
18596
18597 $as_echo "#define FCHOWNAT_EMPTY_FILENAME_BUG 1" >>confdefs.h
18598
18599
18600 fi
18601
18602      if test $REPLACE_CHOWN = 1; then
18603        REPLACE_FCHOWNAT=1
18604      fi
18605 else
18606   HAVE_FCHOWNAT=0
18607 fi
18608
18609
18610   if test $HAVE_FCHOWNAT = 0 || test $REPLACE_FCHOWNAT = 1; then
18611
18612
18613
18614
18615
18616
18617
18618
18619   gl_LIBOBJS="$gl_LIBOBJS fchownat.$ac_objext"
18620
18621   fi
18622
18623
18624 cat >>confdefs.h <<_ACEOF
18625 #define GNULIB_FCHOWNAT 1
18626 _ACEOF
18627
18628
18629
18630
18631
18632
18633           GNULIB_FCHOWNAT=1
18634
18635
18636
18637
18638
18639 $as_echo "#define GNULIB_TEST_FCHOWNAT 1" >>confdefs.h
18640
18641
18642
18643
18644
18645
18646
18647
18648   if test $ac_cv_func_fcntl = no; then
18649
18650
18651
18652   if test $ac_cv_func_fcntl = no; then
18653     HAVE_FCNTL=0
18654   else
18655     REPLACE_FCNTL=1
18656   fi
18657
18658   else
18659             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
18660 $as_echo_n "checking whether fcntl handles F_DUPFD correctly... " >&6; }
18661 if ${gl_cv_func_fcntl_f_dupfd_works+:} false; then :
18662   $as_echo_n "(cached) " >&6
18663 else
18664   if test "$cross_compiling" = yes; then :
18665   # Guess that it works on glibc systems
18666           case $host_os in #((
18667             *-gnu*) gl_cv_func_fcntl_f_dupfd_works="guessing yes";;
18668             *)      gl_cv_func_fcntl_f_dupfd_works="guessing no";;
18669           esac
18670 else
18671   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18672 /* end confdefs.h.  */
18673
18674 #include <fcntl.h>
18675 #include <errno.h>
18676
18677 int
18678 main ()
18679 {
18680 int result = 0;
18681       if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
18682       if (errno != EINVAL) result |= 2;
18683       return result;
18684
18685   ;
18686   return 0;
18687 }
18688 _ACEOF
18689 if ac_fn_c_try_run "$LINENO"; then :
18690   gl_cv_func_fcntl_f_dupfd_works=yes
18691 else
18692   gl_cv_func_fcntl_f_dupfd_works=no
18693 fi
18694 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18695   conftest.$ac_objext conftest.beam conftest.$ac_ext
18696 fi
18697
18698 fi
18699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
18700 $as_echo "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
18701     case $gl_cv_func_fcntl_f_dupfd_works in
18702       *yes) ;;
18703       *)
18704
18705
18706   if test $ac_cv_func_fcntl = no; then
18707     HAVE_FCNTL=0
18708   else
18709     REPLACE_FCNTL=1
18710   fi
18711
18712
18713 $as_echo "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
18714  ;;
18715     esac
18716
18717         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
18718 $as_echo_n "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
18719 if ${gl_cv_func_fcntl_f_dupfd_cloexec+:} false; then :
18720   $as_echo_n "(cached) " >&6
18721 else
18722   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18723 /* end confdefs.h.  */
18724
18725 #include <fcntl.h>
18726 #ifndef F_DUPFD_CLOEXEC
18727 choke me
18728 #endif
18729
18730 int
18731 main ()
18732 {
18733
18734   ;
18735   return 0;
18736 }
18737 _ACEOF
18738 if ac_fn_c_try_compile "$LINENO"; then :
18739   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18740 /* end confdefs.h.  */
18741
18742 #ifdef __linux__
18743 /* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
18744    it to support the semantics on older kernels that failed with EINVAL.  */
18745 choke me
18746 #endif
18747
18748 int
18749 main ()
18750 {
18751
18752   ;
18753   return 0;
18754 }
18755 _ACEOF
18756 if ac_fn_c_try_compile "$LINENO"; then :
18757   gl_cv_func_fcntl_f_dupfd_cloexec=yes
18758 else
18759   gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
18760 fi
18761 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18762 else
18763   gl_cv_func_fcntl_f_dupfd_cloexec=no
18764 fi
18765 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18766 fi
18767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
18768 $as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
18769     if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then
18770
18771
18772
18773   if test $ac_cv_func_fcntl = no; then
18774     HAVE_FCNTL=0
18775   else
18776     REPLACE_FCNTL=1
18777   fi
18778
18779           fi
18780   fi
18781
18782
18783
18784
18785   if test $ac_cv_func_fchdir = no; then
18786     HAVE_FCHDIR=0
18787   fi
18788
18789     if test $HAVE_FCHDIR = 0; then
18790
18791
18792
18793   if test $ac_cv_func_fcntl = no; then
18794     HAVE_FCNTL=0
18795   else
18796     REPLACE_FCNTL=1
18797   fi
18798
18799     fi
18800
18801
18802   if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
18803
18804
18805
18806
18807
18808
18809
18810
18811   gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
18812
18813   fi
18814
18815
18816
18817
18818
18819           GNULIB_FCNTL=1
18820
18821
18822
18823
18824
18825 $as_echo "#define GNULIB_TEST_FCNTL 1" >>confdefs.h
18826
18827
18828
18829
18830
18831
18832
18833
18834
18835
18836
18837
18838
18839
18840      if test $gl_cv_have_include_next = yes; then
18841        gl_cv_next_fcntl_h='<'fcntl.h'>'
18842      else
18843        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
18844 $as_echo_n "checking absolute name of <fcntl.h>... " >&6; }
18845 if ${gl_cv_next_fcntl_h+:} false; then :
18846   $as_echo_n "(cached) " >&6
18847 else
18848
18849
18850
18851   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18852 /* end confdefs.h.  */
18853 #include <fcntl.h>
18854 _ACEOF
18855                 case "$host_os" in
18856     aix*) gl_absname_cpp="$ac_cpp -C" ;;
18857     *)    gl_absname_cpp="$ac_cpp" ;;
18858   esac
18859
18860   case "$host_os" in
18861     mingw*)
18862                                           gl_dirsep_regex='[/\\]'
18863       ;;
18864     *)
18865       gl_dirsep_regex='\/'
18866       ;;
18867   esac
18868       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18869   gl_header_literal_regex=`echo 'fcntl.h' \
18870                            | sed -e "$gl_make_literal_regex_sed"`
18871   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18872       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18873       s|^/[^/]|//&|
18874       p
18875       q
18876     }'
18877
18878         gl_cv_absolute_fcntl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18879   sed -n "$gl_absolute_header_sed"`
18880
18881            gl_header=$gl_cv_absolute_fcntl_h
18882            gl_cv_next_fcntl_h='"'$gl_header'"'
18883
18884
18885 fi
18886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
18887 $as_echo "$gl_cv_next_fcntl_h" >&6; }
18888      fi
18889      NEXT_FCNTL_H=$gl_cv_next_fcntl_h
18890
18891      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18892        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18893        gl_next_as_first_directive='<'fcntl.h'>'
18894      else
18895        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18896        gl_next_as_first_directive=$gl_cv_next_fcntl_h
18897      fi
18898      NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
18899
18900
18901
18902
18903
18904
18905
18906
18907
18908
18909     for gl_func in fcntl openat; do
18910     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
18911     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
18912 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
18913 if eval \${$as_gl_Symbol+:} false; then :
18914   $as_echo_n "(cached) " >&6
18915 else
18916   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18917 /* end confdefs.h.  */
18918 #include <fcntl.h>
18919
18920 int
18921 main ()
18922 {
18923 #undef $gl_func
18924   (void) $gl_func;
18925   ;
18926   return 0;
18927 }
18928 _ACEOF
18929 if ac_fn_c_try_compile "$LINENO"; then :
18930   eval "$as_gl_Symbol=yes"
18931 else
18932   eval "$as_gl_Symbol=no"
18933 fi
18934 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18935 fi
18936 eval ac_res=\$$as_gl_Symbol
18937                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18938 $as_echo "$ac_res" >&6; }
18939     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
18940   cat >>confdefs.h <<_ACEOF
18941 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
18942 _ACEOF
18943
18944                      eval ac_cv_have_decl_$gl_func=yes
18945 fi
18946       done
18947
18948
18949
18950
18951
18952
18953
18954     ac_fn_c_check_decl "$LINENO" "fdopendir" "ac_cv_have_decl_fdopendir" "
18955 #include <dirent.h>
18956
18957 "
18958 if test "x$ac_cv_have_decl_fdopendir" = xyes; then :
18959   ac_have_decl=1
18960 else
18961   ac_have_decl=0
18962 fi
18963
18964 cat >>confdefs.h <<_ACEOF
18965 #define HAVE_DECL_FDOPENDIR $ac_have_decl
18966 _ACEOF
18967 if test $ac_have_decl = 1; then :
18968
18969 else
18970   HAVE_DECL_FDOPENDIR=0
18971 fi
18972
18973
18974   if test $ac_cv_func_fdopendir = no; then
18975     HAVE_FDOPENDIR=0
18976   else
18977     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fdopendir works" >&5
18978 $as_echo_n "checking whether fdopendir works... " >&6; }
18979 if ${gl_cv_func_fdopendir_works+:} false; then :
18980   $as_echo_n "(cached) " >&6
18981 else
18982   if test "$cross_compiling" = yes; then :
18983   case "$host_os" in
18984                     # Guess yes on glibc systems.
18985             *-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;;
18986                     # If we don't know, assume the worst.
18987             *)      gl_cv_func_fdopendir_works="guessing no" ;;
18988           esac
18989
18990 else
18991   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18992 /* end confdefs.h.  */
18993
18994 #include <dirent.h>
18995 #include <fcntl.h>
18996 #include <unistd.h>
18997 #if !HAVE_DECL_FDOPENDIR
18998 extern
18999 # ifdef __cplusplus
19000 "C"
19001 # endif
19002 DIR *fdopendir (int);
19003 #endif
19004
19005 int
19006 main ()
19007 {
19008 int result = 0;
19009      int fd = open ("conftest.c", O_RDONLY);
19010      if (fd < 0) result |= 1;
19011      if (fdopendir (fd)) result |= 2;
19012      if (close (fd)) result |= 4;
19013      return result;
19014   ;
19015   return 0;
19016 }
19017 _ACEOF
19018 if ac_fn_c_try_run "$LINENO"; then :
19019   gl_cv_func_fdopendir_works=yes
19020 else
19021   gl_cv_func_fdopendir_works=no
19022 fi
19023 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19024   conftest.$ac_objext conftest.beam conftest.$ac_ext
19025 fi
19026
19027 fi
19028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopendir_works" >&5
19029 $as_echo "$gl_cv_func_fdopendir_works" >&6; }
19030     case "$gl_cv_func_fdopendir_works" in
19031       *yes) ;;
19032       *)
19033         REPLACE_FDOPENDIR=1
19034         ;;
19035     esac
19036   fi
19037
19038   if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then
19039
19040
19041
19042
19043
19044
19045
19046
19047   gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext"
19048
19049   fi
19050
19051
19052
19053
19054
19055           GNULIB_FDOPENDIR=1
19056
19057
19058
19059
19060
19061 $as_echo "#define GNULIB_TEST_FDOPENDIR 1" >>confdefs.h
19062
19063
19064
19065
19066
19067 cat >>confdefs.h <<_ACEOF
19068 #define GNULIB_FDOPENDIR 1
19069 _ACEOF
19070
19071
19072
19073
19074 cat >>confdefs.h <<_ACEOF
19075 #define GNULIB_FDUTIMENSAT 1
19076 _ACEOF
19077
19078
19079
19080
19081     ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
19082 if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
19083
19084 cat >>confdefs.h <<_ACEOF
19085 #define HAVE_STRUCT_STAT_ST_BLOCKS 1
19086 _ACEOF
19087
19088
19089 $as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
19090
19091 else
19092   :
19093 fi
19094
19095
19096
19097
19098   if test $ac_cv_member_struct_stat_st_blocks = no; then
19099
19100
19101
19102
19103
19104
19105
19106
19107   gl_LIBOBJS="$gl_LIBOBJS fileblocks.$ac_objext"
19108
19109
19110
19111   :
19112
19113   fi
19114
19115
19116
19117
19118
19119
19120   FLOAT_H=
19121   REPLACE_FLOAT_LDBL=0
19122   case "$host_os" in
19123     aix* | beos* | openbsd* | mirbsd* | irix*)
19124       FLOAT_H=float.h
19125       ;;
19126     freebsd*)
19127       case "$host_cpu" in
19128         i[34567]86 )
19129           FLOAT_H=float.h
19130           ;;
19131         x86_64 )
19132           # On x86_64 systems, the C compiler may still be generating
19133           # 32-bit code.
19134           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19135 /* end confdefs.h.  */
19136 #if defined __LP64__ || defined __x86_64__ || defined __amd64__
19137              yes
19138              #endif
19139 _ACEOF
19140 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19141   $EGREP "yes" >/dev/null 2>&1; then :
19142
19143 else
19144   FLOAT_H=float.h
19145 fi
19146 rm -f conftest*
19147
19148           ;;
19149       esac
19150       ;;
19151     linux*)
19152       case "$host_cpu" in
19153         powerpc*)
19154           FLOAT_H=float.h
19155           ;;
19156       esac
19157       ;;
19158   esac
19159   case "$host_os" in
19160     aix* | freebsd* | linux*)
19161       if test -n "$FLOAT_H"; then
19162         REPLACE_FLOAT_LDBL=1
19163       fi
19164       ;;
19165   esac
19166
19167     REPLACE_ITOLD=0
19168   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5
19169 $as_echo_n "checking whether conversion from 'int' to 'long double' works... " >&6; }
19170 if ${gl_cv_func_itold_works+:} false; then :
19171   $as_echo_n "(cached) " >&6
19172 else
19173
19174       if test "$cross_compiling" = yes; then :
19175   case "$host" in
19176            sparc*-*-linux*)
19177              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19178 /* end confdefs.h.  */
19179 #if defined __LP64__ || defined __arch64__
19180                 yes
19181                 #endif
19182 _ACEOF
19183 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19184   $EGREP "yes" >/dev/null 2>&1; then :
19185   gl_cv_func_itold_works="guessing no"
19186 else
19187   gl_cv_func_itold_works="guessing yes"
19188 fi
19189 rm -f conftest*
19190
19191              ;;
19192            *) gl_cv_func_itold_works="guessing yes" ;;
19193          esac
19194
19195 else
19196   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19197 /* end confdefs.h.  */
19198
19199 int i = -1;
19200 volatile long double ld;
19201 int main ()
19202 {
19203   ld += i * 1.0L;
19204   if (ld > 0)
19205     return 1;
19206   return 0;
19207 }
19208 _ACEOF
19209 if ac_fn_c_try_run "$LINENO"; then :
19210   gl_cv_func_itold_works=yes
19211 else
19212   gl_cv_func_itold_works=no
19213 fi
19214 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19215   conftest.$ac_objext conftest.beam conftest.$ac_ext
19216 fi
19217
19218
19219 fi
19220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5
19221 $as_echo "$gl_cv_func_itold_works" >&6; }
19222   case "$gl_cv_func_itold_works" in
19223     *no)
19224       REPLACE_ITOLD=1
19225                   FLOAT_H=float.h
19226       ;;
19227   esac
19228
19229   if test -n "$FLOAT_H"; then
19230
19231
19232
19233
19234
19235
19236
19237
19238      if test $gl_cv_have_include_next = yes; then
19239        gl_cv_next_float_h='<'float.h'>'
19240      else
19241        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
19242 $as_echo_n "checking absolute name of <float.h>... " >&6; }
19243 if ${gl_cv_next_float_h+:} false; then :
19244   $as_echo_n "(cached) " >&6
19245 else
19246
19247
19248
19249   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19250 /* end confdefs.h.  */
19251 #include <float.h>
19252 _ACEOF
19253                 case "$host_os" in
19254     aix*) gl_absname_cpp="$ac_cpp -C" ;;
19255     *)    gl_absname_cpp="$ac_cpp" ;;
19256   esac
19257
19258   case "$host_os" in
19259     mingw*)
19260                                           gl_dirsep_regex='[/\\]'
19261       ;;
19262     *)
19263       gl_dirsep_regex='\/'
19264       ;;
19265   esac
19266       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19267   gl_header_literal_regex=`echo 'float.h' \
19268                            | sed -e "$gl_make_literal_regex_sed"`
19269   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19270       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19271       s|^/[^/]|//&|
19272       p
19273       q
19274     }'
19275
19276         gl_cv_absolute_float_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19277   sed -n "$gl_absolute_header_sed"`
19278
19279            gl_header=$gl_cv_absolute_float_h
19280            gl_cv_next_float_h='"'$gl_header'"'
19281
19282
19283 fi
19284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
19285 $as_echo "$gl_cv_next_float_h" >&6; }
19286      fi
19287      NEXT_FLOAT_H=$gl_cv_next_float_h
19288
19289      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19290        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19291        gl_next_as_first_directive='<'float.h'>'
19292      else
19293        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19294        gl_next_as_first_directive=$gl_cv_next_float_h
19295      fi
19296      NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive
19297
19298
19299
19300
19301   fi
19302
19303    if test -n "$FLOAT_H"; then
19304   GL_GENERATE_FLOAT_H_TRUE=
19305   GL_GENERATE_FLOAT_H_FALSE='#'
19306 else
19307   GL_GENERATE_FLOAT_H_TRUE='#'
19308   GL_GENERATE_FLOAT_H_FALSE=
19309 fi
19310
19311
19312
19313   if test $REPLACE_FLOAT_LDBL = 1; then
19314
19315
19316
19317
19318
19319
19320
19321
19322   gl_LIBOBJS="$gl_LIBOBJS float.$ac_objext"
19323
19324   fi
19325   if test $REPLACE_ITOLD = 1; then
19326
19327
19328
19329
19330
19331
19332
19333
19334   gl_LIBOBJS="$gl_LIBOBJS itold.$ac_objext"
19335
19336   fi
19337
19338
19339
19340
19341
19342   FNMATCH_H=
19343   gl_fnmatch_required_lowercase=`
19344     echo $gl_fnmatch_required | LC_ALL=C tr '[A-Z]' '[a-z]'
19345   `
19346   gl_fnmatch_cache_var="gl_cv_func_fnmatch_${gl_fnmatch_required_lowercase}"
19347   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working $gl_fnmatch_required fnmatch" >&5
19348 $as_echo_n "checking for working $gl_fnmatch_required fnmatch... " >&6; }
19349 if eval \${$gl_fnmatch_cache_var+:} false; then :
19350   $as_echo_n "(cached) " >&6
19351 else
19352                            if test $gl_fnmatch_required = GNU; then
19353        gl_fnmatch_gnu_start=
19354        gl_fnmatch_gnu_end=
19355      else
19356        gl_fnmatch_gnu_start='#if 0'
19357        gl_fnmatch_gnu_end='#endif'
19358      fi
19359      if test "$cross_compiling" = yes; then :
19360   eval "$gl_fnmatch_cache_var=\"guessing no\""
19361 else
19362   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19363 /* end confdefs.h.  */
19364 #include <fnmatch.h>
19365             static int
19366             y (char const *pattern, char const *string, int flags)
19367             {
19368               return fnmatch (pattern, string, flags) == 0;
19369             }
19370             static int
19371             n (char const *pattern, char const *string, int flags)
19372             {
19373               return fnmatch (pattern, string, flags) == FNM_NOMATCH;
19374             }
19375
19376 int
19377 main ()
19378 {
19379 char const *Apat = 'A' < '\\\\' ? "[A-\\\\\\\\]" : "[\\\\\\\\-A]";
19380             char const *apat = 'a' < '\\\\' ? "[a-\\\\\\\\]" : "[\\\\\\\\-a]";
19381             static char const A_1[] = { 'A' - 1, 0 };
19382             static char const A01[] = { 'A' + 1, 0 };
19383             static char const a_1[] = { 'a' - 1, 0 };
19384             static char const a01[] = { 'a' + 1, 0 };
19385             static char const bs_1[] = { '\\\\' - 1, 0 };
19386             static char const bs01[] = { '\\\\' + 1, 0 };
19387             int result = 0;
19388             if (!n ("a*", "", 0))
19389               return 1;
19390             if (!y ("a*", "abc", 0))
19391               return 1;
19392             if (!y ("[/b", "[/b", 0)) /*"]]"*/ /* glibc Bugzilla bug 12378 */
19393               return 1;
19394             if (!n ("d*/*1", "d/s/1", FNM_PATHNAME))
19395               return 2;
19396             if (!y ("a\\\\bc", "abc", 0))
19397               return 3;
19398             if (!n ("a\\\\bc", "abc", FNM_NOESCAPE))
19399               return 3;
19400             if (!y ("*x", ".x", 0))
19401               return 4;
19402             if (!n ("*x", ".x", FNM_PERIOD))
19403               return 4;
19404             if (!y (Apat, "\\\\", 0))
19405               return 5;
19406             if (!y (Apat, "A", 0))
19407               return 5;
19408             if (!y (apat, "\\\\", 0))
19409               return 5;
19410             if (!y (apat, "a", 0))
19411               return 5;
19412             if (!(n (Apat, A_1, 0) == ('A' < '\\\\')))
19413               return 5;
19414             if (!(n (apat, a_1, 0) == ('a' < '\\\\')))
19415               return 5;
19416             if (!(y (Apat, A01, 0) == ('A' < '\\\\')))
19417               return 5;
19418             if (!(y (apat, a01, 0) == ('a' < '\\\\')))
19419               return 5;
19420             if (!(y (Apat, bs_1, 0) == ('A' < '\\\\')))
19421               return 5;
19422             if (!(y (apat, bs_1, 0) == ('a' < '\\\\')))
19423               return 5;
19424             if (!(n (Apat, bs01, 0) == ('A' < '\\\\')))
19425               return 5;
19426             if (!(n (apat, bs01, 0) == ('a' < '\\\\')))
19427               return 5;
19428             $gl_fnmatch_gnu_start
19429             if (!y ("xxXX", "xXxX", FNM_CASEFOLD))
19430               result |= 8;
19431             if (!y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH))
19432               result |= 16;
19433             if (!n ("d*/*1", "d/s/1", FNM_FILE_NAME))
19434               result |= 32;
19435             if (!y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR))
19436               result |= 64;
19437             if (!y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR))
19438               result |= 64;
19439             if (!y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR))
19440               result |= 64;
19441             $gl_fnmatch_gnu_end
19442             return result;
19443
19444   ;
19445   return 0;
19446 }
19447 _ACEOF
19448 if ac_fn_c_try_run "$LINENO"; then :
19449   eval "$gl_fnmatch_cache_var=yes"
19450 else
19451   eval "$gl_fnmatch_cache_var=no"
19452 fi
19453 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19454   conftest.$ac_objext conftest.beam conftest.$ac_ext
19455 fi
19456
19457
19458 fi
19459 eval ac_res=\$$gl_fnmatch_cache_var
19460                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
19461 $as_echo "$ac_res" >&6; }
19462   eval "gl_fnmatch_result=\"\$$gl_fnmatch_cache_var\""
19463   if test "$gl_fnmatch_result" = yes; then
19464             rm -f "$gl_source_base/fnmatch.h"
19465   else
19466     FNMATCH_H=fnmatch.h
19467   fi
19468
19469    if test -n "$FNMATCH_H"; then
19470   GL_GENERATE_FNMATCH_H_TRUE=
19471   GL_GENERATE_FNMATCH_H_FALSE='#'
19472 else
19473   GL_GENERATE_FNMATCH_H_TRUE='#'
19474   GL_GENERATE_FNMATCH_H_FALSE=
19475 fi
19476
19477
19478   if test -n "$FNMATCH_H"; then
19479
19480
19481
19482
19483
19484
19485
19486
19487   gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
19488
19489
19490
19491 cat >>confdefs.h <<_ACEOF
19492 #define fnmatch ${gl_fnmatch_required_lowercase}_fnmatch
19493 _ACEOF
19494
19495
19496   ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
19497 "
19498 if test "x$ac_cv_have_decl_isblank" = xyes; then :
19499   ac_have_decl=1
19500 else
19501   ac_have_decl=0
19502 fi
19503
19504 cat >>confdefs.h <<_ACEOF
19505 #define HAVE_DECL_ISBLANK $ac_have_decl
19506 _ACEOF
19507
19508
19509
19510
19511   fi
19512
19513
19514
19515
19516
19517   if test -n "$FNMATCH_H"; then
19518
19519
19520
19521
19522
19523
19524
19525
19526   gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
19527
19528
19529
19530 cat >>confdefs.h <<_ACEOF
19531 #define fnmatch ${gl_fnmatch_required_lowercase}_fnmatch
19532 _ACEOF
19533
19534
19535   ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
19536 "
19537 if test "x$ac_cv_have_decl_isblank" = xyes; then :
19538   ac_have_decl=1
19539 else
19540   ac_have_decl=0
19541 fi
19542
19543 cat >>confdefs.h <<_ACEOF
19544 #define HAVE_DECL_ISBLANK $ac_have_decl
19545 _ACEOF
19546
19547
19548
19549
19550   fi
19551
19552
19553   fp_headers='
19554     #include <stdio.h>
19555     #if HAVE_STDIO_EXT_H
19556     # include <stdio_ext.h>
19557     #endif
19558   '
19559   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpending" >&5
19560 $as_echo_n "checking for __fpending... " >&6; }
19561 if ${gl_cv_func___fpending+:} false; then :
19562   $as_echo_n "(cached) " >&6
19563 else
19564
19565       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19566 /* end confdefs.h.  */
19567 $fp_headers
19568 int
19569 main ()
19570 {
19571 return ! __fpending (stdin);
19572   ;
19573   return 0;
19574 }
19575 _ACEOF
19576 if ac_fn_c_try_link "$LINENO"; then :
19577   gl_cv_func___fpending=yes
19578 else
19579   gl_cv_func___fpending=no
19580 fi
19581 rm -f core conftest.err conftest.$ac_objext \
19582     conftest$ac_exeext conftest.$ac_ext
19583
19584 fi
19585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func___fpending" >&5
19586 $as_echo "$gl_cv_func___fpending" >&6; }
19587   if test $gl_cv_func___fpending = yes; then
19588     ac_fn_c_check_decl "$LINENO" "__fpending" "ac_cv_have_decl___fpending" "$fp_headers
19589 "
19590 if test "x$ac_cv_have_decl___fpending" = xyes; then :
19591   ac_have_decl=1
19592 else
19593   ac_have_decl=0
19594 fi
19595
19596 cat >>confdefs.h <<_ACEOF
19597 #define HAVE_DECL___FPENDING $ac_have_decl
19598 _ACEOF
19599
19600   fi
19601
19602   if test $gl_cv_func___fpending = no; then
19603
19604
19605
19606
19607
19608
19609
19610
19611   gl_LIBOBJS="$gl_LIBOBJS fpending.$ac_objext"
19612
19613
19614   { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to determine the number of pending output bytes on a stream" >&5
19615 $as_echo_n "checking how to determine the number of pending output bytes on a stream... " >&6; }
19616 if ${ac_cv_sys_pending_output_n_bytes+:} false; then :
19617   $as_echo_n "(cached) " >&6
19618 else
19619
19620       for ac_expr in                                                    \
19621                                                                         \
19622           '# glibc2'                                                    \
19623           'fp->_IO_write_ptr - fp->_IO_write_base'                      \
19624                                                                         \
19625           '# traditional Unix'                                          \
19626           'fp->_ptr - fp->_base'                                        \
19627                                                                         \
19628           '# BSD'                                                       \
19629           'fp->_p - fp->_bf._base'                                      \
19630                                                                         \
19631           '# SCO, Unixware'                                             \
19632           '(fp->__ptr ? fp->__ptr - fp->__base : 0)'                    \
19633                                                                         \
19634           '# QNX'                                                       \
19635           '(fp->_Mode & 0x2000 /*_MWRITE*/ ? fp->_Next - fp->_Buf : 0)' \
19636                                                                         \
19637           '# old glibc?'                                                \
19638           'fp->__bufp - fp->__buffer'                                   \
19639                                                                         \
19640           '# old glibc iostream?'                                       \
19641           'fp->_pptr - fp->_pbase'                                      \
19642                                                                         \
19643           '# emx+gcc'                                                   \
19644           'fp->_ptr - fp->_buffer'                                      \
19645                                                                         \
19646           '# Minix'                                                     \
19647           'fp->_ptr - fp->_buf'                                         \
19648                                                                         \
19649           '# Plan9'                                                     \
19650           'fp->wp - fp->buf'                                            \
19651                                                                         \
19652           '# VMS'                                                       \
19653           '(*fp)->_ptr - (*fp)->_base'                                  \
19654                                                                         \
19655           '# e.g., DGUX R4.11; the info is not available'               \
19656           1                                                             \
19657           ; do
19658
19659         # Skip each embedded comment.
19660         case "$ac_expr" in '#'*) continue;; esac
19661
19662         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19663 /* end confdefs.h.  */
19664 #include <stdio.h>
19665 int
19666 main ()
19667 {
19668 FILE *fp = stdin; (void) ($ac_expr);
19669   ;
19670   return 0;
19671 }
19672 _ACEOF
19673 if ac_fn_c_try_compile "$LINENO"; then :
19674   fp_done=yes
19675
19676 fi
19677 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19678         test "$fp_done" = yes && break
19679       done
19680
19681       ac_cv_sys_pending_output_n_bytes=$ac_expr
19682
19683
19684 fi
19685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_pending_output_n_bytes" >&5
19686 $as_echo "$ac_cv_sys_pending_output_n_bytes" >&6; }
19687
19688 cat >>confdefs.h <<_ACEOF
19689 #define PENDING_OUTPUT_N_BYTES $ac_cv_sys_pending_output_n_bytes
19690 _ACEOF
19691
19692
19693   fi
19694
19695
19696
19697     if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then
19698     REPLACE_FSEEK=1
19699   fi
19700
19701   if test $REPLACE_FSEEK = 1; then
19702
19703
19704
19705
19706
19707
19708
19709
19710   gl_LIBOBJS="$gl_LIBOBJS fseek.$ac_objext"
19711
19712   fi
19713
19714
19715
19716
19717
19718           GNULIB_FSEEK=1
19719
19720
19721
19722
19723
19724 $as_echo "#define GNULIB_TEST_FSEEK 1" >>confdefs.h
19725
19726
19727
19728
19729
19730
19731
19732
19733
19734
19735
19736   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fseeko" >&5
19737 $as_echo_n "checking for fseeko... " >&6; }
19738 if ${gl_cv_func_fseeko+:} false; then :
19739   $as_echo_n "(cached) " >&6
19740 else
19741
19742       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19743 /* end confdefs.h.  */
19744 #include <stdio.h>
19745
19746 int
19747 main ()
19748 {
19749 fseeko (stdin, 0, 0);
19750   ;
19751   return 0;
19752 }
19753 _ACEOF
19754 if ac_fn_c_try_link "$LINENO"; then :
19755   gl_cv_func_fseeko=yes
19756 else
19757   gl_cv_func_fseeko=no
19758 fi
19759 rm -f core conftest.err conftest.$ac_objext \
19760     conftest$ac_exeext conftest.$ac_ext
19761
19762 fi
19763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fseeko" >&5
19764 $as_echo "$gl_cv_func_fseeko" >&6; }
19765
19766
19767   if test $ac_cv_have_decl_fseeko = no; then
19768     HAVE_DECL_FSEEKO=0
19769   fi
19770
19771   if test $gl_cv_func_fseeko = no; then
19772     HAVE_FSEEKO=0
19773   else
19774     if test $WINDOWS_64_BIT_OFF_T = 1; then
19775       REPLACE_FSEEKO=1
19776     fi
19777     if test $gl_cv_var_stdin_large_offset = no; then
19778       REPLACE_FSEEKO=1
19779     fi
19780
19781   fi
19782
19783   if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then
19784
19785
19786
19787
19788
19789
19790
19791
19792   gl_LIBOBJS="$gl_LIBOBJS fseeko.$ac_objext"
19793
19794
19795       for ac_func in _fseeki64
19796 do :
19797   ac_fn_c_check_func "$LINENO" "_fseeki64" "ac_cv_func__fseeki64"
19798 if test "x$ac_cv_func__fseeki64" = xyes; then :
19799   cat >>confdefs.h <<_ACEOF
19800 #define HAVE__FSEEKI64 1
19801 _ACEOF
19802
19803 fi
19804 done
19805
19806
19807   fi
19808
19809
19810
19811
19812
19813           GNULIB_FSEEKO=1
19814
19815
19816
19817
19818
19819 $as_echo "#define GNULIB_TEST_FSEEKO 1" >>confdefs.h
19820
19821
19822
19823
19824
19825
19826
19827   if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
19828     REPLACE_FSTAT=1
19829   fi
19830
19831
19832   if test $WINDOWS_64_BIT_ST_SIZE = 1; then
19833     REPLACE_FSTAT=1
19834   fi
19835
19836
19837
19838
19839
19840   if test $ac_cv_func_fchdir = no; then
19841     HAVE_FCHDIR=0
19842   fi
19843
19844     if test $HAVE_FCHDIR = 0; then
19845       case "$gl_cv_func_open_directory_works" in
19846         *yes) ;;
19847         *)
19848           REPLACE_FSTAT=1
19849           ;;
19850       esac
19851     fi
19852
19853
19854   if test $REPLACE_FSTAT = 1; then
19855
19856
19857
19858
19859
19860
19861
19862
19863   gl_LIBOBJS="$gl_LIBOBJS fstat.$ac_objext"
19864
19865     :
19866   fi
19867
19868
19869
19870
19871
19872           GNULIB_FSTAT=1
19873
19874
19875
19876
19877
19878 $as_echo "#define GNULIB_TEST_FSTAT 1" >>confdefs.h
19879
19880
19881
19882
19883
19884
19885
19886
19887
19888   if test $ac_cv_func_fstatat = no; then
19889     HAVE_FSTATAT=0
19890   else
19891             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fstatat (..., 0) works" >&5
19892 $as_echo_n "checking whether fstatat (..., 0) works... " >&6; }
19893 if ${gl_cv_func_fstatat_zero_flag+:} false; then :
19894   $as_echo_n "(cached) " >&6
19895 else
19896   if test "$cross_compiling" = yes; then :
19897   case "$host_os" in
19898             aix*) gl_cv_func_fstatat_zero_flag="guessing no";;
19899             *)    gl_cv_func_fstatat_zero_flag="guessing yes";;
19900           esac
19901
19902 else
19903   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19904 /* end confdefs.h.  */
19905
19906               #include <fcntl.h>
19907               #include <sys/stat.h>
19908               int
19909               main (void)
19910               {
19911                 struct stat a;
19912                 return fstatat (AT_FDCWD, ".", &a, 0) != 0;
19913               }
19914
19915 _ACEOF
19916 if ac_fn_c_try_run "$LINENO"; then :
19917   gl_cv_func_fstatat_zero_flag=yes
19918 else
19919   gl_cv_func_fstatat_zero_flag=no
19920 fi
19921 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19922   conftest.$ac_objext conftest.beam conftest.$ac_ext
19923 fi
19924
19925
19926 fi
19927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fstatat_zero_flag" >&5
19928 $as_echo "$gl_cv_func_fstatat_zero_flag" >&6; }
19929
19930     case $gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in
19931     *yes+*yes) ;;
19932     *) REPLACE_FSTATAT=1
19933        case $gl_cv_func_fstatat_zero_flag in
19934        *yes)
19935
19936 $as_echo "#define HAVE_WORKING_FSTATAT_ZERO_FLAG 1" >>confdefs.h
19937
19938          ;;
19939        esac
19940        ;;
19941     esac
19942   fi
19943
19944   if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
19945
19946
19947
19948
19949
19950
19951
19952
19953   gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext"
19954
19955   fi
19956
19957
19958
19959
19960
19961           GNULIB_FSTATAT=1
19962
19963
19964
19965
19966
19967 $as_echo "#define GNULIB_TEST_FSTATAT 1" >>confdefs.h
19968
19969
19970
19971
19972
19973
19974
19975   if test $ac_cv_func_futimens = no; then
19976     HAVE_FUTIMENS=0
19977   else
19978     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether futimens works" >&5
19979 $as_echo_n "checking whether futimens works... " >&6; }
19980 if ${gl_cv_func_futimens_works+:} false; then :
19981   $as_echo_n "(cached) " >&6
19982 else
19983   if test "$cross_compiling" = yes; then :
19984   gl_cv_func_futimens_works="guessing no"
19985 else
19986   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19987 /* end confdefs.h.  */
19988
19989 #include <fcntl.h>
19990 #include <sys/stat.h>
19991 #include <unistd.h>
19992 #include <errno.h>
19993
19994 int
19995 main ()
19996 {
19997 struct timespec ts[2] = { { 1, UTIME_OMIT }, { 1, UTIME_NOW } };
19998       int fd = creat ("conftest.file", 0600);
19999       struct stat st;
20000       if (fd < 0) return 1;
20001       errno = 0;
20002       if (futimens (AT_FDCWD, NULL) == 0) return 2;
20003       if (errno != EBADF) return 3;
20004       if (futimens (fd, ts)) return 4;
20005       sleep (1);
20006       ts[0].tv_nsec = UTIME_NOW;
20007       ts[1].tv_nsec = UTIME_OMIT;
20008       if (futimens (fd, ts)) return 5;
20009       if (fstat (fd, &st)) return 6;
20010       if (st.st_ctime < st.st_atime) return 7;
20011
20012   ;
20013   return 0;
20014 }
20015 _ACEOF
20016 if ac_fn_c_try_run "$LINENO"; then :
20017            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20018 /* end confdefs.h.  */
20019
20020 #ifdef __linux__
20021 /* The Linux kernel added futimens in 2.6.22, but has bugs with UTIME_OMIT
20022    in several file systems as recently as 2.6.32.  Always replace futimens
20023    to support older kernels.  */
20024 choke me
20025 #endif
20026
20027 int
20028 main ()
20029 {
20030
20031   ;
20032   return 0;
20033 }
20034 _ACEOF
20035 if ac_fn_c_try_compile "$LINENO"; then :
20036   gl_cv_func_futimens_works=yes
20037 else
20038   gl_cv_func_futimens_works="needs runtime check"
20039 fi
20040 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20041 else
20042   gl_cv_func_futimens_works=no
20043 fi
20044 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20045   conftest.$ac_objext conftest.beam conftest.$ac_ext
20046 fi
20047
20048       rm -f conftest.file
20049 fi
20050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_futimens_works" >&5
20051 $as_echo "$gl_cv_func_futimens_works" >&6; }
20052     if test "$gl_cv_func_futimens_works" != yes; then
20053       REPLACE_FUTIMENS=1
20054     fi
20055   fi
20056
20057   if test $HAVE_FUTIMENS = 0 || test $REPLACE_FUTIMENS = 1; then
20058
20059
20060
20061
20062
20063
20064
20065
20066   gl_LIBOBJS="$gl_LIBOBJS futimens.$ac_objext"
20067
20068   fi
20069
20070
20071
20072
20073
20074           GNULIB_FUTIMENS=1
20075
20076
20077
20078
20079
20080 $as_echo "#define GNULIB_TEST_FUTIMENS 1" >>confdefs.h
20081
20082
20083
20084
20085
20086
20087
20088
20089   gl_abort_bug=no
20090   case "$host_os" in
20091     mingw*)
20092       gl_cv_func_getcwd_path_max=yes
20093       ;;
20094     *)
20095
20096
20097
20098
20099
20100   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd handles long file names properly" >&5
20101 $as_echo_n "checking whether getcwd handles long file names properly... " >&6; }
20102 if ${gl_cv_func_getcwd_path_max+:} false; then :
20103   $as_echo_n "(cached) " >&6
20104 else
20105   # Arrange for deletion of the temporary directory this test creates.
20106      ac_clean_files="$ac_clean_files confdir3"
20107           if test "$cross_compiling" = yes; then :
20108   case "$host_os" in
20109        aix*) gl_cv_func_getcwd_path_max='no, it has the AIX bug';;
20110        *) gl_cv_func_getcwd_path_max=no;;
20111      esac
20112 else
20113   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20114 /* end confdefs.h.  */
20115
20116 #include <errno.h>
20117 #include <stdlib.h>
20118 #if HAVE_UNISTD_H
20119 # include <unistd.h>
20120 #else
20121 # include <direct.h>
20122 #endif
20123 #include <string.h>
20124 #include <limits.h>
20125 #include <sys/stat.h>
20126 #include <sys/types.h>
20127 #include <fcntl.h>
20128
20129
20130 /* Arrange to define PATH_MAX, like "pathmax.h" does. */
20131 #if HAVE_UNISTD_H
20132 # include <unistd.h>
20133 #endif
20134 #include <limits.h>
20135 #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
20136 # include <sys/param.h>
20137 #endif
20138 #if !defined PATH_MAX && defined MAXPATHLEN
20139 # define PATH_MAX MAXPATHLEN
20140 #endif
20141 #ifdef __hpux
20142 # undef PATH_MAX
20143 # define PATH_MAX 1024
20144 #endif
20145 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
20146 # undef PATH_MAX
20147 # define PATH_MAX 260
20148 #endif
20149
20150
20151 #ifndef AT_FDCWD
20152 # define AT_FDCWD 0
20153 #endif
20154 #ifdef ENAMETOOLONG
20155 # define is_ENAMETOOLONG(x) ((x) == ENAMETOOLONG)
20156 #else
20157 # define is_ENAMETOOLONG(x) 0
20158 #endif
20159
20160 /* Use the getcwd function, not any macro.  */
20161 #undef getcwd
20162
20163 /* Don't get link errors because mkdir is redefined to rpl_mkdir.  */
20164 #undef mkdir
20165
20166 #ifndef S_IRWXU
20167 # define S_IRWXU 0700
20168 #endif
20169
20170 /* The length of this name must be 8.  */
20171 #define DIR_NAME "confdir3"
20172 #define DIR_NAME_LEN 8
20173 #define DIR_NAME_SIZE (DIR_NAME_LEN + 1)
20174
20175 /* The length of "../".  */
20176 #define DOTDOTSLASH_LEN 3
20177
20178 /* Leftover bytes in the buffer, to work around library or OS bugs.  */
20179 #define BUF_SLOP 20
20180
20181 int
20182 main ()
20183 {
20184 #ifndef PATH_MAX
20185   /* The Hurd doesn't define this, so getcwd can't exhibit the bug --
20186      at least not on a local file system.  And if we were to start worrying
20187      about remote file systems, we'd have to enable the wrapper function
20188      all of the time, just to be safe.  That's not worth the cost.  */
20189   exit (0);
20190 #elif ((INT_MAX / (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1) \
20191         - DIR_NAME_SIZE - BUF_SLOP) \
20192        <= PATH_MAX)
20193   /* FIXME: Assuming there's a system for which this is true,
20194      this should be done in a compile test.  */
20195   exit (0);
20196 #else
20197   char buf[PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1)
20198            + DIR_NAME_SIZE + BUF_SLOP];
20199   char *cwd = getcwd (buf, PATH_MAX);
20200   size_t initial_cwd_len;
20201   size_t cwd_len;
20202   int fail = 0;
20203   size_t n_chdirs = 0;
20204
20205   if (cwd == NULL)
20206     exit (10);
20207
20208   cwd_len = initial_cwd_len = strlen (cwd);
20209
20210   while (1)
20211     {
20212       size_t dotdot_max = PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN);
20213       char *c = NULL;
20214
20215       cwd_len += DIR_NAME_SIZE;
20216       /* If mkdir or chdir fails, it could be that this system cannot create
20217          any file with an absolute name longer than PATH_MAX, such as cygwin.
20218          If so, leave fail as 0, because the current working directory can't
20219          be too long for getcwd if it can't even be created.  For other
20220          errors, be pessimistic and consider that as a failure, too.  */
20221       if (mkdir (DIR_NAME, S_IRWXU) < 0 || chdir (DIR_NAME) < 0)
20222         {
20223           if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
20224             fail = 20;
20225           break;
20226         }
20227
20228       if (PATH_MAX <= cwd_len && cwd_len < PATH_MAX + DIR_NAME_SIZE)
20229         {
20230           c = getcwd (buf, PATH_MAX);
20231           if (!c && errno == ENOENT)
20232             {
20233               fail = 11;
20234               break;
20235             }
20236           if (c)
20237             {
20238               fail = 31;
20239               break;
20240             }
20241           if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
20242             {
20243               fail = 21;
20244               break;
20245             }
20246         }
20247
20248       if (dotdot_max <= cwd_len - initial_cwd_len)
20249         {
20250           if (dotdot_max + DIR_NAME_SIZE < cwd_len - initial_cwd_len)
20251             break;
20252           c = getcwd (buf, cwd_len + 1);
20253           if (!c)
20254             {
20255               if (! (errno == ERANGE || errno == ENOENT
20256                      || is_ENAMETOOLONG (errno)))
20257                 {
20258                   fail = 22;
20259                   break;
20260                 }
20261               if (AT_FDCWD || errno == ERANGE || errno == ENOENT)
20262                 {
20263                   fail = 12;
20264                   break;
20265                 }
20266             }
20267         }
20268
20269       if (c && strlen (c) != cwd_len)
20270         {
20271           fail = 23;
20272           break;
20273         }
20274       ++n_chdirs;
20275     }
20276
20277   /* Leaving behind such a deep directory is not polite.
20278      So clean up here, right away, even though the driving
20279      shell script would also clean up.  */
20280   {
20281     size_t i;
20282
20283     /* Try rmdir first, in case the chdir failed.  */
20284     rmdir (DIR_NAME);
20285     for (i = 0; i <= n_chdirs; i++)
20286       {
20287         if (chdir ("..") < 0)
20288           break;
20289         if (rmdir (DIR_NAME) != 0)
20290           break;
20291       }
20292   }
20293
20294   exit (fail);
20295 #endif
20296 }
20297
20298 _ACEOF
20299 if ac_fn_c_try_run "$LINENO"; then :
20300   gl_cv_func_getcwd_path_max=yes
20301 else
20302   case $? in
20303      10|11|12) gl_cv_func_getcwd_path_max='no, but it is partly working';;
20304      31) gl_cv_func_getcwd_path_max='no, it has the AIX bug';;
20305      *) gl_cv_func_getcwd_path_max=no;;
20306      esac
20307 fi
20308 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20309   conftest.$ac_objext conftest.beam conftest.$ac_ext
20310 fi
20311
20312
20313 fi
20314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_path_max" >&5
20315 $as_echo "$gl_cv_func_getcwd_path_max" >&6; }
20316
20317       case "$gl_cv_func_getcwd_null" in
20318         *yes)
20319
20320
20321
20322
20323   for ac_func in getpagesize
20324 do :
20325   ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
20326 if test "x$ac_cv_func_getpagesize" = xyes; then :
20327   cat >>confdefs.h <<_ACEOF
20328 #define HAVE_GETPAGESIZE 1
20329 _ACEOF
20330
20331 fi
20332 done
20333
20334   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd aborts when 4k < cwd_length < 16k" >&5
20335 $as_echo_n "checking whether getcwd aborts when 4k < cwd_length < 16k... " >&6; }
20336 if ${gl_cv_func_getcwd_abort_bug+:} false; then :
20337   $as_echo_n "(cached) " >&6
20338 else
20339   # Remove any remnants of a previous test.
20340      rm -rf confdir-14B---
20341      # Arrange for deletion of the temporary directory this test creates.
20342      ac_clean_files="$ac_clean_files confdir-14B---"
20343           if test "$cross_compiling" = yes; then :
20344   gl_cv_func_getcwd_abort_bug=yes
20345 else
20346   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20347 /* end confdefs.h.  */
20348
20349 #include <errno.h>
20350 #include <stdlib.h>
20351 #if HAVE_UNISTD_H
20352 # include <unistd.h>
20353 #else /* on Windows with MSVC */
20354 # include <direct.h>
20355 #endif
20356 #include <string.h>
20357 #include <sys/stat.h>
20358
20359
20360 /* Arrange to define PATH_MAX, like "pathmax.h" does. */
20361 #if HAVE_UNISTD_H
20362 # include <unistd.h>
20363 #endif
20364 #include <limits.h>
20365 #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
20366 # include <sys/param.h>
20367 #endif
20368 #if !defined PATH_MAX && defined MAXPATHLEN
20369 # define PATH_MAX MAXPATHLEN
20370 #endif
20371 #ifdef __hpux
20372 # undef PATH_MAX
20373 # define PATH_MAX 1024
20374 #endif
20375 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
20376 # undef PATH_MAX
20377 # define PATH_MAX 260
20378 #endif
20379
20380
20381 /* Don't get link errors because mkdir is redefined to rpl_mkdir.  */
20382 #undef mkdir
20383
20384 #ifndef S_IRWXU
20385 # define S_IRWXU 0700
20386 #endif
20387
20388 /* FIXME: skip the run-test altogether on systems without getpagesize.  */
20389 #if ! HAVE_GETPAGESIZE
20390 # define getpagesize() 0
20391 #endif
20392
20393 /* This size is chosen to be larger than PATH_MAX (4k), yet smaller than
20394    the 16kB pagesize on ia64 linux.  Those conditions make the code below
20395    trigger a bug in glibc's getcwd implementation before 2.4.90-10.  */
20396 #define TARGET_LEN (5 * 1024)
20397
20398 int
20399 main ()
20400 {
20401   char *cwd;
20402   size_t initial_cwd_len;
20403   int fail = 0;
20404
20405   /* The bug is triggered when PATH_MAX < getpagesize (), so skip
20406      this relatively expensive and invasive test if that's not true.  */
20407 #ifdef PATH_MAX
20408   int bug_possible = PATH_MAX < getpagesize ();
20409 #else
20410   int bug_possible = 0;
20411 #endif
20412   if (! bug_possible)
20413     return 0;
20414
20415   cwd = getcwd (NULL, 0);
20416   if (cwd == NULL)
20417     return 2;
20418
20419   initial_cwd_len = strlen (cwd);
20420   free (cwd);
20421
20422   if (1)
20423     {
20424       static char const dir_name[] = "confdir-14B---";
20425       size_t desired_depth = ((TARGET_LEN - 1 - initial_cwd_len)
20426                               / sizeof dir_name);
20427       size_t d;
20428       for (d = 0; d < desired_depth; d++)
20429         {
20430           if (mkdir (dir_name, S_IRWXU) < 0 || chdir (dir_name) < 0)
20431             {
20432               if (! (errno == ERANGE || errno == ENAMETOOLONG
20433                      || errno == ENOENT))
20434                 fail = 3; /* Unable to construct deep hierarchy.  */
20435               break;
20436             }
20437         }
20438
20439       /* If libc has the bug in question, this invocation of getcwd
20440          results in a failed assertion.  */
20441       cwd = getcwd (NULL, 0);
20442       if (cwd == NULL)
20443         fail = 4; /* getcwd didn't assert, but it failed for a long name
20444                      where the answer could have been learned.  */
20445       free (cwd);
20446
20447       /* Call rmdir first, in case the above chdir failed.  */
20448       rmdir (dir_name);
20449       while (0 < d--)
20450         {
20451           if (chdir ("..") < 0)
20452             {
20453               fail = 5;
20454               break;
20455             }
20456           rmdir (dir_name);
20457         }
20458     }
20459
20460   return fail;
20461 }
20462
20463 _ACEOF
20464 if ac_fn_c_try_run "$LINENO"; then :
20465   gl_cv_func_getcwd_abort_bug=no
20466 else
20467                                 ret=$?
20468      if test $ret -ge 128 || test $ret = 4; then
20469        gl_cv_func_getcwd_abort_bug=yes
20470      else
20471        gl_cv_func_getcwd_abort_bug=no
20472      fi
20473 fi
20474 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20475   conftest.$ac_objext conftest.beam conftest.$ac_ext
20476 fi
20477
20478
20479 fi
20480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_abort_bug" >&5
20481 $as_echo "$gl_cv_func_getcwd_abort_bug" >&6; }
20482   if test $gl_cv_func_getcwd_abort_bug = yes; then :
20483   gl_abort_bug=yes
20484 fi
20485
20486           ;;
20487       esac
20488       ;;
20489   esac
20490       case "$gl_cv_func_getcwd_path_max" in
20491     "no"|"no, it has the AIX bug") ;;
20492     *)
20493
20494 $as_echo "#define HAVE_MINIMALLY_WORKING_GETCWD 1" >>confdefs.h
20495
20496       ;;
20497   esac
20498   case "$gl_cv_func_getcwd_path_max" in
20499     "no, but it is partly working")
20500
20501 $as_echo "#define HAVE_PARTLY_WORKING_GETCWD 1" >>confdefs.h
20502
20503       ;;
20504   esac
20505
20506   if { case "$gl_cv_func_getcwd_null" in *yes) false;; *) true;; esac; } \
20507      || test $gl_cv_func_getcwd_posix_signature != yes \
20508      || test "$gl_cv_func_getcwd_path_max" != yes \
20509      || test $gl_abort_bug = yes; then
20510     REPLACE_GETCWD=1
20511   fi
20512
20513   if test $REPLACE_GETCWD = 1; then
20514
20515
20516
20517
20518
20519
20520
20521
20522   gl_LIBOBJS="$gl_LIBOBJS getcwd.$ac_objext"
20523
20524
20525
20526
20527   :
20528
20529   fi
20530
20531
20532 cat >>confdefs.h <<_ACEOF
20533 #define GNULIB_GETCWD 1
20534 _ACEOF
20535
20536
20537
20538
20539
20540
20541
20542           GNULIB_GETCWD=1
20543
20544
20545
20546
20547
20548 $as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
20549
20550
20551
20552
20553
20554
20555
20556
20557   case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_posix_signature in
20558   *yes,yes) ;;
20559   *)
20560         REPLACE_GETCWD=1
20561     ;;
20562   esac
20563
20564   if test $REPLACE_GETCWD = 1; then
20565
20566
20567
20568
20569
20570
20571
20572
20573   gl_LIBOBJS="$gl_LIBOBJS getcwd-lgpl.$ac_objext"
20574
20575   fi
20576
20577
20578
20579
20580
20581           GNULIB_GETCWD=1
20582
20583
20584
20585
20586
20587 $as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
20588
20589
20590
20591
20592
20593
20594
20595
20596
20597
20598
20599   if test $ac_cv_func_getdelim = yes; then
20600     HAVE_GETDELIM=1
20601         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getdelim function" >&5
20602 $as_echo_n "checking for working getdelim function... " >&6; }
20603 if ${gl_cv_func_working_getdelim+:} false; then :
20604   $as_echo_n "(cached) " >&6
20605 else
20606   echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data
20607     if test "$cross_compiling" = yes; then :
20608         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20609 /* end confdefs.h.  */
20610
20611 #include <features.h>
20612 #ifdef __GNU_LIBRARY__
20613  #if (__GLIBC__ >= 2) && !defined __UCLIBC__
20614   Lucky GNU user
20615  #endif
20616 #endif
20617
20618 _ACEOF
20619 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20620   $EGREP "Lucky GNU user" >/dev/null 2>&1; then :
20621   gl_cv_func_working_getdelim="guessing yes"
20622 else
20623   gl_cv_func_working_getdelim="guessing no"
20624 fi
20625 rm -f conftest*
20626
20627
20628 else
20629   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20630 /* end confdefs.h.  */
20631
20632 #    include <stdio.h>
20633 #    include <stdlib.h>
20634 #    include <string.h>
20635     int main ()
20636     {
20637       FILE *in = fopen ("./conftest.data", "r");
20638       if (!in)
20639         return 1;
20640       {
20641         /* Test result for a NULL buffer and a zero size.
20642            Based on a test program from Karl Heuer.  */
20643         char *line = NULL;
20644         size_t siz = 0;
20645         int len = getdelim (&line, &siz, '\n', in);
20646         if (!(len == 4 && line && strcmp (line, "foo\n") == 0))
20647           return 2;
20648       }
20649       {
20650         /* Test result for a NULL buffer and a non-zero size.
20651            This crashes on FreeBSD 8.0.  */
20652         char *line = NULL;
20653         size_t siz = (size_t)(~0) / 4;
20654         if (getdelim (&line, &siz, '\n', in) == -1)
20655           return 3;
20656       }
20657       return 0;
20658     }
20659
20660 _ACEOF
20661 if ac_fn_c_try_run "$LINENO"; then :
20662   gl_cv_func_working_getdelim=yes
20663 else
20664   gl_cv_func_working_getdelim=no
20665 fi
20666 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20667   conftest.$ac_objext conftest.beam conftest.$ac_ext
20668 fi
20669
20670 fi
20671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_getdelim" >&5
20672 $as_echo "$gl_cv_func_working_getdelim" >&6; }
20673     case "$gl_cv_func_working_getdelim" in
20674       *no)
20675         REPLACE_GETDELIM=1
20676         ;;
20677     esac
20678   else
20679     HAVE_GETDELIM=0
20680   fi
20681
20682   if test $ac_cv_have_decl_getdelim = no; then
20683     HAVE_DECL_GETDELIM=0
20684   fi
20685
20686   if test $HAVE_GETDELIM = 0 || test $REPLACE_GETDELIM = 1; then
20687
20688
20689
20690
20691
20692
20693
20694
20695   gl_LIBOBJS="$gl_LIBOBJS getdelim.$ac_objext"
20696
20697
20698   for ac_func in flockfile funlockfile
20699 do :
20700   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
20701 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
20702 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
20703   cat >>confdefs.h <<_ACEOF
20704 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
20705 _ACEOF
20706
20707 fi
20708 done
20709
20710   ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
20711 if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then :
20712   ac_have_decl=1
20713 else
20714   ac_have_decl=0
20715 fi
20716
20717 cat >>confdefs.h <<_ACEOF
20718 #define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
20719 _ACEOF
20720
20721
20722   fi
20723
20724
20725
20726
20727
20728           GNULIB_GETDELIM=1
20729
20730
20731
20732
20733
20734 $as_echo "#define GNULIB_TEST_GETDELIM 1" >>confdefs.h
20735
20736
20737
20738
20739
20740
20741
20742   if test $ac_cv_func_getdtablesize = yes; then
20743     # Cygwin 1.7.25 automatically increases the RLIMIT_NOFILE soft limit
20744     # up to an unchangeable hard limit; all other platforms correctly
20745     # require setrlimit before getdtablesize() can report a larger value.
20746     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getdtablesize works" >&5
20747 $as_echo_n "checking whether getdtablesize works... " >&6; }
20748 if ${gl_cv_func_getdtablesize_works+:} false; then :
20749   $as_echo_n "(cached) " >&6
20750 else
20751   if test "$cross_compiling" = yes; then :
20752   case "$host_os" in
20753           cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows
20754             gl_cv_func_getdtablesize_works="guessing no" ;;
20755           *) gl_cv_func_getdtablesize_works="guessing yes" ;;
20756          esac
20757 else
20758   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20759 /* end confdefs.h.  */
20760
20761         #include <unistd.h>
20762 int
20763 main ()
20764 {
20765 int size = getdtablesize();
20766            if (dup2 (0, getdtablesize()) != -1)
20767              return 1;
20768            if (size != getdtablesize())
20769              return 2;
20770
20771   ;
20772   return 0;
20773 }
20774 _ACEOF
20775 if ac_fn_c_try_run "$LINENO"; then :
20776   gl_cv_func_getdtablesize_works=yes
20777 else
20778   gl_cv_func_getdtablesize_works=no
20779 fi
20780 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20781   conftest.$ac_objext conftest.beam conftest.$ac_ext
20782 fi
20783
20784
20785 fi
20786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getdtablesize_works" >&5
20787 $as_echo "$gl_cv_func_getdtablesize_works" >&6; }
20788     case "$gl_cv_func_getdtablesize_works" in
20789       *yes) ;;
20790       *) REPLACE_GETDTABLESIZE=1 ;;
20791     esac
20792   else
20793     HAVE_GETDTABLESIZE=0
20794   fi
20795
20796   if test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1; then
20797
20798
20799
20800
20801
20802
20803
20804
20805   gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext"
20806
20807     :
20808   fi
20809
20810
20811
20812
20813
20814           GNULIB_GETDTABLESIZE=1
20815
20816
20817
20818
20819
20820 $as_echo "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h
20821
20822
20823
20824
20825
20826
20827
20828
20829         ac_fn_c_check_func "$LINENO" "getgroups" "ac_cv_func_getgroups"
20830 if test "x$ac_cv_func_getgroups" = xyes; then :
20831
20832 fi
20833
20834
20835   # If we don't yet have getgroups, see if it's in -lbsd.
20836   # This is reported to be necessary on an ITOS 3000WS running SEIUX 3.1.
20837   ac_save_LIBS=$LIBS
20838   if test $ac_cv_func_getgroups = no; then
20839     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getgroups in -lbsd" >&5
20840 $as_echo_n "checking for getgroups in -lbsd... " >&6; }
20841 if ${ac_cv_lib_bsd_getgroups+:} false; then :
20842   $as_echo_n "(cached) " >&6
20843 else
20844   ac_check_lib_save_LIBS=$LIBS
20845 LIBS="-lbsd  $LIBS"
20846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20847 /* end confdefs.h.  */
20848
20849 /* Override any GCC internal prototype to avoid an error.
20850    Use char because int might match the return type of a GCC
20851    builtin and then its argument prototype would still apply.  */
20852 #ifdef __cplusplus
20853 extern "C"
20854 #endif
20855 char getgroups ();
20856 int
20857 main ()
20858 {
20859 return getgroups ();
20860   ;
20861   return 0;
20862 }
20863 _ACEOF
20864 if ac_fn_c_try_link "$LINENO"; then :
20865   ac_cv_lib_bsd_getgroups=yes
20866 else
20867   ac_cv_lib_bsd_getgroups=no
20868 fi
20869 rm -f core conftest.err conftest.$ac_objext \
20870     conftest$ac_exeext conftest.$ac_ext
20871 LIBS=$ac_check_lib_save_LIBS
20872 fi
20873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_getgroups" >&5
20874 $as_echo "$ac_cv_lib_bsd_getgroups" >&6; }
20875 if test "x$ac_cv_lib_bsd_getgroups" = xyes; then :
20876   GETGROUPS_LIB=-lbsd
20877 fi
20878
20879   fi
20880
20881   # Run the program to test the functionality of the system-supplied
20882   # getgroups function only if there is such a function.
20883   if test $ac_cv_func_getgroups = yes; then
20884     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getgroups" >&5
20885 $as_echo_n "checking for working getgroups... " >&6; }
20886 if ${ac_cv_func_getgroups_works+:} false; then :
20887   $as_echo_n "(cached) " >&6
20888 else
20889   if test "$cross_compiling" = yes; then :
20890   case "$host_os" in # ((
20891                     # Guess yes on glibc systems.
20892             *-gnu*) ac_cv_func_getgroups_works="guessing yes" ;;
20893                     # If we don't know, assume the worst.
20894             *)      ac_cv_func_getgroups_works="guessing no" ;;
20895           esac
20896
20897 else
20898   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20899 /* end confdefs.h.  */
20900 $ac_includes_default
20901 int
20902 main ()
20903 {
20904 /* On Ultrix 4.3, getgroups (0, 0) always fails.  */
20905               return getgroups (0, 0) == -1;
20906   ;
20907   return 0;
20908 }
20909
20910 _ACEOF
20911 if ac_fn_c_try_run "$LINENO"; then :
20912   ac_cv_func_getgroups_works=yes
20913 else
20914   ac_cv_func_getgroups_works=no
20915 fi
20916 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20917   conftest.$ac_objext conftest.beam conftest.$ac_ext
20918 fi
20919
20920
20921 fi
20922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getgroups_works" >&5
20923 $as_echo "$ac_cv_func_getgroups_works" >&6; }
20924   else
20925     ac_cv_func_getgroups_works=no
20926   fi
20927   case "$ac_cv_func_getgroups_works" in
20928     *yes)
20929
20930 $as_echo "#define HAVE_GETGROUPS 1" >>confdefs.h
20931
20932       ;;
20933   esac
20934   LIBS=$ac_save_LIBS
20935
20936   if test $ac_cv_func_getgroups != yes; then
20937     HAVE_GETGROUPS=0
20938   else
20939     if test "$ac_cv_type_getgroups" != gid_t \
20940        || { case "$ac_cv_func_getgroups_works" in
20941               *yes) false;;
20942               *) true;;
20943             esac
20944           }; then
20945       REPLACE_GETGROUPS=1
20946
20947 $as_echo "#define GETGROUPS_ZERO_BUG 1" >>confdefs.h
20948
20949     else
20950             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getgroups handles negative values" >&5
20951 $as_echo_n "checking whether getgroups handles negative values... " >&6; }
20952 if ${gl_cv_func_getgroups_works+:} false; then :
20953   $as_echo_n "(cached) " >&6
20954 else
20955   if test "$cross_compiling" = yes; then :
20956   case "$host_os" in
20957                      # Guess yes on glibc systems.
20958              *-gnu*) gl_cv_func_getgroups_works="guessing yes" ;;
20959                      # If we don't know, assume the worst.
20960              *)      gl_cv_func_getgroups_works="guessing no" ;;
20961            esac
20962
20963 else
20964   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20965 /* end confdefs.h.  */
20966 $ac_includes_default
20967 int
20968 main ()
20969 {
20970 int size = getgroups (0, 0);
20971             gid_t *list = malloc (size * sizeof *list);
20972             return getgroups (-1, list) != -1;
20973   ;
20974   return 0;
20975 }
20976 _ACEOF
20977 if ac_fn_c_try_run "$LINENO"; then :
20978   gl_cv_func_getgroups_works=yes
20979 else
20980   gl_cv_func_getgroups_works=no
20981 fi
20982 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20983   conftest.$ac_objext conftest.beam conftest.$ac_ext
20984 fi
20985
20986 fi
20987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getgroups_works" >&5
20988 $as_echo "$gl_cv_func_getgroups_works" >&6; }
20989       case "$gl_cv_func_getgroups_works" in
20990         *yes) ;;
20991         *) REPLACE_GETGROUPS=1 ;;
20992       esac
20993     fi
20994   fi
20995   test -n "$GETGROUPS_LIB" && LIBS="$GETGROUPS_LIB $LIBS"
20996
20997   if test $HAVE_GETGROUPS = 0 || test $REPLACE_GETGROUPS = 1; then
20998
20999
21000
21001
21002
21003
21004
21005
21006   gl_LIBOBJS="$gl_LIBOBJS getgroups.$ac_objext"
21007
21008   fi
21009
21010
21011
21012
21013
21014           GNULIB_GETGROUPS=1
21015
21016
21017
21018
21019
21020 $as_echo "#define GNULIB_TEST_GETGROUPS 1" >>confdefs.h
21021
21022
21023
21024
21025
21026
21027
21028
21029
21030
21031   gl_getline_needs_run_time_check=no
21032   ac_fn_c_check_func "$LINENO" "getline" "ac_cv_func_getline"
21033 if test "x$ac_cv_func_getline" = xyes; then :
21034                    gl_getline_needs_run_time_check=yes
21035 else
21036   am_cv_func_working_getline=no
21037 fi
21038
21039   if test $gl_getline_needs_run_time_check = yes; then
21040     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getline function" >&5
21041 $as_echo_n "checking for working getline function... " >&6; }
21042 if ${am_cv_func_working_getline+:} false; then :
21043   $as_echo_n "(cached) " >&6
21044 else
21045   echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data
21046     if test "$cross_compiling" = yes; then :
21047         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21048 /* end confdefs.h.  */
21049
21050 #include <features.h>
21051 #ifdef __GNU_LIBRARY__
21052  #if (__GLIBC__ >= 2) && !defined __UCLIBC__
21053   Lucky GNU user
21054  #endif
21055 #endif
21056
21057 _ACEOF
21058 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21059   $EGREP "Lucky GNU user" >/dev/null 2>&1; then :
21060   am_cv_func_working_getline="guessing yes"
21061 else
21062   am_cv_func_working_getline="guessing no"
21063 fi
21064 rm -f conftest*
21065
21066
21067 else
21068   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21069 /* end confdefs.h.  */
21070
21071 #    include <stdio.h>
21072 #    include <stdlib.h>
21073 #    include <string.h>
21074     int main ()
21075     {
21076       FILE *in = fopen ("./conftest.data", "r");
21077       if (!in)
21078         return 1;
21079       {
21080         /* Test result for a NULL buffer and a zero size.
21081            Based on a test program from Karl Heuer.  */
21082         char *line = NULL;
21083         size_t siz = 0;
21084         int len = getline (&line, &siz, in);
21085         if (!(len == 4 && line && strcmp (line, "foo\n") == 0))
21086           return 2;
21087       }
21088       {
21089         /* Test result for a NULL buffer and a non-zero size.
21090            This crashes on FreeBSD 8.0.  */
21091         char *line = NULL;
21092         size_t siz = (size_t)(~0) / 4;
21093         if (getline (&line, &siz, in) == -1)
21094           return 3;
21095       }
21096       return 0;
21097     }
21098
21099 _ACEOF
21100 if ac_fn_c_try_run "$LINENO"; then :
21101   am_cv_func_working_getline=yes
21102 else
21103   am_cv_func_working_getline=no
21104 fi
21105 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21106   conftest.$ac_objext conftest.beam conftest.$ac_ext
21107 fi
21108
21109 fi
21110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_working_getline" >&5
21111 $as_echo "$am_cv_func_working_getline" >&6; }
21112   fi
21113
21114   if test $ac_cv_have_decl_getline = no; then
21115     HAVE_DECL_GETLINE=0
21116   fi
21117
21118   case "$am_cv_func_working_getline" in
21119     *no)
21120                         REPLACE_GETLINE=1
21121       ;;
21122   esac
21123
21124   if test $REPLACE_GETLINE = 1; then
21125
21126
21127
21128
21129
21130
21131
21132
21133   gl_LIBOBJS="$gl_LIBOBJS getline.$ac_objext"
21134
21135
21136   :
21137
21138   fi
21139
21140
21141
21142
21143
21144           GNULIB_GETLINE=1
21145
21146
21147
21148
21149
21150 $as_echo "#define GNULIB_TEST_GETLINE 1" >>confdefs.h
21151
21152
21153
21154
21155
21156
21157
21158
21159   if test $REPLACE_GETOPT = 1; then
21160
21161
21162
21163
21164
21165
21166
21167
21168   gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
21169
21170
21171
21172
21173
21174
21175
21176
21177
21178   gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
21179
21180
21181
21182
21183         GNULIB_GL_UNISTD_H_GETOPT=1
21184   fi
21185
21186
21187
21188 $as_echo "#define GNULIB_TEST_GETOPT_GNU 1" >>confdefs.h
21189
21190
21191
21192
21193
21194
21195
21196     REPLACE_GETOPT=1
21197
21198   if test $REPLACE_GETOPT = 1; then
21199
21200   GETOPT_H=getopt.h
21201
21202 $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
21203
21204
21205
21206   fi
21207
21208   if test $REPLACE_GETOPT = 1; then
21209
21210
21211
21212
21213
21214
21215
21216
21217   gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
21218
21219
21220
21221
21222
21223
21224
21225
21226
21227   gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
21228
21229
21230
21231
21232         GNULIB_GL_UNISTD_H_GETOPT=1
21233   fi
21234
21235
21236
21237
21238   for ac_func in getpagesize
21239 do :
21240   ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
21241 if test "x$ac_cv_func_getpagesize" = xyes; then :
21242   cat >>confdefs.h <<_ACEOF
21243 #define HAVE_GETPAGESIZE 1
21244 _ACEOF
21245
21246 fi
21247 done
21248
21249   if test $ac_cv_func_getpagesize = no; then
21250     HAVE_GETPAGESIZE=0
21251     for ac_header in OS.h
21252 do :
21253   ac_fn_c_check_header_mongrel "$LINENO" "OS.h" "ac_cv_header_OS_h" "$ac_includes_default"
21254 if test "x$ac_cv_header_OS_h" = xyes; then :
21255   cat >>confdefs.h <<_ACEOF
21256 #define HAVE_OS_H 1
21257 _ACEOF
21258
21259 fi
21260
21261 done
21262
21263     if test $ac_cv_header_OS_h = yes; then
21264       HAVE_OS_H=1
21265     fi
21266     for ac_header in sys/param.h
21267 do :
21268   ac_fn_c_check_header_mongrel "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default"
21269 if test "x$ac_cv_header_sys_param_h" = xyes; then :
21270   cat >>confdefs.h <<_ACEOF
21271 #define HAVE_SYS_PARAM_H 1
21272 _ACEOF
21273
21274 fi
21275
21276 done
21277
21278     if test $ac_cv_header_sys_param_h = yes; then
21279       HAVE_SYS_PARAM_H=1
21280     fi
21281   fi
21282   case "$host_os" in
21283     mingw*)
21284       REPLACE_GETPAGESIZE=1
21285       ;;
21286   esac
21287       ac_fn_c_check_decl "$LINENO" "getpagesize" "ac_cv_have_decl_getpagesize" "$ac_includes_default"
21288 if test "x$ac_cv_have_decl_getpagesize" = xyes; then :
21289
21290 else
21291   HAVE_DECL_GETPAGESIZE=0
21292 fi
21293
21294
21295   if test $REPLACE_GETPAGESIZE = 1; then
21296
21297
21298
21299
21300
21301
21302
21303
21304   gl_LIBOBJS="$gl_LIBOBJS getpagesize.$ac_objext"
21305
21306   fi
21307
21308
21309
21310
21311
21312           GNULIB_GETPAGESIZE=1
21313
21314
21315
21316
21317
21318 $as_echo "#define GNULIB_TEST_GETPAGESIZE 1" >>confdefs.h
21319
21320
21321
21322
21323
21324
21325
21326
21327
21328
21329
21330
21331
21332
21333
21334
21335
21336   gl_gettimeofday_timezone=void
21337   if test $ac_cv_func_gettimeofday != yes; then
21338     HAVE_GETTIMEOFDAY=0
21339   else
21340
21341
21342
21343  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5
21344 $as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; }
21345 if ${gl_cv_func_gettimeofday_clobber+:} false; then :
21346   $as_echo_n "(cached) " >&6
21347 else
21348   if test "$cross_compiling" = yes; then :
21349   # When cross-compiling:
21350       case "$host_os" in
21351                 # Guess all is fine on glibc systems.
21352         *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
21353                 # If we don't know, assume the worst.
21354         *)      gl_cv_func_gettimeofday_clobber="guessing yes" ;;
21355       esac
21356
21357 else
21358   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21359 /* end confdefs.h.  */
21360 #include <string.h>
21361           #include <sys/time.h>
21362           #include <time.h>
21363           #include <stdlib.h>
21364
21365 int
21366 main ()
21367 {
21368
21369           time_t t = 0;
21370           struct tm *lt;
21371           struct tm saved_lt;
21372           struct timeval tv;
21373           lt = localtime (&t);
21374           saved_lt = *lt;
21375           gettimeofday (&tv, NULL);
21376           return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
21377
21378   ;
21379   return 0;
21380 }
21381 _ACEOF
21382 if ac_fn_c_try_run "$LINENO"; then :
21383   gl_cv_func_gettimeofday_clobber=no
21384 else
21385   gl_cv_func_gettimeofday_clobber=yes
21386 fi
21387 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21388   conftest.$ac_objext conftest.beam conftest.$ac_ext
21389 fi
21390
21391 fi
21392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5
21393 $as_echo "$gl_cv_func_gettimeofday_clobber" >&6; }
21394
21395  case "$gl_cv_func_gettimeofday_clobber" in
21396    *yes)
21397      REPLACE_GETTIMEOFDAY=1
21398
21399   REPLACE_GMTIME=1
21400   REPLACE_LOCALTIME=1
21401
21402
21403 $as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
21404
21405      ;;
21406  esac
21407
21408     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
21409 $as_echo_n "checking for gettimeofday with POSIX signature... " >&6; }
21410 if ${gl_cv_func_gettimeofday_posix_signature+:} false; then :
21411   $as_echo_n "(cached) " >&6
21412 else
21413   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21414 /* end confdefs.h.  */
21415 #include <sys/time.h>
21416               struct timeval c;
21417               int gettimeofday (struct timeval *restrict, void *restrict);
21418
21419 int
21420 main ()
21421 {
21422 /* glibc uses struct timezone * rather than the POSIX void *
21423                  if _GNU_SOURCE is defined.  However, since the only portable
21424                  use of gettimeofday uses NULL as the second parameter, and
21425                  since the glibc definition is actually more typesafe, it is
21426                  not worth wrapping this to get a compliant signature.  */
21427               int (*f) (struct timeval *restrict, void *restrict)
21428                 = gettimeofday;
21429               int x = f (&c, 0);
21430               return !(x | c.tv_sec | c.tv_usec);
21431
21432   ;
21433   return 0;
21434 }
21435 _ACEOF
21436 if ac_fn_c_try_compile "$LINENO"; then :
21437   gl_cv_func_gettimeofday_posix_signature=yes
21438 else
21439   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21440 /* end confdefs.h.  */
21441 #include <sys/time.h>
21442 int gettimeofday (struct timeval *restrict, struct timezone *restrict);
21443
21444 int
21445 main ()
21446 {
21447
21448   ;
21449   return 0;
21450 }
21451 _ACEOF
21452 if ac_fn_c_try_compile "$LINENO"; then :
21453   gl_cv_func_gettimeofday_posix_signature=almost
21454 else
21455   gl_cv_func_gettimeofday_posix_signature=no
21456 fi
21457 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21458 fi
21459 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21460 fi
21461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
21462 $as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; }
21463     if test $gl_cv_func_gettimeofday_posix_signature = almost; then
21464       gl_gettimeofday_timezone='struct timezone'
21465     elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
21466       REPLACE_GETTIMEOFDAY=1
21467     fi
21468         if test $REPLACE_STRUCT_TIMEVAL = 1; then
21469       REPLACE_GETTIMEOFDAY=1
21470     fi
21471
21472   fi
21473
21474 cat >>confdefs.h <<_ACEOF
21475 #define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone
21476 _ACEOF
21477
21478
21479   if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
21480
21481
21482
21483
21484
21485
21486
21487
21488   gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
21489
21490
21491   for ac_header in sys/timeb.h
21492 do :
21493   ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
21494 if test "x$ac_cv_header_sys_timeb_h" = xyes; then :
21495   cat >>confdefs.h <<_ACEOF
21496 #define HAVE_SYS_TIMEB_H 1
21497 _ACEOF
21498
21499 fi
21500
21501 done
21502
21503   for ac_func in _ftime
21504 do :
21505   ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
21506 if test "x$ac_cv_func__ftime" = xyes; then :
21507   cat >>confdefs.h <<_ACEOF
21508 #define HAVE__FTIME 1
21509 _ACEOF
21510
21511 fi
21512 done
21513
21514
21515   fi
21516
21517
21518
21519
21520
21521           GNULIB_GETTIMEOFDAY=1
21522
21523
21524
21525
21526
21527 $as_echo "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h
21528
21529
21530
21531
21532
21533
21534
21535
21536       ac_fn_c_check_func "$LINENO" "group_member" "ac_cv_func_group_member"
21537 if test "x$ac_cv_func_group_member" = xyes; then :
21538
21539 else
21540
21541     HAVE_GROUP_MEMBER=0
21542
21543 fi
21544
21545
21546   if test $HAVE_GROUP_MEMBER = 0; then
21547
21548
21549
21550
21551
21552
21553
21554
21555   gl_LIBOBJS="$gl_LIBOBJS group-member.$ac_objext"
21556
21557
21558
21559
21560   fi
21561
21562
21563
21564
21565
21566           GNULIB_GROUP_MEMBER=1
21567
21568
21569
21570
21571
21572 $as_echo "#define GNULIB_TEST_GROUP_MEMBER 1" >>confdefs.h
21573
21574
21575
21576
21577   :
21578
21579
21580
21581
21582   :
21583
21584   :
21585   :
21586   :
21587   :
21588
21589
21590
21591
21592
21593
21594   PRIPTR_PREFIX=
21595   if test -n "$STDINT_H"; then
21596         PRIPTR_PREFIX='"l"'
21597   else
21598         for glpfx in '' l ll I64; do
21599       case $glpfx in
21600         '')  gltype1='int';;
21601         l)   gltype1='long int';;
21602         ll)  gltype1='long long int';;
21603         I64) gltype1='__int64';;
21604       esac
21605       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21606 /* end confdefs.h.  */
21607 #include <stdint.h>
21608            extern intptr_t foo;
21609            extern $gltype1 foo;
21610 int
21611 main ()
21612 {
21613
21614   ;
21615   return 0;
21616 }
21617 _ACEOF
21618 if ac_fn_c_try_compile "$LINENO"; then :
21619   PRIPTR_PREFIX='"'$glpfx'"'
21620 fi
21621 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21622       test -n "$PRIPTR_PREFIX" && break
21623     done
21624   fi
21625
21626
21627
21628   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT32_MAX < INTMAX_MAX" >&5
21629 $as_echo_n "checking whether INT32_MAX < INTMAX_MAX... " >&6; }
21630 if ${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+:} false; then :
21631   $as_echo_n "(cached) " >&6
21632 else
21633   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21634 /* end confdefs.h.  */
21635 /* Work also in C++ mode.  */
21636             #define __STDC_LIMIT_MACROS 1
21637
21638             /* Work if build is not clean.  */
21639             #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
21640
21641             #include <limits.h>
21642             #if HAVE_STDINT_H
21643              #include <stdint.h>
21644             #endif
21645
21646             #if defined INT32_MAX && defined INTMAX_MAX
21647              #define CONDITION (INT32_MAX < INTMAX_MAX)
21648             #elif HAVE_LONG_LONG_INT
21649              #define CONDITION (sizeof (int) < sizeof (long long int))
21650             #else
21651              #define CONDITION 0
21652             #endif
21653             int test[CONDITION ? 1 : -1];
21654 int
21655 main ()
21656 {
21657
21658   ;
21659   return 0;
21660 }
21661 _ACEOF
21662 if ac_fn_c_try_compile "$LINENO"; then :
21663   gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes
21664 else
21665   gl_cv_test_INT32_MAX_LT_INTMAX_MAX=no
21666 fi
21667 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21668 fi
21669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&5
21670 $as_echo "$gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&6; }
21671   if test $gl_cv_test_INT32_MAX_LT_INTMAX_MAX = yes; then
21672     INT32_MAX_LT_INTMAX_MAX=1;
21673   else
21674     INT32_MAX_LT_INTMAX_MAX=0;
21675   fi
21676
21677
21678   if test $APPLE_UNIVERSAL_BUILD = 0; then
21679
21680   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT64_MAX == LONG_MAX" >&5
21681 $as_echo_n "checking whether INT64_MAX == LONG_MAX... " >&6; }
21682 if ${gl_cv_test_INT64_MAX_EQ_LONG_MAX+:} false; then :
21683   $as_echo_n "(cached) " >&6
21684 else
21685   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21686 /* end confdefs.h.  */
21687 /* Work also in C++ mode.  */
21688             #define __STDC_LIMIT_MACROS 1
21689
21690             /* Work if build is not clean.  */
21691             #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
21692
21693             #include <limits.h>
21694             #if HAVE_STDINT_H
21695              #include <stdint.h>
21696             #endif
21697
21698             #if defined INT64_MAX
21699              #define CONDITION (INT64_MAX == LONG_MAX)
21700             #elif HAVE_LONG_LONG_INT
21701              #define CONDITION (sizeof (long long int) == sizeof (long int))
21702             #else
21703              #define CONDITION 0
21704             #endif
21705             int test[CONDITION ? 1 : -1];
21706 int
21707 main ()
21708 {
21709
21710   ;
21711   return 0;
21712 }
21713 _ACEOF
21714 if ac_fn_c_try_compile "$LINENO"; then :
21715   gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes
21716 else
21717   gl_cv_test_INT64_MAX_EQ_LONG_MAX=no
21718 fi
21719 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21720 fi
21721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&5
21722 $as_echo "$gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&6; }
21723   if test $gl_cv_test_INT64_MAX_EQ_LONG_MAX = yes; then
21724     INT64_MAX_EQ_LONG_MAX=1;
21725   else
21726     INT64_MAX_EQ_LONG_MAX=0;
21727   fi
21728
21729
21730   else
21731     INT64_MAX_EQ_LONG_MAX=-1
21732   fi
21733
21734   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT32_MAX < UINTMAX_MAX" >&5
21735 $as_echo_n "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; }
21736 if ${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+:} false; then :
21737   $as_echo_n "(cached) " >&6
21738 else
21739   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21740 /* end confdefs.h.  */
21741 /* Work also in C++ mode.  */
21742             #define __STDC_LIMIT_MACROS 1
21743
21744             /* Work if build is not clean.  */
21745             #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
21746
21747             #include <limits.h>
21748             #if HAVE_STDINT_H
21749              #include <stdint.h>
21750             #endif
21751
21752             #if defined UINT32_MAX && defined UINTMAX_MAX
21753              #define CONDITION (UINT32_MAX < UINTMAX_MAX)
21754             #elif HAVE_LONG_LONG_INT
21755              #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int))
21756             #else
21757              #define CONDITION 0
21758             #endif
21759             int test[CONDITION ? 1 : -1];
21760 int
21761 main ()
21762 {
21763
21764   ;
21765   return 0;
21766 }
21767 _ACEOF
21768 if ac_fn_c_try_compile "$LINENO"; then :
21769   gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes
21770 else
21771   gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=no
21772 fi
21773 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21774 fi
21775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&5
21776 $as_echo "$gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&6; }
21777   if test $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX = yes; then
21778     UINT32_MAX_LT_UINTMAX_MAX=1;
21779   else
21780     UINT32_MAX_LT_UINTMAX_MAX=0;
21781   fi
21782
21783
21784   if test $APPLE_UNIVERSAL_BUILD = 0; then
21785
21786   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT64_MAX == ULONG_MAX" >&5
21787 $as_echo_n "checking whether UINT64_MAX == ULONG_MAX... " >&6; }
21788 if ${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+:} false; then :
21789   $as_echo_n "(cached) " >&6
21790 else
21791   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21792 /* end confdefs.h.  */
21793 /* Work also in C++ mode.  */
21794             #define __STDC_LIMIT_MACROS 1
21795
21796             /* Work if build is not clean.  */
21797             #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
21798
21799             #include <limits.h>
21800             #if HAVE_STDINT_H
21801              #include <stdint.h>
21802             #endif
21803
21804             #if defined UINT64_MAX
21805              #define CONDITION (UINT64_MAX == ULONG_MAX)
21806             #elif HAVE_LONG_LONG_INT
21807              #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int))
21808             #else
21809              #define CONDITION 0
21810             #endif
21811             int test[CONDITION ? 1 : -1];
21812 int
21813 main ()
21814 {
21815
21816   ;
21817   return 0;
21818 }
21819 _ACEOF
21820 if ac_fn_c_try_compile "$LINENO"; then :
21821   gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes
21822 else
21823   gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=no
21824 fi
21825 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21826 fi
21827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&5
21828 $as_echo "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; }
21829   if test $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX = yes; then
21830     UINT64_MAX_EQ_ULONG_MAX=1;
21831   else
21832     UINT64_MAX_EQ_ULONG_MAX=0;
21833   fi
21834
21835
21836   else
21837     UINT64_MAX_EQ_ULONG_MAX=-1
21838   fi
21839
21840
21841
21842
21843
21844          case $host_os in
21845     mingw*) REPLACE_ISATTY=1 ;;
21846   esac
21847
21848   if test $REPLACE_ISATTY = 1; then
21849
21850
21851
21852
21853
21854
21855
21856
21857   gl_LIBOBJS="$gl_LIBOBJS isatty.$ac_objext"
21858
21859     :
21860   fi
21861
21862
21863
21864
21865
21866           GNULIB_ISATTY=1
21867
21868
21869
21870
21871
21872 $as_echo "#define GNULIB_TEST_ISATTY 1" >>confdefs.h
21873
21874
21875
21876
21877
21878
21879
21880
21881   ac_fn_c_check_decl "$LINENO" "iswblank" "ac_cv_have_decl_iswblank" "
21882 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
21883    <wchar.h>.
21884    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
21885    before <wchar.h>.  */
21886 #include <stddef.h>
21887 #include <stdio.h>
21888 #include <time.h>
21889 #include <wchar.h>
21890 #include <wctype.h>
21891
21892 "
21893 if test "x$ac_cv_have_decl_iswblank" = xyes; then :
21894   ac_have_decl=1
21895 else
21896   ac_have_decl=0
21897 fi
21898
21899 cat >>confdefs.h <<_ACEOF
21900 #define HAVE_DECL_ISWBLANK $ac_have_decl
21901 _ACEOF
21902
21903   if test $ac_cv_func_iswblank = no; then
21904     HAVE_ISWBLANK=0
21905     if test $ac_cv_have_decl_iswblank = yes; then
21906       REPLACE_ISWBLANK=1
21907     fi
21908   fi
21909   if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
21910         :
21911   else
21912     if test $HAVE_ISWBLANK = 0 || test $REPLACE_ISWBLANK = 1; then
21913             :
21914     fi
21915   fi
21916
21917
21918   if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
21919     :
21920   else
21921     if test $HAVE_ISWBLANK = 0 || test $REPLACE_ISWBLANK = 1; then
21922
21923
21924
21925
21926
21927
21928
21929
21930   gl_LIBOBJS="$gl_LIBOBJS iswblank.$ac_objext"
21931
21932     fi
21933   fi
21934
21935
21936
21937
21938
21939           GNULIB_ISWBLANK=1
21940
21941
21942
21943
21944
21945 $as_echo "#define GNULIB_TEST_ISWBLANK 1" >>confdefs.h
21946
21947
21948
21949
21950
21951
21952
21953
21954
21955
21956
21957
21958
21959
21960
21961
21962
21963      if test $gl_cv_have_include_next = yes; then
21964        gl_cv_next_langinfo_h='<'langinfo.h'>'
21965      else
21966        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <langinfo.h>" >&5
21967 $as_echo_n "checking absolute name of <langinfo.h>... " >&6; }
21968 if ${gl_cv_next_langinfo_h+:} false; then :
21969   $as_echo_n "(cached) " >&6
21970 else
21971
21972              if test $ac_cv_header_langinfo_h = yes; then
21973
21974
21975
21976
21977   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21978 /* end confdefs.h.  */
21979 #include <langinfo.h>
21980 _ACEOF
21981                 case "$host_os" in
21982     aix*) gl_absname_cpp="$ac_cpp -C" ;;
21983     *)    gl_absname_cpp="$ac_cpp" ;;
21984   esac
21985
21986   case "$host_os" in
21987     mingw*)
21988                                           gl_dirsep_regex='[/\\]'
21989       ;;
21990     *)
21991       gl_dirsep_regex='\/'
21992       ;;
21993   esac
21994       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21995   gl_header_literal_regex=`echo 'langinfo.h' \
21996                            | sed -e "$gl_make_literal_regex_sed"`
21997   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21998       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21999       s|^/[^/]|//&|
22000       p
22001       q
22002     }'
22003
22004         gl_cv_absolute_langinfo_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22005   sed -n "$gl_absolute_header_sed"`
22006
22007            gl_header=$gl_cv_absolute_langinfo_h
22008            gl_cv_next_langinfo_h='"'$gl_header'"'
22009           else
22010                gl_cv_next_langinfo_h='<'langinfo.h'>'
22011              fi
22012
22013
22014 fi
22015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_langinfo_h" >&5
22016 $as_echo "$gl_cv_next_langinfo_h" >&6; }
22017      fi
22018      NEXT_LANGINFO_H=$gl_cv_next_langinfo_h
22019
22020      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22021        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22022        gl_next_as_first_directive='<'langinfo.h'>'
22023      else
22024        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22025        gl_next_as_first_directive=$gl_cv_next_langinfo_h
22026      fi
22027      NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H=$gl_next_as_first_directive
22028
22029
22030
22031
22032
22033     HAVE_LANGINFO_CODESET=0
22034   HAVE_LANGINFO_T_FMT_AMPM=0
22035   HAVE_LANGINFO_ERA=0
22036   HAVE_LANGINFO_YESEXPR=0
22037
22038   if test $ac_cv_header_langinfo_h = yes; then
22039     HAVE_LANGINFO_H=1
22040             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines CODESET" >&5
22041 $as_echo_n "checking whether langinfo.h defines CODESET... " >&6; }
22042 if ${gl_cv_header_langinfo_codeset+:} false; then :
22043   $as_echo_n "(cached) " >&6
22044 else
22045   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22046 /* end confdefs.h.  */
22047 #include <langinfo.h>
22048 int a = CODESET;
22049
22050 int
22051 main ()
22052 {
22053
22054   ;
22055   return 0;
22056 }
22057 _ACEOF
22058 if ac_fn_c_try_compile "$LINENO"; then :
22059   gl_cv_header_langinfo_codeset=yes
22060 else
22061   gl_cv_header_langinfo_codeset=no
22062 fi
22063 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22064
22065 fi
22066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_codeset" >&5
22067 $as_echo "$gl_cv_header_langinfo_codeset" >&6; }
22068     if test $gl_cv_header_langinfo_codeset = yes; then
22069       HAVE_LANGINFO_CODESET=1
22070     fi
22071     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines T_FMT_AMPM" >&5
22072 $as_echo_n "checking whether langinfo.h defines T_FMT_AMPM... " >&6; }
22073 if ${gl_cv_header_langinfo_t_fmt_ampm+:} false; then :
22074   $as_echo_n "(cached) " >&6
22075 else
22076   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22077 /* end confdefs.h.  */
22078 #include <langinfo.h>
22079 int a = T_FMT_AMPM;
22080
22081 int
22082 main ()
22083 {
22084
22085   ;
22086   return 0;
22087 }
22088 _ACEOF
22089 if ac_fn_c_try_compile "$LINENO"; then :
22090   gl_cv_header_langinfo_t_fmt_ampm=yes
22091 else
22092   gl_cv_header_langinfo_t_fmt_ampm=no
22093 fi
22094 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22095
22096 fi
22097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_t_fmt_ampm" >&5
22098 $as_echo "$gl_cv_header_langinfo_t_fmt_ampm" >&6; }
22099     if test $gl_cv_header_langinfo_t_fmt_ampm = yes; then
22100       HAVE_LANGINFO_T_FMT_AMPM=1
22101     fi
22102     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines ERA" >&5
22103 $as_echo_n "checking whether langinfo.h defines ERA... " >&6; }
22104 if ${gl_cv_header_langinfo_era+:} false; then :
22105   $as_echo_n "(cached) " >&6
22106 else
22107   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22108 /* end confdefs.h.  */
22109 #include <langinfo.h>
22110 int a = ERA;
22111
22112 int
22113 main ()
22114 {
22115
22116   ;
22117   return 0;
22118 }
22119 _ACEOF
22120 if ac_fn_c_try_compile "$LINENO"; then :
22121   gl_cv_header_langinfo_era=yes
22122 else
22123   gl_cv_header_langinfo_era=no
22124 fi
22125 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22126
22127 fi
22128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_era" >&5
22129 $as_echo "$gl_cv_header_langinfo_era" >&6; }
22130     if test $gl_cv_header_langinfo_era = yes; then
22131       HAVE_LANGINFO_ERA=1
22132     fi
22133     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines YESEXPR" >&5
22134 $as_echo_n "checking whether langinfo.h defines YESEXPR... " >&6; }
22135 if ${gl_cv_header_langinfo_yesexpr+:} false; then :
22136   $as_echo_n "(cached) " >&6
22137 else
22138   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22139 /* end confdefs.h.  */
22140 #include <langinfo.h>
22141 int a = YESEXPR;
22142
22143 int
22144 main ()
22145 {
22146
22147   ;
22148   return 0;
22149 }
22150 _ACEOF
22151 if ac_fn_c_try_compile "$LINENO"; then :
22152   gl_cv_header_langinfo_yesexpr=yes
22153 else
22154   gl_cv_header_langinfo_yesexpr=no
22155 fi
22156 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22157
22158 fi
22159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_yesexpr" >&5
22160 $as_echo "$gl_cv_header_langinfo_yesexpr" >&6; }
22161     if test $gl_cv_header_langinfo_yesexpr = yes; then
22162       HAVE_LANGINFO_YESEXPR=1
22163     fi
22164   else
22165     HAVE_LANGINFO_H=0
22166   fi
22167
22168
22169
22170
22171
22172
22173
22174     for gl_func in nl_langinfo; do
22175     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
22176     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
22177 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
22178 if eval \${$as_gl_Symbol+:} false; then :
22179   $as_echo_n "(cached) " >&6
22180 else
22181   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22182 /* end confdefs.h.  */
22183 #include <langinfo.h>
22184
22185 int
22186 main ()
22187 {
22188 #undef $gl_func
22189   (void) $gl_func;
22190   ;
22191   return 0;
22192 }
22193 _ACEOF
22194 if ac_fn_c_try_compile "$LINENO"; then :
22195   eval "$as_gl_Symbol=yes"
22196 else
22197   eval "$as_gl_Symbol=no"
22198 fi
22199 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22200 fi
22201 eval ac_res=\$$as_gl_Symbol
22202                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
22203 $as_echo "$ac_res" >&6; }
22204     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
22205   cat >>confdefs.h <<_ACEOF
22206 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
22207 _ACEOF
22208
22209                      eval ac_cv_have_decl_$gl_func=yes
22210 fi
22211       done
22212
22213
22214
22215
22216
22217
22218
22219   for ac_func in lchown
22220 do :
22221   ac_fn_c_check_func "$LINENO" "lchown" "ac_cv_func_lchown"
22222 if test "x$ac_cv_func_lchown" = xyes; then :
22223   cat >>confdefs.h <<_ACEOF
22224 #define HAVE_LCHOWN 1
22225 _ACEOF
22226
22227 fi
22228 done
22229
22230   if test $ac_cv_func_lchown = no; then
22231     HAVE_LCHOWN=0
22232   else
22233         case "$gl_cv_func_chown_slash_works" in
22234       *yes) ;;
22235       *)
22236         REPLACE_LCHOWN=1
22237         ;;
22238     esac
22239     case "$gl_cv_func_chown_ctime_works" in
22240       *yes) ;;
22241       *)
22242         REPLACE_LCHOWN=1
22243         ;;
22244     esac
22245   fi
22246
22247   if test $HAVE_LCHOWN = 0 || test $REPLACE_LCHOWN = 1; then
22248
22249
22250
22251
22252
22253
22254
22255
22256   gl_LIBOBJS="$gl_LIBOBJS lchown.$ac_objext"
22257
22258   fi
22259
22260
22261
22262
22263
22264           GNULIB_LCHOWN=1
22265
22266
22267
22268
22269
22270 $as_echo "#define GNULIB_TEST_LCHOWN 1" >>confdefs.h
22271
22272
22273
22274
22275
22276
22277   if test $ac_cv_func_link = no; then
22278     HAVE_LINK=0
22279   else
22280     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether link obeys POSIX" >&5
22281 $as_echo_n "checking whether link obeys POSIX... " >&6; }
22282 if ${gl_cv_func_link_works+:} false; then :
22283   $as_echo_n "(cached) " >&6
22284 else
22285   touch conftest.a
22286        # Assume that if we have lstat, we can also check symlinks.
22287        if test $ac_cv_func_lstat = yes; then
22288          ln -s conftest.a conftest.lnk
22289        fi
22290        if test "$cross_compiling" = yes; then :
22291   case "$host_os" in
22292                     # Guess yes on glibc systems.
22293             *-gnu*) gl_cv_func_link_works="guessing yes" ;;
22294                     # If we don't know, assume the worst.
22295             *)      gl_cv_func_link_works="guessing no" ;;
22296           esac
22297
22298 else
22299   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22300 /* end confdefs.h.  */
22301 #include <unistd.h>
22302
22303 int
22304 main ()
22305 {
22306 int result = 0;
22307              if (!link ("conftest.a", "conftest.b/"))
22308                result |= 1;
22309 #if HAVE_LSTAT
22310              if (!link ("conftest.lnk/", "conftest.b"))
22311                result |= 2;
22312              if (rename ("conftest.a", "conftest.b"))
22313                result |= 4;
22314              if (!link ("conftest.b", "conftest.lnk"))
22315                result |= 8;
22316 #endif
22317              return result;
22318
22319   ;
22320   return 0;
22321 }
22322 _ACEOF
22323 if ac_fn_c_try_run "$LINENO"; then :
22324   gl_cv_func_link_works=yes
22325 else
22326   gl_cv_func_link_works=no
22327 fi
22328 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22329   conftest.$ac_objext conftest.beam conftest.$ac_ext
22330 fi
22331
22332        rm -f conftest.a conftest.b conftest.lnk
22333 fi
22334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_link_works" >&5
22335 $as_echo "$gl_cv_func_link_works" >&6; }
22336     case "$gl_cv_func_link_works" in
22337       *yes) ;;
22338       *)
22339         REPLACE_LINK=1
22340         ;;
22341     esac
22342   fi
22343
22344   if test $HAVE_LINK = 0 || test $REPLACE_LINK = 1; then
22345
22346
22347
22348
22349
22350
22351
22352
22353   gl_LIBOBJS="$gl_LIBOBJS link.$ac_objext"
22354
22355   fi
22356
22357
22358
22359
22360
22361           GNULIB_LINK=1
22362
22363
22364
22365
22366
22367 $as_echo "#define GNULIB_TEST_LINK 1" >>confdefs.h
22368
22369
22370
22371
22372           gl_link_follows_symlinks=0 # assume GNU behavior
22373   if test $ac_cv_func_readlink = yes; then
22374                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __xpg4" >&5
22375 $as_echo_n "checking for __xpg4... " >&6; }
22376 if ${gl_cv_have___xpg4+:} false; then :
22377   $as_echo_n "(cached) " >&6
22378 else
22379   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22380 /* end confdefs.h.  */
22381 extern int __xpg4;
22382 int
22383 main ()
22384 {
22385 return __xpg4;
22386   ;
22387   return 0;
22388 }
22389 _ACEOF
22390 if ac_fn_c_try_link "$LINENO"; then :
22391   gl_cv_have___xpg4=yes
22392 else
22393   gl_cv_have___xpg4=no
22394 fi
22395 rm -f core conftest.err conftest.$ac_objext \
22396     conftest$ac_exeext conftest.$ac_ext
22397
22398 fi
22399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have___xpg4" >&5
22400 $as_echo "$gl_cv_have___xpg4" >&6; }
22401     if test $gl_cv_have___xpg4 = yes; then
22402       gl_link_follows_symlinks=-1
22403     else
22404       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether link(2) dereferences a symlink" >&5
22405 $as_echo_n "checking whether link(2) dereferences a symlink... " >&6; }
22406 if ${gl_cv_func_link_follows_symlink+:} false; then :
22407   $as_echo_n "(cached) " >&6
22408 else
22409
22410          # Create a regular file.
22411          echo > conftest.file
22412          if test "$cross_compiling" = yes; then :
22413                                                  case "$host_os" in
22414                            # On glibc/Linux we know the result.
22415               linux*-gnu*) gl_cv_func_link_follows_symlink="guessing no" ;;
22416                            # Otherwise, we don't know.
22417               *)           gl_cv_func_link_follows_symlink=unknown ;;
22418             esac
22419
22420 else
22421   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22422 /* end confdefs.h.  */
22423
22424 #       include <sys/types.h>
22425 #       include <sys/stat.h>
22426 #       include <unistd.h>
22427 #       include <stdlib.h>
22428
22429 #       define SAME_INODE(Stat_buf_1, Stat_buf_2) \
22430           ((Stat_buf_1).st_ino == (Stat_buf_2).st_ino \
22431            && (Stat_buf_1).st_dev == (Stat_buf_2).st_dev)
22432
22433         int
22434         main ()
22435         {
22436           const char *file = "conftest.file";
22437           const char *sym = "conftest.sym";
22438           const char *hard = "conftest.hard";
22439           struct stat sb_file, sb_hard;
22440
22441           /* Create a symlink to the regular file. */
22442           if (symlink (file, sym))
22443             return 2;
22444
22445           /* Create a hard link to that symlink.  */
22446           if (link (sym, hard))
22447             return 3;
22448
22449           if (lstat (hard, &sb_hard))
22450             return 4;
22451           if (lstat (file, &sb_file))
22452             return 5;
22453
22454           /* If the dev/inode of hard and file are the same, then
22455              the link call followed the symlink.  */
22456           return SAME_INODE (sb_hard, sb_file) ? 1 : 0;
22457         }
22458
22459 _ACEOF
22460 if ac_fn_c_try_run "$LINENO"; then :
22461   gl_cv_func_link_follows_symlink=no
22462 else
22463              gl_cv_func_link_follows_symlink=yes
22464 fi
22465 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22466   conftest.$ac_objext conftest.beam conftest.$ac_ext
22467 fi
22468
22469          rm -f conftest.file conftest.sym conftest.hard
22470
22471 fi
22472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_link_follows_symlink" >&5
22473 $as_echo "$gl_cv_func_link_follows_symlink" >&6; }
22474       case "$gl_cv_func_link_follows_symlink" in
22475         *yes) gl_link_follows_symlinks=1 ;;
22476         *no) ;; # already defaulted to 0
22477         *) gl_link_follows_symlinks=-2 ;;
22478       esac
22479     fi
22480   fi
22481
22482 cat >>confdefs.h <<_ACEOF
22483 #define LINK_FOLLOWS_SYMLINKS $gl_link_follows_symlinks
22484 _ACEOF
22485
22486
22487
22488
22489
22490
22491
22492
22493
22494   if test $ac_cv_func_linkat = no; then
22495     HAVE_LINKAT=0
22496   else
22497     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether linkat(,AT_SYMLINK_FOLLOW) works" >&5
22498 $as_echo_n "checking whether linkat(,AT_SYMLINK_FOLLOW) works... " >&6; }
22499 if ${gl_cv_func_linkat_follow+:} false; then :
22500   $as_echo_n "(cached) " >&6
22501 else
22502   rm -rf conftest.f1 conftest.f2
22503        touch conftest.f1
22504        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22505 /* end confdefs.h.  */
22506
22507 #include <fcntl.h>
22508 #include <unistd.h>
22509 #ifdef __linux__
22510 /* Linux added linkat in 2.6.16, but did not add AT_SYMLINK_FOLLOW
22511    until 2.6.18.  Always replace linkat to support older kernels.  */
22512 choke me
22513 #endif
22514
22515 int
22516 main ()
22517 {
22518 return linkat (AT_FDCWD, "conftest.f1", AT_FDCWD, "conftest.f2",
22519                     AT_SYMLINK_FOLLOW);
22520   ;
22521   return 0;
22522 }
22523 _ACEOF
22524 if ac_fn_c_try_compile "$LINENO"; then :
22525   gl_cv_func_linkat_follow=yes
22526 else
22527   gl_cv_func_linkat_follow="need runtime check"
22528 fi
22529 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22530        rm -rf conftest.f1 conftest.f2
22531 fi
22532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_linkat_follow" >&5
22533 $as_echo "$gl_cv_func_linkat_follow" >&6; }
22534     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether linkat handles trailing slash correctly" >&5
22535 $as_echo_n "checking whether linkat handles trailing slash correctly... " >&6; }
22536 if ${gl_cv_func_linkat_slash+:} false; then :
22537   $as_echo_n "(cached) " >&6
22538 else
22539   rm -rf conftest.a conftest.b conftest.c conftest.d
22540        if test "$cross_compiling" = yes; then :
22541   # Guess yes on glibc systems, no otherwise.
22542           case "$host_os" in
22543             *-gnu*) gl_cv_func_linkat_slash="guessing yes";;
22544             *)      gl_cv_func_linkat_slash="guessing no";;
22545           esac
22546
22547 else
22548   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22549 /* end confdefs.h.  */
22550 #include <unistd.h>
22551               #include <fcntl.h>
22552               #include <errno.h>
22553               #include <stdio.h>
22554
22555 int
22556 main ()
22557 {
22558 int result;
22559               int fd;
22560               /* Create a regular file.  */
22561               fd = open ("conftest.a", O_CREAT | O_EXCL | O_WRONLY, 0600);
22562               if (fd < 0)
22563                 return 1;
22564               if (write (fd, "hello", 5) < 5)
22565                 return 2;
22566               if (close (fd) < 0)
22567                 return 3;
22568               /* Test whether hard links are supported on the current
22569                  device.  */
22570               if (linkat (AT_FDCWD, "conftest.a", AT_FDCWD, "conftest.b",
22571                           AT_SYMLINK_FOLLOW) < 0)
22572                 return 0;
22573               result = 0;
22574               /* Test whether a trailing "/" is treated like "/.".  */
22575               if (linkat (AT_FDCWD, "conftest.a/", AT_FDCWD, "conftest.c",
22576                           AT_SYMLINK_FOLLOW) == 0)
22577                 result |= 4;
22578               if (linkat (AT_FDCWD, "conftest.a", AT_FDCWD, "conftest.d/",
22579                           AT_SYMLINK_FOLLOW) == 0)
22580                 result |= 8;
22581               return result;
22582
22583   ;
22584   return 0;
22585 }
22586 _ACEOF
22587 if ac_fn_c_try_run "$LINENO"; then :
22588   gl_cv_func_linkat_slash=yes
22589 else
22590   gl_cv_func_linkat_slash=no
22591 fi
22592 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22593   conftest.$ac_objext conftest.beam conftest.$ac_ext
22594 fi
22595
22596        rm -rf conftest.a conftest.b conftest.c conftest.d
22597 fi
22598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_linkat_slash" >&5
22599 $as_echo "$gl_cv_func_linkat_slash" >&6; }
22600     case "$gl_cv_func_linkat_slash" in
22601       *yes) gl_linkat_slash_bug=0 ;;
22602       *)    gl_linkat_slash_bug=1 ;;
22603     esac
22604     if test "$gl_cv_func_linkat_follow" != yes \
22605        || test $gl_linkat_slash_bug = 1; then
22606       REPLACE_LINKAT=1
22607
22608 cat >>confdefs.h <<_ACEOF
22609 #define LINKAT_TRAILING_SLASH_BUG $gl_linkat_slash_bug
22610 _ACEOF
22611
22612     fi
22613   fi
22614
22615   if test $HAVE_LINKAT = 0 || test $REPLACE_LINKAT = 1; then
22616
22617
22618
22619
22620
22621
22622
22623
22624   gl_LIBOBJS="$gl_LIBOBJS linkat.$ac_objext"
22625
22626   fi
22627   if test $HAVE_LINKAT = 0; then
22628
22629
22630
22631
22632
22633
22634
22635
22636   gl_LIBOBJS="$gl_LIBOBJS at-func2.$ac_objext"
22637
22638   fi
22639
22640
22641
22642
22643
22644           GNULIB_LINKAT=1
22645
22646
22647
22648
22649
22650 $as_echo "#define GNULIB_TEST_LINKAT 1" >>confdefs.h
22651
22652
22653
22654
22655
22656
22657
22658
22659
22660
22661
22662   LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(abs_top_builddir)/$gl_source_base\""
22663
22664
22665
22666
22667
22668
22669
22670
22671
22672   case "$host_os" in
22673     solaris*)
22674
22675 $as_echo "#define _LCONV_C99 1" >>confdefs.h
22676
22677       ;;
22678   esac
22679
22680   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h conforms to POSIX:2001" >&5
22681 $as_echo_n "checking whether locale.h conforms to POSIX:2001... " >&6; }
22682 if ${gl_cv_header_locale_h_posix2001+:} false; then :
22683   $as_echo_n "(cached) " >&6
22684 else
22685   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22686 /* end confdefs.h.  */
22687 #include <locale.h>
22688             int x = LC_MESSAGES;
22689             int y = sizeof (((struct lconv *) 0)->decimal_point);
22690 int
22691 main ()
22692 {
22693
22694   ;
22695   return 0;
22696 }
22697 _ACEOF
22698 if ac_fn_c_try_compile "$LINENO"; then :
22699   gl_cv_header_locale_h_posix2001=yes
22700 else
22701   gl_cv_header_locale_h_posix2001=no
22702 fi
22703 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22704 fi
22705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_h_posix2001" >&5
22706 $as_echo "$gl_cv_header_locale_h_posix2001" >&6; }
22707
22708
22709   if test $ac_cv_header_xlocale_h = yes; then
22710     HAVE_XLOCALE_H=1
22711                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h defines locale_t" >&5
22712 $as_echo_n "checking whether locale.h defines locale_t... " >&6; }
22713 if ${gl_cv_header_locale_has_locale_t+:} false; then :
22714   $as_echo_n "(cached) " >&6
22715 else
22716   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22717 /* end confdefs.h.  */
22718 #include <locale.h>
22719               locale_t x;
22720 int
22721 main ()
22722 {
22723
22724   ;
22725   return 0;
22726 }
22727 _ACEOF
22728 if ac_fn_c_try_compile "$LINENO"; then :
22729   gl_cv_header_locale_has_locale_t=yes
22730 else
22731   gl_cv_header_locale_has_locale_t=no
22732 fi
22733 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22734
22735 fi
22736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_has_locale_t" >&5
22737 $as_echo "$gl_cv_header_locale_has_locale_t" >&6; }
22738     if test $gl_cv_header_locale_has_locale_t = yes; then
22739       gl_cv_header_locale_h_needs_xlocale_h=no
22740     else
22741       gl_cv_header_locale_h_needs_xlocale_h=yes
22742     fi
22743   else
22744     HAVE_XLOCALE_H=0
22745     gl_cv_header_locale_h_needs_xlocale_h=no
22746   fi
22747
22748
22749           { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct lconv is properly defined" >&5
22750 $as_echo_n "checking whether struct lconv is properly defined... " >&6; }
22751 if ${gl_cv_sys_struct_lconv_ok+:} false; then :
22752   $as_echo_n "(cached) " >&6
22753 else
22754   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22755 /* end confdefs.h.  */
22756 #include <locale.h>
22757             struct lconv l;
22758             int x = sizeof (l.decimal_point);
22759             int y = sizeof (l.int_p_cs_precedes);
22760 int
22761 main ()
22762 {
22763
22764   ;
22765   return 0;
22766 }
22767 _ACEOF
22768 if ac_fn_c_try_compile "$LINENO"; then :
22769   gl_cv_sys_struct_lconv_ok=yes
22770 else
22771   gl_cv_sys_struct_lconv_ok=no
22772 fi
22773 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22774
22775 fi
22776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_lconv_ok" >&5
22777 $as_echo "$gl_cv_sys_struct_lconv_ok" >&6; }
22778   if test $gl_cv_sys_struct_lconv_ok = no; then
22779     REPLACE_STRUCT_LCONV=1
22780   fi
22781
22782
22783
22784
22785
22786
22787
22788
22789
22790      if test $gl_cv_have_include_next = yes; then
22791        gl_cv_next_locale_h='<'locale.h'>'
22792      else
22793        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <locale.h>" >&5
22794 $as_echo_n "checking absolute name of <locale.h>... " >&6; }
22795 if ${gl_cv_next_locale_h+:} false; then :
22796   $as_echo_n "(cached) " >&6
22797 else
22798
22799
22800
22801   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22802 /* end confdefs.h.  */
22803 #include <locale.h>
22804 _ACEOF
22805                 case "$host_os" in
22806     aix*) gl_absname_cpp="$ac_cpp -C" ;;
22807     *)    gl_absname_cpp="$ac_cpp" ;;
22808   esac
22809
22810   case "$host_os" in
22811     mingw*)
22812                                           gl_dirsep_regex='[/\\]'
22813       ;;
22814     *)
22815       gl_dirsep_regex='\/'
22816       ;;
22817   esac
22818       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22819   gl_header_literal_regex=`echo 'locale.h' \
22820                            | sed -e "$gl_make_literal_regex_sed"`
22821   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22822       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22823       s|^/[^/]|//&|
22824       p
22825       q
22826     }'
22827
22828         gl_cv_absolute_locale_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22829   sed -n "$gl_absolute_header_sed"`
22830
22831            gl_header=$gl_cv_absolute_locale_h
22832            gl_cv_next_locale_h='"'$gl_header'"'
22833
22834
22835 fi
22836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_locale_h" >&5
22837 $as_echo "$gl_cv_next_locale_h" >&6; }
22838      fi
22839      NEXT_LOCALE_H=$gl_cv_next_locale_h
22840
22841      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22842        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22843        gl_next_as_first_directive='<'locale.h'>'
22844      else
22845        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22846        gl_next_as_first_directive=$gl_cv_next_locale_h
22847      fi
22848      NEXT_AS_FIRST_DIRECTIVE_LOCALE_H=$gl_next_as_first_directive
22849
22850
22851
22852
22853
22854
22855     for gl_func in setlocale duplocale; do
22856     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
22857     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
22858 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
22859 if eval \${$as_gl_Symbol+:} false; then :
22860   $as_echo_n "(cached) " >&6
22861 else
22862   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22863 /* end confdefs.h.  */
22864 #include <locale.h>
22865 /* Some systems provide declarations in a non-standard header.  */
22866 #if HAVE_XLOCALE_H
22867 # include <xlocale.h>
22868 #endif
22869
22870 int
22871 main ()
22872 {
22873 #undef $gl_func
22874   (void) $gl_func;
22875   ;
22876   return 0;
22877 }
22878 _ACEOF
22879 if ac_fn_c_try_compile "$LINENO"; then :
22880   eval "$as_gl_Symbol=yes"
22881 else
22882   eval "$as_gl_Symbol=no"
22883 fi
22884 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22885 fi
22886 eval ac_res=\$$as_gl_Symbol
22887                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
22888 $as_echo "$ac_res" >&6; }
22889     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
22890   cat >>confdefs.h <<_ACEOF
22891 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
22892 _ACEOF
22893
22894                      eval ac_cv_have_decl_$gl_func=yes
22895 fi
22896       done
22897
22898
22899
22900
22901
22902
22903   if test $REPLACE_STRUCT_LCONV = 1; then
22904     REPLACE_LOCALECONV=1
22905   fi
22906
22907   if test $REPLACE_LOCALECONV = 1; then
22908
22909
22910
22911
22912
22913
22914
22915
22916   gl_LIBOBJS="$gl_LIBOBJS localeconv.$ac_objext"
22917
22918
22919   ac_fn_c_check_member "$LINENO" "struct lconv" "decimal_point" "ac_cv_member_struct_lconv_decimal_point" "#include <locale.h>
22920 "
22921 if test "x$ac_cv_member_struct_lconv_decimal_point" = xyes; then :
22922
22923 cat >>confdefs.h <<_ACEOF
22924 #define HAVE_STRUCT_LCONV_DECIMAL_POINT 1
22925 _ACEOF
22926
22927
22928 fi
22929
22930
22931   fi
22932
22933
22934
22935
22936
22937           GNULIB_LOCALECONV=1
22938
22939
22940
22941
22942
22943 $as_echo "#define GNULIB_TEST_LOCALECONV 1" >>confdefs.h
22944
22945
22946
22947
22948
22949
22950
22951
22952
22953   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lseek detects pipes" >&5
22954 $as_echo_n "checking whether lseek detects pipes... " >&6; }
22955 if ${gl_cv_func_lseek_pipe+:} false; then :
22956   $as_echo_n "(cached) " >&6
22957 else
22958   case "$host_os" in
22959        mingw*)
22960                                                                gl_cv_func_lseek_pipe=no
22961          ;;
22962        *)
22963          if test $cross_compiling = no; then
22964            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22965 /* end confdefs.h.  */
22966
22967 #include <sys/types.h> /* for off_t */
22968 #include <stdio.h> /* for SEEK_CUR */
22969 #if HAVE_UNISTD_H
22970 # include <unistd.h>
22971 #else /* on Windows with MSVC */
22972 # include <io.h>
22973 #endif
22974
22975 int
22976 main ()
22977 {
22978
22979   /* Exit with success only if stdin is seekable.  */
22980   return lseek (0, (off_t)0, SEEK_CUR) < 0;
22981
22982   ;
22983   return 0;
22984 }
22985 _ACEOF
22986 if ac_fn_c_try_link "$LINENO"; then :
22987   if test -s conftest$ac_exeext \
22988                  && ./conftest$ac_exeext < conftest.$ac_ext \
22989                  && test 1 = "`echo hi \
22990                    | { ./conftest$ac_exeext; echo $?; cat >/dev/null; }`"; then
22991                 gl_cv_func_lseek_pipe=yes
22992               else
22993                 gl_cv_func_lseek_pipe=no
22994               fi
22995
22996 else
22997   gl_cv_func_lseek_pipe=no
22998 fi
22999 rm -f core conftest.err conftest.$ac_objext \
23000     conftest$ac_exeext conftest.$ac_ext
23001          else
23002            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23003 /* end confdefs.h.  */
23004
23005 #if defined __BEOS__
23006 /* BeOS mistakenly return 0 when trying to seek on pipes.  */
23007   Choke me.
23008 #endif
23009 _ACEOF
23010 if ac_fn_c_try_compile "$LINENO"; then :
23011   gl_cv_func_lseek_pipe=yes
23012 else
23013   gl_cv_func_lseek_pipe=no
23014 fi
23015 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23016          fi
23017          ;;
23018      esac
23019
23020 fi
23021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lseek_pipe" >&5
23022 $as_echo "$gl_cv_func_lseek_pipe" >&6; }
23023   if test $gl_cv_func_lseek_pipe = no; then
23024     REPLACE_LSEEK=1
23025
23026 $as_echo "#define LSEEK_PIPE_BROKEN 1" >>confdefs.h
23027
23028   fi
23029
23030
23031   if test $WINDOWS_64_BIT_OFF_T = 1; then
23032     REPLACE_LSEEK=1
23033   fi
23034
23035   if test $REPLACE_LSEEK = 1; then
23036
23037
23038
23039
23040
23041
23042
23043
23044   gl_LIBOBJS="$gl_LIBOBJS lseek.$ac_objext"
23045
23046   fi
23047
23048
23049
23050
23051
23052           GNULIB_LSEEK=1
23053
23054
23055
23056
23057
23058 $as_echo "#define GNULIB_TEST_LSEEK 1" >>confdefs.h
23059
23060
23061
23062
23063
23064
23065   if test $ac_cv_func_lstat = yes; then
23066
23067     case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
23068       *no)
23069         REPLACE_LSTAT=1
23070         ;;
23071     esac
23072   else
23073     HAVE_LSTAT=0
23074   fi
23075
23076   if test $REPLACE_LSTAT = 1; then
23077
23078
23079
23080
23081
23082
23083
23084
23085   gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
23086
23087     :
23088   fi
23089
23090
23091
23092
23093
23094           GNULIB_LSTAT=1
23095
23096
23097
23098
23099
23100 $as_echo "#define GNULIB_TEST_LSTAT 1" >>confdefs.h
23101
23102
23103
23104
23105
23106
23107       for ac_header in stdlib.h
23108 do :
23109   ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
23110 if test "x$ac_cv_header_stdlib_h" = xyes; then :
23111   cat >>confdefs.h <<_ACEOF
23112 #define HAVE_STDLIB_H 1
23113 _ACEOF
23114
23115 fi
23116
23117 done
23118
23119   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
23120 $as_echo_n "checking for GNU libc compatible malloc... " >&6; }
23121 if ${ac_cv_func_malloc_0_nonnull+:} false; then :
23122   $as_echo_n "(cached) " >&6
23123 else
23124   if test "$cross_compiling" = yes; then :
23125   case "$host_os" in
23126           # Guess yes on platforms where we know the result.
23127           *-gnu* | freebsd* | netbsd* | openbsd* \
23128           | hpux* | solaris* | cygwin* | mingw*)
23129             ac_cv_func_malloc_0_nonnull=yes ;;
23130           # If we don't know, assume the worst.
23131           *) ac_cv_func_malloc_0_nonnull=no ;;
23132         esac
23133
23134 else
23135   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23136 /* end confdefs.h.  */
23137 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
23138             # include <stdlib.h>
23139             #else
23140             char *malloc ();
23141             #endif
23142
23143 int
23144 main ()
23145 {
23146 return ! malloc (0);
23147   ;
23148   return 0;
23149 }
23150
23151 _ACEOF
23152 if ac_fn_c_try_run "$LINENO"; then :
23153   ac_cv_func_malloc_0_nonnull=yes
23154 else
23155   ac_cv_func_malloc_0_nonnull=no
23156 fi
23157 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23158   conftest.$ac_objext conftest.beam conftest.$ac_ext
23159 fi
23160
23161
23162 fi
23163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
23164 $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
23165   if test $ac_cv_func_malloc_0_nonnull = yes; then :
23166
23167 $as_echo "#define HAVE_MALLOC_GNU 1" >>confdefs.h
23168
23169 else
23170   $as_echo "#define HAVE_MALLOC_GNU 0" >>confdefs.h
23171
23172      REPLACE_MALLOC=1
23173
23174 fi
23175
23176
23177   if test $REPLACE_MALLOC = 1; then
23178
23179
23180
23181
23182
23183
23184
23185
23186   gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
23187
23188   fi
23189
23190
23191 cat >>confdefs.h <<_ACEOF
23192 #define GNULIB_MALLOC_GNU 1
23193 _ACEOF
23194
23195
23196
23197
23198
23199   if test $gl_cv_func_malloc_posix = yes; then
23200
23201 $as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
23202
23203   else
23204     REPLACE_MALLOC=1
23205   fi
23206
23207   if test $REPLACE_MALLOC = 1; then
23208
23209
23210
23211
23212
23213
23214
23215
23216   gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
23217
23218   fi
23219
23220
23221
23222
23223
23224           GNULIB_MALLOC_POSIX=1
23225
23226
23227
23228
23229
23230 $as_echo "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
23231
23232
23233
23234
23235
23236
23237
23238
23239
23240
23241
23242
23243
23244
23245
23246
23247
23248
23249
23250
23251   if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
23252
23253
23254
23255      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
23256 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
23257 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
23258   $as_echo_n "(cached) " >&6
23259 else
23260
23261                   case "$host_os" in
23262                      # Guess no on AIX and OSF/1.
23263         aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
23264                      # Guess yes otherwise.
23265         *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
23266       esac
23267       if test $LOCALE_JA != none; then
23268         if test "$cross_compiling" = yes; then :
23269   :
23270 else
23271   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23272 /* end confdefs.h.  */
23273
23274 #include <locale.h>
23275 #include <string.h>
23276 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
23277    <wchar.h>.
23278    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
23279    included before <wchar.h>.  */
23280 #include <stddef.h>
23281 #include <stdio.h>
23282 #include <time.h>
23283 #include <wchar.h>
23284 int main ()
23285 {
23286   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
23287     {
23288       const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
23289       mbstate_t state;
23290       wchar_t wc;
23291
23292       memset (&state, '\0', sizeof (mbstate_t));
23293       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
23294         if (mbsinit (&state))
23295           return 1;
23296     }
23297   return 0;
23298 }
23299 _ACEOF
23300 if ac_fn_c_try_run "$LINENO"; then :
23301   gl_cv_func_mbrtowc_incomplete_state=yes
23302 else
23303   gl_cv_func_mbrtowc_incomplete_state=no
23304 fi
23305 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23306   conftest.$ac_objext conftest.beam conftest.$ac_ext
23307 fi
23308
23309       fi
23310
23311 fi
23312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
23313 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
23314
23315
23316
23317
23318      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
23319 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
23320 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
23321   $as_echo_n "(cached) " >&6
23322 else
23323
23324                   case "$host_os" in
23325                     # Guess no on Solaris 8.
23326         solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
23327                     # Guess yes otherwise.
23328         *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
23329       esac
23330       if test $LOCALE_ZH_CN != none; then
23331         if test "$cross_compiling" = yes; then :
23332   :
23333 else
23334   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23335 /* end confdefs.h.  */
23336
23337 #include <locale.h>
23338 #include <stdlib.h>
23339 #include <string.h>
23340 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
23341    <wchar.h>.
23342    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
23343    included before <wchar.h>.  */
23344 #include <stddef.h>
23345 #include <stdio.h>
23346 #include <time.h>
23347 #include <wchar.h>
23348 int main ()
23349 {
23350   /* This fails on Solaris 8:
23351      mbrtowc returns 2, and sets wc to 0x00F0.
23352      mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
23353   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
23354     {
23355       char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
23356       mbstate_t state;
23357       wchar_t wc;
23358
23359       memset (&state, '\0', sizeof (mbstate_t));
23360       if (mbrtowc (&wc, input + 3, 6, &state) != 4
23361           && mbtowc (&wc, input + 3, 6) == 4)
23362         return 1;
23363     }
23364   return 0;
23365 }
23366 _ACEOF
23367 if ac_fn_c_try_run "$LINENO"; then :
23368   gl_cv_func_mbrtowc_sanitycheck=yes
23369 else
23370   gl_cv_func_mbrtowc_sanitycheck=no
23371 fi
23372 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23373   conftest.$ac_objext conftest.beam conftest.$ac_ext
23374 fi
23375
23376       fi
23377
23378 fi
23379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
23380 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
23381
23382     REPLACE_MBSTATE_T=0
23383     case "$gl_cv_func_mbrtowc_incomplete_state" in
23384       *yes) ;;
23385       *) REPLACE_MBSTATE_T=1 ;;
23386     esac
23387     case "$gl_cv_func_mbrtowc_sanitycheck" in
23388       *yes) ;;
23389       *) REPLACE_MBSTATE_T=1 ;;
23390     esac
23391   else
23392     REPLACE_MBSTATE_T=1
23393   fi
23394
23395
23396
23397   if test $ac_cv_func_mbrtowc = no; then
23398     HAVE_MBRTOWC=0
23399     ac_fn_c_check_decl "$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" "
23400 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
23401    <wchar.h>.
23402    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
23403    included before <wchar.h>.  */
23404 #include <stddef.h>
23405 #include <stdio.h>
23406 #include <time.h>
23407 #include <wchar.h>
23408
23409 "
23410 if test "x$ac_cv_have_decl_mbrtowc" = xyes; then :
23411   ac_have_decl=1
23412 else
23413   ac_have_decl=0
23414 fi
23415
23416 cat >>confdefs.h <<_ACEOF
23417 #define HAVE_DECL_MBRTOWC $ac_have_decl
23418 _ACEOF
23419
23420     if test $ac_cv_have_decl_mbrtowc = yes; then
23421                         REPLACE_MBRTOWC=1
23422     fi
23423   else
23424     if test $REPLACE_MBSTATE_T = 1; then
23425       REPLACE_MBRTOWC=1
23426     else
23427
23428
23429
23430      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5
23431 $as_echo_n "checking whether mbrtowc handles a NULL pwc argument... " >&6; }
23432 if ${gl_cv_func_mbrtowc_null_arg1+:} false; then :
23433   $as_echo_n "(cached) " >&6
23434 else
23435
23436                   case "$host_os" in
23437                   # Guess no on Solaris.
23438         solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;;
23439                   # Guess yes otherwise.
23440         *)        gl_cv_func_mbrtowc_null_arg1="guessing yes" ;;
23441       esac
23442       if test $LOCALE_FR_UTF8 != none; then
23443         if test "$cross_compiling" = yes; then :
23444   :
23445 else
23446   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23447 /* end confdefs.h.  */
23448
23449 #include <locale.h>
23450 #include <stdlib.h>
23451 #include <string.h>
23452 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
23453    <wchar.h>.
23454    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
23455    included before <wchar.h>.  */
23456 #include <stddef.h>
23457 #include <stdio.h>
23458 #include <time.h>
23459 #include <wchar.h>
23460 int main ()
23461 {
23462   int result = 0;
23463
23464   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
23465     {
23466       char input[] = "\303\237er";
23467       mbstate_t state;
23468       wchar_t wc;
23469       size_t ret;
23470
23471       memset (&state, '\0', sizeof (mbstate_t));
23472       wc = (wchar_t) 0xBADFACE;
23473       ret = mbrtowc (&wc, input, 5, &state);
23474       if (ret != 2)
23475         result |= 1;
23476       if (!mbsinit (&state))
23477         result |= 2;
23478
23479       memset (&state, '\0', sizeof (mbstate_t));
23480       ret = mbrtowc (NULL, input, 5, &state);
23481       if (ret != 2) /* Solaris 7 fails here: ret is -1.  */
23482         result |= 4;
23483       if (!mbsinit (&state))
23484         result |= 8;
23485     }
23486   return result;
23487 }
23488 _ACEOF
23489 if ac_fn_c_try_run "$LINENO"; then :
23490   gl_cv_func_mbrtowc_null_arg1=yes
23491 else
23492   gl_cv_func_mbrtowc_null_arg1=no
23493 fi
23494 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23495   conftest.$ac_objext conftest.beam conftest.$ac_ext
23496 fi
23497
23498       fi
23499
23500 fi
23501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5
23502 $as_echo "$gl_cv_func_mbrtowc_null_arg1" >&6; }
23503
23504
23505
23506
23507      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
23508 $as_echo_n "checking whether mbrtowc handles a NULL string argument... " >&6; }
23509 if ${gl_cv_func_mbrtowc_null_arg2+:} false; then :
23510   $as_echo_n "(cached) " >&6
23511 else
23512
23513                   case "$host_os" in
23514               # Guess no on OSF/1.
23515         osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;;
23516               # Guess yes otherwise.
23517         *)    gl_cv_func_mbrtowc_null_arg2="guessing yes" ;;
23518       esac
23519       if test $LOCALE_FR_UTF8 != none; then
23520         if test "$cross_compiling" = yes; then :
23521   :
23522 else
23523   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23524 /* end confdefs.h.  */
23525
23526 #include <locale.h>
23527 #include <string.h>
23528 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
23529    <wchar.h>.
23530    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
23531    included before <wchar.h>.  */
23532 #include <stddef.h>
23533 #include <stdio.h>
23534 #include <time.h>
23535 #include <wchar.h>
23536 int main ()
23537 {
23538   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
23539     {
23540       mbstate_t state;
23541       wchar_t wc;
23542       int ret;
23543
23544       memset (&state, '\0', sizeof (mbstate_t));
23545       wc = (wchar_t) 0xBADFACE;
23546       mbrtowc (&wc, NULL, 5, &state);
23547       /* Check that wc was not modified.  */
23548       if (wc != (wchar_t) 0xBADFACE)
23549         return 1;
23550     }
23551   return 0;
23552 }
23553 _ACEOF
23554 if ac_fn_c_try_run "$LINENO"; then :
23555   gl_cv_func_mbrtowc_null_arg2=yes
23556 else
23557   gl_cv_func_mbrtowc_null_arg2=no
23558 fi
23559 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23560   conftest.$ac_objext conftest.beam conftest.$ac_ext
23561 fi
23562
23563       fi
23564
23565 fi
23566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5
23567 $as_echo "$gl_cv_func_mbrtowc_null_arg2" >&6; }
23568
23569
23570
23571
23572
23573
23574   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
23575 $as_echo_n "checking whether mbrtowc has a correct return value... " >&6; }
23576 if ${gl_cv_func_mbrtowc_retval+:} false; then :
23577   $as_echo_n "(cached) " >&6
23578 else
23579
23580                   case "$host_os" in
23581                                    # Guess no on HP-UX, Solaris, native Windows.
23582         hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;;
23583                                    # Guess yes otherwise.
23584         *)                         gl_cv_func_mbrtowc_retval="guessing yes" ;;
23585       esac
23586       if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \
23587          || { case "$host_os" in mingw*) true;; *) false;; esac; }; then
23588         if test "$cross_compiling" = yes; then :
23589   :
23590 else
23591   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23592 /* end confdefs.h.  */
23593
23594 #include <locale.h>
23595 #include <string.h>
23596 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
23597    <wchar.h>.
23598    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
23599    included before <wchar.h>.  */
23600 #include <stddef.h>
23601 #include <stdio.h>
23602 #include <time.h>
23603 #include <wchar.h>
23604 int main ()
23605 {
23606   int result = 0;
23607   int found_some_locale = 0;
23608   /* This fails on Solaris.  */
23609   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
23610     {
23611       char input[] = "B\303\274\303\237er"; /* "Büßer" */
23612       mbstate_t state;
23613       wchar_t wc;
23614
23615       memset (&state, '\0', sizeof (mbstate_t));
23616       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
23617         {
23618           input[1] = '\0';
23619           if (mbrtowc (&wc, input + 2, 5, &state) != 1)
23620             result |= 1;
23621         }
23622       found_some_locale = 1;
23623     }
23624   /* This fails on HP-UX 11.11.  */
23625   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
23626     {
23627       char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
23628       mbstate_t state;
23629       wchar_t wc;
23630
23631       memset (&state, '\0', sizeof (mbstate_t));
23632       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
23633         {
23634           input[1] = '\0';
23635           if (mbrtowc (&wc, input + 2, 5, &state) != 2)
23636             result |= 2;
23637         }
23638       found_some_locale = 1;
23639     }
23640   /* This fails on native Windows.  */
23641   if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
23642     {
23643       char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */
23644       mbstate_t state;
23645       wchar_t wc;
23646
23647       memset (&state, '\0', sizeof (mbstate_t));
23648       if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
23649         {
23650           input[3] = '\0';
23651           if (mbrtowc (&wc, input + 4, 4, &state) != 1)
23652             result |= 4;
23653         }
23654       found_some_locale = 1;
23655     }
23656   if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
23657     {
23658       char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */
23659       mbstate_t state;
23660       wchar_t wc;
23661
23662       memset (&state, '\0', sizeof (mbstate_t));
23663       if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
23664         {
23665           input[3] = '\0';
23666           if (mbrtowc (&wc, input + 4, 4, &state) != 1)
23667             result |= 8;
23668         }
23669       found_some_locale = 1;
23670     }
23671   if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
23672     {
23673       char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */
23674       mbstate_t state;
23675       wchar_t wc;
23676
23677       memset (&state, '\0', sizeof (mbstate_t));
23678       if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
23679         {
23680           input[3] = '\0';
23681           if (mbrtowc (&wc, input + 4, 4, &state) != 1)
23682             result |= 16;
23683         }
23684       found_some_locale = 1;
23685     }
23686   return (found_some_locale ? result : 77);
23687 }
23688 _ACEOF
23689 if ac_fn_c_try_run "$LINENO"; then :
23690   gl_cv_func_mbrtowc_retval=yes
23691 else
23692   if test $? != 77; then
23693              gl_cv_func_mbrtowc_retval=no
23694            fi
23695
23696 fi
23697 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23698   conftest.$ac_objext conftest.beam conftest.$ac_ext
23699 fi
23700
23701       fi
23702
23703 fi
23704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
23705 $as_echo "$gl_cv_func_mbrtowc_retval" >&6; }
23706
23707
23708
23709
23710      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
23711 $as_echo_n "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
23712 if ${gl_cv_func_mbrtowc_nul_retval+:} false; then :
23713   $as_echo_n "(cached) " >&6
23714 else
23715
23716                   case "$host_os" in
23717                        # Guess no on Solaris 8 and 9.
23718         solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
23719                        # Guess yes otherwise.
23720         *)             gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
23721       esac
23722       if test $LOCALE_ZH_CN != none; then
23723         if test "$cross_compiling" = yes; then :
23724   :
23725 else
23726   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23727 /* end confdefs.h.  */
23728
23729 #include <locale.h>
23730 #include <string.h>
23731 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
23732    <wchar.h>.
23733    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
23734    included before <wchar.h>.  */
23735 #include <stddef.h>
23736 #include <stdio.h>
23737 #include <time.h>
23738 #include <wchar.h>
23739 int main ()
23740 {
23741   /* This fails on Solaris 8 and 9.  */
23742   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
23743     {
23744       mbstate_t state;
23745       wchar_t wc;
23746
23747       memset (&state, '\0', sizeof (mbstate_t));
23748       if (mbrtowc (&wc, "", 1, &state) != 0)
23749         return 1;
23750     }
23751   return 0;
23752 }
23753 _ACEOF
23754 if ac_fn_c_try_run "$LINENO"; then :
23755   gl_cv_func_mbrtowc_nul_retval=yes
23756 else
23757   gl_cv_func_mbrtowc_nul_retval=no
23758 fi
23759 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23760   conftest.$ac_objext conftest.beam conftest.$ac_ext
23761 fi
23762
23763       fi
23764
23765 fi
23766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
23767 $as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; }
23768
23769       case "$gl_cv_func_mbrtowc_null_arg1" in
23770         *yes) ;;
23771         *)
23772 $as_echo "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h
23773
23774            REPLACE_MBRTOWC=1
23775            ;;
23776       esac
23777       case "$gl_cv_func_mbrtowc_null_arg2" in
23778         *yes) ;;
23779         *)
23780 $as_echo "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h
23781
23782            REPLACE_MBRTOWC=1
23783            ;;
23784       esac
23785       case "$gl_cv_func_mbrtowc_retval" in
23786         *yes) ;;
23787         *)
23788 $as_echo "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
23789
23790            REPLACE_MBRTOWC=1
23791            ;;
23792       esac
23793       case "$gl_cv_func_mbrtowc_nul_retval" in
23794         *yes) ;;
23795         *)
23796 $as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
23797
23798            REPLACE_MBRTOWC=1
23799            ;;
23800       esac
23801     fi
23802   fi
23803
23804   if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
23805
23806
23807
23808
23809
23810
23811
23812
23813   gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext"
23814
23815
23816   :
23817
23818   fi
23819
23820
23821
23822
23823
23824           GNULIB_MBRTOWC=1
23825
23826
23827
23828
23829
23830 $as_echo "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h
23831
23832
23833
23834
23835
23836
23837
23838
23839           GNULIB_MBSCASECMP=1
23840
23841
23842
23843
23844
23845 $as_echo "#define GNULIB_TEST_MBSCASECMP 1" >>confdefs.h
23846
23847
23848
23849
23850
23851
23852
23853
23854
23855
23856
23857
23858
23859
23860   if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
23861
23862
23863
23864      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
23865 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
23866 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
23867   $as_echo_n "(cached) " >&6
23868 else
23869
23870                   case "$host_os" in
23871                      # Guess no on AIX and OSF/1.
23872         aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
23873                      # Guess yes otherwise.
23874         *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
23875       esac
23876       if test $LOCALE_JA != none; then
23877         if test "$cross_compiling" = yes; then :
23878   :
23879 else
23880   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23881 /* end confdefs.h.  */
23882
23883 #include <locale.h>
23884 #include <string.h>
23885 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
23886    <wchar.h>.
23887    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
23888    included before <wchar.h>.  */
23889 #include <stddef.h>
23890 #include <stdio.h>
23891 #include <time.h>
23892 #include <wchar.h>
23893 int main ()
23894 {
23895   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
23896     {
23897       const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
23898       mbstate_t state;
23899       wchar_t wc;
23900
23901       memset (&state, '\0', sizeof (mbstate_t));
23902       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
23903         if (mbsinit (&state))
23904           return 1;
23905     }
23906   return 0;
23907 }
23908 _ACEOF
23909 if ac_fn_c_try_run "$LINENO"; then :
23910   gl_cv_func_mbrtowc_incomplete_state=yes
23911 else
23912   gl_cv_func_mbrtowc_incomplete_state=no
23913 fi
23914 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23915   conftest.$ac_objext conftest.beam conftest.$ac_ext
23916 fi
23917
23918       fi
23919
23920 fi
23921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
23922 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
23923
23924
23925
23926
23927      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
23928 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
23929 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
23930   $as_echo_n "(cached) " >&6
23931 else
23932
23933                   case "$host_os" in
23934                     # Guess no on Solaris 8.
23935         solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
23936                     # Guess yes otherwise.
23937         *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
23938       esac
23939       if test $LOCALE_ZH_CN != none; then
23940         if test "$cross_compiling" = yes; then :
23941   :
23942 else
23943   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23944 /* end confdefs.h.  */
23945
23946 #include <locale.h>
23947 #include <stdlib.h>
23948 #include <string.h>
23949 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
23950    <wchar.h>.
23951    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
23952    included before <wchar.h>.  */
23953 #include <stddef.h>
23954 #include <stdio.h>
23955 #include <time.h>
23956 #include <wchar.h>
23957 int main ()
23958 {
23959   /* This fails on Solaris 8:
23960      mbrtowc returns 2, and sets wc to 0x00F0.
23961      mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
23962   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
23963     {
23964       char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
23965       mbstate_t state;
23966       wchar_t wc;
23967
23968       memset (&state, '\0', sizeof (mbstate_t));
23969       if (mbrtowc (&wc, input + 3, 6, &state) != 4
23970           && mbtowc (&wc, input + 3, 6) == 4)
23971         return 1;
23972     }
23973   return 0;
23974 }
23975 _ACEOF
23976 if ac_fn_c_try_run "$LINENO"; then :
23977   gl_cv_func_mbrtowc_sanitycheck=yes
23978 else
23979   gl_cv_func_mbrtowc_sanitycheck=no
23980 fi
23981 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23982   conftest.$ac_objext conftest.beam conftest.$ac_ext
23983 fi
23984
23985       fi
23986
23987 fi
23988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
23989 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
23990
23991     REPLACE_MBSTATE_T=0
23992     case "$gl_cv_func_mbrtowc_incomplete_state" in
23993       *yes) ;;
23994       *) REPLACE_MBSTATE_T=1 ;;
23995     esac
23996     case "$gl_cv_func_mbrtowc_sanitycheck" in
23997       *yes) ;;
23998       *) REPLACE_MBSTATE_T=1 ;;
23999     esac
24000   else
24001     REPLACE_MBSTATE_T=1
24002   fi
24003
24004
24005
24006   if test $ac_cv_func_mbsinit = no; then
24007     HAVE_MBSINIT=0
24008     ac_fn_c_check_decl "$LINENO" "mbsinit" "ac_cv_have_decl_mbsinit" "
24009 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
24010    <wchar.h>.
24011    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
24012    included before <wchar.h>.  */
24013 #include <stddef.h>
24014 #include <stdio.h>
24015 #include <time.h>
24016 #include <wchar.h>
24017
24018 "
24019 if test "x$ac_cv_have_decl_mbsinit" = xyes; then :
24020   ac_have_decl=1
24021 else
24022   ac_have_decl=0
24023 fi
24024
24025 cat >>confdefs.h <<_ACEOF
24026 #define HAVE_DECL_MBSINIT $ac_have_decl
24027 _ACEOF
24028
24029     if test $ac_cv_have_decl_mbsinit = yes; then
24030                         REPLACE_MBSINIT=1
24031     fi
24032   else
24033     if test $REPLACE_MBSTATE_T = 1; then
24034       REPLACE_MBSINIT=1
24035     else
24036                         case "$host_os" in
24037         mingw*) REPLACE_MBSINIT=1 ;;
24038       esac
24039     fi
24040   fi
24041
24042   if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
24043
24044
24045
24046
24047
24048
24049
24050
24051   gl_LIBOBJS="$gl_LIBOBJS mbsinit.$ac_objext"
24052
24053
24054   :
24055
24056   fi
24057
24058
24059
24060
24061
24062           GNULIB_MBSINIT=1
24063
24064
24065
24066
24067
24068 $as_echo "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h
24069
24070
24071
24072
24073
24074
24075
24076
24077
24078
24079
24080
24081
24082   if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
24083
24084
24085
24086      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
24087 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
24088 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
24089   $as_echo_n "(cached) " >&6
24090 else
24091
24092                   case "$host_os" in
24093                      # Guess no on AIX and OSF/1.
24094         aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
24095                      # Guess yes otherwise.
24096         *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
24097       esac
24098       if test $LOCALE_JA != none; then
24099         if test "$cross_compiling" = yes; then :
24100   :
24101 else
24102   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24103 /* end confdefs.h.  */
24104
24105 #include <locale.h>
24106 #include <string.h>
24107 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
24108    <wchar.h>.
24109    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
24110    included before <wchar.h>.  */
24111 #include <stddef.h>
24112 #include <stdio.h>
24113 #include <time.h>
24114 #include <wchar.h>
24115 int main ()
24116 {
24117   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
24118     {
24119       const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
24120       mbstate_t state;
24121       wchar_t wc;
24122
24123       memset (&state, '\0', sizeof (mbstate_t));
24124       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
24125         if (mbsinit (&state))
24126           return 1;
24127     }
24128   return 0;
24129 }
24130 _ACEOF
24131 if ac_fn_c_try_run "$LINENO"; then :
24132   gl_cv_func_mbrtowc_incomplete_state=yes
24133 else
24134   gl_cv_func_mbrtowc_incomplete_state=no
24135 fi
24136 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24137   conftest.$ac_objext conftest.beam conftest.$ac_ext
24138 fi
24139
24140       fi
24141
24142 fi
24143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
24144 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
24145
24146
24147
24148
24149      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
24150 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
24151 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
24152   $as_echo_n "(cached) " >&6
24153 else
24154
24155                   case "$host_os" in
24156                     # Guess no on Solaris 8.
24157         solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
24158                     # Guess yes otherwise.
24159         *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
24160       esac
24161       if test $LOCALE_ZH_CN != none; then
24162         if test "$cross_compiling" = yes; then :
24163   :
24164 else
24165   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24166 /* end confdefs.h.  */
24167
24168 #include <locale.h>
24169 #include <stdlib.h>
24170 #include <string.h>
24171 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
24172    <wchar.h>.
24173    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
24174    included before <wchar.h>.  */
24175 #include <stddef.h>
24176 #include <stdio.h>
24177 #include <time.h>
24178 #include <wchar.h>
24179 int main ()
24180 {
24181   /* This fails on Solaris 8:
24182      mbrtowc returns 2, and sets wc to 0x00F0.
24183      mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
24184   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
24185     {
24186       char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
24187       mbstate_t state;
24188       wchar_t wc;
24189
24190       memset (&state, '\0', sizeof (mbstate_t));
24191       if (mbrtowc (&wc, input + 3, 6, &state) != 4
24192           && mbtowc (&wc, input + 3, 6) == 4)
24193         return 1;
24194     }
24195   return 0;
24196 }
24197 _ACEOF
24198 if ac_fn_c_try_run "$LINENO"; then :
24199   gl_cv_func_mbrtowc_sanitycheck=yes
24200 else
24201   gl_cv_func_mbrtowc_sanitycheck=no
24202 fi
24203 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24204   conftest.$ac_objext conftest.beam conftest.$ac_ext
24205 fi
24206
24207       fi
24208
24209 fi
24210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
24211 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
24212
24213     REPLACE_MBSTATE_T=0
24214     case "$gl_cv_func_mbrtowc_incomplete_state" in
24215       *yes) ;;
24216       *) REPLACE_MBSTATE_T=1 ;;
24217     esac
24218     case "$gl_cv_func_mbrtowc_sanitycheck" in
24219       *yes) ;;
24220       *) REPLACE_MBSTATE_T=1 ;;
24221     esac
24222   else
24223     REPLACE_MBSTATE_T=1
24224   fi
24225
24226
24227
24228   if test $ac_cv_func_mbsrtowcs = no; then
24229     HAVE_MBSRTOWCS=0
24230     ac_fn_c_check_decl "$LINENO" "mbsrtowcs" "ac_cv_have_decl_mbsrtowcs" "
24231 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
24232    <wchar.h>.
24233    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
24234    included before <wchar.h>.  */
24235 #include <stddef.h>
24236 #include <stdio.h>
24237 #include <time.h>
24238 #include <wchar.h>
24239
24240 "
24241 if test "x$ac_cv_have_decl_mbsrtowcs" = xyes; then :
24242   ac_have_decl=1
24243 else
24244   ac_have_decl=0
24245 fi
24246
24247 cat >>confdefs.h <<_ACEOF
24248 #define HAVE_DECL_MBSRTOWCS $ac_have_decl
24249 _ACEOF
24250
24251     if test $ac_cv_have_decl_mbsrtowcs = yes; then
24252                         REPLACE_MBSRTOWCS=1
24253     fi
24254   else
24255     if test $REPLACE_MBSTATE_T = 1; then
24256       REPLACE_MBSRTOWCS=1
24257     else
24258
24259
24260
24261
24262
24263
24264      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbsrtowcs works" >&5
24265 $as_echo_n "checking whether mbsrtowcs works... " >&6; }
24266 if ${gl_cv_func_mbsrtowcs_works+:} false; then :
24267   $as_echo_n "(cached) " >&6
24268 else
24269
24270                   case "$host_os" in
24271                                    # Guess no on HP-UX, Solaris, mingw.
24272         hpux* | solaris* | mingw*) gl_cv_func_mbsrtowcs_works="guessing no" ;;
24273                                    # Guess yes otherwise.
24274         *)                         gl_cv_func_mbsrtowcs_works="guessing yes" ;;
24275       esac
24276       if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
24277         if test "$cross_compiling" = yes; then :
24278   :
24279 else
24280   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24281 /* end confdefs.h.  */
24282
24283 #include <locale.h>
24284 #include <string.h>
24285 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
24286    <wchar.h>.
24287    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
24288    included before <wchar.h>.  */
24289 #include <stddef.h>
24290 #include <stdio.h>
24291 #include <time.h>
24292 #include <wchar.h>
24293 int main ()
24294 {
24295   int result = 0;
24296   /* Test whether the function supports a NULL destination argument.
24297      This fails on native Windows.  */
24298   if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
24299     {
24300       const char input[] = "\337er";
24301       const char *src = input;
24302       mbstate_t state;
24303
24304       memset (&state, '\0', sizeof (mbstate_t));
24305       if (mbsrtowcs (NULL, &src, 1, &state) != 3
24306           || src != input)
24307         result |= 1;
24308     }
24309   /* Test whether the function works when started with a conversion state
24310      in non-initial state.  This fails on HP-UX 11.11 and Solaris 10.  */
24311   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
24312     {
24313       const char input[] = "B\303\274\303\237er";
24314       mbstate_t state;
24315
24316       memset (&state, '\0', sizeof (mbstate_t));
24317       if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
24318         if (!mbsinit (&state))
24319           {
24320             const char *src = input + 2;
24321             if (mbsrtowcs (NULL, &src, 10, &state) != 4)
24322               result |= 2;
24323           }
24324     }
24325   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
24326     {
24327       const char input[] = "<\306\374\313\334\270\354>";
24328       mbstate_t state;
24329
24330       memset (&state, '\0', sizeof (mbstate_t));
24331       if (mbrtowc (NULL, input + 3, 1, &state) == (size_t)(-2))
24332         if (!mbsinit (&state))
24333           {
24334             const char *src = input + 4;
24335             if (mbsrtowcs (NULL, &src, 10, &state) != 3)
24336               result |= 4;
24337           }
24338     }
24339   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
24340     {
24341       const char input[] = "B\250\271\201\060\211\070er";
24342       mbstate_t state;
24343
24344       memset (&state, '\0', sizeof (mbstate_t));
24345       if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
24346         if (!mbsinit (&state))
24347           {
24348             const char *src = input + 2;
24349             if (mbsrtowcs (NULL, &src, 10, &state) != 4)
24350               result |= 8;
24351           }
24352     }
24353   return result;
24354 }
24355 _ACEOF
24356 if ac_fn_c_try_run "$LINENO"; then :
24357   gl_cv_func_mbsrtowcs_works=yes
24358 else
24359   gl_cv_func_mbsrtowcs_works=no
24360 fi
24361 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24362   conftest.$ac_objext conftest.beam conftest.$ac_ext
24363 fi
24364
24365       fi
24366
24367 fi
24368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbsrtowcs_works" >&5
24369 $as_echo "$gl_cv_func_mbsrtowcs_works" >&6; }
24370
24371       case "$gl_cv_func_mbsrtowcs_works" in
24372         *yes) ;;
24373         *) REPLACE_MBSRTOWCS=1 ;;
24374       esac
24375     fi
24376   fi
24377
24378   if test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1; then
24379
24380
24381
24382
24383
24384
24385
24386
24387   gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs.$ac_objext"
24388
24389
24390
24391
24392
24393
24394
24395
24396
24397   gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs-state.$ac_objext"
24398
24399
24400   :
24401
24402   fi
24403
24404
24405
24406
24407
24408           GNULIB_MBSRTOWCS=1
24409
24410
24411
24412
24413
24414 $as_echo "#define GNULIB_TEST_MBSRTOWCS 1" >>confdefs.h
24415
24416
24417
24418
24419
24420
24421   if false; then
24422     REPLACE_MBTOWC=1
24423   fi
24424
24425   if test $REPLACE_MBTOWC = 1; then
24426
24427
24428
24429
24430
24431
24432
24433
24434   gl_LIBOBJS="$gl_LIBOBJS mbtowc.$ac_objext"
24435
24436
24437   :
24438
24439   fi
24440
24441
24442
24443
24444
24445           GNULIB_MBTOWC=1
24446
24447
24448
24449
24450
24451 $as_echo "#define GNULIB_TEST_MBTOWC 1" >>confdefs.h
24452
24453
24454
24455
24456
24457   :
24458
24459
24460   if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
24461
24462
24463
24464
24465
24466
24467
24468
24469   gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext"
24470
24471
24472   for ac_header in bp-sym.h
24473 do :
24474   ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
24475 if test "x$ac_cv_header_bp_sym_h" = xyes; then :
24476   cat >>confdefs.h <<_ACEOF
24477 #define HAVE_BP_SYM_H 1
24478 _ACEOF
24479
24480 fi
24481
24482 done
24483
24484
24485   fi
24486
24487
24488
24489
24490
24491           GNULIB_MEMCHR=1
24492
24493
24494
24495
24496
24497 $as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
24498
24499
24500
24501
24502
24503
24504
24505
24506
24507   for ac_func in mempcpy
24508 do :
24509   ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
24510 if test "x$ac_cv_func_mempcpy" = xyes; then :
24511   cat >>confdefs.h <<_ACEOF
24512 #define HAVE_MEMPCPY 1
24513 _ACEOF
24514
24515 fi
24516 done
24517
24518   if test $ac_cv_func_mempcpy = no; then
24519     HAVE_MEMPCPY=0
24520   fi
24521
24522   if test $HAVE_MEMPCPY = 0; then
24523
24524
24525
24526
24527
24528
24529
24530
24531   gl_LIBOBJS="$gl_LIBOBJS mempcpy.$ac_objext"
24532
24533
24534   :
24535
24536   fi
24537
24538
24539
24540
24541
24542           GNULIB_MEMPCPY=1
24543
24544
24545
24546
24547
24548 $as_echo "#define GNULIB_TEST_MEMPCPY 1" >>confdefs.h
24549
24550
24551
24552
24553
24554
24555
24556
24557   if test $ac_cv_have_decl_memrchr = no; then
24558     HAVE_DECL_MEMRCHR=0
24559   fi
24560
24561   for ac_func in memrchr
24562 do :
24563   ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr"
24564 if test "x$ac_cv_func_memrchr" = xyes; then :
24565   cat >>confdefs.h <<_ACEOF
24566 #define HAVE_MEMRCHR 1
24567 _ACEOF
24568
24569 fi
24570 done
24571
24572
24573   if test $ac_cv_func_memrchr = no; then
24574
24575
24576
24577
24578
24579
24580
24581
24582   gl_LIBOBJS="$gl_LIBOBJS memrchr.$ac_objext"
24583
24584     :
24585   fi
24586
24587
24588
24589
24590
24591           GNULIB_MEMRCHR=1
24592
24593
24594
24595
24596
24597 $as_echo "#define GNULIB_TEST_MEMRCHR 1" >>confdefs.h
24598
24599
24600
24601
24602
24603   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing slash" >&5
24604 $as_echo_n "checking whether mkdir handles trailing slash... " >&6; }
24605 if ${gl_cv_func_mkdir_trailing_slash_works+:} false; then :
24606   $as_echo_n "(cached) " >&6
24607 else
24608   rm -rf conftest.dir
24609       if test "$cross_compiling" = yes; then :
24610   case "$host_os" in
24611                  # Guess yes on glibc systems.
24612          *-gnu*) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
24613                  # If we don't know, assume the worst.
24614          *)      gl_cv_func_mkdir_trailing_slash_works="guessing no" ;;
24615        esac
24616
24617 else
24618   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24619 /* end confdefs.h.  */
24620
24621 #       include <sys/types.h>
24622 #       include <sys/stat.h>
24623
24624 int
24625 main ()
24626 {
24627 return mkdir ("conftest.dir/", 0700);
24628   ;
24629   return 0;
24630 }
24631 _ACEOF
24632 if ac_fn_c_try_run "$LINENO"; then :
24633   gl_cv_func_mkdir_trailing_slash_works=yes
24634 else
24635   gl_cv_func_mkdir_trailing_slash_works=no
24636 fi
24637 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24638   conftest.$ac_objext conftest.beam conftest.$ac_ext
24639 fi
24640
24641     rm -rf conftest.dir
24642
24643
24644 fi
24645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_slash_works" >&5
24646 $as_echo "$gl_cv_func_mkdir_trailing_slash_works" >&6; }
24647   case "$gl_cv_func_mkdir_trailing_slash_works" in
24648     *yes) ;;
24649     *)
24650       REPLACE_MKDIR=1
24651       ;;
24652   esac
24653
24654   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing dot" >&5
24655 $as_echo_n "checking whether mkdir handles trailing dot... " >&6; }
24656 if ${gl_cv_func_mkdir_trailing_dot_works+:} false; then :
24657   $as_echo_n "(cached) " >&6
24658 else
24659   rm -rf conftest.dir
24660       if test "$cross_compiling" = yes; then :
24661   case "$host_os" in
24662                  # Guess yes on glibc systems.
24663          *-gnu*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
24664                  # If we don't know, assume the worst.
24665          *)      gl_cv_func_mkdir_trailing_dot_works="guessing no" ;;
24666        esac
24667
24668 else
24669   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24670 /* end confdefs.h.  */
24671
24672 #       include <sys/types.h>
24673 #       include <sys/stat.h>
24674
24675 int
24676 main ()
24677 {
24678 return !mkdir ("conftest.dir/./", 0700);
24679   ;
24680   return 0;
24681 }
24682 _ACEOF
24683 if ac_fn_c_try_run "$LINENO"; then :
24684   gl_cv_func_mkdir_trailing_dot_works=yes
24685 else
24686   gl_cv_func_mkdir_trailing_dot_works=no
24687 fi
24688 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24689   conftest.$ac_objext conftest.beam conftest.$ac_ext
24690 fi
24691
24692     rm -rf conftest.dir
24693
24694
24695 fi
24696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_dot_works" >&5
24697 $as_echo "$gl_cv_func_mkdir_trailing_dot_works" >&6; }
24698   case "$gl_cv_func_mkdir_trailing_dot_works" in
24699     *yes) ;;
24700     *)
24701       REPLACE_MKDIR=1
24702
24703 $as_echo "#define FUNC_MKDIR_DOT_BUG 1" >>confdefs.h
24704
24705       ;;
24706   esac
24707
24708   if test $REPLACE_MKDIR = 1; then
24709
24710
24711
24712
24713
24714
24715
24716
24717   gl_LIBOBJS="$gl_LIBOBJS mkdir.$ac_objext"
24718
24719   fi
24720
24721
24722
24723
24724   if test $ac_cv_func_mkdirat != yes; then
24725     HAVE_MKDIRAT=0
24726   fi
24727
24728   if test $HAVE_MKDIRAT = 0; then
24729
24730
24731
24732
24733
24734
24735
24736
24737   gl_LIBOBJS="$gl_LIBOBJS mkdirat.$ac_objext"
24738
24739
24740
24741
24742   fi
24743
24744
24745
24746
24747
24748           GNULIB_MKDIRAT=1
24749
24750
24751
24752
24753
24754 $as_echo "#define GNULIB_TEST_MKDIRAT 1" >>confdefs.h
24755
24756
24757
24758
24759
24760   for ac_func in mkdtemp
24761 do :
24762   ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
24763 if test "x$ac_cv_func_mkdtemp" = xyes; then :
24764   cat >>confdefs.h <<_ACEOF
24765 #define HAVE_MKDTEMP 1
24766 _ACEOF
24767
24768 fi
24769 done
24770
24771   if test $ac_cv_func_mkdtemp = no; then
24772     HAVE_MKDTEMP=0
24773   fi
24774
24775   if test $HAVE_MKDTEMP = 0; then
24776
24777
24778
24779
24780
24781
24782
24783
24784   gl_LIBOBJS="$gl_LIBOBJS mkdtemp.$ac_objext"
24785
24786     :
24787
24788   fi
24789
24790
24791
24792
24793
24794           GNULIB_MKDTEMP=1
24795
24796
24797
24798
24799
24800 $as_echo "#define GNULIB_TEST_MKDTEMP 1" >>confdefs.h
24801
24802
24803
24804
24805
24806
24807   if test $ac_cv_func_mkfifo = no; then
24808     HAVE_MKFIFO=0
24809   else
24810
24811     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkfifo rejects trailing slashes" >&5
24812 $as_echo_n "checking whether mkfifo rejects trailing slashes... " >&6; }
24813 if ${gl_cv_func_mkfifo_works+:} false; then :
24814   $as_echo_n "(cached) " >&6
24815 else
24816   # Assume that if we have lstat, we can also check symlinks.
24817        if test $ac_cv_func_lstat = yes; then
24818          ln -s conftest.tmp conftest.lnk
24819        fi
24820        if test "$cross_compiling" = yes; then :
24821   case "$host_os" in
24822                     # Guess yes on glibc systems.
24823             *-gnu*) gl_cv_func_mkfifo_works="guessing yes" ;;
24824                     # If we don't know, assume the worst.
24825             *)      gl_cv_func_mkfifo_works="guessing no" ;;
24826           esac
24827
24828 else
24829   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24830 /* end confdefs.h.  */
24831 #include <sys/stat.h>
24832
24833 int
24834 main ()
24835 {
24836 int result = 0;
24837              if (!mkfifo ("conftest.tmp/", 0600))
24838                result |= 1;
24839 #if HAVE_LSTAT
24840              if (!mkfifo ("conftest.lnk/", 0600))
24841                result |= 2;
24842 #endif
24843              return result;
24844
24845   ;
24846   return 0;
24847 }
24848 _ACEOF
24849 if ac_fn_c_try_run "$LINENO"; then :
24850   gl_cv_func_mkfifo_works=yes
24851 else
24852   gl_cv_func_mkfifo_works=no
24853 fi
24854 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24855   conftest.$ac_objext conftest.beam conftest.$ac_ext
24856 fi
24857
24858        rm -f conftest.tmp conftest.lnk
24859 fi
24860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkfifo_works" >&5
24861 $as_echo "$gl_cv_func_mkfifo_works" >&6; }
24862     case "$gl_cv_func_mkfifo_works" in
24863       *yes) ;;
24864       *)
24865
24866 $as_echo "#define MKFIFO_TRAILING_SLASH_BUG 1" >>confdefs.h
24867
24868         REPLACE_MKFIFO=1
24869         ;;
24870     esac
24871   fi
24872
24873   if test $HAVE_MKFIFO = 0 || test $REPLACE_MKFIFO = 1; then
24874
24875
24876
24877
24878
24879
24880
24881
24882   gl_LIBOBJS="$gl_LIBOBJS mkfifo.$ac_objext"
24883
24884   fi
24885
24886
24887
24888
24889
24890           GNULIB_MKFIFO=1
24891
24892
24893
24894
24895
24896 $as_echo "#define GNULIB_TEST_MKFIFO 1" >>confdefs.h
24897
24898
24899
24900
24901
24902
24903
24904
24905   if test $ac_cv_func_mkfifoat = no; then
24906     # No known system has mkfifoat but not mknodat
24907     HAVE_MKFIFOAT=0
24908     HAVE_MKNODAT=0
24909   fi
24910
24911   if test $HAVE_MKFIFOAT = 0; then
24912
24913
24914
24915
24916
24917
24918
24919
24920   gl_LIBOBJS="$gl_LIBOBJS mkfifoat.$ac_objext"
24921
24922   fi
24923   if test $HAVE_MKNODAT = 0; then
24924
24925
24926
24927
24928
24929
24930
24931
24932   gl_LIBOBJS="$gl_LIBOBJS mknodat.$ac_objext"
24933
24934   fi
24935
24936
24937
24938
24939
24940           GNULIB_MKFIFOAT=1
24941
24942
24943
24944
24945
24946 $as_echo "#define GNULIB_TEST_MKFIFOAT 1" >>confdefs.h
24947
24948
24949
24950
24951
24952
24953
24954
24955           GNULIB_MKNODAT=1
24956
24957
24958
24959
24960
24961 $as_echo "#define GNULIB_TEST_MKNODAT 1" >>confdefs.h
24962
24963
24964
24965
24966
24967
24968
24969
24970   if test $ac_cv_func_mknod = no; then
24971     HAVE_MKNOD=0
24972   else
24973         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mknod can create fifo without root privileges" >&5
24974 $as_echo_n "checking whether mknod can create fifo without root privileges... " >&6; }
24975 if ${gl_cv_func_mknod_works+:} false; then :
24976   $as_echo_n "(cached) " >&6
24977 else
24978   if test "$cross_compiling" = yes; then :
24979   case "$host_os" in
24980                     # Guess yes on glibc systems.
24981             *-gnu*) gl_cv_func_mknod_works="guessing yes" ;;
24982                     # If we don't know, assume the worst.
24983             *)      gl_cv_func_mknod_works="guessing no" ;;
24984           esac
24985
24986 else
24987   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24988 /* end confdefs.h.  */
24989 #include <sys/stat.h>
24990              #include <unistd.h>
24991
24992              /* Copied from root-uid.h.  FIXME: Just use root-uid.h.  */
24993              #ifdef __TANDEM
24994              # define ROOT_UID 65535
24995              #else
24996              # define ROOT_UID 0
24997              #endif
24998
24999 int
25000 main ()
25001 {
25002 /* Indeterminate for super-user, assume no.  Why are you running
25003          configure as root, anyway?  */
25004       if (geteuid () == ROOT_UID) return 99;
25005       if (mknod ("conftest.fifo", S_IFIFO | 0600, 0)) return 2;
25006   ;
25007   return 0;
25008 }
25009 _ACEOF
25010 if ac_fn_c_try_run "$LINENO"; then :
25011   gl_cv_func_mknod_works=yes
25012 else
25013   if test $? = 99 && test x"$FORCE_UNSAFE_CONFIGURE" = x; then
25014             { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
25015 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
25016 as_fn_error $? "you should not run configure as root (set FORCE_UNSAFE_CONFIGURE=1 in environment to bypass this check)
25017 See \`config.log' for more details" "$LINENO" 5; }
25018           fi
25019           gl_cv_func_mknod_works=no
25020 fi
25021 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25022   conftest.$ac_objext conftest.beam conftest.$ac_ext
25023 fi
25024
25025        rm -f conftest.fifo
25026 fi
25027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mknod_works" >&5
25028 $as_echo "$gl_cv_func_mknod_works" >&6; }
25029     case "$gl_cv_func_mknod_works" in
25030       *yes) ;;
25031       *)
25032         REPLACE_MKNOD=1
25033
25034 $as_echo "#define MKNOD_FIFO_BUG 1" >>confdefs.h
25035
25036         ;;
25037     esac
25038         if test $REPLACE_MKFIFO = 1; then
25039       REPLACE_MKNOD=1
25040     fi
25041   fi
25042
25043   if test $HAVE_MKNOD = 0 || test $REPLACE_MKNOD = 1; then
25044
25045
25046
25047
25048
25049
25050
25051
25052   gl_LIBOBJS="$gl_LIBOBJS mknod.$ac_objext"
25053
25054   fi
25055
25056
25057
25058
25059
25060           GNULIB_MKNOD=1
25061
25062
25063
25064
25065
25066 $as_echo "#define GNULIB_TEST_MKNOD 1" >>confdefs.h
25067
25068
25069
25070
25071
25072
25073
25074
25075
25076   if test $APPLE_UNIVERSAL_BUILD = 1; then
25077     # A universal build on Apple Mac OS X platforms.
25078     # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode.
25079     # But we need a configuration result that is valid in both modes.
25080     gl_cv_func_working_mktime=no
25081   fi
25082   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5
25083 $as_echo_n "checking for working mktime... " >&6; }
25084 if ${gl_cv_func_working_mktime+:} false; then :
25085   $as_echo_n "(cached) " >&6
25086 else
25087   if test "$cross_compiling" = yes; then :
25088   gl_cv_func_working_mktime=no
25089 else
25090   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25091 /* end confdefs.h.  */
25092 /* Test program from Paul Eggert and Tony Leneis.  */
25093 #include <limits.h>
25094 #include <stdlib.h>
25095 #include <time.h>
25096
25097 #ifdef HAVE_UNISTD_H
25098 # include <unistd.h>
25099 #endif
25100
25101 #if HAVE_DECL_ALARM
25102 # include <signal.h>
25103 #endif
25104
25105 /* Work around redefinition to rpl_putenv by other config tests.  */
25106 #undef putenv
25107
25108 static time_t time_t_max;
25109 static time_t time_t_min;
25110
25111 /* Values we'll use to set the TZ environment variable.  */
25112 static char *tz_strings[] = {
25113   (char *) 0, "TZ=GMT0", "TZ=JST-9",
25114   "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
25115 };
25116 #define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
25117
25118 /* Return 0 if mktime fails to convert a date in the spring-forward gap.
25119    Based on a problem report from Andreas Jaeger.  */
25120 static int
25121 spring_forward_gap ()
25122 {
25123   /* glibc (up to about 1998-10-07) failed this test. */
25124   struct tm tm;
25125
25126   /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
25127      instead of "TZ=America/Vancouver" in order to detect the bug even
25128      on systems that don't support the Olson extension, or don't have the
25129      full zoneinfo tables installed.  */
25130   putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
25131
25132   tm.tm_year = 98;
25133   tm.tm_mon = 3;
25134   tm.tm_mday = 5;
25135   tm.tm_hour = 2;
25136   tm.tm_min = 0;
25137   tm.tm_sec = 0;
25138   tm.tm_isdst = -1;
25139   return mktime (&tm) != (time_t) -1;
25140 }
25141
25142 static int
25143 mktime_test1 (time_t now)
25144 {
25145   struct tm *lt;
25146   return ! (lt = localtime (&now)) || mktime (lt) == now;
25147 }
25148
25149 static int
25150 mktime_test (time_t now)
25151 {
25152   return (mktime_test1 (now)
25153           && mktime_test1 ((time_t) (time_t_max - now))
25154           && mktime_test1 ((time_t) (time_t_min + now)));
25155 }
25156
25157 static int
25158 irix_6_4_bug ()
25159 {
25160   /* Based on code from Ariel Faigon.  */
25161   struct tm tm;
25162   tm.tm_year = 96;
25163   tm.tm_mon = 3;
25164   tm.tm_mday = 0;
25165   tm.tm_hour = 0;
25166   tm.tm_min = 0;
25167   tm.tm_sec = 0;
25168   tm.tm_isdst = -1;
25169   mktime (&tm);
25170   return tm.tm_mon == 2 && tm.tm_mday == 31;
25171 }
25172
25173 static int
25174 bigtime_test (int j)
25175 {
25176   struct tm tm;
25177   time_t now;
25178   tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
25179   now = mktime (&tm);
25180   if (now != (time_t) -1)
25181     {
25182       struct tm *lt = localtime (&now);
25183       if (! (lt
25184              && lt->tm_year == tm.tm_year
25185              && lt->tm_mon == tm.tm_mon
25186              && lt->tm_mday == tm.tm_mday
25187              && lt->tm_hour == tm.tm_hour
25188              && lt->tm_min == tm.tm_min
25189              && lt->tm_sec == tm.tm_sec
25190              && lt->tm_yday == tm.tm_yday
25191              && lt->tm_wday == tm.tm_wday
25192              && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
25193                   == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
25194         return 0;
25195     }
25196   return 1;
25197 }
25198
25199 static int
25200 year_2050_test ()
25201 {
25202   /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
25203      ignoring leap seconds.  */
25204   unsigned long int answer = 2527315200UL;
25205
25206   struct tm tm;
25207   time_t t;
25208   tm.tm_year = 2050 - 1900;
25209   tm.tm_mon = 2 - 1;
25210   tm.tm_mday = 1;
25211   tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
25212   tm.tm_isdst = -1;
25213
25214   /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
25215      instead of "TZ=America/Vancouver" in order to detect the bug even
25216      on systems that don't support the Olson extension, or don't have the
25217      full zoneinfo tables installed.  */
25218   putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
25219
25220   t = mktime (&tm);
25221
25222   /* Check that the result is either a failure, or close enough
25223      to the correct answer that we can assume the discrepancy is
25224      due to leap seconds.  */
25225   return (t == (time_t) -1
25226           || (0 < t && answer - 120 <= t && t <= answer + 120));
25227 }
25228
25229 int
25230 main ()
25231 {
25232   int result = 0;
25233   time_t t, delta;
25234   int i, j;
25235   int time_t_signed_magnitude = (time_t) ~ (time_t) 0 < (time_t) -1;
25236   int time_t_signed = ! ((time_t) 0 < (time_t) -1);
25237
25238 #if HAVE_DECL_ALARM
25239   /* This test makes some buggy mktime implementations loop.
25240      Give up after 60 seconds; a mktime slower than that
25241      isn't worth using anyway.  */
25242   signal (SIGALRM, SIG_DFL);
25243   alarm (60);
25244 #endif
25245
25246   time_t_max = (! time_t_signed
25247                 ? (time_t) -1
25248                 : ((((time_t) 1 << (sizeof (time_t) * CHAR_BIT - 2)) - 1)
25249                    * 2 + 1));
25250   time_t_min = (! time_t_signed
25251                 ? (time_t) 0
25252                 : time_t_signed_magnitude
25253                 ? ~ (time_t) 0
25254                 : ~ time_t_max);
25255
25256   delta = time_t_max / 997; /* a suitable prime number */
25257   for (i = 0; i < N_STRINGS; i++)
25258     {
25259       if (tz_strings[i])
25260         putenv (tz_strings[i]);
25261
25262       for (t = 0; t <= time_t_max - delta && (result & 1) == 0; t += delta)
25263         if (! mktime_test (t))
25264           result |= 1;
25265       if ((result & 2) == 0
25266           && ! (mktime_test ((time_t) 1)
25267                 && mktime_test ((time_t) (60 * 60))
25268                 && mktime_test ((time_t) (60 * 60 * 24))))
25269         result |= 2;
25270
25271       for (j = 1; (result & 4) == 0; j <<= 1)
25272         {
25273           if (! bigtime_test (j))
25274             result |= 4;
25275           if (INT_MAX / 2 < j)
25276             break;
25277         }
25278       if ((result & 8) == 0 && ! bigtime_test (INT_MAX))
25279         result |= 8;
25280     }
25281   if (! irix_6_4_bug ())
25282     result |= 16;
25283   if (! spring_forward_gap ())
25284     result |= 32;
25285   if (! year_2050_test ())
25286     result |= 64;
25287   return result;
25288 }
25289 _ACEOF
25290 if ac_fn_c_try_run "$LINENO"; then :
25291   gl_cv_func_working_mktime=yes
25292 else
25293   gl_cv_func_working_mktime=no
25294 fi
25295 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25296   conftest.$ac_objext conftest.beam conftest.$ac_ext
25297 fi
25298
25299
25300 fi
25301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mktime" >&5
25302 $as_echo "$gl_cv_func_working_mktime" >&6; }
25303
25304   if test $gl_cv_func_working_mktime = no; then
25305     REPLACE_MKTIME=1
25306   else
25307     REPLACE_MKTIME=0
25308   fi
25309
25310   if test $REPLACE_MKTIME = 1; then
25311
25312
25313
25314
25315
25316
25317
25318
25319   gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext"
25320
25321     :
25322   fi
25323
25324
25325
25326
25327
25328           GNULIB_MKTIME=1
25329
25330
25331
25332
25333
25334 $as_echo "#define GNULIB_TEST_MKTIME 1" >>confdefs.h
25335
25336
25337
25338
25339   :
25340
25341
25342
25343   if test $ac_cv_func__set_invalid_parameter_handler = yes; then
25344     HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
25345
25346 $as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
25347
25348   else
25349     HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
25350   fi
25351
25352
25353   if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
25354
25355
25356
25357
25358
25359
25360
25361
25362   gl_LIBOBJS="$gl_LIBOBJS msvc-inval.$ac_objext"
25363
25364   fi
25365
25366
25367
25368   if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
25369
25370
25371
25372
25373
25374
25375
25376
25377   gl_LIBOBJS="$gl_LIBOBJS msvc-nothrow.$ac_objext"
25378
25379   fi
25380
25381
25382
25383
25384
25385      if test $ac_cv_func_nl_langinfo = yes; then
25386     # On Irix 6.5, YESEXPR is defined, but nl_langinfo(YESEXPR) is broken.
25387     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether YESEXPR works" >&5
25388 $as_echo_n "checking whether YESEXPR works... " >&6; }
25389 if ${gl_cv_func_nl_langinfo_yesexpr_works+:} false; then :
25390   $as_echo_n "(cached) " >&6
25391 else
25392   if test "$cross_compiling" = yes; then :
25393
25394          case "$host_os" in
25395                    # Guess no on irix systems.
25396            irix*)  gl_cv_func_nl_langinfo_yesexpr_works="guessing no";;
25397                    # Guess yes elsewhere.
25398            *)      gl_cv_func_nl_langinfo_yesexpr_works="guessing yes";;
25399          esac
25400
25401 else
25402   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25403 /* end confdefs.h.  */
25404 #include <langinfo.h>
25405
25406 int
25407 main ()
25408 {
25409 return !*nl_langinfo(YESEXPR);
25410
25411   ;
25412   return 0;
25413 }
25414 _ACEOF
25415 if ac_fn_c_try_run "$LINENO"; then :
25416   gl_cv_func_nl_langinfo_yesexpr_works=yes
25417 else
25418   gl_cv_func_nl_langinfo_yesexpr_works=no
25419 fi
25420 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25421   conftest.$ac_objext conftest.beam conftest.$ac_ext
25422 fi
25423
25424
25425 fi
25426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_nl_langinfo_yesexpr_works" >&5
25427 $as_echo "$gl_cv_func_nl_langinfo_yesexpr_works" >&6; }
25428     case $gl_cv_func_nl_langinfo_yesexpr_works in
25429       *yes) FUNC_NL_LANGINFO_YESEXPR_WORKS=1 ;;
25430       *)    FUNC_NL_LANGINFO_YESEXPR_WORKS=0 ;;
25431     esac
25432
25433 cat >>confdefs.h <<_ACEOF
25434 #define FUNC_NL_LANGINFO_YESEXPR_WORKS $FUNC_NL_LANGINFO_YESEXPR_WORKS
25435 _ACEOF
25436
25437     if test $HAVE_LANGINFO_CODESET = 1 && test $HAVE_LANGINFO_ERA = 1 \
25438         && test $FUNC_NL_LANGINFO_YESEXPR_WORKS = 1; then
25439       :
25440     else
25441       REPLACE_NL_LANGINFO=1
25442
25443 $as_echo "#define REPLACE_NL_LANGINFO 1" >>confdefs.h
25444
25445     fi
25446   else
25447     HAVE_NL_LANGINFO=0
25448   fi
25449
25450   if test $HAVE_NL_LANGINFO = 0 || test $REPLACE_NL_LANGINFO = 1; then
25451
25452
25453
25454
25455
25456
25457
25458
25459   gl_LIBOBJS="$gl_LIBOBJS nl_langinfo.$ac_objext"
25460
25461   fi
25462
25463
25464
25465
25466
25467           GNULIB_NL_LANGINFO=1
25468
25469
25470
25471
25472
25473 $as_echo "#define GNULIB_TEST_NL_LANGINFO 1" >>confdefs.h
25474
25475
25476
25477
25478
25479
25480
25481
25482
25483
25484
25485
25486
25487
25488
25489 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for obstacks" >&5
25490 $as_echo_n "checking for obstacks... " >&6; }
25491 if ${ac_cv_func_obstack+:} false; then :
25492   $as_echo_n "(cached) " >&6
25493 else
25494   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25495 /* end confdefs.h.  */
25496 $ac_includes_default
25497                       #include "obstack.h"
25498 int
25499 main ()
25500 {
25501 struct obstack mem;
25502                        #define obstack_chunk_alloc malloc
25503                        #define obstack_chunk_free free
25504                        obstack_init (&mem);
25505                        obstack_free (&mem, 0);
25506   ;
25507   return 0;
25508 }
25509 _ACEOF
25510 if ac_fn_c_try_link "$LINENO"; then :
25511   ac_cv_func_obstack=yes
25512 else
25513   ac_cv_func_obstack=no
25514 fi
25515 rm -f core conftest.err conftest.$ac_objext \
25516     conftest$ac_exeext conftest.$ac_ext
25517 fi
25518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_obstack" >&5
25519 $as_echo "$ac_cv_func_obstack" >&6; }
25520 if test $ac_cv_func_obstack = yes; then
25521
25522 $as_echo "#define HAVE_OBSTACK 1" >>confdefs.h
25523
25524 else
25525
25526
25527
25528
25529
25530
25531
25532
25533   gl_LIBOBJS="$gl_LIBOBJS obstack.$ac_objext"
25534
25535 fi
25536
25537
25538
25539   case "$host_os" in
25540     mingw* | pw*)
25541       REPLACE_OPEN=1
25542       ;;
25543     *)
25544
25545       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
25546 $as_echo_n "checking whether open recognizes a trailing slash... " >&6; }
25547 if ${gl_cv_func_open_slash+:} false; then :
25548   $as_echo_n "(cached) " >&6
25549 else
25550   # Assume that if we have lstat, we can also check symlinks.
25551           if test $ac_cv_func_lstat = yes; then
25552             touch conftest.tmp
25553             ln -s conftest.tmp conftest.lnk
25554           fi
25555           if test "$cross_compiling" = yes; then :
25556
25557              case "$host_os" in
25558                freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
25559                  gl_cv_func_open_slash="guessing no" ;;
25560                *)
25561                  gl_cv_func_open_slash="guessing yes" ;;
25562              esac
25563
25564 else
25565   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25566 /* end confdefs.h.  */
25567
25568 #include <fcntl.h>
25569 #if HAVE_UNISTD_H
25570 # include <unistd.h>
25571 #endif
25572 int main ()
25573 {
25574   int result = 0;
25575 #if HAVE_LSTAT
25576   if (open ("conftest.lnk/", O_RDONLY) != -1)
25577     result |= 1;
25578 #endif
25579   if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
25580     result |= 2;
25581   return result;
25582 }
25583 _ACEOF
25584 if ac_fn_c_try_run "$LINENO"; then :
25585   gl_cv_func_open_slash=yes
25586 else
25587   gl_cv_func_open_slash=no
25588 fi
25589 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25590   conftest.$ac_objext conftest.beam conftest.$ac_ext
25591 fi
25592
25593           rm -f conftest.sl conftest.tmp conftest.lnk
25594
25595 fi
25596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5
25597 $as_echo "$gl_cv_func_open_slash" >&6; }
25598       case "$gl_cv_func_open_slash" in
25599         *no)
25600
25601 $as_echo "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
25602
25603           REPLACE_OPEN=1
25604           ;;
25605       esac
25606       ;;
25607   esac
25608
25609     if test $REPLACE_OPEN = 0; then
25610
25611
25612
25613   if test $ac_cv_func_fchdir = no; then
25614     HAVE_FCHDIR=0
25615   fi
25616
25617       if test $HAVE_FCHDIR = 0; then
25618         REPLACE_OPEN=1
25619       fi
25620     fi
25621
25622
25623
25624   if test $REPLACE_OPEN = 1; then
25625
25626
25627
25628
25629
25630
25631
25632
25633   gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext"
25634
25635
25636
25637   :
25638
25639   fi
25640
25641
25642
25643
25644
25645           GNULIB_OPEN=1
25646
25647
25648
25649
25650
25651 $as_echo "#define GNULIB_TEST_OPEN 1" >>confdefs.h
25652
25653
25654
25655
25656
25657
25658
25659
25660   case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink in
25661   yes+*yes)
25662     ;;
25663   yes+*)
25664     # Solaris 9 has *at functions, but uniformly mishandles trailing
25665     # slash in all of them.
25666     REPLACE_OPENAT=1
25667     ;;
25668   *)
25669     HAVE_OPENAT=0
25670     ;;
25671   esac
25672
25673   if test $HAVE_OPENAT = 0 || test $REPLACE_OPENAT = 1; then
25674
25675
25676
25677
25678
25679
25680
25681
25682   gl_LIBOBJS="$gl_LIBOBJS openat.$ac_objext"
25683
25684
25685
25686   :
25687
25688   fi
25689
25690
25691 cat >>confdefs.h <<_ACEOF
25692 #define GNULIB_OPENAT 1
25693 _ACEOF
25694
25695
25696
25697
25698
25699
25700           GNULIB_OPENAT=1
25701
25702
25703
25704
25705
25706 $as_echo "#define GNULIB_TEST_OPENAT 1" >>confdefs.h
25707
25708
25709
25710
25711
25712
25713   for ac_func in opendir
25714 do :
25715   ac_fn_c_check_func "$LINENO" "opendir" "ac_cv_func_opendir"
25716 if test "x$ac_cv_func_opendir" = xyes; then :
25717   cat >>confdefs.h <<_ACEOF
25718 #define HAVE_OPENDIR 1
25719 _ACEOF
25720
25721 fi
25722 done
25723
25724   if test $ac_cv_func_opendir = no; then
25725     HAVE_OPENDIR=0
25726   fi
25727
25728
25729
25730
25731   if test $ac_cv_func_fchdir = no; then
25732     HAVE_FCHDIR=0
25733   fi
25734
25735     if test $HAVE_FCHDIR = 0; then
25736       if test $HAVE_OPENDIR = 1; then
25737         REPLACE_OPENDIR=1
25738       fi
25739     fi
25740
25741
25742   if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then
25743
25744
25745
25746
25747
25748
25749
25750
25751   gl_LIBOBJS="$gl_LIBOBJS opendir.$ac_objext"
25752
25753   fi
25754
25755
25756
25757
25758
25759           GNULIB_OPENDIR=1
25760
25761
25762
25763
25764
25765 $as_echo "#define GNULIB_TEST_OPENDIR 1" >>confdefs.h
25766
25767
25768
25769
25770
25771
25772
25773
25774
25775   ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
25776 #include <$ac_cv_struct_tm>
25777
25778 "
25779 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
25780
25781 cat >>confdefs.h <<_ACEOF
25782 #define HAVE_STRUCT_TM_TM_ZONE 1
25783 _ACEOF
25784
25785
25786 fi
25787
25788 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
25789
25790 $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
25791
25792 else
25793   ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
25794 "
25795 if test "x$ac_cv_have_decl_tzname" = xyes; then :
25796   ac_have_decl=1
25797 else
25798   ac_have_decl=0
25799 fi
25800
25801 cat >>confdefs.h <<_ACEOF
25802 #define HAVE_DECL_TZNAME $ac_have_decl
25803 _ACEOF
25804
25805   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
25806 $as_echo_n "checking for tzname... " >&6; }
25807 if ${ac_cv_var_tzname+:} false; then :
25808   $as_echo_n "(cached) " >&6
25809 else
25810   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25811 /* end confdefs.h.  */
25812 #include <time.h>
25813 #if !HAVE_DECL_TZNAME
25814 extern char *tzname[];
25815 #endif
25816
25817 int
25818 main ()
25819 {
25820 return tzname[0][0];
25821   ;
25822   return 0;
25823 }
25824 _ACEOF
25825 if ac_fn_c_try_link "$LINENO"; then :
25826   ac_cv_var_tzname=yes
25827 else
25828   ac_cv_var_tzname=no
25829 fi
25830 rm -f core conftest.err conftest.$ac_objext \
25831     conftest$ac_exeext conftest.$ac_ext
25832 fi
25833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
25834 $as_echo "$ac_cv_var_tzname" >&6; }
25835   if test $ac_cv_var_tzname = yes; then
25836
25837 $as_echo "#define HAVE_TZNAME 1" >>confdefs.h
25838
25839   fi
25840 fi
25841
25842
25843
25844   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25845 /* end confdefs.h.  */
25846
25847 #include <time.h> /* for time_t */
25848 #include <limits.h> /* for CHAR_BIT, LONG_MIN, LONG_MAX */
25849 #define TYPE_MINIMUM(t) \
25850   ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
25851 #define TYPE_MAXIMUM(t) \
25852   ((t) ((t) 0 < (t) -1 \
25853         ? (t) -1 \
25854         : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
25855 typedef int verify_min[2 * (LONG_MIN <= TYPE_MINIMUM (time_t)) - 1];
25856 typedef int verify_max[2 * (TYPE_MAXIMUM (time_t) <= LONG_MAX) - 1];
25857
25858 _ACEOF
25859 if ac_fn_c_try_compile "$LINENO"; then :
25860
25861 $as_echo "#define TIME_T_FITS_IN_LONG_INT 1" >>confdefs.h
25862
25863
25864 fi
25865 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25866
25867
25868
25869
25870
25871
25872
25873
25874
25875
25876   if test $ac_cv_func_posix_openpt != yes; then
25877         HAVE_POSIX_OPENPT=0
25878   fi
25879
25880   if test $HAVE_POSIX_OPENPT = 0; then
25881
25882
25883
25884
25885
25886
25887
25888
25889   gl_LIBOBJS="$gl_LIBOBJS posix_openpt.$ac_objext"
25890
25891   fi
25892
25893
25894
25895
25896
25897           GNULIB_POSIX_OPENPT=1
25898
25899
25900
25901
25902
25903 $as_echo "#define GNULIB_TEST_POSIX_OPENPT 1" >>confdefs.h
25904
25905
25906
25907
25908   for ac_func in getppriv
25909 do :
25910   ac_fn_c_check_func "$LINENO" "getppriv" "ac_cv_func_getppriv"
25911 if test "x$ac_cv_func_getppriv" = xyes; then :
25912   cat >>confdefs.h <<_ACEOF
25913 #define HAVE_GETPPRIV 1
25914 _ACEOF
25915
25916 fi
25917 done
25918
25919
25920
25921   ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
25922 "
25923 if test "x$ac_cv_have_decl_program_invocation_name" = xyes; then :
25924   ac_have_decl=1
25925 else
25926   ac_have_decl=0
25927 fi
25928
25929 cat >>confdefs.h <<_ACEOF
25930 #define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl
25931 _ACEOF
25932
25933   ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
25934 "
25935 if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes; then :
25936   ac_have_decl=1
25937 else
25938   ac_have_decl=0
25939 fi
25940
25941 cat >>confdefs.h <<_ACEOF
25942 #define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl
25943 _ACEOF
25944
25945
25946
25947
25948
25949
25950   for ac_func in ptsname
25951 do :
25952   ac_fn_c_check_func "$LINENO" "ptsname" "ac_cv_func_ptsname"
25953 if test "x$ac_cv_func_ptsname" = xyes; then :
25954   cat >>confdefs.h <<_ACEOF
25955 #define HAVE_PTSNAME 1
25956 _ACEOF
25957
25958 fi
25959 done
25960
25961   if test $ac_cv_func_ptsname = no; then
25962     HAVE_PTSNAME=0
25963   else
25964     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ptsname sets errno on failure" >&5
25965 $as_echo_n "checking whether ptsname sets errno on failure... " >&6; }
25966 if ${gl_cv_func_ptsname_sets_errno+:} false; then :
25967   $as_echo_n "(cached) " >&6
25968 else
25969   if test "$cross_compiling" = yes; then :
25970   case "$host_os" in
25971                     # Guess yes on glibc systems.
25972             *-gnu*) gl_cv_func_ptsname_sets_errno="guessing yes" ;;
25973                     # If we don't know, assume the worst.
25974             *)      gl_cv_func_ptsname_sets_errno="guessing no" ;;
25975           esac
25976
25977 else
25978   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25979 /* end confdefs.h.  */
25980 #include <errno.h>
25981
25982 int
25983 main ()
25984 {
25985
25986       return ptsname (-1) || !errno;
25987
25988   ;
25989   return 0;
25990 }
25991 _ACEOF
25992 if ac_fn_c_try_run "$LINENO"; then :
25993   gl_cv_func_ptsname_sets_errno=yes
25994 else
25995   gl_cv_func_ptsname_sets_errno=no
25996 fi
25997 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25998   conftest.$ac_objext conftest.beam conftest.$ac_ext
25999 fi
26000
26001 fi
26002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ptsname_sets_errno" >&5
26003 $as_echo "$gl_cv_func_ptsname_sets_errno" >&6; }
26004     case $gl_cv_func_ptsname_sets_errno in
26005       *no) REPLACE_PTSNAME=1 ;;
26006     esac
26007   fi
26008
26009   if test $HAVE_PTSNAME = 0 || test $REPLACE_PTSNAME = 1; then
26010
26011
26012
26013
26014
26015
26016
26017
26018   gl_LIBOBJS="$gl_LIBOBJS ptsname.$ac_objext"
26019
26020
26021   :
26022
26023   fi
26024
26025
26026
26027
26028
26029           GNULIB_PTSNAME=1
26030
26031
26032
26033
26034
26035 $as_echo "#define GNULIB_TEST_PTSNAME 1" >>confdefs.h
26036
26037
26038
26039
26040
26041
26042
26043
26044
26045   if test $ac_cv_func_ptsname_r = no; then
26046     HAVE_PTSNAME_R=0
26047   else
26048             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ptsname_r has the same signature as in glibc" >&5
26049 $as_echo_n "checking whether ptsname_r has the same signature as in glibc... " >&6; }
26050 if ${gl_cv_func_ptsname_r_signature_ok+:} false; then :
26051   $as_echo_n "(cached) " >&6
26052 else
26053   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26054 /* end confdefs.h.  */
26055 #include <stddef.h>
26056               #include <stdlib.h>
26057               /* Test whether ptsname_r is declared at all.  */
26058               int (*f) (int, char *, size_t) = ptsname_r;
26059               /* Test whether it has the same declaration as in glibc.  */
26060               #undef ptsname_r
26061               extern
26062               #ifdef __cplusplus
26063               "C"
26064               #endif
26065               int ptsname_r (int, char *, size_t);
26066
26067 int
26068 main ()
26069 {
26070 return f (0, NULL, 0);
26071   ;
26072   return 0;
26073 }
26074
26075 _ACEOF
26076 if ac_fn_c_try_compile "$LINENO"; then :
26077   gl_cv_func_ptsname_r_signature_ok=yes
26078 else
26079   gl_cv_func_ptsname_r_signature_ok=no
26080 fi
26081 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26082
26083 fi
26084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ptsname_r_signature_ok" >&5
26085 $as_echo "$gl_cv_func_ptsname_r_signature_ok" >&6; }
26086     if test $gl_cv_func_ptsname_r_signature_ok = no; then
26087       REPLACE_PTSNAME_R=1
26088     fi
26089   fi
26090
26091   if test $HAVE_PTSNAME_R = 0 || test $REPLACE_PTSNAME_R = 1; then
26092
26093
26094
26095
26096
26097
26098
26099
26100   gl_LIBOBJS="$gl_LIBOBJS ptsname_r.$ac_objext"
26101
26102
26103      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isatty sets errno when it fails" >&5
26104 $as_echo_n "checking whether isatty sets errno when it fails... " >&6; }
26105 if ${gl_cv_func_isatty_sets_errno+:} false; then :
26106   $as_echo_n "(cached) " >&6
26107 else
26108   if test "$cross_compiling" = yes; then :
26109   case "$host_os" in
26110           irix* | solaris* | mingw*)
26111             gl_cv_func_isatty_sets_errno="guessing no";;
26112           *)
26113             gl_cv_func_isatty_sets_errno="guessing yes";;
26114         esac
26115
26116 else
26117   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26118 /* end confdefs.h.  */
26119 #include <errno.h>
26120             #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
26121             # include <io.h>
26122             #else
26123             # include <unistd.h>
26124             #endif
26125
26126 int
26127 main ()
26128 {
26129 errno = 0;
26130             isatty (-1);
26131             return errno == 0;
26132
26133   ;
26134   return 0;
26135 }
26136
26137 _ACEOF
26138 if ac_fn_c_try_run "$LINENO"; then :
26139   gl_cv_func_isatty_sets_errno=yes
26140 else
26141   gl_cv_func_isatty_sets_errno=no
26142 fi
26143 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26144   conftest.$ac_objext conftest.beam conftest.$ac_ext
26145 fi
26146
26147
26148 fi
26149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isatty_sets_errno" >&5
26150 $as_echo "$gl_cv_func_isatty_sets_errno" >&6; }
26151   case "$gl_cv_func_isatty_sets_errno" in
26152     *yes) ;;
26153     *)
26154
26155 $as_echo "#define ISATTY_FAILS_WITHOUT_SETTING_ERRNO 1" >>confdefs.h
26156
26157       ;;
26158   esac
26159
26160   fi
26161
26162
26163
26164
26165
26166           GNULIB_PTSNAME_R=1
26167
26168
26169
26170
26171
26172 $as_echo "#define GNULIB_TEST_PTSNAME_R 1" >>confdefs.h
26173
26174
26175
26176
26177   # Check whether --enable-acl was given.
26178 if test "${enable_acl+set}" = set; then :
26179   enableval=$enable_acl;
26180 else
26181   enable_acl=auto
26182 fi
26183
26184
26185
26186   LIB_ACL=
26187   use_acl=0
26188   if test "x$enable_acl" != "xno"; then
26189         for ac_header in sys/acl.h
26190 do :
26191   ac_fn_c_check_header_mongrel "$LINENO" "sys/acl.h" "ac_cv_header_sys_acl_h" "$ac_includes_default"
26192 if test "x$ac_cv_header_sys_acl_h" = xyes; then :
26193   cat >>confdefs.h <<_ACEOF
26194 #define HAVE_SYS_ACL_H 1
26195 _ACEOF
26196
26197 fi
26198
26199 done
26200
26201     if test $ac_cv_header_sys_acl_h = yes; then
26202       ac_save_LIBS=$LIBS
26203
26204                   if test $use_acl = 0; then
26205         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing acl_get_file" >&5
26206 $as_echo_n "checking for library containing acl_get_file... " >&6; }
26207 if ${ac_cv_search_acl_get_file+:} false; then :
26208   $as_echo_n "(cached) " >&6
26209 else
26210   ac_func_search_save_LIBS=$LIBS
26211 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26212 /* end confdefs.h.  */
26213
26214 /* Override any GCC internal prototype to avoid an error.
26215    Use char because int might match the return type of a GCC
26216    builtin and then its argument prototype would still apply.  */
26217 #ifdef __cplusplus
26218 extern "C"
26219 #endif
26220 char acl_get_file ();
26221 int
26222 main ()
26223 {
26224 return acl_get_file ();
26225   ;
26226   return 0;
26227 }
26228 _ACEOF
26229 for ac_lib in '' acl pacl; do
26230   if test -z "$ac_lib"; then
26231     ac_res="none required"
26232   else
26233     ac_res=-l$ac_lib
26234     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
26235   fi
26236   if ac_fn_c_try_link "$LINENO"; then :
26237   ac_cv_search_acl_get_file=$ac_res
26238 fi
26239 rm -f core conftest.err conftest.$ac_objext \
26240     conftest$ac_exeext
26241   if ${ac_cv_search_acl_get_file+:} false; then :
26242   break
26243 fi
26244 done
26245 if ${ac_cv_search_acl_get_file+:} false; then :
26246
26247 else
26248   ac_cv_search_acl_get_file=no
26249 fi
26250 rm conftest.$ac_ext
26251 LIBS=$ac_func_search_save_LIBS
26252 fi
26253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_acl_get_file" >&5
26254 $as_echo "$ac_cv_search_acl_get_file" >&6; }
26255 ac_res=$ac_cv_search_acl_get_file
26256 if test "$ac_res" != no; then :
26257   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
26258   if test "$ac_cv_search_acl_get_file" != "none required"; then
26259              LIB_ACL=$ac_cv_search_acl_get_file
26260            fi
26261            for ac_func in acl_get_file acl_get_fd acl_set_file acl_set_fd \
26262               acl_free acl_from_mode acl_from_text \
26263               acl_delete_def_file acl_extended_file \
26264               acl_delete_fd_np acl_delete_file_np \
26265               acl_copy_ext_native acl_create_entry_np \
26266               acl_to_short_text acl_free_text
26267 do :
26268   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
26269 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
26270 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
26271   cat >>confdefs.h <<_ACEOF
26272 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
26273 _ACEOF
26274
26275 fi
26276 done
26277
26278            # If the acl_get_file bug is detected, don't enable the ACL support.
26279
26280   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working acl_get_file" >&5
26281 $as_echo_n "checking for working acl_get_file... " >&6; }
26282 if ${gl_cv_func_working_acl_get_file+:} false; then :
26283   $as_echo_n "(cached) " >&6
26284 else
26285   gl_cv_func_working_acl_get_file=no
26286      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26287 /* end confdefs.h.  */
26288 #include <sys/types.h>
26289            #include <sys/acl.h>
26290            #include <errno.h>
26291
26292 int
26293 main ()
26294 {
26295 if (!acl_get_file (".", ACL_TYPE_ACCESS) && errno == ENOENT)
26296               return 1;
26297             return 0;
26298
26299   ;
26300   return 0;
26301 }
26302 _ACEOF
26303 if ac_fn_c_try_link "$LINENO"; then :
26304   if test $cross_compiling = yes; then
26305           gl_cv_func_working_acl_get_file="guessing yes"
26306         elif ./conftest$ac_exeext; then
26307           gl_cv_func_working_acl_get_file=yes
26308         fi
26309 fi
26310 rm -f core conftest.err conftest.$ac_objext \
26311     conftest$ac_exeext conftest.$ac_ext
26312 fi
26313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_acl_get_file" >&5
26314 $as_echo "$gl_cv_func_working_acl_get_file" >&6; }
26315   if test "$gl_cv_func_working_acl_get_file" != no; then :
26316   use_acl=1
26317 fi
26318
26319            if test $use_acl = 1; then
26320                           for ac_header in acl/libacl.h
26321 do :
26322   ac_fn_c_check_header_mongrel "$LINENO" "acl/libacl.h" "ac_cv_header_acl_libacl_h" "$ac_includes_default"
26323 if test "x$ac_cv_header_acl_libacl_h" = xyes; then :
26324   cat >>confdefs.h <<_ACEOF
26325 #define HAVE_ACL_LIBACL_H 1
26326 _ACEOF
26327
26328 fi
26329
26330 done
26331
26332
26333
26334
26335
26336
26337
26338
26339
26340   for ac_func in acl_entries
26341 do :
26342   ac_fn_c_check_func "$LINENO" "acl_entries" "ac_cv_func_acl_entries"
26343 if test "x$ac_cv_func_acl_entries" = xyes; then :
26344   cat >>confdefs.h <<_ACEOF
26345 #define HAVE_ACL_ENTRIES 1
26346 _ACEOF
26347
26348 else
26349
26350     gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
26351
26352 fi
26353 done
26354
26355
26356              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ACL_FIRST_ENTRY" >&5
26357 $as_echo_n "checking for ACL_FIRST_ENTRY... " >&6; }
26358 if ${gl_cv_acl_ACL_FIRST_ENTRY+:} false; then :
26359   $as_echo_n "(cached) " >&6
26360 else
26361   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26362 /* end confdefs.h.  */
26363 #include <sys/types.h>
26364 #include <sys/acl.h>
26365 int type = ACL_FIRST_ENTRY;
26366 int
26367 main ()
26368 {
26369
26370   ;
26371   return 0;
26372 }
26373 _ACEOF
26374 if ac_fn_c_try_compile "$LINENO"; then :
26375   gl_cv_acl_ACL_FIRST_ENTRY=yes
26376 else
26377   gl_cv_acl_ACL_FIRST_ENTRY=no
26378 fi
26379 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26380 fi
26381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_acl_ACL_FIRST_ENTRY" >&5
26382 $as_echo "$gl_cv_acl_ACL_FIRST_ENTRY" >&6; }
26383              if test $gl_cv_acl_ACL_FIRST_ENTRY = yes; then
26384
26385 $as_echo "#define HAVE_ACL_FIRST_ENTRY 1" >>confdefs.h
26386
26387              fi
26388                           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ACL_TYPE_EXTENDED" >&5
26389 $as_echo_n "checking for ACL_TYPE_EXTENDED... " >&6; }
26390 if ${gl_cv_acl_ACL_TYPE_EXTENDED+:} false; then :
26391   $as_echo_n "(cached) " >&6
26392 else
26393   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26394 /* end confdefs.h.  */
26395 #include <sys/types.h>
26396 #include <sys/acl.h>
26397 int type = ACL_TYPE_EXTENDED;
26398 int
26399 main ()
26400 {
26401
26402   ;
26403   return 0;
26404 }
26405 _ACEOF
26406 if ac_fn_c_try_compile "$LINENO"; then :
26407   gl_cv_acl_ACL_TYPE_EXTENDED=yes
26408 else
26409   gl_cv_acl_ACL_TYPE_EXTENDED=no
26410 fi
26411 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26412 fi
26413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_acl_ACL_TYPE_EXTENDED" >&5
26414 $as_echo "$gl_cv_acl_ACL_TYPE_EXTENDED" >&6; }
26415              if test $gl_cv_acl_ACL_TYPE_EXTENDED = yes; then
26416
26417 $as_echo "#define HAVE_ACL_TYPE_EXTENDED 1" >>confdefs.h
26418
26419              fi
26420            else
26421              LIB_ACL=
26422            fi
26423
26424 fi
26425
26426       fi
26427
26428             if test $use_acl = 0; then
26429         for ac_func in facl
26430 do :
26431   ac_fn_c_check_func "$LINENO" "facl" "ac_cv_func_facl"
26432 if test "x$ac_cv_func_facl" = xyes; then :
26433   cat >>confdefs.h <<_ACEOF
26434 #define HAVE_FACL 1
26435 _ACEOF
26436
26437 fi
26438 done
26439
26440         if test $ac_cv_func_facl = yes; then
26441           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing acl_trivial" >&5
26442 $as_echo_n "checking for library containing acl_trivial... " >&6; }
26443 if ${ac_cv_search_acl_trivial+:} false; then :
26444   $as_echo_n "(cached) " >&6
26445 else
26446   ac_func_search_save_LIBS=$LIBS
26447 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26448 /* end confdefs.h.  */
26449
26450 /* Override any GCC internal prototype to avoid an error.
26451    Use char because int might match the return type of a GCC
26452    builtin and then its argument prototype would still apply.  */
26453 #ifdef __cplusplus
26454 extern "C"
26455 #endif
26456 char acl_trivial ();
26457 int
26458 main ()
26459 {
26460 return acl_trivial ();
26461   ;
26462   return 0;
26463 }
26464 _ACEOF
26465 for ac_lib in '' sec; do
26466   if test -z "$ac_lib"; then
26467     ac_res="none required"
26468   else
26469     ac_res=-l$ac_lib
26470     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
26471   fi
26472   if ac_fn_c_try_link "$LINENO"; then :
26473   ac_cv_search_acl_trivial=$ac_res
26474 fi
26475 rm -f core conftest.err conftest.$ac_objext \
26476     conftest$ac_exeext
26477   if ${ac_cv_search_acl_trivial+:} false; then :
26478   break
26479 fi
26480 done
26481 if ${ac_cv_search_acl_trivial+:} false; then :
26482
26483 else
26484   ac_cv_search_acl_trivial=no
26485 fi
26486 rm conftest.$ac_ext
26487 LIBS=$ac_func_search_save_LIBS
26488 fi
26489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_acl_trivial" >&5
26490 $as_echo "$ac_cv_search_acl_trivial" >&6; }
26491 ac_res=$ac_cv_search_acl_trivial
26492 if test "$ac_res" != no; then :
26493   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
26494   if test "$ac_cv_search_acl_trivial" != "none required"; then
26495                LIB_ACL=$ac_cv_search_acl_trivial
26496              fi
26497
26498 fi
26499
26500           for ac_func in acl_trivial
26501 do :
26502   ac_fn_c_check_func "$LINENO" "acl_trivial" "ac_cv_func_acl_trivial"
26503 if test "x$ac_cv_func_acl_trivial" = xyes; then :
26504   cat >>confdefs.h <<_ACEOF
26505 #define HAVE_ACL_TRIVIAL 1
26506 _ACEOF
26507
26508 fi
26509 done
26510
26511           use_acl=1
26512         fi
26513       fi
26514
26515             if test $use_acl = 0; then
26516         for ac_func in getacl
26517 do :
26518   ac_fn_c_check_func "$LINENO" "getacl" "ac_cv_func_getacl"
26519 if test "x$ac_cv_func_getacl" = xyes; then :
26520   cat >>confdefs.h <<_ACEOF
26521 #define HAVE_GETACL 1
26522 _ACEOF
26523
26524 fi
26525 done
26526
26527         if test $ac_cv_func_getacl = yes; then
26528           use_acl=1
26529         fi
26530                 for ac_header in aclv.h
26531 do :
26532   ac_fn_c_check_header_compile "$LINENO" "aclv.h" "ac_cv_header_aclv_h" "#include <sys/types.h>
26533 "
26534 if test "x$ac_cv_header_aclv_h" = xyes; then :
26535   cat >>confdefs.h <<_ACEOF
26536 #define HAVE_ACLV_H 1
26537 _ACEOF
26538
26539 fi
26540
26541 done
26542
26543       fi
26544
26545             if test $use_acl = 0; then
26546         for ac_func in aclx_get
26547 do :
26548   ac_fn_c_check_func "$LINENO" "aclx_get" "ac_cv_func_aclx_get"
26549 if test "x$ac_cv_func_aclx_get" = xyes; then :
26550   cat >>confdefs.h <<_ACEOF
26551 #define HAVE_ACLX_GET 1
26552 _ACEOF
26553
26554 fi
26555 done
26556
26557         if test $ac_cv_func_aclx_get = yes; then
26558           use_acl=1
26559         fi
26560       fi
26561
26562             if test $use_acl = 0 || test "$ac_cv_func_aclx_get" = yes; then
26563         for ac_func in statacl
26564 do :
26565   ac_fn_c_check_func "$LINENO" "statacl" "ac_cv_func_statacl"
26566 if test "x$ac_cv_func_statacl" = xyes; then :
26567   cat >>confdefs.h <<_ACEOF
26568 #define HAVE_STATACL 1
26569 _ACEOF
26570
26571 fi
26572 done
26573
26574         if test $ac_cv_func_statacl = yes; then
26575           use_acl=1
26576         fi
26577       fi
26578
26579             if test $use_acl = 0; then
26580         for ac_func in aclsort
26581 do :
26582   ac_fn_c_check_func "$LINENO" "aclsort" "ac_cv_func_aclsort"
26583 if test "x$ac_cv_func_aclsort" = xyes; then :
26584   cat >>confdefs.h <<_ACEOF
26585 #define HAVE_ACLSORT 1
26586 _ACEOF
26587
26588 fi
26589 done
26590
26591         if test $ac_cv_func_aclsort = yes; then
26592           use_acl=1
26593         fi
26594       fi
26595
26596       LIBS=$ac_save_LIBS
26597     fi
26598     if test "x$enable_acl$use_acl" = "xyes0"; then
26599       as_fn_error $? "ACLs enabled but support not detected" "$LINENO" 5
26600     elif test "x$enable_acl$use_acl" = "xauto0"; then
26601       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libacl development library was not found or not usable." >&5
26602 $as_echo "$as_me: WARNING: libacl development library was not found or not usable." >&2;}
26603       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GNU tar will be built without ACL support." >&5
26604 $as_echo "$as_me: WARNING: GNU tar will be built without ACL support." >&2;}
26605     fi
26606   fi
26607
26608
26609 cat >>confdefs.h <<_ACEOF
26610 #define USE_ACL $use_acl
26611 _ACEOF
26612
26613   USE_ACL=$use_acl
26614
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   if test $ac_cv_func_readlinkat = no; then
26928     HAVE_READLINKAT=0
26929   fi
26930
26931   if test $HAVE_READLINKAT = 0; then
26932
26933
26934
26935
26936
26937
26938
26939
26940   gl_LIBOBJS="$gl_LIBOBJS readlinkat.$ac_objext"
26941
26942   fi
26943
26944
26945
26946
26947
26948           GNULIB_READLINKAT=1
26949
26950
26951
26952
26953
26954 $as_echo "#define GNULIB_TEST_READLINKAT 1" >>confdefs.h
26955
26956
26957
26958
26959
26960
26961   if test $gl_cv_func_malloc_posix = yes; then
26962
26963 $as_echo "#define HAVE_REALLOC_POSIX 1" >>confdefs.h
26964
26965   else
26966     REPLACE_REALLOC=1
26967   fi
26968
26969   if test $REPLACE_REALLOC = 1; then
26970
26971
26972
26973
26974
26975
26976
26977
26978   gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
26979
26980   fi
26981
26982
26983
26984
26985
26986           GNULIB_REALLOC_POSIX=1
26987
26988
26989
26990
26991
26992 $as_echo "#define GNULIB_TEST_REALLOC_POSIX 1" >>confdefs.h
26993
26994
26995
26996
26997
26998 # Check whether --with-included-regex was given.
26999 if test "${with_included_regex+set}" = set; then :
27000   withval=$with_included_regex;
27001 fi
27002
27003
27004   case $with_included_regex in #(
27005   yes|no) ac_use_included_regex=$with_included_regex
27006         ;;
27007   '')
27008     # If the system regex support is good enough that it passes the
27009     # following run test, then default to *not* using the included regex.c.
27010     # If cross compiling, assume the test would fail and use the included
27011     # regex.c.
27012
27013
27014     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working re_compile_pattern" >&5
27015 $as_echo_n "checking for working re_compile_pattern... " >&6; }
27016 if ${gl_cv_func_re_compile_pattern_working+:} false; then :
27017   $as_echo_n "(cached) " >&6
27018 else
27019   if test "$cross_compiling" = yes; then :
27020          gl_cv_func_re_compile_pattern_working=no
27021 else
27022   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27023 /* end confdefs.h.  */
27024 #include <regex.h>
27025
27026             #include <locale.h>
27027             #include <limits.h>
27028             #include <string.h>
27029
27030             #if defined M_CHECK_ACTION || HAVE_DECL_ALARM
27031             # include <signal.h>
27032             # include <unistd.h>
27033             #endif
27034
27035             #if HAVE_MALLOC_H
27036             # include <malloc.h>
27037             #endif
27038
27039             #ifdef M_CHECK_ACTION
27040             /* Exit with distinguishable exit code.  */
27041             static void sigabrt_no_core (int sig) { raise (SIGTERM); }
27042             #endif
27043
27044 int
27045 main ()
27046 {
27047 int result = 0;
27048             static struct re_pattern_buffer regex;
27049             unsigned char folded_chars[UCHAR_MAX + 1];
27050             int i;
27051             const char *s;
27052             struct re_registers regs;
27053
27054             /* Some builds of glibc go into an infinite loop on this
27055                test.  Use alarm to force death, and mallopt to avoid
27056                malloc recursion in diagnosing the corrupted heap. */
27057 #if HAVE_DECL_ALARM
27058             signal (SIGALRM, SIG_DFL);
27059             alarm (2);
27060 #endif
27061 #ifdef M_CHECK_ACTION
27062             signal (SIGABRT, sigabrt_no_core);
27063             mallopt (M_CHECK_ACTION, 2);
27064 #endif
27065
27066             if (setlocale (LC_ALL, "en_US.UTF-8"))
27067               {
27068                 {
27069                   /* http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html
27070                      This test needs valgrind to catch the bug on Debian
27071                      GNU/Linux 3.1 x86, but it might catch the bug better
27072                      on other platforms and it shouldn't hurt to try the
27073                      test here.  */
27074                   static char const pat[] = "insert into";
27075                   static char const data[] =
27076                     "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK";
27077                   re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE
27078                                  | RE_ICASE);
27079                   memset (&regex, 0, sizeof regex);
27080                   s = re_compile_pattern (pat, sizeof pat - 1, &regex);
27081                   if (s)
27082                     result |= 1;
27083                   else if (re_search (&regex, data, sizeof data - 1,
27084                                       0, sizeof data - 1, &regs)
27085                            != -1)
27086                     result |= 1;
27087                 }
27088
27089                 {
27090                   /* This test is from glibc bug 15078.
27091                      The test case is from Andreas Schwab in
27092                      <http://www.sourceware.org/ml/libc-alpha/2013-01/msg00967.html>.
27093                      */
27094                   static char const pat[] = "[^x]x";
27095                   static char const data[] =
27096                     /* <U1000><U103B><U103D><U1014><U103A><U102F><U1015><U103A> */
27097                     "\xe1\x80\x80"
27098                     "\xe1\x80\xbb"
27099                     "\xe1\x80\xbd"
27100                     "\xe1\x80\x94"
27101                     "\xe1\x80\xba"
27102                     "\xe1\x80\xaf"
27103                     "\xe1\x80\x95"
27104                     "\xe1\x80\xba"
27105                     "x";
27106                   re_set_syntax (0);
27107                   memset (&regex, 0, sizeof regex);
27108                   s = re_compile_pattern (pat, sizeof pat - 1, &regex);
27109                   if (s)
27110                     result |= 1;
27111                   else
27112                     {
27113                       i = re_search (&regex, data, sizeof data - 1,
27114                                      0, sizeof data - 1, 0);
27115                       if (i != 0 && i != 21)
27116                         result |= 1;
27117                     }
27118                 }
27119
27120                 if (! setlocale (LC_ALL, "C"))
27121                   return 1;
27122               }
27123
27124             /* This test is from glibc bug 3957, reported by Andrew Mackey.  */
27125             re_set_syntax (RE_SYNTAX_EGREP | RE_HAT_LISTS_NOT_NEWLINE);
27126             memset (&regex, 0, sizeof regex);
27127             s = re_compile_pattern ("a[^x]b", 6, &regex);
27128             if (s)
27129               result |= 2;
27130             /* This should fail, but succeeds for glibc-2.5.  */
27131             else if (re_search (&regex, "a\nb", 3, 0, 3, &regs) != -1)
27132               result |= 2;
27133
27134             /* This regular expression is from Spencer ere test number 75
27135                in grep-2.3.  */
27136             re_set_syntax (RE_SYNTAX_POSIX_EGREP);
27137             memset (&regex, 0, sizeof regex);
27138             for (i = 0; i <= UCHAR_MAX; i++)
27139               folded_chars[i] = i;
27140             regex.translate = folded_chars;
27141             s = re_compile_pattern ("a[[:]:]]b\n", 11, &regex);
27142             /* This should fail with _Invalid character class name_ error.  */
27143             if (!s)
27144               result |= 4;
27145
27146             /* Ensure that [b-a] is diagnosed as invalid, when
27147                using RE_NO_EMPTY_RANGES. */
27148             re_set_syntax (RE_SYNTAX_POSIX_EGREP | RE_NO_EMPTY_RANGES);
27149             memset (&regex, 0, sizeof regex);
27150             s = re_compile_pattern ("a[b-a]", 6, &regex);
27151             if (s == 0)
27152               result |= 8;
27153
27154             /* This should succeed, but does not for glibc-2.1.3.  */
27155             memset (&regex, 0, sizeof regex);
27156             s = re_compile_pattern ("{1", 2, &regex);
27157             if (s)
27158               result |= 8;
27159
27160             /* The following example is derived from a problem report
27161                against gawk from Jorge Stolfi <stolfi@ic.unicamp.br>.  */
27162             memset (&regex, 0, sizeof regex);
27163             s = re_compile_pattern ("[an\371]*n", 7, &regex);
27164             if (s)
27165               result |= 8;
27166             /* This should match, but does not for glibc-2.2.1.  */
27167             else if (re_match (&regex, "an", 2, 0, &regs) != 2)
27168               result |= 8;
27169
27170             memset (&regex, 0, sizeof regex);
27171             s = re_compile_pattern ("x", 1, &regex);
27172             if (s)
27173               result |= 8;
27174             /* glibc-2.2.93 does not work with a negative RANGE argument.  */
27175             else if (re_search (&regex, "wxy", 3, 2, -2, &regs) != 1)
27176               result |= 8;
27177
27178             /* The version of regex.c in older versions of gnulib
27179                ignored RE_ICASE.  Detect that problem too.  */
27180             re_set_syntax (RE_SYNTAX_EMACS | RE_ICASE);
27181             memset (&regex, 0, sizeof regex);
27182             s = re_compile_pattern ("x", 1, &regex);
27183             if (s)
27184               result |= 16;
27185             else if (re_search (&regex, "WXY", 3, 0, 3, &regs) < 0)
27186               result |= 16;
27187
27188             /* Catch a bug reported by Vin Shelton in
27189                http://lists.gnu.org/archive/html/bug-coreutils/2007-06/msg00089.html
27190                */
27191             re_set_syntax (RE_SYNTAX_POSIX_BASIC
27192                            & ~RE_CONTEXT_INVALID_DUP
27193                            & ~RE_NO_EMPTY_RANGES);
27194             memset (&regex, 0, sizeof regex);
27195             s = re_compile_pattern ("[[:alnum:]_-]\\\\+$", 16, &regex);
27196             if (s)
27197               result |= 32;
27198
27199             /* REG_STARTEND was added to glibc on 2004-01-15.
27200                Reject older versions.  */
27201             if (! REG_STARTEND)
27202               result |= 64;
27203
27204 #if 0
27205             /* It would be nice to reject hosts whose regoff_t values are too
27206                narrow (including glibc on hosts with 64-bit ptrdiff_t and
27207                32-bit int), but we should wait until glibc implements this
27208                feature.  Otherwise, support for equivalence classes and
27209                multibyte collation symbols would always be broken except
27210                when compiling --without-included-regex.   */
27211             if (sizeof (regoff_t) < sizeof (ptrdiff_t)
27212                 || sizeof (regoff_t) < sizeof (ssize_t))
27213               result |= 64;
27214 #endif
27215
27216             return result;
27217
27218   ;
27219   return 0;
27220 }
27221 _ACEOF
27222 if ac_fn_c_try_run "$LINENO"; then :
27223   gl_cv_func_re_compile_pattern_working=yes
27224 else
27225   gl_cv_func_re_compile_pattern_working=no
27226 fi
27227 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27228   conftest.$ac_objext conftest.beam conftest.$ac_ext
27229 fi
27230
27231 fi
27232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_re_compile_pattern_working" >&5
27233 $as_echo "$gl_cv_func_re_compile_pattern_working" >&6; }
27234     case $gl_cv_func_re_compile_pattern_working in #(
27235     yes) ac_use_included_regex=no;; #(
27236     no) ac_use_included_regex=yes;;
27237     esac
27238     ;;
27239   *) as_fn_error $? "Invalid value for --with-included-regex: $with_included_regex" "$LINENO" 5
27240     ;;
27241   esac
27242
27243   if test $ac_use_included_regex = yes; then
27244
27245 $as_echo "#define _REGEX_INCLUDE_LIMITS_H 1" >>confdefs.h
27246
27247
27248 $as_echo "#define _REGEX_LARGE_OFFSETS 1" >>confdefs.h
27249
27250
27251 $as_echo "#define re_syntax_options rpl_re_syntax_options" >>confdefs.h
27252
27253
27254 $as_echo "#define re_set_syntax rpl_re_set_syntax" >>confdefs.h
27255
27256
27257 $as_echo "#define re_compile_pattern rpl_re_compile_pattern" >>confdefs.h
27258
27259
27260 $as_echo "#define re_compile_fastmap rpl_re_compile_fastmap" >>confdefs.h
27261
27262
27263 $as_echo "#define re_search rpl_re_search" >>confdefs.h
27264
27265
27266 $as_echo "#define re_search_2 rpl_re_search_2" >>confdefs.h
27267
27268
27269 $as_echo "#define re_match rpl_re_match" >>confdefs.h
27270
27271
27272 $as_echo "#define re_match_2 rpl_re_match_2" >>confdefs.h
27273
27274
27275 $as_echo "#define re_set_registers rpl_re_set_registers" >>confdefs.h
27276
27277
27278 $as_echo "#define re_comp rpl_re_comp" >>confdefs.h
27279
27280
27281 $as_echo "#define re_exec rpl_re_exec" >>confdefs.h
27282
27283
27284 $as_echo "#define regcomp rpl_regcomp" >>confdefs.h
27285
27286
27287 $as_echo "#define regexec rpl_regexec" >>confdefs.h
27288
27289
27290 $as_echo "#define regerror rpl_regerror" >>confdefs.h
27291
27292
27293 $as_echo "#define regfree rpl_regfree" >>confdefs.h
27294
27295   fi
27296
27297   if test $ac_use_included_regex = yes; then
27298
27299
27300
27301
27302
27303
27304
27305
27306   gl_LIBOBJS="$gl_LIBOBJS regex.$ac_objext"
27307
27308
27309
27310
27311
27312
27313
27314
27315   for ac_header in libintl.h
27316 do :
27317   ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
27318 if test "x$ac_cv_header_libintl_h" = xyes; then :
27319   cat >>confdefs.h <<_ACEOF
27320 #define HAVE_LIBINTL_H 1
27321 _ACEOF
27322
27323 fi
27324
27325 done
27326
27327
27328   ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
27329 "
27330 if test "x$ac_cv_have_decl_isblank" = xyes; then :
27331   ac_have_decl=1
27332 else
27333   ac_have_decl=0
27334 fi
27335
27336 cat >>confdefs.h <<_ACEOF
27337 #define HAVE_DECL_ISBLANK $ac_have_decl
27338 _ACEOF
27339
27340
27341   fi
27342
27343
27344
27345
27346
27347                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on destination" >&5
27348 $as_echo_n "checking whether rename honors trailing slash on destination... " >&6; }
27349 if ${gl_cv_func_rename_slash_dst_works+:} false; then :
27350   $as_echo_n "(cached) " >&6
27351 else
27352   rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
27353     touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
27354       as_fn_error $? "cannot create temporary files" "$LINENO" 5
27355     # Assume that if we have lstat, we can also check symlinks.
27356     if test $ac_cv_func_lstat = yes; then
27357       ln -s conftest.f conftest.lnk
27358     fi
27359     if test "$cross_compiling" = yes; then :
27360         case "$host_os" in
27361                  # Guess yes on glibc systems.
27362          *-gnu*) gl_cv_func_rename_slash_dst_works="guessing yes" ;;
27363                  # If we don't know, assume the worst.
27364          *)      gl_cv_func_rename_slash_dst_works="guessing no" ;;
27365        esac
27366
27367 else
27368   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27369 /* end confdefs.h.  */
27370
27371 #        include <stdio.h>
27372 #        include <stdlib.h>
27373
27374 int
27375 main ()
27376 {
27377 int result = 0;
27378            if (rename ("conftest.f1", "conftest.f2/") == 0)
27379              result |= 1;
27380            if (rename ("conftest.d1", "conftest.d2/") != 0)
27381              result |= 2;
27382 #if HAVE_LSTAT
27383            if (rename ("conftest.f", "conftest.lnk/") == 0)
27384              result |= 4;
27385 #endif
27386            return result;
27387
27388   ;
27389   return 0;
27390 }
27391 _ACEOF
27392 if ac_fn_c_try_run "$LINENO"; then :
27393   gl_cv_func_rename_slash_dst_works=yes
27394 else
27395   gl_cv_func_rename_slash_dst_works=no
27396 fi
27397 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27398   conftest.$ac_objext conftest.beam conftest.$ac_ext
27399 fi
27400
27401     rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
27402
27403 fi
27404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_dst_works" >&5
27405 $as_echo "$gl_cv_func_rename_slash_dst_works" >&6; }
27406   case "$gl_cv_func_rename_slash_dst_works" in
27407     *yes) ;;
27408     *)
27409       REPLACE_RENAME=1
27410
27411 $as_echo "#define RENAME_TRAILING_SLASH_DEST_BUG 1" >>confdefs.h
27412
27413       ;;
27414   esac
27415
27416             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on source" >&5
27417 $as_echo_n "checking whether rename honors trailing slash on source... " >&6; }
27418 if ${gl_cv_func_rename_slash_src_works+:} false; then :
27419   $as_echo_n "(cached) " >&6
27420 else
27421   rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
27422     touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
27423       as_fn_error $? "cannot create temporary files" "$LINENO" 5
27424     # Assume that if we have lstat, we can also check symlinks.
27425     if test $ac_cv_func_lstat = yes; then
27426       ln -s conftest.f conftest.lnk
27427     fi
27428     if test "$cross_compiling" = yes; then :
27429         case "$host_os" in
27430                  # Guess yes on glibc systems.
27431          *-gnu*) gl_cv_func_rename_slash_src_works="guessing yes" ;;
27432                  # If we don't know, assume the worst.
27433          *)      gl_cv_func_rename_slash_src_works="guessing no" ;;
27434        esac
27435
27436 else
27437   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27438 /* end confdefs.h.  */
27439
27440 #        include <stdio.h>
27441 #        include <stdlib.h>
27442
27443 int
27444 main ()
27445 {
27446 int result = 0;
27447            if (rename ("conftest.f1/", "conftest.d3") == 0)
27448              result |= 1;
27449            if (rename ("conftest.d1/", "conftest.d2") != 0)
27450              result |= 2;
27451 #if HAVE_LSTAT
27452            if (rename ("conftest.lnk/", "conftest.f") == 0)
27453              result |= 4;
27454 #endif
27455            return result;
27456
27457   ;
27458   return 0;
27459 }
27460 _ACEOF
27461 if ac_fn_c_try_run "$LINENO"; then :
27462   gl_cv_func_rename_slash_src_works=yes
27463 else
27464   gl_cv_func_rename_slash_src_works=no
27465 fi
27466 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27467   conftest.$ac_objext conftest.beam conftest.$ac_ext
27468 fi
27469
27470     rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
27471
27472 fi
27473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_src_works" >&5
27474 $as_echo "$gl_cv_func_rename_slash_src_works" >&6; }
27475   case "$gl_cv_func_rename_slash_src_works" in
27476     *yes) ;;
27477     *)
27478       REPLACE_RENAME=1
27479
27480 $as_echo "#define RENAME_TRAILING_SLASH_SOURCE_BUG 1" >>confdefs.h
27481
27482       ;;
27483   esac
27484
27485
27486   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages hard links correctly" >&5
27487 $as_echo_n "checking whether rename manages hard links correctly... " >&6; }
27488 if ${gl_cv_func_rename_link_works+:} false; then :
27489   $as_echo_n "(cached) " >&6
27490 else
27491   if test $ac_cv_func_link = yes; then
27492        rm -rf conftest.f conftest.f1
27493        if touch conftest.f && ln conftest.f conftest.f1 &&
27494            set x `ls -i conftest.f conftest.f1` && test "" = ""; then
27495          if test "$cross_compiling" = yes; then :
27496              case "$host_os" in
27497                       # Guess yes on glibc systems.
27498               *-gnu*) gl_cv_func_rename_link_works="guessing yes" ;;
27499                       # If we don't know, assume the worst.
27500               *)      gl_cv_func_rename_link_works="guessing no" ;;
27501             esac
27502
27503 else
27504   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27505 /* end confdefs.h.  */
27506
27507 #             include <stdio.h>
27508 #             include <stdlib.h>
27509 #             include <unistd.h>
27510
27511 int
27512 main ()
27513 {
27514 int result = 0;
27515                 if (rename ("conftest.f", "conftest.f1"))
27516                   result |= 1;
27517                 if (unlink ("conftest.f1"))
27518                   result |= 2;
27519                 if (rename ("conftest.f", "conftest.f"))
27520                   result |= 4;
27521                 if (rename ("conftest.f1", "conftest.f1") == 0)
27522                   result |= 8;
27523                 return result;
27524
27525   ;
27526   return 0;
27527 }
27528 _ACEOF
27529 if ac_fn_c_try_run "$LINENO"; then :
27530   gl_cv_func_rename_link_works=yes
27531 else
27532   gl_cv_func_rename_link_works=no
27533 fi
27534 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27535   conftest.$ac_objext conftest.beam conftest.$ac_ext
27536 fi
27537
27538        else
27539          gl_cv_func_rename_link_works="guessing no"
27540        fi
27541        rm -rf conftest.f conftest.f1
27542      else
27543        gl_cv_func_rename_link_works=yes
27544      fi
27545
27546 fi
27547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_link_works" >&5
27548 $as_echo "$gl_cv_func_rename_link_works" >&6; }
27549   case "$gl_cv_func_rename_link_works" in
27550     *yes) ;;
27551     *)
27552       REPLACE_RENAME=1
27553
27554 $as_echo "#define RENAME_HARD_LINK_BUG 1" >>confdefs.h
27555
27556       ;;
27557   esac
27558
27559           { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages existing destinations correctly" >&5
27560 $as_echo_n "checking whether rename manages existing destinations correctly... " >&6; }
27561 if ${gl_cv_func_rename_dest_works+:} false; then :
27562   $as_echo_n "(cached) " >&6
27563 else
27564   rm -rf conftest.f conftest.d1 conftest.d2
27565     touch conftest.f && mkdir conftest.d1 conftest.d2 ||
27566       as_fn_error $? "cannot create temporary files" "$LINENO" 5
27567     if test "$cross_compiling" = yes; then :
27568         case "$host_os" in
27569                  # Guess yes on glibc systems.
27570          *-gnu*) gl_cv_func_rename_dest_works="guessing yes" ;;
27571                  # If we don't know, assume the worst.
27572          *)      gl_cv_func_rename_dest_works="guessing no" ;;
27573        esac
27574
27575 else
27576   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27577 /* end confdefs.h.  */
27578
27579 #        include <stdio.h>
27580 #        include <stdlib.h>
27581
27582 int
27583 main ()
27584 {
27585 int result = 0;
27586            if (rename ("conftest.d1", "conftest.d2") != 0)
27587              result |= 1;
27588            if (rename ("conftest.d2", "conftest.f") == 0)
27589              result |= 2;
27590            return result;
27591
27592   ;
27593   return 0;
27594 }
27595 _ACEOF
27596 if ac_fn_c_try_run "$LINENO"; then :
27597   gl_cv_func_rename_dest_works=yes
27598 else
27599   gl_cv_func_rename_dest_works=no
27600 fi
27601 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27602   conftest.$ac_objext conftest.beam conftest.$ac_ext
27603 fi
27604
27605     rm -rf conftest.f conftest.d1 conftest.d2
27606
27607 fi
27608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_dest_works" >&5
27609 $as_echo "$gl_cv_func_rename_dest_works" >&6; }
27610   case "$gl_cv_func_rename_dest_works" in
27611     *yes) ;;
27612     *)
27613       REPLACE_RENAME=1
27614
27615 $as_echo "#define RENAME_DEST_EXISTS_BUG 1" >>confdefs.h
27616
27617       ;;
27618   esac
27619
27620   if test $REPLACE_RENAME = 1; then
27621
27622
27623
27624
27625
27626
27627
27628
27629   gl_LIBOBJS="$gl_LIBOBJS rename.$ac_objext"
27630
27631   fi
27632
27633
27634
27635
27636
27637           GNULIB_RENAME=1
27638
27639
27640
27641
27642
27643 $as_echo "#define GNULIB_TEST_RENAME 1" >>confdefs.h
27644
27645
27646
27647
27648
27649
27650
27651
27652
27653   if test $ac_cv_func_renameat = no; then
27654     HAVE_RENAMEAT=0
27655   elif test $REPLACE_RENAME = 1; then
27656         REPLACE_RENAMEAT=1
27657   fi
27658
27659   if test $HAVE_RENAMEAT = 0 || test $REPLACE_RENAMEAT = 1; then
27660
27661
27662
27663
27664
27665
27666
27667
27668   gl_LIBOBJS="$gl_LIBOBJS renameat.$ac_objext"
27669
27670   fi
27671   if test $HAVE_RENAMEAT = 0; then
27672
27673
27674
27675
27676
27677
27678
27679
27680   gl_LIBOBJS="$gl_LIBOBJS at-func2.$ac_objext"
27681
27682   fi
27683
27684
27685
27686
27687
27688           GNULIB_RENAMEAT=1
27689
27690
27691
27692
27693
27694 $as_echo "#define GNULIB_TEST_RENAMEAT 1" >>confdefs.h
27695
27696
27697
27698
27699
27700
27701   for ac_func in rewinddir
27702 do :
27703   ac_fn_c_check_func "$LINENO" "rewinddir" "ac_cv_func_rewinddir"
27704 if test "x$ac_cv_func_rewinddir" = xyes; then :
27705   cat >>confdefs.h <<_ACEOF
27706 #define HAVE_REWINDDIR 1
27707 _ACEOF
27708
27709 fi
27710 done
27711
27712   if test $ac_cv_func_rewinddir = no; then
27713     HAVE_REWINDDIR=0
27714   fi
27715
27716   if test $HAVE_REWINDDIR = 0; then
27717
27718
27719
27720
27721
27722
27723
27724
27725   gl_LIBOBJS="$gl_LIBOBJS rewinddir.$ac_objext"
27726
27727   fi
27728
27729
27730
27731
27732
27733           GNULIB_REWINDDIR=1
27734
27735
27736
27737
27738
27739 $as_echo "#define GNULIB_TEST_REWINDDIR 1" >>confdefs.h
27740
27741
27742
27743
27744
27745
27746   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rmdir works" >&5
27747 $as_echo_n "checking whether rmdir works... " >&6; }
27748 if ${gl_cv_func_rmdir_works+:} false; then :
27749   $as_echo_n "(cached) " >&6
27750 else
27751   mkdir conftest.dir
27752      touch conftest.file
27753      if test "$cross_compiling" = yes; then :
27754   case "$host_os" in
27755                   # Guess yes on glibc systems.
27756           *-gnu*) gl_cv_func_rmdir_works="guessing yes" ;;
27757                   # If we don't know, assume the worst.
27758           *)      gl_cv_func_rmdir_works="guessing no" ;;
27759         esac
27760
27761 else
27762   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27763 /* end confdefs.h.  */
27764 #include <stdio.h>
27765            #include <errno.h>
27766            #if HAVE_UNISTD_H
27767            # include <unistd.h>
27768            #else /* on Windows with MSVC */
27769            # include <direct.h>
27770            #endif
27771
27772 int
27773 main ()
27774 {
27775 int result = 0;
27776       if (!rmdir ("conftest.file/"))
27777         result |= 1;
27778       else if (errno != ENOTDIR)
27779         result |= 2;
27780       if (!rmdir ("conftest.dir/./"))
27781         result |= 4;
27782       return result;
27783
27784   ;
27785   return 0;
27786 }
27787 _ACEOF
27788 if ac_fn_c_try_run "$LINENO"; then :
27789   gl_cv_func_rmdir_works=yes
27790 else
27791   gl_cv_func_rmdir_works=no
27792 fi
27793 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27794   conftest.$ac_objext conftest.beam conftest.$ac_ext
27795 fi
27796
27797      rm -rf conftest.dir conftest.file
27798 fi
27799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rmdir_works" >&5
27800 $as_echo "$gl_cv_func_rmdir_works" >&6; }
27801   case "$gl_cv_func_rmdir_works" in
27802     *yes) ;;
27803     *)
27804       REPLACE_RMDIR=1
27805       ;;
27806   esac
27807
27808   if test $REPLACE_RMDIR = 1; then
27809
27810
27811
27812
27813
27814
27815
27816
27817   gl_LIBOBJS="$gl_LIBOBJS rmdir.$ac_objext"
27818
27819   fi
27820
27821
27822
27823
27824
27825           GNULIB_RMDIR=1
27826
27827
27828
27829
27830
27831 $as_echo "#define GNULIB_TEST_RMDIR 1" >>confdefs.h
27832
27833
27834
27835
27836
27837
27838
27839   for ac_func in rpmatch
27840 do :
27841   ac_fn_c_check_func "$LINENO" "rpmatch" "ac_cv_func_rpmatch"
27842 if test "x$ac_cv_func_rpmatch" = xyes; then :
27843   cat >>confdefs.h <<_ACEOF
27844 #define HAVE_RPMATCH 1
27845 _ACEOF
27846
27847 fi
27848 done
27849
27850   if test $ac_cv_func_rpmatch = no; then
27851     HAVE_RPMATCH=0
27852   fi
27853
27854   if test $HAVE_RPMATCH = 0; then
27855
27856
27857
27858
27859
27860
27861
27862
27863   gl_LIBOBJS="$gl_LIBOBJS rpmatch.$ac_objext"
27864
27865
27866   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and YESEXPR" >&5
27867 $as_echo_n "checking for nl_langinfo and YESEXPR... " >&6; }
27868 if ${gl_cv_langinfo_yesexpr+:} false; then :
27869   $as_echo_n "(cached) " >&6
27870 else
27871   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27872 /* end confdefs.h.  */
27873 #include <langinfo.h>
27874 int
27875 main ()
27876 {
27877 char* cs = nl_langinfo(YESEXPR); return !cs;
27878   ;
27879   return 0;
27880 }
27881 _ACEOF
27882 if ac_fn_c_try_link "$LINENO"; then :
27883   gl_cv_langinfo_yesexpr=yes
27884 else
27885   gl_cv_langinfo_yesexpr=no
27886 fi
27887 rm -f core conftest.err conftest.$ac_objext \
27888     conftest$ac_exeext conftest.$ac_ext
27889
27890 fi
27891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_langinfo_yesexpr" >&5
27892 $as_echo "$gl_cv_langinfo_yesexpr" >&6; }
27893   if test $gl_cv_langinfo_yesexpr = yes; then
27894
27895 $as_echo "#define HAVE_LANGINFO_YESEXPR 1" >>confdefs.h
27896
27897   fi
27898
27899   fi
27900
27901
27902
27903
27904
27905           GNULIB_RPMATCH=1
27906
27907
27908
27909
27910
27911 $as_echo "#define GNULIB_TEST_RPMATCH 1" >>confdefs.h
27912
27913
27914
27915
27916
27917
27918
27919
27920
27921
27922
27923
27924
27925
27926
27927   :
27928
27929
27930
27931
27932
27933
27934   if test $ac_cv_func_secure_getenv = no; then
27935     HAVE_SECURE_GETENV=0
27936   fi
27937
27938   if test $HAVE_SECURE_GETENV = 0; then
27939
27940
27941
27942
27943
27944
27945
27946
27947   gl_LIBOBJS="$gl_LIBOBJS secure_getenv.$ac_objext"
27948
27949
27950   for ac_func in __secure_getenv
27951 do :
27952   ac_fn_c_check_func "$LINENO" "__secure_getenv" "ac_cv_func___secure_getenv"
27953 if test "x$ac_cv_func___secure_getenv" = xyes; then :
27954   cat >>confdefs.h <<_ACEOF
27955 #define HAVE___SECURE_GETENV 1
27956 _ACEOF
27957
27958 fi
27959 done
27960
27961   if test $ac_cv_func___secure_getenv = no; then
27962     for ac_func in issetugid
27963 do :
27964   ac_fn_c_check_func "$LINENO" "issetugid" "ac_cv_func_issetugid"
27965 if test "x$ac_cv_func_issetugid" = xyes; then :
27966   cat >>confdefs.h <<_ACEOF
27967 #define HAVE_ISSETUGID 1
27968 _ACEOF
27969
27970 fi
27971 done
27972
27973   fi
27974
27975   fi
27976
27977
27978
27979
27980
27981           GNULIB_SECURE_GETENV=1
27982
27983
27984
27985
27986
27987 $as_echo "#define GNULIB_TEST_SECURE_GETENV 1" >>confdefs.h
27988
27989
27990
27991   for ac_header in selinux/flask.h
27992 do :
27993   ac_fn_c_check_header_mongrel "$LINENO" "selinux/flask.h" "ac_cv_header_selinux_flask_h" "$ac_includes_default"
27994 if test "x$ac_cv_header_selinux_flask_h" = xyes; then :
27995   cat >>confdefs.h <<_ACEOF
27996 #define HAVE_SELINUX_FLASK_H 1
27997 _ACEOF
27998
27999 fi
28000
28001 done
28002
28003
28004
28005
28006
28007
28008
28009
28010
28011   gl_LIBOBJS="$gl_LIBOBJS selinux-at.$ac_objext"
28012
28013
28014
28015   if test "$with_selinux" != no; then
28016     for ac_header in selinux/selinux.h
28017 do :
28018   ac_fn_c_check_header_mongrel "$LINENO" "selinux/selinux.h" "ac_cv_header_selinux_selinux_h" "$ac_includes_default"
28019 if test "x$ac_cv_header_selinux_selinux_h" = xyes; then :
28020   cat >>confdefs.h <<_ACEOF
28021 #define HAVE_SELINUX_SELINUX_H 1
28022 _ACEOF
28023
28024 fi
28025
28026 done
28027
28028
28029     if test "$ac_cv_header_selinux_selinux_h" = yes; then
28030       # We do have <selinux/selinux.h>, so do compile getfilecon.c
28031       # and arrange to use its wrappers.
28032
28033
28034
28035
28036
28037
28038
28039
28040
28041      if test $gl_cv_have_include_next = yes; then
28042        gl_cv_next_selinux_selinux_h='<'selinux/selinux.h'>'
28043      else
28044        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <selinux/selinux.h>" >&5
28045 $as_echo_n "checking absolute name of <selinux/selinux.h>... " >&6; }
28046 if ${gl_cv_next_selinux_selinux_h+:} false; then :
28047   $as_echo_n "(cached) " >&6
28048 else
28049
28050              if test $ac_cv_header_selinux_selinux_h = yes; then
28051
28052
28053
28054
28055   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28056 /* end confdefs.h.  */
28057 #include <selinux/selinux.h>
28058 _ACEOF
28059                 case "$host_os" in
28060     aix*) gl_absname_cpp="$ac_cpp -C" ;;
28061     *)    gl_absname_cpp="$ac_cpp" ;;
28062   esac
28063
28064   case "$host_os" in
28065     mingw*)
28066                                           gl_dirsep_regex='[/\\]'
28067       ;;
28068     *)
28069       gl_dirsep_regex='\/'
28070       ;;
28071   esac
28072       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
28073   gl_header_literal_regex=`echo 'selinux/selinux.h' \
28074                            | sed -e "$gl_make_literal_regex_sed"`
28075   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
28076       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
28077       s|^/[^/]|//&|
28078       p
28079       q
28080     }'
28081
28082         gl_cv_absolute_selinux_selinux_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
28083   sed -n "$gl_absolute_header_sed"`
28084
28085            gl_header=$gl_cv_absolute_selinux_selinux_h
28086            gl_cv_next_selinux_selinux_h='"'$gl_header'"'
28087           else
28088                gl_cv_next_selinux_selinux_h='<'selinux/selinux.h'>'
28089              fi
28090
28091
28092 fi
28093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_selinux_selinux_h" >&5
28094 $as_echo "$gl_cv_next_selinux_selinux_h" >&6; }
28095      fi
28096      NEXT_SELINUX_SELINUX_H=$gl_cv_next_selinux_selinux_h
28097
28098      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
28099        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
28100        gl_next_as_first_directive='<'selinux/selinux.h'>'
28101      else
28102        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
28103        gl_next_as_first_directive=$gl_cv_next_selinux_selinux_h
28104      fi
28105      NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H=$gl_next_as_first_directive
28106
28107
28108
28109
28110
28111 $as_echo "#define getfilecon rpl_getfilecon" >>confdefs.h
28112
28113
28114 $as_echo "#define lgetfilecon rpl_lgetfilecon" >>confdefs.h
28115
28116
28117 $as_echo "#define fgetfilecon rpl_fgetfilecon" >>confdefs.h
28118
28119     fi
28120
28121     case "$ac_cv_search_setfilecon:$ac_cv_header_selinux_selinux_h" in
28122       no:*) # already warned
28123         ;;
28124       *:no)
28125         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libselinux was found but selinux/selinux.h is missing." >&5
28126 $as_echo "$as_me: WARNING: libselinux was found but selinux/selinux.h is missing." >&2;}
28127         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GNU tar will be compiled without SELinux support." >&5
28128 $as_echo "$as_me: WARNING: GNU tar will be compiled without SELinux support." >&2;}
28129     esac
28130   else
28131     # Do as if <selinux/selinux.h> does not exist, even if
28132     # AC_CHECK_HEADERS_ONCE has already determined that it exists.
28133     $as_echo "#define HAVE_SELINUX_SELINUX_H 0" >>confdefs.h
28134
28135   fi
28136
28137
28138
28139   if test "$with_selinux" != no; then
28140     for ac_header in selinux/context.h
28141 do :
28142   ac_fn_c_check_header_mongrel "$LINENO" "selinux/context.h" "ac_cv_header_selinux_context_h" "$ac_includes_default"
28143 if test "x$ac_cv_header_selinux_context_h" = xyes; then :
28144   cat >>confdefs.h <<_ACEOF
28145 #define HAVE_SELINUX_CONTEXT_H 1
28146 _ACEOF
28147  SELINUX_CONTEXT_H=
28148 else
28149   SELINUX_CONTEXT_H=selinux/context.h
28150 fi
28151
28152 done
28153
28154   else
28155     SELINUX_CONTEXT_H=selinux/context.h
28156   fi
28157
28158    if test -n "$SELINUX_CONTEXT_H"; then
28159   GL_GENERATE_SELINUX_CONTEXT_H_TRUE=
28160   GL_GENERATE_SELINUX_CONTEXT_H_FALSE='#'
28161 else
28162   GL_GENERATE_SELINUX_CONTEXT_H_TRUE='#'
28163   GL_GENERATE_SELINUX_CONTEXT_H_FALSE=
28164 fi
28165
28166
28167   if test "$with_selinux" != no && test "$ac_cv_header_selinux_selinux_h" = yes; then
28168
28169
28170
28171
28172
28173
28174
28175
28176   gl_LIBOBJS="$gl_LIBOBJS getfilecon.$ac_objext"
28177
28178   fi
28179
28180
28181      if test $ac_cv_func_setenv = no; then
28182     HAVE_SETENV=0
28183   else
28184     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setenv validates arguments" >&5
28185 $as_echo_n "checking whether setenv validates arguments... " >&6; }
28186 if ${gl_cv_func_setenv_works+:} false; then :
28187   $as_echo_n "(cached) " >&6
28188 else
28189   if test "$cross_compiling" = yes; then :
28190   case "$host_os" in
28191                  # Guess yes on glibc systems.
28192          *-gnu*) gl_cv_func_setenv_works="guessing yes" ;;
28193                  # If we don't know, assume the worst.
28194          *)      gl_cv_func_setenv_works="guessing no" ;;
28195        esac
28196
28197 else
28198   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28199 /* end confdefs.h.  */
28200
28201        #include <stdlib.h>
28202        #include <errno.h>
28203        #include <string.h>
28204
28205 int
28206 main ()
28207 {
28208
28209        int result = 0;
28210        {
28211          if (setenv ("", "", 0) != -1)
28212            result |= 1;
28213          else if (errno != EINVAL)
28214            result |= 2;
28215        }
28216        {
28217          if (setenv ("a", "=", 1) != 0)
28218            result |= 4;
28219          else if (strcmp (getenv ("a"), "=") != 0)
28220            result |= 8;
28221        }
28222        return result;
28223
28224   ;
28225   return 0;
28226 }
28227 _ACEOF
28228 if ac_fn_c_try_run "$LINENO"; then :
28229   gl_cv_func_setenv_works=yes
28230 else
28231   gl_cv_func_setenv_works=no
28232 fi
28233 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28234   conftest.$ac_objext conftest.beam conftest.$ac_ext
28235 fi
28236
28237 fi
28238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setenv_works" >&5
28239 $as_echo "$gl_cv_func_setenv_works" >&6; }
28240     case "$gl_cv_func_setenv_works" in
28241       *yes) ;;
28242       *)
28243         REPLACE_SETENV=1
28244         ;;
28245     esac
28246   fi
28247
28248   if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then
28249
28250
28251
28252
28253
28254
28255
28256
28257   gl_LIBOBJS="$gl_LIBOBJS setenv.$ac_objext"
28258
28259   fi
28260
28261
28262
28263
28264
28265           GNULIB_SETENV=1
28266
28267
28268
28269
28270
28271 $as_echo "#define GNULIB_TEST_SETENV 1" >>confdefs.h
28272
28273
28274
28275
28276
28277
28278
28279
28280
28281
28282
28283
28284
28285
28286      if test $gl_cv_have_include_next = yes; then
28287        gl_cv_next_signal_h='<'signal.h'>'
28288      else
28289        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
28290 $as_echo_n "checking absolute name of <signal.h>... " >&6; }
28291 if ${gl_cv_next_signal_h+:} false; then :
28292   $as_echo_n "(cached) " >&6
28293 else
28294
28295
28296
28297   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28298 /* end confdefs.h.  */
28299 #include <signal.h>
28300 _ACEOF
28301                 case "$host_os" in
28302     aix*) gl_absname_cpp="$ac_cpp -C" ;;
28303     *)    gl_absname_cpp="$ac_cpp" ;;
28304   esac
28305
28306   case "$host_os" in
28307     mingw*)
28308                                           gl_dirsep_regex='[/\\]'
28309       ;;
28310     *)
28311       gl_dirsep_regex='\/'
28312       ;;
28313   esac
28314       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
28315   gl_header_literal_regex=`echo 'signal.h' \
28316                            | sed -e "$gl_make_literal_regex_sed"`
28317   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
28318       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
28319       s|^/[^/]|//&|
28320       p
28321       q
28322     }'
28323
28324         gl_cv_absolute_signal_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
28325   sed -n "$gl_absolute_header_sed"`
28326
28327            gl_header=$gl_cv_absolute_signal_h
28328            gl_cv_next_signal_h='"'$gl_header'"'
28329
28330
28331 fi
28332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
28333 $as_echo "$gl_cv_next_signal_h" >&6; }
28334      fi
28335      NEXT_SIGNAL_H=$gl_cv_next_signal_h
28336
28337      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
28338        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
28339        gl_next_as_first_directive='<'signal.h'>'
28340      else
28341        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
28342        gl_next_as_first_directive=$gl_cv_next_signal_h
28343      fi
28344      NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
28345
28346
28347
28348
28349
28350 # AIX declares sig_atomic_t to already include volatile, and C89 compilers
28351 # then choke on 'volatile sig_atomic_t'.  C99 requires that it compile.
28352   ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
28353 #include <signal.h>
28354
28355 "
28356 if test "x$ac_cv_type_volatile_sig_atomic_t" = xyes; then :
28357
28358 else
28359   HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
28360 fi
28361
28362
28363
28364
28365
28366
28367
28368   ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
28369 #include <signal.h>
28370
28371 "
28372 if test "x$ac_cv_type_sighandler_t" = xyes; then :
28373
28374 else
28375   HAVE_SIGHANDLER_T=0
28376 fi
28377
28378
28379
28380     for gl_func in pthread_sigmask sigaction     sigaddset sigdelset sigemptyset sigfillset sigismember     sigpending sigprocmask; do
28381     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
28382     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
28383 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
28384 if eval \${$as_gl_Symbol+:} false; then :
28385   $as_echo_n "(cached) " >&6
28386 else
28387   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28388 /* end confdefs.h.  */
28389 #include <signal.h>
28390
28391 int
28392 main ()
28393 {
28394 #undef $gl_func
28395   (void) $gl_func;
28396   ;
28397   return 0;
28398 }
28399 _ACEOF
28400 if ac_fn_c_try_compile "$LINENO"; then :
28401   eval "$as_gl_Symbol=yes"
28402 else
28403   eval "$as_gl_Symbol=no"
28404 fi
28405 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28406 fi
28407 eval ac_res=\$$as_gl_Symbol
28408                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
28409 $as_echo "$ac_res" >&6; }
28410     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
28411   cat >>confdefs.h <<_ACEOF
28412 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
28413 _ACEOF
28414
28415                      eval ac_cv_have_decl_$gl_func=yes
28416 fi
28417       done
28418
28419
28420
28421   for ac_header in stdint.h
28422 do :
28423   ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
28424 if test "x$ac_cv_header_stdint_h" = xyes; then :
28425   cat >>confdefs.h <<_ACEOF
28426 #define HAVE_STDINT_H 1
28427 _ACEOF
28428
28429 fi
28430
28431 done
28432
28433     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIZE_MAX" >&5
28434 $as_echo_n "checking for SIZE_MAX... " >&6; }
28435 if ${gl_cv_size_max+:} false; then :
28436   $as_echo_n "(cached) " >&6
28437 else
28438
28439     gl_cv_size_max=
28440     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28441 /* end confdefs.h.  */
28442
28443 #include <limits.h>
28444 #if HAVE_STDINT_H
28445 #include <stdint.h>
28446 #endif
28447 #ifdef SIZE_MAX
28448 Found it
28449 #endif
28450
28451 _ACEOF
28452 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28453   $EGREP "Found it" >/dev/null 2>&1; then :
28454   gl_cv_size_max=yes
28455 fi
28456 rm -f conftest*
28457
28458     if test -z "$gl_cv_size_max"; then
28459                         if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) * CHAR_BIT - 1" "size_t_bits_minus_1"        "#include <stddef.h>
28460 #include <limits.h>"; then :
28461
28462 else
28463   size_t_bits_minus_1=
28464 fi
28465
28466       if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) <= sizeof (unsigned int)" "fits_in_uint"        "#include <stddef.h>"; then :
28467
28468 else
28469   fits_in_uint=
28470 fi
28471
28472       if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then
28473         if test $fits_in_uint = 1; then
28474                               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28475 /* end confdefs.h.  */
28476 #include <stddef.h>
28477                  extern size_t foo;
28478                  extern unsigned long foo;
28479
28480 int
28481 main ()
28482 {
28483
28484   ;
28485   return 0;
28486 }
28487 _ACEOF
28488 if ac_fn_c_try_compile "$LINENO"; then :
28489   fits_in_uint=0
28490 fi
28491 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28492         fi
28493                                 if test $fits_in_uint = 1; then
28494           gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)"
28495         else
28496           gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)"
28497         fi
28498       else
28499                 gl_cv_size_max='((size_t)~(size_t)0)'
28500       fi
28501     fi
28502
28503 fi
28504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_size_max" >&5
28505 $as_echo "$gl_cv_size_max" >&6; }
28506   if test "$gl_cv_size_max" != yes; then
28507
28508 cat >>confdefs.h <<_ACEOF
28509 #define SIZE_MAX $gl_cv_size_max
28510 _ACEOF
28511
28512   fi
28513
28514
28515
28516
28517                ac_fn_c_check_decl "$LINENO" "sleep" "ac_cv_have_decl_sleep" "#include <unistd.h>
28518 "
28519 if test "x$ac_cv_have_decl_sleep" = xyes; then :
28520   ac_have_decl=1
28521 else
28522   ac_have_decl=0
28523 fi
28524
28525 cat >>confdefs.h <<_ACEOF
28526 #define HAVE_DECL_SLEEP $ac_have_decl
28527 _ACEOF
28528
28529
28530   if test $ac_cv_have_decl_sleep != yes; then
28531     HAVE_SLEEP=0
28532   else
28533         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working sleep" >&5
28534 $as_echo_n "checking for working sleep... " >&6; }
28535 if ${gl_cv_func_sleep_works+:} false; then :
28536   $as_echo_n "(cached) " >&6
28537 else
28538   if test "$cross_compiling" = yes; then :
28539   case "$host_os" in
28540                  # Guess yes on glibc systems.
28541          *-gnu*) gl_cv_func_sleep_works="guessing yes" ;;
28542                  # If we don't know, assume the worst.
28543          *)      gl_cv_func_sleep_works="guessing no" ;;
28544        esac
28545
28546 else
28547   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28548 /* end confdefs.h.  */
28549
28550 #include <errno.h>
28551 #include <unistd.h>
28552 #include <signal.h>
28553 static void
28554 handle_alarm (int sig)
28555 {
28556   if (sig != SIGALRM)
28557     _exit (2);
28558 }
28559
28560 int
28561 main ()
28562 {
28563
28564     /* Failure to compile this test due to missing alarm is okay,
28565        since all such platforms (mingw) also lack sleep.  */
28566     unsigned int pentecost = 50 * 24 * 60 * 60; /* 50 days.  */
28567     unsigned int remaining;
28568     signal (SIGALRM, handle_alarm);
28569     alarm (1);
28570     remaining = sleep (pentecost);
28571     if (remaining > pentecost)
28572       return 3;
28573     if (remaining <= pentecost - 10)
28574       return 4;
28575     return 0;
28576
28577   ;
28578   return 0;
28579 }
28580 _ACEOF
28581 if ac_fn_c_try_run "$LINENO"; then :
28582   gl_cv_func_sleep_works=yes
28583 else
28584   gl_cv_func_sleep_works=no
28585 fi
28586 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28587   conftest.$ac_objext conftest.beam conftest.$ac_ext
28588 fi
28589
28590 fi
28591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_sleep_works" >&5
28592 $as_echo "$gl_cv_func_sleep_works" >&6; }
28593     case "$gl_cv_func_sleep_works" in
28594       *yes) ;;
28595       *)
28596         REPLACE_SLEEP=1
28597         ;;
28598     esac
28599   fi
28600
28601   if test $HAVE_SLEEP = 0 || test $REPLACE_SLEEP = 1; then
28602
28603
28604
28605
28606
28607
28608
28609
28610   gl_LIBOBJS="$gl_LIBOBJS sleep.$ac_objext"
28611
28612   fi
28613
28614
28615
28616
28617
28618           GNULIB_SLEEP=1
28619
28620
28621
28622
28623
28624 $as_echo "#define GNULIB_TEST_SLEEP 1" >>confdefs.h
28625
28626
28627
28628
28629
28630   gl_cv_func_snprintf_usable=no
28631   for ac_func in snprintf
28632 do :
28633   ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
28634 if test "x$ac_cv_func_snprintf" = xyes; then :
28635   cat >>confdefs.h <<_ACEOF
28636 #define HAVE_SNPRINTF 1
28637 _ACEOF
28638
28639 fi
28640 done
28641
28642   if test $ac_cv_func_snprintf = yes; then
28643
28644
28645
28646   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf respects a size of 1" >&5
28647 $as_echo_n "checking whether snprintf respects a size of 1... " >&6; }
28648 if ${gl_cv_func_snprintf_size1+:} false; then :
28649   $as_echo_n "(cached) " >&6
28650 else
28651
28652       if test "$cross_compiling" = yes; then :
28653   gl_cv_func_snprintf_size1="guessing yes"
28654 else
28655   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28656 /* end confdefs.h.  */
28657
28658 #include <stdio.h>
28659 #if HAVE_SNPRINTF
28660 # define my_snprintf snprintf
28661 #else
28662 # include <stdarg.h>
28663 static int my_snprintf (char *buf, int size, const char *format, ...)
28664 {
28665   va_list args;
28666   int ret;
28667   va_start (args, format);
28668   ret = vsnprintf (buf, size, format, args);
28669   va_end (args);
28670   return ret;
28671 }
28672 #endif
28673 int main()
28674 {
28675   static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
28676   my_snprintf (buf, 1, "%d", 12345);
28677   return buf[1] != 'E';
28678 }
28679 _ACEOF
28680 if ac_fn_c_try_run "$LINENO"; then :
28681   gl_cv_func_snprintf_size1=yes
28682 else
28683   gl_cv_func_snprintf_size1=no
28684 fi
28685 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28686   conftest.$ac_objext conftest.beam conftest.$ac_ext
28687 fi
28688
28689
28690 fi
28691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_size1" >&5
28692 $as_echo "$gl_cv_func_snprintf_size1" >&6; }
28693
28694     case "$gl_cv_func_snprintf_size1" in
28695       *yes)
28696
28697         case "$gl_cv_func_snprintf_retval_c99" in
28698           *yes)
28699
28700
28701      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports POSIX/XSI format strings with positions" >&5
28702 $as_echo_n "checking whether printf supports POSIX/XSI format strings with positions... " >&6; }
28703 if ${gl_cv_func_printf_positions+:} false; then :
28704   $as_echo_n "(cached) " >&6
28705 else
28706
28707       if test "$cross_compiling" = yes; then :
28708
28709          case "$host_os" in
28710            netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*)
28711                          gl_cv_func_printf_positions="guessing no";;
28712            beos*)        gl_cv_func_printf_positions="guessing no";;
28713            mingw* | pw*) gl_cv_func_printf_positions="guessing no";;
28714            *)            gl_cv_func_printf_positions="guessing yes";;
28715          esac
28716
28717 else
28718   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28719 /* end confdefs.h.  */
28720
28721 #include <stdio.h>
28722 #include <string.h>
28723 /* The string "%2$d %1$d", with dollar characters protected from the shell's
28724    dollar expansion (possibly an autoconf bug).  */
28725 static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
28726 static char buf[100];
28727 int main ()
28728 {
28729   sprintf (buf, format, 33, 55);
28730   return (strcmp (buf, "55 33") != 0);
28731 }
28732 _ACEOF
28733 if ac_fn_c_try_run "$LINENO"; then :
28734   gl_cv_func_printf_positions=yes
28735 else
28736   gl_cv_func_printf_positions=no
28737 fi
28738 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28739   conftest.$ac_objext conftest.beam conftest.$ac_ext
28740 fi
28741
28742
28743 fi
28744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_positions" >&5
28745 $as_echo "$gl_cv_func_printf_positions" >&6; }
28746
28747             case "$gl_cv_func_printf_positions" in
28748               *yes)
28749                 gl_cv_func_snprintf_usable=yes
28750                 ;;
28751             esac
28752             ;;
28753         esac
28754         ;;
28755     esac
28756   fi
28757   if test $gl_cv_func_snprintf_usable = no; then
28758
28759
28760
28761
28762
28763
28764
28765
28766
28767
28768   gl_LIBOBJS="$gl_LIBOBJS snprintf.$ac_objext"
28769
28770   if test $ac_cv_func_snprintf = yes; then
28771     REPLACE_SNPRINTF=1
28772   fi
28773   :
28774
28775   fi
28776
28777   if test $ac_cv_have_decl_snprintf = no; then
28778     HAVE_DECL_SNPRINTF=0
28779   fi
28780
28781
28782
28783
28784
28785
28786           GNULIB_SNPRINTF=1
28787
28788
28789
28790
28791
28792 $as_echo "#define GNULIB_TEST_SNPRINTF 1" >>confdefs.h
28793
28794
28795
28796
28797
28798 cat >>confdefs.h <<_ACEOF
28799 #define GNULIB_SNPRINTF 1
28800 _ACEOF
28801
28802
28803
28804   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
28805 $as_echo_n "checking for ssize_t... " >&6; }
28806 if ${gt_cv_ssize_t+:} false; then :
28807   $as_echo_n "(cached) " >&6
28808 else
28809   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28810 /* end confdefs.h.  */
28811 #include <sys/types.h>
28812 int
28813 main ()
28814 {
28815 int x = sizeof (ssize_t *) + sizeof (ssize_t);
28816             return !x;
28817   ;
28818   return 0;
28819 }
28820 _ACEOF
28821 if ac_fn_c_try_compile "$LINENO"; then :
28822   gt_cv_ssize_t=yes
28823 else
28824   gt_cv_ssize_t=no
28825 fi
28826 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28827 fi
28828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
28829 $as_echo "$gt_cv_ssize_t" >&6; }
28830   if test $gt_cv_ssize_t = no; then
28831
28832 $as_echo "#define ssize_t int" >>confdefs.h
28833
28834   fi
28835
28836
28837
28838
28839     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5
28840 $as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; }
28841 if ${gl_cv_func_stat_dir_slash+:} false; then :
28842   $as_echo_n "(cached) " >&6
28843 else
28844   if test "$cross_compiling" = yes; then :
28845   case $host_os in
28846             mingw*) gl_cv_func_stat_dir_slash="guessing no";;
28847             *) gl_cv_func_stat_dir_slash="guessing yes";;
28848           esac
28849 else
28850   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28851 /* end confdefs.h.  */
28852 #include <sys/stat.h>
28853
28854 int
28855 main ()
28856 {
28857 struct stat st; return stat (".", &st) != stat ("./", &st);
28858   ;
28859   return 0;
28860 }
28861 _ACEOF
28862 if ac_fn_c_try_run "$LINENO"; then :
28863   gl_cv_func_stat_dir_slash=yes
28864 else
28865   gl_cv_func_stat_dir_slash=no
28866 fi
28867 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28868   conftest.$ac_objext conftest.beam conftest.$ac_ext
28869 fi
28870
28871 fi
28872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5
28873 $as_echo "$gl_cv_func_stat_dir_slash" >&6; }
28874         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
28875 $as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
28876 if ${gl_cv_func_stat_file_slash+:} false; then :
28877   $as_echo_n "(cached) " >&6
28878 else
28879   touch conftest.tmp
28880        # Assume that if we have lstat, we can also check symlinks.
28881        if test $ac_cv_func_lstat = yes; then
28882          ln -s conftest.tmp conftest.lnk
28883        fi
28884        if test "$cross_compiling" = yes; then :
28885   case "$host_os" in
28886                     # Guess yes on glibc systems.
28887             *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
28888                     # If we don't know, assume the worst.
28889             *)      gl_cv_func_stat_file_slash="guessing no" ;;
28890           esac
28891
28892 else
28893   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28894 /* end confdefs.h.  */
28895 #include <sys/stat.h>
28896
28897 int
28898 main ()
28899 {
28900 int result = 0;
28901       struct stat st;
28902       if (!stat ("conftest.tmp/", &st))
28903         result |= 1;
28904 #if HAVE_LSTAT
28905       if (!stat ("conftest.lnk/", &st))
28906         result |= 2;
28907 #endif
28908       return result;
28909
28910   ;
28911   return 0;
28912 }
28913 _ACEOF
28914 if ac_fn_c_try_run "$LINENO"; then :
28915   gl_cv_func_stat_file_slash=yes
28916 else
28917   gl_cv_func_stat_file_slash=no
28918 fi
28919 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28920   conftest.$ac_objext conftest.beam conftest.$ac_ext
28921 fi
28922
28923        rm -f conftest.tmp conftest.lnk
28924 fi
28925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
28926 $as_echo "$gl_cv_func_stat_file_slash" >&6; }
28927   case $gl_cv_func_stat_dir_slash in
28928     *no) REPLACE_STAT=1
28929
28930 $as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h
28931 ;;
28932   esac
28933   case $gl_cv_func_stat_file_slash in
28934     *no) REPLACE_STAT=1
28935
28936 $as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
28937 ;;
28938   esac
28939
28940   if test $REPLACE_STAT = 1; then
28941
28942
28943
28944
28945
28946
28947
28948
28949   gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
28950
28951     :
28952   fi
28953
28954
28955
28956
28957
28958           GNULIB_STAT=1
28959
28960
28961
28962
28963
28964 $as_echo "#define GNULIB_TEST_STAT 1" >>confdefs.h
28965
28966
28967
28968
28969
28970
28971
28972   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>
28973      #include <sys/stat.h>
28974 "
28975 if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes; then :
28976
28977 cat >>confdefs.h <<_ACEOF
28978 #define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1
28979 _ACEOF
28980
28981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
28982 $as_echo_n "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
28983 if ${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+:} false; then :
28984   $as_echo_n "(cached) " >&6
28985 else
28986   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28987 /* end confdefs.h.  */
28988
28989             #include <sys/types.h>
28990             #include <sys/stat.h>
28991             #if HAVE_SYS_TIME_H
28992             # include <sys/time.h>
28993             #endif
28994             #include <time.h>
28995             struct timespec ts;
28996             struct stat st;
28997
28998 int
28999 main ()
29000 {
29001
29002             st.st_atim = ts;
29003
29004   ;
29005   return 0;
29006 }
29007 _ACEOF
29008 if ac_fn_c_try_compile "$LINENO"; then :
29009   ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
29010 else
29011   ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no
29012 fi
29013 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29014 fi
29015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
29016 $as_echo "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
29017      if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
29018
29019 $as_echo "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
29020
29021      fi
29022 else
29023   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>
29024         #include <sys/stat.h>
29025 "
29026 if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = xyes; then :
29027
29028 cat >>confdefs.h <<_ACEOF
29029 #define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1
29030 _ACEOF
29031
29032
29033 else
29034   ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
29035            #include <sys/stat.h>
29036 "
29037 if test "x$ac_cv_member_struct_stat_st_atimensec" = xyes; then :
29038
29039 cat >>confdefs.h <<_ACEOF
29040 #define HAVE_STRUCT_STAT_ST_ATIMENSEC 1
29041 _ACEOF
29042
29043
29044 else
29045   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>
29046               #include <sys/stat.h>
29047 "
29048 if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = xyes; then :
29049
29050 cat >>confdefs.h <<_ACEOF
29051 #define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1
29052 _ACEOF
29053
29054
29055 fi
29056
29057 fi
29058
29059 fi
29060
29061 fi
29062
29063
29064
29065
29066
29067   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>
29068      #include <sys/stat.h>
29069 "
29070 if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = xyes; then :
29071
29072 cat >>confdefs.h <<_ACEOF
29073 #define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1
29074 _ACEOF
29075
29076
29077 else
29078   ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h>
29079         #include <sys/stat.h>
29080 "
29081 if test "x$ac_cv_member_struct_stat_st_birthtimensec" = xyes; then :
29082
29083 cat >>confdefs.h <<_ACEOF
29084 #define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1
29085 _ACEOF
29086
29087
29088 else
29089   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>
29090           #include <sys/stat.h>
29091 "
29092 if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = xyes; then :
29093
29094 cat >>confdefs.h <<_ACEOF
29095 #define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1
29096 _ACEOF
29097
29098
29099 fi
29100
29101 fi
29102
29103 fi
29104
29105
29106
29107
29108 cat >>confdefs.h <<_ACEOF
29109 #define GNULIB_STATAT 1
29110 _ACEOF
29111
29112
29113   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stdalign.h" >&5
29114 $as_echo_n "checking for working stdalign.h... " >&6; }
29115 if ${gl_cv_header_working_stdalign_h+:} false; then :
29116   $as_echo_n "(cached) " >&6
29117 else
29118   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29119 /* end confdefs.h.  */
29120 #include <stdalign.h>
29121             #include <stddef.h>
29122
29123             /* Test that alignof yields a result consistent with offsetof.
29124                This catches GCC bug 52023
29125                <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>.  */
29126             #ifdef __cplusplus
29127                template <class t> struct alignof_helper { char a; t b; };
29128             # define ao(type) offsetof (alignof_helper<type>, b)
29129             #else
29130             # define ao(type) offsetof (struct { char a; type b; }, b)
29131             #endif
29132             char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1];
29133             char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1];
29134             char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1];
29135
29136             /* Test _Alignas only on platforms where gnulib can help.  */
29137             #if \
29138                 ((defined __cplusplus && 201103 <= __cplusplus) \
29139                  || __GNUC__ || __IBMC__ || __IBMCPP__ || __ICC \
29140                  || 0x5110 <= __SUNPRO_C || 1300 <= _MSC_VER)
29141               struct alignas_test { char c; char alignas (8) alignas_8; };
29142               char test_alignas[offsetof (struct alignas_test, alignas_8) == 8
29143                                 ? 1 : -1];
29144             #endif
29145
29146 int
29147 main ()
29148 {
29149
29150   ;
29151   return 0;
29152 }
29153 _ACEOF
29154 if ac_fn_c_try_compile "$LINENO"; then :
29155   gl_cv_header_working_stdalign_h=yes
29156 else
29157   gl_cv_header_working_stdalign_h=no
29158 fi
29159 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29160 fi
29161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdalign_h" >&5
29162 $as_echo "$gl_cv_header_working_stdalign_h" >&6; }
29163
29164   if test $gl_cv_header_working_stdalign_h = yes; then
29165     STDALIGN_H=''
29166   else
29167     STDALIGN_H='stdalign.h'
29168   fi
29169
29170
29171    if test -n "$STDALIGN_H"; then
29172   GL_GENERATE_STDALIGN_H_TRUE=
29173   GL_GENERATE_STDALIGN_H_FALSE='#'
29174 else
29175   GL_GENERATE_STDALIGN_H_TRUE='#'
29176   GL_GENERATE_STDALIGN_H_FALSE=
29177 fi
29178
29179
29180
29181   STDARG_H=''
29182   NEXT_STDARG_H='<stdarg.h>'
29183   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5
29184 $as_echo_n "checking for va_copy... " >&6; }
29185   if ${gl_cv_func_va_copy+:} false; then :
29186   $as_echo_n "(cached) " >&6
29187 else
29188
29189     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29190 /* end confdefs.h.  */
29191 #include <stdarg.h>
29192 int
29193 main ()
29194 {
29195
29196 #ifndef va_copy
29197 void (*func) (va_list, va_list) = va_copy;
29198 #endif
29199
29200   ;
29201   return 0;
29202 }
29203 _ACEOF
29204 if ac_fn_c_try_compile "$LINENO"; then :
29205   gl_cv_func_va_copy=yes
29206 else
29207   gl_cv_func_va_copy=no
29208 fi
29209 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29210 fi
29211
29212   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_va_copy" >&5
29213 $as_echo "$gl_cv_func_va_copy" >&6; }
29214   if test $gl_cv_func_va_copy = no; then
29215                                     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29216 /* end confdefs.h.  */
29217 #if defined _AIX && !defined __GNUC__
29218         AIX vaccine
29219        #endif
29220
29221 _ACEOF
29222 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
29223   $EGREP "vaccine" >/dev/null 2>&1; then :
29224   gl_aixcc=yes
29225 else
29226   gl_aixcc=no
29227 fi
29228 rm -f conftest*
29229
29230     if test $gl_aixcc = yes; then
29231             STDARG_H=stdarg.h
29232
29233
29234
29235
29236
29237
29238
29239
29240      if test $gl_cv_have_include_next = yes; then
29241        gl_cv_next_stdarg_h='<'stdarg.h'>'
29242      else
29243        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdarg.h>" >&5
29244 $as_echo_n "checking absolute name of <stdarg.h>... " >&6; }
29245 if ${gl_cv_next_stdarg_h+:} false; then :
29246   $as_echo_n "(cached) " >&6
29247 else
29248
29249
29250
29251   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29252 /* end confdefs.h.  */
29253 #include <stdarg.h>
29254 _ACEOF
29255                 case "$host_os" in
29256     aix*) gl_absname_cpp="$ac_cpp -C" ;;
29257     *)    gl_absname_cpp="$ac_cpp" ;;
29258   esac
29259
29260   case "$host_os" in
29261     mingw*)
29262                                           gl_dirsep_regex='[/\\]'
29263       ;;
29264     *)
29265       gl_dirsep_regex='\/'
29266       ;;
29267   esac
29268       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
29269   gl_header_literal_regex=`echo 'stdarg.h' \
29270                            | sed -e "$gl_make_literal_regex_sed"`
29271   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
29272       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
29273       s|^/[^/]|//&|
29274       p
29275       q
29276     }'
29277
29278         gl_cv_absolute_stdarg_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
29279   sed -n "$gl_absolute_header_sed"`
29280
29281            gl_header=$gl_cv_absolute_stdarg_h
29282            gl_cv_next_stdarg_h='"'$gl_header'"'
29283
29284
29285 fi
29286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdarg_h" >&5
29287 $as_echo "$gl_cv_next_stdarg_h" >&6; }
29288      fi
29289      NEXT_STDARG_H=$gl_cv_next_stdarg_h
29290
29291      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
29292        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
29293        gl_next_as_first_directive='<'stdarg.h'>'
29294      else
29295        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
29296        gl_next_as_first_directive=$gl_cv_next_stdarg_h
29297      fi
29298      NEXT_AS_FIRST_DIRECTIVE_STDARG_H=$gl_next_as_first_directive
29299
29300
29301
29302
29303             if test "$gl_cv_next_stdarg_h" = '""'; then
29304         gl_cv_next_stdarg_h='"///usr/include/stdarg.h"'
29305         NEXT_STDARG_H="$gl_cv_next_stdarg_h"
29306       fi
29307     else
29308
29309   saved_as_echo_n="$as_echo_n"
29310   as_echo_n=':'
29311   if ${gl_cv_func___va_copy+:} false; then :
29312   $as_echo_n "(cached) " >&6
29313 else
29314
29315         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29316 /* end confdefs.h.  */
29317 #include <stdarg.h>
29318 int
29319 main ()
29320 {
29321
29322 #ifndef __va_copy
29323 error, bail out
29324 #endif
29325
29326   ;
29327   return 0;
29328 }
29329 _ACEOF
29330 if ac_fn_c_try_compile "$LINENO"; then :
29331   gl_cv_func___va_copy=yes
29332 else
29333   gl_cv_func___va_copy=no
29334 fi
29335 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29336 fi
29337
29338   as_echo_n="$saved_as_echo_n"
29339
29340       if test $gl_cv_func___va_copy = yes; then
29341
29342 $as_echo "#define va_copy __va_copy" >>confdefs.h
29343
29344       else
29345
29346
29347 $as_echo "#define va_copy gl_va_copy" >>confdefs.h
29348
29349       fi
29350     fi
29351   fi
29352
29353    if test -n "$STDARG_H"; then
29354   GL_GENERATE_STDARG_H_TRUE=
29355   GL_GENERATE_STDARG_H_FALSE='#'
29356 else
29357   GL_GENERATE_STDARG_H_TRUE='#'
29358   GL_GENERATE_STDARG_H_FALSE=
29359 fi
29360
29361
29362
29363
29364
29365
29366   # Define two additional variables used in the Makefile substitution.
29367
29368   if test "$ac_cv_header_stdbool_h" = yes; then
29369     STDBOOL_H=''
29370   else
29371     STDBOOL_H='stdbool.h'
29372   fi
29373
29374    if test -n "$STDBOOL_H"; then
29375   GL_GENERATE_STDBOOL_H_TRUE=
29376   GL_GENERATE_STDBOOL_H_FALSE='#'
29377 else
29378   GL_GENERATE_STDBOOL_H_TRUE='#'
29379   GL_GENERATE_STDBOOL_H_FALSE=
29380 fi
29381
29382
29383   if test "$ac_cv_type__Bool" = yes; then
29384     HAVE__BOOL=1
29385   else
29386     HAVE__BOOL=0
29387   fi
29388
29389
29390
29391
29392
29393   STDDEF_H=
29394   if test $gt_cv_c_wchar_t = no; then
29395     HAVE_WCHAR_T=0
29396     STDDEF_H=stddef.h
29397   fi
29398   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
29399 $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
29400 if ${gl_cv_decl_null_works+:} false; then :
29401   $as_echo_n "(cached) " >&6
29402 else
29403   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29404 /* end confdefs.h.  */
29405 #include <stddef.h>
29406       int test[2 * (sizeof NULL == sizeof (void *)) -1];
29407
29408 int
29409 main ()
29410 {
29411
29412   ;
29413   return 0;
29414 }
29415 _ACEOF
29416 if ac_fn_c_try_compile "$LINENO"; then :
29417   gl_cv_decl_null_works=yes
29418 else
29419   gl_cv_decl_null_works=no
29420 fi
29421 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29422 fi
29423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
29424 $as_echo "$gl_cv_decl_null_works" >&6; }
29425   if test $gl_cv_decl_null_works = no; then
29426     REPLACE_NULL=1
29427     STDDEF_H=stddef.h
29428   fi
29429
29430    if test -n "$STDDEF_H"; then
29431   GL_GENERATE_STDDEF_H_TRUE=
29432   GL_GENERATE_STDDEF_H_FALSE='#'
29433 else
29434   GL_GENERATE_STDDEF_H_TRUE='#'
29435   GL_GENERATE_STDDEF_H_FALSE=
29436 fi
29437
29438   if test -n "$STDDEF_H"; then
29439
29440
29441
29442
29443
29444
29445
29446
29447      if test $gl_cv_have_include_next = yes; then
29448        gl_cv_next_stddef_h='<'stddef.h'>'
29449      else
29450        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
29451 $as_echo_n "checking absolute name of <stddef.h>... " >&6; }
29452 if ${gl_cv_next_stddef_h+:} false; then :
29453   $as_echo_n "(cached) " >&6
29454 else
29455
29456
29457
29458   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29459 /* end confdefs.h.  */
29460 #include <stddef.h>
29461 _ACEOF
29462                 case "$host_os" in
29463     aix*) gl_absname_cpp="$ac_cpp -C" ;;
29464     *)    gl_absname_cpp="$ac_cpp" ;;
29465   esac
29466
29467   case "$host_os" in
29468     mingw*)
29469                                           gl_dirsep_regex='[/\\]'
29470       ;;
29471     *)
29472       gl_dirsep_regex='\/'
29473       ;;
29474   esac
29475       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
29476   gl_header_literal_regex=`echo 'stddef.h' \
29477                            | sed -e "$gl_make_literal_regex_sed"`
29478   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
29479       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
29480       s|^/[^/]|//&|
29481       p
29482       q
29483     }'
29484
29485         gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
29486   sed -n "$gl_absolute_header_sed"`
29487
29488            gl_header=$gl_cv_absolute_stddef_h
29489            gl_cv_next_stddef_h='"'$gl_header'"'
29490
29491
29492 fi
29493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
29494 $as_echo "$gl_cv_next_stddef_h" >&6; }
29495      fi
29496      NEXT_STDDEF_H=$gl_cv_next_stddef_h
29497
29498      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
29499        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
29500        gl_next_as_first_directive='<'stddef.h'>'
29501      else
29502        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
29503        gl_next_as_first_directive=$gl_cv_next_stddef_h
29504      fi
29505      NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
29506
29507
29508
29509
29510   fi
29511
29512
29513
29514
29515
29516
29517
29518
29519
29520
29521
29522
29523      if test $gl_cv_have_include_next = yes; then
29524        gl_cv_next_stdio_h='<'stdio.h'>'
29525      else
29526        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
29527 $as_echo_n "checking absolute name of <stdio.h>... " >&6; }
29528 if ${gl_cv_next_stdio_h+:} false; then :
29529   $as_echo_n "(cached) " >&6
29530 else
29531
29532
29533
29534   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29535 /* end confdefs.h.  */
29536 #include <stdio.h>
29537 _ACEOF
29538                 case "$host_os" in
29539     aix*) gl_absname_cpp="$ac_cpp -C" ;;
29540     *)    gl_absname_cpp="$ac_cpp" ;;
29541   esac
29542
29543   case "$host_os" in
29544     mingw*)
29545                                           gl_dirsep_regex='[/\\]'
29546       ;;
29547     *)
29548       gl_dirsep_regex='\/'
29549       ;;
29550   esac
29551       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
29552   gl_header_literal_regex=`echo 'stdio.h' \
29553                            | sed -e "$gl_make_literal_regex_sed"`
29554   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
29555       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
29556       s|^/[^/]|//&|
29557       p
29558       q
29559     }'
29560
29561         gl_cv_absolute_stdio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
29562   sed -n "$gl_absolute_header_sed"`
29563
29564            gl_header=$gl_cv_absolute_stdio_h
29565            gl_cv_next_stdio_h='"'$gl_header'"'
29566
29567
29568 fi
29569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
29570 $as_echo "$gl_cv_next_stdio_h" >&6; }
29571      fi
29572      NEXT_STDIO_H=$gl_cv_next_stdio_h
29573
29574      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
29575        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
29576        gl_next_as_first_directive='<'stdio.h'>'
29577      else
29578        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
29579        gl_next_as_first_directive=$gl_cv_next_stdio_h
29580      fi
29581      NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
29582
29583
29584
29585
29586
29587       GNULIB_FSCANF=1
29588
29589
29590 cat >>confdefs.h <<_ACEOF
29591 #define GNULIB_FSCANF 1
29592 _ACEOF
29593
29594
29595   GNULIB_SCANF=1
29596
29597
29598 cat >>confdefs.h <<_ACEOF
29599 #define GNULIB_SCANF 1
29600 _ACEOF
29601
29602
29603   GNULIB_FGETC=1
29604   GNULIB_GETC=1
29605   GNULIB_GETCHAR=1
29606   GNULIB_FGETS=1
29607   GNULIB_FREAD=1
29608
29609
29610       GNULIB_FPRINTF=1
29611   GNULIB_PRINTF=1
29612   GNULIB_VFPRINTF=1
29613   GNULIB_VPRINTF=1
29614   GNULIB_FPUTC=1
29615   GNULIB_PUTC=1
29616   GNULIB_PUTCHAR=1
29617   GNULIB_FPUTS=1
29618   GNULIB_PUTS=1
29619   GNULIB_FWRITE=1
29620
29621
29622
29623
29624     for gl_func in dprintf fpurge fseeko ftello getdelim getline gets pclose popen     renameat snprintf tmpfile vdprintf vsnprintf; do
29625     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
29626     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
29627 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
29628 if eval \${$as_gl_Symbol+:} false; then :
29629   $as_echo_n "(cached) " >&6
29630 else
29631   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29632 /* end confdefs.h.  */
29633 #include <stdio.h>
29634
29635 int
29636 main ()
29637 {
29638 #undef $gl_func
29639   (void) $gl_func;
29640   ;
29641   return 0;
29642 }
29643 _ACEOF
29644 if ac_fn_c_try_compile "$LINENO"; then :
29645   eval "$as_gl_Symbol=yes"
29646 else
29647   eval "$as_gl_Symbol=no"
29648 fi
29649 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29650 fi
29651 eval ac_res=\$$as_gl_Symbol
29652                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
29653 $as_echo "$ac_res" >&6; }
29654     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
29655   cat >>confdefs.h <<_ACEOF
29656 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
29657 _ACEOF
29658
29659                      eval ac_cv_have_decl_$gl_func=yes
29660 fi
29661       done
29662
29663
29664
29665
29666
29667
29668
29669
29670
29671
29672
29673
29674      if test $gl_cv_have_include_next = yes; then
29675        gl_cv_next_stdlib_h='<'stdlib.h'>'
29676      else
29677        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
29678 $as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
29679 if ${gl_cv_next_stdlib_h+:} false; then :
29680   $as_echo_n "(cached) " >&6
29681 else
29682
29683
29684
29685   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29686 /* end confdefs.h.  */
29687 #include <stdlib.h>
29688 _ACEOF
29689                 case "$host_os" in
29690     aix*) gl_absname_cpp="$ac_cpp -C" ;;
29691     *)    gl_absname_cpp="$ac_cpp" ;;
29692   esac
29693
29694   case "$host_os" in
29695     mingw*)
29696                                           gl_dirsep_regex='[/\\]'
29697       ;;
29698     *)
29699       gl_dirsep_regex='\/'
29700       ;;
29701   esac
29702       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
29703   gl_header_literal_regex=`echo 'stdlib.h' \
29704                            | sed -e "$gl_make_literal_regex_sed"`
29705   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
29706       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
29707       s|^/[^/]|//&|
29708       p
29709       q
29710     }'
29711
29712         gl_cv_absolute_stdlib_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
29713   sed -n "$gl_absolute_header_sed"`
29714
29715            gl_header=$gl_cv_absolute_stdlib_h
29716            gl_cv_next_stdlib_h='"'$gl_header'"'
29717
29718
29719 fi
29720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
29721 $as_echo "$gl_cv_next_stdlib_h" >&6; }
29722      fi
29723      NEXT_STDLIB_H=$gl_cv_next_stdlib_h
29724
29725      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
29726        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
29727        gl_next_as_first_directive='<'stdlib.h'>'
29728      else
29729        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
29730        gl_next_as_first_directive=$gl_cv_next_stdlib_h
29731      fi
29732      NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
29733
29734
29735
29736
29737
29738
29739     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
29740     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
29741     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
29742 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
29743 if eval \${$as_gl_Symbol+:} false; then :
29744   $as_echo_n "(cached) " >&6
29745 else
29746   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29747 /* end confdefs.h.  */
29748 #include <stdlib.h>
29749 #if HAVE_SYS_LOADAVG_H
29750 # include <sys/loadavg.h>
29751 #endif
29752 #if HAVE_RANDOM_H
29753 # include <random.h>
29754 #endif
29755
29756 int
29757 main ()
29758 {
29759 #undef $gl_func
29760   (void) $gl_func;
29761   ;
29762   return 0;
29763 }
29764 _ACEOF
29765 if ac_fn_c_try_compile "$LINENO"; then :
29766   eval "$as_gl_Symbol=yes"
29767 else
29768   eval "$as_gl_Symbol=no"
29769 fi
29770 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29771 fi
29772 eval ac_res=\$$as_gl_Symbol
29773                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
29774 $as_echo "$ac_res" >&6; }
29775     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
29776   cat >>confdefs.h <<_ACEOF
29777 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
29778 _ACEOF
29779
29780                      eval ac_cv_have_decl_$gl_func=yes
29781 fi
29782       done
29783
29784
29785
29786
29787
29788
29789
29790
29791   for ac_func in stpcpy
29792 do :
29793   ac_fn_c_check_func "$LINENO" "stpcpy" "ac_cv_func_stpcpy"
29794 if test "x$ac_cv_func_stpcpy" = xyes; then :
29795   cat >>confdefs.h <<_ACEOF
29796 #define HAVE_STPCPY 1
29797 _ACEOF
29798
29799 fi
29800 done
29801
29802   if test $ac_cv_func_stpcpy = no; then
29803     HAVE_STPCPY=0
29804   fi
29805
29806   if test $HAVE_STPCPY = 0; then
29807
29808
29809
29810
29811
29812
29813
29814
29815   gl_LIBOBJS="$gl_LIBOBJS stpcpy.$ac_objext"
29816
29817
29818   :
29819
29820   fi
29821
29822
29823
29824
29825
29826           GNULIB_STPCPY=1
29827
29828
29829
29830
29831
29832 $as_echo "#define GNULIB_TEST_STPCPY 1" >>confdefs.h
29833
29834
29835
29836
29837
29838
29839   for ac_func in strcasecmp
29840 do :
29841   ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp"
29842 if test "x$ac_cv_func_strcasecmp" = xyes; then :
29843   cat >>confdefs.h <<_ACEOF
29844 #define HAVE_STRCASECMP 1
29845 _ACEOF
29846
29847 fi
29848 done
29849
29850   if test $ac_cv_func_strcasecmp = no; then
29851     HAVE_STRCASECMP=0
29852   fi
29853
29854
29855
29856   for ac_func in strncasecmp
29857 do :
29858   ac_fn_c_check_func "$LINENO" "strncasecmp" "ac_cv_func_strncasecmp"
29859 if test "x$ac_cv_func_strncasecmp" = xyes; then :
29860   cat >>confdefs.h <<_ACEOF
29861 #define HAVE_STRNCASECMP 1
29862 _ACEOF
29863
29864 fi
29865 done
29866
29867   if test $ac_cv_func_strncasecmp = yes; then
29868     HAVE_STRNCASECMP=1
29869   else
29870     HAVE_STRNCASECMP=0
29871   fi
29872   ac_fn_c_check_decl "$LINENO" "strncasecmp" "ac_cv_have_decl_strncasecmp" "$ac_includes_default"
29873 if test "x$ac_cv_have_decl_strncasecmp" = xyes; then :
29874   ac_have_decl=1
29875 else
29876   ac_have_decl=0
29877 fi
29878
29879 cat >>confdefs.h <<_ACEOF
29880 #define HAVE_DECL_STRNCASECMP $ac_have_decl
29881 _ACEOF
29882
29883   if test $ac_cv_have_decl_strncasecmp = no; then
29884     HAVE_DECL_STRNCASECMP=0
29885   fi
29886
29887
29888   if test $HAVE_STRCASECMP = 0; then
29889
29890
29891
29892
29893
29894
29895
29896
29897   gl_LIBOBJS="$gl_LIBOBJS strcasecmp.$ac_objext"
29898
29899
29900   :
29901
29902   fi
29903   if test $HAVE_STRNCASECMP = 0; then
29904
29905
29906
29907
29908
29909
29910
29911
29912   gl_LIBOBJS="$gl_LIBOBJS strncasecmp.$ac_objext"
29913
29914
29915   :
29916
29917   fi
29918
29919
29920
29921
29922   for ac_func in strchrnul
29923 do :
29924   ac_fn_c_check_func "$LINENO" "strchrnul" "ac_cv_func_strchrnul"
29925 if test "x$ac_cv_func_strchrnul" = xyes; then :
29926   cat >>confdefs.h <<_ACEOF
29927 #define HAVE_STRCHRNUL 1
29928 _ACEOF
29929
29930 fi
29931 done
29932
29933   if test $ac_cv_func_strchrnul = no; then
29934     HAVE_STRCHRNUL=0
29935   else
29936     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strchrnul works" >&5
29937 $as_echo_n "checking whether strchrnul works... " >&6; }
29938 if ${gl_cv_func_strchrnul_works+:} false; then :
29939   $as_echo_n "(cached) " >&6
29940 else
29941   if test "$cross_compiling" = yes; then :
29942            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29943 /* end confdefs.h.  */
29944
29945 #if defined __CYGWIN__
29946  #include <cygwin/version.h>
29947  #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 9)
29948   Lucky user
29949  #endif
29950 #else
29951   Lucky user
29952 #endif
29953
29954 _ACEOF
29955 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
29956   $EGREP "Lucky user" >/dev/null 2>&1; then :
29957   gl_cv_func_strchrnul_works="guessing yes"
29958 else
29959   gl_cv_func_strchrnul_works="guessing no"
29960 fi
29961 rm -f conftest*
29962
29963
29964 else
29965   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29966 /* end confdefs.h.  */
29967
29968 #include <string.h> /* for strchrnul */
29969
29970 int
29971 main ()
29972 {
29973 const char *buf = "a";
29974       return strchrnul (buf, 'b') != buf + 1;
29975
29976   ;
29977   return 0;
29978 }
29979 _ACEOF
29980 if ac_fn_c_try_run "$LINENO"; then :
29981   gl_cv_func_strchrnul_works=yes
29982 else
29983   gl_cv_func_strchrnul_works=no
29984 fi
29985 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29986   conftest.$ac_objext conftest.beam conftest.$ac_ext
29987 fi
29988
29989
29990 fi
29991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strchrnul_works" >&5
29992 $as_echo "$gl_cv_func_strchrnul_works" >&6; }
29993     case "$gl_cv_func_strchrnul_works" in
29994       *yes) ;;
29995       *) REPLACE_STRCHRNUL=1 ;;
29996     esac
29997   fi
29998
29999   if test $HAVE_STRCHRNUL = 0 || test $REPLACE_STRCHRNUL = 1; then
30000
30001
30002
30003
30004
30005
30006
30007
30008   gl_LIBOBJS="$gl_LIBOBJS strchrnul.$ac_objext"
30009
30010     :
30011   fi
30012
30013
30014
30015
30016
30017           GNULIB_STRCHRNUL=1
30018
30019
30020
30021
30022
30023 $as_echo "#define GNULIB_TEST_STRCHRNUL 1" >>confdefs.h
30024
30025
30026
30027
30028
30029
30030
30031   if test $ac_cv_func_strdup = yes; then
30032     if test $gl_cv_func_malloc_posix != yes; then
30033       REPLACE_STRDUP=1
30034     fi
30035   fi
30036
30037   if test $ac_cv_have_decl_strdup = no; then
30038     HAVE_DECL_STRDUP=0
30039   fi
30040
30041   if test $ac_cv_func_strdup = no || test $REPLACE_STRDUP = 1; then
30042
30043
30044
30045
30046
30047
30048
30049
30050   gl_LIBOBJS="$gl_LIBOBJS strdup.$ac_objext"
30051
30052     :
30053   fi
30054
30055
30056
30057
30058
30059           GNULIB_STRDUP=1
30060
30061
30062
30063
30064
30065 $as_echo "#define GNULIB_TEST_STRDUP 1" >>confdefs.h
30066
30067
30068
30069
30070
30071
30072
30073
30074   if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
30075     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
30076 $as_echo_n "checking for working strerror function... " >&6; }
30077 if ${gl_cv_func_working_strerror+:} false; then :
30078   $as_echo_n "(cached) " >&6
30079 else
30080   if test "$cross_compiling" = yes; then :
30081   case "$host_os" in
30082                    # Guess yes on glibc systems.
30083            *-gnu*) gl_cv_func_working_strerror="guessing yes" ;;
30084                    # If we don't know, assume the worst.
30085            *)      gl_cv_func_working_strerror="guessing no" ;;
30086          esac
30087
30088 else
30089   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30090 /* end confdefs.h.  */
30091 #include <string.h>
30092
30093 int
30094 main ()
30095 {
30096 if (!*strerror (-2)) return 1;
30097   ;
30098   return 0;
30099 }
30100 _ACEOF
30101 if ac_fn_c_try_run "$LINENO"; then :
30102   gl_cv_func_working_strerror=yes
30103 else
30104   gl_cv_func_working_strerror=no
30105 fi
30106 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30107   conftest.$ac_objext conftest.beam conftest.$ac_ext
30108 fi
30109
30110
30111 fi
30112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
30113 $as_echo "$gl_cv_func_working_strerror" >&6; }
30114     case "$gl_cv_func_working_strerror" in
30115       *yes) ;;
30116       *)
30117                         REPLACE_STRERROR=1
30118         ;;
30119     esac
30120
30121   else
30122             REPLACE_STRERROR=1
30123   fi
30124
30125   if test $REPLACE_STRERROR = 1; then
30126
30127
30128
30129
30130
30131
30132
30133
30134   gl_LIBOBJS="$gl_LIBOBJS strerror.$ac_objext"
30135
30136   fi
30137
30138
30139 cat >>confdefs.h <<_ACEOF
30140 #define GNULIB_STRERROR 1
30141 _ACEOF
30142
30143
30144
30145
30146
30147
30148
30149           GNULIB_STRERROR=1
30150
30151
30152
30153
30154
30155 $as_echo "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
30156
30157
30158
30159
30160
30161   if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
30162
30163
30164
30165
30166
30167
30168
30169
30170   gl_LIBOBJS="$gl_LIBOBJS strerror-override.$ac_objext"
30171
30172
30173
30174
30175
30176   if test $ac_cv_header_sys_socket_h != yes; then
30177                     for ac_header in winsock2.h
30178 do :
30179   ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
30180 if test "x$ac_cv_header_winsock2_h" = xyes; then :
30181   cat >>confdefs.h <<_ACEOF
30182 #define HAVE_WINSOCK2_H 1
30183 _ACEOF
30184
30185 fi
30186
30187 done
30188
30189   fi
30190   if test "$ac_cv_header_winsock2_h" = yes; then
30191     HAVE_WINSOCK2_H=1
30192     UNISTD_H_HAVE_WINSOCK2_H=1
30193     SYS_IOCTL_H_HAVE_WINSOCK2_H=1
30194   else
30195     HAVE_WINSOCK2_H=0
30196   fi
30197
30198
30199   fi
30200
30201
30202  # This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE.
30203
30204
30205
30206
30207
30208
30209
30210 $as_echo "#define my_strftime nstrftime" >>confdefs.h
30211
30212
30213
30214
30215
30216
30217
30218
30219
30220
30221
30222
30223
30224
30225
30226   if test $ac_cv_have_decl_strndup = no; then
30227     HAVE_DECL_STRNDUP=0
30228   fi
30229
30230   if test $ac_cv_func_strndup = yes; then
30231     HAVE_STRNDUP=1
30232     # AIX 4.3.3, AIX 5.1 have a function that fails to add the terminating '\0'.
30233     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strndup" >&5
30234 $as_echo_n "checking for working strndup... " >&6; }
30235 if ${gl_cv_func_strndup_works+:} false; then :
30236   $as_echo_n "(cached) " >&6
30237 else
30238   if test "$cross_compiling" = yes; then :
30239
30240           case $host_os in
30241             aix | aix[3-6]*) gl_cv_func_strndup_works="guessing no";;
30242             *)               gl_cv_func_strndup_works="guessing yes";;
30243           esac
30244
30245 else
30246   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30247 /* end confdefs.h.  */
30248
30249          #include <string.h>
30250                            #include <stdlib.h>
30251 int
30252 main ()
30253 {
30254
30255 #if !HAVE_DECL_STRNDUP
30256   extern
30257   #ifdef __cplusplus
30258   "C"
30259   #endif
30260   char *strndup (const char *, size_t);
30261 #endif
30262   char *s;
30263   s = strndup ("some longer string", 15);
30264   free (s);
30265   s = strndup ("shorter string", 13);
30266   return s[13] != '\0';
30267   ;
30268   return 0;
30269 }
30270 _ACEOF
30271 if ac_fn_c_try_run "$LINENO"; then :
30272   gl_cv_func_strndup_works=yes
30273 else
30274   gl_cv_func_strndup_works=no
30275 fi
30276 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30277   conftest.$ac_objext conftest.beam conftest.$ac_ext
30278 fi
30279
30280 fi
30281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strndup_works" >&5
30282 $as_echo "$gl_cv_func_strndup_works" >&6; }
30283     case $gl_cv_func_strndup_works in
30284       *no) REPLACE_STRNDUP=1 ;;
30285     esac
30286   else
30287     HAVE_STRNDUP=0
30288   fi
30289
30290   if test $HAVE_STRNDUP = 0 || test $REPLACE_STRNDUP = 1; then
30291
30292
30293
30294
30295
30296
30297
30298
30299   gl_LIBOBJS="$gl_LIBOBJS strndup.$ac_objext"
30300
30301   fi
30302
30303
30304
30305
30306
30307           GNULIB_STRNDUP=1
30308
30309
30310
30311
30312
30313 $as_echo "#define GNULIB_TEST_STRNDUP 1" >>confdefs.h
30314
30315
30316
30317
30318
30319
30320
30321
30322
30323   if test $ac_cv_have_decl_strnlen = no; then
30324     HAVE_DECL_STRNLEN=0
30325   else
30326
30327          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strnlen" >&5
30328 $as_echo_n "checking for working strnlen... " >&6; }
30329 if ${ac_cv_func_strnlen_working+:} false; then :
30330   $as_echo_n "(cached) " >&6
30331 else
30332   if test "$cross_compiling" = yes; then :
30333   # Guess no on AIX systems, yes otherwise.
30334                 case "$host_os" in
30335                   aix*) ac_cv_func_strnlen_working=no;;
30336                   *)    ac_cv_func_strnlen_working=yes;;
30337                 esac
30338 else
30339   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30340 /* end confdefs.h.  */
30341 $ac_includes_default
30342 int
30343 main ()
30344 {
30345
30346 #define S "foobar"
30347 #define S_LEN (sizeof S - 1)
30348
30349   /* At least one implementation is buggy: that of AIX 4.3 would
30350      give strnlen (S, 1) == 3.  */
30351
30352   int i;
30353   for (i = 0; i < S_LEN + 1; ++i)
30354     {
30355       int expected = i <= S_LEN ? i : S_LEN;
30356       if (strnlen (S, i) != expected)
30357         return 1;
30358     }
30359   return 0;
30360
30361   ;
30362   return 0;
30363 }
30364 _ACEOF
30365 if ac_fn_c_try_run "$LINENO"; then :
30366   ac_cv_func_strnlen_working=yes
30367 else
30368   ac_cv_func_strnlen_working=no
30369 fi
30370 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30371   conftest.$ac_objext conftest.beam conftest.$ac_ext
30372 fi
30373
30374 fi
30375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strnlen_working" >&5
30376 $as_echo "$ac_cv_func_strnlen_working" >&6; }
30377 test $ac_cv_func_strnlen_working = no && :
30378
30379
30380     if test $ac_cv_func_strnlen_working = no; then
30381       REPLACE_STRNLEN=1
30382     fi
30383   fi
30384
30385   if test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1; then
30386
30387
30388
30389
30390
30391
30392
30393
30394   gl_LIBOBJS="$gl_LIBOBJS strnlen.$ac_objext"
30395
30396     :
30397   fi
30398
30399
30400
30401
30402
30403           GNULIB_STRNLEN=1
30404
30405
30406
30407
30408
30409 $as_echo "#define GNULIB_TEST_STRNLEN 1" >>confdefs.h
30410
30411
30412
30413
30414
30415
30416
30417
30418   if test "$ac_cv_have_decl_strtoimax" != yes; then
30419     HAVE_DECL_STRTOIMAX=0
30420   fi
30421
30422   if test "$ac_cv_func_strtoimax" = yes; then
30423     HAVE_STRTOIMAX=1
30424              { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtoimax works" >&5
30425 $as_echo_n "checking whether strtoimax works... " >&6; }
30426 if ${gl_cv_func_strtoimax+:} false; then :
30427   $as_echo_n "(cached) " >&6
30428 else
30429   if test "$cross_compiling" = yes; then :
30430   case "$host_os" in
30431                    # Guess no on AIX 5.
30432             aix5*) gl_cv_func_strtoimax="guessing no" ;;
30433                    # Guess yes otherwise.
30434             *)     gl_cv_func_strtoimax="guessing yes" ;;
30435           esac
30436
30437 else
30438   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30439 /* end confdefs.h.  */
30440
30441 #include <errno.h>
30442 #include <string.h>
30443 #include <inttypes.h>
30444 int main ()
30445 {
30446   if (sizeof (intmax_t) > sizeof (int))
30447     {
30448       const char *s = "4294967295";
30449       char *p;
30450       intmax_t res;
30451       errno = 0;
30452       res = strtoimax (s, &p, 10);
30453       if (p != s + strlen (s))
30454         return 1;
30455       if (errno != 0)
30456         return 2;
30457       if (res != (intmax_t) 65535 * (intmax_t) 65537)
30458         return 3;
30459     }
30460   else
30461     {
30462       const char *s = "2147483647";
30463       char *p;
30464       intmax_t res;
30465       errno = 0;
30466       res = strtoimax (s, &p, 10);
30467       if (p != s + strlen (s))
30468         return 1;
30469       if (errno != 0)
30470         return 2;
30471       if (res != 2147483647)
30472         return 3;
30473     }
30474   return 0;
30475 }
30476
30477 _ACEOF
30478 if ac_fn_c_try_run "$LINENO"; then :
30479   gl_cv_func_strtoimax=yes
30480 else
30481   gl_cv_func_strtoimax=no
30482 fi
30483 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30484   conftest.$ac_objext conftest.beam conftest.$ac_ext
30485 fi
30486
30487
30488 fi
30489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtoimax" >&5
30490 $as_echo "$gl_cv_func_strtoimax" >&6; }
30491     case "$gl_cv_func_strtoimax" in
30492       *no) REPLACE_STRTOIMAX=1 ;;
30493     esac
30494   else
30495     if test "$ac_cv_have_decl_strtoimax" = yes; then
30496       # HP-UX 11.11 has "#define strtoimax(...) ..." but no function.
30497       REPLACE_STRTOIMAX=1
30498     fi
30499     HAVE_STRTOIMAX=0
30500   fi
30501
30502   if test $HAVE_DECL_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; then
30503
30504
30505
30506
30507
30508
30509
30510
30511   gl_LIBOBJS="$gl_LIBOBJS strtoimax.$ac_objext"
30512
30513
30514   ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
30515 if test "x$ac_cv_have_decl_strtoll" = xyes; then :
30516   ac_have_decl=1
30517 else
30518   ac_have_decl=0
30519 fi
30520
30521 cat >>confdefs.h <<_ACEOF
30522 #define HAVE_DECL_STRTOLL $ac_have_decl
30523 _ACEOF
30524
30525
30526
30527   fi
30528
30529
30530
30531
30532
30533           GNULIB_STRTOIMAX=1
30534
30535
30536
30537
30538
30539   for ac_func in strtol
30540 do :
30541   ac_fn_c_check_func "$LINENO" "strtol" "ac_cv_func_strtol"
30542 if test "x$ac_cv_func_strtol" = xyes; then :
30543   cat >>confdefs.h <<_ACEOF
30544 #define HAVE_STRTOL 1
30545 _ACEOF
30546
30547 fi
30548 done
30549
30550
30551   if test $ac_cv_func_strtol = no; then
30552
30553
30554
30555
30556
30557
30558
30559
30560   gl_LIBOBJS="$gl_LIBOBJS strtol.$ac_objext"
30561
30562   fi
30563
30564
30565
30566   if test "$ac_cv_type_long_long_int" = yes; then
30567     for ac_func in strtoll
30568 do :
30569   ac_fn_c_check_func "$LINENO" "strtoll" "ac_cv_func_strtoll"
30570 if test "x$ac_cv_func_strtoll" = xyes; then :
30571   cat >>confdefs.h <<_ACEOF
30572 #define HAVE_STRTOLL 1
30573 _ACEOF
30574
30575 fi
30576 done
30577
30578     if test $ac_cv_func_strtoll = no; then
30579       HAVE_STRTOLL=0
30580     fi
30581   fi
30582
30583   if test $HAVE_STRTOLL = 0; then
30584
30585
30586
30587
30588
30589
30590
30591
30592   gl_LIBOBJS="$gl_LIBOBJS strtoll.$ac_objext"
30593
30594
30595   :
30596
30597   fi
30598
30599
30600
30601
30602
30603           GNULIB_STRTOLL=1
30604
30605
30606
30607
30608
30609 $as_echo "#define GNULIB_TEST_STRTOLL 1" >>confdefs.h
30610
30611
30612
30613
30614   for ac_func in strtoul
30615 do :
30616   ac_fn_c_check_func "$LINENO" "strtoul" "ac_cv_func_strtoul"
30617 if test "x$ac_cv_func_strtoul" = xyes; then :
30618   cat >>confdefs.h <<_ACEOF
30619 #define HAVE_STRTOUL 1
30620 _ACEOF
30621
30622 fi
30623 done
30624
30625
30626   if test $ac_cv_func_strtoul = no; then
30627
30628
30629
30630
30631
30632
30633
30634
30635   gl_LIBOBJS="$gl_LIBOBJS strtoul.$ac_objext"
30636
30637   fi
30638
30639
30640
30641   if test "$ac_cv_type_unsigned_long_long_int" = yes; then
30642     for ac_func in strtoull
30643 do :
30644   ac_fn_c_check_func "$LINENO" "strtoull" "ac_cv_func_strtoull"
30645 if test "x$ac_cv_func_strtoull" = xyes; then :
30646   cat >>confdefs.h <<_ACEOF
30647 #define HAVE_STRTOULL 1
30648 _ACEOF
30649
30650 fi
30651 done
30652
30653     if test $ac_cv_func_strtoull = no; then
30654       HAVE_STRTOULL=0
30655     fi
30656   fi
30657
30658   if test $HAVE_STRTOULL = 0; then
30659
30660
30661
30662
30663
30664
30665
30666
30667   gl_LIBOBJS="$gl_LIBOBJS strtoull.$ac_objext"
30668
30669
30670   :
30671
30672   fi
30673
30674
30675
30676
30677
30678           GNULIB_STRTOULL=1
30679
30680
30681
30682
30683
30684 $as_echo "#define GNULIB_TEST_STRTOULL 1" >>confdefs.h
30685
30686
30687
30688
30689
30690
30691
30692
30693   if test "$ac_cv_have_decl_strtoumax" = yes; then
30694     if test "$ac_cv_func_strtoumax" != yes; then
30695       # HP-UX 11.11 has "#define strtoimax(...) ..." but no function.
30696       REPLACE_STRTOUMAX=1
30697     fi
30698   else
30699     HAVE_DECL_STRTOUMAX=0
30700   fi
30701
30702   if test $HAVE_DECL_STRTOUMAX = 0 || test $REPLACE_STRTOUMAX = 1; then
30703
30704
30705
30706
30707
30708
30709
30710
30711   gl_LIBOBJS="$gl_LIBOBJS strtoumax.$ac_objext"
30712
30713
30714   ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
30715 if test "x$ac_cv_have_decl_strtoull" = xyes; then :
30716   ac_have_decl=1
30717 else
30718   ac_have_decl=0
30719 fi
30720
30721 cat >>confdefs.h <<_ACEOF
30722 #define HAVE_DECL_STRTOULL $ac_have_decl
30723 _ACEOF
30724
30725
30726
30727   fi
30728
30729
30730
30731
30732
30733           GNULIB_STRTOUMAX=1
30734
30735
30736
30737
30738
30739
30740
30741         if test $ac_cv_func_symlink = no; then
30742     HAVE_SYMLINK=0
30743   else
30744     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether symlink handles trailing slash correctly" >&5
30745 $as_echo_n "checking whether symlink handles trailing slash correctly... " >&6; }
30746 if ${gl_cv_func_symlink_works+:} false; then :
30747   $as_echo_n "(cached) " >&6
30748 else
30749   if test "$cross_compiling" = yes; then :
30750   case "$host_os" in
30751                     # Guess yes on glibc systems.
30752             *-gnu*) gl_cv_func_symlink_works="guessing yes" ;;
30753                     # If we don't know, assume the worst.
30754             *)      gl_cv_func_symlink_works="guessing no" ;;
30755           esac
30756
30757 else
30758   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30759 /* end confdefs.h.  */
30760 #include <unistd.h>
30761
30762 int
30763 main ()
30764 {
30765 int result = 0;
30766              if (!symlink ("a", "conftest.link/"))
30767                result |= 1;
30768              if (symlink ("conftest.f", "conftest.lnk2"))
30769                result |= 2;
30770              else if (!symlink ("a", "conftest.lnk2/"))
30771                result |= 4;
30772              return result;
30773
30774   ;
30775   return 0;
30776 }
30777 _ACEOF
30778 if ac_fn_c_try_run "$LINENO"; then :
30779   gl_cv_func_symlink_works=yes
30780 else
30781   gl_cv_func_symlink_works=no
30782 fi
30783 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30784   conftest.$ac_objext conftest.beam conftest.$ac_ext
30785 fi
30786
30787       rm -f conftest.f conftest.link conftest.lnk2
30788 fi
30789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_symlink_works" >&5
30790 $as_echo "$gl_cv_func_symlink_works" >&6; }
30791     case "$gl_cv_func_symlink_works" in
30792       *yes) ;;
30793       *)
30794         REPLACE_SYMLINK=1
30795         ;;
30796     esac
30797   fi
30798
30799   if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then
30800
30801
30802
30803
30804
30805
30806
30807
30808   gl_LIBOBJS="$gl_LIBOBJS symlink.$ac_objext"
30809
30810   fi
30811
30812
30813
30814
30815
30816           GNULIB_SYMLINK=1
30817
30818
30819
30820
30821
30822 $as_echo "#define GNULIB_TEST_SYMLINK 1" >>confdefs.h
30823
30824
30825
30826
30827
30828
30829
30830
30831   if test $ac_cv_func_symlinkat = no; then
30832     HAVE_SYMLINKAT=0
30833   fi
30834
30835   if test $HAVE_SYMLINKAT = 0; then
30836
30837
30838
30839
30840
30841
30842
30843
30844   gl_LIBOBJS="$gl_LIBOBJS symlinkat.$ac_objext"
30845
30846   fi
30847
30848
30849
30850
30851
30852           GNULIB_SYMLINKAT=1
30853
30854
30855
30856
30857
30858 $as_echo "#define GNULIB_TEST_SYMLINKAT 1" >>confdefs.h
30859
30860
30861
30862
30863
30864
30865
30866
30867
30868
30869
30870
30871
30872
30873
30874
30875
30876      if test $gl_cv_have_include_next = yes; then
30877        gl_cv_next_sys_stat_h='<'sys/stat.h'>'
30878      else
30879        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
30880 $as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
30881 if ${gl_cv_next_sys_stat_h+:} false; then :
30882   $as_echo_n "(cached) " >&6
30883 else
30884
30885              if test $ac_cv_header_sys_stat_h = yes; then
30886
30887
30888
30889
30890   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30891 /* end confdefs.h.  */
30892 #include <sys/stat.h>
30893 _ACEOF
30894                 case "$host_os" in
30895     aix*) gl_absname_cpp="$ac_cpp -C" ;;
30896     *)    gl_absname_cpp="$ac_cpp" ;;
30897   esac
30898
30899   case "$host_os" in
30900     mingw*)
30901                                           gl_dirsep_regex='[/\\]'
30902       ;;
30903     *)
30904       gl_dirsep_regex='\/'
30905       ;;
30906   esac
30907       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
30908   gl_header_literal_regex=`echo 'sys/stat.h' \
30909                            | sed -e "$gl_make_literal_regex_sed"`
30910   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
30911       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
30912       s|^/[^/]|//&|
30913       p
30914       q
30915     }'
30916
30917         gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
30918   sed -n "$gl_absolute_header_sed"`
30919
30920            gl_header=$gl_cv_absolute_sys_stat_h
30921            gl_cv_next_sys_stat_h='"'$gl_header'"'
30922           else
30923                gl_cv_next_sys_stat_h='<'sys/stat.h'>'
30924              fi
30925
30926
30927 fi
30928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
30929 $as_echo "$gl_cv_next_sys_stat_h" >&6; }
30930      fi
30931      NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
30932
30933      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
30934        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
30935        gl_next_as_first_directive='<'sys/stat.h'>'
30936      else
30937        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
30938        gl_next_as_first_directive=$gl_cv_next_sys_stat_h
30939      fi
30940      NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
30941
30942
30943
30944
30945
30946
30947
30948
30949
30950
30951
30952   if test $WINDOWS_64_BIT_ST_SIZE = 1; then
30953
30954 $as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
30955
30956   fi
30957
30958       ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
30959      #include <sys/stat.h>
30960 "
30961 if test "x$ac_cv_type_nlink_t" = xyes; then :
30962
30963 else
30964
30965 $as_echo "#define nlink_t int" >>confdefs.h
30966
30967 fi
30968
30969
30970
30971     for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat     mknod mknodat stat utimensat; do
30972     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
30973     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
30974 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
30975 if eval \${$as_gl_Symbol+:} false; then :
30976   $as_echo_n "(cached) " >&6
30977 else
30978   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30979 /* end confdefs.h.  */
30980 #include <sys/stat.h>
30981
30982 int
30983 main ()
30984 {
30985 #undef $gl_func
30986   (void) $gl_func;
30987   ;
30988   return 0;
30989 }
30990 _ACEOF
30991 if ac_fn_c_try_compile "$LINENO"; then :
30992   eval "$as_gl_Symbol=yes"
30993 else
30994   eval "$as_gl_Symbol=no"
30995 fi
30996 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30997 fi
30998 eval ac_res=\$$as_gl_Symbol
30999                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
31000 $as_echo "$ac_res" >&6; }
31001     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
31002   cat >>confdefs.h <<_ACEOF
31003 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
31004 _ACEOF
31005
31006                      eval ac_cv_have_decl_$gl_func=yes
31007 fi
31008       done
31009
31010
31011
31012
31013
31014
31015
31016
31017
31018
31019
31020   if test $ac_cv_header_sysexits_h = yes; then
31021     HAVE_SYSEXITS_H=1
31022
31023
31024
31025
31026
31027
31028
31029
31030
31031      if test $gl_cv_have_include_next = yes; then
31032        gl_cv_next_sysexits_h='<'sysexits.h'>'
31033      else
31034        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sysexits.h>" >&5
31035 $as_echo_n "checking absolute name of <sysexits.h>... " >&6; }
31036 if ${gl_cv_next_sysexits_h+:} false; then :
31037   $as_echo_n "(cached) " >&6
31038 else
31039
31040              if test $ac_cv_header_sysexits_h = yes; then
31041
31042
31043
31044
31045   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31046 /* end confdefs.h.  */
31047 #include <sysexits.h>
31048 _ACEOF
31049                 case "$host_os" in
31050     aix*) gl_absname_cpp="$ac_cpp -C" ;;
31051     *)    gl_absname_cpp="$ac_cpp" ;;
31052   esac
31053
31054   case "$host_os" in
31055     mingw*)
31056                                           gl_dirsep_regex='[/\\]'
31057       ;;
31058     *)
31059       gl_dirsep_regex='\/'
31060       ;;
31061   esac
31062       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
31063   gl_header_literal_regex=`echo 'sysexits.h' \
31064                            | sed -e "$gl_make_literal_regex_sed"`
31065   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
31066       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
31067       s|^/[^/]|//&|
31068       p
31069       q
31070     }'
31071
31072         gl_cv_absolute_sysexits_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
31073   sed -n "$gl_absolute_header_sed"`
31074
31075            gl_header=$gl_cv_absolute_sysexits_h
31076            gl_cv_next_sysexits_h='"'$gl_header'"'
31077           else
31078                gl_cv_next_sysexits_h='<'sysexits.h'>'
31079              fi
31080
31081
31082 fi
31083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sysexits_h" >&5
31084 $as_echo "$gl_cv_next_sysexits_h" >&6; }
31085      fi
31086      NEXT_SYSEXITS_H=$gl_cv_next_sysexits_h
31087
31088      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
31089        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
31090        gl_next_as_first_directive='<'sysexits.h'>'
31091      else
31092        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
31093        gl_next_as_first_directive=$gl_cv_next_sysexits_h
31094      fi
31095      NEXT_AS_FIRST_DIRECTIVE_SYSEXITS_H=$gl_next_as_first_directive
31096
31097
31098
31099
31100     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31101 /* end confdefs.h.  */
31102 #include <sysexits.h>
31103 int
31104 main ()
31105 {
31106 switch (0)
31107           {
31108           case EX_OK:
31109           case EX_USAGE:
31110           case EX_DATAERR:
31111           case EX_NOINPUT:
31112           case EX_NOUSER:
31113           case EX_NOHOST:
31114           case EX_UNAVAILABLE:
31115           case EX_SOFTWARE:
31116           case EX_OSERR:
31117           case EX_OSFILE:
31118           case EX_CANTCREAT:
31119           case EX_IOERR:
31120           case EX_TEMPFAIL:
31121           case EX_PROTOCOL:
31122           case EX_NOPERM:
31123           case EX_CONFIG:
31124             break;
31125           }
31126
31127   ;
31128   return 0;
31129 }
31130 _ACEOF
31131 if ac_fn_c_try_compile "$LINENO"; then :
31132   SYSEXITS_H=
31133 else
31134   SYSEXITS_H=sysexits.h
31135 fi
31136 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31137   else
31138     HAVE_SYSEXITS_H=0
31139     SYSEXITS_H=sysexits.h
31140   fi
31141
31142
31143    if test -n "$SYSEXITS_H"; then
31144   GL_GENERATE_SYSEXITS_H_TRUE=
31145   GL_GENERATE_SYSEXITS_H_FALSE='#'
31146 else
31147   GL_GENERATE_SYSEXITS_H_TRUE='#'
31148   GL_GENERATE_SYSEXITS_H_FALSE=
31149 fi
31150
31151
31152
31153
31154   :
31155
31156
31157
31158
31159
31160
31161
31162
31163
31164
31165
31166       ac_fn_c_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "#include <time.h>
31167 "
31168 if test "x$ac_cv_have_decl_localtime_r" = xyes; then :
31169   ac_have_decl=1
31170 else
31171   ac_have_decl=0
31172 fi
31173
31174 cat >>confdefs.h <<_ACEOF
31175 #define HAVE_DECL_LOCALTIME_R $ac_have_decl
31176 _ACEOF
31177
31178   if test $ac_cv_have_decl_localtime_r = no; then
31179     HAVE_DECL_LOCALTIME_R=0
31180   fi
31181
31182
31183   if test $ac_cv_func_localtime_r = yes; then
31184     HAVE_LOCALTIME_R=1
31185     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5
31186 $as_echo_n "checking whether localtime_r is compatible with its POSIX signature... " >&6; }
31187 if ${gl_cv_time_r_posix+:} false; then :
31188   $as_echo_n "(cached) " >&6
31189 else
31190   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31191 /* end confdefs.h.  */
31192 #include <time.h>
31193 int
31194 main ()
31195 {
31196 /* We don't need to append 'restrict's to the argument types,
31197                  even though the POSIX signature has the 'restrict's,
31198                  since C99 says they can't affect type compatibility.  */
31199               struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r;
31200               if (ptr) return 0;
31201               /* Check the return type is a pointer.
31202                  On HP-UX 10 it is 'int'.  */
31203               *localtime_r (0, 0);
31204   ;
31205   return 0;
31206 }
31207
31208 _ACEOF
31209 if ac_fn_c_try_compile "$LINENO"; then :
31210   gl_cv_time_r_posix=yes
31211 else
31212   gl_cv_time_r_posix=no
31213 fi
31214 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31215
31216 fi
31217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_r_posix" >&5
31218 $as_echo "$gl_cv_time_r_posix" >&6; }
31219     if test $gl_cv_time_r_posix = yes; then
31220       REPLACE_LOCALTIME_R=0
31221     else
31222       REPLACE_LOCALTIME_R=1
31223     fi
31224   else
31225     HAVE_LOCALTIME_R=0
31226   fi
31227
31228   if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
31229
31230
31231
31232
31233
31234
31235
31236
31237   gl_LIBOBJS="$gl_LIBOBJS time_r.$ac_objext"
31238
31239
31240   :
31241
31242   fi
31243
31244
31245
31246
31247
31248           GNULIB_TIME_R=1
31249
31250
31251
31252
31253
31254 $as_echo "#define GNULIB_TEST_TIME_R 1" >>confdefs.h
31255
31256
31257
31258   :
31259
31260
31261
31262
31263
31264
31265   if test $ac_cv_have_decl_ttyname_r = no; then
31266     HAVE_DECL_TTYNAME_R=0
31267   fi
31268
31269   for ac_func in ttyname_r
31270 do :
31271   ac_fn_c_check_func "$LINENO" "ttyname_r" "ac_cv_func_ttyname_r"
31272 if test "x$ac_cv_func_ttyname_r" = xyes; then :
31273   cat >>confdefs.h <<_ACEOF
31274 #define HAVE_TTYNAME_R 1
31275 _ACEOF
31276
31277 fi
31278 done
31279
31280   if test $ac_cv_func_ttyname_r = no; then
31281     HAVE_TTYNAME_R=0
31282   else
31283     HAVE_TTYNAME_R=1
31284             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ttyname_r is compatible with its POSIX signature" >&5
31285 $as_echo_n "checking whether ttyname_r is compatible with its POSIX signature... " >&6; }
31286 if ${gl_cv_func_ttyname_r_posix+:} false; then :
31287   $as_echo_n "(cached) " >&6
31288 else
31289   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31290 /* end confdefs.h.  */
31291 #include <stddef.h>
31292               #include <unistd.h>
31293 int
31294 main ()
31295 {
31296 *ttyname_r (0, NULL, 0);
31297   ;
31298   return 0;
31299 }
31300
31301 _ACEOF
31302 if ac_fn_c_try_compile "$LINENO"; then :
31303   gl_cv_func_ttyname_r_posix=no
31304 else
31305   gl_cv_func_ttyname_r_posix=yes
31306 fi
31307 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31308
31309 fi
31310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ttyname_r_posix" >&5
31311 $as_echo "$gl_cv_func_ttyname_r_posix" >&6; }
31312     if test $gl_cv_func_ttyname_r_posix = no; then
31313       REPLACE_TTYNAME_R=1
31314     else
31315
31316 $as_echo "#define HAVE_POSIXDECL_TTYNAME_R 1" >>confdefs.h
31317
31318
31319       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ttyname_r works with small buffers" >&5
31320 $as_echo_n "checking whether ttyname_r works with small buffers... " >&6; }
31321 if ${gl_cv_func_ttyname_r_works+:} false; then :
31322   $as_echo_n "(cached) " >&6
31323 else
31324
31325                               case "$host_os" in
31326                       # Guess no on Solaris.
31327             solaris*) gl_cv_func_ttyname_r_works="guessing no" ;;
31328                       # Guess no on OSF/1.
31329             osf*)     gl_cv_func_ttyname_r_works="guessing no" ;;
31330                       # Guess yes otherwise.
31331             *)        gl_cv_func_ttyname_r_works="guessing yes" ;;
31332           esac
31333           if test "$cross_compiling" = yes; then :
31334   :
31335 else
31336   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31337 /* end confdefs.h.  */
31338
31339 #include <fcntl.h>
31340 #include <unistd.h>
31341 int
31342 main (void)
31343 {
31344   int result = 0;
31345   int fd;
31346   char buf[31]; /* use any size < 128 here */
31347
31348   fd = open ("/dev/tty", O_RDONLY);
31349   if (fd < 0)
31350     result |= 16;
31351   else if (ttyname_r (fd, buf, sizeof (buf)) != 0)
31352     result |= 17;
31353   else if (ttyname_r (fd, buf, 1) == 0)
31354     result |= 18;
31355   return result;
31356 }
31357 _ACEOF
31358 if ac_fn_c_try_run "$LINENO"; then :
31359   gl_cv_func_ttyname_r_works=yes
31360 else
31361   case $? in
31362                17 | 18) gl_cv_func_ttyname_r_works=no ;;
31363              esac
31364 fi
31365 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31366   conftest.$ac_objext conftest.beam conftest.$ac_ext
31367 fi
31368
31369
31370 fi
31371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ttyname_r_works" >&5
31372 $as_echo "$gl_cv_func_ttyname_r_works" >&6; }
31373       case "$gl_cv_func_ttyname_r_works" in
31374         *yes) ;;
31375         *) REPLACE_TTYNAME_R=1 ;;
31376       esac
31377     fi
31378   fi
31379
31380   if test $HAVE_TTYNAME_R = 0 || test $REPLACE_TTYNAME_R = 1; then
31381
31382
31383
31384
31385
31386
31387
31388
31389   gl_LIBOBJS="$gl_LIBOBJS ttyname_r.$ac_objext"
31390
31391
31392   for ac_func in ttyname
31393 do :
31394   ac_fn_c_check_func "$LINENO" "ttyname" "ac_cv_func_ttyname"
31395 if test "x$ac_cv_func_ttyname" = xyes; then :
31396   cat >>confdefs.h <<_ACEOF
31397 #define HAVE_TTYNAME 1
31398 _ACEOF
31399
31400 fi
31401 done
31402
31403
31404   fi
31405
31406
31407
31408
31409
31410           GNULIB_TTYNAME_R=1
31411
31412
31413
31414
31415
31416 $as_echo "#define GNULIB_TEST_TTYNAME_R 1" >>confdefs.h
31417
31418
31419
31420
31421
31422
31423
31424
31425
31426
31427
31428
31429
31430
31431
31432      if test $gl_cv_have_include_next = yes; then
31433        gl_cv_next_unistd_h='<'unistd.h'>'
31434      else
31435        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
31436 $as_echo_n "checking absolute name of <unistd.h>... " >&6; }
31437 if ${gl_cv_next_unistd_h+:} false; then :
31438   $as_echo_n "(cached) " >&6
31439 else
31440
31441              if test $ac_cv_header_unistd_h = yes; then
31442
31443
31444
31445
31446   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31447 /* end confdefs.h.  */
31448 #include <unistd.h>
31449 _ACEOF
31450                 case "$host_os" in
31451     aix*) gl_absname_cpp="$ac_cpp -C" ;;
31452     *)    gl_absname_cpp="$ac_cpp" ;;
31453   esac
31454
31455   case "$host_os" in
31456     mingw*)
31457                                           gl_dirsep_regex='[/\\]'
31458       ;;
31459     *)
31460       gl_dirsep_regex='\/'
31461       ;;
31462   esac
31463       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
31464   gl_header_literal_regex=`echo 'unistd.h' \
31465                            | sed -e "$gl_make_literal_regex_sed"`
31466   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
31467       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
31468       s|^/[^/]|//&|
31469       p
31470       q
31471     }'
31472
31473         gl_cv_absolute_unistd_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
31474   sed -n "$gl_absolute_header_sed"`
31475
31476            gl_header=$gl_cv_absolute_unistd_h
31477            gl_cv_next_unistd_h='"'$gl_header'"'
31478           else
31479                gl_cv_next_unistd_h='<'unistd.h'>'
31480              fi
31481
31482
31483 fi
31484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
31485 $as_echo "$gl_cv_next_unistd_h" >&6; }
31486      fi
31487      NEXT_UNISTD_H=$gl_cv_next_unistd_h
31488
31489      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
31490        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
31491        gl_next_as_first_directive='<'unistd.h'>'
31492      else
31493        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
31494        gl_next_as_first_directive=$gl_cv_next_unistd_h
31495      fi
31496      NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
31497
31498
31499
31500
31501   if test $ac_cv_header_unistd_h = yes; then
31502     HAVE_UNISTD_H=1
31503   else
31504     HAVE_UNISTD_H=0
31505   fi
31506
31507
31508
31509
31510
31511
31512
31513     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
31514     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
31515     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
31516 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
31517 if eval \${$as_gl_Symbol+:} false; then :
31518   $as_echo_n "(cached) " >&6
31519 else
31520   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31521 /* end confdefs.h.  */
31522
31523 #if HAVE_UNISTD_H
31524 # include <unistd.h>
31525 #endif
31526 /* Some systems declare various items in the wrong headers.  */
31527 #if !(defined __GLIBC__ && !defined __UCLIBC__)
31528 # include <fcntl.h>
31529 # include <stdio.h>
31530 # include <stdlib.h>
31531 # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
31532 #  include <io.h>
31533 # endif
31534 #endif
31535
31536 int
31537 main ()
31538 {
31539 #undef $gl_func
31540   (void) $gl_func;
31541   ;
31542   return 0;
31543 }
31544 _ACEOF
31545 if ac_fn_c_try_compile "$LINENO"; then :
31546   eval "$as_gl_Symbol=yes"
31547 else
31548   eval "$as_gl_Symbol=no"
31549 fi
31550 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31551 fi
31552 eval ac_res=\$$as_gl_Symbol
31553                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
31554 $as_echo "$ac_res" >&6; }
31555     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
31556   cat >>confdefs.h <<_ACEOF
31557 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
31558 _ACEOF
31559
31560                      eval ac_cv_have_decl_$gl_func=yes
31561 fi
31562       done
31563
31564
31565
31566
31567
31568
31569
31570       if  { test "$HAVE_LIBUNISTRING" != yes \
31571     || {
31572
31573
31574
31575             test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
31576             || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
31577                  && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
31578                       || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
31579                            && test $LIBUNISTRING_VERSION_SUBMINOR -lt 0
31580                          }
31581                     }
31582                }
31583
31584
31585
31586
31587        }
31588   }; then
31589     LIBUNISTRING_UNITYPES_H='unitypes.h'
31590   else
31591     LIBUNISTRING_UNITYPES_H=
31592   fi
31593
31594
31595
31596
31597       if  { test "$HAVE_LIBUNISTRING" != yes \
31598     || {
31599
31600
31601
31602             test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
31603             || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
31604                  && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
31605                       || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
31606                            && test $LIBUNISTRING_VERSION_SUBMINOR -lt 0
31607                          }
31608                     }
31609                }
31610
31611
31612
31613
31614        }
31615   }; then
31616     LIBUNISTRING_UNIWIDTH_H='uniwidth.h'
31617   else
31618     LIBUNISTRING_UNIWIDTH_H=
31619   fi
31620
31621
31622
31623
31624        if  { test "$HAVE_LIBUNISTRING" != yes \
31625     || {
31626
31627
31628
31629             test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
31630             || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
31631                  && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
31632                       || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
31633                            && test $LIBUNISTRING_VERSION_SUBMINOR -lt 4
31634                          }
31635                     }
31636                }
31637
31638
31639
31640
31641        }
31642   }; then
31643   LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE=
31644   LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE='#'
31645 else
31646   LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE='#'
31647   LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE=
31648 fi
31649
31650
31651
31652
31653
31654
31655
31656     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unlink honors trailing slashes" >&5
31657 $as_echo_n "checking whether unlink honors trailing slashes... " >&6; }
31658 if ${gl_cv_func_unlink_honors_slashes+:} false; then :
31659   $as_echo_n "(cached) " >&6
31660 else
31661   touch conftest.file
31662      # Assume that if we have lstat, we can also check symlinks.
31663      if test $ac_cv_func_lstat = yes; then
31664        ln -s conftest.file conftest.lnk
31665      fi
31666      if test "$cross_compiling" = yes; then :
31667   case "$host_os" in
31668                  # Guess yes on glibc systems.
31669          *-gnu*) gl_cv_func_unlink_honors_slashes="guessing yes" ;;
31670                  # If we don't know, assume the worst.
31671          *)      gl_cv_func_unlink_honors_slashes="guessing no" ;;
31672        esac
31673
31674 else
31675   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31676 /* end confdefs.h.  */
31677 #if HAVE_UNISTD_H
31678            # include <unistd.h>
31679            #else /* on Windows with MSVC */
31680            # include <io.h>
31681            #endif
31682            #include <errno.h>
31683
31684 int
31685 main ()
31686 {
31687 int result = 0;
31688            if (!unlink ("conftest.file/"))
31689              result |= 1;
31690            else if (errno != ENOTDIR)
31691              result |= 2;
31692 #if HAVE_LSTAT
31693            if (!unlink ("conftest.lnk/"))
31694              result |= 4;
31695            else if (errno != ENOTDIR)
31696              result |= 8;
31697 #endif
31698            return result;
31699
31700   ;
31701   return 0;
31702 }
31703 _ACEOF
31704 if ac_fn_c_try_run "$LINENO"; then :
31705   gl_cv_func_unlink_honors_slashes=yes
31706 else
31707   gl_cv_func_unlink_honors_slashes=no
31708 fi
31709 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31710   conftest.$ac_objext conftest.beam conftest.$ac_ext
31711 fi
31712
31713      rm -f conftest.file conftest.lnk
31714 fi
31715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unlink_honors_slashes" >&5
31716 $as_echo "$gl_cv_func_unlink_honors_slashes" >&6; }
31717   case "$gl_cv_func_unlink_honors_slashes" in
31718     *no)
31719       REPLACE_UNLINK=1
31720       ;;
31721   esac
31722
31723       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unlink of a parent directory fails as it should" >&5
31724 $as_echo_n "checking whether unlink of a parent directory fails as it should... " >&6; }
31725 if ${gl_cv_func_unlink_parent_fails+:} false; then :
31726   $as_echo_n "(cached) " >&6
31727 else
31728   case "$host_os" in
31729        darwin*)
31730                                                       if {
31731               # Use the mktemp program if available. If not available, hide the error
31732               # message.
31733               tmp=`(umask 077 && mktemp -d /tmp/gtXXXXXX) 2>/dev/null` &&
31734               test -n "$tmp" && test -d "$tmp"
31735             } ||
31736             {
31737               # Use a simple mkdir command. It is guaranteed to fail if the directory
31738               # already exists.  $RANDOM is bash specific and expands to empty in shells
31739               # other than bash, ksh and zsh.  Its use does not increase security;
31740               # rather, it minimizes the probability of failure in a very cluttered /tmp
31741               # directory.
31742               tmp=/tmp/gt$$-$RANDOM
31743               (umask 077 && mkdir "$tmp")
31744             }; then
31745            mkdir "$tmp/subdir"
31746            GL_SUBDIR_FOR_UNLINK="$tmp/subdir"
31747            export GL_SUBDIR_FOR_UNLINK
31748            if test "$cross_compiling" = yes; then :
31749   # If we don't know, assume the worst.
31750               gl_cv_func_unlink_parent_fails="guessing no"
31751
31752 else
31753   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31754 /* end confdefs.h.  */
31755
31756                 #include <stdlib.h>
31757                 #if HAVE_UNISTD_H
31758                 # include <unistd.h>
31759                 #else /* on Windows with MSVC */
31760                 # include <direct.h>
31761                 # include <io.h>
31762                 #endif
31763                 int main ()
31764                 {
31765                   int result = 0;
31766                   if (chdir (getenv ("GL_SUBDIR_FOR_UNLINK")) != 0)
31767                     result |= 1;
31768                   else if (unlink ("..") == 0)
31769                     result |= 2;
31770                   return result;
31771                 }
31772
31773 _ACEOF
31774 if ac_fn_c_try_run "$LINENO"; then :
31775   gl_cv_func_unlink_parent_fails=yes
31776 else
31777   gl_cv_func_unlink_parent_fails=no
31778 fi
31779 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31780   conftest.$ac_objext conftest.beam conftest.$ac_ext
31781 fi
31782
31783            unset GL_SUBDIR_FOR_UNLINK
31784            rm -rf "$tmp"
31785          else
31786            gl_cv_func_unlink_parent_fails="guessing no"
31787          fi
31788          ;;
31789        *)
31790          gl_cv_func_unlink_parent_fails="guessing yes"
31791          ;;
31792      esac
31793
31794 fi
31795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unlink_parent_fails" >&5
31796 $as_echo "$gl_cv_func_unlink_parent_fails" >&6; }
31797   case "$gl_cv_func_unlink_parent_fails" in
31798     *no)
31799       REPLACE_UNLINK=1
31800
31801 $as_echo "#define UNLINK_PARENT_BUG 1" >>confdefs.h
31802
31803       ;;
31804   esac
31805
31806   if test $REPLACE_UNLINK = 1; then
31807
31808
31809
31810
31811
31812
31813
31814
31815   gl_LIBOBJS="$gl_LIBOBJS unlink.$ac_objext"
31816
31817   fi
31818
31819
31820
31821
31822
31823           GNULIB_UNLINK=1
31824
31825
31826
31827
31828
31829 $as_echo "#define GNULIB_TEST_UNLINK 1" >>confdefs.h
31830
31831
31832
31833
31834
31835
31836
31837
31838
31839   if test $ac_cv_func_unlinkat = no; then
31840     HAVE_UNLINKAT=0
31841   else
31842     case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
31843       *no)
31844         # Solaris 9 has *at functions, but uniformly mishandles trailing
31845         # slash in all of them.
31846         REPLACE_UNLINKAT=1
31847         ;;
31848       *)
31849         # GNU/Hurd has unlinkat, but it has the same bug as unlink.
31850         if test $REPLACE_UNLINK = 1; then
31851           REPLACE_UNLINKAT=1
31852         fi
31853         ;;
31854     esac
31855   fi
31856
31857   if test $HAVE_UNLINKAT = 0 || test $REPLACE_UNLINKAT = 1; then
31858
31859
31860
31861
31862
31863
31864
31865
31866   gl_LIBOBJS="$gl_LIBOBJS unlinkat.$ac_objext"
31867
31868   fi
31869
31870
31871
31872
31873
31874           GNULIB_UNLINKAT=1
31875
31876
31877
31878
31879
31880 $as_echo "#define GNULIB_TEST_UNLINKAT 1" >>confdefs.h
31881
31882
31883
31884
31885
31886
31887
31888   # The Hurd, the Linux kernel, the FreeBSD kernel version 2.2 and later,
31889   # Cygwin, and mingw never let anyone (even root) unlink directories.
31890   # If anyone knows of another system for which unlink can never
31891   # remove a directory, please report it to <bug-coreutils@gnu.org>.
31892   # Unfortunately this is difficult to test for, since it requires root access
31893   # and might create garbage in the file system,
31894   # so the code below simply relies on the kernel name and version number.
31895   case $host_os in
31896   gnu[0-9]* | \
31897   linux-* | linux | \
31898   freebsd2.2* | freebsd[3-9]* | freebsd[1-9][0-9]* | \
31899   cygwin | \
31900   mingw*)
31901
31902 $as_echo "#define UNLINK_CANNOT_UNLINK_DIR 1" >>confdefs.h
31903 ;;
31904   esac
31905
31906
31907
31908 $as_echo "#define USE_UNLOCKED_IO 1" >>confdefs.h
31909
31910
31911
31912
31913
31914
31915
31916
31917
31918
31919
31920
31921
31922
31923
31924
31925
31926
31927
31928
31929
31930
31931
31932   for ac_func in unlockpt
31933 do :
31934   ac_fn_c_check_func "$LINENO" "unlockpt" "ac_cv_func_unlockpt"
31935 if test "x$ac_cv_func_unlockpt" = xyes; then :
31936   cat >>confdefs.h <<_ACEOF
31937 #define HAVE_UNLOCKPT 1
31938 _ACEOF
31939
31940 fi
31941 done
31942
31943   if test $ac_cv_func_unlockpt = no; then
31944     HAVE_UNLOCKPT=0
31945   fi
31946
31947   if test $HAVE_UNLOCKPT = 0; then
31948
31949
31950
31951
31952
31953
31954
31955
31956   gl_LIBOBJS="$gl_LIBOBJS unlockpt.$ac_objext"
31957
31958
31959   for ac_func in revoke
31960 do :
31961   ac_fn_c_check_func "$LINENO" "revoke" "ac_cv_func_revoke"
31962 if test "x$ac_cv_func_revoke" = xyes; then :
31963   cat >>confdefs.h <<_ACEOF
31964 #define HAVE_REVOKE 1
31965 _ACEOF
31966
31967 fi
31968 done
31969
31970
31971   fi
31972
31973
31974
31975
31976
31977           GNULIB_UNLOCKPT=1
31978
31979
31980
31981
31982
31983 $as_echo "#define GNULIB_TEST_UNLOCKPT 1" >>confdefs.h
31984
31985
31986
31987
31988
31989
31990   if test $ac_cv_have_decl_unsetenv = no; then
31991     HAVE_DECL_UNSETENV=0
31992   fi
31993   for ac_func in unsetenv
31994 do :
31995   ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
31996 if test "x$ac_cv_func_unsetenv" = xyes; then :
31997   cat >>confdefs.h <<_ACEOF
31998 #define HAVE_UNSETENV 1
31999 _ACEOF
32000
32001 fi
32002 done
32003
32004   if test $ac_cv_func_unsetenv = no; then
32005     HAVE_UNSETENV=0
32006   else
32007     HAVE_UNSETENV=1
32008         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5
32009 $as_echo_n "checking for unsetenv() return type... " >&6; }
32010 if ${gt_cv_func_unsetenv_ret+:} false; then :
32011   $as_echo_n "(cached) " >&6
32012 else
32013   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32014 /* end confdefs.h.  */
32015
32016 #undef _BSD
32017 #define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */
32018 #include <stdlib.h>
32019 extern
32020 #ifdef __cplusplus
32021 "C"
32022 #endif
32023 int unsetenv (const char *name);
32024
32025 int
32026 main ()
32027 {
32028
32029   ;
32030   return 0;
32031 }
32032 _ACEOF
32033 if ac_fn_c_try_compile "$LINENO"; then :
32034   gt_cv_func_unsetenv_ret='int'
32035 else
32036   gt_cv_func_unsetenv_ret='void'
32037 fi
32038 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32039 fi
32040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5
32041 $as_echo "$gt_cv_func_unsetenv_ret" >&6; }
32042     if test $gt_cv_func_unsetenv_ret = 'void'; then
32043
32044 $as_echo "#define VOID_UNSETENV 1" >>confdefs.h
32045
32046       REPLACE_UNSETENV=1
32047     fi
32048
32049                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5
32050 $as_echo_n "checking whether unsetenv obeys POSIX... " >&6; }
32051 if ${gl_cv_func_unsetenv_works+:} false; then :
32052   $as_echo_n "(cached) " >&6
32053 else
32054   if test "$cross_compiling" = yes; then :
32055   case "$host_os" in
32056                  # Guess yes on glibc systems.
32057          *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
32058                  # If we don't know, assume the worst.
32059          *)      gl_cv_func_unsetenv_works="guessing no" ;;
32060        esac
32061
32062 else
32063   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32064 /* end confdefs.h.  */
32065
32066        #include <stdlib.h>
32067        #include <errno.h>
32068        extern char **environ;
32069
32070 int
32071 main ()
32072 {
32073
32074        char entry1[] = "a=1";
32075        char entry2[] = "b=2";
32076        char *env[] = { entry1, entry2, NULL };
32077        if (putenv ((char *) "a=1")) return 1;
32078        if (putenv (entry2)) return 2;
32079        entry2[0] = 'a';
32080        unsetenv ("a");
32081        if (getenv ("a")) return 3;
32082        if (!unsetenv ("") || errno != EINVAL) return 4;
32083        entry2[0] = 'b';
32084        environ = env;
32085        if (!getenv ("a")) return 5;
32086        entry2[0] = 'a';
32087        unsetenv ("a");
32088        if (getenv ("a")) return 6;
32089
32090   ;
32091   return 0;
32092 }
32093 _ACEOF
32094 if ac_fn_c_try_run "$LINENO"; then :
32095   gl_cv_func_unsetenv_works=yes
32096 else
32097   gl_cv_func_unsetenv_works=no
32098 fi
32099 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32100   conftest.$ac_objext conftest.beam conftest.$ac_ext
32101 fi
32102
32103 fi
32104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
32105 $as_echo "$gl_cv_func_unsetenv_works" >&6; }
32106     case "$gl_cv_func_unsetenv_works" in
32107       *yes) ;;
32108       *)
32109         REPLACE_UNSETENV=1
32110         ;;
32111     esac
32112   fi
32113
32114   if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
32115
32116
32117
32118
32119
32120
32121
32122
32123   gl_LIBOBJS="$gl_LIBOBJS unsetenv.$ac_objext"
32124
32125
32126
32127
32128
32129   fi
32130
32131
32132
32133
32134
32135           GNULIB_UNSETENV=1
32136
32137
32138
32139
32140
32141 $as_echo "#define GNULIB_TEST_UNSETENV 1" >>confdefs.h
32142
32143
32144
32145
32146
32147
32148
32149
32150
32151   if test $ac_cv_func_futimens = no && test $ac_cv_func_futimesat = yes; then
32152                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether futimesat handles NULL file" >&5
32153 $as_echo_n "checking whether futimesat handles NULL file... " >&6; }
32154 if ${gl_cv_func_futimesat_works+:} false; then :
32155   $as_echo_n "(cached) " >&6
32156 else
32157   touch conftest.file
32158        if test "$cross_compiling" = yes; then :
32159   case "$host_os" in
32160                    # Guess yes on glibc systems.
32161            *-gnu*) gl_cv_func_futimesat_works="guessing yes" ;;
32162                    # If we don't know, assume the worst.
32163            *)      gl_cv_func_futimesat_works="guessing no" ;;
32164          esac
32165
32166 else
32167   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32168 /* end confdefs.h.  */
32169
32170 #include <stddef.h>
32171 #include <sys/times.h>
32172 #include <fcntl.h>
32173
32174 int
32175 main ()
32176 {
32177     int fd = open ("conftest.file", O_RDWR);
32178           if (fd < 0) return 1;
32179           if (futimesat (fd, NULL, NULL)) return 2;
32180
32181   ;
32182   return 0;
32183 }
32184 _ACEOF
32185 if ac_fn_c_try_run "$LINENO"; then :
32186   gl_cv_func_futimesat_works=yes
32187 else
32188   gl_cv_func_futimesat_works=no
32189 fi
32190 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32191   conftest.$ac_objext conftest.beam conftest.$ac_ext
32192 fi
32193
32194       rm -f conftest.file
32195 fi
32196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_futimesat_works" >&5
32197 $as_echo "$gl_cv_func_futimesat_works" >&6; }
32198     case "$gl_cv_func_futimesat_works" in
32199       *yes) ;;
32200       *)
32201
32202 $as_echo "#define FUTIMESAT_NULL_BUG 1" >>confdefs.h
32203
32204         ;;
32205     esac
32206   fi
32207
32208
32209
32210
32211
32212   if test $ac_cv_func_utimensat = no; then
32213     HAVE_UTIMENSAT=0
32214   else
32215     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether utimensat works" >&5
32216 $as_echo_n "checking whether utimensat works... " >&6; }
32217 if ${gl_cv_func_utimensat_works+:} false; then :
32218   $as_echo_n "(cached) " >&6
32219 else
32220   if test "$cross_compiling" = yes; then :
32221   gl_cv_func_utimensat_works="guessing no"
32222 else
32223   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32224 /* end confdefs.h.  */
32225
32226 #include <fcntl.h>
32227 #include <sys/stat.h>
32228 #include <unistd.h>
32229
32230 int
32231 main ()
32232 {
32233 int result = 0;
32234               const char *f = "conftest.file";
32235               if (close (creat (f, 0600)))
32236                 return 1;
32237               /* Test whether the AT_SYMLINK_NOFOLLOW flag is supported.  */
32238               {
32239                 if (utimensat (AT_FDCWD, f, NULL, AT_SYMLINK_NOFOLLOW))
32240                   result |= 2;
32241               }
32242               /* Test whether UTIME_NOW and UTIME_OMIT work.  */
32243               {
32244                 struct timespec ts[2] = { { 1, UTIME_OMIT }, { 1, UTIME_NOW } };
32245                 if (utimensat (AT_FDCWD, f, ts, 0))
32246                   result |= 4;
32247               }
32248               sleep (1);
32249               {
32250                 struct timespec ts[2] = { { 1, UTIME_NOW }, { 1, UTIME_OMIT } };
32251                 struct stat st;
32252                 if (utimensat (AT_FDCWD, f, ts, 0))
32253                   result |= 8;
32254                 if (stat (f, &st))
32255                   result |= 16;
32256                 else if (st.st_ctime < st.st_atime)
32257                   result |= 32;
32258               }
32259               return result;
32260
32261   ;
32262   return 0;
32263 }
32264 _ACEOF
32265 if ac_fn_c_try_run "$LINENO"; then :
32266            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32267 /* end confdefs.h.  */
32268
32269 #ifdef __linux__
32270 /* The Linux kernel added utimensat in 2.6.22, but has bugs with UTIME_OMIT
32271    in several file systems as recently as 2.6.32.  Always replace utimensat
32272    to support older kernels.  */
32273 choke me
32274 #endif
32275
32276 int
32277 main ()
32278 {
32279
32280   ;
32281   return 0;
32282 }
32283 _ACEOF
32284 if ac_fn_c_try_compile "$LINENO"; then :
32285   gl_cv_func_utimensat_works=yes
32286 else
32287   gl_cv_func_utimensat_works="needs runtime check"
32288 fi
32289 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32290 else
32291   gl_cv_func_utimensat_works=no
32292 fi
32293 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32294   conftest.$ac_objext conftest.beam conftest.$ac_ext
32295 fi
32296
32297 fi
32298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_utimensat_works" >&5
32299 $as_echo "$gl_cv_func_utimensat_works" >&6; }
32300     if test "$gl_cv_func_utimensat_works" != yes; then
32301       REPLACE_UTIMENSAT=1
32302     fi
32303   fi
32304
32305   if test $HAVE_UTIMENSAT = 0 || test $REPLACE_UTIMENSAT = 1; then
32306
32307
32308
32309
32310
32311
32312
32313
32314   gl_LIBOBJS="$gl_LIBOBJS utimensat.$ac_objext"
32315
32316   fi
32317
32318
32319
32320
32321
32322           GNULIB_UTIMENSAT=1
32323
32324
32325
32326
32327
32328 $as_echo "#define GNULIB_TEST_UTIMENSAT 1" >>confdefs.h
32329
32330
32331
32332
32333
32334   if test $ac_cv_func_vasnprintf = no; then
32335
32336
32337
32338
32339
32340
32341
32342
32343
32344
32345   gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
32346
32347
32348
32349
32350
32351
32352
32353
32354
32355   gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
32356
32357
32358
32359
32360
32361
32362
32363
32364
32365   gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
32366
32367
32368
32369
32370
32371
32372
32373
32374
32375   gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
32376
32377   if test $ac_cv_func_vasnprintf = yes; then
32378
32379 $as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h
32380
32381   fi
32382
32383
32384
32385
32386
32387
32388
32389
32390
32391
32392
32393   ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
32394 if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
32395
32396 else
32397
32398 $as_echo "#define ptrdiff_t long" >>confdefs.h
32399
32400
32401 fi
32402
32403
32404
32405
32406
32407
32408
32409   fi
32410
32411
32412   for ac_func in vasprintf
32413 do :
32414   ac_fn_c_check_func "$LINENO" "vasprintf" "ac_cv_func_vasprintf"
32415 if test "x$ac_cv_func_vasprintf" = xyes; then :
32416   cat >>confdefs.h <<_ACEOF
32417 #define HAVE_VASPRINTF 1
32418 _ACEOF
32419
32420 fi
32421 done
32422
32423   if test $ac_cv_func_vasprintf = no; then
32424
32425
32426
32427
32428
32429
32430
32431
32432
32433   gl_LIBOBJS="$gl_LIBOBJS vasprintf.$ac_objext"
32434
32435
32436
32437
32438
32439
32440
32441
32442
32443   gl_LIBOBJS="$gl_LIBOBJS asprintf.$ac_objext"
32444
32445
32446   if test $ac_cv_func_vasprintf = yes; then
32447     REPLACE_VASPRINTF=1
32448   else
32449     HAVE_VASPRINTF=0
32450   fi
32451
32452
32453
32454
32455
32456
32457
32458
32459   fi
32460
32461
32462
32463
32464
32465
32466           GNULIB_VASPRINTF=1
32467
32468
32469
32470
32471
32472 $as_echo "#define GNULIB_TEST_VASPRINTF 1" >>confdefs.h
32473
32474
32475
32476
32477
32478   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=asprintf:2:c-format"
32479
32480
32481
32482   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=vasprintf:2:c-format"
32483
32484
32485 # Check whether --with-packager was given.
32486 if test "${with_packager+set}" = set; then :
32487   withval=$with_packager;       case $withval in
32488         yes|no) ;;
32489         *)
32490 cat >>confdefs.h <<_ACEOF
32491 #define PACKAGE_PACKAGER "$withval"
32492 _ACEOF
32493  ;;
32494       esac
32495
32496 fi
32497
32498
32499
32500 # Check whether --with-packager-version was given.
32501 if test "${with_packager_version+set}" = set; then :
32502   withval=$with_packager_version;       case $withval in
32503         yes|no) ;;
32504         *)
32505 cat >>confdefs.h <<_ACEOF
32506 #define PACKAGE_PACKAGER_VERSION "$withval"
32507 _ACEOF
32508  ;;
32509       esac
32510
32511 fi
32512
32513
32514
32515 # Check whether --with-packager-bug-reports was given.
32516 if test "${with_packager_bug_reports+set}" = set; then :
32517   withval=$with_packager_bug_reports;       case $withval in
32518         yes|no) ;;
32519         *)
32520 cat >>confdefs.h <<_ACEOF
32521 #define PACKAGE_PACKAGER_BUG_REPORTS "$withval"
32522 _ACEOF
32523  ;;
32524       esac
32525
32526 fi
32527
32528
32529   if test "X$with_packager" = "X" && \
32530      test "X$with_packager_version$with_packager_bug_reports" != "X"
32531   then
32532     as_fn_error $? "The --with-packager-{bug-reports,version} options require --with-packager" "$LINENO" 5
32533   fi
32534
32535
32536
32537   gl_cv_func_vsnprintf_usable=no
32538   for ac_func in vsnprintf
32539 do :
32540   ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
32541 if test "x$ac_cv_func_vsnprintf" = xyes; then :
32542   cat >>confdefs.h <<_ACEOF
32543 #define HAVE_VSNPRINTF 1
32544 _ACEOF
32545
32546 fi
32547 done
32548
32549   if test $ac_cv_func_vsnprintf = yes; then
32550
32551
32552
32553   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf respects a size of 1" >&5
32554 $as_echo_n "checking whether snprintf respects a size of 1... " >&6; }
32555 if ${gl_cv_func_snprintf_size1+:} false; then :
32556   $as_echo_n "(cached) " >&6
32557 else
32558
32559       if test "$cross_compiling" = yes; then :
32560   gl_cv_func_snprintf_size1="guessing yes"
32561 else
32562   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32563 /* end confdefs.h.  */
32564
32565 #include <stdio.h>
32566 #if HAVE_SNPRINTF
32567 # define my_snprintf snprintf
32568 #else
32569 # include <stdarg.h>
32570 static int my_snprintf (char *buf, int size, const char *format, ...)
32571 {
32572   va_list args;
32573   int ret;
32574   va_start (args, format);
32575   ret = vsnprintf (buf, size, format, args);
32576   va_end (args);
32577   return ret;
32578 }
32579 #endif
32580 int main()
32581 {
32582   static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
32583   my_snprintf (buf, 1, "%d", 12345);
32584   return buf[1] != 'E';
32585 }
32586 _ACEOF
32587 if ac_fn_c_try_run "$LINENO"; then :
32588   gl_cv_func_snprintf_size1=yes
32589 else
32590   gl_cv_func_snprintf_size1=no
32591 fi
32592 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32593   conftest.$ac_objext conftest.beam conftest.$ac_ext
32594 fi
32595
32596
32597 fi
32598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_size1" >&5
32599 $as_echo "$gl_cv_func_snprintf_size1" >&6; }
32600
32601     case "$gl_cv_func_snprintf_size1" in
32602       *yes)
32603
32604         case "$gl_cv_func_snprintf_retval_c99" in
32605           *yes)
32606
32607
32608      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports POSIX/XSI format strings with positions" >&5
32609 $as_echo_n "checking whether printf supports POSIX/XSI format strings with positions... " >&6; }
32610 if ${gl_cv_func_printf_positions+:} false; then :
32611   $as_echo_n "(cached) " >&6
32612 else
32613
32614       if test "$cross_compiling" = yes; then :
32615
32616          case "$host_os" in
32617            netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*)
32618                          gl_cv_func_printf_positions="guessing no";;
32619            beos*)        gl_cv_func_printf_positions="guessing no";;
32620            mingw* | pw*) gl_cv_func_printf_positions="guessing no";;
32621            *)            gl_cv_func_printf_positions="guessing yes";;
32622          esac
32623
32624 else
32625   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32626 /* end confdefs.h.  */
32627
32628 #include <stdio.h>
32629 #include <string.h>
32630 /* The string "%2$d %1$d", with dollar characters protected from the shell's
32631    dollar expansion (possibly an autoconf bug).  */
32632 static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
32633 static char buf[100];
32634 int main ()
32635 {
32636   sprintf (buf, format, 33, 55);
32637   return (strcmp (buf, "55 33") != 0);
32638 }
32639 _ACEOF
32640 if ac_fn_c_try_run "$LINENO"; then :
32641   gl_cv_func_printf_positions=yes
32642 else
32643   gl_cv_func_printf_positions=no
32644 fi
32645 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32646   conftest.$ac_objext conftest.beam conftest.$ac_ext
32647 fi
32648
32649
32650 fi
32651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_positions" >&5
32652 $as_echo "$gl_cv_func_printf_positions" >&6; }
32653
32654             case "$gl_cv_func_printf_positions" in
32655               *yes)
32656                 gl_cv_func_vsnprintf_usable=yes
32657                 ;;
32658             esac
32659             ;;
32660         esac
32661         ;;
32662     esac
32663   fi
32664   if test $gl_cv_func_vsnprintf_usable = no; then
32665
32666
32667
32668
32669
32670
32671
32672
32673
32674
32675   gl_LIBOBJS="$gl_LIBOBJS vsnprintf.$ac_objext"
32676
32677   if test $ac_cv_func_vsnprintf = yes; then
32678     REPLACE_VSNPRINTF=1
32679   fi
32680   :
32681
32682   fi
32683
32684   if test $ac_cv_have_decl_vsnprintf = no; then
32685     HAVE_DECL_VSNPRINTF=0
32686   fi
32687
32688
32689
32690
32691
32692
32693           GNULIB_VSNPRINTF=1
32694
32695
32696
32697
32698
32699 $as_echo "#define GNULIB_TEST_VSNPRINTF 1" >>confdefs.h
32700
32701
32702
32703
32704
32705
32706
32707
32708
32709
32710
32711
32712
32713
32714
32715      if test $gl_cv_have_include_next = yes; then
32716        gl_cv_next_wchar_h='<'wchar.h'>'
32717      else
32718        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
32719 $as_echo_n "checking absolute name of <wchar.h>... " >&6; }
32720 if ${gl_cv_next_wchar_h+:} false; then :
32721   $as_echo_n "(cached) " >&6
32722 else
32723
32724              if test $ac_cv_header_wchar_h = yes; then
32725
32726
32727
32728
32729   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32730 /* end confdefs.h.  */
32731 #include <wchar.h>
32732 _ACEOF
32733                 case "$host_os" in
32734     aix*) gl_absname_cpp="$ac_cpp -C" ;;
32735     *)    gl_absname_cpp="$ac_cpp" ;;
32736   esac
32737
32738   case "$host_os" in
32739     mingw*)
32740                                           gl_dirsep_regex='[/\\]'
32741       ;;
32742     *)
32743       gl_dirsep_regex='\/'
32744       ;;
32745   esac
32746       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
32747   gl_header_literal_regex=`echo 'wchar.h' \
32748                            | sed -e "$gl_make_literal_regex_sed"`
32749   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
32750       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
32751       s|^/[^/]|//&|
32752       p
32753       q
32754     }'
32755
32756         gl_cv_absolute_wchar_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
32757   sed -n "$gl_absolute_header_sed"`
32758
32759            gl_header=$gl_cv_absolute_wchar_h
32760            gl_cv_next_wchar_h='"'$gl_header'"'
32761           else
32762                gl_cv_next_wchar_h='<'wchar.h'>'
32763              fi
32764
32765
32766 fi
32767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
32768 $as_echo "$gl_cv_next_wchar_h" >&6; }
32769      fi
32770      NEXT_WCHAR_H=$gl_cv_next_wchar_h
32771
32772      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
32773        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
32774        gl_next_as_first_directive='<'wchar.h'>'
32775      else
32776        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
32777        gl_next_as_first_directive=$gl_cv_next_wchar_h
32778      fi
32779      NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
32780
32781
32782
32783
32784   if test $ac_cv_header_wchar_h = yes; then
32785     HAVE_WCHAR_H=1
32786   else
32787     HAVE_WCHAR_H=0
32788   fi
32789
32790
32791
32792
32793
32794   if test $gt_cv_c_wint_t = yes; then
32795     HAVE_WINT_T=1
32796   else
32797     HAVE_WINT_T=0
32798   fi
32799
32800
32801
32802     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
32803     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
32804     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
32805 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
32806 if eval \${$as_gl_Symbol+:} false; then :
32807   $as_echo_n "(cached) " >&6
32808 else
32809   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32810 /* end confdefs.h.  */
32811
32812 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
32813    <wchar.h>.
32814    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
32815    included before <wchar.h>.  */
32816 #if !(defined __GLIBC__ && !defined __UCLIBC__)
32817 # include <stddef.h>
32818 # include <stdio.h>
32819 # include <time.h>
32820 #endif
32821 #include <wchar.h>
32822
32823 int
32824 main ()
32825 {
32826 #undef $gl_func
32827   (void) $gl_func;
32828   ;
32829   return 0;
32830 }
32831 _ACEOF
32832 if ac_fn_c_try_compile "$LINENO"; then :
32833   eval "$as_gl_Symbol=yes"
32834 else
32835   eval "$as_gl_Symbol=no"
32836 fi
32837 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32838 fi
32839 eval ac_res=\$$as_gl_Symbol
32840                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
32841 $as_echo "$ac_res" >&6; }
32842     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
32843   cat >>confdefs.h <<_ACEOF
32844 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
32845 _ACEOF
32846
32847                      eval ac_cv_have_decl_$gl_func=yes
32848 fi
32849       done
32850
32851
32852
32853
32854
32855
32856
32857
32858
32859
32860
32861
32862   if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
32863
32864
32865
32866      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
32867 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
32868 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
32869   $as_echo_n "(cached) " >&6
32870 else
32871
32872                   case "$host_os" in
32873                      # Guess no on AIX and OSF/1.
32874         aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
32875                      # Guess yes otherwise.
32876         *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
32877       esac
32878       if test $LOCALE_JA != none; then
32879         if test "$cross_compiling" = yes; then :
32880   :
32881 else
32882   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32883 /* end confdefs.h.  */
32884
32885 #include <locale.h>
32886 #include <string.h>
32887 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
32888    <wchar.h>.
32889    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
32890    included before <wchar.h>.  */
32891 #include <stddef.h>
32892 #include <stdio.h>
32893 #include <time.h>
32894 #include <wchar.h>
32895 int main ()
32896 {
32897   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
32898     {
32899       const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
32900       mbstate_t state;
32901       wchar_t wc;
32902
32903       memset (&state, '\0', sizeof (mbstate_t));
32904       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
32905         if (mbsinit (&state))
32906           return 1;
32907     }
32908   return 0;
32909 }
32910 _ACEOF
32911 if ac_fn_c_try_run "$LINENO"; then :
32912   gl_cv_func_mbrtowc_incomplete_state=yes
32913 else
32914   gl_cv_func_mbrtowc_incomplete_state=no
32915 fi
32916 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32917   conftest.$ac_objext conftest.beam conftest.$ac_ext
32918 fi
32919
32920       fi
32921
32922 fi
32923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
32924 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
32925
32926
32927
32928
32929      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
32930 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
32931 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
32932   $as_echo_n "(cached) " >&6
32933 else
32934
32935                   case "$host_os" in
32936                     # Guess no on Solaris 8.
32937         solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
32938                     # Guess yes otherwise.
32939         *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
32940       esac
32941       if test $LOCALE_ZH_CN != none; then
32942         if test "$cross_compiling" = yes; then :
32943   :
32944 else
32945   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32946 /* end confdefs.h.  */
32947
32948 #include <locale.h>
32949 #include <stdlib.h>
32950 #include <string.h>
32951 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
32952    <wchar.h>.
32953    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
32954    included before <wchar.h>.  */
32955 #include <stddef.h>
32956 #include <stdio.h>
32957 #include <time.h>
32958 #include <wchar.h>
32959 int main ()
32960 {
32961   /* This fails on Solaris 8:
32962      mbrtowc returns 2, and sets wc to 0x00F0.
32963      mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
32964   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
32965     {
32966       char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
32967       mbstate_t state;
32968       wchar_t wc;
32969
32970       memset (&state, '\0', sizeof (mbstate_t));
32971       if (mbrtowc (&wc, input + 3, 6, &state) != 4
32972           && mbtowc (&wc, input + 3, 6) == 4)
32973         return 1;
32974     }
32975   return 0;
32976 }
32977 _ACEOF
32978 if ac_fn_c_try_run "$LINENO"; then :
32979   gl_cv_func_mbrtowc_sanitycheck=yes
32980 else
32981   gl_cv_func_mbrtowc_sanitycheck=no
32982 fi
32983 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32984   conftest.$ac_objext conftest.beam conftest.$ac_ext
32985 fi
32986
32987       fi
32988
32989 fi
32990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
32991 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
32992
32993     REPLACE_MBSTATE_T=0
32994     case "$gl_cv_func_mbrtowc_incomplete_state" in
32995       *yes) ;;
32996       *) REPLACE_MBSTATE_T=1 ;;
32997     esac
32998     case "$gl_cv_func_mbrtowc_sanitycheck" in
32999       *yes) ;;
33000       *) REPLACE_MBSTATE_T=1 ;;
33001     esac
33002   else
33003     REPLACE_MBSTATE_T=1
33004   fi
33005
33006
33007
33008   if test $ac_cv_func_wcrtomb = no; then
33009     HAVE_WCRTOMB=0
33010     ac_fn_c_check_decl "$LINENO" "wcrtomb" "ac_cv_have_decl_wcrtomb" "
33011 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
33012    <wchar.h>.
33013    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
33014    included before <wchar.h>.  */
33015 #include <stddef.h>
33016 #include <stdio.h>
33017 #include <time.h>
33018 #include <wchar.h>
33019
33020 "
33021 if test "x$ac_cv_have_decl_wcrtomb" = xyes; then :
33022   ac_have_decl=1
33023 else
33024   ac_have_decl=0
33025 fi
33026
33027 cat >>confdefs.h <<_ACEOF
33028 #define HAVE_DECL_WCRTOMB $ac_have_decl
33029 _ACEOF
33030
33031     if test $ac_cv_have_decl_wcrtomb = yes; then
33032                         REPLACE_WCRTOMB=1
33033     fi
33034   else
33035     if test $REPLACE_MBSTATE_T = 1; then
33036       REPLACE_WCRTOMB=1
33037     else
33038
33039
33040
33041
33042
33043              { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wcrtomb return value is correct" >&5
33044 $as_echo_n "checking whether wcrtomb return value is correct... " >&6; }
33045 if ${gl_cv_func_wcrtomb_retval+:} false; then :
33046   $as_echo_n "(cached) " >&6
33047 else
33048
33049                               case "$host_os" in
33050                                      # Guess no on AIX 4, OSF/1 and Solaris.
33051             aix4* | osf* | solaris*) gl_cv_func_wcrtomb_retval="guessing no" ;;
33052                                      # Guess yes otherwise.
33053             *)                       gl_cv_func_wcrtomb_retval="guessing yes" ;;
33054           esac
33055           if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
33056             if test "$cross_compiling" = yes; then :
33057   :
33058 else
33059   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33060 /* end confdefs.h.  */
33061
33062 #include <locale.h>
33063 #include <string.h>
33064 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
33065    <wchar.h>.
33066    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
33067    included before <wchar.h>.  */
33068 #include <stddef.h>
33069 #include <stdio.h>
33070 #include <time.h>
33071 #include <wchar.h>
33072 int main ()
33073 {
33074   int result = 0;
33075   if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
33076     {
33077       if (wcrtomb (NULL, 0, NULL) != 1)
33078         result |= 1;
33079     }
33080   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
33081     {
33082       if (wcrtomb (NULL, 0, NULL) != 1)
33083         result |= 2;
33084     }
33085   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
33086     {
33087       if (wcrtomb (NULL, 0, NULL) != 1)
33088         result |= 4;
33089     }
33090   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
33091     {
33092       if (wcrtomb (NULL, 0, NULL) != 1)
33093         result |= 8;
33094     }
33095   return result;
33096 }
33097 _ACEOF
33098 if ac_fn_c_try_run "$LINENO"; then :
33099   gl_cv_func_wcrtomb_retval=yes
33100 else
33101   gl_cv_func_wcrtomb_retval=no
33102 fi
33103 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33104   conftest.$ac_objext conftest.beam conftest.$ac_ext
33105 fi
33106
33107           fi
33108
33109 fi
33110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcrtomb_retval" >&5
33111 $as_echo "$gl_cv_func_wcrtomb_retval" >&6; }
33112       case "$gl_cv_func_wcrtomb_retval" in
33113         *yes) ;;
33114         *) REPLACE_WCRTOMB=1 ;;
33115       esac
33116     fi
33117   fi
33118
33119   if test $HAVE_WCRTOMB = 0 || test $REPLACE_WCRTOMB = 1; then
33120
33121
33122
33123
33124
33125
33126
33127
33128   gl_LIBOBJS="$gl_LIBOBJS wcrtomb.$ac_objext"
33129
33130
33131   :
33132
33133   fi
33134
33135
33136
33137
33138
33139           GNULIB_WCRTOMB=1
33140
33141
33142
33143
33144
33145 $as_echo "#define GNULIB_TEST_WCRTOMB 1" >>confdefs.h
33146
33147
33148
33149
33150
33151
33152
33153
33154   if test $ac_cv_func_iswcntrl = yes; then
33155     HAVE_ISWCNTRL=1
33156   else
33157     HAVE_ISWCNTRL=0
33158   fi
33159
33160
33161
33162   if test $gt_cv_c_wint_t = yes; then
33163     HAVE_WINT_T=1
33164   else
33165     HAVE_WINT_T=0
33166   fi
33167
33168
33169
33170
33171
33172
33173
33174
33175
33176
33177
33178      if test $gl_cv_have_include_next = yes; then
33179        gl_cv_next_wctype_h='<'wctype.h'>'
33180      else
33181        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
33182 $as_echo_n "checking absolute name of <wctype.h>... " >&6; }
33183 if ${gl_cv_next_wctype_h+:} false; then :
33184   $as_echo_n "(cached) " >&6
33185 else
33186
33187              if test $ac_cv_header_wctype_h = yes; then
33188
33189
33190
33191
33192   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33193 /* end confdefs.h.  */
33194 #include <wctype.h>
33195 _ACEOF
33196                 case "$host_os" in
33197     aix*) gl_absname_cpp="$ac_cpp -C" ;;
33198     *)    gl_absname_cpp="$ac_cpp" ;;
33199   esac
33200
33201   case "$host_os" in
33202     mingw*)
33203                                           gl_dirsep_regex='[/\\]'
33204       ;;
33205     *)
33206       gl_dirsep_regex='\/'
33207       ;;
33208   esac
33209       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
33210   gl_header_literal_regex=`echo 'wctype.h' \
33211                            | sed -e "$gl_make_literal_regex_sed"`
33212   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
33213       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
33214       s|^/[^/]|//&|
33215       p
33216       q
33217     }'
33218
33219         gl_cv_absolute_wctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
33220   sed -n "$gl_absolute_header_sed"`
33221
33222            gl_header=$gl_cv_absolute_wctype_h
33223            gl_cv_next_wctype_h='"'$gl_header'"'
33224           else
33225                gl_cv_next_wctype_h='<'wctype.h'>'
33226              fi
33227
33228
33229 fi
33230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
33231 $as_echo "$gl_cv_next_wctype_h" >&6; }
33232      fi
33233      NEXT_WCTYPE_H=$gl_cv_next_wctype_h
33234
33235      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
33236        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
33237        gl_next_as_first_directive='<'wctype.h'>'
33238      else
33239        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
33240        gl_next_as_first_directive=$gl_cv_next_wctype_h
33241      fi
33242      NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
33243
33244
33245
33246
33247   if test $ac_cv_header_wctype_h = yes; then
33248     if test $ac_cv_func_iswcntrl = yes; then
33249                   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
33250 $as_echo_n "checking whether iswcntrl works... " >&6; }
33251 if ${gl_cv_func_iswcntrl_works+:} false; then :
33252   $as_echo_n "(cached) " >&6
33253 else
33254
33255           if test "$cross_compiling" = yes; then :
33256   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33257 /* end confdefs.h.  */
33258 #include <stdlib.h>
33259                           #if __GNU_LIBRARY__ == 1
33260                           Linux libc5 i18n is broken.
33261                           #endif
33262 int
33263 main ()
33264 {
33265
33266   ;
33267   return 0;
33268 }
33269 _ACEOF
33270 if ac_fn_c_try_compile "$LINENO"; then :
33271   gl_cv_func_iswcntrl_works="guessing yes"
33272 else
33273   gl_cv_func_iswcntrl_works="guessing no"
33274 fi
33275 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33276
33277 else
33278   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33279 /* end confdefs.h.  */
33280
33281                /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
33282                   included before <wchar.h>.
33283                   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
33284                   must be included before <wchar.h>.  */
33285                #include <stddef.h>
33286                #include <stdio.h>
33287                #include <time.h>
33288                #include <wchar.h>
33289                #include <wctype.h>
33290                int main () { return iswprint ('x') == 0; }
33291
33292 _ACEOF
33293 if ac_fn_c_try_run "$LINENO"; then :
33294   gl_cv_func_iswcntrl_works=yes
33295 else
33296   gl_cv_func_iswcntrl_works=no
33297 fi
33298 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33299   conftest.$ac_objext conftest.beam conftest.$ac_ext
33300 fi
33301
33302
33303 fi
33304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
33305 $as_echo "$gl_cv_func_iswcntrl_works" >&6; }
33306     fi
33307     HAVE_WCTYPE_H=1
33308   else
33309     HAVE_WCTYPE_H=0
33310   fi
33311
33312
33313   case "$gl_cv_func_iswcntrl_works" in
33314     *yes) REPLACE_ISWCNTRL=0 ;;
33315     *)    REPLACE_ISWCNTRL=1 ;;
33316   esac
33317
33318
33319   if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
33320         :
33321   fi
33322
33323   if test $REPLACE_ISWCNTRL = 1; then
33324     REPLACE_TOWLOWER=1
33325   else
33326     for ac_func in towlower
33327 do :
33328   ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
33329 if test "x$ac_cv_func_towlower" = xyes; then :
33330   cat >>confdefs.h <<_ACEOF
33331 #define HAVE_TOWLOWER 1
33332 _ACEOF
33333
33334 fi
33335 done
33336
33337     if test $ac_cv_func_towlower = yes; then
33338       REPLACE_TOWLOWER=0
33339     else
33340       ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
33341              included before <wchar.h>.
33342              BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
33343              must be included before <wchar.h>.  */
33344           #include <stddef.h>
33345           #include <stdio.h>
33346           #include <time.h>
33347           #include <wchar.h>
33348           #if HAVE_WCTYPE_H
33349           # include <wctype.h>
33350           #endif
33351
33352 "
33353 if test "x$ac_cv_have_decl_towlower" = xyes; then :
33354   ac_have_decl=1
33355 else
33356   ac_have_decl=0
33357 fi
33358
33359 cat >>confdefs.h <<_ACEOF
33360 #define HAVE_DECL_TOWLOWER $ac_have_decl
33361 _ACEOF
33362
33363       if test $ac_cv_have_decl_towlower = yes; then
33364                                 REPLACE_TOWLOWER=1
33365       else
33366         REPLACE_TOWLOWER=0
33367       fi
33368     fi
33369   fi
33370
33371
33372   if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
33373         :
33374   fi
33375
33376           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
33377 $as_echo_n "checking for wctype_t... " >&6; }
33378 if ${gl_cv_type_wctype_t+:} false; then :
33379   $as_echo_n "(cached) " >&6
33380 else
33381   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33382 /* end confdefs.h.  */
33383 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
33384                included before <wchar.h>.
33385                BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
33386                must be included before <wchar.h>.  */
33387             #include <stddef.h>
33388             #include <stdio.h>
33389             #include <time.h>
33390             #include <wchar.h>
33391             #if HAVE_WCTYPE_H
33392             # include <wctype.h>
33393             #endif
33394             wctype_t a;
33395
33396 int
33397 main ()
33398 {
33399
33400   ;
33401   return 0;
33402 }
33403 _ACEOF
33404 if ac_fn_c_try_compile "$LINENO"; then :
33405   gl_cv_type_wctype_t=yes
33406 else
33407   gl_cv_type_wctype_t=no
33408 fi
33409 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33410
33411 fi
33412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
33413 $as_echo "$gl_cv_type_wctype_t" >&6; }
33414   if test $gl_cv_type_wctype_t = no; then
33415     HAVE_WCTYPE_T=0
33416   fi
33417
33418       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
33419 $as_echo_n "checking for wctrans_t... " >&6; }
33420 if ${gl_cv_type_wctrans_t+:} false; then :
33421   $as_echo_n "(cached) " >&6
33422 else
33423   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33424 /* end confdefs.h.  */
33425 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
33426                included before <wchar.h>.
33427                BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
33428                must be included before <wchar.h>.  */
33429             #include <stddef.h>
33430             #include <stdio.h>
33431             #include <time.h>
33432             #include <wchar.h>
33433             #include <wctype.h>
33434             wctrans_t a;
33435
33436 int
33437 main ()
33438 {
33439
33440   ;
33441   return 0;
33442 }
33443 _ACEOF
33444 if ac_fn_c_try_compile "$LINENO"; then :
33445   gl_cv_type_wctrans_t=yes
33446 else
33447   gl_cv_type_wctrans_t=no
33448 fi
33449 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33450
33451 fi
33452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
33453 $as_echo "$gl_cv_type_wctrans_t" >&6; }
33454   if test $gl_cv_type_wctrans_t = no; then
33455     HAVE_WCTRANS_T=0
33456   fi
33457
33458
33459     for gl_func in wctype iswctype wctrans towctrans     ; do
33460     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
33461     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
33462 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
33463 if eval \${$as_gl_Symbol+:} false; then :
33464   $as_echo_n "(cached) " >&6
33465 else
33466   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33467 /* end confdefs.h.  */
33468
33469 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
33470    <wchar.h>.
33471    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
33472    included before <wchar.h>.  */
33473 #if !(defined __GLIBC__ && !defined __UCLIBC__)
33474 # include <stddef.h>
33475 # include <stdio.h>
33476 # include <time.h>
33477 # include <wchar.h>
33478 #endif
33479 #include <wctype.h>
33480
33481 int
33482 main ()
33483 {
33484 #undef $gl_func
33485   (void) $gl_func;
33486   ;
33487   return 0;
33488 }
33489 _ACEOF
33490 if ac_fn_c_try_compile "$LINENO"; then :
33491   eval "$as_gl_Symbol=yes"
33492 else
33493   eval "$as_gl_Symbol=no"
33494 fi
33495 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33496 fi
33497 eval ac_res=\$$as_gl_Symbol
33498                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
33499 $as_echo "$ac_res" >&6; }
33500     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
33501   cat >>confdefs.h <<_ACEOF
33502 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
33503 _ACEOF
33504
33505                      eval ac_cv_have_decl_$gl_func=yes
33506 fi
33507       done
33508
33509
33510
33511
33512
33513
33514
33515
33516
33517
33518
33519
33520
33521   ac_fn_c_check_decl "$LINENO" "wcwidth" "ac_cv_have_decl_wcwidth" "
33522 /* AIX 3.2.5 declares wcwidth in <string.h>. */
33523 #include <string.h>
33524 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
33525    <wchar.h>.
33526    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
33527    before <wchar.h>.  */
33528 #include <stddef.h>
33529 #include <stdio.h>
33530 #include <time.h>
33531 #include <wchar.h>
33532
33533 "
33534 if test "x$ac_cv_have_decl_wcwidth" = xyes; then :
33535   ac_have_decl=1
33536 else
33537   ac_have_decl=0
33538 fi
33539
33540 cat >>confdefs.h <<_ACEOF
33541 #define HAVE_DECL_WCWIDTH $ac_have_decl
33542 _ACEOF
33543
33544   if test $ac_cv_have_decl_wcwidth != yes; then
33545     HAVE_DECL_WCWIDTH=0
33546   fi
33547
33548   if test $ac_cv_func_wcwidth = yes; then
33549     HAVE_WCWIDTH=1
33550                     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wcwidth works reasonably in UTF-8 locales" >&5
33551 $as_echo_n "checking whether wcwidth works reasonably in UTF-8 locales... " >&6; }
33552 if ${gl_cv_func_wcwidth_works+:} false; then :
33553   $as_echo_n "(cached) " >&6
33554 else
33555
33556         if test "$cross_compiling" = yes; then :
33557
33558            case "$host_os" in
33559                      # Guess yes on glibc and AIX 7 systems.
33560              *-gnu* | aix[7-9]*) gl_cv_func_wcwidth_works="guessing yes";;
33561              *)                  gl_cv_func_wcwidth_works="guessing no";;
33562            esac
33563
33564 else
33565   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33566 /* end confdefs.h.  */
33567
33568 #include <locale.h>
33569 /* AIX 3.2.5 declares wcwidth in <string.h>. */
33570 #include <string.h>
33571 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
33572    <wchar.h>.
33573    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
33574    before <wchar.h>.  */
33575 #include <stddef.h>
33576 #include <stdio.h>
33577 #include <time.h>
33578 #include <wchar.h>
33579 #if !HAVE_DECL_WCWIDTH
33580 extern
33581 # ifdef __cplusplus
33582 "C"
33583 # endif
33584 int wcwidth (int);
33585 #endif
33586 int main ()
33587 {
33588   int result = 0;
33589   if (setlocale (LC_ALL, "fr_FR.UTF-8") != NULL)
33590     {
33591       if (wcwidth (0x0301) > 0)
33592         result |= 1;
33593       if (wcwidth (0x05B0) > 0)
33594         result |= 2;
33595       if (wcwidth (0x200B) > 0)
33596         result |= 4;
33597     }
33598   return result;
33599 }
33600 _ACEOF
33601 if ac_fn_c_try_run "$LINENO"; then :
33602   gl_cv_func_wcwidth_works=yes
33603 else
33604   gl_cv_func_wcwidth_works=no
33605 fi
33606 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33607   conftest.$ac_objext conftest.beam conftest.$ac_ext
33608 fi
33609
33610
33611 fi
33612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcwidth_works" >&5
33613 $as_echo "$gl_cv_func_wcwidth_works" >&6; }
33614     case "$gl_cv_func_wcwidth_works" in
33615       *yes) ;;
33616       *no) REPLACE_WCWIDTH=1 ;;
33617     esac
33618   else
33619     HAVE_WCWIDTH=0
33620   fi
33621
33622   if test $HAVE_WCWIDTH = 0 || test $REPLACE_WCWIDTH = 1; then
33623
33624
33625
33626
33627
33628
33629
33630
33631   gl_LIBOBJS="$gl_LIBOBJS wcwidth.$ac_objext"
33632
33633   fi
33634
33635
33636
33637
33638
33639           GNULIB_WCWIDTH=1
33640
33641
33642
33643
33644
33645 $as_echo "#define GNULIB_TEST_WCWIDTH 1" >>confdefs.h
33646
33647
33648
33649
33650
33651
33652   if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
33653     REPLACE_WRITE=1
33654   fi
33655
33656
33657
33658   if test $REPLACE_WRITE = 1; then
33659
33660
33661
33662
33663
33664
33665
33666
33667   gl_LIBOBJS="$gl_LIBOBJS write.$ac_objext"
33668
33669     :
33670   fi
33671
33672
33673
33674
33675
33676           GNULIB_WRITE=1
33677
33678
33679
33680
33681
33682 $as_echo "#define GNULIB_TEST_WRITE 1" >>confdefs.h
33683
33684
33685
33686   :
33687
33688   :
33689
33690
33691
33692   for ac_header in stdint.h
33693 do :
33694   ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
33695 if test "x$ac_cv_header_stdint_h" = xyes; then :
33696   cat >>confdefs.h <<_ACEOF
33697 #define HAVE_STDINT_H 1
33698 _ACEOF
33699
33700 fi
33701
33702 done
33703
33704
33705
33706
33707   :
33708
33709
33710
33711   :
33712
33713   :
33714
33715
33716   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=xasprintf:1:c-format"
33717
33718   # End of code from modules
33719
33720
33721
33722
33723
33724
33725
33726
33727
33728   gltests_libdeps=
33729   gltests_ltlibdeps=
33730
33731
33732
33733
33734
33735
33736
33737
33738
33739   gl_source_base='tests'
33740   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
33741
33742   gl_module_indicator_condition=$gltests_WITNESS
33743
33744
33745
33746
33747
33748
33749
33750
33751
33752   LIBGNU_LIBDEPS="$gl_libdeps"
33753
33754   LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
33755
33756
33757 # paxutils modules
33758
33759
33760
33761
33762
33763
33764
33765
33766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
33767 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
33768 if ${ac_cv_header_time+:} false; then :
33769   $as_echo_n "(cached) " >&6
33770 else
33771   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33772 /* end confdefs.h.  */
33773 #include <sys/types.h>
33774 #include <sys/time.h>
33775 #include <time.h>
33776
33777 int
33778 main ()
33779 {
33780 if ((struct tm *) 0)
33781 return 0;
33782   ;
33783   return 0;
33784 }
33785 _ACEOF
33786 if ac_fn_c_try_compile "$LINENO"; then :
33787   ac_cv_header_time=yes
33788 else
33789   ac_cv_header_time=no
33790 fi
33791 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33792 fi
33793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
33794 $as_echo "$ac_cv_header_time" >&6; }
33795 if test $ac_cv_header_time = yes; then
33796
33797 $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
33798
33799 fi
33800
33801 ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
33802 if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
33803
33804 cat >>confdefs.h <<_ACEOF
33805 #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
33806 _ACEOF
33807
33808
33809 $as_echo "#define HAVE_ST_BLKSIZE 1" >>confdefs.h
33810
33811 fi
33812
33813
33814
33815
33816
33817
33818   # Set LIB_SETSOCKOPT to -lnsl -lsocket if necessary.
33819   pu_save_LIBS=$LIBS
33820   LIB_SETSOCKOPT=
33821   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5
33822 $as_echo_n "checking for library containing setsockopt... " >&6; }
33823 if ${ac_cv_search_setsockopt+:} false; then :
33824   $as_echo_n "(cached) " >&6
33825 else
33826   ac_func_search_save_LIBS=$LIBS
33827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33828 /* end confdefs.h.  */
33829
33830 /* Override any GCC internal prototype to avoid an error.
33831    Use char because int might match the return type of a GCC
33832    builtin and then its argument prototype would still apply.  */
33833 #ifdef __cplusplus
33834 extern "C"
33835 #endif
33836 char setsockopt ();
33837 int
33838 main ()
33839 {
33840 return setsockopt ();
33841   ;
33842   return 0;
33843 }
33844 _ACEOF
33845 for ac_lib in '' socket; do
33846   if test -z "$ac_lib"; then
33847     ac_res="none required"
33848   else
33849     ac_res=-l$ac_lib
33850     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
33851   fi
33852   if ac_fn_c_try_link "$LINENO"; then :
33853   ac_cv_search_setsockopt=$ac_res
33854 fi
33855 rm -f core conftest.err conftest.$ac_objext \
33856     conftest$ac_exeext
33857   if ${ac_cv_search_setsockopt+:} false; then :
33858   break
33859 fi
33860 done
33861 if ${ac_cv_search_setsockopt+:} false; then :
33862
33863 else
33864   ac_cv_search_setsockopt=no
33865 fi
33866 rm conftest.$ac_ext
33867 LIBS=$ac_func_search_save_LIBS
33868 fi
33869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setsockopt" >&5
33870 $as_echo "$ac_cv_search_setsockopt" >&6; }
33871 ac_res=$ac_cv_search_setsockopt
33872 if test "$ac_res" != no; then :
33873   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
33874
33875 else
33876   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5
33877 $as_echo_n "checking for library containing setsockopt... " >&6; }
33878 if ${ac_cv_search_setsockopt+:} false; then :
33879   $as_echo_n "(cached) " >&6
33880 else
33881   ac_func_search_save_LIBS=$LIBS
33882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33883 /* end confdefs.h.  */
33884
33885 /* Override any GCC internal prototype to avoid an error.
33886    Use char because int might match the return type of a GCC
33887    builtin and then its argument prototype would still apply.  */
33888 #ifdef __cplusplus
33889 extern "C"
33890 #endif
33891 char setsockopt ();
33892 int
33893 main ()
33894 {
33895 return setsockopt ();
33896   ;
33897   return 0;
33898 }
33899 _ACEOF
33900 for ac_lib in '' socket; do
33901   if test -z "$ac_lib"; then
33902     ac_res="none required"
33903   else
33904     ac_res=-l$ac_lib
33905     LIBS="-l$ac_lib -lnsl $ac_func_search_save_LIBS"
33906   fi
33907   if ac_fn_c_try_link "$LINENO"; then :
33908   ac_cv_search_setsockopt=$ac_res
33909 fi
33910 rm -f core conftest.err conftest.$ac_objext \
33911     conftest$ac_exeext
33912   if ${ac_cv_search_setsockopt+:} false; then :
33913   break
33914 fi
33915 done
33916 if ${ac_cv_search_setsockopt+:} false; then :
33917
33918 else
33919   ac_cv_search_setsockopt=no
33920 fi
33921 rm conftest.$ac_ext
33922 LIBS=$ac_func_search_save_LIBS
33923 fi
33924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setsockopt" >&5
33925 $as_echo "$ac_cv_search_setsockopt" >&6; }
33926 ac_res=$ac_cv_search_setsockopt
33927 if test "$ac_res" != no; then :
33928   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
33929
33930 fi
33931
33932 fi
33933
33934   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5
33935 $as_echo_n "checking for library containing setsockopt... " >&6; }
33936 if ${ac_cv_search_setsockopt+:} false; then :
33937   $as_echo_n "(cached) " >&6
33938 else
33939   ac_func_search_save_LIBS=$LIBS
33940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33941 /* end confdefs.h.  */
33942
33943 /* Override any GCC internal prototype to avoid an error.
33944    Use char because int might match the return type of a GCC
33945    builtin and then its argument prototype would still apply.  */
33946 #ifdef __cplusplus
33947 extern "C"
33948 #endif
33949 char setsockopt ();
33950 int
33951 main ()
33952 {
33953 return setsockopt ();
33954   ;
33955   return 0;
33956 }
33957 _ACEOF
33958 for ac_lib in '' nsl; do
33959   if test -z "$ac_lib"; then
33960     ac_res="none required"
33961   else
33962     ac_res=-l$ac_lib
33963     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
33964   fi
33965   if ac_fn_c_try_link "$LINENO"; then :
33966   ac_cv_search_setsockopt=$ac_res
33967 fi
33968 rm -f core conftest.err conftest.$ac_objext \
33969     conftest$ac_exeext
33970   if ${ac_cv_search_setsockopt+:} false; then :
33971   break
33972 fi
33973 done
33974 if ${ac_cv_search_setsockopt+:} false; then :
33975
33976 else
33977   ac_cv_search_setsockopt=no
33978 fi
33979 rm conftest.$ac_ext
33980 LIBS=$ac_func_search_save_LIBS
33981 fi
33982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setsockopt" >&5
33983 $as_echo "$ac_cv_search_setsockopt" >&6; }
33984 ac_res=$ac_cv_search_setsockopt
33985 if test "$ac_res" != no; then :
33986   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
33987
33988 fi
33989
33990
33991   case "$ac_cv_search_setsockopt" in
33992     -l*) LIB_SETSOCKOPT=$ac_cv_search_setsockopt
33993   esac
33994
33995   LIBS=$pu_save_LIBS
33996
33997   enable_rmt() {
33998     if test $ac_cv_header_sys_mtio_h = yes; then
33999       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remote tape header files" >&5
34000 $as_echo_n "checking for remote tape header files... " >&6; }
34001 if ${pu_cv_header_rmt+:} false; then :
34002   $as_echo_n "(cached) " >&6
34003 else
34004   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34005 /* end confdefs.h.  */
34006
34007 #if HAVE_SGTTY_H
34008 # include <sgtty.h>
34009 #endif
34010 #include <sys/socket.h>
34011 _ACEOF
34012 if ac_fn_c_try_cpp "$LINENO"; then :
34013   pu_cv_header_rmt=yes
34014 else
34015   pu_cv_header_rmt=no
34016 fi
34017 rm -f conftest.err conftest.i conftest.$ac_ext
34018 fi
34019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pu_cv_header_rmt" >&5
34020 $as_echo "$pu_cv_header_rmt" >&6; }
34021       test $pu_cv_header_rmt = yes && PU_RMT_PROG='rmt$(EXEEXT)'
34022
34023     fi
34024   }
34025
34026   for ac_header in sys/mtio.h
34027 do :
34028   ac_fn_c_check_header_mongrel "$LINENO" "sys/mtio.h" "ac_cv_header_sys_mtio_h" "$ac_includes_default"
34029 if test "x$ac_cv_header_sys_mtio_h" = xyes; then :
34030   cat >>confdefs.h <<_ACEOF
34031 #define HAVE_SYS_MTIO_H 1
34032 _ACEOF
34033
34034 fi
34035
34036 done
34037
34038   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which ioctl field to test for reversed bytes" >&5
34039 $as_echo_n "checking which ioctl field to test for reversed bytes... " >&6; }
34040 if ${pu_cv_header_mtio_check_field+:} false; then :
34041   $as_echo_n "(cached) " >&6
34042 else
34043   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34044 /* end confdefs.h.  */
34045 #include <sys/mtio.h>
34046
34047 _ACEOF
34048 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
34049   $EGREP "mt_model" >/dev/null 2>&1; then :
34050   pu_cv_header_mtio_check_field=mt_model
34051 else
34052   pu_cv_header_mtio_check_field=mt_type
34053 fi
34054 rm -f conftest*
34055
34056 fi
34057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pu_cv_header_mtio_check_field" >&5
34058 $as_echo "$pu_cv_header_mtio_check_field" >&6; }
34059
34060 cat >>confdefs.h <<_ACEOF
34061 #define MTIO_CHECK_FIELD $pu_cv_header_mtio_check_field
34062 _ACEOF
34063
34064
34065
34066
34067   if test "x$DEFAULT_RMT_DIR" != x; then
34068         DEFAULT_RMT_COMMAND=$DEFAULT_RMT_DIR/rmt
34069   else
34070         DEFAULT_RMT_DIR='$(libexecdir)'
34071   fi
34072
34073   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build rmt" >&5
34074 $as_echo_n "checking whether to build rmt... " >&6; }
34075
34076 # Check whether --with-rmt was given.
34077 if test "${with_rmt+set}" = set; then :
34078   withval=$with_rmt; case $withval in
34079                yes|no) as_fn_error $? "Invalid argument to --with-rmt" "$LINENO" 5;;
34080                /*)     DEFAULT_RMT_COMMAND=$withval
34081                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, use $withval instead" >&5
34082 $as_echo "no, use $withval instead" >&6; };;
34083                *)      as_fn_error $? "Argument to --with-rmt must be an absolute file name" "$LINENO" 5;;
34084                esac
34085 else
34086   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34087 $as_echo "yes" >&6; }
34088                 enable_rmt
34089                 if test "$PU_RMT_PROG" = ""; then
34090                   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: not building rmt, required header files are missing" >&5
34091 $as_echo "$as_me: WARNING: not building rmt, required header files are missing" >&2;}
34092                 fi
34093 fi
34094
34095
34096
34097   if test "x$DEFAULT_RMT_COMMAND" != x; then
34098
34099 cat >>confdefs.h <<_ACEOF
34100 #define DEFAULT_RMT_COMMAND "$DEFAULT_RMT_COMMAND"
34101 _ACEOF
34102
34103   fi
34104    if test "$pu_cv_header_rmt" = yes; then
34105   PU_RMT_COND_TRUE=
34106   PU_RMT_COND_FALSE='#'
34107 else
34108   PU_RMT_COND_TRUE='#'
34109   PU_RMT_COND_FALSE=
34110 fi
34111
34112
34113
34114
34115
34116
34117
34118
34119
34120
34121   for ac_header in sys/buf.h
34122 do :
34123   ac_fn_c_check_header_compile "$LINENO" "sys/buf.h" "ac_cv_header_sys_buf_h" "#if HAVE_SYS_PARAM_H
34124 #include <sys/param.h>
34125 #endif
34126 "
34127 if test "x$ac_cv_header_sys_buf_h" = xyes; then :
34128   cat >>confdefs.h <<_ACEOF
34129 #define HAVE_SYS_BUF_H 1
34130 _ACEOF
34131
34132 fi
34133
34134 done
34135
34136
34137
34138
34139   ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
34140 if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
34141
34142 cat >>confdefs.h <<_ACEOF
34143 #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
34144 _ACEOF
34145
34146
34147 fi
34148
34149
34150
34151
34152
34153
34154
34155   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
34156 $as_echo_n "checking for library containing gethostbyname... " >&6; }
34157 if ${ac_cv_search_gethostbyname+:} false; then :
34158   $as_echo_n "(cached) " >&6
34159 else
34160   ac_func_search_save_LIBS=$LIBS
34161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34162 /* end confdefs.h.  */
34163
34164 /* Override any GCC internal prototype to avoid an error.
34165    Use char because int might match the return type of a GCC
34166    builtin and then its argument prototype would still apply.  */
34167 #ifdef __cplusplus
34168 extern "C"
34169 #endif
34170 char gethostbyname ();
34171 int
34172 main ()
34173 {
34174 return gethostbyname ();
34175   ;
34176   return 0;
34177 }
34178 _ACEOF
34179 for ac_lib in '' nsl; do
34180   if test -z "$ac_lib"; then
34181     ac_res="none required"
34182   else
34183     ac_res=-l$ac_lib
34184     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
34185   fi
34186   if ac_fn_c_try_link "$LINENO"; then :
34187   ac_cv_search_gethostbyname=$ac_res
34188 fi
34189 rm -f core conftest.err conftest.$ac_objext \
34190     conftest$ac_exeext
34191   if ${ac_cv_search_gethostbyname+:} false; then :
34192   break
34193 fi
34194 done
34195 if ${ac_cv_search_gethostbyname+:} false; then :
34196
34197 else
34198   ac_cv_search_gethostbyname=no
34199 fi
34200 rm conftest.$ac_ext
34201 LIBS=$ac_func_search_save_LIBS
34202 fi
34203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
34204 $as_echo "$ac_cv_search_gethostbyname" >&6; }
34205 ac_res=$ac_cv_search_gethostbyname
34206 if test "$ac_res" != no; then :
34207   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
34208
34209 fi
34210
34211
34212
34213
34214 # gl_GCC_VERSION_IFELSE([major], [minor], [run-if-found], [run-if-not-found])
34215 # ------------------------------------------------
34216 # If $CPP is gcc-MAJOR.MINOR or newer, then run RUN-IF-FOUND.
34217 # Otherwise, run RUN-IF-NOT-FOUND.
34218
34219
34220 # Check whether --enable-gcc-warnings was given.
34221 if test "${enable_gcc_warnings+set}" = set; then :
34222   enableval=$enable_gcc_warnings; case $enableval in
34223      yes|no) ;;
34224      *)      as_fn_error $? "bad value $enableval for gcc-warnings option" "$LINENO" 5 ;;
34225    esac
34226    gl_gcc_warnings=$enableval
34227 else
34228   gl_gcc_warnings=no
34229    if test -d "$srcdir"/.git; then
34230      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34231 /* end confdefs.h.  */
34232
34233 #if (4) < __GNUC__ || ((4) == __GNUC__ && (6) <= __GNUC_MINOR__)
34234 /* ok */
34235 #else
34236 # error "your version of gcc is older than 4.6"
34237 #endif
34238
34239 int
34240 main ()
34241 {
34242
34243   ;
34244   return 0;
34245 },
34246
34247 _ACEOF
34248 if ac_fn_c_try_cpp "$LINENO"; then :
34249   gl_gcc_warnings=yes
34250 fi
34251 rm -f conftest.err conftest.i conftest.$ac_ext
34252
34253
34254    fi
34255
34256 fi
34257
34258
34259 if test "$gl_gcc_warnings" = yes; then
34260   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror -Wunknown-warning-option" >&5
34261 $as_echo_n "checking whether C compiler handles -Werror -Wunknown-warning-option... " >&6; }
34262 if ${gl_cv_warn_c__Werror__Wunknown_warning_option+:} false; then :
34263   $as_echo_n "(cached) " >&6
34264 else
34265
34266   gl_save_compiler_FLAGS="$CFLAGS"
34267   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror -Wunknown-warning-option"
34268   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34269 /* end confdefs.h.  */
34270
34271 int
34272 main ()
34273 {
34274
34275   ;
34276   return 0;
34277 }
34278 _ACEOF
34279 if ac_fn_c_try_link "$LINENO"; then :
34280   gl_cv_warn_c__Werror__Wunknown_warning_option=yes
34281 else
34282   gl_cv_warn_c__Werror__Wunknown_warning_option=no
34283 fi
34284 rm -f core conftest.err conftest.$ac_objext \
34285     conftest$ac_exeext conftest.$ac_ext
34286   CFLAGS="$gl_save_compiler_FLAGS"
34287
34288 fi
34289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror__Wunknown_warning_option" >&5
34290 $as_echo "$gl_cv_warn_c__Werror__Wunknown_warning_option" >&6; }
34291 if test "x$gl_cv_warn_c__Werror__Wunknown_warning_option" = xyes; then :
34292   gl_unknown_warnings_are_errors='-Wunknown-warning-option -Werror'
34293 else
34294   gl_unknown_warnings_are_errors=
34295 fi
34296
34297
34298 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror" >&5
34299 $as_echo_n "checking whether C compiler handles -Werror... " >&6; }
34300 if ${gl_cv_warn_c__Werror+:} false; then :
34301   $as_echo_n "(cached) " >&6
34302 else
34303
34304   gl_save_compiler_FLAGS="$CFLAGS"
34305   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror"
34306   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34307 /* end confdefs.h.  */
34308
34309 int
34310 main ()
34311 {
34312
34313   ;
34314   return 0;
34315 }
34316 _ACEOF
34317 if ac_fn_c_try_link "$LINENO"; then :
34318   gl_cv_warn_c__Werror=yes
34319 else
34320   gl_cv_warn_c__Werror=no
34321 fi
34322 rm -f core conftest.err conftest.$ac_objext \
34323     conftest$ac_exeext conftest.$ac_ext
34324   CFLAGS="$gl_save_compiler_FLAGS"
34325
34326 fi
34327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror" >&5
34328 $as_echo "$gl_cv_warn_c__Werror" >&6; }
34329 if test "x$gl_cv_warn_c__Werror" = xyes; then :
34330   as_fn_append WERROR_CFLAGS " -Werror"
34331 fi
34332
34333
34334
34335
34336   nw=
34337   # This, $nw, is the list of warnings we disable.
34338   nw="$nw -Wformat-nonliteral"      # warnings in Fedora 17 stdio.h
34339   nw="$nw -Wvla"                    # warnings in gettext.h
34340   nw="$nw -Wswitch-default"         # Too many warnings for now
34341   nw="$nw -Wunsafe-loop-optimizations" # It's OK to omit unsafe optimizations.
34342   nw="$nw -Winline"                 # It's OK to not inline.
34343   nw="$nw -Wstrict-overflow"        # It's OK to optimize strictly.
34344   nw="$nw -Wsuggest-attribute=pure" # Too many warnings for now.
34345
34346
34347
34348   if test -n "$GCC"; then
34349
34350             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is supported" >&5
34351 $as_echo_n "checking whether -Wno-missing-field-initializers is supported... " >&6; }
34352     if ${gl_cv_cc_nomfi_supported+:} false; then :
34353   $as_echo_n "(cached) " >&6
34354 else
34355
34356       gl_save_CFLAGS="$CFLAGS"
34357       CFLAGS="$CFLAGS -W -Werror -Wno-missing-field-initializers"
34358       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34359 /* end confdefs.h.  */
34360
34361 int
34362 main ()
34363 {
34364
34365   ;
34366   return 0;
34367 }
34368 _ACEOF
34369 if ac_fn_c_try_compile "$LINENO"; then :
34370   gl_cv_cc_nomfi_supported=yes
34371 else
34372   gl_cv_cc_nomfi_supported=no
34373 fi
34374 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34375       CFLAGS="$gl_save_CFLAGS"
34376 fi
34377
34378     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_supported" >&5
34379 $as_echo "$gl_cv_cc_nomfi_supported" >&6; }
34380
34381     if test "$gl_cv_cc_nomfi_supported" = yes; then
34382                   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is needed" >&5
34383 $as_echo_n "checking whether -Wno-missing-field-initializers is needed... " >&6; }
34384       if ${gl_cv_cc_nomfi_needed+:} false; then :
34385   $as_echo_n "(cached) " >&6
34386 else
34387
34388         gl_save_CFLAGS="$CFLAGS"
34389         CFLAGS="$CFLAGS -W -Werror"
34390         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34391 /* end confdefs.h.  */
34392 void f (void)
34393                {
34394                  typedef struct { int a; int b; } s_t;
34395                  s_t s1 = { 0, };
34396                }
34397
34398 int
34399 main ()
34400 {
34401
34402   ;
34403   return 0;
34404 }
34405 _ACEOF
34406 if ac_fn_c_try_compile "$LINENO"; then :
34407   gl_cv_cc_nomfi_needed=no
34408 else
34409   gl_cv_cc_nomfi_needed=yes
34410 fi
34411 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34412         CFLAGS="$gl_save_CFLAGS"
34413
34414 fi
34415
34416       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_needed" >&5
34417 $as_echo "$gl_cv_cc_nomfi_needed" >&6; }
34418     fi
34419
34420                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wuninitialized is supported" >&5
34421 $as_echo_n "checking whether -Wuninitialized is supported... " >&6; }
34422     if ${gl_cv_cc_uninitialized_supported+:} false; then :
34423   $as_echo_n "(cached) " >&6
34424 else
34425
34426       gl_save_CFLAGS="$CFLAGS"
34427       CFLAGS="$CFLAGS -Werror -Wuninitialized"
34428       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34429 /* end confdefs.h.  */
34430
34431 int
34432 main ()
34433 {
34434
34435   ;
34436   return 0;
34437 }
34438 _ACEOF
34439 if ac_fn_c_try_compile "$LINENO"; then :
34440   gl_cv_cc_uninitialized_supported=yes
34441 else
34442   gl_cv_cc_uninitialized_supported=no
34443 fi
34444 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34445       CFLAGS="$gl_save_CFLAGS"
34446 fi
34447
34448     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_uninitialized_supported" >&5
34449 $as_echo "$gl_cv_cc_uninitialized_supported" >&6; }
34450
34451   fi
34452
34453   # List all gcc warning categories.
34454   gl_manywarn_set=
34455   for gl_manywarn_item in \
34456     -W \
34457     -Wabi \
34458     -Waddress \
34459     -Waggressive-loop-optimizations \
34460     -Wall \
34461     -Warray-bounds \
34462     -Wattributes \
34463     -Wbad-function-cast \
34464     -Wbuiltin-macro-redefined \
34465     -Wcast-align \
34466     -Wchar-subscripts \
34467     -Wclobbered \
34468     -Wcomment \
34469     -Wcomments \
34470     -Wcoverage-mismatch \
34471     -Wcpp \
34472     -Wdeprecated \
34473     -Wdeprecated-declarations \
34474     -Wdisabled-optimization \
34475     -Wdiv-by-zero \
34476     -Wdouble-promotion \
34477     -Wempty-body \
34478     -Wendif-labels \
34479     -Wenum-compare \
34480     -Wextra \
34481     -Wformat-contains-nul \
34482     -Wformat-extra-args \
34483     -Wformat-nonliteral \
34484     -Wformat-security \
34485     -Wformat-y2k \
34486     -Wformat-zero-length \
34487     -Wfree-nonheap-object \
34488     -Wignored-qualifiers \
34489     -Wimplicit \
34490     -Wimplicit-function-declaration \
34491     -Wimplicit-int \
34492     -Winit-self \
34493     -Winline \
34494     -Wint-to-pointer-cast \
34495     -Winvalid-memory-model \
34496     -Winvalid-pch \
34497     -Wjump-misses-init \
34498     -Wlogical-op \
34499     -Wmain \
34500     -Wmaybe-uninitialized \
34501     -Wmissing-braces \
34502     -Wmissing-declarations \
34503     -Wmissing-field-initializers \
34504     -Wmissing-include-dirs \
34505     -Wmissing-parameter-type \
34506     -Wmissing-prototypes \
34507     -Wmultichar \
34508     -Wnarrowing \
34509     -Wnested-externs \
34510     -Wnonnull \
34511     -Wnormalized=nfc \
34512     -Wold-style-declaration \
34513     -Wold-style-definition \
34514     -Woverflow \
34515     -Woverlength-strings \
34516     -Woverride-init \
34517     -Wpacked \
34518     -Wpacked-bitfield-compat \
34519     -Wparentheses \
34520     -Wpointer-arith \
34521     -Wpointer-sign \
34522     -Wpointer-to-int-cast \
34523     -Wpragmas \
34524     -Wreturn-local-addr \
34525     -Wreturn-type \
34526     -Wsequence-point \
34527     -Wshadow \
34528     -Wsizeof-pointer-memaccess \
34529     -Wstack-protector \
34530     -Wstrict-aliasing \
34531     -Wstrict-overflow \
34532     -Wstrict-prototypes \
34533     -Wsuggest-attribute=const \
34534     -Wsuggest-attribute=format \
34535     -Wsuggest-attribute=noreturn \
34536     -Wsuggest-attribute=pure \
34537     -Wswitch \
34538     -Wswitch-default \
34539     -Wsync-nand \
34540     -Wsystem-headers \
34541     -Wtrampolines \
34542     -Wtrigraphs \
34543     -Wtype-limits \
34544     -Wuninitialized \
34545     -Wunknown-pragmas \
34546     -Wunsafe-loop-optimizations \
34547     -Wunused \
34548     -Wunused-but-set-parameter \
34549     -Wunused-but-set-variable \
34550     -Wunused-function \
34551     -Wunused-label \
34552     -Wunused-local-typedefs \
34553     -Wunused-macros \
34554     -Wunused-parameter \
34555     -Wunused-result \
34556     -Wunused-value \
34557     -Wunused-variable \
34558     -Wvarargs \
34559     -Wvariadic-macros \
34560     -Wvector-operation-performance \
34561     -Wvla \
34562     -Wvolatile-register-var \
34563     -Wwrite-strings \
34564     -fdiagnostics-show-option \
34565     -funit-at-a-time \
34566     \
34567     ; do
34568     gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
34569   done
34570
34571   # Disable specific options as needed.
34572   if test "$gl_cv_cc_nomfi_needed" = yes; then
34573     gl_manywarn_set="$gl_manywarn_set -Wno-missing-field-initializers"
34574   fi
34575
34576   if test "$gl_cv_cc_uninitialized_supported" = no; then
34577     gl_manywarn_set="$gl_manywarn_set -Wno-uninitialized"
34578   fi
34579
34580   ws=$gl_manywarn_set
34581
34582
34583   gl_warn_set=
34584   set x $ws; shift
34585   for gl_warn_item
34586   do
34587     case " $nw " in
34588       *" $gl_warn_item "*)
34589         ;;
34590       *)
34591         gl_warn_set="$gl_warn_set $gl_warn_item"
34592         ;;
34593     esac
34594   done
34595   ws=$gl_warn_set
34596
34597   for w in $ws; do
34598
34599 as_gl_Warn=`$as_echo "gl_cv_warn_c_$w" | $as_tr_sh`
34600 gl_positive="$w"
34601 case $gl_positive in
34602   -Wno-*) gl_positive=-W`expr "X$gl_positive" : 'X-Wno-\(.*\)'` ;;
34603 esac
34604 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles $w" >&5
34605 $as_echo_n "checking whether C compiler handles $w... " >&6; }
34606 if eval \${$as_gl_Warn+:} false; then :
34607   $as_echo_n "(cached) " >&6
34608 else
34609
34610   gl_save_compiler_FLAGS="$CFLAGS"
34611   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors $gl_positive"
34612   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34613 /* end confdefs.h.  */
34614
34615 int
34616 main ()
34617 {
34618
34619   ;
34620   return 0;
34621 }
34622 _ACEOF
34623 if ac_fn_c_try_link "$LINENO"; then :
34624   eval "$as_gl_Warn=yes"
34625 else
34626   eval "$as_gl_Warn=no"
34627 fi
34628 rm -f core conftest.err conftest.$ac_objext \
34629     conftest$ac_exeext conftest.$ac_ext
34630   CFLAGS="$gl_save_compiler_FLAGS"
34631
34632 fi
34633 eval ac_res=\$$as_gl_Warn
34634                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
34635 $as_echo "$ac_res" >&6; }
34636 if eval test \"x\$"$as_gl_Warn"\" = x"yes"; then :
34637   as_fn_append WARN_CFLAGS " $w"
34638 fi
34639
34640
34641   done
34642
34643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-sign-compare" >&5
34644 $as_echo_n "checking whether C compiler handles -Wno-sign-compare... " >&6; }
34645 if ${gl_cv_warn_c__Wno_sign_compare+:} false; then :
34646   $as_echo_n "(cached) " >&6
34647 else
34648
34649   gl_save_compiler_FLAGS="$CFLAGS"
34650   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wsign-compare"
34651   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34652 /* end confdefs.h.  */
34653
34654 int
34655 main ()
34656 {
34657
34658   ;
34659   return 0;
34660 }
34661 _ACEOF
34662 if ac_fn_c_try_link "$LINENO"; then :
34663   gl_cv_warn_c__Wno_sign_compare=yes
34664 else
34665   gl_cv_warn_c__Wno_sign_compare=no
34666 fi
34667 rm -f core conftest.err conftest.$ac_objext \
34668     conftest$ac_exeext conftest.$ac_ext
34669   CFLAGS="$gl_save_compiler_FLAGS"
34670
34671 fi
34672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_sign_compare" >&5
34673 $as_echo "$gl_cv_warn_c__Wno_sign_compare" >&6; }
34674 if test "x$gl_cv_warn_c__Wno_sign_compare" = xyes; then :
34675   as_fn_append WARN_CFLAGS " -Wno-sign-compare"
34676 fi
34677
34678      # Too many warnings for now
34679
34680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-type-limits" >&5
34681 $as_echo_n "checking whether C compiler handles -Wno-type-limits... " >&6; }
34682 if ${gl_cv_warn_c__Wno_type_limits+:} false; then :
34683   $as_echo_n "(cached) " >&6
34684 else
34685
34686   gl_save_compiler_FLAGS="$CFLAGS"
34687   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wtype-limits"
34688   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34689 /* end confdefs.h.  */
34690
34691 int
34692 main ()
34693 {
34694
34695   ;
34696   return 0;
34697 }
34698 _ACEOF
34699 if ac_fn_c_try_link "$LINENO"; then :
34700   gl_cv_warn_c__Wno_type_limits=yes
34701 else
34702   gl_cv_warn_c__Wno_type_limits=no
34703 fi
34704 rm -f core conftest.err conftest.$ac_objext \
34705     conftest$ac_exeext conftest.$ac_ext
34706   CFLAGS="$gl_save_compiler_FLAGS"
34707
34708 fi
34709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_type_limits" >&5
34710 $as_echo "$gl_cv_warn_c__Wno_type_limits" >&6; }
34711 if test "x$gl_cv_warn_c__Wno_type_limits" = xyes; then :
34712   as_fn_append WARN_CFLAGS " -Wno-type-limits"
34713 fi
34714
34715       # It's OK to optimize based on types.
34716
34717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-parameter" >&5
34718 $as_echo_n "checking whether C compiler handles -Wno-unused-parameter... " >&6; }
34719 if ${gl_cv_warn_c__Wno_unused_parameter+:} false; then :
34720   $as_echo_n "(cached) " >&6
34721 else
34722
34723   gl_save_compiler_FLAGS="$CFLAGS"
34724   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wunused-parameter"
34725   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34726 /* end confdefs.h.  */
34727
34728 int
34729 main ()
34730 {
34731
34732   ;
34733   return 0;
34734 }
34735 _ACEOF
34736 if ac_fn_c_try_link "$LINENO"; then :
34737   gl_cv_warn_c__Wno_unused_parameter=yes
34738 else
34739   gl_cv_warn_c__Wno_unused_parameter=no
34740 fi
34741 rm -f core conftest.err conftest.$ac_objext \
34742     conftest$ac_exeext conftest.$ac_ext
34743   CFLAGS="$gl_save_compiler_FLAGS"
34744
34745 fi
34746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_parameter" >&5
34747 $as_echo "$gl_cv_warn_c__Wno_unused_parameter" >&6; }
34748 if test "x$gl_cv_warn_c__Wno_unused_parameter" = xyes; then :
34749   as_fn_append WARN_CFLAGS " -Wno-unused-parameter"
34750 fi
34751
34752  # Too many warnings for now
34753
34754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-format-nonliteral" >&5
34755 $as_echo_n "checking whether C compiler handles -Wno-format-nonliteral... " >&6; }
34756 if ${gl_cv_warn_c__Wno_format_nonliteral+:} false; then :
34757   $as_echo_n "(cached) " >&6
34758 else
34759
34760   gl_save_compiler_FLAGS="$CFLAGS"
34761   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wformat-nonliteral"
34762   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34763 /* end confdefs.h.  */
34764
34765 int
34766 main ()
34767 {
34768
34769   ;
34770   return 0;
34771 }
34772 _ACEOF
34773 if ac_fn_c_try_link "$LINENO"; then :
34774   gl_cv_warn_c__Wno_format_nonliteral=yes
34775 else
34776   gl_cv_warn_c__Wno_format_nonliteral=no
34777 fi
34778 rm -f core conftest.err conftest.$ac_objext \
34779     conftest$ac_exeext conftest.$ac_ext
34780   CFLAGS="$gl_save_compiler_FLAGS"
34781
34782 fi
34783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_format_nonliteral" >&5
34784 $as_echo "$gl_cv_warn_c__Wno_format_nonliteral" >&6; }
34785 if test "x$gl_cv_warn_c__Wno_format_nonliteral" = xyes; then :
34786   as_fn_append WARN_CFLAGS " -Wno-format-nonliteral"
34787 fi
34788
34789
34790
34791
34792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fdiagnostics-show-option" >&5
34793 $as_echo_n "checking whether C compiler handles -fdiagnostics-show-option... " >&6; }
34794 if ${gl_cv_warn_c__fdiagnostics_show_option+:} false; then :
34795   $as_echo_n "(cached) " >&6
34796 else
34797
34798   gl_save_compiler_FLAGS="$CFLAGS"
34799   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fdiagnostics-show-option"
34800   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34801 /* end confdefs.h.  */
34802
34803 int
34804 main ()
34805 {
34806
34807   ;
34808   return 0;
34809 }
34810 _ACEOF
34811 if ac_fn_c_try_link "$LINENO"; then :
34812   gl_cv_warn_c__fdiagnostics_show_option=yes
34813 else
34814   gl_cv_warn_c__fdiagnostics_show_option=no
34815 fi
34816 rm -f core conftest.err conftest.$ac_objext \
34817     conftest$ac_exeext conftest.$ac_ext
34818   CFLAGS="$gl_save_compiler_FLAGS"
34819
34820 fi
34821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fdiagnostics_show_option" >&5
34822 $as_echo "$gl_cv_warn_c__fdiagnostics_show_option" >&6; }
34823 if test "x$gl_cv_warn_c__fdiagnostics_show_option" = xyes; then :
34824   as_fn_append WARN_CFLAGS " -fdiagnostics-show-option"
34825 fi
34826
34827
34828
34829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -funit-at-a-time" >&5
34830 $as_echo_n "checking whether C compiler handles -funit-at-a-time... " >&6; }
34831 if ${gl_cv_warn_c__funit_at_a_time+:} false; then :
34832   $as_echo_n "(cached) " >&6
34833 else
34834
34835   gl_save_compiler_FLAGS="$CFLAGS"
34836   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -funit-at-a-time"
34837   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34838 /* end confdefs.h.  */
34839
34840 int
34841 main ()
34842 {
34843
34844   ;
34845   return 0;
34846 }
34847 _ACEOF
34848 if ac_fn_c_try_link "$LINENO"; then :
34849   gl_cv_warn_c__funit_at_a_time=yes
34850 else
34851   gl_cv_warn_c__funit_at_a_time=no
34852 fi
34853 rm -f core conftest.err conftest.$ac_objext \
34854     conftest$ac_exeext conftest.$ac_ext
34855   CFLAGS="$gl_save_compiler_FLAGS"
34856
34857 fi
34858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__funit_at_a_time" >&5
34859 $as_echo "$gl_cv_warn_c__funit_at_a_time" >&6; }
34860 if test "x$gl_cv_warn_c__funit_at_a_time" = xyes; then :
34861   as_fn_append WARN_CFLAGS " -funit-at-a-time"
34862 fi
34863
34864
34865
34866
34867
34868
34869 $as_echo "#define lint 1" >>confdefs.h
34870
34871
34872
34873 $as_echo "#define GNULIB_PORTCHECK 1" >>confdefs.h
34874
34875
34876   # Use a slightly smaller set of warning options for lib/.
34877   # Remove the following and save the result in GNULIB_WARN_CFLAGS.
34878   nw=
34879   nw="$nw -Wmissing-prototypes"
34880   nw="$nw -Wunused-macros"
34881   #
34882   # These are for argp.
34883   nw="$nw -Wmissing-field-initializers"
34884   nw="$nw -Wshadow"
34885   #
34886
34887   gl_warn_set=
34888   set x $WARN_CFLAGS; shift
34889   for gl_warn_item
34890   do
34891     case " $nw " in
34892       *" $gl_warn_item "*)
34893         ;;
34894       *)
34895         gl_warn_set="$gl_warn_set $gl_warn_item"
34896         ;;
34897     esac
34898   done
34899   GNULIB_WARN_CFLAGS=$gl_warn_set
34900
34901
34902   # This is also for argp.
34903
34904 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-missing-field-initializers" >&5
34905 $as_echo_n "checking whether C compiler handles -Wno-missing-field-initializers... " >&6; }
34906 if ${gl_cv_warn_c__Wno_missing_field_initializers+:} false; then :
34907   $as_echo_n "(cached) " >&6
34908 else
34909
34910   gl_save_compiler_FLAGS="$CFLAGS"
34911   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wmissing-field-initializers"
34912   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34913 /* end confdefs.h.  */
34914
34915 int
34916 main ()
34917 {
34918
34919   ;
34920   return 0;
34921 }
34922 _ACEOF
34923 if ac_fn_c_try_link "$LINENO"; then :
34924   gl_cv_warn_c__Wno_missing_field_initializers=yes
34925 else
34926   gl_cv_warn_c__Wno_missing_field_initializers=no
34927 fi
34928 rm -f core conftest.err conftest.$ac_objext \
34929     conftest$ac_exeext conftest.$ac_ext
34930   CFLAGS="$gl_save_compiler_FLAGS"
34931
34932 fi
34933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_missing_field_initializers" >&5
34934 $as_echo "$gl_cv_warn_c__Wno_missing_field_initializers" >&6; }
34935 if test "x$gl_cv_warn_c__Wno_missing_field_initializers" = xyes; then :
34936   as_fn_append GNULIB_WARN_CFLAGS " -Wno-missing-field-initializers"
34937 fi
34938
34939
34940
34941
34942
34943   # For gnulib-tests, the set is slightly smaller still.
34944   nw=
34945   # It's not worth being this picky about test programs.
34946   nw="$nw -Wsuggest-attribute=const"
34947
34948   gl_warn_set=
34949   set x $GNULIB_WARN_CFLAGS; shift
34950   for gl_warn_item
34951   do
34952     case " $nw " in
34953       *" $gl_warn_item "*)
34954         ;;
34955       *)
34956         gl_warn_set="$gl_warn_set $gl_warn_item"
34957         ;;
34958     esac
34959   done
34960   GNULIB_TEST_WARN_CFLAGS=$gl_warn_set
34961
34962
34963 fi
34964
34965
34966
34967 # Check whether --with-xattrs was given.
34968 if test "${with_xattrs+set}" = set; then :
34969   withval=$with_xattrs;
34970 else
34971   with_xattrs=maybe
34972
34973 fi
34974
34975
34976   # First check for <sys/xattr.h>
34977   for ac_header in sys/xattr.h
34978 do :
34979   ac_fn_c_check_header_mongrel "$LINENO" "sys/xattr.h" "ac_cv_header_sys_xattr_h" "$ac_includes_default"
34980 if test "x$ac_cv_header_sys_xattr_h" = xyes; then :
34981   cat >>confdefs.h <<_ACEOF
34982 #define HAVE_SYS_XATTR_H 1
34983 _ACEOF
34984
34985 fi
34986
34987 done
34988
34989    if test "$ac_cv_header_sys_xattr_h" = yes; then
34990   TAR_COND_XATTR_H_TRUE=
34991   TAR_COND_XATTR_H_FALSE='#'
34992 else
34993   TAR_COND_XATTR_H_TRUE='#'
34994   TAR_COND_XATTR_H_FALSE=
34995 fi
34996
34997    if false; then
34998   TAR_LIB_ATTR_TRUE=
34999   TAR_LIB_ATTR_FALSE='#'
35000 else
35001   TAR_LIB_ATTR_TRUE='#'
35002   TAR_LIB_ATTR_FALSE=
35003 fi
35004
35005   if test "$ac_cv_header_sys_xattr_h" = yes; then
35006     for ac_func in getxattr  fgetxattr  lgetxattr \
35007                    setxattr  fsetxattr  lsetxattr \
35008                    listxattr flistxattr llistxattr
35009 do :
35010   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
35011 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
35012 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
35013   cat >>confdefs.h <<_ACEOF
35014 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
35015 _ACEOF
35016  # only when functions are present
35017
35018 $as_echo "#define HAVE_SYS_XATTR_H 1" >>confdefs.h
35019
35020         if test "$with_xattrs" != no; then
35021
35022 $as_echo "#define HAVE_XATTRS /**/" >>confdefs.h
35023
35024         fi
35025
35026 fi
35027 done
35028
35029   fi
35030
35031   # If <sys/xattr.h> is not found, then check for <attr/xattr.h>
35032   if test "$ac_cv_header_sys_xattr_h" != yes; then
35033     for ac_header in attr/xattr.h
35034 do :
35035   ac_fn_c_check_header_mongrel "$LINENO" "attr/xattr.h" "ac_cv_header_attr_xattr_h" "$ac_includes_default"
35036 if test "x$ac_cv_header_attr_xattr_h" = xyes; then :
35037   cat >>confdefs.h <<_ACEOF
35038 #define HAVE_ATTR_XATTR_H 1
35039 _ACEOF
35040
35041 fi
35042
35043 done
35044
35045      if test "$ac_cv_header_attr_xattr_h" = yes; then
35046   TAR_COND_XATTR_H_TRUE=
35047   TAR_COND_XATTR_H_FALSE='#'
35048 else
35049   TAR_COND_XATTR_H_TRUE='#'
35050   TAR_COND_XATTR_H_FALSE=
35051 fi
35052
35053     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgetxattr in -lattr" >&5
35054 $as_echo_n "checking for fgetxattr in -lattr... " >&6; }
35055 if ${ac_cv_lib_attr_fgetxattr+:} false; then :
35056   $as_echo_n "(cached) " >&6
35057 else
35058   ac_check_lib_save_LIBS=$LIBS
35059 LIBS="-lattr  $LIBS"
35060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35061 /* end confdefs.h.  */
35062
35063 /* Override any GCC internal prototype to avoid an error.
35064    Use char because int might match the return type of a GCC
35065    builtin and then its argument prototype would still apply.  */
35066 #ifdef __cplusplus
35067 extern "C"
35068 #endif
35069 char fgetxattr ();
35070 int
35071 main ()
35072 {
35073 return fgetxattr ();
35074   ;
35075   return 0;
35076 }
35077 _ACEOF
35078 if ac_fn_c_try_link "$LINENO"; then :
35079   ac_cv_lib_attr_fgetxattr=yes
35080 else
35081   ac_cv_lib_attr_fgetxattr=no
35082 fi
35083 rm -f core conftest.err conftest.$ac_objext \
35084     conftest$ac_exeext conftest.$ac_ext
35085 LIBS=$ac_check_lib_save_LIBS
35086 fi
35087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_attr_fgetxattr" >&5
35088 $as_echo "$ac_cv_lib_attr_fgetxattr" >&6; }
35089 if test "x$ac_cv_lib_attr_fgetxattr" = xyes; then :
35090   cat >>confdefs.h <<_ACEOF
35091 #define HAVE_LIBATTR 1
35092 _ACEOF
35093
35094   LIBS="-lattr $LIBS"
35095
35096 fi
35097
35098      if test "$ac_cv_lib_attr_fgetxattr" = yes; then
35099   TAR_LIB_ATTR_TRUE=
35100   TAR_LIB_ATTR_FALSE='#'
35101 else
35102   TAR_LIB_ATTR_TRUE='#'
35103   TAR_LIB_ATTR_FALSE=
35104 fi
35105
35106     if test "$ac_cv_header_attr_xattr_h" = yes; then
35107       for ac_func in getxattr  fgetxattr  lgetxattr \
35108                      setxattr  fsetxattr  lsetxattr \
35109                      listxattr flistxattr llistxattr
35110 do :
35111   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
35112 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
35113 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
35114   cat >>confdefs.h <<_ACEOF
35115 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
35116 _ACEOF
35117  # only when functions are present
35118
35119 $as_echo "#define HAVE_ATTR_XATTR_H 1" >>confdefs.h
35120
35121           if test "$with_xattrs" != no; then
35122
35123 $as_echo "#define HAVE_XATTRS /**/" >>confdefs.h
35124
35125           fi
35126
35127 fi
35128 done
35129
35130     fi
35131   fi
35132
35133
35134
35135
35136
35137
35138
35139  if test $ac_cv_func_grantpt = yes; then
35140   TAR_COND_GRANTPT_TRUE=
35141   TAR_COND_GRANTPT_FALSE='#'
35142 else
35143   TAR_COND_GRANTPT_TRUE='#'
35144   TAR_COND_GRANTPT_FALSE=
35145 fi
35146
35147
35148 ac_fn_c_check_decl "$LINENO" "getgrgid" "ac_cv_have_decl_getgrgid" "#include <grp.h>
35149 "
35150 if test "x$ac_cv_have_decl_getgrgid" = xyes; then :
35151   ac_have_decl=1
35152 else
35153   ac_have_decl=0
35154 fi
35155
35156 cat >>confdefs.h <<_ACEOF
35157 #define HAVE_DECL_GETGRGID $ac_have_decl
35158 _ACEOF
35159
35160 ac_fn_c_check_decl "$LINENO" "getpwuid" "ac_cv_have_decl_getpwuid" "#include <pwd.h>
35161 "
35162 if test "x$ac_cv_have_decl_getpwuid" = xyes; then :
35163   ac_have_decl=1
35164 else
35165   ac_have_decl=0
35166 fi
35167
35168 cat >>confdefs.h <<_ACEOF
35169 #define HAVE_DECL_GETPWUID $ac_have_decl
35170 _ACEOF
35171
35172 ac_fn_c_check_decl "$LINENO" "time" "ac_cv_have_decl_time" "#include <time.h>
35173 "
35174 if test "x$ac_cv_have_decl_time" = xyes; then :
35175   ac_have_decl=1
35176 else
35177   ac_have_decl=0
35178 fi
35179
35180 cat >>confdefs.h <<_ACEOF
35181 #define HAVE_DECL_TIME $ac_have_decl
35182 _ACEOF
35183
35184
35185 ac_fn_c_check_func "$LINENO" "waitpid" "ac_cv_func_waitpid"
35186 if test "x$ac_cv_func_waitpid" = xyes; then :
35187   $as_echo "#define HAVE_WAITPID 1" >>confdefs.h
35188
35189 else
35190   case " $LIBOBJS " in
35191   *" waitpid.$ac_objext "* ) ;;
35192   *) LIBOBJS="$LIBOBJS waitpid.$ac_objext"
35193  ;;
35194 esac
35195
35196 fi
35197
35198
35199
35200
35201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remote shell" >&5
35202 $as_echo_n "checking for remote shell... " >&6; }
35203 if ${tar_cv_path_RSH+:} false; then :
35204   $as_echo_n "(cached) " >&6
35205 else
35206   if test -n "$RSH"; then
35207     tar_cv_path_RSH=$RSH
35208   else
35209     tar_cv_path_RSH=no
35210     for ac_file in /usr/ucb/rsh /usr/bin/remsh /usr/bin/rsh /usr/bsd/rsh \
35211         /usr/bin/nsh /usr/bin/rcmd
35212     do
35213       # Prefer a non-symlink rsh to a symlink one, so that binaries built
35214       # on AIX 4.1.4, where /usr/ucb/rsh is a symlink to /usr/bin/rsh
35215       # will run on AIX 4.3.0, which has only /usr/bin/rsh.
35216       if test -f $ac_file; then
35217         if (test -h $ac_file) 2>/dev/null; then
35218           test $tar_cv_path_RSH = no && tar_cv_path_RSH=$ac_file
35219         else
35220           tar_cv_path_RSH=$ac_file
35221           break
35222         fi
35223       fi
35224     done
35225   fi
35226 fi
35227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tar_cv_path_RSH" >&5
35228 $as_echo "$tar_cv_path_RSH" >&6; }
35229 if test $tar_cv_path_RSH = no; then
35230   for ac_header in netdb.h
35231 do :
35232   ac_fn_c_check_header_mongrel "$LINENO" "netdb.h" "ac_cv_header_netdb_h" "$ac_includes_default"
35233 if test "x$ac_cv_header_netdb_h" = xyes; then :
35234   cat >>confdefs.h <<_ACEOF
35235 #define HAVE_NETDB_H 1
35236 _ACEOF
35237
35238 fi
35239
35240 done
35241
35242 else
35243
35244 cat >>confdefs.h <<_ACEOF
35245 #define REMOTE_SHELL "$tar_cv_path_RSH"
35246 _ACEOF
35247
35248 fi
35249
35250
35251
35252
35253
35254 # Check whether --with-compress was given.
35255 if test "${with_compress+set}" = set; then :
35256   withval=$with_compress; tar_cv_compressor_compress=${withval}
35257 else
35258   tar_cv_compressor_compress=compress
35259 fi
35260
35261
35262 cat >>confdefs.h <<_ACEOF
35263 #define COMPRESS_PROGRAM "$tar_cv_compressor_compress"
35264 _ACEOF
35265
35266
35267
35268
35269
35270 # Check whether --with-gzip was given.
35271 if test "${with_gzip+set}" = set; then :
35272   withval=$with_gzip; tar_cv_compressor_gzip=${withval}
35273 else
35274   tar_cv_compressor_gzip=gzip
35275 fi
35276
35277
35278 cat >>confdefs.h <<_ACEOF
35279 #define GZIP_PROGRAM "$tar_cv_compressor_gzip"
35280 _ACEOF
35281
35282
35283
35284
35285
35286 # Check whether --with-bzip2 was given.
35287 if test "${with_bzip2+set}" = set; then :
35288   withval=$with_bzip2; tar_cv_compressor_bzip2=${withval}
35289 else
35290   tar_cv_compressor_bzip2=bzip2
35291 fi
35292
35293
35294 cat >>confdefs.h <<_ACEOF
35295 #define BZIP2_PROGRAM "$tar_cv_compressor_bzip2"
35296 _ACEOF
35297
35298
35299
35300
35301
35302 # Check whether --with-lzip was given.
35303 if test "${with_lzip+set}" = set; then :
35304   withval=$with_lzip; tar_cv_compressor_lzip=${withval}
35305 else
35306   tar_cv_compressor_lzip=lzip
35307 fi
35308
35309
35310 cat >>confdefs.h <<_ACEOF
35311 #define LZIP_PROGRAM "$tar_cv_compressor_lzip"
35312 _ACEOF
35313
35314
35315
35316
35317
35318 # Check whether --with-lzma was given.
35319 if test "${with_lzma+set}" = set; then :
35320   withval=$with_lzma; tar_cv_compressor_lzma=${withval}
35321 else
35322   tar_cv_compressor_lzma=lzma
35323 fi
35324
35325
35326 cat >>confdefs.h <<_ACEOF
35327 #define LZMA_PROGRAM "$tar_cv_compressor_lzma"
35328 _ACEOF
35329
35330
35331
35332
35333
35334 # Check whether --with-lzop was given.
35335 if test "${with_lzop+set}" = set; then :
35336   withval=$with_lzop; tar_cv_compressor_lzop=${withval}
35337 else
35338   tar_cv_compressor_lzop=lzop
35339 fi
35340
35341
35342 cat >>confdefs.h <<_ACEOF
35343 #define LZOP_PROGRAM "$tar_cv_compressor_lzop"
35344 _ACEOF
35345
35346
35347
35348
35349
35350 # Check whether --with-xz was given.
35351 if test "${with_xz+set}" = set; then :
35352   withval=$with_xz; tar_cv_compressor_xz=${withval}
35353 else
35354   tar_cv_compressor_xz=xz
35355 fi
35356
35357
35358 cat >>confdefs.h <<_ACEOF
35359 #define XZ_PROGRAM "$tar_cv_compressor_xz"
35360 _ACEOF
35361
35362
35363 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default archive format" >&5
35364 $as_echo_n "checking for default archive format... " >&6; }
35365
35366
35367
35368 if test -z "$DEFAULT_ARCHIVE_FORMAT"; then
35369   DEFAULT_ARCHIVE_FORMAT="GNU"
35370 fi
35371 case $DEFAULT_ARCHIVE_FORMAT in
35372   V7|OLDGNU|USTAR|POSIX|GNU) ;;
35373   *) as_fn_error $? "Invalid format name" "$LINENO" 5;;
35374 esac
35375
35376 cat >>confdefs.h <<_ACEOF
35377 #define DEFAULT_ARCHIVE_FORMAT ${DEFAULT_ARCHIVE_FORMAT}_FORMAT
35378 _ACEOF
35379
35380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEFAULT_ARCHIVE_FORMAT" >&5
35381 $as_echo "$DEFAULT_ARCHIVE_FORMAT" >&6; }
35382
35383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default archive" >&5
35384 $as_echo_n "checking for default archive... " >&6; }
35385
35386
35387 if test -z "$DEFAULT_ARCHIVE"; then
35388   DEFAULT_ARCHIVE=-
35389 else
35390   if test -z "`ls $DEFAULT_ARCHIVE 2>/dev/null`"; then
35391     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: DEFAULT_ARCHIVE '$DEFAULT_ARCHIVE' not found on this system" >&5
35392 $as_echo "$as_me: WARNING: DEFAULT_ARCHIVE '$DEFAULT_ARCHIVE' not found on this system" >&2;}
35393   fi
35394   # FIXME: Look for DEFTAPE in <sys/mtio.h>.
35395   # FIXME: Let DEVICE_PREFIX be configured from the environment.
35396   # FIXME: Rearrange, here.
35397   case $DEFAULT_ARCHIVE in
35398     *[0-7][lmh])
35399
35400 $as_echo "#define DENSITY_LETTER 1" >>confdefs.h
35401
35402       device_prefix=`echo $DEFAULT_ARCHIVE | sed 's/0-7lmh$//'`
35403       ;;
35404     *[0-7])
35405       device_prefix=`echo $DEFAULT_ARCHIVE | sed 's/0-7$//'`
35406       ;;
35407     *)
35408       device_prefix=
35409       ;;
35410   esac
35411   case "$device_prefix" in
35412     ?*)
35413
35414 cat >>confdefs.h <<_ACEOF
35415 #define DEVICE_PREFIX "$device_prefix"
35416 _ACEOF
35417
35418       ;;
35419   esac
35420 fi
35421
35422 cat >>confdefs.h <<_ACEOF
35423 #define DEFAULT_ARCHIVE "$DEFAULT_ARCHIVE"
35424 _ACEOF
35425
35426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEFAULT_ARCHIVE" >&5
35427 $as_echo "$DEFAULT_ARCHIVE" >&6; }
35428
35429
35430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default blocking" >&5
35431 $as_echo_n "checking for default blocking... " >&6; }
35432 DEFAULT_BLOCKING=${DEFAULT_BLOCKING-20}
35433
35434 cat >>confdefs.h <<_ACEOF
35435 #define DEFAULT_BLOCKING $DEFAULT_BLOCKING
35436 _ACEOF
35437
35438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEFAULT_BLOCKING" >&5
35439 $as_echo "$DEFAULT_BLOCKING" >&6; }
35440
35441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default quoting style" >&5
35442 $as_echo_n "checking for default quoting style... " >&6; }
35443
35444
35445 DEFAULT_QUOTING_STYLE="escape"
35446
35447
35448 case $DEFAULT_QUOTING_STYLE in
35449           literal|shell|shell-always|c|escape|locale|clocale) ;;
35450 *)  as_fn_error $? "Invalid quoting style" "$LINENO" 5;;
35451 esac
35452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEFAULT_QUOTING_STYLE" >&5
35453 $as_echo "$DEFAULT_QUOTING_STYLE" >&6; }
35454 DEFAULT_QUOTING_STYLE=`echo ${DEFAULT_QUOTING_STYLE}|sed 's/-/_/g'`_quoting_style
35455
35456 cat >>confdefs.h <<_ACEOF
35457 #define DEFAULT_QUOTING_STYLE $DEFAULT_QUOTING_STYLE
35458 _ACEOF
35459
35460
35461 # Iconv
35462
35463       if test "X$prefix" = "XNONE"; then
35464     acl_final_prefix="$ac_default_prefix"
35465   else
35466     acl_final_prefix="$prefix"
35467   fi
35468   if test "X$exec_prefix" = "XNONE"; then
35469     acl_final_exec_prefix='${prefix}'
35470   else
35471     acl_final_exec_prefix="$exec_prefix"
35472   fi
35473   acl_save_prefix="$prefix"
35474   prefix="$acl_final_prefix"
35475   eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
35476   prefix="$acl_save_prefix"
35477
35478
35479
35480 # Check whether --with-gnu-ld was given.
35481 if test "${with_gnu_ld+set}" = set; then :
35482   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
35483 else
35484   with_gnu_ld=no
35485 fi
35486
35487 # Prepare PATH_SEPARATOR.
35488 # The user is always right.
35489 if test "${PATH_SEPARATOR+set}" != set; then
35490   # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
35491   # contains only /bin. Note that ksh looks also at the FPATH variable,
35492   # so we have to set that as well for the test.
35493   PATH_SEPARATOR=:
35494   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
35495     && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
35496            || PATH_SEPARATOR=';'
35497        }
35498 fi
35499
35500 ac_prog=ld
35501 if test "$GCC" = yes; then
35502   # Check if gcc -print-prog-name=ld gives a path.
35503   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
35504 $as_echo_n "checking for ld used by $CC... " >&6; }
35505   case $host in
35506   *-*-mingw*)
35507     # gcc leaves a trailing carriage return which upsets mingw
35508     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
35509   *)
35510     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
35511   esac
35512   case $ac_prog in
35513     # Accept absolute paths.
35514     [\\/]* | ?:[\\/]*)
35515       re_direlt='/[^/][^/]*/\.\./'
35516       # Canonicalize the pathname of ld
35517       ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'`
35518       while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do
35519         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
35520       done
35521       test -z "$LD" && LD="$ac_prog"
35522       ;;
35523   "")
35524     # If it fails, then pretend we aren't using GCC.
35525     ac_prog=ld
35526     ;;
35527   *)
35528     # If it is relative, then search for the first ld in PATH.
35529     with_gnu_ld=unknown
35530     ;;
35531   esac
35532 elif test "$with_gnu_ld" = yes; then
35533   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
35534 $as_echo_n "checking for GNU ld... " >&6; }
35535 else
35536   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
35537 $as_echo_n "checking for non-GNU ld... " >&6; }
35538 fi
35539 if ${acl_cv_path_LD+:} false; then :
35540   $as_echo_n "(cached) " >&6
35541 else
35542   if test -z "$LD"; then
35543   acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
35544   for ac_dir in $PATH; do
35545     IFS="$acl_save_ifs"
35546     test -z "$ac_dir" && ac_dir=.
35547     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
35548       acl_cv_path_LD="$ac_dir/$ac_prog"
35549       # Check to see if the program is GNU ld.  I'd rather use --version,
35550       # but apparently some variants of GNU ld only accept -v.
35551       # Break only if it was the GNU/non-GNU ld that we prefer.
35552       case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
35553       *GNU* | *'with BFD'*)
35554         test "$with_gnu_ld" != no && break
35555         ;;
35556       *)
35557         test "$with_gnu_ld" != yes && break
35558         ;;
35559       esac
35560     fi
35561   done
35562   IFS="$acl_save_ifs"
35563 else
35564   acl_cv_path_LD="$LD" # Let the user override the test with a path.
35565 fi
35566 fi
35567
35568 LD="$acl_cv_path_LD"
35569 if test -n "$LD"; then
35570   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
35571 $as_echo "$LD" >&6; }
35572 else
35573   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35574 $as_echo "no" >&6; }
35575 fi
35576 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
35577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
35578 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
35579 if ${acl_cv_prog_gnu_ld+:} false; then :
35580   $as_echo_n "(cached) " >&6
35581 else
35582   # I'd rather use --version here, but apparently some GNU lds only accept -v.
35583 case `$LD -v 2>&1 </dev/null` in
35584 *GNU* | *'with BFD'*)
35585   acl_cv_prog_gnu_ld=yes
35586   ;;
35587 *)
35588   acl_cv_prog_gnu_ld=no
35589   ;;
35590 esac
35591 fi
35592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
35593 $as_echo "$acl_cv_prog_gnu_ld" >&6; }
35594 with_gnu_ld=$acl_cv_prog_gnu_ld
35595
35596
35597
35598
35599                                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
35600 $as_echo_n "checking for shared library run path origin... " >&6; }
35601 if ${acl_cv_rpath+:} false; then :
35602   $as_echo_n "(cached) " >&6
35603 else
35604
35605     CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
35606     ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
35607     . ./conftest.sh
35608     rm -f ./conftest.sh
35609     acl_cv_rpath=done
35610
35611 fi
35612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
35613 $as_echo "$acl_cv_rpath" >&6; }
35614   wl="$acl_cv_wl"
35615   acl_libext="$acl_cv_libext"
35616   acl_shlibext="$acl_cv_shlibext"
35617   acl_libname_spec="$acl_cv_libname_spec"
35618   acl_library_names_spec="$acl_cv_library_names_spec"
35619   acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
35620   acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
35621   acl_hardcode_direct="$acl_cv_hardcode_direct"
35622   acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
35623     # Check whether --enable-rpath was given.
35624 if test "${enable_rpath+set}" = set; then :
35625   enableval=$enable_rpath; :
35626 else
35627   enable_rpath=yes
35628 fi
35629
35630
35631
35632
35633   acl_libdirstem=lib
35634   acl_libdirstem2=
35635   case "$host_os" in
35636     solaris*)
35637                                     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5
35638 $as_echo_n "checking for 64-bit host... " >&6; }
35639 if ${gl_cv_solaris_64bit+:} false; then :
35640   $as_echo_n "(cached) " >&6
35641 else
35642   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35643 /* end confdefs.h.  */
35644
35645 #ifdef _LP64
35646 sixtyfour bits
35647 #endif
35648
35649 _ACEOF
35650 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
35651   $EGREP "sixtyfour bits" >/dev/null 2>&1; then :
35652   gl_cv_solaris_64bit=yes
35653 else
35654   gl_cv_solaris_64bit=no
35655 fi
35656 rm -f conftest*
35657
35658
35659 fi
35660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5
35661 $as_echo "$gl_cv_solaris_64bit" >&6; }
35662       if test $gl_cv_solaris_64bit = yes; then
35663         acl_libdirstem=lib/64
35664         case "$host_cpu" in
35665           sparc*)        acl_libdirstem2=lib/sparcv9 ;;
35666           i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
35667         esac
35668       fi
35669       ;;
35670     *)
35671       searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
35672       if test -n "$searchpath"; then
35673         acl_save_IFS="${IFS=    }"; IFS=":"
35674         for searchdir in $searchpath; do
35675           if test -d "$searchdir"; then
35676             case "$searchdir" in
35677               */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
35678               */../ | */.. )
35679                 # Better ignore directories of this form. They are misleading.
35680                 ;;
35681               *) searchdir=`cd "$searchdir" && pwd`
35682                  case "$searchdir" in
35683                    */lib64 ) acl_libdirstem=lib64 ;;
35684                  esac ;;
35685             esac
35686           fi
35687         done
35688         IFS="$acl_save_IFS"
35689       fi
35690       ;;
35691   esac
35692   test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
35693
35694
35695
35696
35697
35698
35699
35700
35701
35702
35703
35704
35705     use_additional=yes
35706
35707   acl_save_prefix="$prefix"
35708   prefix="$acl_final_prefix"
35709   acl_save_exec_prefix="$exec_prefix"
35710   exec_prefix="$acl_final_exec_prefix"
35711
35712     eval additional_includedir=\"$includedir\"
35713     eval additional_libdir=\"$libdir\"
35714
35715   exec_prefix="$acl_save_exec_prefix"
35716   prefix="$acl_save_prefix"
35717
35718
35719 # Check whether --with-libiconv-prefix was given.
35720 if test "${with_libiconv_prefix+set}" = set; then :
35721   withval=$with_libiconv_prefix;
35722     if test "X$withval" = "Xno"; then
35723       use_additional=no
35724     else
35725       if test "X$withval" = "X"; then
35726
35727   acl_save_prefix="$prefix"
35728   prefix="$acl_final_prefix"
35729   acl_save_exec_prefix="$exec_prefix"
35730   exec_prefix="$acl_final_exec_prefix"
35731
35732           eval additional_includedir=\"$includedir\"
35733           eval additional_libdir=\"$libdir\"
35734
35735   exec_prefix="$acl_save_exec_prefix"
35736   prefix="$acl_save_prefix"
35737
35738       else
35739         additional_includedir="$withval/include"
35740         additional_libdir="$withval/$acl_libdirstem"
35741         if test "$acl_libdirstem2" != "$acl_libdirstem" \
35742            && ! test -d "$withval/$acl_libdirstem"; then
35743           additional_libdir="$withval/$acl_libdirstem2"
35744         fi
35745       fi
35746     fi
35747
35748 fi
35749
35750       LIBICONV=
35751   LTLIBICONV=
35752   INCICONV=
35753   LIBICONV_PREFIX=
35754       HAVE_LIBICONV=
35755   rpathdirs=
35756   ltrpathdirs=
35757   names_already_handled=
35758   names_next_round='iconv '
35759   while test -n "$names_next_round"; do
35760     names_this_round="$names_next_round"
35761     names_next_round=
35762     for name in $names_this_round; do
35763       already_handled=
35764       for n in $names_already_handled; do
35765         if test "$n" = "$name"; then
35766           already_handled=yes
35767           break
35768         fi
35769       done
35770       if test -z "$already_handled"; then
35771         names_already_handled="$names_already_handled $name"
35772                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
35773         eval value=\"\$HAVE_LIB$uppername\"
35774         if test -n "$value"; then
35775           if test "$value" = yes; then
35776             eval value=\"\$LIB$uppername\"
35777             test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
35778             eval value=\"\$LTLIB$uppername\"
35779             test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
35780           else
35781                                     :
35782           fi
35783         else
35784                               found_dir=
35785           found_la=
35786           found_so=
35787           found_a=
35788           eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
35789           if test -n "$acl_shlibext"; then
35790             shrext=".$acl_shlibext"             # typically: shrext=.so
35791           else
35792             shrext=
35793           fi
35794           if test $use_additional = yes; then
35795             dir="$additional_libdir"
35796                                     if test -n "$acl_shlibext"; then
35797               if test -f "$dir/$libname$shrext"; then
35798                 found_dir="$dir"
35799                 found_so="$dir/$libname$shrext"
35800               else
35801                 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
35802                   ver=`(cd "$dir" && \
35803                         for f in "$libname$shrext".*; do echo "$f"; done \
35804                         | sed -e "s,^$libname$shrext\\\\.,," \
35805                         | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
35806                         | sed 1q ) 2>/dev/null`
35807                   if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
35808                     found_dir="$dir"
35809                     found_so="$dir/$libname$shrext.$ver"
35810                   fi
35811                 else
35812                   eval library_names=\"$acl_library_names_spec\"
35813                   for f in $library_names; do
35814                     if test -f "$dir/$f"; then
35815                       found_dir="$dir"
35816                       found_so="$dir/$f"
35817                       break
35818                     fi
35819                   done
35820                 fi
35821               fi
35822             fi
35823                         if test "X$found_dir" = "X"; then
35824               if test -f "$dir/$libname.$acl_libext"; then
35825                 found_dir="$dir"
35826                 found_a="$dir/$libname.$acl_libext"
35827               fi
35828             fi
35829             if test "X$found_dir" != "X"; then
35830               if test -f "$dir/$libname.la"; then
35831                 found_la="$dir/$libname.la"
35832               fi
35833             fi
35834           fi
35835           if test "X$found_dir" = "X"; then
35836             for x in $LDFLAGS $LTLIBICONV; do
35837
35838   acl_save_prefix="$prefix"
35839   prefix="$acl_final_prefix"
35840   acl_save_exec_prefix="$exec_prefix"
35841   exec_prefix="$acl_final_exec_prefix"
35842   eval x=\"$x\"
35843   exec_prefix="$acl_save_exec_prefix"
35844   prefix="$acl_save_prefix"
35845
35846               case "$x" in
35847                 -L*)
35848                   dir=`echo "X$x" | sed -e 's/^X-L//'`
35849                                     if test -n "$acl_shlibext"; then
35850                     if test -f "$dir/$libname$shrext"; then
35851                       found_dir="$dir"
35852                       found_so="$dir/$libname$shrext"
35853                     else
35854                       if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
35855                         ver=`(cd "$dir" && \
35856                               for f in "$libname$shrext".*; do echo "$f"; done \
35857                               | sed -e "s,^$libname$shrext\\\\.,," \
35858                               | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
35859                               | sed 1q ) 2>/dev/null`
35860                         if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
35861                           found_dir="$dir"
35862                           found_so="$dir/$libname$shrext.$ver"
35863                         fi
35864                       else
35865                         eval library_names=\"$acl_library_names_spec\"
35866                         for f in $library_names; do
35867                           if test -f "$dir/$f"; then
35868                             found_dir="$dir"
35869                             found_so="$dir/$f"
35870                             break
35871                           fi
35872                         done
35873                       fi
35874                     fi
35875                   fi
35876                                     if test "X$found_dir" = "X"; then
35877                     if test -f "$dir/$libname.$acl_libext"; then
35878                       found_dir="$dir"
35879                       found_a="$dir/$libname.$acl_libext"
35880                     fi
35881                   fi
35882                   if test "X$found_dir" != "X"; then
35883                     if test -f "$dir/$libname.la"; then
35884                       found_la="$dir/$libname.la"
35885                     fi
35886                   fi
35887                   ;;
35888               esac
35889               if test "X$found_dir" != "X"; then
35890                 break
35891               fi
35892             done
35893           fi
35894           if test "X$found_dir" != "X"; then
35895                         LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
35896             if test "X$found_so" != "X"; then
35897                                                         if test "$enable_rpath" = no \
35898                  || test "X$found_dir" = "X/usr/$acl_libdirstem" \
35899                  || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
35900                                 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
35901               else
35902                                                                                 haveit=
35903                 for x in $ltrpathdirs; do
35904                   if test "X$x" = "X$found_dir"; then
35905                     haveit=yes
35906                     break
35907                   fi
35908                 done
35909                 if test -z "$haveit"; then
35910                   ltrpathdirs="$ltrpathdirs $found_dir"
35911                 fi
35912                                 if test "$acl_hardcode_direct" = yes; then
35913                                                       LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
35914                 else
35915                   if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
35916                                                             LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
35917                                                             haveit=
35918                     for x in $rpathdirs; do
35919                       if test "X$x" = "X$found_dir"; then
35920                         haveit=yes
35921                         break
35922                       fi
35923                     done
35924                     if test -z "$haveit"; then
35925                       rpathdirs="$rpathdirs $found_dir"
35926                     fi
35927                   else
35928                                                                                 haveit=
35929                     for x in $LDFLAGS $LIBICONV; do
35930
35931   acl_save_prefix="$prefix"
35932   prefix="$acl_final_prefix"
35933   acl_save_exec_prefix="$exec_prefix"
35934   exec_prefix="$acl_final_exec_prefix"
35935   eval x=\"$x\"
35936   exec_prefix="$acl_save_exec_prefix"
35937   prefix="$acl_save_prefix"
35938
35939                       if test "X$x" = "X-L$found_dir"; then
35940                         haveit=yes
35941                         break
35942                       fi
35943                     done
35944                     if test -z "$haveit"; then
35945                       LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
35946                     fi
35947                     if test "$acl_hardcode_minus_L" != no; then
35948                                                                                         LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
35949                     else
35950                                                                                                                                                                                 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
35951                     fi
35952                   fi
35953                 fi
35954               fi
35955             else
35956               if test "X$found_a" != "X"; then
35957                                 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
35958               else
35959                                                 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
35960               fi
35961             fi
35962                         additional_includedir=
35963             case "$found_dir" in
35964               */$acl_libdirstem | */$acl_libdirstem/)
35965                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
35966                 if test "$name" = 'iconv'; then
35967                   LIBICONV_PREFIX="$basedir"
35968                 fi
35969                 additional_includedir="$basedir/include"
35970                 ;;
35971               */$acl_libdirstem2 | */$acl_libdirstem2/)
35972                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
35973                 if test "$name" = 'iconv'; then
35974                   LIBICONV_PREFIX="$basedir"
35975                 fi
35976                 additional_includedir="$basedir/include"
35977                 ;;
35978             esac
35979             if test "X$additional_includedir" != "X"; then
35980                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
35981                 haveit=
35982                 if test "X$additional_includedir" = "X/usr/local/include"; then
35983                   if test -n "$GCC"; then
35984                     case $host_os in
35985                       linux* | gnu* | k*bsd*-gnu) haveit=yes;;
35986                     esac
35987                   fi
35988                 fi
35989                 if test -z "$haveit"; then
35990                   for x in $CPPFLAGS $INCICONV; do
35991
35992   acl_save_prefix="$prefix"
35993   prefix="$acl_final_prefix"
35994   acl_save_exec_prefix="$exec_prefix"
35995   exec_prefix="$acl_final_exec_prefix"
35996   eval x=\"$x\"
35997   exec_prefix="$acl_save_exec_prefix"
35998   prefix="$acl_save_prefix"
35999
36000                     if test "X$x" = "X-I$additional_includedir"; then
36001                       haveit=yes
36002                       break
36003                     fi
36004                   done
36005                   if test -z "$haveit"; then
36006                     if test -d "$additional_includedir"; then
36007                                             INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
36008                     fi
36009                   fi
36010                 fi
36011               fi
36012             fi
36013                         if test -n "$found_la"; then
36014                                                         save_libdir="$libdir"
36015               case "$found_la" in
36016                 */* | *\\*) . "$found_la" ;;
36017                 *) . "./$found_la" ;;
36018               esac
36019               libdir="$save_libdir"
36020                             for dep in $dependency_libs; do
36021                 case "$dep" in
36022                   -L*)
36023                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
36024                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
36025                        && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
36026                       haveit=
36027                       if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
36028                          || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
36029                         if test -n "$GCC"; then
36030                           case $host_os in
36031                             linux* | gnu* | k*bsd*-gnu) haveit=yes;;
36032                           esac
36033                         fi
36034                       fi
36035                       if test -z "$haveit"; then
36036                         haveit=
36037                         for x in $LDFLAGS $LIBICONV; do
36038
36039   acl_save_prefix="$prefix"
36040   prefix="$acl_final_prefix"
36041   acl_save_exec_prefix="$exec_prefix"
36042   exec_prefix="$acl_final_exec_prefix"
36043   eval x=\"$x\"
36044   exec_prefix="$acl_save_exec_prefix"
36045   prefix="$acl_save_prefix"
36046
36047                           if test "X$x" = "X-L$additional_libdir"; then
36048                             haveit=yes
36049                             break
36050                           fi
36051                         done
36052                         if test -z "$haveit"; then
36053                           if test -d "$additional_libdir"; then
36054                                                         LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
36055                           fi
36056                         fi
36057                         haveit=
36058                         for x in $LDFLAGS $LTLIBICONV; do
36059
36060   acl_save_prefix="$prefix"
36061   prefix="$acl_final_prefix"
36062   acl_save_exec_prefix="$exec_prefix"
36063   exec_prefix="$acl_final_exec_prefix"
36064   eval x=\"$x\"
36065   exec_prefix="$acl_save_exec_prefix"
36066   prefix="$acl_save_prefix"
36067
36068                           if test "X$x" = "X-L$additional_libdir"; then
36069                             haveit=yes
36070                             break
36071                           fi
36072                         done
36073                         if test -z "$haveit"; then
36074                           if test -d "$additional_libdir"; then
36075                                                         LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
36076                           fi
36077                         fi
36078                       fi
36079                     fi
36080                     ;;
36081                   -R*)
36082                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
36083                     if test "$enable_rpath" != no; then
36084                                                                   haveit=
36085                       for x in $rpathdirs; do
36086                         if test "X$x" = "X$dir"; then
36087                           haveit=yes
36088                           break
36089                         fi
36090                       done
36091                       if test -z "$haveit"; then
36092                         rpathdirs="$rpathdirs $dir"
36093                       fi
36094                                                                   haveit=
36095                       for x in $ltrpathdirs; do
36096                         if test "X$x" = "X$dir"; then
36097                           haveit=yes
36098                           break
36099                         fi
36100                       done
36101                       if test -z "$haveit"; then
36102                         ltrpathdirs="$ltrpathdirs $dir"
36103                       fi
36104                     fi
36105                     ;;
36106                   -l*)
36107                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
36108                     ;;
36109                   *.la)
36110                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
36111                     ;;
36112                   *)
36113                                         LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
36114                     LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
36115                     ;;
36116                 esac
36117               done
36118             fi
36119           else
36120                                                             LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
36121             LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
36122           fi
36123         fi
36124       fi
36125     done
36126   done
36127   if test "X$rpathdirs" != "X"; then
36128     if test -n "$acl_hardcode_libdir_separator"; then
36129                         alldirs=
36130       for found_dir in $rpathdirs; do
36131         alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
36132       done
36133             acl_save_libdir="$libdir"
36134       libdir="$alldirs"
36135       eval flag=\"$acl_hardcode_libdir_flag_spec\"
36136       libdir="$acl_save_libdir"
36137       LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
36138     else
36139             for found_dir in $rpathdirs; do
36140         acl_save_libdir="$libdir"
36141         libdir="$found_dir"
36142         eval flag=\"$acl_hardcode_libdir_flag_spec\"
36143         libdir="$acl_save_libdir"
36144         LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
36145       done
36146     fi
36147   fi
36148   if test "X$ltrpathdirs" != "X"; then
36149             for found_dir in $ltrpathdirs; do
36150       LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
36151     done
36152   fi
36153
36154
36155
36156
36157
36158
36159
36160
36161
36162
36163
36164
36165           am_save_CPPFLAGS="$CPPFLAGS"
36166
36167   for element in $INCICONV; do
36168     haveit=
36169     for x in $CPPFLAGS; do
36170
36171   acl_save_prefix="$prefix"
36172   prefix="$acl_final_prefix"
36173   acl_save_exec_prefix="$exec_prefix"
36174   exec_prefix="$acl_final_exec_prefix"
36175   eval x=\"$x\"
36176   exec_prefix="$acl_save_exec_prefix"
36177   prefix="$acl_save_prefix"
36178
36179       if test "X$x" = "X$element"; then
36180         haveit=yes
36181         break
36182       fi
36183     done
36184     if test -z "$haveit"; then
36185       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
36186     fi
36187   done
36188
36189
36190   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
36191 $as_echo_n "checking for iconv... " >&6; }
36192 if ${am_cv_func_iconv+:} false; then :
36193   $as_echo_n "(cached) " >&6
36194 else
36195
36196     am_cv_func_iconv="no, consider installing GNU libiconv"
36197     am_cv_lib_iconv=no
36198     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36199 /* end confdefs.h.  */
36200
36201 #include <stdlib.h>
36202 #include <iconv.h>
36203
36204 int
36205 main ()
36206 {
36207 iconv_t cd = iconv_open("","");
36208            iconv(cd,NULL,NULL,NULL,NULL);
36209            iconv_close(cd);
36210   ;
36211   return 0;
36212 }
36213 _ACEOF
36214 if ac_fn_c_try_link "$LINENO"; then :
36215   am_cv_func_iconv=yes
36216 fi
36217 rm -f core conftest.err conftest.$ac_objext \
36218     conftest$ac_exeext conftest.$ac_ext
36219     if test "$am_cv_func_iconv" != yes; then
36220       am_save_LIBS="$LIBS"
36221       LIBS="$LIBS $LIBICONV"
36222       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36223 /* end confdefs.h.  */
36224
36225 #include <stdlib.h>
36226 #include <iconv.h>
36227
36228 int
36229 main ()
36230 {
36231 iconv_t cd = iconv_open("","");
36232              iconv(cd,NULL,NULL,NULL,NULL);
36233              iconv_close(cd);
36234   ;
36235   return 0;
36236 }
36237 _ACEOF
36238 if ac_fn_c_try_link "$LINENO"; then :
36239   am_cv_lib_iconv=yes
36240         am_cv_func_iconv=yes
36241 fi
36242 rm -f core conftest.err conftest.$ac_objext \
36243     conftest$ac_exeext conftest.$ac_ext
36244       LIBS="$am_save_LIBS"
36245     fi
36246
36247 fi
36248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
36249 $as_echo "$am_cv_func_iconv" >&6; }
36250   if test "$am_cv_func_iconv" = yes; then
36251     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
36252 $as_echo_n "checking for working iconv... " >&6; }
36253 if ${am_cv_func_iconv_works+:} false; then :
36254   $as_echo_n "(cached) " >&6
36255 else
36256
36257                   am_save_LIBS="$LIBS"
36258       if test $am_cv_lib_iconv = yes; then
36259         LIBS="$LIBS $LIBICONV"
36260       fi
36261       if test "$cross_compiling" = yes; then :
36262
36263          case "$host_os" in
36264            aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
36265            *)            am_cv_func_iconv_works="guessing yes" ;;
36266          esac
36267
36268 else
36269   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36270 /* end confdefs.h.  */
36271
36272 #include <iconv.h>
36273 #include <string.h>
36274 int main ()
36275 {
36276   int result = 0;
36277   /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
36278      returns.  */
36279   {
36280     iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
36281     if (cd_utf8_to_88591 != (iconv_t)(-1))
36282       {
36283         static const char input[] = "\342\202\254"; /* EURO SIGN */
36284         char buf[10];
36285         const char *inptr = input;
36286         size_t inbytesleft = strlen (input);
36287         char *outptr = buf;
36288         size_t outbytesleft = sizeof (buf);
36289         size_t res = iconv (cd_utf8_to_88591,
36290                             (char **) &inptr, &inbytesleft,
36291                             &outptr, &outbytesleft);
36292         if (res == 0)
36293           result |= 1;
36294         iconv_close (cd_utf8_to_88591);
36295       }
36296   }
36297   /* Test against Solaris 10 bug: Failures are not distinguishable from
36298      successful returns.  */
36299   {
36300     iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
36301     if (cd_ascii_to_88591 != (iconv_t)(-1))
36302       {
36303         static const char input[] = "\263";
36304         char buf[10];
36305         const char *inptr = input;
36306         size_t inbytesleft = strlen (input);
36307         char *outptr = buf;
36308         size_t outbytesleft = sizeof (buf);
36309         size_t res = iconv (cd_ascii_to_88591,
36310                             (char **) &inptr, &inbytesleft,
36311                             &outptr, &outbytesleft);
36312         if (res == 0)
36313           result |= 2;
36314         iconv_close (cd_ascii_to_88591);
36315       }
36316   }
36317   /* Test against AIX 6.1..7.1 bug: Buffer overrun.  */
36318   {
36319     iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
36320     if (cd_88591_to_utf8 != (iconv_t)(-1))
36321       {
36322         static const char input[] = "\304";
36323         static char buf[2] = { (char)0xDE, (char)0xAD };
36324         const char *inptr = input;
36325         size_t inbytesleft = 1;
36326         char *outptr = buf;
36327         size_t outbytesleft = 1;
36328         size_t res = iconv (cd_88591_to_utf8,
36329                             (char **) &inptr, &inbytesleft,
36330                             &outptr, &outbytesleft);
36331         if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
36332           result |= 4;
36333         iconv_close (cd_88591_to_utf8);
36334       }
36335   }
36336 #if 0 /* This bug could be worked around by the caller.  */
36337   /* Test against HP-UX 11.11 bug: Positive return value instead of 0.  */
36338   {
36339     iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
36340     if (cd_88591_to_utf8 != (iconv_t)(-1))
36341       {
36342         static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
36343         char buf[50];
36344         const char *inptr = input;
36345         size_t inbytesleft = strlen (input);
36346         char *outptr = buf;
36347         size_t outbytesleft = sizeof (buf);
36348         size_t res = iconv (cd_88591_to_utf8,
36349                             (char **) &inptr, &inbytesleft,
36350                             &outptr, &outbytesleft);
36351         if ((int)res > 0)
36352           result |= 8;
36353         iconv_close (cd_88591_to_utf8);
36354       }
36355   }
36356 #endif
36357   /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
36358      provided.  */
36359   if (/* Try standardized names.  */
36360       iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
36361       /* Try IRIX, OSF/1 names.  */
36362       && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
36363       /* Try AIX names.  */
36364       && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
36365       /* Try HP-UX names.  */
36366       && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
36367     result |= 16;
36368   return result;
36369 }
36370 _ACEOF
36371 if ac_fn_c_try_run "$LINENO"; then :
36372   am_cv_func_iconv_works=yes
36373 else
36374   am_cv_func_iconv_works=no
36375 fi
36376 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
36377   conftest.$ac_objext conftest.beam conftest.$ac_ext
36378 fi
36379
36380       LIBS="$am_save_LIBS"
36381
36382 fi
36383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
36384 $as_echo "$am_cv_func_iconv_works" >&6; }
36385     case "$am_cv_func_iconv_works" in
36386       *no) am_func_iconv=no am_cv_lib_iconv=no ;;
36387       *)   am_func_iconv=yes ;;
36388     esac
36389   else
36390     am_func_iconv=no am_cv_lib_iconv=no
36391   fi
36392   if test "$am_func_iconv" = yes; then
36393
36394 $as_echo "#define HAVE_ICONV 1" >>confdefs.h
36395
36396   fi
36397   if test "$am_cv_lib_iconv" = yes; then
36398     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
36399 $as_echo_n "checking how to link with libiconv... " >&6; }
36400     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
36401 $as_echo "$LIBICONV" >&6; }
36402   else
36403             CPPFLAGS="$am_save_CPPFLAGS"
36404     LIBICONV=
36405     LTLIBICONV=
36406   fi
36407
36408
36409
36410   if test "$am_cv_func_iconv" = yes; then
36411     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
36412 $as_echo_n "checking for iconv declaration... " >&6; }
36413     if ${am_cv_proto_iconv+:} false; then :
36414   $as_echo_n "(cached) " >&6
36415 else
36416
36417       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36418 /* end confdefs.h.  */
36419
36420 #include <stdlib.h>
36421 #include <iconv.h>
36422 extern
36423 #ifdef __cplusplus
36424 "C"
36425 #endif
36426 #if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus)
36427 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
36428 #else
36429 size_t iconv();
36430 #endif
36431
36432 int
36433 main ()
36434 {
36435
36436   ;
36437   return 0;
36438 }
36439 _ACEOF
36440 if ac_fn_c_try_compile "$LINENO"; then :
36441   am_cv_proto_iconv_arg1=""
36442 else
36443   am_cv_proto_iconv_arg1="const"
36444 fi
36445 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36446       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);"
36447 fi
36448
36449     am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
36450     { $as_echo "$as_me:${as_lineno-$LINENO}: result:
36451          $am_cv_proto_iconv" >&5
36452 $as_echo "
36453          $am_cv_proto_iconv" >&6; }
36454
36455 cat >>confdefs.h <<_ACEOF
36456 #define ICONV_CONST $am_cv_proto_iconv_arg1
36457 _ACEOF
36458
36459
36460   fi
36461
36462 for ac_header in iconv.h
36463 do :
36464   ac_fn_c_check_header_mongrel "$LINENO" "iconv.h" "ac_cv_header_iconv_h" "$ac_includes_default"
36465 if test "x$ac_cv_header_iconv_h" = xyes; then :
36466   cat >>confdefs.h <<_ACEOF
36467 #define HAVE_ICONV_H 1
36468 _ACEOF
36469
36470 fi
36471
36472 done
36473
36474 ac_fn_c_check_type "$LINENO" "iconv_t" "ac_cv_type_iconv_t" "
36475 #ifdef HAVE_ICONV_H
36476 # include <iconv.h>
36477 #endif
36478
36479 "
36480 if test "x$ac_cv_type_iconv_t" = xyes; then :
36481   :
36482 else
36483
36484 $as_echo "#define iconv_t int" >>confdefs.h
36485
36486 fi
36487
36488
36489 # Gettext.
36490 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
36491 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
36492 if ${ac_cv_path_SED+:} false; then :
36493   $as_echo_n "(cached) " >&6
36494 else
36495             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
36496      for ac_i in 1 2 3 4 5 6 7; do
36497        ac_script="$ac_script$as_nl$ac_script"
36498      done
36499      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
36500      { ac_script=; unset ac_script;}
36501      if test -z "$SED"; then
36502   ac_path_SED_found=false
36503   # Loop through the user's path and test for each of PROGNAME-LIST
36504   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36505 for as_dir in $PATH
36506 do
36507   IFS=$as_save_IFS
36508   test -z "$as_dir" && as_dir=.
36509     for ac_prog in sed gsed; do
36510     for ac_exec_ext in '' $ac_executable_extensions; do
36511       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
36512       as_fn_executable_p "$ac_path_SED" || continue
36513 # Check for GNU ac_path_SED and select it if it is found.
36514   # Check for GNU $ac_path_SED
36515 case `"$ac_path_SED" --version 2>&1` in
36516 *GNU*)
36517   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
36518 *)
36519   ac_count=0
36520   $as_echo_n 0123456789 >"conftest.in"
36521   while :
36522   do
36523     cat "conftest.in" "conftest.in" >"conftest.tmp"
36524     mv "conftest.tmp" "conftest.in"
36525     cp "conftest.in" "conftest.nl"
36526     $as_echo '' >> "conftest.nl"
36527     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
36528     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
36529     as_fn_arith $ac_count + 1 && ac_count=$as_val
36530     if test $ac_count -gt ${ac_path_SED_max-0}; then
36531       # Best one so far, save it but keep looking for a better one
36532       ac_cv_path_SED="$ac_path_SED"
36533       ac_path_SED_max=$ac_count
36534     fi
36535     # 10*(2^10) chars as input seems more than enough
36536     test $ac_count -gt 10 && break
36537   done
36538   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
36539 esac
36540
36541       $ac_path_SED_found && break 3
36542     done
36543   done
36544   done
36545 IFS=$as_save_IFS
36546   if test -z "$ac_cv_path_SED"; then
36547     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
36548   fi
36549 else
36550   ac_cv_path_SED=$SED
36551 fi
36552
36553 fi
36554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
36555 $as_echo "$ac_cv_path_SED" >&6; }
36556  SED="$ac_cv_path_SED"
36557   rm -f conftest.sed
36558
36559
36560   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
36561 $as_echo_n "checking whether NLS is requested... " >&6; }
36562     # Check whether --enable-nls was given.
36563 if test "${enable_nls+set}" = set; then :
36564   enableval=$enable_nls; USE_NLS=$enableval
36565 else
36566   USE_NLS=yes
36567 fi
36568
36569   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
36570 $as_echo "$USE_NLS" >&6; }
36571
36572
36573
36574
36575       GETTEXT_MACRO_VERSION=0.18
36576
36577
36578
36579
36580 # Prepare PATH_SEPARATOR.
36581 # The user is always right.
36582 if test "${PATH_SEPARATOR+set}" != set; then
36583   # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
36584   # contains only /bin. Note that ksh looks also at the FPATH variable,
36585   # so we have to set that as well for the test.
36586   PATH_SEPARATOR=:
36587   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
36588     && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
36589            || PATH_SEPARATOR=';'
36590        }
36591 fi
36592
36593 # Find out how to test for executable files. Don't use a zero-byte file,
36594 # as systems may use methods other than mode bits to determine executability.
36595 cat >conf$$.file <<_ASEOF
36596 #! /bin/sh
36597 exit 0
36598 _ASEOF
36599 chmod +x conf$$.file
36600 if test -x conf$$.file >/dev/null 2>&1; then
36601   ac_executable_p="test -x"
36602 else
36603   ac_executable_p="test -f"
36604 fi
36605 rm -f conf$$.file
36606
36607 # Extract the first word of "msgfmt", so it can be a program name with args.
36608 set dummy msgfmt; ac_word=$2
36609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36610 $as_echo_n "checking for $ac_word... " >&6; }
36611 if ${ac_cv_path_MSGFMT+:} false; then :
36612   $as_echo_n "(cached) " >&6
36613 else
36614   case "$MSGFMT" in
36615   [\\/]* | ?:[\\/]*)
36616     ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
36617     ;;
36618   *)
36619     ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
36620     for ac_dir in $PATH; do
36621       IFS="$ac_save_IFS"
36622       test -z "$ac_dir" && ac_dir=.
36623       for ac_exec_ext in '' $ac_executable_extensions; do
36624         if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
36625           echo "$as_me: trying $ac_dir/$ac_word..." >&5
36626           if $ac_dir/$ac_word --statistics /dev/null >&5 2>&1 &&
36627      (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
36628             ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext"
36629             break 2
36630           fi
36631         fi
36632       done
36633     done
36634     IFS="$ac_save_IFS"
36635   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
36636     ;;
36637 esac
36638 fi
36639 MSGFMT="$ac_cv_path_MSGFMT"
36640 if test "$MSGFMT" != ":"; then
36641   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
36642 $as_echo "$MSGFMT" >&6; }
36643 else
36644   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36645 $as_echo "no" >&6; }
36646 fi
36647
36648   # Extract the first word of "gmsgfmt", so it can be a program name with args.
36649 set dummy gmsgfmt; ac_word=$2
36650 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36651 $as_echo_n "checking for $ac_word... " >&6; }
36652 if ${ac_cv_path_GMSGFMT+:} false; then :
36653   $as_echo_n "(cached) " >&6
36654 else
36655   case $GMSGFMT in
36656   [\\/]* | ?:[\\/]*)
36657   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
36658   ;;
36659   *)
36660   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36661 for as_dir in $PATH
36662 do
36663   IFS=$as_save_IFS
36664   test -z "$as_dir" && as_dir=.
36665     for ac_exec_ext in '' $ac_executable_extensions; do
36666   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36667     ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
36668     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36669     break 2
36670   fi
36671 done
36672   done
36673 IFS=$as_save_IFS
36674
36675   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
36676   ;;
36677 esac
36678 fi
36679 GMSGFMT=$ac_cv_path_GMSGFMT
36680 if test -n "$GMSGFMT"; then
36681   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
36682 $as_echo "$GMSGFMT" >&6; }
36683 else
36684   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36685 $as_echo "no" >&6; }
36686 fi
36687
36688
36689
36690     case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
36691     '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
36692     *) MSGFMT_015=$MSGFMT ;;
36693   esac
36694
36695   case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
36696     '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
36697     *) GMSGFMT_015=$GMSGFMT ;;
36698   esac
36699
36700
36701
36702 # Prepare PATH_SEPARATOR.
36703 # The user is always right.
36704 if test "${PATH_SEPARATOR+set}" != set; then
36705   # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
36706   # contains only /bin. Note that ksh looks also at the FPATH variable,
36707   # so we have to set that as well for the test.
36708   PATH_SEPARATOR=:
36709   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
36710     && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
36711            || PATH_SEPARATOR=';'
36712        }
36713 fi
36714
36715 # Find out how to test for executable files. Don't use a zero-byte file,
36716 # as systems may use methods other than mode bits to determine executability.
36717 cat >conf$$.file <<_ASEOF
36718 #! /bin/sh
36719 exit 0
36720 _ASEOF
36721 chmod +x conf$$.file
36722 if test -x conf$$.file >/dev/null 2>&1; then
36723   ac_executable_p="test -x"
36724 else
36725   ac_executable_p="test -f"
36726 fi
36727 rm -f conf$$.file
36728
36729 # Extract the first word of "xgettext", so it can be a program name with args.
36730 set dummy xgettext; ac_word=$2
36731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36732 $as_echo_n "checking for $ac_word... " >&6; }
36733 if ${ac_cv_path_XGETTEXT+:} false; then :
36734   $as_echo_n "(cached) " >&6
36735 else
36736   case "$XGETTEXT" in
36737   [\\/]* | ?:[\\/]*)
36738     ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
36739     ;;
36740   *)
36741     ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
36742     for ac_dir in $PATH; do
36743       IFS="$ac_save_IFS"
36744       test -z "$ac_dir" && ac_dir=.
36745       for ac_exec_ext in '' $ac_executable_extensions; do
36746         if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
36747           echo "$as_me: trying $ac_dir/$ac_word..." >&5
36748           if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&5 2>&1 &&
36749      (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
36750             ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext"
36751             break 2
36752           fi
36753         fi
36754       done
36755     done
36756     IFS="$ac_save_IFS"
36757   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
36758     ;;
36759 esac
36760 fi
36761 XGETTEXT="$ac_cv_path_XGETTEXT"
36762 if test "$XGETTEXT" != ":"; then
36763   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
36764 $as_echo "$XGETTEXT" >&6; }
36765 else
36766   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36767 $as_echo "no" >&6; }
36768 fi
36769
36770     rm -f messages.po
36771
36772     case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
36773     '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
36774     *) XGETTEXT_015=$XGETTEXT ;;
36775   esac
36776
36777
36778
36779 # Prepare PATH_SEPARATOR.
36780 # The user is always right.
36781 if test "${PATH_SEPARATOR+set}" != set; then
36782   # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
36783   # contains only /bin. Note that ksh looks also at the FPATH variable,
36784   # so we have to set that as well for the test.
36785   PATH_SEPARATOR=:
36786   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
36787     && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
36788            || PATH_SEPARATOR=';'
36789        }
36790 fi
36791
36792 # Find out how to test for executable files. Don't use a zero-byte file,
36793 # as systems may use methods other than mode bits to determine executability.
36794 cat >conf$$.file <<_ASEOF
36795 #! /bin/sh
36796 exit 0
36797 _ASEOF
36798 chmod +x conf$$.file
36799 if test -x conf$$.file >/dev/null 2>&1; then
36800   ac_executable_p="test -x"
36801 else
36802   ac_executable_p="test -f"
36803 fi
36804 rm -f conf$$.file
36805
36806 # Extract the first word of "msgmerge", so it can be a program name with args.
36807 set dummy msgmerge; ac_word=$2
36808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36809 $as_echo_n "checking for $ac_word... " >&6; }
36810 if ${ac_cv_path_MSGMERGE+:} false; then :
36811   $as_echo_n "(cached) " >&6
36812 else
36813   case "$MSGMERGE" in
36814   [\\/]* | ?:[\\/]*)
36815     ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
36816     ;;
36817   *)
36818     ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
36819     for ac_dir in $PATH; do
36820       IFS="$ac_save_IFS"
36821       test -z "$ac_dir" && ac_dir=.
36822       for ac_exec_ext in '' $ac_executable_extensions; do
36823         if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
36824           echo "$as_me: trying $ac_dir/$ac_word..." >&5
36825           if $ac_dir/$ac_word --update -q /dev/null /dev/null >&5 2>&1; then
36826             ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext"
36827             break 2
36828           fi
36829         fi
36830       done
36831     done
36832     IFS="$ac_save_IFS"
36833   test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":"
36834     ;;
36835 esac
36836 fi
36837 MSGMERGE="$ac_cv_path_MSGMERGE"
36838 if test "$MSGMERGE" != ":"; then
36839   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
36840 $as_echo "$MSGMERGE" >&6; }
36841 else
36842   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36843 $as_echo "no" >&6; }
36844 fi
36845
36846
36847         test -n "$localedir" || localedir='${datadir}/locale'
36848
36849
36850     test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
36851
36852
36853   ac_config_commands="$ac_config_commands po-directories"
36854
36855
36856
36857
36858
36859
36860
36861
36862
36863
36864
36865
36866
36867
36868
36869
36870
36871
36872
36873
36874
36875
36876
36877
36878
36879
36880     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5
36881 $as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; }
36882 if ${gt_cv_func_CFPreferencesCopyAppValue+:} false; then :
36883   $as_echo_n "(cached) " >&6
36884 else
36885   gt_save_LIBS="$LIBS"
36886      LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
36887      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36888 /* end confdefs.h.  */
36889 #include <CoreFoundation/CFPreferences.h>
36890 int
36891 main ()
36892 {
36893 CFPreferencesCopyAppValue(NULL, NULL)
36894   ;
36895   return 0;
36896 }
36897 _ACEOF
36898 if ac_fn_c_try_link "$LINENO"; then :
36899   gt_cv_func_CFPreferencesCopyAppValue=yes
36900 else
36901   gt_cv_func_CFPreferencesCopyAppValue=no
36902 fi
36903 rm -f core conftest.err conftest.$ac_objext \
36904     conftest$ac_exeext conftest.$ac_ext
36905      LIBS="$gt_save_LIBS"
36906 fi
36907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5
36908 $as_echo "$gt_cv_func_CFPreferencesCopyAppValue" >&6; }
36909   if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
36910
36911 $as_echo "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h
36912
36913   fi
36914     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5
36915 $as_echo_n "checking for CFLocaleCopyCurrent... " >&6; }
36916 if ${gt_cv_func_CFLocaleCopyCurrent+:} false; then :
36917   $as_echo_n "(cached) " >&6
36918 else
36919   gt_save_LIBS="$LIBS"
36920      LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
36921      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36922 /* end confdefs.h.  */
36923 #include <CoreFoundation/CFLocale.h>
36924 int
36925 main ()
36926 {
36927 CFLocaleCopyCurrent();
36928   ;
36929   return 0;
36930 }
36931 _ACEOF
36932 if ac_fn_c_try_link "$LINENO"; then :
36933   gt_cv_func_CFLocaleCopyCurrent=yes
36934 else
36935   gt_cv_func_CFLocaleCopyCurrent=no
36936 fi
36937 rm -f core conftest.err conftest.$ac_objext \
36938     conftest$ac_exeext conftest.$ac_ext
36939      LIBS="$gt_save_LIBS"
36940 fi
36941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5
36942 $as_echo "$gt_cv_func_CFLocaleCopyCurrent" >&6; }
36943   if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
36944
36945 $as_echo "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h
36946
36947   fi
36948   INTL_MACOSX_LIBS=
36949   if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
36950     INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
36951   fi
36952
36953
36954
36955
36956
36957
36958   LIBINTL=
36959   LTLIBINTL=
36960   POSUB=
36961
36962     case " $gt_needs " in
36963     *" need-formatstring-macros "*) gt_api_version=3 ;;
36964     *" need-ngettext "*) gt_api_version=2 ;;
36965     *) gt_api_version=1 ;;
36966   esac
36967   gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
36968   gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
36969
36970     if test "$USE_NLS" = "yes"; then
36971     gt_use_preinstalled_gnugettext=no
36972
36973
36974         if test $gt_api_version -ge 3; then
36975           gt_revision_test_code='
36976 #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
36977 #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
36978 #endif
36979 typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
36980 '
36981         else
36982           gt_revision_test_code=
36983         fi
36984         if test $gt_api_version -ge 2; then
36985           gt_expression_test_code=' + * ngettext ("", "", 0)'
36986         else
36987           gt_expression_test_code=
36988         fi
36989
36990         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5
36991 $as_echo_n "checking for GNU gettext in libc... " >&6; }
36992 if eval \${$gt_func_gnugettext_libc+:} false; then :
36993   $as_echo_n "(cached) " >&6
36994 else
36995   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36996 /* end confdefs.h.  */
36997
36998 #include <libintl.h>
36999 $gt_revision_test_code
37000 extern int _nl_msg_cat_cntr;
37001 extern int *_nl_domain_bindings;
37002
37003 int
37004 main ()
37005 {
37006
37007 bindtextdomain ("", "");
37008 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings
37009
37010   ;
37011   return 0;
37012 }
37013 _ACEOF
37014 if ac_fn_c_try_link "$LINENO"; then :
37015   eval "$gt_func_gnugettext_libc=yes"
37016 else
37017   eval "$gt_func_gnugettext_libc=no"
37018 fi
37019 rm -f core conftest.err conftest.$ac_objext \
37020     conftest$ac_exeext conftest.$ac_ext
37021 fi
37022 eval ac_res=\$$gt_func_gnugettext_libc
37023                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
37024 $as_echo "$ac_res" >&6; }
37025
37026         if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
37027
37028
37029
37030
37031
37032           am_save_CPPFLAGS="$CPPFLAGS"
37033
37034   for element in $INCICONV; do
37035     haveit=
37036     for x in $CPPFLAGS; do
37037
37038   acl_save_prefix="$prefix"
37039   prefix="$acl_final_prefix"
37040   acl_save_exec_prefix="$exec_prefix"
37041   exec_prefix="$acl_final_exec_prefix"
37042   eval x=\"$x\"
37043   exec_prefix="$acl_save_exec_prefix"
37044   prefix="$acl_save_prefix"
37045
37046       if test "X$x" = "X$element"; then
37047         haveit=yes
37048         break
37049       fi
37050     done
37051     if test -z "$haveit"; then
37052       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
37053     fi
37054   done
37055
37056
37057   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
37058 $as_echo_n "checking for iconv... " >&6; }
37059 if ${am_cv_func_iconv+:} false; then :
37060   $as_echo_n "(cached) " >&6
37061 else
37062
37063     am_cv_func_iconv="no, consider installing GNU libiconv"
37064     am_cv_lib_iconv=no
37065     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37066 /* end confdefs.h.  */
37067
37068 #include <stdlib.h>
37069 #include <iconv.h>
37070
37071 int
37072 main ()
37073 {
37074 iconv_t cd = iconv_open("","");
37075            iconv(cd,NULL,NULL,NULL,NULL);
37076            iconv_close(cd);
37077   ;
37078   return 0;
37079 }
37080 _ACEOF
37081 if ac_fn_c_try_link "$LINENO"; then :
37082   am_cv_func_iconv=yes
37083 fi
37084 rm -f core conftest.err conftest.$ac_objext \
37085     conftest$ac_exeext conftest.$ac_ext
37086     if test "$am_cv_func_iconv" != yes; then
37087       am_save_LIBS="$LIBS"
37088       LIBS="$LIBS $LIBICONV"
37089       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37090 /* end confdefs.h.  */
37091
37092 #include <stdlib.h>
37093 #include <iconv.h>
37094
37095 int
37096 main ()
37097 {
37098 iconv_t cd = iconv_open("","");
37099              iconv(cd,NULL,NULL,NULL,NULL);
37100              iconv_close(cd);
37101   ;
37102   return 0;
37103 }
37104 _ACEOF
37105 if ac_fn_c_try_link "$LINENO"; then :
37106   am_cv_lib_iconv=yes
37107         am_cv_func_iconv=yes
37108 fi
37109 rm -f core conftest.err conftest.$ac_objext \
37110     conftest$ac_exeext conftest.$ac_ext
37111       LIBS="$am_save_LIBS"
37112     fi
37113
37114 fi
37115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
37116 $as_echo "$am_cv_func_iconv" >&6; }
37117   if test "$am_cv_func_iconv" = yes; then
37118     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
37119 $as_echo_n "checking for working iconv... " >&6; }
37120 if ${am_cv_func_iconv_works+:} false; then :
37121   $as_echo_n "(cached) " >&6
37122 else
37123
37124                   am_save_LIBS="$LIBS"
37125       if test $am_cv_lib_iconv = yes; then
37126         LIBS="$LIBS $LIBICONV"
37127       fi
37128       if test "$cross_compiling" = yes; then :
37129
37130          case "$host_os" in
37131            aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
37132            *)            am_cv_func_iconv_works="guessing yes" ;;
37133          esac
37134
37135 else
37136   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37137 /* end confdefs.h.  */
37138
37139 #include <iconv.h>
37140 #include <string.h>
37141 int main ()
37142 {
37143   int result = 0;
37144   /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
37145      returns.  */
37146   {
37147     iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
37148     if (cd_utf8_to_88591 != (iconv_t)(-1))
37149       {
37150         static const char input[] = "\342\202\254"; /* EURO SIGN */
37151         char buf[10];
37152         const char *inptr = input;
37153         size_t inbytesleft = strlen (input);
37154         char *outptr = buf;
37155         size_t outbytesleft = sizeof (buf);
37156         size_t res = iconv (cd_utf8_to_88591,
37157                             (char **) &inptr, &inbytesleft,
37158                             &outptr, &outbytesleft);
37159         if (res == 0)
37160           result |= 1;
37161         iconv_close (cd_utf8_to_88591);
37162       }
37163   }
37164   /* Test against Solaris 10 bug: Failures are not distinguishable from
37165      successful returns.  */
37166   {
37167     iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
37168     if (cd_ascii_to_88591 != (iconv_t)(-1))
37169       {
37170         static const char input[] = "\263";
37171         char buf[10];
37172         const char *inptr = input;
37173         size_t inbytesleft = strlen (input);
37174         char *outptr = buf;
37175         size_t outbytesleft = sizeof (buf);
37176         size_t res = iconv (cd_ascii_to_88591,
37177                             (char **) &inptr, &inbytesleft,
37178                             &outptr, &outbytesleft);
37179         if (res == 0)
37180           result |= 2;
37181         iconv_close (cd_ascii_to_88591);
37182       }
37183   }
37184   /* Test against AIX 6.1..7.1 bug: Buffer overrun.  */
37185   {
37186     iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
37187     if (cd_88591_to_utf8 != (iconv_t)(-1))
37188       {
37189         static const char input[] = "\304";
37190         static char buf[2] = { (char)0xDE, (char)0xAD };
37191         const char *inptr = input;
37192         size_t inbytesleft = 1;
37193         char *outptr = buf;
37194         size_t outbytesleft = 1;
37195         size_t res = iconv (cd_88591_to_utf8,
37196                             (char **) &inptr, &inbytesleft,
37197                             &outptr, &outbytesleft);
37198         if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
37199           result |= 4;
37200         iconv_close (cd_88591_to_utf8);
37201       }
37202   }
37203 #if 0 /* This bug could be worked around by the caller.  */
37204   /* Test against HP-UX 11.11 bug: Positive return value instead of 0.  */
37205   {
37206     iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
37207     if (cd_88591_to_utf8 != (iconv_t)(-1))
37208       {
37209         static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
37210         char buf[50];
37211         const char *inptr = input;
37212         size_t inbytesleft = strlen (input);
37213         char *outptr = buf;
37214         size_t outbytesleft = sizeof (buf);
37215         size_t res = iconv (cd_88591_to_utf8,
37216                             (char **) &inptr, &inbytesleft,
37217                             &outptr, &outbytesleft);
37218         if ((int)res > 0)
37219           result |= 8;
37220         iconv_close (cd_88591_to_utf8);
37221       }
37222   }
37223 #endif
37224   /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
37225      provided.  */
37226   if (/* Try standardized names.  */
37227       iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
37228       /* Try IRIX, OSF/1 names.  */
37229       && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
37230       /* Try AIX names.  */
37231       && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
37232       /* Try HP-UX names.  */
37233       && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
37234     result |= 16;
37235   return result;
37236 }
37237 _ACEOF
37238 if ac_fn_c_try_run "$LINENO"; then :
37239   am_cv_func_iconv_works=yes
37240 else
37241   am_cv_func_iconv_works=no
37242 fi
37243 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
37244   conftest.$ac_objext conftest.beam conftest.$ac_ext
37245 fi
37246
37247       LIBS="$am_save_LIBS"
37248
37249 fi
37250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
37251 $as_echo "$am_cv_func_iconv_works" >&6; }
37252     case "$am_cv_func_iconv_works" in
37253       *no) am_func_iconv=no am_cv_lib_iconv=no ;;
37254       *)   am_func_iconv=yes ;;
37255     esac
37256   else
37257     am_func_iconv=no am_cv_lib_iconv=no
37258   fi
37259   if test "$am_func_iconv" = yes; then
37260
37261 $as_echo "#define HAVE_ICONV 1" >>confdefs.h
37262
37263   fi
37264   if test "$am_cv_lib_iconv" = yes; then
37265     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
37266 $as_echo_n "checking how to link with libiconv... " >&6; }
37267     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
37268 $as_echo "$LIBICONV" >&6; }
37269   else
37270             CPPFLAGS="$am_save_CPPFLAGS"
37271     LIBICONV=
37272     LTLIBICONV=
37273   fi
37274
37275
37276
37277
37278
37279
37280
37281
37282
37283
37284
37285     use_additional=yes
37286
37287   acl_save_prefix="$prefix"
37288   prefix="$acl_final_prefix"
37289   acl_save_exec_prefix="$exec_prefix"
37290   exec_prefix="$acl_final_exec_prefix"
37291
37292     eval additional_includedir=\"$includedir\"
37293     eval additional_libdir=\"$libdir\"
37294
37295   exec_prefix="$acl_save_exec_prefix"
37296   prefix="$acl_save_prefix"
37297
37298
37299 # Check whether --with-libintl-prefix was given.
37300 if test "${with_libintl_prefix+set}" = set; then :
37301   withval=$with_libintl_prefix;
37302     if test "X$withval" = "Xno"; then
37303       use_additional=no
37304     else
37305       if test "X$withval" = "X"; then
37306
37307   acl_save_prefix="$prefix"
37308   prefix="$acl_final_prefix"
37309   acl_save_exec_prefix="$exec_prefix"
37310   exec_prefix="$acl_final_exec_prefix"
37311
37312           eval additional_includedir=\"$includedir\"
37313           eval additional_libdir=\"$libdir\"
37314
37315   exec_prefix="$acl_save_exec_prefix"
37316   prefix="$acl_save_prefix"
37317
37318       else
37319         additional_includedir="$withval/include"
37320         additional_libdir="$withval/$acl_libdirstem"
37321         if test "$acl_libdirstem2" != "$acl_libdirstem" \
37322            && ! test -d "$withval/$acl_libdirstem"; then
37323           additional_libdir="$withval/$acl_libdirstem2"
37324         fi
37325       fi
37326     fi
37327
37328 fi
37329
37330       LIBINTL=
37331   LTLIBINTL=
37332   INCINTL=
37333   LIBINTL_PREFIX=
37334       HAVE_LIBINTL=
37335   rpathdirs=
37336   ltrpathdirs=
37337   names_already_handled=
37338   names_next_round='intl '
37339   while test -n "$names_next_round"; do
37340     names_this_round="$names_next_round"
37341     names_next_round=
37342     for name in $names_this_round; do
37343       already_handled=
37344       for n in $names_already_handled; do
37345         if test "$n" = "$name"; then
37346           already_handled=yes
37347           break
37348         fi
37349       done
37350       if test -z "$already_handled"; then
37351         names_already_handled="$names_already_handled $name"
37352                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
37353         eval value=\"\$HAVE_LIB$uppername\"
37354         if test -n "$value"; then
37355           if test "$value" = yes; then
37356             eval value=\"\$LIB$uppername\"
37357             test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value"
37358             eval value=\"\$LTLIB$uppername\"
37359             test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value"
37360           else
37361                                     :
37362           fi
37363         else
37364                               found_dir=
37365           found_la=
37366           found_so=
37367           found_a=
37368           eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
37369           if test -n "$acl_shlibext"; then
37370             shrext=".$acl_shlibext"             # typically: shrext=.so
37371           else
37372             shrext=
37373           fi
37374           if test $use_additional = yes; then
37375             dir="$additional_libdir"
37376                                     if test -n "$acl_shlibext"; then
37377               if test -f "$dir/$libname$shrext"; then
37378                 found_dir="$dir"
37379                 found_so="$dir/$libname$shrext"
37380               else
37381                 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
37382                   ver=`(cd "$dir" && \
37383                         for f in "$libname$shrext".*; do echo "$f"; done \
37384                         | sed -e "s,^$libname$shrext\\\\.,," \
37385                         | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
37386                         | sed 1q ) 2>/dev/null`
37387                   if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
37388                     found_dir="$dir"
37389                     found_so="$dir/$libname$shrext.$ver"
37390                   fi
37391                 else
37392                   eval library_names=\"$acl_library_names_spec\"
37393                   for f in $library_names; do
37394                     if test -f "$dir/$f"; then
37395                       found_dir="$dir"
37396                       found_so="$dir/$f"
37397                       break
37398                     fi
37399                   done
37400                 fi
37401               fi
37402             fi
37403                         if test "X$found_dir" = "X"; then
37404               if test -f "$dir/$libname.$acl_libext"; then
37405                 found_dir="$dir"
37406                 found_a="$dir/$libname.$acl_libext"
37407               fi
37408             fi
37409             if test "X$found_dir" != "X"; then
37410               if test -f "$dir/$libname.la"; then
37411                 found_la="$dir/$libname.la"
37412               fi
37413             fi
37414           fi
37415           if test "X$found_dir" = "X"; then
37416             for x in $LDFLAGS $LTLIBINTL; do
37417
37418   acl_save_prefix="$prefix"
37419   prefix="$acl_final_prefix"
37420   acl_save_exec_prefix="$exec_prefix"
37421   exec_prefix="$acl_final_exec_prefix"
37422   eval x=\"$x\"
37423   exec_prefix="$acl_save_exec_prefix"
37424   prefix="$acl_save_prefix"
37425
37426               case "$x" in
37427                 -L*)
37428                   dir=`echo "X$x" | sed -e 's/^X-L//'`
37429                                     if test -n "$acl_shlibext"; then
37430                     if test -f "$dir/$libname$shrext"; then
37431                       found_dir="$dir"
37432                       found_so="$dir/$libname$shrext"
37433                     else
37434                       if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
37435                         ver=`(cd "$dir" && \
37436                               for f in "$libname$shrext".*; do echo "$f"; done \
37437                               | sed -e "s,^$libname$shrext\\\\.,," \
37438                               | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
37439                               | sed 1q ) 2>/dev/null`
37440                         if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
37441                           found_dir="$dir"
37442                           found_so="$dir/$libname$shrext.$ver"
37443                         fi
37444                       else
37445                         eval library_names=\"$acl_library_names_spec\"
37446                         for f in $library_names; do
37447                           if test -f "$dir/$f"; then
37448                             found_dir="$dir"
37449                             found_so="$dir/$f"
37450                             break
37451                           fi
37452                         done
37453                       fi
37454                     fi
37455                   fi
37456                                     if test "X$found_dir" = "X"; then
37457                     if test -f "$dir/$libname.$acl_libext"; then
37458                       found_dir="$dir"
37459                       found_a="$dir/$libname.$acl_libext"
37460                     fi
37461                   fi
37462                   if test "X$found_dir" != "X"; then
37463                     if test -f "$dir/$libname.la"; then
37464                       found_la="$dir/$libname.la"
37465                     fi
37466                   fi
37467                   ;;
37468               esac
37469               if test "X$found_dir" != "X"; then
37470                 break
37471               fi
37472             done
37473           fi
37474           if test "X$found_dir" != "X"; then
37475                         LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name"
37476             if test "X$found_so" != "X"; then
37477                                                         if test "$enable_rpath" = no \
37478                  || test "X$found_dir" = "X/usr/$acl_libdirstem" \
37479                  || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
37480                                 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
37481               else
37482                                                                                 haveit=
37483                 for x in $ltrpathdirs; do
37484                   if test "X$x" = "X$found_dir"; then
37485                     haveit=yes
37486                     break
37487                   fi
37488                 done
37489                 if test -z "$haveit"; then
37490                   ltrpathdirs="$ltrpathdirs $found_dir"
37491                 fi
37492                                 if test "$acl_hardcode_direct" = yes; then
37493                                                       LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
37494                 else
37495                   if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
37496                                                             LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
37497                                                             haveit=
37498                     for x in $rpathdirs; do
37499                       if test "X$x" = "X$found_dir"; then
37500                         haveit=yes
37501                         break
37502                       fi
37503                     done
37504                     if test -z "$haveit"; then
37505                       rpathdirs="$rpathdirs $found_dir"
37506                     fi
37507                   else
37508                                                                                 haveit=
37509                     for x in $LDFLAGS $LIBINTL; do
37510
37511   acl_save_prefix="$prefix"
37512   prefix="$acl_final_prefix"
37513   acl_save_exec_prefix="$exec_prefix"
37514   exec_prefix="$acl_final_exec_prefix"
37515   eval x=\"$x\"
37516   exec_prefix="$acl_save_exec_prefix"
37517   prefix="$acl_save_prefix"
37518
37519                       if test "X$x" = "X-L$found_dir"; then
37520                         haveit=yes
37521                         break
37522                       fi
37523                     done
37524                     if test -z "$haveit"; then
37525                       LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir"
37526                     fi
37527                     if test "$acl_hardcode_minus_L" != no; then
37528                                                                                         LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
37529                     else
37530                                                                                                                                                                                 LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
37531                     fi
37532                   fi
37533                 fi
37534               fi
37535             else
37536               if test "X$found_a" != "X"; then
37537                                 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a"
37538               else
37539                                                 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name"
37540               fi
37541             fi
37542                         additional_includedir=
37543             case "$found_dir" in
37544               */$acl_libdirstem | */$acl_libdirstem/)
37545                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
37546                 if test "$name" = 'intl'; then
37547                   LIBINTL_PREFIX="$basedir"
37548                 fi
37549                 additional_includedir="$basedir/include"
37550                 ;;
37551               */$acl_libdirstem2 | */$acl_libdirstem2/)
37552                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
37553                 if test "$name" = 'intl'; then
37554                   LIBINTL_PREFIX="$basedir"
37555                 fi
37556                 additional_includedir="$basedir/include"
37557                 ;;
37558             esac
37559             if test "X$additional_includedir" != "X"; then
37560                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
37561                 haveit=
37562                 if test "X$additional_includedir" = "X/usr/local/include"; then
37563                   if test -n "$GCC"; then
37564                     case $host_os in
37565                       linux* | gnu* | k*bsd*-gnu) haveit=yes;;
37566                     esac
37567                   fi
37568                 fi
37569                 if test -z "$haveit"; then
37570                   for x in $CPPFLAGS $INCINTL; do
37571
37572   acl_save_prefix="$prefix"
37573   prefix="$acl_final_prefix"
37574   acl_save_exec_prefix="$exec_prefix"
37575   exec_prefix="$acl_final_exec_prefix"
37576   eval x=\"$x\"
37577   exec_prefix="$acl_save_exec_prefix"
37578   prefix="$acl_save_prefix"
37579
37580                     if test "X$x" = "X-I$additional_includedir"; then
37581                       haveit=yes
37582                       break
37583                     fi
37584                   done
37585                   if test -z "$haveit"; then
37586                     if test -d "$additional_includedir"; then
37587                                             INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir"
37588                     fi
37589                   fi
37590                 fi
37591               fi
37592             fi
37593                         if test -n "$found_la"; then
37594                                                         save_libdir="$libdir"
37595               case "$found_la" in
37596                 */* | *\\*) . "$found_la" ;;
37597                 *) . "./$found_la" ;;
37598               esac
37599               libdir="$save_libdir"
37600                             for dep in $dependency_libs; do
37601                 case "$dep" in
37602                   -L*)
37603                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
37604                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
37605                        && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
37606                       haveit=
37607                       if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
37608                          || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
37609                         if test -n "$GCC"; then
37610                           case $host_os in
37611                             linux* | gnu* | k*bsd*-gnu) haveit=yes;;
37612                           esac
37613                         fi
37614                       fi
37615                       if test -z "$haveit"; then
37616                         haveit=
37617                         for x in $LDFLAGS $LIBINTL; do
37618
37619   acl_save_prefix="$prefix"
37620   prefix="$acl_final_prefix"
37621   acl_save_exec_prefix="$exec_prefix"
37622   exec_prefix="$acl_final_exec_prefix"
37623   eval x=\"$x\"
37624   exec_prefix="$acl_save_exec_prefix"
37625   prefix="$acl_save_prefix"
37626
37627                           if test "X$x" = "X-L$additional_libdir"; then
37628                             haveit=yes
37629                             break
37630                           fi
37631                         done
37632                         if test -z "$haveit"; then
37633                           if test -d "$additional_libdir"; then
37634                                                         LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir"
37635                           fi
37636                         fi
37637                         haveit=
37638                         for x in $LDFLAGS $LTLIBINTL; do
37639
37640   acl_save_prefix="$prefix"
37641   prefix="$acl_final_prefix"
37642   acl_save_exec_prefix="$exec_prefix"
37643   exec_prefix="$acl_final_exec_prefix"
37644   eval x=\"$x\"
37645   exec_prefix="$acl_save_exec_prefix"
37646   prefix="$acl_save_prefix"
37647
37648                           if test "X$x" = "X-L$additional_libdir"; then
37649                             haveit=yes
37650                             break
37651                           fi
37652                         done
37653                         if test -z "$haveit"; then
37654                           if test -d "$additional_libdir"; then
37655                                                         LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir"
37656                           fi
37657                         fi
37658                       fi
37659                     fi
37660                     ;;
37661                   -R*)
37662                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
37663                     if test "$enable_rpath" != no; then
37664                                                                   haveit=
37665                       for x in $rpathdirs; do
37666                         if test "X$x" = "X$dir"; then
37667                           haveit=yes
37668                           break
37669                         fi
37670                       done
37671                       if test -z "$haveit"; then
37672                         rpathdirs="$rpathdirs $dir"
37673                       fi
37674                                                                   haveit=
37675                       for x in $ltrpathdirs; do
37676                         if test "X$x" = "X$dir"; then
37677                           haveit=yes
37678                           break
37679                         fi
37680                       done
37681                       if test -z "$haveit"; then
37682                         ltrpathdirs="$ltrpathdirs $dir"
37683                       fi
37684                     fi
37685                     ;;
37686                   -l*)
37687                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
37688                     ;;
37689                   *.la)
37690                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
37691                     ;;
37692                   *)
37693                                         LIBINTL="${LIBINTL}${LIBINTL:+ }$dep"
37694                     LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep"
37695                     ;;
37696                 esac
37697               done
37698             fi
37699           else
37700                                                             LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
37701             LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name"
37702           fi
37703         fi
37704       fi
37705     done
37706   done
37707   if test "X$rpathdirs" != "X"; then
37708     if test -n "$acl_hardcode_libdir_separator"; then
37709                         alldirs=
37710       for found_dir in $rpathdirs; do
37711         alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
37712       done
37713             acl_save_libdir="$libdir"
37714       libdir="$alldirs"
37715       eval flag=\"$acl_hardcode_libdir_flag_spec\"
37716       libdir="$acl_save_libdir"
37717       LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
37718     else
37719             for found_dir in $rpathdirs; do
37720         acl_save_libdir="$libdir"
37721         libdir="$found_dir"
37722         eval flag=\"$acl_hardcode_libdir_flag_spec\"
37723         libdir="$acl_save_libdir"
37724         LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
37725       done
37726     fi
37727   fi
37728   if test "X$ltrpathdirs" != "X"; then
37729             for found_dir in $ltrpathdirs; do
37730       LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir"
37731     done
37732   fi
37733
37734
37735
37736
37737
37738
37739           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5
37740 $as_echo_n "checking for GNU gettext in libintl... " >&6; }
37741 if eval \${$gt_func_gnugettext_libintl+:} false; then :
37742   $as_echo_n "(cached) " >&6
37743 else
37744   gt_save_CPPFLAGS="$CPPFLAGS"
37745             CPPFLAGS="$CPPFLAGS $INCINTL"
37746             gt_save_LIBS="$LIBS"
37747             LIBS="$LIBS $LIBINTL"
37748                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37749 /* end confdefs.h.  */
37750
37751 #include <libintl.h>
37752 $gt_revision_test_code
37753 extern int _nl_msg_cat_cntr;
37754 extern
37755 #ifdef __cplusplus
37756 "C"
37757 #endif
37758 const char *_nl_expand_alias (const char *);
37759
37760 int
37761 main ()
37762 {
37763
37764 bindtextdomain ("", "");
37765 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
37766
37767   ;
37768   return 0;
37769 }
37770 _ACEOF
37771 if ac_fn_c_try_link "$LINENO"; then :
37772   eval "$gt_func_gnugettext_libintl=yes"
37773 else
37774   eval "$gt_func_gnugettext_libintl=no"
37775 fi
37776 rm -f core conftest.err conftest.$ac_objext \
37777     conftest$ac_exeext conftest.$ac_ext
37778                         if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
37779               LIBS="$LIBS $LIBICONV"
37780               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37781 /* end confdefs.h.  */
37782
37783 #include <libintl.h>
37784 $gt_revision_test_code
37785 extern int _nl_msg_cat_cntr;
37786 extern
37787 #ifdef __cplusplus
37788 "C"
37789 #endif
37790 const char *_nl_expand_alias (const char *);
37791
37792 int
37793 main ()
37794 {
37795
37796 bindtextdomain ("", "");
37797 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
37798
37799   ;
37800   return 0;
37801 }
37802 _ACEOF
37803 if ac_fn_c_try_link "$LINENO"; then :
37804   LIBINTL="$LIBINTL $LIBICONV"
37805                  LTLIBINTL="$LTLIBINTL $LTLIBICONV"
37806                  eval "$gt_func_gnugettext_libintl=yes"
37807
37808 fi
37809 rm -f core conftest.err conftest.$ac_objext \
37810     conftest$ac_exeext conftest.$ac_ext
37811             fi
37812             CPPFLAGS="$gt_save_CPPFLAGS"
37813             LIBS="$gt_save_LIBS"
37814 fi
37815 eval ac_res=\$$gt_func_gnugettext_libintl
37816                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
37817 $as_echo "$ac_res" >&6; }
37818         fi
37819
37820                                         if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
37821            || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
37822                 && test "$PACKAGE" != gettext-runtime \
37823                 && test "$PACKAGE" != gettext-tools; }; then
37824           gt_use_preinstalled_gnugettext=yes
37825         else
37826                     LIBINTL=
37827           LTLIBINTL=
37828           INCINTL=
37829         fi
37830
37831
37832
37833     if test -n "$INTL_MACOSX_LIBS"; then
37834       if test "$gt_use_preinstalled_gnugettext" = "yes" \
37835          || test "$nls_cv_use_gnu_gettext" = "yes"; then
37836                 LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
37837         LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
37838       fi
37839     fi
37840
37841     if test "$gt_use_preinstalled_gnugettext" = "yes" \
37842        || test "$nls_cv_use_gnu_gettext" = "yes"; then
37843
37844 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
37845
37846     else
37847       USE_NLS=no
37848     fi
37849   fi
37850
37851   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5
37852 $as_echo_n "checking whether to use NLS... " >&6; }
37853   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
37854 $as_echo "$USE_NLS" >&6; }
37855   if test "$USE_NLS" = "yes"; then
37856     { $as_echo "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5
37857 $as_echo_n "checking where the gettext function comes from... " >&6; }
37858     if test "$gt_use_preinstalled_gnugettext" = "yes"; then
37859       if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
37860         gt_source="external libintl"
37861       else
37862         gt_source="libc"
37863       fi
37864     else
37865       gt_source="included intl directory"
37866     fi
37867     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5
37868 $as_echo "$gt_source" >&6; }
37869   fi
37870
37871   if test "$USE_NLS" = "yes"; then
37872
37873     if test "$gt_use_preinstalled_gnugettext" = "yes"; then
37874       if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
37875         { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5
37876 $as_echo_n "checking how to link with libintl... " >&6; }
37877         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5
37878 $as_echo "$LIBINTL" >&6; }
37879
37880   for element in $INCINTL; do
37881     haveit=
37882     for x in $CPPFLAGS; do
37883
37884   acl_save_prefix="$prefix"
37885   prefix="$acl_final_prefix"
37886   acl_save_exec_prefix="$exec_prefix"
37887   exec_prefix="$acl_final_exec_prefix"
37888   eval x=\"$x\"
37889   exec_prefix="$acl_save_exec_prefix"
37890   prefix="$acl_save_prefix"
37891
37892       if test "X$x" = "X$element"; then
37893         haveit=yes
37894         break
37895       fi
37896     done
37897     if test -z "$haveit"; then
37898       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
37899     fi
37900   done
37901
37902       fi
37903
37904
37905 $as_echo "#define HAVE_GETTEXT 1" >>confdefs.h
37906
37907
37908 $as_echo "#define HAVE_DCGETTEXT 1" >>confdefs.h
37909
37910     fi
37911
37912         POSUB=po
37913   fi
37914
37915
37916
37917     INTLLIBS="$LIBINTL"
37918
37919
37920
37921
37922
37923
37924
37925
37926 # Initialize the test suite.
37927 ac_config_commands="$ac_config_commands tests/atconfig"
37928
37929 ac_config_files="$ac_config_files tests/Makefile tests/atlocal"
37930  # FIXME: tests/preset?
37931
37932 AUTOM4TE=${AUTOM4TE-"${am_missing_run}autom4te"}
37933
37934
37935
37936
37937 # Check whether --enable-backup-scripts was given.
37938 if test "${enable_backup_scripts+set}" = set; then :
37939   enableval=$enable_backup_scripts; case $enableval in
37940                yes) BACKUP_LIBEXEC_SCRIPTS='$(BACKUP_LIBEXEC_SCRIPTS_LIST)'
37941                     BACKUP_SBIN_SCRIPTS='$(BACKUP_SBIN_SCRIPTS_LIST)'
37942                     ;;
37943                esac
37944 fi
37945
37946
37947
37948 if date +%Y-%m-%d 2>/dev/null >&2; then
37949         BACKUP_SED_COND='/^\#ELSE_DATE_FORMAT_OK/,/^\#ENDIF_DATE_FORMAT_OK/d;/^\#IF_DATE_FORMAT_OK/d'
37950 else
37951         BACKUP_SED_COND='/^\#IF_DATE_FORMAT_OK/,/^\#ELSE_DATE_FORMAT_OK/d;/^\#ENDIF_DATE_FORMAT_OK/d'
37952 fi
37953
37954 ac_config_files="$ac_config_files Makefile doc/Makefile gnu/Makefile lib/Makefile po/Makefile.in scripts/Makefile rmt/Makefile src/Makefile"
37955
37956 cat >confcache <<\_ACEOF
37957 # This file is a shell script that caches the results of configure
37958 # tests run on this system so they can be shared between configure
37959 # scripts and configure runs, see configure's option --config-cache.
37960 # It is not useful on other systems.  If it contains results you don't
37961 # want to keep, you may remove or edit it.
37962 #
37963 # config.status only pays attention to the cache file if you give it
37964 # the --recheck option to rerun configure.
37965 #
37966 # `ac_cv_env_foo' variables (set or unset) will be overridden when
37967 # loading this file, other *unset* `ac_cv_foo' will be assigned the
37968 # following values.
37969
37970 _ACEOF
37971
37972 # The following way of writing the cache mishandles newlines in values,
37973 # but we know of no workaround that is simple, portable, and efficient.
37974 # So, we kill variables containing newlines.
37975 # Ultrix sh set writes to stderr and can't be redirected directly,
37976 # and sets the high bit in the cache file unless we assign to the vars.
37977 (
37978   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
37979     eval ac_val=\$$ac_var
37980     case $ac_val in #(
37981     *${as_nl}*)
37982       case $ac_var in #(
37983       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
37984 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
37985       esac
37986       case $ac_var in #(
37987       _ | IFS | as_nl) ;; #(
37988       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
37989       *) { eval $ac_var=; unset $ac_var;} ;;
37990       esac ;;
37991     esac
37992   done
37993
37994   (set) 2>&1 |
37995     case $as_nl`(ac_space=' '; set) 2>&1` in #(
37996     *${as_nl}ac_space=\ *)
37997       # `set' does not quote correctly, so add quotes: double-quote
37998       # substitution turns \\\\ into \\, and sed turns \\ into \.
37999       sed -n \
38000         "s/'/'\\\\''/g;
38001           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
38002       ;; #(
38003     *)
38004       # `set' quotes correctly as required by POSIX, so do not add quotes.
38005       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
38006       ;;
38007     esac |
38008     sort
38009 ) |
38010   sed '
38011      /^ac_cv_env_/b end
38012      t clear
38013      :clear
38014      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
38015      t end
38016      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
38017      :end' >>confcache
38018 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
38019   if test -w "$cache_file"; then
38020     if test "x$cache_file" != "x/dev/null"; then
38021       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
38022 $as_echo "$as_me: updating cache $cache_file" >&6;}
38023       if test ! -f "$cache_file" || test -h "$cache_file"; then
38024         cat confcache >"$cache_file"
38025       else
38026         case $cache_file in #(
38027         */* | ?:*)
38028           mv -f confcache "$cache_file"$$ &&
38029           mv -f "$cache_file"$$ "$cache_file" ;; #(
38030         *)
38031           mv -f confcache "$cache_file" ;;
38032         esac
38033       fi
38034     fi
38035   else
38036     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
38037 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
38038   fi
38039 fi
38040 rm -f confcache
38041
38042 test "x$prefix" = xNONE && prefix=$ac_default_prefix
38043 # Let make expand exec_prefix.
38044 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
38045
38046 DEFS=-DHAVE_CONFIG_H
38047
38048 ac_libobjs=
38049 ac_ltlibobjs=
38050 U=
38051 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
38052   # 1. Remove the extension, and $U if already installed.
38053   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
38054   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
38055   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
38056   #    will be set to the directory where LIBOBJS objects are built.
38057   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
38058   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
38059 done
38060 LIBOBJS=$ac_libobjs
38061
38062 LTLIBOBJS=$ac_ltlibobjs
38063
38064
38065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
38066 $as_echo_n "checking that generated files are newer than configure... " >&6; }
38067    if test -n "$am_sleep_pid"; then
38068      # Hide warnings about reused PIDs.
38069      wait $am_sleep_pid 2>/dev/null
38070    fi
38071    { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
38072 $as_echo "done" >&6; }
38073  if test -n "$EXEEXT"; then
38074   am__EXEEXT_TRUE=
38075   am__EXEEXT_FALSE='#'
38076 else
38077   am__EXEEXT_TRUE='#'
38078   am__EXEEXT_FALSE=
38079 fi
38080
38081 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
38082   as_fn_error $? "conditional \"AMDEP\" was never defined.
38083 Usually this means the macro was only invoked conditionally." "$LINENO" 5
38084 fi
38085 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
38086   as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
38087 Usually this means the macro was only invoked conditionally." "$LINENO" 5
38088 fi
38089 if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
38090   as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined.
38091 Usually this means the macro was only invoked conditionally." "$LINENO" 5
38092 fi
38093 if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
38094   as_fn_error $? "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
38095 Usually this means the macro was only invoked conditionally." "$LINENO" 5
38096 fi
38097 if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
38098   as_fn_error $? "conditional \"GL_GENERATE_ERRNO_H\" was never defined.
38099 Usually this means the macro was only invoked conditionally." "$LINENO" 5
38100 fi
38101 if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then
38102   as_fn_error $? "conditional \"GL_GENERATE_FLOAT_H\" was never defined.
38103 Usually this means the macro was only invoked conditionally." "$LINENO" 5
38104 fi
38105 if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then
38106   as_fn_error $? "conditional \"GL_GENERATE_FNMATCH_H\" was never defined.
38107 Usually this means the macro was only invoked conditionally." "$LINENO" 5
38108 fi
38109 if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
38110   as_fn_error $? "conditional \"GL_GENERATE_STDINT_H\" was never defined.
38111 Usually this means the macro was only invoked conditionally." "$LINENO" 5
38112 fi
38113 if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
38114   as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
38115 Usually this means the macro was only invoked conditionally." "$LINENO" 5
38116 fi
38117 if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
38118   as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
38119 Usually this means the macro was only invoked conditionally." "$LINENO" 5
38120 fi
38121 if test -z "${GL_GENERATE_SELINUX_CONTEXT_H_TRUE}" && test -z "${GL_GENERATE_SELINUX_CONTEXT_H_FALSE}"; then
38122   as_fn_error $? "conditional \"GL_GENERATE_SELINUX_CONTEXT_H\" was never defined.
38123 Usually this means the macro was only invoked conditionally." "$LINENO" 5
38124 fi
38125 if test -z "${GL_GENERATE_STDALIGN_H_TRUE}" && test -z "${GL_GENERATE_STDALIGN_H_FALSE}"; then
38126   as_fn_error $? "conditional \"GL_GENERATE_STDALIGN_H\" was never defined.
38127 Usually this means the macro was only invoked conditionally." "$LINENO" 5
38128 fi
38129 if test -z "${GL_GENERATE_STDARG_H_TRUE}" && test -z "${GL_GENERATE_STDARG_H_FALSE}"; then
38130   as_fn_error $? "conditional \"GL_GENERATE_STDARG_H\" was never defined.
38131 Usually this means the macro was only invoked conditionally." "$LINENO" 5
38132 fi
38133 if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
38134   as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
38135 Usually this means the macro was only invoked conditionally." "$LINENO" 5
38136 fi
38137 if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
38138   as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
38139 Usually this means the macro was only invoked conditionally." "$LINENO" 5
38140 fi
38141 if test -z "${GL_GENERATE_SYSEXITS_H_TRUE}" && test -z "${GL_GENERATE_SYSEXITS_H_FALSE}"; then
38142   as_fn_error $? "conditional \"GL_GENERATE_SYSEXITS_H\" was never defined.
38143 Usually this means the macro was only invoked conditionally." "$LINENO" 5
38144 fi
38145 if test -z "${LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE}"; then
38146   as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH\" was never defined.
38147 Usually this means the macro was only invoked conditionally." "$LINENO" 5
38148 fi
38149
38150
38151     gl_libobjs=
38152     gl_ltlibobjs=
38153     if test -n "$gl_LIBOBJS"; then
38154       # Remove the extension.
38155       sed_drop_objext='s/\.o$//;s/\.obj$//'
38156       for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
38157         gl_libobjs="$gl_libobjs $i.$ac_objext"
38158         gl_ltlibobjs="$gl_ltlibobjs $i.lo"
38159       done
38160     fi
38161     gl_LIBOBJS=$gl_libobjs
38162
38163     gl_LTLIBOBJS=$gl_ltlibobjs
38164
38165
38166
38167     gltests_libobjs=
38168     gltests_ltlibobjs=
38169     if test -n "$gltests_LIBOBJS"; then
38170       # Remove the extension.
38171       sed_drop_objext='s/\.o$//;s/\.obj$//'
38172       for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
38173         gltests_libobjs="$gltests_libobjs $i.$ac_objext"
38174         gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
38175       done
38176     fi
38177     gltests_LIBOBJS=$gltests_libobjs
38178
38179     gltests_LTLIBOBJS=$gltests_ltlibobjs
38180
38181
38182 if test -z "${PU_RMT_COND_TRUE}" && test -z "${PU_RMT_COND_FALSE}"; then
38183   as_fn_error $? "conditional \"PU_RMT_COND\" was never defined.
38184 Usually this means the macro was only invoked conditionally." "$LINENO" 5
38185 fi
38186 if test -z "${TAR_COND_XATTR_H_TRUE}" && test -z "${TAR_COND_XATTR_H_FALSE}"; then
38187   as_fn_error $? "conditional \"TAR_COND_XATTR_H\" was never defined.
38188 Usually this means the macro was only invoked conditionally." "$LINENO" 5
38189 fi
38190 if test -z "${TAR_LIB_ATTR_TRUE}" && test -z "${TAR_LIB_ATTR_FALSE}"; then
38191   as_fn_error $? "conditional \"TAR_LIB_ATTR\" was never defined.
38192 Usually this means the macro was only invoked conditionally." "$LINENO" 5
38193 fi
38194 if test -z "${TAR_COND_XATTR_H_TRUE}" && test -z "${TAR_COND_XATTR_H_FALSE}"; then
38195   as_fn_error $? "conditional \"TAR_COND_XATTR_H\" was never defined.
38196 Usually this means the macro was only invoked conditionally." "$LINENO" 5
38197 fi
38198 if test -z "${TAR_LIB_ATTR_TRUE}" && test -z "${TAR_LIB_ATTR_FALSE}"; then
38199   as_fn_error $? "conditional \"TAR_LIB_ATTR\" was never defined.
38200 Usually this means the macro was only invoked conditionally." "$LINENO" 5
38201 fi
38202 if test -z "${TAR_COND_GRANTPT_TRUE}" && test -z "${TAR_COND_GRANTPT_FALSE}"; then
38203   as_fn_error $? "conditional \"TAR_COND_GRANTPT\" was never defined.
38204 Usually this means the macro was only invoked conditionally." "$LINENO" 5
38205 fi
38206
38207 : "${CONFIG_STATUS=./config.status}"
38208 ac_write_fail=0
38209 ac_clean_files_save=$ac_clean_files
38210 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
38211 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
38212 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
38213 as_write_fail=0
38214 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
38215 #! $SHELL
38216 # Generated by $as_me.
38217 # Run this file to recreate the current configuration.
38218 # Compiler output produced by configure, useful for debugging
38219 # configure, is in config.log if it exists.
38220
38221 debug=false
38222 ac_cs_recheck=false
38223 ac_cs_silent=false
38224
38225 SHELL=\${CONFIG_SHELL-$SHELL}
38226 export SHELL
38227 _ASEOF
38228 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
38229 ## -------------------- ##
38230 ## M4sh Initialization. ##
38231 ## -------------------- ##
38232
38233 # Be more Bourne compatible
38234 DUALCASE=1; export DUALCASE # for MKS sh
38235 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
38236   emulate sh
38237   NULLCMD=:
38238   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
38239   # is contrary to our usage.  Disable this feature.
38240   alias -g '${1+"$@"}'='"$@"'
38241   setopt NO_GLOB_SUBST
38242 else
38243   case `(set -o) 2>/dev/null` in #(
38244   *posix*) :
38245     set -o posix ;; #(
38246   *) :
38247      ;;
38248 esac
38249 fi
38250
38251
38252 as_nl='
38253 '
38254 export as_nl
38255 # Printing a long string crashes Solaris 7 /usr/bin/printf.
38256 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
38257 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
38258 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
38259 # Prefer a ksh shell builtin over an external printf program on Solaris,
38260 # but without wasting forks for bash or zsh.
38261 if test -z "$BASH_VERSION$ZSH_VERSION" \
38262     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
38263   as_echo='print -r --'
38264   as_echo_n='print -rn --'
38265 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
38266   as_echo='printf %s\n'
38267   as_echo_n='printf %s'
38268 else
38269   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
38270     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
38271     as_echo_n='/usr/ucb/echo -n'
38272   else
38273     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
38274     as_echo_n_body='eval
38275       arg=$1;
38276       case $arg in #(
38277       *"$as_nl"*)
38278         expr "X$arg" : "X\\(.*\\)$as_nl";
38279         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
38280       esac;
38281       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
38282     '
38283     export as_echo_n_body
38284     as_echo_n='sh -c $as_echo_n_body as_echo'
38285   fi
38286   export as_echo_body
38287   as_echo='sh -c $as_echo_body as_echo'
38288 fi
38289
38290 # The user is always right.
38291 if test "${PATH_SEPARATOR+set}" != set; then
38292   PATH_SEPARATOR=:
38293   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
38294     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
38295       PATH_SEPARATOR=';'
38296   }
38297 fi
38298
38299
38300 # IFS
38301 # We need space, tab and new line, in precisely that order.  Quoting is
38302 # there to prevent editors from complaining about space-tab.
38303 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
38304 # splitting by setting IFS to empty value.)
38305 IFS=" ""        $as_nl"
38306
38307 # Find who we are.  Look in the path if we contain no directory separator.
38308 as_myself=
38309 case $0 in #((
38310   *[\\/]* ) as_myself=$0 ;;
38311   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38312 for as_dir in $PATH
38313 do
38314   IFS=$as_save_IFS
38315   test -z "$as_dir" && as_dir=.
38316     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
38317   done
38318 IFS=$as_save_IFS
38319
38320      ;;
38321 esac
38322 # We did not find ourselves, most probably we were run as `sh COMMAND'
38323 # in which case we are not to be found in the path.
38324 if test "x$as_myself" = x; then
38325   as_myself=$0
38326 fi
38327 if test ! -f "$as_myself"; then
38328   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
38329   exit 1
38330 fi
38331
38332 # Unset variables that we do not need and which cause bugs (e.g. in
38333 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
38334 # suppresses any "Segmentation fault" message there.  '((' could
38335 # trigger a bug in pdksh 5.2.14.
38336 for as_var in BASH_ENV ENV MAIL MAILPATH
38337 do eval test x\${$as_var+set} = xset \
38338   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
38339 done
38340 PS1='$ '
38341 PS2='> '
38342 PS4='+ '
38343
38344 # NLS nuisances.
38345 LC_ALL=C
38346 export LC_ALL
38347 LANGUAGE=C
38348 export LANGUAGE
38349
38350 # CDPATH.
38351 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
38352
38353
38354 # as_fn_error STATUS ERROR [LINENO LOG_FD]
38355 # ----------------------------------------
38356 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
38357 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
38358 # script with STATUS, using 1 if that was 0.
38359 as_fn_error ()
38360 {
38361   as_status=$1; test $as_status -eq 0 && as_status=1
38362   if test "$4"; then
38363     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
38364     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
38365   fi
38366   $as_echo "$as_me: error: $2" >&2
38367   as_fn_exit $as_status
38368 } # as_fn_error
38369
38370
38371 # as_fn_set_status STATUS
38372 # -----------------------
38373 # Set $? to STATUS, without forking.
38374 as_fn_set_status ()
38375 {
38376   return $1
38377 } # as_fn_set_status
38378
38379 # as_fn_exit STATUS
38380 # -----------------
38381 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
38382 as_fn_exit ()
38383 {
38384   set +e
38385   as_fn_set_status $1
38386   exit $1
38387 } # as_fn_exit
38388
38389 # as_fn_unset VAR
38390 # ---------------
38391 # Portably unset VAR.
38392 as_fn_unset ()
38393 {
38394   { eval $1=; unset $1;}
38395 }
38396 as_unset=as_fn_unset
38397 # as_fn_append VAR VALUE
38398 # ----------------------
38399 # Append the text in VALUE to the end of the definition contained in VAR. Take
38400 # advantage of any shell optimizations that allow amortized linear growth over
38401 # repeated appends, instead of the typical quadratic growth present in naive
38402 # implementations.
38403 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
38404   eval 'as_fn_append ()
38405   {
38406     eval $1+=\$2
38407   }'
38408 else
38409   as_fn_append ()
38410   {
38411     eval $1=\$$1\$2
38412   }
38413 fi # as_fn_append
38414
38415 # as_fn_arith ARG...
38416 # ------------------
38417 # Perform arithmetic evaluation on the ARGs, and store the result in the
38418 # global $as_val. Take advantage of shells that can avoid forks. The arguments
38419 # must be portable across $(()) and expr.
38420 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
38421   eval 'as_fn_arith ()
38422   {
38423     as_val=$(( $* ))
38424   }'
38425 else
38426   as_fn_arith ()
38427   {
38428     as_val=`expr "$@" || test $? -eq 1`
38429   }
38430 fi # as_fn_arith
38431
38432
38433 if expr a : '\(a\)' >/dev/null 2>&1 &&
38434    test "X`expr 00001 : '.*\(...\)'`" = X001; then
38435   as_expr=expr
38436 else
38437   as_expr=false
38438 fi
38439
38440 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
38441   as_basename=basename
38442 else
38443   as_basename=false
38444 fi
38445
38446 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
38447   as_dirname=dirname
38448 else
38449   as_dirname=false
38450 fi
38451
38452 as_me=`$as_basename -- "$0" ||
38453 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
38454          X"$0" : 'X\(//\)$' \| \
38455          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
38456 $as_echo X/"$0" |
38457     sed '/^.*\/\([^/][^/]*\)\/*$/{
38458             s//\1/
38459             q
38460           }
38461           /^X\/\(\/\/\)$/{
38462             s//\1/
38463             q
38464           }
38465           /^X\/\(\/\).*/{
38466             s//\1/
38467             q
38468           }
38469           s/.*/./; q'`
38470
38471 # Avoid depending upon Character Ranges.
38472 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
38473 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
38474 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
38475 as_cr_digits='0123456789'
38476 as_cr_alnum=$as_cr_Letters$as_cr_digits
38477
38478 ECHO_C= ECHO_N= ECHO_T=
38479 case `echo -n x` in #(((((
38480 -n*)
38481   case `echo 'xy\c'` in
38482   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
38483   xy)  ECHO_C='\c';;
38484   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
38485        ECHO_T=' ';;
38486   esac;;
38487 *)
38488   ECHO_N='-n';;
38489 esac
38490
38491 rm -f conf$$ conf$$.exe conf$$.file
38492 if test -d conf$$.dir; then
38493   rm -f conf$$.dir/conf$$.file
38494 else
38495   rm -f conf$$.dir
38496   mkdir conf$$.dir 2>/dev/null
38497 fi
38498 if (echo >conf$$.file) 2>/dev/null; then
38499   if ln -s conf$$.file conf$$ 2>/dev/null; then
38500     as_ln_s='ln -s'
38501     # ... but there are two gotchas:
38502     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
38503     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
38504     # In both cases, we have to default to `cp -pR'.
38505     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
38506       as_ln_s='cp -pR'
38507   elif ln conf$$.file conf$$ 2>/dev/null; then
38508     as_ln_s=ln
38509   else
38510     as_ln_s='cp -pR'
38511   fi
38512 else
38513   as_ln_s='cp -pR'
38514 fi
38515 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
38516 rmdir conf$$.dir 2>/dev/null
38517
38518
38519 # as_fn_mkdir_p
38520 # -------------
38521 # Create "$as_dir" as a directory, including parents if necessary.
38522 as_fn_mkdir_p ()
38523 {
38524
38525   case $as_dir in #(
38526   -*) as_dir=./$as_dir;;
38527   esac
38528   test -d "$as_dir" || eval $as_mkdir_p || {
38529     as_dirs=
38530     while :; do
38531       case $as_dir in #(
38532       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
38533       *) as_qdir=$as_dir;;
38534       esac
38535       as_dirs="'$as_qdir' $as_dirs"
38536       as_dir=`$as_dirname -- "$as_dir" ||
38537 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
38538          X"$as_dir" : 'X\(//\)[^/]' \| \
38539          X"$as_dir" : 'X\(//\)$' \| \
38540          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
38541 $as_echo X"$as_dir" |
38542     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
38543             s//\1/
38544             q
38545           }
38546           /^X\(\/\/\)[^/].*/{
38547             s//\1/
38548             q
38549           }
38550           /^X\(\/\/\)$/{
38551             s//\1/
38552             q
38553           }
38554           /^X\(\/\).*/{
38555             s//\1/
38556             q
38557           }
38558           s/.*/./; q'`
38559       test -d "$as_dir" && break
38560     done
38561     test -z "$as_dirs" || eval "mkdir $as_dirs"
38562   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
38563
38564
38565 } # as_fn_mkdir_p
38566 if mkdir -p . 2>/dev/null; then
38567   as_mkdir_p='mkdir -p "$as_dir"'
38568 else
38569   test -d ./-p && rmdir ./-p
38570   as_mkdir_p=false
38571 fi
38572
38573
38574 # as_fn_executable_p FILE
38575 # -----------------------
38576 # Test if FILE is an executable regular file.
38577 as_fn_executable_p ()
38578 {
38579   test -f "$1" && test -x "$1"
38580 } # as_fn_executable_p
38581 as_test_x='test -x'
38582 as_executable_p=as_fn_executable_p
38583
38584 # Sed expression to map a string onto a valid CPP name.
38585 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
38586
38587 # Sed expression to map a string onto a valid variable name.
38588 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
38589
38590
38591 exec 6>&1
38592 ## ----------------------------------- ##
38593 ## Main body of $CONFIG_STATUS script. ##
38594 ## ----------------------------------- ##
38595 _ASEOF
38596 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
38597
38598 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
38599 # Save the log message, to keep $0 and so on meaningful, and to
38600 # report actual input values of CONFIG_FILES etc. instead of their
38601 # values after options handling.
38602 ac_log="
38603 This file was extended by GNU tar $as_me 1.28, which was
38604 generated by GNU Autoconf 2.69.  Invocation command line was
38605
38606   CONFIG_FILES    = $CONFIG_FILES
38607   CONFIG_HEADERS  = $CONFIG_HEADERS
38608   CONFIG_LINKS    = $CONFIG_LINKS
38609   CONFIG_COMMANDS = $CONFIG_COMMANDS
38610   $ $0 $@
38611
38612 on `(hostname || uname -n) 2>/dev/null | sed 1q`
38613 "
38614
38615 _ACEOF
38616
38617 case $ac_config_files in *"
38618 "*) set x $ac_config_files; shift; ac_config_files=$*;;
38619 esac
38620
38621 case $ac_config_headers in *"
38622 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
38623 esac
38624
38625
38626 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
38627 # Files that config.status was made for.
38628 config_files="$ac_config_files"
38629 config_headers="$ac_config_headers"
38630 config_commands="$ac_config_commands"
38631
38632 _ACEOF
38633
38634 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
38635 ac_cs_usage="\
38636 \`$as_me' instantiates files and other configuration actions
38637 from templates according to the current configuration.  Unless the files
38638 and actions are specified as TAGs, all are instantiated by default.
38639
38640 Usage: $0 [OPTION]... [TAG]...
38641
38642   -h, --help       print this help, then exit
38643   -V, --version    print version number and configuration settings, then exit
38644       --config     print configuration, then exit
38645   -q, --quiet, --silent
38646                    do not print progress messages
38647   -d, --debug      don't remove temporary files
38648       --recheck    update $as_me by reconfiguring in the same conditions
38649       --file=FILE[:TEMPLATE]
38650                    instantiate the configuration file FILE
38651       --header=FILE[:TEMPLATE]
38652                    instantiate the configuration header FILE
38653
38654 Configuration files:
38655 $config_files
38656
38657 Configuration headers:
38658 $config_headers
38659
38660 Configuration commands:
38661 $config_commands
38662
38663 Report bugs to <bug-tar@gnu.org>.
38664 GNU tar home page: <http://www.gnu.org/software/tar/>.
38665 General help using GNU software: <http://www.gnu.org/gethelp/>."
38666
38667 _ACEOF
38668 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
38669 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
38670 ac_cs_version="\\
38671 GNU tar config.status 1.28
38672 configured by $0, generated by GNU Autoconf 2.69,
38673   with options \\"\$ac_cs_config\\"
38674
38675 Copyright (C) 2012 Free Software Foundation, Inc.
38676 This config.status script is free software; the Free Software Foundation
38677 gives unlimited permission to copy, distribute and modify it."
38678
38679 ac_pwd='$ac_pwd'
38680 srcdir='$srcdir'
38681 INSTALL='$INSTALL'
38682 MKDIR_P='$MKDIR_P'
38683 AWK='$AWK'
38684 test -n "\$AWK" || AWK=awk
38685 _ACEOF
38686
38687 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
38688 # The default lists apply if the user does not specify any file.
38689 ac_need_defaults=:
38690 while test $# != 0
38691 do
38692   case $1 in
38693   --*=?*)
38694     ac_option=`expr "X$1" : 'X\([^=]*\)='`
38695     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
38696     ac_shift=:
38697     ;;
38698   --*=)
38699     ac_option=`expr "X$1" : 'X\([^=]*\)='`
38700     ac_optarg=
38701     ac_shift=:
38702     ;;
38703   *)
38704     ac_option=$1
38705     ac_optarg=$2
38706     ac_shift=shift
38707     ;;
38708   esac
38709
38710   case $ac_option in
38711   # Handling of the options.
38712   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
38713     ac_cs_recheck=: ;;
38714   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
38715     $as_echo "$ac_cs_version"; exit ;;
38716   --config | --confi | --conf | --con | --co | --c )
38717     $as_echo "$ac_cs_config"; exit ;;
38718   --debug | --debu | --deb | --de | --d | -d )
38719     debug=: ;;
38720   --file | --fil | --fi | --f )
38721     $ac_shift
38722     case $ac_optarg in
38723     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
38724     '') as_fn_error $? "missing file argument" ;;
38725     esac
38726     as_fn_append CONFIG_FILES " '$ac_optarg'"
38727     ac_need_defaults=false;;
38728   --header | --heade | --head | --hea )
38729     $ac_shift
38730     case $ac_optarg in
38731     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
38732     esac
38733     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
38734     ac_need_defaults=false;;
38735   --he | --h)
38736     # Conflict between --help and --header
38737     as_fn_error $? "ambiguous option: \`$1'
38738 Try \`$0 --help' for more information.";;
38739   --help | --hel | -h )
38740     $as_echo "$ac_cs_usage"; exit ;;
38741   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
38742   | -silent | --silent | --silen | --sile | --sil | --si | --s)
38743     ac_cs_silent=: ;;
38744
38745   # This is an error.
38746   -*) as_fn_error $? "unrecognized option: \`$1'
38747 Try \`$0 --help' for more information." ;;
38748
38749   *) as_fn_append ac_config_targets " $1"
38750      ac_need_defaults=false ;;
38751
38752   esac
38753   shift
38754 done
38755
38756 ac_configure_extra_args=
38757
38758 if $ac_cs_silent; then
38759   exec 6>/dev/null
38760   ac_configure_extra_args="$ac_configure_extra_args --silent"
38761 fi
38762
38763 _ACEOF
38764 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
38765 if \$ac_cs_recheck; then
38766   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
38767   shift
38768   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
38769   CONFIG_SHELL='$SHELL'
38770   export CONFIG_SHELL
38771   exec "\$@"
38772 fi
38773
38774 _ACEOF
38775 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
38776 exec 5>>config.log
38777 {
38778   echo
38779   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
38780 ## Running $as_me. ##
38781 _ASBOX
38782   $as_echo "$ac_log"
38783 } >&5
38784
38785 _ACEOF
38786 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
38787 #
38788 # INIT-COMMANDS
38789 #
38790 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
38791 # Capture the value of obsolete ALL_LINGUAS because we need it to compute
38792     # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
38793     # from automake < 1.5.
38794     eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
38795     # Capture the value of LINGUAS because we need it to compute CATALOGS.
38796     LINGUAS="${LINGUAS-%UNSET%}"
38797
38798
38799
38800 _ACEOF
38801
38802 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
38803
38804 # Handling of arguments.
38805 for ac_config_target in $ac_config_targets
38806 do
38807   case $ac_config_target in
38808     "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
38809     "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
38810     "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;;
38811     "tests/atconfig") CONFIG_COMMANDS="$CONFIG_COMMANDS tests/atconfig" ;;
38812     "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
38813     "tests/atlocal") CONFIG_FILES="$CONFIG_FILES tests/atlocal" ;;
38814     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
38815     "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
38816     "gnu/Makefile") CONFIG_FILES="$CONFIG_FILES gnu/Makefile" ;;
38817     "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
38818     "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
38819     "scripts/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/Makefile" ;;
38820     "rmt/Makefile") CONFIG_FILES="$CONFIG_FILES rmt/Makefile" ;;
38821     "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
38822
38823   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
38824   esac
38825 done
38826
38827
38828 # If the user did not use the arguments to specify the items to instantiate,
38829 # then the envvar interface is used.  Set only those that are not.
38830 # We use the long form for the default assignment because of an extremely
38831 # bizarre bug on SunOS 4.1.3.
38832 if $ac_need_defaults; then
38833   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
38834   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
38835   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
38836 fi
38837
38838 # Have a temporary directory for convenience.  Make it in the build tree
38839 # simply because there is no reason against having it here, and in addition,
38840 # creating and moving files from /tmp can sometimes cause problems.
38841 # Hook for its removal unless debugging.
38842 # Note that there is a small window in which the directory will not be cleaned:
38843 # after its creation but before its name has been assigned to `$tmp'.
38844 $debug ||
38845 {
38846   tmp= ac_tmp=
38847   trap 'exit_status=$?
38848   : "${ac_tmp:=$tmp}"
38849   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
38850 ' 0
38851   trap 'as_fn_exit 1' 1 2 13 15
38852 }
38853 # Create a (secure) tmp directory for tmp files.
38854
38855 {
38856   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
38857   test -d "$tmp"
38858 }  ||
38859 {
38860   tmp=./conf$$-$RANDOM
38861   (umask 077 && mkdir "$tmp")
38862 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
38863 ac_tmp=$tmp
38864
38865 # Set up the scripts for CONFIG_FILES section.
38866 # No need to generate them if there are no CONFIG_FILES.
38867 # This happens for instance with `./config.status config.h'.
38868 if test -n "$CONFIG_FILES"; then
38869
38870
38871 ac_cr=`echo X | tr X '\015'`
38872 # On cygwin, bash can eat \r inside `` if the user requested igncr.
38873 # But we know of no other shell where ac_cr would be empty at this
38874 # point, so we can use a bashism as a fallback.
38875 if test "x$ac_cr" = x; then
38876   eval ac_cr=\$\'\\r\'
38877 fi
38878 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
38879 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
38880   ac_cs_awk_cr='\\r'
38881 else
38882   ac_cs_awk_cr=$ac_cr
38883 fi
38884
38885 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
38886 _ACEOF
38887
38888
38889 {
38890   echo "cat >conf$$subs.awk <<_ACEOF" &&
38891   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
38892   echo "_ACEOF"
38893 } >conf$$subs.sh ||
38894   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
38895 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
38896 ac_delim='%!_!# '
38897 for ac_last_try in false false false false false :; do
38898   . ./conf$$subs.sh ||
38899     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
38900
38901   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
38902   if test $ac_delim_n = $ac_delim_num; then
38903     break
38904   elif $ac_last_try; then
38905     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
38906   else
38907     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
38908   fi
38909 done
38910 rm -f conf$$subs.sh
38911
38912 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
38913 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
38914 _ACEOF
38915 sed -n '
38916 h
38917 s/^/S["/; s/!.*/"]=/
38918 p
38919 g
38920 s/^[^!]*!//
38921 :repl
38922 t repl
38923 s/'"$ac_delim"'$//
38924 t delim
38925 :nl
38926 h
38927 s/\(.\{148\}\)..*/\1/
38928 t more1
38929 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
38930 p
38931 n
38932 b repl
38933 :more1
38934 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
38935 p
38936 g
38937 s/.\{148\}//
38938 t nl
38939 :delim
38940 h
38941 s/\(.\{148\}\)..*/\1/
38942 t more2
38943 s/["\\]/\\&/g; s/^/"/; s/$/"/
38944 p
38945 b
38946 :more2
38947 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
38948 p
38949 g
38950 s/.\{148\}//
38951 t delim
38952 ' <conf$$subs.awk | sed '
38953 /^[^""]/{
38954   N
38955   s/\n//
38956 }
38957 ' >>$CONFIG_STATUS || ac_write_fail=1
38958 rm -f conf$$subs.awk
38959 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
38960 _ACAWK
38961 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
38962   for (key in S) S_is_set[key] = 1
38963   FS = "\a"
38964
38965 }
38966 {
38967   line = $ 0
38968   nfields = split(line, field, "@")
38969   substed = 0
38970   len = length(field[1])
38971   for (i = 2; i < nfields; i++) {
38972     key = field[i]
38973     keylen = length(key)
38974     if (S_is_set[key]) {
38975       value = S[key]
38976       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
38977       len += length(value) + length(field[++i])
38978       substed = 1
38979     } else
38980       len += 1 + keylen
38981   }
38982
38983   print line
38984 }
38985
38986 _ACAWK
38987 _ACEOF
38988 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
38989 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
38990   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
38991 else
38992   cat
38993 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
38994   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
38995 _ACEOF
38996
38997 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
38998 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
38999 # trailing colons and then remove the whole line if VPATH becomes empty
39000 # (actually we leave an empty line to preserve line numbers).
39001 if test "x$srcdir" = x.; then
39002   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
39003 h
39004 s///
39005 s/^/:/
39006 s/[      ]*$/:/
39007 s/:\$(srcdir):/:/g
39008 s/:\${srcdir}:/:/g
39009 s/:@srcdir@:/:/g
39010 s/^:*//
39011 s/:*$//
39012 x
39013 s/\(=[   ]*\).*/\1/
39014 G
39015 s/\n//
39016 s/^[^=]*=[       ]*$//
39017 }'
39018 fi
39019
39020 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
39021 fi # test -n "$CONFIG_FILES"
39022
39023 # Set up the scripts for CONFIG_HEADERS section.
39024 # No need to generate them if there are no CONFIG_HEADERS.
39025 # This happens for instance with `./config.status Makefile'.
39026 if test -n "$CONFIG_HEADERS"; then
39027 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
39028 BEGIN {
39029 _ACEOF
39030
39031 # Transform confdefs.h into an awk script `defines.awk', embedded as
39032 # here-document in config.status, that substitutes the proper values into
39033 # config.h.in to produce config.h.
39034
39035 # Create a delimiter string that does not exist in confdefs.h, to ease
39036 # handling of long lines.
39037 ac_delim='%!_!# '
39038 for ac_last_try in false false :; do
39039   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
39040   if test -z "$ac_tt"; then
39041     break
39042   elif $ac_last_try; then
39043     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
39044   else
39045     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
39046   fi
39047 done
39048
39049 # For the awk script, D is an array of macro values keyed by name,
39050 # likewise P contains macro parameters if any.  Preserve backslash
39051 # newline sequences.
39052
39053 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
39054 sed -n '
39055 s/.\{148\}/&'"$ac_delim"'/g
39056 t rset
39057 :rset
39058 s/^[     ]*#[    ]*define[       ][      ]*/ /
39059 t def
39060 d
39061 :def
39062 s/\\$//
39063 t bsnl
39064 s/["\\]/\\&/g
39065 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
39066 D["\1"]=" \3"/p
39067 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
39068 d
39069 :bsnl
39070 s/["\\]/\\&/g
39071 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
39072 D["\1"]=" \3\\\\\\n"\\/p
39073 t cont
39074 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
39075 t cont
39076 d
39077 :cont
39078 n
39079 s/.\{148\}/&'"$ac_delim"'/g
39080 t clear
39081 :clear
39082 s/\\$//
39083 t bsnlc
39084 s/["\\]/\\&/g; s/^/"/; s/$/"/p
39085 d
39086 :bsnlc
39087 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
39088 b cont
39089 ' <confdefs.h | sed '
39090 s/'"$ac_delim"'/"\\\
39091 "/g' >>$CONFIG_STATUS || ac_write_fail=1
39092
39093 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
39094   for (key in D) D_is_set[key] = 1
39095   FS = "\a"
39096 }
39097 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
39098   line = \$ 0
39099   split(line, arg, " ")
39100   if (arg[1] == "#") {
39101     defundef = arg[2]
39102     mac1 = arg[3]
39103   } else {
39104     defundef = substr(arg[1], 2)
39105     mac1 = arg[2]
39106   }
39107   split(mac1, mac2, "(") #)
39108   macro = mac2[1]
39109   prefix = substr(line, 1, index(line, defundef) - 1)
39110   if (D_is_set[macro]) {
39111     # Preserve the white space surrounding the "#".
39112     print prefix "define", macro P[macro] D[macro]
39113     next
39114   } else {
39115     # Replace #undef with comments.  This is necessary, for example,
39116     # in the case of _POSIX_SOURCE, which is predefined and required
39117     # on some systems where configure will not decide to define it.
39118     if (defundef == "undef") {
39119       print "/*", prefix defundef, macro, "*/"
39120       next
39121     }
39122   }
39123 }
39124 { print }
39125 _ACAWK
39126 _ACEOF
39127 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
39128   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
39129 fi # test -n "$CONFIG_HEADERS"
39130
39131
39132 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
39133 shift
39134 for ac_tag
39135 do
39136   case $ac_tag in
39137   :[FHLC]) ac_mode=$ac_tag; continue;;
39138   esac
39139   case $ac_mode$ac_tag in
39140   :[FHL]*:*);;
39141   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
39142   :[FH]-) ac_tag=-:-;;
39143   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
39144   esac
39145   ac_save_IFS=$IFS
39146   IFS=:
39147   set x $ac_tag
39148   IFS=$ac_save_IFS
39149   shift
39150   ac_file=$1
39151   shift
39152
39153   case $ac_mode in
39154   :L) ac_source=$1;;
39155   :[FH])
39156     ac_file_inputs=
39157     for ac_f
39158     do
39159       case $ac_f in
39160       -) ac_f="$ac_tmp/stdin";;
39161       *) # Look for the file first in the build tree, then in the source tree
39162          # (if the path is not absolute).  The absolute path cannot be DOS-style,
39163          # because $ac_f cannot contain `:'.
39164          test -f "$ac_f" ||
39165            case $ac_f in
39166            [\\/$]*) false;;
39167            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
39168            esac ||
39169            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
39170       esac
39171       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
39172       as_fn_append ac_file_inputs " '$ac_f'"
39173     done
39174
39175     # Let's still pretend it is `configure' which instantiates (i.e., don't
39176     # use $as_me), people would be surprised to read:
39177     #    /* config.h.  Generated by config.status.  */
39178     configure_input='Generated from '`
39179           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
39180         `' by configure.'
39181     if test x"$ac_file" != x-; then
39182       configure_input="$ac_file.  $configure_input"
39183       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
39184 $as_echo "$as_me: creating $ac_file" >&6;}
39185     fi
39186     # Neutralize special characters interpreted by sed in replacement strings.
39187     case $configure_input in #(
39188     *\&* | *\|* | *\\* )
39189        ac_sed_conf_input=`$as_echo "$configure_input" |
39190        sed 's/[\\\\&|]/\\\\&/g'`;; #(
39191     *) ac_sed_conf_input=$configure_input;;
39192     esac
39193
39194     case $ac_tag in
39195     *:-:* | *:-) cat >"$ac_tmp/stdin" \
39196       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
39197     esac
39198     ;;
39199   esac
39200
39201   ac_dir=`$as_dirname -- "$ac_file" ||
39202 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
39203          X"$ac_file" : 'X\(//\)[^/]' \| \
39204          X"$ac_file" : 'X\(//\)$' \| \
39205          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
39206 $as_echo X"$ac_file" |
39207     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
39208             s//\1/
39209             q
39210           }
39211           /^X\(\/\/\)[^/].*/{
39212             s//\1/
39213             q
39214           }
39215           /^X\(\/\/\)$/{
39216             s//\1/
39217             q
39218           }
39219           /^X\(\/\).*/{
39220             s//\1/
39221             q
39222           }
39223           s/.*/./; q'`
39224   as_dir="$ac_dir"; as_fn_mkdir_p
39225   ac_builddir=.
39226
39227 case "$ac_dir" in
39228 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
39229 *)
39230   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
39231   # A ".." for each directory in $ac_dir_suffix.
39232   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
39233   case $ac_top_builddir_sub in
39234   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
39235   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
39236   esac ;;
39237 esac
39238 ac_abs_top_builddir=$ac_pwd
39239 ac_abs_builddir=$ac_pwd$ac_dir_suffix
39240 # for backward compatibility:
39241 ac_top_builddir=$ac_top_build_prefix
39242
39243 case $srcdir in
39244   .)  # We are building in place.
39245     ac_srcdir=.
39246     ac_top_srcdir=$ac_top_builddir_sub
39247     ac_abs_top_srcdir=$ac_pwd ;;
39248   [\\/]* | ?:[\\/]* )  # Absolute name.
39249     ac_srcdir=$srcdir$ac_dir_suffix;
39250     ac_top_srcdir=$srcdir
39251     ac_abs_top_srcdir=$srcdir ;;
39252   *) # Relative name.
39253     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
39254     ac_top_srcdir=$ac_top_build_prefix$srcdir
39255     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
39256 esac
39257 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
39258
39259
39260   case $ac_mode in
39261   :F)
39262   #
39263   # CONFIG_FILE
39264   #
39265
39266   case $INSTALL in
39267   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
39268   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
39269   esac
39270   ac_MKDIR_P=$MKDIR_P
39271   case $MKDIR_P in
39272   [\\/$]* | ?:[\\/]* ) ;;
39273   */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
39274   esac
39275 _ACEOF
39276
39277 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
39278 # If the template does not know about datarootdir, expand it.
39279 # FIXME: This hack should be removed a few years after 2.60.
39280 ac_datarootdir_hack=; ac_datarootdir_seen=
39281 ac_sed_dataroot='
39282 /datarootdir/ {
39283   p
39284   q
39285 }
39286 /@datadir@/p
39287 /@docdir@/p
39288 /@infodir@/p
39289 /@localedir@/p
39290 /@mandir@/p'
39291 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
39292 *datarootdir*) ac_datarootdir_seen=yes;;
39293 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
39294   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
39295 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
39296 _ACEOF
39297 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
39298   ac_datarootdir_hack='
39299   s&@datadir@&$datadir&g
39300   s&@docdir@&$docdir&g
39301   s&@infodir@&$infodir&g
39302   s&@localedir@&$localedir&g
39303   s&@mandir@&$mandir&g
39304   s&\\\${datarootdir}&$datarootdir&g' ;;
39305 esac
39306 _ACEOF
39307
39308 # Neutralize VPATH when `$srcdir' = `.'.
39309 # Shell code in configure.ac might set extrasub.
39310 # FIXME: do we really want to maintain this feature?
39311 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
39312 ac_sed_extra="$ac_vpsub
39313 $extrasub
39314 _ACEOF
39315 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
39316 :t
39317 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
39318 s|@configure_input@|$ac_sed_conf_input|;t t
39319 s&@top_builddir@&$ac_top_builddir_sub&;t t
39320 s&@top_build_prefix@&$ac_top_build_prefix&;t t
39321 s&@srcdir@&$ac_srcdir&;t t
39322 s&@abs_srcdir@&$ac_abs_srcdir&;t t
39323 s&@top_srcdir@&$ac_top_srcdir&;t t
39324 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
39325 s&@builddir@&$ac_builddir&;t t
39326 s&@abs_builddir@&$ac_abs_builddir&;t t
39327 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
39328 s&@INSTALL@&$ac_INSTALL&;t t
39329 s&@MKDIR_P@&$ac_MKDIR_P&;t t
39330 $ac_datarootdir_hack
39331 "
39332 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
39333   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
39334
39335 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
39336   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
39337   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
39338       "$ac_tmp/out"`; test -z "$ac_out"; } &&
39339   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
39340 which seems to be undefined.  Please make sure it is defined" >&5
39341 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
39342 which seems to be undefined.  Please make sure it is defined" >&2;}
39343
39344   rm -f "$ac_tmp/stdin"
39345   case $ac_file in
39346   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
39347   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
39348   esac \
39349   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
39350  ;;
39351   :H)
39352   #
39353   # CONFIG_HEADER
39354   #
39355   if test x"$ac_file" != x-; then
39356     {
39357       $as_echo "/* $configure_input  */" \
39358       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
39359     } >"$ac_tmp/config.h" \
39360       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
39361     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
39362       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
39363 $as_echo "$as_me: $ac_file is unchanged" >&6;}
39364     else
39365       rm -f "$ac_file"
39366       mv "$ac_tmp/config.h" "$ac_file" \
39367         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
39368     fi
39369   else
39370     $as_echo "/* $configure_input  */" \
39371       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
39372       || as_fn_error $? "could not create -" "$LINENO" 5
39373   fi
39374 # Compute "$ac_file"'s index in $config_headers.
39375 _am_arg="$ac_file"
39376 _am_stamp_count=1
39377 for _am_header in $config_headers :; do
39378   case $_am_header in
39379     $_am_arg | $_am_arg:* )
39380       break ;;
39381     * )
39382       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
39383   esac
39384 done
39385 echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
39386 $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
39387          X"$_am_arg" : 'X\(//\)[^/]' \| \
39388          X"$_am_arg" : 'X\(//\)$' \| \
39389          X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
39390 $as_echo X"$_am_arg" |
39391     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
39392             s//\1/
39393             q
39394           }
39395           /^X\(\/\/\)[^/].*/{
39396             s//\1/
39397             q
39398           }
39399           /^X\(\/\/\)$/{
39400             s//\1/
39401             q
39402           }
39403           /^X\(\/\).*/{
39404             s//\1/
39405             q
39406           }
39407           s/.*/./; q'`/stamp-h$_am_stamp_count
39408  ;;
39409
39410   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
39411 $as_echo "$as_me: executing $ac_file commands" >&6;}
39412  ;;
39413   esac
39414
39415
39416   case $ac_file$ac_mode in
39417     "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
39418   # Older Autoconf quotes --file arguments for eval, but not when files
39419   # are listed without --file.  Let's play safe and only enable the eval
39420   # if we detect the quoting.
39421   case $CONFIG_FILES in
39422   *\'*) eval set x "$CONFIG_FILES" ;;
39423   *)   set x $CONFIG_FILES ;;
39424   esac
39425   shift
39426   for mf
39427   do
39428     # Strip MF so we end up with the name of the file.
39429     mf=`echo "$mf" | sed -e 's/:.*$//'`
39430     # Check whether this is an Automake generated Makefile or not.
39431     # We used to match only the files named 'Makefile.in', but
39432     # some people rename them; so instead we look at the file content.
39433     # Grep'ing the first line is not enough: some people post-process
39434     # each Makefile.in and add a new line on top of each file to say so.
39435     # Grep'ing the whole file is not good either: AIX grep has a line
39436     # limit of 2048, but all sed's we know have understand at least 4000.
39437     if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
39438       dirpart=`$as_dirname -- "$mf" ||
39439 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
39440          X"$mf" : 'X\(//\)[^/]' \| \
39441          X"$mf" : 'X\(//\)$' \| \
39442          X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
39443 $as_echo X"$mf" |
39444     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
39445             s//\1/
39446             q
39447           }
39448           /^X\(\/\/\)[^/].*/{
39449             s//\1/
39450             q
39451           }
39452           /^X\(\/\/\)$/{
39453             s//\1/
39454             q
39455           }
39456           /^X\(\/\).*/{
39457             s//\1/
39458             q
39459           }
39460           s/.*/./; q'`
39461     else
39462       continue
39463     fi
39464     # Extract the definition of DEPDIR, am__include, and am__quote
39465     # from the Makefile without running 'make'.
39466     DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
39467     test -z "$DEPDIR" && continue
39468     am__include=`sed -n 's/^am__include = //p' < "$mf"`
39469     test -z "$am__include" && continue
39470     am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
39471     # Find all dependency output files, they are included files with
39472     # $(DEPDIR) in their names.  We invoke sed twice because it is the
39473     # simplest approach to changing $(DEPDIR) to its actual value in the
39474     # expansion.
39475     for file in `sed -n "
39476       s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
39477          sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
39478       # Make sure the directory exists.
39479       test -f "$dirpart/$file" && continue
39480       fdir=`$as_dirname -- "$file" ||
39481 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
39482          X"$file" : 'X\(//\)[^/]' \| \
39483          X"$file" : 'X\(//\)$' \| \
39484          X"$file" : 'X\(/\)' \| . 2>/dev/null ||
39485 $as_echo X"$file" |
39486     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
39487             s//\1/
39488             q
39489           }
39490           /^X\(\/\/\)[^/].*/{
39491             s//\1/
39492             q
39493           }
39494           /^X\(\/\/\)$/{
39495             s//\1/
39496             q
39497           }
39498           /^X\(\/\).*/{
39499             s//\1/
39500             q
39501           }
39502           s/.*/./; q'`
39503       as_dir=$dirpart/$fdir; as_fn_mkdir_p
39504       # echo "creating $dirpart/$file"
39505       echo '# dummy' > "$dirpart/$file"
39506     done
39507   done
39508 }
39509  ;;
39510     "po-directories":C)
39511     for ac_file in $CONFIG_FILES; do
39512       # Support "outfile[:infile[:infile...]]"
39513       case "$ac_file" in
39514         *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
39515       esac
39516       # PO directories have a Makefile.in generated from Makefile.in.in.
39517       case "$ac_file" in */Makefile.in)
39518         # Adjust a relative srcdir.
39519         ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
39520         ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
39521         ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
39522         # In autoconf-2.13 it is called $ac_given_srcdir.
39523         # In autoconf-2.50 it is called $srcdir.
39524         test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
39525         case "$ac_given_srcdir" in
39526           .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
39527           /*) top_srcdir="$ac_given_srcdir" ;;
39528           *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
39529         esac
39530         # Treat a directory as a PO directory if and only if it has a
39531         # POTFILES.in file. This allows packages to have multiple PO
39532         # directories under different names or in different locations.
39533         if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
39534           rm -f "$ac_dir/POTFILES"
39535           test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
39536           gt_tab=`printf '\t'`
39537           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"
39538           POMAKEFILEDEPS="POTFILES.in"
39539           # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
39540           # on $ac_dir but don't depend on user-specified configuration
39541           # parameters.
39542           if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
39543             # The LINGUAS file contains the set of available languages.
39544             if test -n "$OBSOLETE_ALL_LINGUAS"; then
39545               test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
39546             fi
39547             ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
39548             # Hide the ALL_LINGUAS assignment from automake < 1.5.
39549             eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
39550             POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
39551           else
39552             # The set of available languages was given in configure.in.
39553             # Hide the ALL_LINGUAS assignment from automake < 1.5.
39554             eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
39555           fi
39556           # Compute POFILES
39557           # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
39558           # Compute UPDATEPOFILES
39559           # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
39560           # Compute DUMMYPOFILES
39561           # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
39562           # Compute GMOFILES
39563           # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
39564           case "$ac_given_srcdir" in
39565             .) srcdirpre= ;;
39566             *) srcdirpre='$(srcdir)/' ;;
39567           esac
39568           POFILES=
39569           UPDATEPOFILES=
39570           DUMMYPOFILES=
39571           GMOFILES=
39572           for lang in $ALL_LINGUAS; do
39573             POFILES="$POFILES $srcdirpre$lang.po"
39574             UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
39575             DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
39576             GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
39577           done
39578           # CATALOGS depends on both $ac_dir and the user's LINGUAS
39579           # environment variable.
39580           INST_LINGUAS=
39581           if test -n "$ALL_LINGUAS"; then
39582             for presentlang in $ALL_LINGUAS; do
39583               useit=no
39584               if test "%UNSET%" != "$LINGUAS"; then
39585                 desiredlanguages="$LINGUAS"
39586               else
39587                 desiredlanguages="$ALL_LINGUAS"
39588               fi
39589               for desiredlang in $desiredlanguages; do
39590                 # Use the presentlang catalog if desiredlang is
39591                 #   a. equal to presentlang, or
39592                 #   b. a variant of presentlang (because in this case,
39593                 #      presentlang can be used as a fallback for messages
39594                 #      which are not translated in the desiredlang catalog).
39595                 case "$desiredlang" in
39596                   "$presentlang"*) useit=yes;;
39597                 esac
39598               done
39599               if test $useit = yes; then
39600                 INST_LINGUAS="$INST_LINGUAS $presentlang"
39601               fi
39602             done
39603           fi
39604           CATALOGS=
39605           if test -n "$INST_LINGUAS"; then
39606             for lang in $INST_LINGUAS; do
39607               CATALOGS="$CATALOGS $lang.gmo"
39608             done
39609           fi
39610           test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
39611           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"
39612           for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
39613             if test -f "$f"; then
39614               case "$f" in
39615                 *.orig | *.bak | *~) ;;
39616                 *) cat "$f" >> "$ac_dir/Makefile" ;;
39617               esac
39618             fi
39619           done
39620         fi
39621         ;;
39622       esac
39623     done ;;
39624     "tests/atconfig":C) cat >tests/atconfig <<ATEOF
39625 # Configurable variable values for building test suites.
39626 # Generated by $0.
39627 # Copyright (C) 2012 Free Software Foundation, Inc.
39628
39629 # The test suite will define top_srcdir=$at_top_srcdir/../.. etc.
39630 at_testdir='tests'
39631 abs_builddir='$ac_abs_builddir'
39632 at_srcdir='$ac_srcdir'
39633 abs_srcdir='$ac_abs_srcdir'
39634 at_top_srcdir='$ac_top_srcdir'
39635 abs_top_srcdir='$ac_abs_top_srcdir'
39636 at_top_build_prefix='$ac_top_build_prefix'
39637 abs_top_builddir='$ac_abs_top_builddir'
39638
39639 # Backward compatibility with Autotest <= 2.59b:
39640 at_top_builddir=\$at_top_build_prefix
39641
39642 AUTOTEST_PATH='tests'
39643
39644 SHELL=\${CONFIG_SHELL-'$SHELL'}
39645 ATEOF
39646  ;;
39647
39648   esac
39649 done # for ac_tag
39650
39651
39652 as_fn_exit 0
39653 _ACEOF
39654 ac_clean_files=$ac_clean_files_save
39655
39656 test $ac_write_fail = 0 ||
39657   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
39658
39659
39660 # configure is writing to config.log, and then calls config.status.
39661 # config.status does its own redirection, appending to config.log.
39662 # Unfortunately, on DOS this fails, as config.log is still kept open
39663 # by configure, so config.status won't be able to write to it; its
39664 # output is simply discarded.  So we exec the FD to /dev/null,
39665 # effectively closing config.log, so it can be properly (re)opened and
39666 # appended to by config.status.  When coming back to configure, we
39667 # need to make the FD available again.
39668 if test "$no_create" != yes; then
39669   ac_cs_success=:
39670   ac_config_status_args=
39671   test "$silent" = yes &&
39672     ac_config_status_args="$ac_config_status_args --quiet"
39673   exec 5>/dev/null
39674   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
39675   exec 5>>config.log
39676   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
39677   # would make configure fail if this is the last instruction.
39678   $ac_cs_success || as_fn_exit 1
39679 fi
39680 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
39681   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
39682 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
39683 fi
39684