Merge branch 'dfsg-orig' into dfsg-debian
[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.27.1.
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.27.1'
584 PACKAGE_STRING='GNU tar 1.27.1'
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 LTLIBICONV
656 LIBICONV
657 DEFAULT_QUOTING_STYLE
658 DEFAULT_BLOCKING
659 DEFAULT_ARCHIVE
660 DEFAULT_ARCHIVE_FORMAT
661 RSH
662 LIBOBJS
663 TAR_COND_XATTR_H_FALSE
664 TAR_COND_XATTR_H_TRUE
665 GNULIB_TEST_WARN_CFLAGS
666 GNULIB_WARN_CFLAGS
667 WARN_CFLAGS
668 WERROR_CFLAGS
669 DEFAULT_RMT_COMMAND
670 DEFAULT_RMT_DIR
671 PU_RMT_PROG
672 LIB_SETSOCKOPT
673 LIBGNU_LTLIBDEPS
674 LIBGNU_LIBDEPS
675 gltests_WITNESS
676 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
677 NEXT_WCHAR_H
678 HAVE_FEATURES_H
679 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE
680 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE
681 LIBUNISTRING_UNIWIDTH_H
682 LIBUNISTRING_UNITYPES_H
683 HAVE_UNISTD_H
684 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
685 NEXT_UNISTD_H
686 PTHREAD_H_DEFINES_STRUCT_TIMESPEC
687 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
688 TIME_H_DEFINES_STRUCT_TIMESPEC
689 NEXT_AS_FIRST_DIRECTIVE_TIME_H
690 NEXT_TIME_H
691 GL_GENERATE_SYSEXITS_H_FALSE
692 GL_GENERATE_SYSEXITS_H_TRUE
693 SYSEXITS_H
694 HAVE_SYSEXITS_H
695 NEXT_AS_FIRST_DIRECTIVE_SYSEXITS_H
696 NEXT_SYSEXITS_H
697 HAVE_STRINGS_H
698 NEXT_AS_FIRST_DIRECTIVE_STRINGS_H
699 NEXT_STRINGS_H
700 NEXT_AS_FIRST_DIRECTIVE_STRING_H
701 NEXT_STRING_H
702 HAVE_DECL_STRNCASECMP
703 HAVE_STRCASECMP
704 HAVE_FFS
705 GNULIB_FFS
706 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
707 NEXT_STDLIB_H
708 NEXT_AS_FIRST_DIRECTIVE_STDIO_H
709 NEXT_STDIO_H
710 GL_GENERATE_STDARG_H_FALSE
711 GL_GENERATE_STDARG_H_TRUE
712 STDARG_H
713 NEXT_AS_FIRST_DIRECTIVE_STDARG_H
714 NEXT_STDARG_H
715 GL_GENERATE_STDALIGN_H_FALSE
716 GL_GENERATE_STDALIGN_H_TRUE
717 STDALIGN_H
718 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
719 NEXT_SIGNAL_H
720 GL_GENERATE_SELINUX_CONTEXT_H_FALSE
721 GL_GENERATE_SELINUX_CONTEXT_H_TRUE
722 SELINUX_CONTEXT_H
723 NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H
724 NEXT_SELINUX_SELINUX_H
725 LIB_SELINUX
726 REPLACE_RAISE
727 REPLACE_PTHREAD_SIGMASK
728 HAVE_SIGHANDLER_T
729 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
730 HAVE_STRUCT_SIGACTION_SA_SIGACTION
731 HAVE_SIGACTION
732 HAVE_SIGINFO_T
733 HAVE_SIGSET_T
734 HAVE_RAISE
735 HAVE_PTHREAD_SIGMASK
736 HAVE_POSIX_SIGNALBLOCKING
737 GNULIB_SIGACTION
738 GNULIB_SIGPROCMASK
739 GNULIB_SIGNAL_H_SIGPIPE
740 GNULIB_RAISE
741 GNULIB_PTHREAD_SIGMASK
742 USE_ACL
743 LIB_ACL
744 HAVE__BOOL
745 GL_GENERATE_STDBOOL_H_FALSE
746 GL_GENERATE_STDBOOL_H_TRUE
747 STDBOOL_H
748 REPLACE_TIMEGM
749 REPLACE_NANOSLEEP
750 REPLACE_MKTIME
751 REPLACE_LOCALTIME_R
752 HAVE_TIMEGM
753 HAVE_STRPTIME
754 HAVE_NANOSLEEP
755 HAVE_DECL_LOCALTIME_R
756 GNULIB_TIME_R
757 GNULIB_TIMEGM
758 GNULIB_STRPTIME
759 GNULIB_NANOSLEEP
760 GNULIB_MKTIME
761 UNDEFINE_STRTOK_R
762 REPLACE_STRTOK_R
763 REPLACE_STRSIGNAL
764 REPLACE_STRNLEN
765 REPLACE_STRNDUP
766 REPLACE_STRNCAT
767 REPLACE_STRERROR_R
768 REPLACE_STRERROR
769 REPLACE_STRCHRNUL
770 REPLACE_STRCASESTR
771 REPLACE_STRSTR
772 REPLACE_STRDUP
773 REPLACE_STPNCPY
774 REPLACE_MEMMEM
775 REPLACE_MEMCHR
776 HAVE_STRVERSCMP
777 HAVE_DECL_STRSIGNAL
778 HAVE_DECL_STRERROR_R
779 HAVE_DECL_STRTOK_R
780 HAVE_STRCASESTR
781 HAVE_STRSEP
782 HAVE_STRPBRK
783 HAVE_DECL_STRNLEN
784 HAVE_DECL_STRNDUP
785 HAVE_DECL_STRDUP
786 HAVE_STRCHRNUL
787 HAVE_STPNCPY
788 HAVE_STPCPY
789 HAVE_RAWMEMCHR
790 HAVE_DECL_MEMRCHR
791 HAVE_MEMPCPY
792 HAVE_DECL_MEMMEM
793 HAVE_MEMCHR
794 HAVE_FFSLL
795 HAVE_FFSL
796 HAVE_MBSLEN
797 GNULIB_STRVERSCMP
798 GNULIB_STRSIGNAL
799 GNULIB_STRERROR_R
800 GNULIB_STRERROR
801 GNULIB_MBSTOK_R
802 GNULIB_MBSSEP
803 GNULIB_MBSSPN
804 GNULIB_MBSPBRK
805 GNULIB_MBSCSPN
806 GNULIB_MBSCASESTR
807 GNULIB_MBSPCASECMP
808 GNULIB_MBSNCASECMP
809 GNULIB_MBSCASECMP
810 GNULIB_MBSSTR
811 GNULIB_MBSRCHR
812 GNULIB_MBSCHR
813 GNULIB_MBSNLEN
814 GNULIB_MBSLEN
815 GNULIB_STRTOK_R
816 GNULIB_STRCASESTR
817 GNULIB_STRSTR
818 GNULIB_STRSEP
819 GNULIB_STRPBRK
820 GNULIB_STRNLEN
821 GNULIB_STRNDUP
822 GNULIB_STRNCAT
823 GNULIB_STRDUP
824 GNULIB_STRCHRNUL
825 GNULIB_STPNCPY
826 GNULIB_STPCPY
827 GNULIB_RAWMEMCHR
828 GNULIB_MEMRCHR
829 GNULIB_MEMPCPY
830 GNULIB_MEMMEM
831 GNULIB_MEMCHR
832 GNULIB_FFSLL
833 GNULIB_FFSL
834 LOCALE_FR_UTF8
835 LOCALE_ZH_CN
836 LOCALE_JA
837 NEXT_AS_FIRST_DIRECTIVE_LOCALE_H
838 NEXT_LOCALE_H
839 HAVE_XLOCALE_H
840 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
841 NEXT_STDDEF_H
842 GL_GENERATE_STDDEF_H_FALSE
843 GL_GENERATE_STDDEF_H_TRUE
844 STDDEF_H
845 HAVE_WCHAR_T
846 REPLACE_NULL
847 REPLACE_STRUCT_LCONV
848 REPLACE_DUPLOCALE
849 REPLACE_SETLOCALE
850 REPLACE_LOCALECONV
851 HAVE_DUPLOCALE
852 GNULIB_DUPLOCALE
853 GNULIB_SETLOCALE
854 GNULIB_LOCALECONV
855 LOCALCHARSET_TESTS_ENVIRONMENT
856 GLIBC21
857 HAVE_LANGINFO_YESEXPR
858 HAVE_LANGINFO_ERA
859 HAVE_LANGINFO_T_FMT_AMPM
860 HAVE_LANGINFO_CODESET
861 HAVE_LANGINFO_H
862 NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H
863 NEXT_LANGINFO_H
864 REPLACE_NL_LANGINFO
865 HAVE_NL_LANGINFO
866 GNULIB_NL_LANGINFO
867 REPLACE_TOWLOWER
868 REPLACE_ISWCNTRL
869 HAVE_WCTYPE_H
870 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H
871 NEXT_WCTYPE_H
872 HAVE_WINT_T
873 HAVE_ISWCNTRL
874 REPLACE_ISWBLANK
875 HAVE_WCTRANS_T
876 HAVE_WCTYPE_T
877 HAVE_ISWBLANK
878 GNULIB_TOWCTRANS
879 GNULIB_WCTRANS
880 GNULIB_ISWCTYPE
881 GNULIB_WCTYPE
882 GNULIB_ISWBLANK
883 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
884 NEXT_INTTYPES_H
885 UINT64_MAX_EQ_ULONG_MAX
886 UINT32_MAX_LT_UINTMAX_MAX
887 PRIPTR_PREFIX
888 PRI_MACROS_BROKEN
889 INT64_MAX_EQ_LONG_MAX
890 INT32_MAX_LT_INTMAX_MAX
891 REPLACE_STRTOIMAX
892 HAVE_DECL_STRTOUMAX
893 HAVE_DECL_STRTOIMAX
894 HAVE_DECL_IMAXDIV
895 HAVE_DECL_IMAXABS
896 GNULIB_STRTOUMAX
897 GNULIB_STRTOIMAX
898 GNULIB_IMAXDIV
899 GNULIB_IMAXABS
900 GL_GENERATE_STDINT_H_FALSE
901 GL_GENERATE_STDINT_H_TRUE
902 STDINT_H
903 WINT_T_SUFFIX
904 WCHAR_T_SUFFIX
905 SIG_ATOMIC_T_SUFFIX
906 SIZE_T_SUFFIX
907 PTRDIFF_T_SUFFIX
908 HAVE_SIGNED_WINT_T
909 HAVE_SIGNED_WCHAR_T
910 HAVE_SIGNED_SIG_ATOMIC_T
911 BITSIZEOF_WINT_T
912 BITSIZEOF_WCHAR_T
913 BITSIZEOF_SIG_ATOMIC_T
914 BITSIZEOF_SIZE_T
915 BITSIZEOF_PTRDIFF_T
916 APPLE_UNIVERSAL_BUILD
917 HAVE_SYS_BITYPES_H
918 HAVE_SYS_INTTYPES_H
919 HAVE_STDINT_H
920 NEXT_AS_FIRST_DIRECTIVE_STDINT_H
921 NEXT_STDINT_H
922 HAVE_SYS_TYPES_H
923 HAVE_INTTYPES_H
924 HAVE_WCHAR_H
925 HAVE_UNSIGNED_LONG_LONG_INT
926 HAVE_LONG_LONG_INT
927 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
928 NEXT_SYS_TIME_H
929 REPLACE_STRUCT_TIMEVAL
930 REPLACE_GETTIMEOFDAY
931 HAVE_SYS_TIME_H
932 HAVE_STRUCT_TIMEVAL
933 HAVE_GETTIMEOFDAY
934 GNULIB_GETTIMEOFDAY
935 LTLIBINTL
936 LIBINTL
937 GNULIB_GL_UNISTD_H_GETOPT
938 GETOPT_H
939 HAVE_GETOPT_H
940 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H
941 NEXT_GETOPT_H
942 WINDOWS_64_BIT_ST_SIZE
943 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
944 NEXT_SYS_STAT_H
945 WINDOWS_64_BIT_OFF_T
946 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H
947 NEXT_SYS_TYPES_H
948 REPLACE_VSPRINTF
949 REPLACE_VSNPRINTF
950 REPLACE_VPRINTF
951 REPLACE_VFPRINTF
952 REPLACE_VDPRINTF
953 REPLACE_VASPRINTF
954 REPLACE_TMPFILE
955 REPLACE_STDIO_WRITE_FUNCS
956 REPLACE_STDIO_READ_FUNCS
957 REPLACE_SPRINTF
958 REPLACE_SNPRINTF
959 REPLACE_RENAMEAT
960 REPLACE_RENAME
961 REPLACE_REMOVE
962 REPLACE_PRINTF
963 REPLACE_POPEN
964 REPLACE_PERROR
965 REPLACE_OBSTACK_PRINTF
966 REPLACE_GETLINE
967 REPLACE_GETDELIM
968 REPLACE_FTELLO
969 REPLACE_FTELL
970 REPLACE_FSEEKO
971 REPLACE_FSEEK
972 REPLACE_FREOPEN
973 REPLACE_FPURGE
974 REPLACE_FPRINTF
975 REPLACE_FOPEN
976 REPLACE_FFLUSH
977 REPLACE_FDOPEN
978 REPLACE_FCLOSE
979 REPLACE_DPRINTF
980 HAVE_VDPRINTF
981 HAVE_VASPRINTF
982 HAVE_RENAMEAT
983 HAVE_POPEN
984 HAVE_PCLOSE
985 HAVE_FTELLO
986 HAVE_FSEEKO
987 HAVE_DPRINTF
988 HAVE_DECL_VSNPRINTF
989 HAVE_DECL_SNPRINTF
990 HAVE_DECL_OBSTACK_PRINTF
991 HAVE_DECL_GETLINE
992 HAVE_DECL_GETDELIM
993 HAVE_DECL_FTELLO
994 HAVE_DECL_FSEEKO
995 HAVE_DECL_FPURGE
996 GNULIB_VSPRINTF_POSIX
997 GNULIB_VSNPRINTF
998 GNULIB_VPRINTF_POSIX
999 GNULIB_VPRINTF
1000 GNULIB_VFPRINTF_POSIX
1001 GNULIB_VFPRINTF
1002 GNULIB_VDPRINTF
1003 GNULIB_VSCANF
1004 GNULIB_VFSCANF
1005 GNULIB_VASPRINTF
1006 GNULIB_TMPFILE
1007 GNULIB_STDIO_H_SIGPIPE
1008 GNULIB_STDIO_H_NONBLOCKING
1009 GNULIB_SPRINTF_POSIX
1010 GNULIB_SNPRINTF
1011 GNULIB_SCANF
1012 GNULIB_RENAMEAT
1013 GNULIB_RENAME
1014 GNULIB_REMOVE
1015 GNULIB_PUTS
1016 GNULIB_PUTCHAR
1017 GNULIB_PUTC
1018 GNULIB_PRINTF_POSIX
1019 GNULIB_PRINTF
1020 GNULIB_POPEN
1021 GNULIB_PERROR
1022 GNULIB_PCLOSE
1023 GNULIB_OBSTACK_PRINTF_POSIX
1024 GNULIB_OBSTACK_PRINTF
1025 GNULIB_GETLINE
1026 GNULIB_GETDELIM
1027 GNULIB_GETCHAR
1028 GNULIB_GETC
1029 GNULIB_FWRITE
1030 GNULIB_FTELLO
1031 GNULIB_FTELL
1032 GNULIB_FSEEKO
1033 GNULIB_FSEEK
1034 GNULIB_FSCANF
1035 GNULIB_FREOPEN
1036 GNULIB_FREAD
1037 GNULIB_FPUTS
1038 GNULIB_FPUTC
1039 GNULIB_FPURGE
1040 GNULIB_FPRINTF_POSIX
1041 GNULIB_FPRINTF
1042 GNULIB_FOPEN
1043 GNULIB_FGETS
1044 GNULIB_FGETC
1045 GNULIB_FFLUSH
1046 GNULIB_FDOPEN
1047 GNULIB_FCLOSE
1048 GNULIB_DPRINTF
1049 GL_GENERATE_FNMATCH_H_FALSE
1050 GL_GENERATE_FNMATCH_H_TRUE
1051 FNMATCH_H
1052 REPLACE_ITOLD
1053 GL_GENERATE_FLOAT_H_FALSE
1054 GL_GENERATE_FLOAT_H_TRUE
1055 FLOAT_H
1056 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H
1057 NEXT_FLOAT_H
1058 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
1059 NEXT_FCNTL_H
1060 REPLACE_OPENAT
1061 REPLACE_OPEN
1062 REPLACE_FCNTL
1063 HAVE_OPENAT
1064 HAVE_FCNTL
1065 GNULIB_OPENAT
1066 GNULIB_OPEN
1067 GNULIB_NONBLOCKING
1068 GNULIB_FCNTL
1069 REPLACE_UTIMENSAT
1070 REPLACE_STAT
1071 REPLACE_MKNOD
1072 REPLACE_MKFIFO
1073 REPLACE_MKDIR
1074 REPLACE_LSTAT
1075 REPLACE_FUTIMENS
1076 REPLACE_FSTATAT
1077 REPLACE_FSTAT
1078 HAVE_UTIMENSAT
1079 HAVE_MKNODAT
1080 HAVE_MKNOD
1081 HAVE_MKFIFOAT
1082 HAVE_MKFIFO
1083 HAVE_MKDIRAT
1084 HAVE_LSTAT
1085 HAVE_LCHMOD
1086 HAVE_FUTIMENS
1087 HAVE_FSTATAT
1088 HAVE_FCHMODAT
1089 GNULIB_UTIMENSAT
1090 GNULIB_STAT
1091 GNULIB_MKNODAT
1092 GNULIB_MKNOD
1093 GNULIB_MKFIFOAT
1094 GNULIB_MKFIFO
1095 GNULIB_MKDIRAT
1096 GNULIB_LSTAT
1097 GNULIB_LCHMOD
1098 GNULIB_FUTIMENS
1099 GNULIB_FSTATAT
1100 GNULIB_FSTAT
1101 GNULIB_FCHMODAT
1102 EOVERFLOW_VALUE
1103 EOVERFLOW_HIDDEN
1104 ENOLINK_VALUE
1105 ENOLINK_HIDDEN
1106 EMULTIHOP_VALUE
1107 EMULTIHOP_HIDDEN
1108 GL_GENERATE_ERRNO_H_FALSE
1109 GL_GENERATE_ERRNO_H_TRUE
1110 ERRNO_H
1111 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
1112 NEXT_ERRNO_H
1113 HAVE_DIRENT_H
1114 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H
1115 NEXT_DIRENT_H
1116 PRAGMA_COLUMNS
1117 PRAGMA_SYSTEM_HEADER
1118 INCLUDE_NEXT_AS_FIRST_DIRECTIVE
1119 INCLUDE_NEXT
1120 pkglibexecdir
1121 lispdir
1122 REPLACE_FDOPENDIR
1123 REPLACE_DIRFD
1124 REPLACE_CLOSEDIR
1125 REPLACE_OPENDIR
1126 HAVE_ALPHASORT
1127 HAVE_SCANDIR
1128 HAVE_FDOPENDIR
1129 HAVE_DECL_FDOPENDIR
1130 HAVE_DECL_DIRFD
1131 HAVE_CLOSEDIR
1132 HAVE_REWINDDIR
1133 HAVE_READDIR
1134 HAVE_OPENDIR
1135 GNULIB_ALPHASORT
1136 GNULIB_SCANDIR
1137 GNULIB_FDOPENDIR
1138 GNULIB_DIRFD
1139 GNULIB_CLOSEDIR
1140 GNULIB_REWINDDIR
1141 GNULIB_READDIR
1142 GNULIB_OPENDIR
1143 HAVE_WINSOCK2_H
1144 HAVE_MSVC_INVALID_PARAMETER_HANDLER
1145 LIB_CLOCK_GETTIME
1146 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1147 UNISTD_H_HAVE_WINSOCK2_H
1148 REPLACE_WRITE
1149 REPLACE_USLEEP
1150 REPLACE_UNLINKAT
1151 REPLACE_UNLINK
1152 REPLACE_TTYNAME_R
1153 REPLACE_SYMLINK
1154 REPLACE_SLEEP
1155 REPLACE_RMDIR
1156 REPLACE_READLINK
1157 REPLACE_READ
1158 REPLACE_PWRITE
1159 REPLACE_PREAD
1160 REPLACE_LSEEK
1161 REPLACE_LINKAT
1162 REPLACE_LINK
1163 REPLACE_LCHOWN
1164 REPLACE_ISATTY
1165 REPLACE_GETPAGESIZE
1166 REPLACE_GETGROUPS
1167 REPLACE_GETLOGIN_R
1168 REPLACE_GETDOMAINNAME
1169 REPLACE_GETCWD
1170 REPLACE_FTRUNCATE
1171 REPLACE_FCHOWNAT
1172 REPLACE_DUP2
1173 REPLACE_DUP
1174 REPLACE_CLOSE
1175 REPLACE_CHOWN
1176 HAVE_SYS_PARAM_H
1177 HAVE_OS_H
1178 HAVE_DECL_TTYNAME_R
1179 HAVE_DECL_SETHOSTNAME
1180 HAVE_DECL_GETUSERSHELL
1181 HAVE_DECL_GETPAGESIZE
1182 HAVE_DECL_GETLOGIN_R
1183 HAVE_DECL_GETDOMAINNAME
1184 HAVE_DECL_FDATASYNC
1185 HAVE_DECL_FCHDIR
1186 HAVE_DECL_ENVIRON
1187 HAVE_USLEEP
1188 HAVE_UNLINKAT
1189 HAVE_SYMLINKAT
1190 HAVE_SYMLINK
1191 HAVE_SLEEP
1192 HAVE_SETHOSTNAME
1193 HAVE_READLINKAT
1194 HAVE_READLINK
1195 HAVE_PWRITE
1196 HAVE_PREAD
1197 HAVE_PIPE2
1198 HAVE_PIPE
1199 HAVE_LINKAT
1200 HAVE_LINK
1201 HAVE_LCHOWN
1202 HAVE_GROUP_MEMBER
1203 HAVE_GETPAGESIZE
1204 HAVE_GETLOGIN
1205 HAVE_GETHOSTNAME
1206 HAVE_GETGROUPS
1207 HAVE_GETDTABLESIZE
1208 HAVE_FTRUNCATE
1209 HAVE_FSYNC
1210 HAVE_FDATASYNC
1211 HAVE_FCHOWNAT
1212 HAVE_FCHDIR
1213 HAVE_FACCESSAT
1214 HAVE_EUIDACCESS
1215 HAVE_DUP3
1216 HAVE_DUP2
1217 HAVE_CHOWN
1218 GNULIB_WRITE
1219 GNULIB_USLEEP
1220 GNULIB_UNLINKAT
1221 GNULIB_UNLINK
1222 GNULIB_UNISTD_H_SIGPIPE
1223 GNULIB_UNISTD_H_NONBLOCKING
1224 GNULIB_TTYNAME_R
1225 GNULIB_SYMLINKAT
1226 GNULIB_SYMLINK
1227 GNULIB_SLEEP
1228 GNULIB_SETHOSTNAME
1229 GNULIB_RMDIR
1230 GNULIB_READLINKAT
1231 GNULIB_READLINK
1232 GNULIB_READ
1233 GNULIB_PWRITE
1234 GNULIB_PREAD
1235 GNULIB_PIPE2
1236 GNULIB_PIPE
1237 GNULIB_LSEEK
1238 GNULIB_LINKAT
1239 GNULIB_LINK
1240 GNULIB_LCHOWN
1241 GNULIB_ISATTY
1242 GNULIB_GROUP_MEMBER
1243 GNULIB_GETUSERSHELL
1244 GNULIB_GETPAGESIZE
1245 GNULIB_GETLOGIN_R
1246 GNULIB_GETLOGIN
1247 GNULIB_GETHOSTNAME
1248 GNULIB_GETGROUPS
1249 GNULIB_GETDTABLESIZE
1250 GNULIB_GETDOMAINNAME
1251 GNULIB_GETCWD
1252 GNULIB_FTRUNCATE
1253 GNULIB_FSYNC
1254 GNULIB_FDATASYNC
1255 GNULIB_FCHOWNAT
1256 GNULIB_FCHDIR
1257 GNULIB_FACCESSAT
1258 GNULIB_EUIDACCESS
1259 GNULIB_ENVIRON
1260 GNULIB_DUP3
1261 GNULIB_DUP2
1262 GNULIB_DUP
1263 GNULIB_CLOSE
1264 GNULIB_CHOWN
1265 GNULIB_CHDIR
1266 REPLACE_WCTOMB
1267 REPLACE_UNSETENV
1268 REPLACE_STRTOD
1269 REPLACE_SETENV
1270 REPLACE_REALPATH
1271 REPLACE_REALLOC
1272 REPLACE_RANDOM_R
1273 REPLACE_PUTENV
1274 REPLACE_PTSNAME_R
1275 REPLACE_PTSNAME
1276 REPLACE_MKSTEMP
1277 REPLACE_MBTOWC
1278 REPLACE_MALLOC
1279 REPLACE_CANONICALIZE_FILE_NAME
1280 REPLACE_CALLOC
1281 HAVE_DECL_UNSETENV
1282 HAVE_UNLOCKPT
1283 HAVE_SYS_LOADAVG_H
1284 HAVE_STRUCT_RANDOM_DATA
1285 HAVE_STRTOULL
1286 HAVE_STRTOLL
1287 HAVE_STRTOD
1288 HAVE_DECL_SETENV
1289 HAVE_SETENV
1290 HAVE_SECURE_GETENV
1291 HAVE_RPMATCH
1292 HAVE_REALPATH
1293 HAVE_RANDOM_R
1294 HAVE_RANDOM_H
1295 HAVE_RANDOM
1296 HAVE_PTSNAME_R
1297 HAVE_PTSNAME
1298 HAVE_POSIX_OPENPT
1299 HAVE_MKSTEMPS
1300 HAVE_MKSTEMP
1301 HAVE_MKOSTEMPS
1302 HAVE_MKOSTEMP
1303 HAVE_MKDTEMP
1304 HAVE_GRANTPT
1305 HAVE_GETSUBOPT
1306 HAVE_DECL_GETLOADAVG
1307 HAVE_CANONICALIZE_FILE_NAME
1308 HAVE_ATOLL
1309 HAVE__EXIT
1310 GNULIB_WCTOMB
1311 GNULIB_UNSETENV
1312 GNULIB_UNLOCKPT
1313 GNULIB_SYSTEM_POSIX
1314 GNULIB_STRTOULL
1315 GNULIB_STRTOLL
1316 GNULIB_STRTOD
1317 GNULIB_SETENV
1318 GNULIB_SECURE_GETENV
1319 GNULIB_RPMATCH
1320 GNULIB_REALPATH
1321 GNULIB_REALLOC_POSIX
1322 GNULIB_RANDOM_R
1323 GNULIB_RANDOM
1324 GNULIB_PUTENV
1325 GNULIB_PTSNAME_R
1326 GNULIB_PTSNAME
1327 GNULIB_POSIX_OPENPT
1328 GNULIB_MKSTEMPS
1329 GNULIB_MKSTEMP
1330 GNULIB_MKOSTEMPS
1331 GNULIB_MKOSTEMP
1332 GNULIB_MKDTEMP
1333 GNULIB_MBTOWC
1334 GNULIB_MALLOC_POSIX
1335 GNULIB_GRANTPT
1336 GNULIB_GETSUBOPT
1337 GNULIB_GETLOADAVG
1338 GNULIB_CANONICALIZE_FILE_NAME
1339 GNULIB_CALLOC_POSIX
1340 GNULIB_ATOLL
1341 GNULIB__EXIT
1342 LOCALE_FR
1343 REPLACE_WCSWIDTH
1344 REPLACE_WCWIDTH
1345 REPLACE_WCSNRTOMBS
1346 REPLACE_WCSRTOMBS
1347 REPLACE_WCRTOMB
1348 REPLACE_MBSNRTOWCS
1349 REPLACE_MBSRTOWCS
1350 REPLACE_MBRLEN
1351 REPLACE_MBRTOWC
1352 REPLACE_MBSINIT
1353 REPLACE_WCTOB
1354 REPLACE_BTOWC
1355 REPLACE_MBSTATE_T
1356 HAVE_DECL_WCWIDTH
1357 HAVE_DECL_WCTOB
1358 HAVE_WCSWIDTH
1359 HAVE_WCSTOK
1360 HAVE_WCSSTR
1361 HAVE_WCSPBRK
1362 HAVE_WCSSPN
1363 HAVE_WCSCSPN
1364 HAVE_WCSRCHR
1365 HAVE_WCSCHR
1366 HAVE_WCSDUP
1367 HAVE_WCSXFRM
1368 HAVE_WCSCOLL
1369 HAVE_WCSNCASECMP
1370 HAVE_WCSCASECMP
1371 HAVE_WCSNCMP
1372 HAVE_WCSCMP
1373 HAVE_WCSNCAT
1374 HAVE_WCSCAT
1375 HAVE_WCPNCPY
1376 HAVE_WCSNCPY
1377 HAVE_WCPCPY
1378 HAVE_WCSCPY
1379 HAVE_WCSNLEN
1380 HAVE_WCSLEN
1381 HAVE_WMEMSET
1382 HAVE_WMEMMOVE
1383 HAVE_WMEMCPY
1384 HAVE_WMEMCMP
1385 HAVE_WMEMCHR
1386 HAVE_WCSNRTOMBS
1387 HAVE_WCSRTOMBS
1388 HAVE_WCRTOMB
1389 HAVE_MBSNRTOWCS
1390 HAVE_MBSRTOWCS
1391 HAVE_MBRLEN
1392 HAVE_MBRTOWC
1393 HAVE_MBSINIT
1394 HAVE_BTOWC
1395 GNULIB_WCSWIDTH
1396 GNULIB_WCSTOK
1397 GNULIB_WCSSTR
1398 GNULIB_WCSPBRK
1399 GNULIB_WCSSPN
1400 GNULIB_WCSCSPN
1401 GNULIB_WCSRCHR
1402 GNULIB_WCSCHR
1403 GNULIB_WCSDUP
1404 GNULIB_WCSXFRM
1405 GNULIB_WCSCOLL
1406 GNULIB_WCSNCASECMP
1407 GNULIB_WCSCASECMP
1408 GNULIB_WCSNCMP
1409 GNULIB_WCSCMP
1410 GNULIB_WCSNCAT
1411 GNULIB_WCSCAT
1412 GNULIB_WCPNCPY
1413 GNULIB_WCSNCPY
1414 GNULIB_WCPCPY
1415 GNULIB_WCSCPY
1416 GNULIB_WCSNLEN
1417 GNULIB_WCSLEN
1418 GNULIB_WMEMSET
1419 GNULIB_WMEMMOVE
1420 GNULIB_WMEMCPY
1421 GNULIB_WMEMCMP
1422 GNULIB_WMEMCHR
1423 GNULIB_WCWIDTH
1424 GNULIB_WCSNRTOMBS
1425 GNULIB_WCSRTOMBS
1426 GNULIB_WCRTOMB
1427 GNULIB_MBSNRTOWCS
1428 GNULIB_MBSRTOWCS
1429 GNULIB_MBRLEN
1430 GNULIB_MBRTOWC
1431 GNULIB_MBSINIT
1432 GNULIB_WCTOB
1433 GNULIB_BTOWC
1434 host_os
1435 host_vendor
1436 host_cpu
1437 host
1438 build_os
1439 build_vendor
1440 build_cpu
1441 build
1442 GL_GENERATE_ALLOCA_H_FALSE
1443 GL_GENERATE_ALLOCA_H_TRUE
1444 ALLOCA_H
1445 ALLOCA
1446 GL_COND_LIBTOOL_FALSE
1447 GL_COND_LIBTOOL_TRUE
1448 ARFLAGS
1449 AR
1450 EGREP
1451 GREP
1452 CPP
1453 YFLAGS
1454 YACC
1455 RANLIB
1456 am__fastdepCC_FALSE
1457 am__fastdepCC_TRUE
1458 CCDEPMODE
1459 am__nodep
1460 AMDEPBACKSLASH
1461 AMDEP_FALSE
1462 AMDEP_TRUE
1463 am__quote
1464 am__include
1465 DEPDIR
1466 OBJEXT
1467 EXEEXT
1468 ac_ct_CC
1469 CPPFLAGS
1470 LDFLAGS
1471 CFLAGS
1472 CC
1473 AM_BACKSLASH
1474 AM_DEFAULT_VERBOSITY
1475 AM_DEFAULT_V
1476 AM_V
1477 am__untar
1478 am__tar
1479 AMTAR
1480 am__leading_dot
1481 SET_MAKE
1482 AWK
1483 mkdir_p
1484 MKDIR_P
1485 INSTALL_STRIP_PROGRAM
1486 STRIP
1487 install_sh
1488 MAKEINFO
1489 AUTOHEADER
1490 AUTOMAKE
1491 AUTOCONF
1492 ACLOCAL
1493 VERSION
1494 PACKAGE
1495 CYGPATH_W
1496 am__isrc
1497 INSTALL_DATA
1498 INSTALL_SCRIPT
1499 INSTALL_PROGRAM
1500 target_alias
1501 host_alias
1502 build_alias
1503 LIBS
1504 ECHO_T
1505 ECHO_N
1506 ECHO_C
1507 DEFS
1508 mandir
1509 localedir
1510 libdir
1511 psdir
1512 pdfdir
1513 dvidir
1514 htmldir
1515 infodir
1516 docdir
1517 oldincludedir
1518 includedir
1519 localstatedir
1520 sharedstatedir
1521 sysconfdir
1522 datadir
1523 datarootdir
1524 libexecdir
1525 sbindir
1526 bindir
1527 program_transform_name
1528 prefix
1529 exec_prefix
1530 PACKAGE_URL
1531 PACKAGE_BUGREPORT
1532 PACKAGE_STRING
1533 PACKAGE_VERSION
1534 PACKAGE_TARNAME
1535 PACKAGE_NAME
1536 PATH_SEPARATOR
1537 SHELL'
1538 ac_subst_files=''
1539 ac_user_opts='
1540 enable_option_checking
1541 enable_silent_rules
1542 enable_dependency_tracking
1543 enable_largefile
1544 with_posix_acls
1545 enable_acl
1546 with_included_regex
1547 with_selinux
1548 with_packager
1549 with_packager_version
1550 with_packager_bug_reports
1551 with_rmt
1552 enable_gcc_warnings
1553 with_xattrs
1554 with_compress
1555 with_gzip
1556 with_bzip2
1557 with_lzip
1558 with_lzma
1559 with_lzop
1560 with_xz
1561 with_gnu_ld
1562 enable_rpath
1563 with_libiconv_prefix
1564 enable_nls
1565 with_libintl_prefix
1566 enable_backup_scripts
1567 '
1568       ac_precious_vars='build_alias
1569 host_alias
1570 target_alias
1571 CC
1572 CFLAGS
1573 LDFLAGS
1574 LIBS
1575 CPPFLAGS
1576 YACC
1577 YFLAGS
1578 CPP
1579 DEFAULT_RMT_DIR
1580 RSH
1581 DEFAULT_ARCHIVE_FORMAT
1582 DEFAULT_ARCHIVE
1583 DEFAULT_BLOCKING
1584 DEFAULT_QUOTING_STYLE'
1585
1586
1587 # Initialize some variables set by options.
1588 ac_init_help=
1589 ac_init_version=false
1590 ac_unrecognized_opts=
1591 ac_unrecognized_sep=
1592 # The variables have the same names as the options, with
1593 # dashes changed to underlines.
1594 cache_file=/dev/null
1595 exec_prefix=NONE
1596 no_create=
1597 no_recursion=
1598 prefix=NONE
1599 program_prefix=NONE
1600 program_suffix=NONE
1601 program_transform_name=s,x,x,
1602 silent=
1603 site=
1604 srcdir=
1605 verbose=
1606 x_includes=NONE
1607 x_libraries=NONE
1608
1609 # Installation directory options.
1610 # These are left unexpanded so users can "make install exec_prefix=/foo"
1611 # and all the variables that are supposed to be based on exec_prefix
1612 # by default will actually change.
1613 # Use braces instead of parens because sh, perl, etc. also accept them.
1614 # (The list follows the same order as the GNU Coding Standards.)
1615 bindir='${exec_prefix}/bin'
1616 sbindir='${exec_prefix}/sbin'
1617 libexecdir='${exec_prefix}/libexec'
1618 datarootdir='${prefix}/share'
1619 datadir='${datarootdir}'
1620 sysconfdir='${prefix}/etc'
1621 sharedstatedir='${prefix}/com'
1622 localstatedir='${prefix}/var'
1623 includedir='${prefix}/include'
1624 oldincludedir='/usr/include'
1625 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1626 infodir='${datarootdir}/info'
1627 htmldir='${docdir}'
1628 dvidir='${docdir}'
1629 pdfdir='${docdir}'
1630 psdir='${docdir}'
1631 libdir='${exec_prefix}/lib'
1632 localedir='${datarootdir}/locale'
1633 mandir='${datarootdir}/man'
1634
1635 ac_prev=
1636 ac_dashdash=
1637 for ac_option
1638 do
1639   # If the previous option needs an argument, assign it.
1640   if test -n "$ac_prev"; then
1641     eval $ac_prev=\$ac_option
1642     ac_prev=
1643     continue
1644   fi
1645
1646   case $ac_option in
1647   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1648   *=)   ac_optarg= ;;
1649   *)    ac_optarg=yes ;;
1650   esac
1651
1652   # Accept the important Cygnus configure options, so we can diagnose typos.
1653
1654   case $ac_dashdash$ac_option in
1655   --)
1656     ac_dashdash=yes ;;
1657
1658   -bindir | --bindir | --bindi | --bind | --bin | --bi)
1659     ac_prev=bindir ;;
1660   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1661     bindir=$ac_optarg ;;
1662
1663   -build | --build | --buil | --bui | --bu)
1664     ac_prev=build_alias ;;
1665   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1666     build_alias=$ac_optarg ;;
1667
1668   -cache-file | --cache-file | --cache-fil | --cache-fi \
1669   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1670     ac_prev=cache_file ;;
1671   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1672   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1673     cache_file=$ac_optarg ;;
1674
1675   --config-cache | -C)
1676     cache_file=config.cache ;;
1677
1678   -datadir | --datadir | --datadi | --datad)
1679     ac_prev=datadir ;;
1680   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1681     datadir=$ac_optarg ;;
1682
1683   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1684   | --dataroo | --dataro | --datar)
1685     ac_prev=datarootdir ;;
1686   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1687   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1688     datarootdir=$ac_optarg ;;
1689
1690   -disable-* | --disable-*)
1691     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1692     # Reject names that are not valid shell variable names.
1693     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1694       as_fn_error $? "invalid feature name: $ac_useropt"
1695     ac_useropt_orig=$ac_useropt
1696     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1697     case $ac_user_opts in
1698       *"
1699 "enable_$ac_useropt"
1700 "*) ;;
1701       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1702          ac_unrecognized_sep=', ';;
1703     esac
1704     eval enable_$ac_useropt=no ;;
1705
1706   -docdir | --docdir | --docdi | --doc | --do)
1707     ac_prev=docdir ;;
1708   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1709     docdir=$ac_optarg ;;
1710
1711   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1712     ac_prev=dvidir ;;
1713   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1714     dvidir=$ac_optarg ;;
1715
1716   -enable-* | --enable-*)
1717     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1718     # Reject names that are not valid shell variable names.
1719     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1720       as_fn_error $? "invalid feature name: $ac_useropt"
1721     ac_useropt_orig=$ac_useropt
1722     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1723     case $ac_user_opts in
1724       *"
1725 "enable_$ac_useropt"
1726 "*) ;;
1727       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1728          ac_unrecognized_sep=', ';;
1729     esac
1730     eval enable_$ac_useropt=\$ac_optarg ;;
1731
1732   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1733   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1734   | --exec | --exe | --ex)
1735     ac_prev=exec_prefix ;;
1736   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1737   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1738   | --exec=* | --exe=* | --ex=*)
1739     exec_prefix=$ac_optarg ;;
1740
1741   -gas | --gas | --ga | --g)
1742     # Obsolete; use --with-gas.
1743     with_gas=yes ;;
1744
1745   -help | --help | --hel | --he | -h)
1746     ac_init_help=long ;;
1747   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1748     ac_init_help=recursive ;;
1749   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1750     ac_init_help=short ;;
1751
1752   -host | --host | --hos | --ho)
1753     ac_prev=host_alias ;;
1754   -host=* | --host=* | --hos=* | --ho=*)
1755     host_alias=$ac_optarg ;;
1756
1757   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1758     ac_prev=htmldir ;;
1759   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1760   | --ht=*)
1761     htmldir=$ac_optarg ;;
1762
1763   -includedir | --includedir | --includedi | --included | --include \
1764   | --includ | --inclu | --incl | --inc)
1765     ac_prev=includedir ;;
1766   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1767   | --includ=* | --inclu=* | --incl=* | --inc=*)
1768     includedir=$ac_optarg ;;
1769
1770   -infodir | --infodir | --infodi | --infod | --info | --inf)
1771     ac_prev=infodir ;;
1772   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1773     infodir=$ac_optarg ;;
1774
1775   -libdir | --libdir | --libdi | --libd)
1776     ac_prev=libdir ;;
1777   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1778     libdir=$ac_optarg ;;
1779
1780   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1781   | --libexe | --libex | --libe)
1782     ac_prev=libexecdir ;;
1783   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1784   | --libexe=* | --libex=* | --libe=*)
1785     libexecdir=$ac_optarg ;;
1786
1787   -localedir | --localedir | --localedi | --localed | --locale)
1788     ac_prev=localedir ;;
1789   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1790     localedir=$ac_optarg ;;
1791
1792   -localstatedir | --localstatedir | --localstatedi | --localstated \
1793   | --localstate | --localstat | --localsta | --localst | --locals)
1794     ac_prev=localstatedir ;;
1795   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1796   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1797     localstatedir=$ac_optarg ;;
1798
1799   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1800     ac_prev=mandir ;;
1801   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1802     mandir=$ac_optarg ;;
1803
1804   -nfp | --nfp | --nf)
1805     # Obsolete; use --without-fp.
1806     with_fp=no ;;
1807
1808   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1809   | --no-cr | --no-c | -n)
1810     no_create=yes ;;
1811
1812   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1813   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1814     no_recursion=yes ;;
1815
1816   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1817   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1818   | --oldin | --oldi | --old | --ol | --o)
1819     ac_prev=oldincludedir ;;
1820   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1821   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1822   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1823     oldincludedir=$ac_optarg ;;
1824
1825   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1826     ac_prev=prefix ;;
1827   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1828     prefix=$ac_optarg ;;
1829
1830   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1831   | --program-pre | --program-pr | --program-p)
1832     ac_prev=program_prefix ;;
1833   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1834   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1835     program_prefix=$ac_optarg ;;
1836
1837   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1838   | --program-suf | --program-su | --program-s)
1839     ac_prev=program_suffix ;;
1840   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1841   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1842     program_suffix=$ac_optarg ;;
1843
1844   -program-transform-name | --program-transform-name \
1845   | --program-transform-nam | --program-transform-na \
1846   | --program-transform-n | --program-transform- \
1847   | --program-transform | --program-transfor \
1848   | --program-transfo | --program-transf \
1849   | --program-trans | --program-tran \
1850   | --progr-tra | --program-tr | --program-t)
1851     ac_prev=program_transform_name ;;
1852   -program-transform-name=* | --program-transform-name=* \
1853   | --program-transform-nam=* | --program-transform-na=* \
1854   | --program-transform-n=* | --program-transform-=* \
1855   | --program-transform=* | --program-transfor=* \
1856   | --program-transfo=* | --program-transf=* \
1857   | --program-trans=* | --program-tran=* \
1858   | --progr-tra=* | --program-tr=* | --program-t=*)
1859     program_transform_name=$ac_optarg ;;
1860
1861   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1862     ac_prev=pdfdir ;;
1863   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1864     pdfdir=$ac_optarg ;;
1865
1866   -psdir | --psdir | --psdi | --psd | --ps)
1867     ac_prev=psdir ;;
1868   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1869     psdir=$ac_optarg ;;
1870
1871   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1872   | -silent | --silent | --silen | --sile | --sil)
1873     silent=yes ;;
1874
1875   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1876     ac_prev=sbindir ;;
1877   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1878   | --sbi=* | --sb=*)
1879     sbindir=$ac_optarg ;;
1880
1881   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1882   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1883   | --sharedst | --shareds | --shared | --share | --shar \
1884   | --sha | --sh)
1885     ac_prev=sharedstatedir ;;
1886   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1887   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1888   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1889   | --sha=* | --sh=*)
1890     sharedstatedir=$ac_optarg ;;
1891
1892   -site | --site | --sit)
1893     ac_prev=site ;;
1894   -site=* | --site=* | --sit=*)
1895     site=$ac_optarg ;;
1896
1897   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1898     ac_prev=srcdir ;;
1899   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1900     srcdir=$ac_optarg ;;
1901
1902   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1903   | --syscon | --sysco | --sysc | --sys | --sy)
1904     ac_prev=sysconfdir ;;
1905   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1906   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1907     sysconfdir=$ac_optarg ;;
1908
1909   -target | --target | --targe | --targ | --tar | --ta | --t)
1910     ac_prev=target_alias ;;
1911   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1912     target_alias=$ac_optarg ;;
1913
1914   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1915     verbose=yes ;;
1916
1917   -version | --version | --versio | --versi | --vers | -V)
1918     ac_init_version=: ;;
1919
1920   -with-* | --with-*)
1921     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1922     # Reject names that are not valid shell variable names.
1923     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1924       as_fn_error $? "invalid package name: $ac_useropt"
1925     ac_useropt_orig=$ac_useropt
1926     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1927     case $ac_user_opts in
1928       *"
1929 "with_$ac_useropt"
1930 "*) ;;
1931       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1932          ac_unrecognized_sep=', ';;
1933     esac
1934     eval with_$ac_useropt=\$ac_optarg ;;
1935
1936   -without-* | --without-*)
1937     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1938     # Reject names that are not valid shell variable names.
1939     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1940       as_fn_error $? "invalid package name: $ac_useropt"
1941     ac_useropt_orig=$ac_useropt
1942     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1943     case $ac_user_opts in
1944       *"
1945 "with_$ac_useropt"
1946 "*) ;;
1947       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1948          ac_unrecognized_sep=', ';;
1949     esac
1950     eval with_$ac_useropt=no ;;
1951
1952   --x)
1953     # Obsolete; use --with-x.
1954     with_x=yes ;;
1955
1956   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1957   | --x-incl | --x-inc | --x-in | --x-i)
1958     ac_prev=x_includes ;;
1959   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1960   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1961     x_includes=$ac_optarg ;;
1962
1963   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1964   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1965     ac_prev=x_libraries ;;
1966   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1967   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1968     x_libraries=$ac_optarg ;;
1969
1970   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1971 Try \`$0 --help' for more information"
1972     ;;
1973
1974   *=*)
1975     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1976     # Reject names that are not valid shell variable names.
1977     case $ac_envvar in #(
1978       '' | [0-9]* | *[!_$as_cr_alnum]* )
1979       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1980     esac
1981     eval $ac_envvar=\$ac_optarg
1982     export $ac_envvar ;;
1983
1984   *)
1985     # FIXME: should be removed in autoconf 3.0.
1986     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1987     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1988       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1989     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1990     ;;
1991
1992   esac
1993 done
1994
1995 if test -n "$ac_prev"; then
1996   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1997   as_fn_error $? "missing argument to $ac_option"
1998 fi
1999
2000 if test -n "$ac_unrecognized_opts"; then
2001   case $enable_option_checking in
2002     no) ;;
2003     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
2004     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
2005   esac
2006 fi
2007
2008 # Check all directory arguments for consistency.
2009 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
2010                 datadir sysconfdir sharedstatedir localstatedir includedir \
2011                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
2012                 libdir localedir mandir
2013 do
2014   eval ac_val=\$$ac_var
2015   # Remove trailing slashes.
2016   case $ac_val in
2017     */ )
2018       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
2019       eval $ac_var=\$ac_val;;
2020   esac
2021   # Be sure to have absolute directory names.
2022   case $ac_val in
2023     [\\/$]* | ?:[\\/]* )  continue;;
2024     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
2025   esac
2026   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
2027 done
2028
2029 # There might be people who depend on the old broken behavior: `$host'
2030 # used to hold the argument of --host etc.
2031 # FIXME: To remove some day.
2032 build=$build_alias
2033 host=$host_alias
2034 target=$target_alias
2035
2036 # FIXME: To remove some day.
2037 if test "x$host_alias" != x; then
2038   if test "x$build_alias" = x; then
2039     cross_compiling=maybe
2040   elif test "x$build_alias" != "x$host_alias"; then
2041     cross_compiling=yes
2042   fi
2043 fi
2044
2045 ac_tool_prefix=
2046 test -n "$host_alias" && ac_tool_prefix=$host_alias-
2047
2048 test "$silent" = yes && exec 6>/dev/null
2049
2050
2051 ac_pwd=`pwd` && test -n "$ac_pwd" &&
2052 ac_ls_di=`ls -di .` &&
2053 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
2054   as_fn_error $? "working directory cannot be determined"
2055 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
2056   as_fn_error $? "pwd does not report name of working directory"
2057
2058
2059 # Find the source files, if location was not specified.
2060 if test -z "$srcdir"; then
2061   ac_srcdir_defaulted=yes
2062   # Try the directory containing this script, then the parent directory.
2063   ac_confdir=`$as_dirname -- "$as_myself" ||
2064 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
2065          X"$as_myself" : 'X\(//\)[^/]' \| \
2066          X"$as_myself" : 'X\(//\)$' \| \
2067          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
2068 $as_echo X"$as_myself" |
2069     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
2070             s//\1/
2071             q
2072           }
2073           /^X\(\/\/\)[^/].*/{
2074             s//\1/
2075             q
2076           }
2077           /^X\(\/\/\)$/{
2078             s//\1/
2079             q
2080           }
2081           /^X\(\/\).*/{
2082             s//\1/
2083             q
2084           }
2085           s/.*/./; q'`
2086   srcdir=$ac_confdir
2087   if test ! -r "$srcdir/$ac_unique_file"; then
2088     srcdir=..
2089   fi
2090 else
2091   ac_srcdir_defaulted=no
2092 fi
2093 if test ! -r "$srcdir/$ac_unique_file"; then
2094   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
2095   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
2096 fi
2097 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
2098 ac_abs_confdir=`(
2099         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
2100         pwd)`
2101 # When building in place, set srcdir=.
2102 if test "$ac_abs_confdir" = "$ac_pwd"; then
2103   srcdir=.
2104 fi
2105 # Remove unnecessary trailing slashes from srcdir.
2106 # Double slashes in file names in object file debugging info
2107 # mess up M-x gdb in Emacs.
2108 case $srcdir in
2109 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
2110 esac
2111 for ac_var in $ac_precious_vars; do
2112   eval ac_env_${ac_var}_set=\${${ac_var}+set}
2113   eval ac_env_${ac_var}_value=\$${ac_var}
2114   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
2115   eval ac_cv_env_${ac_var}_value=\$${ac_var}
2116 done
2117
2118 #
2119 # Report the --help message.
2120 #
2121 if test "$ac_init_help" = "long"; then
2122   # Omit some internal or obsolete options to make the list less imposing.
2123   # This message is too long to be a string in the A/UX 3.1 sh.
2124   cat <<_ACEOF
2125 \`configure' configures GNU tar 1.27.1 to adapt to many kinds of systems.
2126
2127 Usage: $0 [OPTION]... [VAR=VALUE]...
2128
2129 To assign environment variables (e.g., CC, CFLAGS...), specify them as
2130 VAR=VALUE.  See below for descriptions of some of the useful variables.
2131
2132 Defaults for the options are specified in brackets.
2133
2134 Configuration:
2135   -h, --help              display this help and exit
2136       --help=short        display options specific to this package
2137       --help=recursive    display the short help of all the included packages
2138   -V, --version           display version information and exit
2139   -q, --quiet, --silent   do not print \`checking ...' messages
2140       --cache-file=FILE   cache test results in FILE [disabled]
2141   -C, --config-cache      alias for \`--cache-file=config.cache'
2142   -n, --no-create         do not create output files
2143       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
2144
2145 Installation directories:
2146   --prefix=PREFIX         install architecture-independent files in PREFIX
2147                           [$ac_default_prefix]
2148   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
2149                           [PREFIX]
2150
2151 By default, \`make install' will install all the files in
2152 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
2153 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
2154 for instance \`--prefix=\$HOME'.
2155
2156 For better control, use the options below.
2157
2158 Fine tuning of the installation directories:
2159   --bindir=DIR            user executables [EPREFIX/bin]
2160   --sbindir=DIR           system admin executables [EPREFIX/sbin]
2161   --libexecdir=DIR        program executables [EPREFIX/libexec]
2162   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
2163   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
2164   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
2165   --libdir=DIR            object code libraries [EPREFIX/lib]
2166   --includedir=DIR        C header files [PREFIX/include]
2167   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
2168   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
2169   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
2170   --infodir=DIR           info documentation [DATAROOTDIR/info]
2171   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
2172   --mandir=DIR            man documentation [DATAROOTDIR/man]
2173   --docdir=DIR            documentation root [DATAROOTDIR/doc/tar]
2174   --htmldir=DIR           html documentation [DOCDIR]
2175   --dvidir=DIR            dvi documentation [DOCDIR]
2176   --pdfdir=DIR            pdf documentation [DOCDIR]
2177   --psdir=DIR             ps documentation [DOCDIR]
2178 _ACEOF
2179
2180   cat <<\_ACEOF
2181
2182 Program names:
2183   --program-prefix=PREFIX            prepend PREFIX to installed program names
2184   --program-suffix=SUFFIX            append SUFFIX to installed program names
2185   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
2186
2187 System types:
2188   --build=BUILD     configure for building on BUILD [guessed]
2189   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
2190 _ACEOF
2191 fi
2192
2193 if test -n "$ac_init_help"; then
2194   case $ac_init_help in
2195      short | recursive ) echo "Configuration of GNU tar 1.27.1:";;
2196    esac
2197   cat <<\_ACEOF
2198
2199 Optional Features:
2200   --disable-option-checking  ignore unrecognized --enable/--with options
2201   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
2202   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
2203   --enable-silent-rules   less verbose build output (undo: "make V=1")
2204   --disable-silent-rules  verbose build output (undo: "make V=0")
2205   --enable-dependency-tracking
2206                           do not reject slow dependency extractors
2207   --disable-dependency-tracking
2208                           speeds up one-time build
2209   --disable-largefile     omit support for large files
2210   --disable-acl           do not support ACLs
2211   --enable-gcc-warnings   turn on many GCC warnings (for developers; best with
2212                           GNU make)
2213   --disable-rpath         do not hardcode runtime library paths
2214   --disable-nls           do not use Native Language Support
2215   --enable-backup-scripts Create and install backup and restore scripts
2216
2217 Optional Packages:
2218   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2219   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2220   --without-posix-acls    do not use POSIX.1e access control lists
2221   --without-included-regex
2222                           don't compile regex; this is the default on systems
2223                           with recent-enough versions of the GNU C Library
2224                           (use with caution on other systems).
2225   --without-selinux       do not use SELinux, even on systems with SELinux
2226   --with-packager         String identifying the packager of this software
2227   --with-packager-version Packager-specific version information
2228   --with-packager-bug-reports
2229                           Packager info for bug reports (URL/e-mail/...)
2230   --with-rmt=FILE         Use FILE as the default `rmt' program. Do not build
2231                           included copy of `rmt'.
2232   --without-xattrs        don't use linux extended attributes
2233   --with-compress=PROG    use PROG as compress compressor program
2234   --with-gzip=PROG        use PROG as gzip compressor program
2235   --with-bzip2=PROG       use PROG as bzip2 compressor program
2236   --with-lzip=PROG        use PROG as lzip compressor program
2237   --with-lzma=PROG        use PROG as lzma compressor program
2238   --with-lzop=PROG        use PROG as lzop compressor program
2239   --with-xz=PROG          use PROG as xz compressor program
2240   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
2241   --with-libiconv-prefix[=DIR]  search for libiconv in DIR/include and DIR/lib
2242   --without-libiconv-prefix     don't search for libiconv in includedir and libdir
2243   --with-libintl-prefix[=DIR]  search for libintl in DIR/include and DIR/lib
2244   --without-libintl-prefix     don't search for libintl in includedir and libdir
2245
2246 Some influential environment variables:
2247   CC          C compiler command
2248   CFLAGS      C compiler flags
2249   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2250               nonstandard directory <lib dir>
2251   LIBS        libraries to pass to the linker, e.g. -l<library>
2252   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2253               you have headers in a nonstandard directory <include dir>
2254   YACC        The `Yet Another Compiler Compiler' implementation to use.
2255               Defaults to the first program found out of: `bison -y', `byacc',
2256               `yacc'.
2257   YFLAGS      The list of arguments that will be passed by default to $YACC.
2258               This script will default YFLAGS to the empty string to avoid a
2259               default value of `-d' given by some make applications.
2260   CPP         C preprocessor
2261   DEFAULT_RMT_DIR
2262               Define full file name of the directory where to install `rmt'.
2263               (default: $(libexecdir))
2264   RSH         Configure absolute path to default remote shell binary
2265   DEFAULT_ARCHIVE_FORMAT
2266               Set the default archive format. Allowed values are: V7, OLDGNU,
2267               USTAR, POSIX, GNU. Default is GNU
2268   DEFAULT_ARCHIVE
2269               Set the name of the default archive (default: -)
2270   DEFAULT_BLOCKING
2271               Define default blocking factor (default: 20)
2272   DEFAULT_QUOTING_STYLE
2273               Set the default quoting style. Allowed values are: literal,
2274               shell, shell-always, c, escape, locale, clocale . Default is
2275               "escape".
2276
2277 Use these variables to override the choices made by `configure' or to help
2278 it to find libraries and programs with nonstandard names/locations.
2279
2280 Report bugs to <bug-tar@gnu.org>.
2281 GNU tar home page: <http://www.gnu.org/software/tar/>.
2282 General help using GNU software: <http://www.gnu.org/gethelp/>.
2283 _ACEOF
2284 ac_status=$?
2285 fi
2286
2287 if test "$ac_init_help" = "recursive"; then
2288   # If there are subdirs, report their specific --help.
2289   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2290     test -d "$ac_dir" ||
2291       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2292       continue
2293     ac_builddir=.
2294
2295 case "$ac_dir" in
2296 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2297 *)
2298   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2299   # A ".." for each directory in $ac_dir_suffix.
2300   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2301   case $ac_top_builddir_sub in
2302   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2303   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2304   esac ;;
2305 esac
2306 ac_abs_top_builddir=$ac_pwd
2307 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2308 # for backward compatibility:
2309 ac_top_builddir=$ac_top_build_prefix
2310
2311 case $srcdir in
2312   .)  # We are building in place.
2313     ac_srcdir=.
2314     ac_top_srcdir=$ac_top_builddir_sub
2315     ac_abs_top_srcdir=$ac_pwd ;;
2316   [\\/]* | ?:[\\/]* )  # Absolute name.
2317     ac_srcdir=$srcdir$ac_dir_suffix;
2318     ac_top_srcdir=$srcdir
2319     ac_abs_top_srcdir=$srcdir ;;
2320   *) # Relative name.
2321     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2322     ac_top_srcdir=$ac_top_build_prefix$srcdir
2323     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2324 esac
2325 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2326
2327     cd "$ac_dir" || { ac_status=$?; continue; }
2328     # Check for guested configure.
2329     if test -f "$ac_srcdir/configure.gnu"; then
2330       echo &&
2331       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2332     elif test -f "$ac_srcdir/configure"; then
2333       echo &&
2334       $SHELL "$ac_srcdir/configure" --help=recursive
2335     else
2336       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2337     fi || ac_status=$?
2338     cd "$ac_pwd" || { ac_status=$?; break; }
2339   done
2340 fi
2341
2342 test -n "$ac_init_help" && exit $ac_status
2343 if $ac_init_version; then
2344   cat <<\_ACEOF
2345 GNU tar configure 1.27.1
2346 generated by GNU Autoconf 2.69
2347
2348 Copyright (C) 2012 Free Software Foundation, Inc.
2349 This configure script is free software; the Free Software Foundation
2350 gives unlimited permission to copy, distribute and modify it.
2351 _ACEOF
2352   exit
2353 fi
2354
2355 ## ------------------------ ##
2356 ## Autoconf initialization. ##
2357 ## ------------------------ ##
2358
2359 # ac_fn_c_try_compile LINENO
2360 # --------------------------
2361 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2362 ac_fn_c_try_compile ()
2363 {
2364   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2365   rm -f conftest.$ac_objext
2366   if { { ac_try="$ac_compile"
2367 case "(($ac_try" in
2368   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2369   *) ac_try_echo=$ac_try;;
2370 esac
2371 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2372 $as_echo "$ac_try_echo"; } >&5
2373   (eval "$ac_compile") 2>conftest.err
2374   ac_status=$?
2375   if test -s conftest.err; then
2376     grep -v '^ *+' conftest.err >conftest.er1
2377     cat conftest.er1 >&5
2378     mv -f conftest.er1 conftest.err
2379   fi
2380   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2381   test $ac_status = 0; } && {
2382          test -z "$ac_c_werror_flag" ||
2383          test ! -s conftest.err
2384        } && test -s conftest.$ac_objext; then :
2385   ac_retval=0
2386 else
2387   $as_echo "$as_me: failed program was:" >&5
2388 sed 's/^/| /' conftest.$ac_ext >&5
2389
2390         ac_retval=1
2391 fi
2392   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2393   as_fn_set_status $ac_retval
2394
2395 } # ac_fn_c_try_compile
2396
2397 # ac_fn_c_try_cpp LINENO
2398 # ----------------------
2399 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2400 ac_fn_c_try_cpp ()
2401 {
2402   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2403   if { { ac_try="$ac_cpp conftest.$ac_ext"
2404 case "(($ac_try" in
2405   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2406   *) ac_try_echo=$ac_try;;
2407 esac
2408 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2409 $as_echo "$ac_try_echo"; } >&5
2410   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2411   ac_status=$?
2412   if test -s conftest.err; then
2413     grep -v '^ *+' conftest.err >conftest.er1
2414     cat conftest.er1 >&5
2415     mv -f conftest.er1 conftest.err
2416   fi
2417   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2418   test $ac_status = 0; } > conftest.i && {
2419          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2420          test ! -s conftest.err
2421        }; then :
2422   ac_retval=0
2423 else
2424   $as_echo "$as_me: failed program was:" >&5
2425 sed 's/^/| /' conftest.$ac_ext >&5
2426
2427     ac_retval=1
2428 fi
2429   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2430   as_fn_set_status $ac_retval
2431
2432 } # ac_fn_c_try_cpp
2433
2434 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
2435 # -------------------------------------------------------
2436 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2437 # the include files in INCLUDES and setting the cache variable VAR
2438 # accordingly.
2439 ac_fn_c_check_header_mongrel ()
2440 {
2441   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2442   if eval \${$3+:} false; then :
2443   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2444 $as_echo_n "checking for $2... " >&6; }
2445 if eval \${$3+:} false; then :
2446   $as_echo_n "(cached) " >&6
2447 fi
2448 eval ac_res=\$$3
2449                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2450 $as_echo "$ac_res" >&6; }
2451 else
2452   # Is the header compilable?
2453 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2454 $as_echo_n "checking $2 usability... " >&6; }
2455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2456 /* end confdefs.h.  */
2457 $4
2458 #include <$2>
2459 _ACEOF
2460 if ac_fn_c_try_compile "$LINENO"; then :
2461   ac_header_compiler=yes
2462 else
2463   ac_header_compiler=no
2464 fi
2465 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2467 $as_echo "$ac_header_compiler" >&6; }
2468
2469 # Is the header present?
2470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2471 $as_echo_n "checking $2 presence... " >&6; }
2472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2473 /* end confdefs.h.  */
2474 #include <$2>
2475 _ACEOF
2476 if ac_fn_c_try_cpp "$LINENO"; then :
2477   ac_header_preproc=yes
2478 else
2479   ac_header_preproc=no
2480 fi
2481 rm -f conftest.err conftest.i conftest.$ac_ext
2482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2483 $as_echo "$ac_header_preproc" >&6; }
2484
2485 # So?  What about this header?
2486 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2487   yes:no: )
2488     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2489 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2490     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2491 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2492     ;;
2493   no:yes:* )
2494     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2495 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2496     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2497 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2498     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2499 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2500     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2501 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2502     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2503 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2504 ( $as_echo "## ------------------------------ ##
2505 ## Report this to bug-tar@gnu.org ##
2506 ## ------------------------------ ##"
2507      ) | sed "s/^/$as_me: WARNING:     /" >&2
2508     ;;
2509 esac
2510   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2511 $as_echo_n "checking for $2... " >&6; }
2512 if eval \${$3+:} false; then :
2513   $as_echo_n "(cached) " >&6
2514 else
2515   eval "$3=\$ac_header_compiler"
2516 fi
2517 eval ac_res=\$$3
2518                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2519 $as_echo "$ac_res" >&6; }
2520 fi
2521   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2522
2523 } # ac_fn_c_check_header_mongrel
2524
2525 # ac_fn_c_try_run LINENO
2526 # ----------------------
2527 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2528 # that executables *can* be run.
2529 ac_fn_c_try_run ()
2530 {
2531   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2532   if { { ac_try="$ac_link"
2533 case "(($ac_try" in
2534   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2535   *) ac_try_echo=$ac_try;;
2536 esac
2537 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2538 $as_echo "$ac_try_echo"; } >&5
2539   (eval "$ac_link") 2>&5
2540   ac_status=$?
2541   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2542   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2543   { { case "(($ac_try" in
2544   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2545   *) ac_try_echo=$ac_try;;
2546 esac
2547 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2548 $as_echo "$ac_try_echo"; } >&5
2549   (eval "$ac_try") 2>&5
2550   ac_status=$?
2551   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2552   test $ac_status = 0; }; }; then :
2553   ac_retval=0
2554 else
2555   $as_echo "$as_me: program exited with status $ac_status" >&5
2556        $as_echo "$as_me: failed program was:" >&5
2557 sed 's/^/| /' conftest.$ac_ext >&5
2558
2559        ac_retval=$ac_status
2560 fi
2561   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2562   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2563   as_fn_set_status $ac_retval
2564
2565 } # ac_fn_c_try_run
2566
2567 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2568 # -------------------------------------------------------
2569 # Tests whether HEADER exists and can be compiled using the include files in
2570 # INCLUDES, setting the cache variable VAR accordingly.
2571 ac_fn_c_check_header_compile ()
2572 {
2573   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2574   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2575 $as_echo_n "checking for $2... " >&6; }
2576 if eval \${$3+:} false; then :
2577   $as_echo_n "(cached) " >&6
2578 else
2579   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2580 /* end confdefs.h.  */
2581 $4
2582 #include <$2>
2583 _ACEOF
2584 if ac_fn_c_try_compile "$LINENO"; then :
2585   eval "$3=yes"
2586 else
2587   eval "$3=no"
2588 fi
2589 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2590 fi
2591 eval ac_res=\$$3
2592                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2593 $as_echo "$ac_res" >&6; }
2594   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2595
2596 } # ac_fn_c_check_header_compile
2597
2598 # ac_fn_c_try_link LINENO
2599 # -----------------------
2600 # Try to link conftest.$ac_ext, and return whether this succeeded.
2601 ac_fn_c_try_link ()
2602 {
2603   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2604   rm -f conftest.$ac_objext conftest$ac_exeext
2605   if { { ac_try="$ac_link"
2606 case "(($ac_try" in
2607   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2608   *) ac_try_echo=$ac_try;;
2609 esac
2610 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2611 $as_echo "$ac_try_echo"; } >&5
2612   (eval "$ac_link") 2>conftest.err
2613   ac_status=$?
2614   if test -s conftest.err; then
2615     grep -v '^ *+' conftest.err >conftest.er1
2616     cat conftest.er1 >&5
2617     mv -f conftest.er1 conftest.err
2618   fi
2619   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2620   test $ac_status = 0; } && {
2621          test -z "$ac_c_werror_flag" ||
2622          test ! -s conftest.err
2623        } && test -s conftest$ac_exeext && {
2624          test "$cross_compiling" = yes ||
2625          test -x conftest$ac_exeext
2626        }; then :
2627   ac_retval=0
2628 else
2629   $as_echo "$as_me: failed program was:" >&5
2630 sed 's/^/| /' conftest.$ac_ext >&5
2631
2632         ac_retval=1
2633 fi
2634   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2635   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2636   # interfere with the next link command; also delete a directory that is
2637   # left behind by Apple's compiler.  We do this before executing the actions.
2638   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2639   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2640   as_fn_set_status $ac_retval
2641
2642 } # ac_fn_c_try_link
2643
2644 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2645 # -------------------------------------------
2646 # Tests whether TYPE exists after having included INCLUDES, setting cache
2647 # variable VAR accordingly.
2648 ac_fn_c_check_type ()
2649 {
2650   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2651   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2652 $as_echo_n "checking for $2... " >&6; }
2653 if eval \${$3+:} false; then :
2654   $as_echo_n "(cached) " >&6
2655 else
2656   eval "$3=no"
2657   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2658 /* end confdefs.h.  */
2659 $4
2660 int
2661 main ()
2662 {
2663 if (sizeof ($2))
2664          return 0;
2665   ;
2666   return 0;
2667 }
2668 _ACEOF
2669 if ac_fn_c_try_compile "$LINENO"; then :
2670   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2671 /* end confdefs.h.  */
2672 $4
2673 int
2674 main ()
2675 {
2676 if (sizeof (($2)))
2677             return 0;
2678   ;
2679   return 0;
2680 }
2681 _ACEOF
2682 if ac_fn_c_try_compile "$LINENO"; then :
2683
2684 else
2685   eval "$3=yes"
2686 fi
2687 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2688 fi
2689 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2690 fi
2691 eval ac_res=\$$3
2692                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2693 $as_echo "$ac_res" >&6; }
2694   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2695
2696 } # ac_fn_c_check_type
2697
2698 # ac_fn_c_check_func LINENO FUNC VAR
2699 # ----------------------------------
2700 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2701 ac_fn_c_check_func ()
2702 {
2703   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2704   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2705 $as_echo_n "checking for $2... " >&6; }
2706 if eval \${$3+:} false; then :
2707   $as_echo_n "(cached) " >&6
2708 else
2709   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2710 /* end confdefs.h.  */
2711 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2712    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2713 #define $2 innocuous_$2
2714
2715 /* System header to define __stub macros and hopefully few prototypes,
2716     which can conflict with char $2 (); below.
2717     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2718     <limits.h> exists even on freestanding compilers.  */
2719
2720 #ifdef __STDC__
2721 # include <limits.h>
2722 #else
2723 # include <assert.h>
2724 #endif
2725
2726 #undef $2
2727
2728 /* Override any GCC internal prototype to avoid an error.
2729    Use char because int might match the return type of a GCC
2730    builtin and then its argument prototype would still apply.  */
2731 #ifdef __cplusplus
2732 extern "C"
2733 #endif
2734 char $2 ();
2735 /* The GNU C library defines this for functions which it implements
2736     to always fail with ENOSYS.  Some functions are actually named
2737     something starting with __ and the normal name is an alias.  */
2738 #if defined __stub_$2 || defined __stub___$2
2739 choke me
2740 #endif
2741
2742 int
2743 main ()
2744 {
2745 return $2 ();
2746   ;
2747   return 0;
2748 }
2749 _ACEOF
2750 if ac_fn_c_try_link "$LINENO"; then :
2751   eval "$3=yes"
2752 else
2753   eval "$3=no"
2754 fi
2755 rm -f core conftest.err conftest.$ac_objext \
2756     conftest$ac_exeext conftest.$ac_ext
2757 fi
2758 eval ac_res=\$$3
2759                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2760 $as_echo "$ac_res" >&6; }
2761   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2762
2763 } # ac_fn_c_check_func
2764
2765 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2766 # ---------------------------------------------
2767 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2768 # accordingly.
2769 ac_fn_c_check_decl ()
2770 {
2771   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2772   as_decl_name=`echo $2|sed 's/ *(.*//'`
2773   as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2774   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2775 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2776 if eval \${$3+:} false; then :
2777   $as_echo_n "(cached) " >&6
2778 else
2779   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2780 /* end confdefs.h.  */
2781 $4
2782 int
2783 main ()
2784 {
2785 #ifndef $as_decl_name
2786 #ifdef __cplusplus
2787   (void) $as_decl_use;
2788 #else
2789   (void) $as_decl_name;
2790 #endif
2791 #endif
2792
2793   ;
2794   return 0;
2795 }
2796 _ACEOF
2797 if ac_fn_c_try_compile "$LINENO"; then :
2798   eval "$3=yes"
2799 else
2800   eval "$3=no"
2801 fi
2802 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2803 fi
2804 eval ac_res=\$$3
2805                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2806 $as_echo "$ac_res" >&6; }
2807   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2808
2809 } # ac_fn_c_check_decl
2810
2811 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2812 # --------------------------------------------
2813 # Tries to find the compile-time value of EXPR in a program that includes
2814 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2815 # computed
2816 ac_fn_c_compute_int ()
2817 {
2818   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2819   if test "$cross_compiling" = yes; then
2820     # Depending upon the size, compute the lo and hi bounds.
2821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2822 /* end confdefs.h.  */
2823 $4
2824 int
2825 main ()
2826 {
2827 static int test_array [1 - 2 * !(($2) >= 0)];
2828 test_array [0] = 0;
2829 return test_array [0];
2830
2831   ;
2832   return 0;
2833 }
2834 _ACEOF
2835 if ac_fn_c_try_compile "$LINENO"; then :
2836   ac_lo=0 ac_mid=0
2837   while :; do
2838     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2839 /* end confdefs.h.  */
2840 $4
2841 int
2842 main ()
2843 {
2844 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2845 test_array [0] = 0;
2846 return test_array [0];
2847
2848   ;
2849   return 0;
2850 }
2851 _ACEOF
2852 if ac_fn_c_try_compile "$LINENO"; then :
2853   ac_hi=$ac_mid; break
2854 else
2855   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2856                         if test $ac_lo -le $ac_mid; then
2857                           ac_lo= ac_hi=
2858                           break
2859                         fi
2860                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2861 fi
2862 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2863   done
2864 else
2865   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2866 /* end confdefs.h.  */
2867 $4
2868 int
2869 main ()
2870 {
2871 static int test_array [1 - 2 * !(($2) < 0)];
2872 test_array [0] = 0;
2873 return test_array [0];
2874
2875   ;
2876   return 0;
2877 }
2878 _ACEOF
2879 if ac_fn_c_try_compile "$LINENO"; then :
2880   ac_hi=-1 ac_mid=-1
2881   while :; do
2882     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2883 /* end confdefs.h.  */
2884 $4
2885 int
2886 main ()
2887 {
2888 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2889 test_array [0] = 0;
2890 return test_array [0];
2891
2892   ;
2893   return 0;
2894 }
2895 _ACEOF
2896 if ac_fn_c_try_compile "$LINENO"; then :
2897   ac_lo=$ac_mid; break
2898 else
2899   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2900                         if test $ac_mid -le $ac_hi; then
2901                           ac_lo= ac_hi=
2902                           break
2903                         fi
2904                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2905 fi
2906 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2907   done
2908 else
2909   ac_lo= ac_hi=
2910 fi
2911 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2912 fi
2913 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2914 # Binary search between lo and hi bounds.
2915 while test "x$ac_lo" != "x$ac_hi"; do
2916   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2917   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2918 /* end confdefs.h.  */
2919 $4
2920 int
2921 main ()
2922 {
2923 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2924 test_array [0] = 0;
2925 return test_array [0];
2926
2927   ;
2928   return 0;
2929 }
2930 _ACEOF
2931 if ac_fn_c_try_compile "$LINENO"; then :
2932   ac_hi=$ac_mid
2933 else
2934   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2935 fi
2936 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2937 done
2938 case $ac_lo in #((
2939 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2940 '') ac_retval=1 ;;
2941 esac
2942   else
2943     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2944 /* end confdefs.h.  */
2945 $4
2946 static long int longval () { return $2; }
2947 static unsigned long int ulongval () { return $2; }
2948 #include <stdio.h>
2949 #include <stdlib.h>
2950 int
2951 main ()
2952 {
2953
2954   FILE *f = fopen ("conftest.val", "w");
2955   if (! f)
2956     return 1;
2957   if (($2) < 0)
2958     {
2959       long int i = longval ();
2960       if (i != ($2))
2961         return 1;
2962       fprintf (f, "%ld", i);
2963     }
2964   else
2965     {
2966       unsigned long int i = ulongval ();
2967       if (i != ($2))
2968         return 1;
2969       fprintf (f, "%lu", i);
2970     }
2971   /* Do not output a trailing newline, as this causes \r\n confusion
2972      on some platforms.  */
2973   return ferror (f) || fclose (f) != 0;
2974
2975   ;
2976   return 0;
2977 }
2978 _ACEOF
2979 if ac_fn_c_try_run "$LINENO"; then :
2980   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2981 else
2982   ac_retval=1
2983 fi
2984 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2985   conftest.$ac_objext conftest.beam conftest.$ac_ext
2986 rm -f conftest.val
2987
2988   fi
2989   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2990   as_fn_set_status $ac_retval
2991
2992 } # ac_fn_c_compute_int
2993
2994 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2995 # ----------------------------------------------------
2996 # Tries to find if the field MEMBER exists in type AGGR, after including
2997 # INCLUDES, setting cache variable VAR accordingly.
2998 ac_fn_c_check_member ()
2999 {
3000   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3001   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
3002 $as_echo_n "checking for $2.$3... " >&6; }
3003 if eval \${$4+:} false; then :
3004   $as_echo_n "(cached) " >&6
3005 else
3006   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3007 /* end confdefs.h.  */
3008 $5
3009 int
3010 main ()
3011 {
3012 static $2 ac_aggr;
3013 if (ac_aggr.$3)
3014 return 0;
3015   ;
3016   return 0;
3017 }
3018 _ACEOF
3019 if ac_fn_c_try_compile "$LINENO"; then :
3020   eval "$4=yes"
3021 else
3022   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3023 /* end confdefs.h.  */
3024 $5
3025 int
3026 main ()
3027 {
3028 static $2 ac_aggr;
3029 if (sizeof ac_aggr.$3)
3030 return 0;
3031   ;
3032   return 0;
3033 }
3034 _ACEOF
3035 if ac_fn_c_try_compile "$LINENO"; then :
3036   eval "$4=yes"
3037 else
3038   eval "$4=no"
3039 fi
3040 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3041 fi
3042 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3043 fi
3044 eval ac_res=\$$4
3045                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3046 $as_echo "$ac_res" >&6; }
3047   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3048
3049 } # ac_fn_c_check_member
3050 cat >config.log <<_ACEOF
3051 This file contains any messages produced by compilers while
3052 running configure, to aid debugging if configure makes a mistake.
3053
3054 It was created by GNU tar $as_me 1.27.1, which was
3055 generated by GNU Autoconf 2.69.  Invocation command line was
3056
3057   $ $0 $@
3058
3059 _ACEOF
3060 exec 5>>config.log
3061 {
3062 cat <<_ASUNAME
3063 ## --------- ##
3064 ## Platform. ##
3065 ## --------- ##
3066
3067 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3068 uname -m = `(uname -m) 2>/dev/null || echo unknown`
3069 uname -r = `(uname -r) 2>/dev/null || echo unknown`
3070 uname -s = `(uname -s) 2>/dev/null || echo unknown`
3071 uname -v = `(uname -v) 2>/dev/null || echo unknown`
3072
3073 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3074 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3075
3076 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3077 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3078 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3079 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3080 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3081 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3082 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3083
3084 _ASUNAME
3085
3086 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3087 for as_dir in $PATH
3088 do
3089   IFS=$as_save_IFS
3090   test -z "$as_dir" && as_dir=.
3091     $as_echo "PATH: $as_dir"
3092   done
3093 IFS=$as_save_IFS
3094
3095 } >&5
3096
3097 cat >&5 <<_ACEOF
3098
3099
3100 ## ----------- ##
3101 ## Core tests. ##
3102 ## ----------- ##
3103
3104 _ACEOF
3105
3106
3107 # Keep a trace of the command line.
3108 # Strip out --no-create and --no-recursion so they do not pile up.
3109 # Strip out --silent because we don't want to record it for future runs.
3110 # Also quote any args containing shell meta-characters.
3111 # Make two passes to allow for proper duplicate-argument suppression.
3112 ac_configure_args=
3113 ac_configure_args0=
3114 ac_configure_args1=
3115 ac_must_keep_next=false
3116 for ac_pass in 1 2
3117 do
3118   for ac_arg
3119   do
3120     case $ac_arg in
3121     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3122     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3123     | -silent | --silent | --silen | --sile | --sil)
3124       continue ;;
3125     *\'*)
3126       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3127     esac
3128     case $ac_pass in
3129     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3130     2)
3131       as_fn_append ac_configure_args1 " '$ac_arg'"
3132       if test $ac_must_keep_next = true; then
3133         ac_must_keep_next=false # Got value, back to normal.
3134       else
3135         case $ac_arg in
3136           *=* | --config-cache | -C | -disable-* | --disable-* \
3137           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3138           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3139           | -with-* | --with-* | -without-* | --without-* | --x)
3140             case "$ac_configure_args0 " in
3141               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3142             esac
3143             ;;
3144           -* ) ac_must_keep_next=true ;;
3145         esac
3146       fi
3147       as_fn_append ac_configure_args " '$ac_arg'"
3148       ;;
3149     esac
3150   done
3151 done
3152 { ac_configure_args0=; unset ac_configure_args0;}
3153 { ac_configure_args1=; unset ac_configure_args1;}
3154
3155 # When interrupted or exit'd, cleanup temporary files, and complete
3156 # config.log.  We remove comments because anyway the quotes in there
3157 # would cause problems or look ugly.
3158 # WARNING: Use '\'' to represent an apostrophe within the trap.
3159 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3160 trap 'exit_status=$?
3161   # Save into config.log some information that might help in debugging.
3162   {
3163     echo
3164
3165     $as_echo "## ---------------- ##
3166 ## Cache variables. ##
3167 ## ---------------- ##"
3168     echo
3169     # The following way of writing the cache mishandles newlines in values,
3170 (
3171   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3172     eval ac_val=\$$ac_var
3173     case $ac_val in #(
3174     *${as_nl}*)
3175       case $ac_var in #(
3176       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3177 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3178       esac
3179       case $ac_var in #(
3180       _ | IFS | as_nl) ;; #(
3181       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3182       *) { eval $ac_var=; unset $ac_var;} ;;
3183       esac ;;
3184     esac
3185   done
3186   (set) 2>&1 |
3187     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3188     *${as_nl}ac_space=\ *)
3189       sed -n \
3190         "s/'\''/'\''\\\\'\'''\''/g;
3191           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3192       ;; #(
3193     *)
3194       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3195       ;;
3196     esac |
3197     sort
3198 )
3199     echo
3200
3201     $as_echo "## ----------------- ##
3202 ## Output variables. ##
3203 ## ----------------- ##"
3204     echo
3205     for ac_var in $ac_subst_vars
3206     do
3207       eval ac_val=\$$ac_var
3208       case $ac_val in
3209       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3210       esac
3211       $as_echo "$ac_var='\''$ac_val'\''"
3212     done | sort
3213     echo
3214
3215     if test -n "$ac_subst_files"; then
3216       $as_echo "## ------------------- ##
3217 ## File substitutions. ##
3218 ## ------------------- ##"
3219       echo
3220       for ac_var in $ac_subst_files
3221       do
3222         eval ac_val=\$$ac_var
3223         case $ac_val in
3224         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3225         esac
3226         $as_echo "$ac_var='\''$ac_val'\''"
3227       done | sort
3228       echo
3229     fi
3230
3231     if test -s confdefs.h; then
3232       $as_echo "## ----------- ##
3233 ## confdefs.h. ##
3234 ## ----------- ##"
3235       echo
3236       cat confdefs.h
3237       echo
3238     fi
3239     test "$ac_signal" != 0 &&
3240       $as_echo "$as_me: caught signal $ac_signal"
3241     $as_echo "$as_me: exit $exit_status"
3242   } >&5
3243   rm -f core *.core core.conftest.* &&
3244     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3245     exit $exit_status
3246 ' 0
3247 for ac_signal in 1 2 13 15; do
3248   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3249 done
3250 ac_signal=0
3251
3252 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3253 rm -f -r conftest* confdefs.h
3254
3255 $as_echo "/* confdefs.h */" > confdefs.h
3256
3257 # Predefined preprocessor variables.
3258
3259 cat >>confdefs.h <<_ACEOF
3260 #define PACKAGE_NAME "$PACKAGE_NAME"
3261 _ACEOF
3262
3263 cat >>confdefs.h <<_ACEOF
3264 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3265 _ACEOF
3266
3267 cat >>confdefs.h <<_ACEOF
3268 #define PACKAGE_VERSION "$PACKAGE_VERSION"
3269 _ACEOF
3270
3271 cat >>confdefs.h <<_ACEOF
3272 #define PACKAGE_STRING "$PACKAGE_STRING"
3273 _ACEOF
3274
3275 cat >>confdefs.h <<_ACEOF
3276 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3277 _ACEOF
3278
3279 cat >>confdefs.h <<_ACEOF
3280 #define PACKAGE_URL "$PACKAGE_URL"
3281 _ACEOF
3282
3283
3284 # Let the site file select an alternate cache file if it wants to.
3285 # Prefer an explicitly selected file to automatically selected ones.
3286 ac_site_file1=NONE
3287 ac_site_file2=NONE
3288 if test -n "$CONFIG_SITE"; then
3289   # We do not want a PATH search for config.site.
3290   case $CONFIG_SITE in #((
3291     -*)  ac_site_file1=./$CONFIG_SITE;;
3292     */*) ac_site_file1=$CONFIG_SITE;;
3293     *)   ac_site_file1=./$CONFIG_SITE;;
3294   esac
3295 elif test "x$prefix" != xNONE; then
3296   ac_site_file1=$prefix/share/config.site
3297   ac_site_file2=$prefix/etc/config.site
3298 else
3299   ac_site_file1=$ac_default_prefix/share/config.site
3300   ac_site_file2=$ac_default_prefix/etc/config.site
3301 fi
3302 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3303 do
3304   test "x$ac_site_file" = xNONE && continue
3305   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3306     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3307 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
3308     sed 's/^/| /' "$ac_site_file" >&5
3309     . "$ac_site_file" \
3310       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3311 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3312 as_fn_error $? "failed to load site script $ac_site_file
3313 See \`config.log' for more details" "$LINENO" 5; }
3314   fi
3315 done
3316
3317 if test -r "$cache_file"; then
3318   # Some versions of bash will fail to source /dev/null (special files
3319   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3320   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3321     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3322 $as_echo "$as_me: loading cache $cache_file" >&6;}
3323     case $cache_file in
3324       [\\/]* | ?:[\\/]* ) . "$cache_file";;
3325       *)                      . "./$cache_file";;
3326     esac
3327   fi
3328 else
3329   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3330 $as_echo "$as_me: creating cache $cache_file" >&6;}
3331   >$cache_file
3332 fi
3333
3334 as_fn_append ac_header_list " fcntl.h"
3335 as_fn_append ac_header_list " linux/fd.h"
3336 as_fn_append ac_header_list " memory.h"
3337 as_fn_append ac_header_list " net/errno.h"
3338 as_fn_append ac_header_list " sgtty.h"
3339 as_fn_append ac_header_list " string.h"
3340 as_fn_append ac_header_list " sys/param.h"
3341 as_fn_append ac_header_list " sys/device.h"
3342 as_fn_append ac_header_list " sys/gentape.h"
3343 as_fn_append ac_header_list " sys/inet.h"
3344 as_fn_append ac_header_list " sys/io/trioctl.h"
3345 as_fn_append ac_header_list " sys/mtio.h"
3346 as_fn_append ac_header_list " sys/time.h"
3347 as_fn_append ac_header_list " sys/tprintf.h"
3348 as_fn_append ac_header_list " sys/tape.h"
3349 as_fn_append ac_header_list " unistd.h"
3350 as_fn_append ac_header_list " locale.h"
3351 as_fn_append ac_func_list " flockfile"
3352 as_fn_append ac_func_list " funlockfile"
3353 as_fn_append ac_header_list " features.h"
3354 as_fn_append ac_header_list " linewrap.h"
3355 as_fn_append ac_func_list " pathconf"
3356 as_fn_append ac_func_list " btowc"
3357 as_fn_append ac_func_list " canonicalize_file_name"
3358 as_fn_append ac_func_list " getcwd"
3359 as_fn_append ac_func_list " readlink"
3360 as_fn_append ac_func_list " realpath"
3361 as_fn_append ac_func_list " readlinkat"
3362 as_fn_append ac_func_list " chown"
3363 as_fn_append ac_func_list " fchown"
3364 as_fn_append ac_func_list " _set_invalid_parameter_handler"
3365 as_fn_append ac_header_list " sys/socket.h"
3366 as_fn_append ac_func_list " fchdir"
3367 as_fn_append ac_header_list " dirent.h"
3368 as_fn_append ac_func_list " fdopendir"
3369 as_fn_append ac_func_list " fchmodat"
3370 as_fn_append ac_func_list " lchmod"
3371 as_fn_append ac_func_list " fcntl"
3372 as_fn_append ac_func_list " symlink"
3373 as_fn_append ac_func_list " mempcpy"
3374 as_fn_append ac_func_list " isblank"
3375 as_fn_append ac_func_list " iswctype"
3376 as_fn_append ac_func_list " mbsrtowcs"
3377 as_fn_append ac_func_list " wmemchr"
3378 as_fn_append ac_func_list " wmemcpy"
3379 as_fn_append ac_func_list " wmempcpy"
3380 as_fn_append ac_header_list " wctype.h"
3381 gl_fnmatch_required=GNU
3382 as_fn_append ac_header_list " stdio_ext.h"
3383 as_fn_append ac_func_list " __fpending"
3384 as_fn_append ac_header_list " sys/stat.h"
3385 as_fn_append ac_func_list " fstatat"
3386 as_fn_append ac_func_list " futimens"
3387 as_fn_append ac_func_list " getdelim"
3388 as_fn_append ac_func_list " getdtablesize"
3389 gl_getopt_required=GNU
3390 as_fn_append ac_header_list " getopt.h"
3391 as_fn_append ac_func_list " gettimeofday"
3392 as_fn_append ac_func_list " nanotime"
3393 as_fn_append ac_header_list " wchar.h"
3394 as_fn_append ac_header_list " stdint.h"
3395 as_fn_append ac_header_list " inttypes.h"
3396 as_fn_append ac_func_list " iswcntrl"
3397 as_fn_append ac_func_list " iswblank"
3398 as_fn_append ac_header_list " langinfo.h"
3399 as_fn_append ac_func_list " link"
3400 as_fn_append ac_func_list " openat"
3401 as_fn_append ac_func_list " linkat"
3402 as_fn_append ac_header_list " xlocale.h"
3403 as_fn_append ac_func_list " lstat"
3404 as_fn_append ac_func_list " mbsinit"
3405 as_fn_append ac_func_list " mbrtowc"
3406 as_fn_append ac_header_list " sys/mman.h"
3407 as_fn_append ac_func_list " mprotect"
3408 as_fn_append ac_func_list " mkdirat"
3409 as_fn_append ac_func_list " mkfifo"
3410 as_fn_append ac_func_list " mkfifoat"
3411 as_fn_append ac_func_list " mknodat"
3412 as_fn_append ac_func_list " mknod"
3413 as_fn_append ac_func_list " nl_langinfo"
3414 as_fn_append ac_header_list " priv.h"
3415 as_fn_append ac_func_list " wcscoll"
3416 as_fn_append ac_func_list " renameat"
3417 as_fn_append ac_func_list " secure_getenv"
3418 as_fn_append ac_header_list " selinux/selinux.h"
3419 as_fn_append ac_func_list " setenv"
3420 as_fn_append ac_func_list " sleep"
3421 as_fn_append ac_func_list " snprintf"
3422 as_fn_append ac_func_list " strdup"
3423 as_fn_append ac_header_list " strings.h"
3424 as_fn_append ac_func_list " strndup"
3425 as_fn_append ac_func_list " strtoumax"
3426 as_fn_append ac_func_list " symlinkat"
3427 as_fn_append ac_header_list " sysexits.h"
3428 as_fn_append ac_func_list " localtime_r"
3429 as_fn_append ac_func_list " pipe"
3430 as_fn_append ac_func_list " unlinkat"
3431 as_fn_append ac_header_list " utime.h"
3432 as_fn_append ac_func_list " futimes"
3433 as_fn_append ac_func_list " futimesat"
3434 as_fn_append ac_func_list " utimensat"
3435 as_fn_append ac_func_list " lutimes"
3436 as_fn_append ac_func_list " vasnprintf"
3437 as_fn_append ac_func_list " wcrtomb"
3438 as_fn_append ac_func_list " wcwidth"
3439 as_fn_append ac_header_list " netdb.h"
3440 as_fn_append ac_header_list " sys/wait.h"
3441 as_fn_append ac_header_list " pwd.h"
3442 as_fn_append ac_header_list " grp.h"
3443 as_fn_append ac_func_list " setlocale"
3444 as_fn_append ac_func_list " fchmod"
3445 as_fn_append ac_func_list " fsync"
3446 gt_needs="$gt_needs need-formatstring-macros"
3447 # Check that the precious variables saved in the cache have kept the same
3448 # value.
3449 ac_cache_corrupted=false
3450 for ac_var in $ac_precious_vars; do
3451   eval ac_old_set=\$ac_cv_env_${ac_var}_set
3452   eval ac_new_set=\$ac_env_${ac_var}_set
3453   eval ac_old_val=\$ac_cv_env_${ac_var}_value
3454   eval ac_new_val=\$ac_env_${ac_var}_value
3455   case $ac_old_set,$ac_new_set in
3456     set,)
3457       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3458 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3459       ac_cache_corrupted=: ;;
3460     ,set)
3461       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3462 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3463       ac_cache_corrupted=: ;;
3464     ,);;
3465     *)
3466       if test "x$ac_old_val" != "x$ac_new_val"; then
3467         # differences in whitespace do not lead to failure.
3468         ac_old_val_w=`echo x $ac_old_val`
3469         ac_new_val_w=`echo x $ac_new_val`
3470         if test "$ac_old_val_w" != "$ac_new_val_w"; then
3471           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3472 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3473           ac_cache_corrupted=:
3474         else
3475           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3476 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3477           eval $ac_var=\$ac_old_val
3478         fi
3479         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3480 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3481         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3482 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3483       fi;;
3484   esac
3485   # Pass precious variables to config.status.
3486   if test "$ac_new_set" = set; then
3487     case $ac_new_val in
3488     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3489     *) ac_arg=$ac_var=$ac_new_val ;;
3490     esac
3491     case " $ac_configure_args " in
3492       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3493       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3494     esac
3495   fi
3496 done
3497 if $ac_cache_corrupted; then
3498   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3499 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3500   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3501 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3502   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3503 fi
3504 ## -------------------- ##
3505 ## Main body of script. ##
3506 ## -------------------- ##
3507
3508 ac_ext=c
3509 ac_cpp='$CPP $CPPFLAGS'
3510 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3511 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3512 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3513
3514
3515
3516 ac_aux_dir=
3517 for ac_dir in build-aux "$srcdir"/build-aux; do
3518   if test -f "$ac_dir/install-sh"; then
3519     ac_aux_dir=$ac_dir
3520     ac_install_sh="$ac_aux_dir/install-sh -c"
3521     break
3522   elif test -f "$ac_dir/install.sh"; then
3523     ac_aux_dir=$ac_dir
3524     ac_install_sh="$ac_aux_dir/install.sh -c"
3525     break
3526   elif test -f "$ac_dir/shtool"; then
3527     ac_aux_dir=$ac_dir
3528     ac_install_sh="$ac_aux_dir/shtool install -c"
3529     break
3530   fi
3531 done
3532 if test -z "$ac_aux_dir"; then
3533   as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
3534 fi
3535
3536 # These three variables are undocumented and unsupported,
3537 # and are intended to be withdrawn in a future Autoconf release.
3538 # They can cause serious problems if a builder's source tree is in a directory
3539 # whose full name contains unusual characters.
3540 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3541 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3542 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3543
3544
3545 ac_config_headers="$ac_config_headers config.h"
3546
3547
3548 am__api_version='1.14'
3549
3550 # Find a good install program.  We prefer a C program (faster),
3551 # so one script is as good as another.  But avoid the broken or
3552 # incompatible versions:
3553 # SysV /etc/install, /usr/sbin/install
3554 # SunOS /usr/etc/install
3555 # IRIX /sbin/install
3556 # AIX /bin/install
3557 # AmigaOS /C/install, which installs bootblocks on floppy discs
3558 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3559 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3560 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3561 # OS/2's system install, which has a completely different semantic
3562 # ./install, which can be erroneously created by make from ./install.sh.
3563 # Reject install programs that cannot install multiple files.
3564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
3565 $as_echo_n "checking for a BSD-compatible install... " >&6; }
3566 if test -z "$INSTALL"; then
3567 if ${ac_cv_path_install+:} false; then :
3568   $as_echo_n "(cached) " >&6
3569 else
3570   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3571 for as_dir in $PATH
3572 do
3573   IFS=$as_save_IFS
3574   test -z "$as_dir" && as_dir=.
3575     # Account for people who put trailing slashes in PATH elements.
3576 case $as_dir/ in #((
3577   ./ | .// | /[cC]/* | \
3578   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3579   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
3580   /usr/ucb/* ) ;;
3581   *)
3582     # OSF1 and SCO ODT 3.0 have their own names for install.
3583     # Don't use installbsd from OSF since it installs stuff as root
3584     # by default.
3585     for ac_prog in ginstall scoinst install; do
3586       for ac_exec_ext in '' $ac_executable_extensions; do
3587         if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3588           if test $ac_prog = install &&
3589             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3590             # AIX install.  It has an incompatible calling convention.
3591             :
3592           elif test $ac_prog = install &&
3593             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3594             # program-specific install script used by HP pwplus--don't use.
3595             :
3596           else
3597             rm -rf conftest.one conftest.two conftest.dir
3598             echo one > conftest.one
3599             echo two > conftest.two
3600             mkdir conftest.dir
3601             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
3602               test -s conftest.one && test -s conftest.two &&
3603               test -s conftest.dir/conftest.one &&
3604               test -s conftest.dir/conftest.two
3605             then
3606               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3607               break 3
3608             fi
3609           fi
3610         fi
3611       done
3612     done
3613     ;;
3614 esac
3615
3616   done
3617 IFS=$as_save_IFS
3618
3619 rm -rf conftest.one conftest.two conftest.dir
3620
3621 fi
3622   if test "${ac_cv_path_install+set}" = set; then
3623     INSTALL=$ac_cv_path_install
3624   else
3625     # As a last resort, use the slow shell script.  Don't cache a
3626     # value for INSTALL within a source directory, because that will
3627     # break other packages using the cache if that directory is
3628     # removed, or if the value is a relative name.
3629     INSTALL=$ac_install_sh
3630   fi
3631 fi
3632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
3633 $as_echo "$INSTALL" >&6; }
3634
3635 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3636 # It thinks the first close brace ends the variable substitution.
3637 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3638
3639 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3640
3641 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3642
3643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
3644 $as_echo_n "checking whether build environment is sane... " >&6; }
3645 # Reject unsafe characters in $srcdir or the absolute working directory
3646 # name.  Accept space and tab only in the latter.
3647 am_lf='
3648 '
3649 case `pwd` in
3650   *[\\\"\#\$\&\'\`$am_lf]*)
3651     as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
3652 esac
3653 case $srcdir in
3654   *[\\\"\#\$\&\'\`$am_lf\ \     ]*)
3655     as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
3656 esac
3657
3658 # Do 'set' in a subshell so we don't clobber the current shell's
3659 # arguments.  Must try -L first in case configure is actually a
3660 # symlink; some systems play weird games with the mod time of symlinks
3661 # (eg FreeBSD returns the mod time of the symlink's containing
3662 # directory).
3663 if (
3664    am_has_slept=no
3665    for am_try in 1 2; do
3666      echo "timestamp, slept: $am_has_slept" > conftest.file
3667      set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
3668      if test "$*" = "X"; then
3669         # -L didn't work.
3670         set X `ls -t "$srcdir/configure" conftest.file`
3671      fi
3672      if test "$*" != "X $srcdir/configure conftest.file" \
3673         && test "$*" != "X conftest.file $srcdir/configure"; then
3674
3675         # If neither matched, then we have a broken ls.  This can happen
3676         # if, for instance, CONFIG_SHELL is bash and it inherits a
3677         # broken ls alias from the environment.  This has actually
3678         # happened.  Such a system could not be considered "sane".
3679         as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
3680   alias in your environment" "$LINENO" 5
3681      fi
3682      if test "$2" = conftest.file || test $am_try -eq 2; then
3683        break
3684      fi
3685      # Just in case.
3686      sleep 1
3687      am_has_slept=yes
3688    done
3689    test "$2" = conftest.file
3690    )
3691 then
3692    # Ok.
3693    :
3694 else
3695    as_fn_error $? "newly created file is older than distributed files!
3696 Check your system clock" "$LINENO" 5
3697 fi
3698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3699 $as_echo "yes" >&6; }
3700 # If we didn't sleep, we still need to ensure time stamps of config.status and
3701 # generated files are strictly newer.
3702 am_sleep_pid=
3703 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
3704   ( sleep 1 ) &
3705   am_sleep_pid=$!
3706 fi
3707
3708 rm -f conftest.file
3709
3710 test "$program_prefix" != NONE &&
3711   program_transform_name="s&^&$program_prefix&;$program_transform_name"
3712 # Use a double $ so make ignores it.
3713 test "$program_suffix" != NONE &&
3714   program_transform_name="s&\$&$program_suffix&;$program_transform_name"
3715 # Double any \ or $.
3716 # By default was `s,x,x', remove it if useless.
3717 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
3718 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
3719
3720 # expand $ac_aux_dir to an absolute path
3721 am_aux_dir=`cd $ac_aux_dir && pwd`
3722
3723 if test x"${MISSING+set}" != xset; then
3724   case $am_aux_dir in
3725   *\ * | *\     *)
3726     MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
3727   *)
3728     MISSING="\${SHELL} $am_aux_dir/missing" ;;
3729   esac
3730 fi
3731 # Use eval to expand $SHELL
3732 if eval "$MISSING --is-lightweight"; then
3733   am_missing_run="$MISSING "
3734 else
3735   am_missing_run=
3736   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
3737 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
3738 fi
3739
3740 if test x"${install_sh}" != xset; then
3741   case $am_aux_dir in
3742   *\ * | *\     *)
3743     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
3744   *)
3745     install_sh="\${SHELL} $am_aux_dir/install-sh"
3746   esac
3747 fi
3748
3749 # Installed binaries are usually stripped using 'strip' when the user
3750 # run "make install-strip".  However 'strip' might not be the right
3751 # tool to use in cross-compilation environments, therefore Automake
3752 # will honor the 'STRIP' environment variable to overrule this program.
3753 if test "$cross_compiling" != no; then
3754   if test -n "$ac_tool_prefix"; then
3755   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
3756 set dummy ${ac_tool_prefix}strip; ac_word=$2
3757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3758 $as_echo_n "checking for $ac_word... " >&6; }
3759 if ${ac_cv_prog_STRIP+:} false; then :
3760   $as_echo_n "(cached) " >&6
3761 else
3762   if test -n "$STRIP"; then
3763   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
3764 else
3765 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3766 for as_dir in $PATH
3767 do
3768   IFS=$as_save_IFS
3769   test -z "$as_dir" && as_dir=.
3770     for ac_exec_ext in '' $ac_executable_extensions; do
3771   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3772     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
3773     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3774     break 2
3775   fi
3776 done
3777   done
3778 IFS=$as_save_IFS
3779
3780 fi
3781 fi
3782 STRIP=$ac_cv_prog_STRIP
3783 if test -n "$STRIP"; then
3784   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
3785 $as_echo "$STRIP" >&6; }
3786 else
3787   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3788 $as_echo "no" >&6; }
3789 fi
3790
3791
3792 fi
3793 if test -z "$ac_cv_prog_STRIP"; then
3794   ac_ct_STRIP=$STRIP
3795   # Extract the first word of "strip", so it can be a program name with args.
3796 set dummy strip; ac_word=$2
3797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3798 $as_echo_n "checking for $ac_word... " >&6; }
3799 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
3800   $as_echo_n "(cached) " >&6
3801 else
3802   if test -n "$ac_ct_STRIP"; then
3803   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
3804 else
3805 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3806 for as_dir in $PATH
3807 do
3808   IFS=$as_save_IFS
3809   test -z "$as_dir" && as_dir=.
3810     for ac_exec_ext in '' $ac_executable_extensions; do
3811   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3812     ac_cv_prog_ac_ct_STRIP="strip"
3813     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3814     break 2
3815   fi
3816 done
3817   done
3818 IFS=$as_save_IFS
3819
3820 fi
3821 fi
3822 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
3823 if test -n "$ac_ct_STRIP"; then
3824   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
3825 $as_echo "$ac_ct_STRIP" >&6; }
3826 else
3827   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3828 $as_echo "no" >&6; }
3829 fi
3830
3831   if test "x$ac_ct_STRIP" = x; then
3832     STRIP=":"
3833   else
3834     case $cross_compiling:$ac_tool_warned in
3835 yes:)
3836 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3837 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3838 ac_tool_warned=yes ;;
3839 esac
3840     STRIP=$ac_ct_STRIP
3841   fi
3842 else
3843   STRIP="$ac_cv_prog_STRIP"
3844 fi
3845
3846 fi
3847 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
3848
3849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
3850 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
3851 if test -z "$MKDIR_P"; then
3852   if ${ac_cv_path_mkdir+:} false; then :
3853   $as_echo_n "(cached) " >&6
3854 else
3855   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3856 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
3857 do
3858   IFS=$as_save_IFS
3859   test -z "$as_dir" && as_dir=.
3860     for ac_prog in mkdir gmkdir; do
3861          for ac_exec_ext in '' $ac_executable_extensions; do
3862            as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
3863            case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
3864              'mkdir (GNU coreutils) '* | \
3865              'mkdir (coreutils) '* | \
3866              'mkdir (fileutils) '4.1*)
3867                ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
3868                break 3;;
3869            esac
3870          done
3871        done
3872   done
3873 IFS=$as_save_IFS
3874
3875 fi
3876
3877   test -d ./--version && rmdir ./--version
3878   if test "${ac_cv_path_mkdir+set}" = set; then
3879     MKDIR_P="$ac_cv_path_mkdir -p"
3880   else
3881     # As a last resort, use the slow shell script.  Don't cache a
3882     # value for MKDIR_P within a source directory, because that will
3883     # break other packages using the cache if that directory is
3884     # removed, or if the value is a relative name.
3885     MKDIR_P="$ac_install_sh -d"
3886   fi
3887 fi
3888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
3889 $as_echo "$MKDIR_P" >&6; }
3890
3891 for ac_prog in gawk mawk nawk awk
3892 do
3893   # Extract the first word of "$ac_prog", so it can be a program name with args.
3894 set dummy $ac_prog; ac_word=$2
3895 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3896 $as_echo_n "checking for $ac_word... " >&6; }
3897 if ${ac_cv_prog_AWK+:} false; then :
3898   $as_echo_n "(cached) " >&6
3899 else
3900   if test -n "$AWK"; then
3901   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3902 else
3903 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3904 for as_dir in $PATH
3905 do
3906   IFS=$as_save_IFS
3907   test -z "$as_dir" && as_dir=.
3908     for ac_exec_ext in '' $ac_executable_extensions; do
3909   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3910     ac_cv_prog_AWK="$ac_prog"
3911     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3912     break 2
3913   fi
3914 done
3915   done
3916 IFS=$as_save_IFS
3917
3918 fi
3919 fi
3920 AWK=$ac_cv_prog_AWK
3921 if test -n "$AWK"; then
3922   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
3923 $as_echo "$AWK" >&6; }
3924 else
3925   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3926 $as_echo "no" >&6; }
3927 fi
3928
3929
3930   test -n "$AWK" && break
3931 done
3932
3933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3934 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
3935 set x ${MAKE-make}
3936 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3937 if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
3938   $as_echo_n "(cached) " >&6
3939 else
3940   cat >conftest.make <<\_ACEOF
3941 SHELL = /bin/sh
3942 all:
3943         @echo '@@@%%%=$(MAKE)=@@@%%%'
3944 _ACEOF
3945 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
3946 case `${MAKE-make} -f conftest.make 2>/dev/null` in
3947   *@@@%%%=?*=@@@%%%*)
3948     eval ac_cv_prog_make_${ac_make}_set=yes;;
3949   *)
3950     eval ac_cv_prog_make_${ac_make}_set=no;;
3951 esac
3952 rm -f conftest.make
3953 fi
3954 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3955   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3956 $as_echo "yes" >&6; }
3957   SET_MAKE=
3958 else
3959   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3960 $as_echo "no" >&6; }
3961   SET_MAKE="MAKE=${MAKE-make}"
3962 fi
3963
3964 rm -rf .tst 2>/dev/null
3965 mkdir .tst 2>/dev/null
3966 if test -d .tst; then
3967   am__leading_dot=.
3968 else
3969   am__leading_dot=_
3970 fi
3971 rmdir .tst 2>/dev/null
3972
3973 # Check whether --enable-silent-rules was given.
3974 if test "${enable_silent_rules+set}" = set; then :
3975   enableval=$enable_silent_rules;
3976 fi
3977
3978 case $enable_silent_rules in # (((
3979   yes) AM_DEFAULT_VERBOSITY=0;;
3980    no) AM_DEFAULT_VERBOSITY=1;;
3981     *) AM_DEFAULT_VERBOSITY=1;;
3982 esac
3983 am_make=${MAKE-make}
3984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
3985 $as_echo_n "checking whether $am_make supports nested variables... " >&6; }
3986 if ${am_cv_make_support_nested_variables+:} false; then :
3987   $as_echo_n "(cached) " >&6
3988 else
3989   if $as_echo 'TRUE=$(BAR$(V))
3990 BAR0=false
3991 BAR1=true
3992 V=1
3993 am__doit:
3994         @$(TRUE)
3995 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
3996   am_cv_make_support_nested_variables=yes
3997 else
3998   am_cv_make_support_nested_variables=no
3999 fi
4000 fi
4001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
4002 $as_echo "$am_cv_make_support_nested_variables" >&6; }
4003 if test $am_cv_make_support_nested_variables = yes; then
4004     AM_V='$(V)'
4005   AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
4006 else
4007   AM_V=$AM_DEFAULT_VERBOSITY
4008   AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
4009 fi
4010 AM_BACKSLASH='\'
4011
4012 if test "`cd $srcdir && pwd`" != "`pwd`"; then
4013   # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
4014   # is not polluted with repeated "-I."
4015   am__isrc=' -I$(srcdir)'
4016   # test to see if srcdir already configured
4017   if test -f $srcdir/config.status; then
4018     as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
4019   fi
4020 fi
4021
4022 # test whether we have cygpath
4023 if test -z "$CYGPATH_W"; then
4024   if (cygpath --version) >/dev/null 2>/dev/null; then
4025     CYGPATH_W='cygpath -w'
4026   else
4027     CYGPATH_W=echo
4028   fi
4029 fi
4030
4031
4032 # Define the identity of the package.
4033  PACKAGE='tar'
4034  VERSION='1.27.1'
4035
4036
4037 cat >>confdefs.h <<_ACEOF
4038 #define PACKAGE "$PACKAGE"
4039 _ACEOF
4040
4041
4042 cat >>confdefs.h <<_ACEOF
4043 #define VERSION "$VERSION"
4044 _ACEOF
4045
4046 # Some tools Automake needs.
4047
4048 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
4049
4050
4051 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
4052
4053
4054 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
4055
4056
4057 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
4058
4059
4060 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
4061
4062 # For better backward compatibility.  To be removed once Automake 1.9.x
4063 # dies out for good.  For more background, see:
4064 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
4065 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
4066 mkdir_p='$(MKDIR_P)'
4067
4068 # We need awk for the "check" target.  The system "awk" is bad on
4069 # some platforms.
4070 # Always define AMTAR for backward compatibility.  Yes, it's still used
4071 # in the wild :-(  We should find a proper way to deprecate it ...
4072 AMTAR='$${TAR-tar}'
4073
4074
4075 # We'll loop over all known methods to create a tar archive until one works.
4076 _am_tools='gnutar plaintar pax cpio none'
4077
4078 # The POSIX 1988 'ustar' format is defined with fixed-size fields.
4079       # There is notably a 21 bits limit for the UID and the GID.  In fact,
4080       # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
4081       # and bug#13588).
4082       am_max_uid=2097151 # 2^21 - 1
4083       am_max_gid=$am_max_uid
4084       # The $UID and $GID variables are not portable, so we need to resort
4085       # to the POSIX-mandated id(1) utility.  Errors in the 'id' calls
4086       # below are definitely unexpected, so allow the users to see them
4087       # (that is, avoid stderr redirection).
4088       am_uid=`id -u || echo unknown`
4089       am_gid=`id -g || echo unknown`
4090       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UID '$am_uid' is supported by ustar format" >&5
4091 $as_echo_n "checking whether UID '$am_uid' is supported by ustar format... " >&6; }
4092       if test $am_uid -le $am_max_uid; then
4093          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4094 $as_echo "yes" >&6; }
4095       else
4096          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4097 $as_echo "no" >&6; }
4098          _am_tools=none
4099       fi
4100       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether GID '$am_gid' is supported by ustar format" >&5
4101 $as_echo_n "checking whether GID '$am_gid' is supported by ustar format... " >&6; }
4102       if test $am_gid -le $am_max_gid; then
4103          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4104 $as_echo "yes" >&6; }
4105       else
4106         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4107 $as_echo "no" >&6; }
4108         _am_tools=none
4109       fi
4110
4111   { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create a ustar tar archive" >&5
4112 $as_echo_n "checking how to create a ustar tar archive... " >&6; }
4113
4114   # Go ahead even if we have the value already cached.  We do so because we
4115   # need to set the values for the 'am__tar' and 'am__untar' variables.
4116   _am_tools=${am_cv_prog_tar_ustar-$_am_tools}
4117
4118   for _am_tool in $_am_tools; do
4119     case $_am_tool in
4120     gnutar)
4121       for _am_tar in tar gnutar gtar; do
4122         { echo "$as_me:$LINENO: $_am_tar --version" >&5
4123    ($_am_tar --version) >&5 2>&5
4124    ac_status=$?
4125    echo "$as_me:$LINENO: \$? = $ac_status" >&5
4126    (exit $ac_status); } && break
4127       done
4128       am__tar="$_am_tar --format=ustar -chf - "'"$$tardir"'
4129       am__tar_="$_am_tar --format=ustar -chf - "'"$tardir"'
4130       am__untar="$_am_tar -xf -"
4131       ;;
4132     plaintar)
4133       # Must skip GNU tar: if it does not support --format= it doesn't create
4134       # ustar tarball either.
4135       (tar --version) >/dev/null 2>&1 && continue
4136       am__tar='tar chf - "$$tardir"'
4137       am__tar_='tar chf - "$tardir"'
4138       am__untar='tar xf -'
4139       ;;
4140     pax)
4141       am__tar='pax -L -x ustar -w "$$tardir"'
4142       am__tar_='pax -L -x ustar -w "$tardir"'
4143       am__untar='pax -r'
4144       ;;
4145     cpio)
4146       am__tar='find "$$tardir" -print | cpio -o -H ustar -L'
4147       am__tar_='find "$tardir" -print | cpio -o -H ustar -L'
4148       am__untar='cpio -i -H ustar -d'
4149       ;;
4150     none)
4151       am__tar=false
4152       am__tar_=false
4153       am__untar=false
4154       ;;
4155     esac
4156
4157     # If the value was cached, stop now.  We just wanted to have am__tar
4158     # and am__untar set.
4159     test -n "${am_cv_prog_tar_ustar}" && break
4160
4161     # tar/untar a dummy directory, and stop if the command works.
4162     rm -rf conftest.dir
4163     mkdir conftest.dir
4164     echo GrepMe > conftest.dir/file
4165     { echo "$as_me:$LINENO: tardir=conftest.dir && eval $am__tar_ >conftest.tar" >&5
4166    (tardir=conftest.dir && eval $am__tar_ >conftest.tar) >&5 2>&5
4167    ac_status=$?
4168    echo "$as_me:$LINENO: \$? = $ac_status" >&5
4169    (exit $ac_status); }
4170     rm -rf conftest.dir
4171     if test -s conftest.tar; then
4172       { echo "$as_me:$LINENO: $am__untar <conftest.tar" >&5
4173    ($am__untar <conftest.tar) >&5 2>&5
4174    ac_status=$?
4175    echo "$as_me:$LINENO: \$? = $ac_status" >&5
4176    (exit $ac_status); }
4177       { echo "$as_me:$LINENO: cat conftest.dir/file" >&5
4178    (cat conftest.dir/file) >&5 2>&5
4179    ac_status=$?
4180    echo "$as_me:$LINENO: \$? = $ac_status" >&5
4181    (exit $ac_status); }
4182       grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
4183     fi
4184   done
4185   rm -rf conftest.dir
4186
4187   if ${am_cv_prog_tar_ustar+:} false; then :
4188   $as_echo_n "(cached) " >&6
4189 else
4190   am_cv_prog_tar_ustar=$_am_tool
4191 fi
4192
4193   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_ustar" >&5
4194 $as_echo "$am_cv_prog_tar_ustar" >&6; }
4195
4196
4197
4198
4199
4200
4201 # POSIX will say in a future version that running "rm -f" with no argument
4202 # is OK; and we want to be able to make that assumption in our Makefile
4203 # recipes.  So use an aggressive probe to check that the usage we want is
4204 # actually supported "in the wild" to an acceptable degree.
4205 # See automake bug#10828.
4206 # To make any issue more visible, cause the running configure to be aborted
4207 # by default if the 'rm' program in use doesn't match our expectations; the
4208 # user can still override this though.
4209 if rm -f && rm -fr && rm -rf; then : OK; else
4210   cat >&2 <<'END'
4211 Oops!
4212
4213 Your 'rm' program seems unable to run without file operands specified
4214 on the command line, even when the '-f' option is present.  This is contrary
4215 to the behaviour of most rm programs out there, and not conforming with
4216 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
4217
4218 Please tell bug-automake@gnu.org about your system, including the value
4219 of your $PATH and any error possibly output before this message.  This
4220 can help us improve future automake versions.
4221
4222 END
4223   if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
4224     echo 'Configuration will proceed anyway, since you have set the' >&2
4225     echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
4226     echo >&2
4227   else
4228     cat >&2 <<'END'
4229 Aborting the configuration process, to ensure you take notice of the issue.
4230
4231 You can download and install GNU coreutils to get an 'rm' implementation
4232 that behaves properly: <http://www.gnu.org/software/coreutils/>.
4233
4234 If you want to complete the configuration process using your problematic
4235 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
4236 to "yes", and re-run configure.
4237
4238 END
4239     as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
4240   fi
4241 fi
4242
4243 # Enable silent rules by default:
4244 # Check whether --enable-silent-rules was given.
4245 if test "${enable_silent_rules+set}" = set; then :
4246   enableval=$enable_silent_rules;
4247 fi
4248
4249 case $enable_silent_rules in # (((
4250   yes) AM_DEFAULT_VERBOSITY=0;;
4251    no) AM_DEFAULT_VERBOSITY=1;;
4252     *) AM_DEFAULT_VERBOSITY=0;;
4253 esac
4254 am_make=${MAKE-make}
4255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
4256 $as_echo_n "checking whether $am_make supports nested variables... " >&6; }
4257 if ${am_cv_make_support_nested_variables+:} false; then :
4258   $as_echo_n "(cached) " >&6
4259 else
4260   if $as_echo 'TRUE=$(BAR$(V))
4261 BAR0=false
4262 BAR1=true
4263 V=1
4264 am__doit:
4265         @$(TRUE)
4266 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
4267   am_cv_make_support_nested_variables=yes
4268 else
4269   am_cv_make_support_nested_variables=no
4270 fi
4271 fi
4272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
4273 $as_echo "$am_cv_make_support_nested_variables" >&6; }
4274 if test $am_cv_make_support_nested_variables = yes; then
4275     AM_V='$(V)'
4276   AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
4277 else
4278   AM_V=$AM_DEFAULT_VERBOSITY
4279   AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
4280 fi
4281 AM_BACKSLASH='\'
4282
4283
4284 ac_ext=c
4285 ac_cpp='$CPP $CPPFLAGS'
4286 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4287 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4288 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4289 if test -n "$ac_tool_prefix"; then
4290   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4291 set dummy ${ac_tool_prefix}gcc; ac_word=$2
4292 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4293 $as_echo_n "checking for $ac_word... " >&6; }
4294 if ${ac_cv_prog_CC+:} false; then :
4295   $as_echo_n "(cached) " >&6
4296 else
4297   if test -n "$CC"; then
4298   ac_cv_prog_CC="$CC" # Let the user override the test.
4299 else
4300 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4301 for as_dir in $PATH
4302 do
4303   IFS=$as_save_IFS
4304   test -z "$as_dir" && as_dir=.
4305     for ac_exec_ext in '' $ac_executable_extensions; do
4306   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4307     ac_cv_prog_CC="${ac_tool_prefix}gcc"
4308     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4309     break 2
4310   fi
4311 done
4312   done
4313 IFS=$as_save_IFS
4314
4315 fi
4316 fi
4317 CC=$ac_cv_prog_CC
4318 if test -n "$CC"; then
4319   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4320 $as_echo "$CC" >&6; }
4321 else
4322   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4323 $as_echo "no" >&6; }
4324 fi
4325
4326
4327 fi
4328 if test -z "$ac_cv_prog_CC"; then
4329   ac_ct_CC=$CC
4330   # Extract the first word of "gcc", so it can be a program name with args.
4331 set dummy gcc; ac_word=$2
4332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4333 $as_echo_n "checking for $ac_word... " >&6; }
4334 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4335   $as_echo_n "(cached) " >&6
4336 else
4337   if test -n "$ac_ct_CC"; then
4338   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4339 else
4340 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4341 for as_dir in $PATH
4342 do
4343   IFS=$as_save_IFS
4344   test -z "$as_dir" && as_dir=.
4345     for ac_exec_ext in '' $ac_executable_extensions; do
4346   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4347     ac_cv_prog_ac_ct_CC="gcc"
4348     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4349     break 2
4350   fi
4351 done
4352   done
4353 IFS=$as_save_IFS
4354
4355 fi
4356 fi
4357 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4358 if test -n "$ac_ct_CC"; then
4359   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4360 $as_echo "$ac_ct_CC" >&6; }
4361 else
4362   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4363 $as_echo "no" >&6; }
4364 fi
4365
4366   if test "x$ac_ct_CC" = x; then
4367     CC=""
4368   else
4369     case $cross_compiling:$ac_tool_warned in
4370 yes:)
4371 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4372 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4373 ac_tool_warned=yes ;;
4374 esac
4375     CC=$ac_ct_CC
4376   fi
4377 else
4378   CC="$ac_cv_prog_CC"
4379 fi
4380
4381 if test -z "$CC"; then
4382           if test -n "$ac_tool_prefix"; then
4383     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4384 set dummy ${ac_tool_prefix}cc; ac_word=$2
4385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4386 $as_echo_n "checking for $ac_word... " >&6; }
4387 if ${ac_cv_prog_CC+:} false; then :
4388   $as_echo_n "(cached) " >&6
4389 else
4390   if test -n "$CC"; then
4391   ac_cv_prog_CC="$CC" # Let the user override the test.
4392 else
4393 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4394 for as_dir in $PATH
4395 do
4396   IFS=$as_save_IFS
4397   test -z "$as_dir" && as_dir=.
4398     for ac_exec_ext in '' $ac_executable_extensions; do
4399   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4400     ac_cv_prog_CC="${ac_tool_prefix}cc"
4401     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4402     break 2
4403   fi
4404 done
4405   done
4406 IFS=$as_save_IFS
4407
4408 fi
4409 fi
4410 CC=$ac_cv_prog_CC
4411 if test -n "$CC"; then
4412   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4413 $as_echo "$CC" >&6; }
4414 else
4415   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4416 $as_echo "no" >&6; }
4417 fi
4418
4419
4420   fi
4421 fi
4422 if test -z "$CC"; then
4423   # Extract the first word of "cc", so it can be a program name with args.
4424 set dummy cc; ac_word=$2
4425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4426 $as_echo_n "checking for $ac_word... " >&6; }
4427 if ${ac_cv_prog_CC+:} false; then :
4428   $as_echo_n "(cached) " >&6
4429 else
4430   if test -n "$CC"; then
4431   ac_cv_prog_CC="$CC" # Let the user override the test.
4432 else
4433   ac_prog_rejected=no
4434 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4435 for as_dir in $PATH
4436 do
4437   IFS=$as_save_IFS
4438   test -z "$as_dir" && as_dir=.
4439     for ac_exec_ext in '' $ac_executable_extensions; do
4440   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4441     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4442        ac_prog_rejected=yes
4443        continue
4444      fi
4445     ac_cv_prog_CC="cc"
4446     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4447     break 2
4448   fi
4449 done
4450   done
4451 IFS=$as_save_IFS
4452
4453 if test $ac_prog_rejected = yes; then
4454   # We found a bogon in the path, so make sure we never use it.
4455   set dummy $ac_cv_prog_CC
4456   shift
4457   if test $# != 0; then
4458     # We chose a different compiler from the bogus one.
4459     # However, it has the same basename, so the bogon will be chosen
4460     # first if we set CC to just the basename; use the full file name.
4461     shift
4462     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
4463   fi
4464 fi
4465 fi
4466 fi
4467 CC=$ac_cv_prog_CC
4468 if test -n "$CC"; then
4469   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4470 $as_echo "$CC" >&6; }
4471 else
4472   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4473 $as_echo "no" >&6; }
4474 fi
4475
4476
4477 fi
4478 if test -z "$CC"; then
4479   if test -n "$ac_tool_prefix"; then
4480   for ac_prog in cl.exe
4481   do
4482     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4483 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4485 $as_echo_n "checking for $ac_word... " >&6; }
4486 if ${ac_cv_prog_CC+:} false; then :
4487   $as_echo_n "(cached) " >&6
4488 else
4489   if test -n "$CC"; then
4490   ac_cv_prog_CC="$CC" # Let the user override the test.
4491 else
4492 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4493 for as_dir in $PATH
4494 do
4495   IFS=$as_save_IFS
4496   test -z "$as_dir" && as_dir=.
4497     for ac_exec_ext in '' $ac_executable_extensions; do
4498   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4499     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4500     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4501     break 2
4502   fi
4503 done
4504   done
4505 IFS=$as_save_IFS
4506
4507 fi
4508 fi
4509 CC=$ac_cv_prog_CC
4510 if test -n "$CC"; then
4511   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4512 $as_echo "$CC" >&6; }
4513 else
4514   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4515 $as_echo "no" >&6; }
4516 fi
4517
4518
4519     test -n "$CC" && break
4520   done
4521 fi
4522 if test -z "$CC"; then
4523   ac_ct_CC=$CC
4524   for ac_prog in cl.exe
4525 do
4526   # Extract the first word of "$ac_prog", so it can be a program name with args.
4527 set dummy $ac_prog; ac_word=$2
4528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4529 $as_echo_n "checking for $ac_word... " >&6; }
4530 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4531   $as_echo_n "(cached) " >&6
4532 else
4533   if test -n "$ac_ct_CC"; then
4534   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4535 else
4536 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4537 for as_dir in $PATH
4538 do
4539   IFS=$as_save_IFS
4540   test -z "$as_dir" && as_dir=.
4541     for ac_exec_ext in '' $ac_executable_extensions; do
4542   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4543     ac_cv_prog_ac_ct_CC="$ac_prog"
4544     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4545     break 2
4546   fi
4547 done
4548   done
4549 IFS=$as_save_IFS
4550
4551 fi
4552 fi
4553 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4554 if test -n "$ac_ct_CC"; then
4555   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4556 $as_echo "$ac_ct_CC" >&6; }
4557 else
4558   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4559 $as_echo "no" >&6; }
4560 fi
4561
4562
4563   test -n "$ac_ct_CC" && break
4564 done
4565
4566   if test "x$ac_ct_CC" = x; then
4567     CC=""
4568   else
4569     case $cross_compiling:$ac_tool_warned in
4570 yes:)
4571 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4572 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4573 ac_tool_warned=yes ;;
4574 esac
4575     CC=$ac_ct_CC
4576   fi
4577 fi
4578
4579 fi
4580
4581
4582 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4583 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4584 as_fn_error $? "no acceptable C compiler found in \$PATH
4585 See \`config.log' for more details" "$LINENO" 5; }
4586
4587 # Provide some information about the compiler.
4588 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4589 set X $ac_compile
4590 ac_compiler=$2
4591 for ac_option in --version -v -V -qversion; do
4592   { { ac_try="$ac_compiler $ac_option >&5"
4593 case "(($ac_try" in
4594   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4595   *) ac_try_echo=$ac_try;;
4596 esac
4597 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4598 $as_echo "$ac_try_echo"; } >&5
4599   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4600   ac_status=$?
4601   if test -s conftest.err; then
4602     sed '10a\
4603 ... rest of stderr output deleted ...
4604          10q' conftest.err >conftest.er1
4605     cat conftest.er1 >&5
4606   fi
4607   rm -f conftest.er1 conftest.err
4608   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4609   test $ac_status = 0; }
4610 done
4611
4612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4613 /* end confdefs.h.  */
4614
4615 int
4616 main ()
4617 {
4618
4619   ;
4620   return 0;
4621 }
4622 _ACEOF
4623 ac_clean_files_save=$ac_clean_files
4624 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
4625 # Try to create an executable without -o first, disregard a.out.
4626 # It will help us diagnose broken compilers, and finding out an intuition
4627 # of exeext.
4628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4629 $as_echo_n "checking whether the C compiler works... " >&6; }
4630 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4631
4632 # The possible output files:
4633 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4634
4635 ac_rmfiles=
4636 for ac_file in $ac_files
4637 do
4638   case $ac_file in
4639     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4640     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4641   esac
4642 done
4643 rm -f $ac_rmfiles
4644
4645 if { { ac_try="$ac_link_default"
4646 case "(($ac_try" in
4647   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4648   *) ac_try_echo=$ac_try;;
4649 esac
4650 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4651 $as_echo "$ac_try_echo"; } >&5
4652   (eval "$ac_link_default") 2>&5
4653   ac_status=$?
4654   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4655   test $ac_status = 0; }; then :
4656   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4657 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4658 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
4659 # so that the user can short-circuit this test for compilers unknown to
4660 # Autoconf.
4661 for ac_file in $ac_files ''
4662 do
4663   test -f "$ac_file" || continue
4664   case $ac_file in
4665     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4666         ;;
4667     [ab].out )
4668         # We found the default executable, but exeext='' is most
4669         # certainly right.
4670         break;;
4671     *.* )
4672         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4673         then :; else
4674            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4675         fi
4676         # We set ac_cv_exeext here because the later test for it is not
4677         # safe: cross compilers may not add the suffix if given an `-o'
4678         # argument, so we may need to know it at that point already.
4679         # Even if this section looks crufty: it has the advantage of
4680         # actually working.
4681         break;;
4682     * )
4683         break;;
4684   esac
4685 done
4686 test "$ac_cv_exeext" = no && ac_cv_exeext=
4687
4688 else
4689   ac_file=''
4690 fi
4691 if test -z "$ac_file"; then :
4692   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4693 $as_echo "no" >&6; }
4694 $as_echo "$as_me: failed program was:" >&5
4695 sed 's/^/| /' conftest.$ac_ext >&5
4696
4697 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4698 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4699 as_fn_error 77 "C compiler cannot create executables
4700 See \`config.log' for more details" "$LINENO" 5; }
4701 else
4702   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4703 $as_echo "yes" >&6; }
4704 fi
4705 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4706 $as_echo_n "checking for C compiler default output file name... " >&6; }
4707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4708 $as_echo "$ac_file" >&6; }
4709 ac_exeext=$ac_cv_exeext
4710
4711 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4712 ac_clean_files=$ac_clean_files_save
4713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4714 $as_echo_n "checking for suffix of executables... " >&6; }
4715 if { { ac_try="$ac_link"
4716 case "(($ac_try" in
4717   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4718   *) ac_try_echo=$ac_try;;
4719 esac
4720 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4721 $as_echo "$ac_try_echo"; } >&5
4722   (eval "$ac_link") 2>&5
4723   ac_status=$?
4724   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4725   test $ac_status = 0; }; then :
4726   # If both `conftest.exe' and `conftest' are `present' (well, observable)
4727 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
4728 # work properly (i.e., refer to `conftest.exe'), while it won't with
4729 # `rm'.
4730 for ac_file in conftest.exe conftest conftest.*; do
4731   test -f "$ac_file" || continue
4732   case $ac_file in
4733     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4734     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4735           break;;
4736     * ) break;;
4737   esac
4738 done
4739 else
4740   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4741 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4742 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4743 See \`config.log' for more details" "$LINENO" 5; }
4744 fi
4745 rm -f conftest conftest$ac_cv_exeext
4746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4747 $as_echo "$ac_cv_exeext" >&6; }
4748
4749 rm -f conftest.$ac_ext
4750 EXEEXT=$ac_cv_exeext
4751 ac_exeext=$EXEEXT
4752 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4753 /* end confdefs.h.  */
4754 #include <stdio.h>
4755 int
4756 main ()
4757 {
4758 FILE *f = fopen ("conftest.out", "w");
4759  return ferror (f) || fclose (f) != 0;
4760
4761   ;
4762   return 0;
4763 }
4764 _ACEOF
4765 ac_clean_files="$ac_clean_files conftest.out"
4766 # Check that the compiler produces executables we can run.  If not, either
4767 # the compiler is broken, or we cross compile.
4768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4769 $as_echo_n "checking whether we are cross compiling... " >&6; }
4770 if test "$cross_compiling" != yes; then
4771   { { ac_try="$ac_link"
4772 case "(($ac_try" in
4773   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4774   *) ac_try_echo=$ac_try;;
4775 esac
4776 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4777 $as_echo "$ac_try_echo"; } >&5
4778   (eval "$ac_link") 2>&5
4779   ac_status=$?
4780   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4781   test $ac_status = 0; }
4782   if { ac_try='./conftest$ac_cv_exeext'
4783   { { case "(($ac_try" in
4784   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4785   *) ac_try_echo=$ac_try;;
4786 esac
4787 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4788 $as_echo "$ac_try_echo"; } >&5
4789   (eval "$ac_try") 2>&5
4790   ac_status=$?
4791   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4792   test $ac_status = 0; }; }; then
4793     cross_compiling=no
4794   else
4795     if test "$cross_compiling" = maybe; then
4796         cross_compiling=yes
4797     else
4798         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4799 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4800 as_fn_error $? "cannot run C compiled programs.
4801 If you meant to cross compile, use \`--host'.
4802 See \`config.log' for more details" "$LINENO" 5; }
4803     fi
4804   fi
4805 fi
4806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4807 $as_echo "$cross_compiling" >&6; }
4808
4809 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4810 ac_clean_files=$ac_clean_files_save
4811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4812 $as_echo_n "checking for suffix of object files... " >&6; }
4813 if ${ac_cv_objext+:} false; then :
4814   $as_echo_n "(cached) " >&6
4815 else
4816   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4817 /* end confdefs.h.  */
4818
4819 int
4820 main ()
4821 {
4822
4823   ;
4824   return 0;
4825 }
4826 _ACEOF
4827 rm -f conftest.o conftest.obj
4828 if { { ac_try="$ac_compile"
4829 case "(($ac_try" in
4830   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4831   *) ac_try_echo=$ac_try;;
4832 esac
4833 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4834 $as_echo "$ac_try_echo"; } >&5
4835   (eval "$ac_compile") 2>&5
4836   ac_status=$?
4837   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4838   test $ac_status = 0; }; then :
4839   for ac_file in conftest.o conftest.obj conftest.*; do
4840   test -f "$ac_file" || continue;
4841   case $ac_file in
4842     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4843     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4844        break;;
4845   esac
4846 done
4847 else
4848   $as_echo "$as_me: failed program was:" >&5
4849 sed 's/^/| /' conftest.$ac_ext >&5
4850
4851 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4852 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4853 as_fn_error $? "cannot compute suffix of object files: cannot compile
4854 See \`config.log' for more details" "$LINENO" 5; }
4855 fi
4856 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4857 fi
4858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4859 $as_echo "$ac_cv_objext" >&6; }
4860 OBJEXT=$ac_cv_objext
4861 ac_objext=$OBJEXT
4862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4863 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4864 if ${ac_cv_c_compiler_gnu+:} false; then :
4865   $as_echo_n "(cached) " >&6
4866 else
4867   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4868 /* end confdefs.h.  */
4869
4870 int
4871 main ()
4872 {
4873 #ifndef __GNUC__
4874        choke me
4875 #endif
4876
4877   ;
4878   return 0;
4879 }
4880 _ACEOF
4881 if ac_fn_c_try_compile "$LINENO"; then :
4882   ac_compiler_gnu=yes
4883 else
4884   ac_compiler_gnu=no
4885 fi
4886 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4887 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4888
4889 fi
4890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4891 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4892 if test $ac_compiler_gnu = yes; then
4893   GCC=yes
4894 else
4895   GCC=
4896 fi
4897 ac_test_CFLAGS=${CFLAGS+set}
4898 ac_save_CFLAGS=$CFLAGS
4899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4900 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4901 if ${ac_cv_prog_cc_g+:} false; then :
4902   $as_echo_n "(cached) " >&6
4903 else
4904   ac_save_c_werror_flag=$ac_c_werror_flag
4905    ac_c_werror_flag=yes
4906    ac_cv_prog_cc_g=no
4907    CFLAGS="-g"
4908    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4909 /* end confdefs.h.  */
4910
4911 int
4912 main ()
4913 {
4914
4915   ;
4916   return 0;
4917 }
4918 _ACEOF
4919 if ac_fn_c_try_compile "$LINENO"; then :
4920   ac_cv_prog_cc_g=yes
4921 else
4922   CFLAGS=""
4923       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4924 /* end confdefs.h.  */
4925
4926 int
4927 main ()
4928 {
4929
4930   ;
4931   return 0;
4932 }
4933 _ACEOF
4934 if ac_fn_c_try_compile "$LINENO"; then :
4935
4936 else
4937   ac_c_werror_flag=$ac_save_c_werror_flag
4938          CFLAGS="-g"
4939          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4940 /* end confdefs.h.  */
4941
4942 int
4943 main ()
4944 {
4945
4946   ;
4947   return 0;
4948 }
4949 _ACEOF
4950 if ac_fn_c_try_compile "$LINENO"; then :
4951   ac_cv_prog_cc_g=yes
4952 fi
4953 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4954 fi
4955 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4956 fi
4957 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4958    ac_c_werror_flag=$ac_save_c_werror_flag
4959 fi
4960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4961 $as_echo "$ac_cv_prog_cc_g" >&6; }
4962 if test "$ac_test_CFLAGS" = set; then
4963   CFLAGS=$ac_save_CFLAGS
4964 elif test $ac_cv_prog_cc_g = yes; then
4965   if test "$GCC" = yes; then
4966     CFLAGS="-g -O2"
4967   else
4968     CFLAGS="-g"
4969   fi
4970 else
4971   if test "$GCC" = yes; then
4972     CFLAGS="-O2"
4973   else
4974     CFLAGS=
4975   fi
4976 fi
4977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4978 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4979 if ${ac_cv_prog_cc_c89+:} false; then :
4980   $as_echo_n "(cached) " >&6
4981 else
4982   ac_cv_prog_cc_c89=no
4983 ac_save_CC=$CC
4984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4985 /* end confdefs.h.  */
4986 #include <stdarg.h>
4987 #include <stdio.h>
4988 struct stat;
4989 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4990 struct buf { int x; };
4991 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4992 static char *e (p, i)
4993      char **p;
4994      int i;
4995 {
4996   return p[i];
4997 }
4998 static char *f (char * (*g) (char **, int), char **p, ...)
4999 {
5000   char *s;
5001   va_list v;
5002   va_start (v,p);
5003   s = g (p, va_arg (v,int));
5004   va_end (v);
5005   return s;
5006 }
5007
5008 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
5009    function prototypes and stuff, but not '\xHH' hex character constants.
5010    These don't provoke an error unfortunately, instead are silently treated
5011    as 'x'.  The following induces an error, until -std is added to get
5012    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
5013    array size at least.  It's necessary to write '\x00'==0 to get something
5014    that's true only with -std.  */
5015 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5016
5017 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5018    inside strings and character constants.  */
5019 #define FOO(x) 'x'
5020 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5021
5022 int test (int i, double x);
5023 struct s1 {int (*f) (int a);};
5024 struct s2 {int (*f) (double a);};
5025 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5026 int argc;
5027 char **argv;
5028 int
5029 main ()
5030 {
5031 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
5032   ;
5033   return 0;
5034 }
5035 _ACEOF
5036 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5037         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5038 do
5039   CC="$ac_save_CC $ac_arg"
5040   if ac_fn_c_try_compile "$LINENO"; then :
5041   ac_cv_prog_cc_c89=$ac_arg
5042 fi
5043 rm -f core conftest.err conftest.$ac_objext
5044   test "x$ac_cv_prog_cc_c89" != "xno" && break
5045 done
5046 rm -f conftest.$ac_ext
5047 CC=$ac_save_CC
5048
5049 fi
5050 # AC_CACHE_VAL
5051 case "x$ac_cv_prog_cc_c89" in
5052   x)
5053     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5054 $as_echo "none needed" >&6; } ;;
5055   xno)
5056     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5057 $as_echo "unsupported" >&6; } ;;
5058   *)
5059     CC="$CC $ac_cv_prog_cc_c89"
5060     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5061 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5062 esac
5063 if test "x$ac_cv_prog_cc_c89" != xno; then :
5064
5065 fi
5066
5067 ac_ext=c
5068 ac_cpp='$CPP $CPPFLAGS'
5069 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5070 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5071 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5072
5073 ac_ext=c
5074 ac_cpp='$CPP $CPPFLAGS'
5075 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5076 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5077 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
5079 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
5080 if ${am_cv_prog_cc_c_o+:} false; then :
5081   $as_echo_n "(cached) " >&6
5082 else
5083   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5084 /* end confdefs.h.  */
5085
5086 int
5087 main ()
5088 {
5089
5090   ;
5091   return 0;
5092 }
5093 _ACEOF
5094   # Make sure it works both with $CC and with simple cc.
5095   # Following AC_PROG_CC_C_O, we do the test twice because some
5096   # compilers refuse to overwrite an existing .o file with -o,
5097   # though they will create one.
5098   am_cv_prog_cc_c_o=yes
5099   for am_i in 1 2; do
5100     if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
5101    ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
5102    ac_status=$?
5103    echo "$as_me:$LINENO: \$? = $ac_status" >&5
5104    (exit $ac_status); } \
5105          && test -f conftest2.$ac_objext; then
5106       : OK
5107     else
5108       am_cv_prog_cc_c_o=no
5109       break
5110     fi
5111   done
5112   rm -f core conftest*
5113   unset am_i
5114 fi
5115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
5116 $as_echo "$am_cv_prog_cc_c_o" >&6; }
5117 if test "$am_cv_prog_cc_c_o" != yes; then
5118    # Losing compiler, so override with the script.
5119    # FIXME: It is wrong to rewrite CC.
5120    # But if we don't then we get into trouble of one sort or another.
5121    # A longer-term fix would be to have automake use am__CC in this case,
5122    # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
5123    CC="$am_aux_dir/compile $CC"
5124 fi
5125 ac_ext=c
5126 ac_cpp='$CPP $CPPFLAGS'
5127 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5128 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5129 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5130
5131 DEPDIR="${am__leading_dot}deps"
5132
5133 ac_config_commands="$ac_config_commands depfiles"
5134
5135
5136 am_make=${MAKE-make}
5137 cat > confinc << 'END'
5138 am__doit:
5139         @echo this is the am__doit target
5140 .PHONY: am__doit
5141 END
5142 # If we don't find an include directive, just comment out the code.
5143 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
5144 $as_echo_n "checking for style of include used by $am_make... " >&6; }
5145 am__include="#"
5146 am__quote=
5147 _am_result=none
5148 # First try GNU make style include.
5149 echo "include confinc" > confmf
5150 # Ignore all kinds of additional output from 'make'.
5151 case `$am_make -s -f confmf 2> /dev/null` in #(
5152 *the\ am__doit\ target*)
5153   am__include=include
5154   am__quote=
5155   _am_result=GNU
5156   ;;
5157 esac
5158 # Now try BSD make style include.
5159 if test "$am__include" = "#"; then
5160    echo '.include "confinc"' > confmf
5161    case `$am_make -s -f confmf 2> /dev/null` in #(
5162    *the\ am__doit\ target*)
5163      am__include=.include
5164      am__quote="\""
5165      _am_result=BSD
5166      ;;
5167    esac
5168 fi
5169
5170
5171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
5172 $as_echo "$_am_result" >&6; }
5173 rm -f confinc confmf
5174
5175 # Check whether --enable-dependency-tracking was given.
5176 if test "${enable_dependency_tracking+set}" = set; then :
5177   enableval=$enable_dependency_tracking;
5178 fi
5179
5180 if test "x$enable_dependency_tracking" != xno; then
5181   am_depcomp="$ac_aux_dir/depcomp"
5182   AMDEPBACKSLASH='\'
5183   am__nodep='_no'
5184 fi
5185  if test "x$enable_dependency_tracking" != xno; then
5186   AMDEP_TRUE=
5187   AMDEP_FALSE='#'
5188 else
5189   AMDEP_TRUE='#'
5190   AMDEP_FALSE=
5191 fi
5192
5193
5194
5195 depcc="$CC"   am_compiler_list=
5196
5197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
5198 $as_echo_n "checking dependency style of $depcc... " >&6; }
5199 if ${am_cv_CC_dependencies_compiler_type+:} false; then :
5200   $as_echo_n "(cached) " >&6
5201 else
5202   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
5203   # We make a subdir and do the tests there.  Otherwise we can end up
5204   # making bogus files that we don't know about and never remove.  For
5205   # instance it was reported that on HP-UX the gcc test will end up
5206   # making a dummy file named 'D' -- because '-MD' means "put the output
5207   # in D".
5208   rm -rf conftest.dir
5209   mkdir conftest.dir
5210   # Copy depcomp to subdir because otherwise we won't find it if we're
5211   # using a relative directory.
5212   cp "$am_depcomp" conftest.dir
5213   cd conftest.dir
5214   # We will build objects and dependencies in a subdirectory because
5215   # it helps to detect inapplicable dependency modes.  For instance
5216   # both Tru64's cc and ICC support -MD to output dependencies as a
5217   # side effect of compilation, but ICC will put the dependencies in
5218   # the current directory while Tru64 will put them in the object
5219   # directory.
5220   mkdir sub
5221
5222   am_cv_CC_dependencies_compiler_type=none
5223   if test "$am_compiler_list" = ""; then
5224      am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5225   fi
5226   am__universal=false
5227   case " $depcc " in #(
5228      *\ -arch\ *\ -arch\ *) am__universal=true ;;
5229      esac
5230
5231   for depmode in $am_compiler_list; do
5232     # Setup a source with many dependencies, because some compilers
5233     # like to wrap large dependency lists on column 80 (with \), and
5234     # we should not choose a depcomp mode which is confused by this.
5235     #
5236     # We need to recreate these files for each test, as the compiler may
5237     # overwrite some of them when testing with obscure command lines.
5238     # This happens at least with the AIX C compiler.
5239     : > sub/conftest.c
5240     for i in 1 2 3 4 5 6; do
5241       echo '#include "conftst'$i'.h"' >> sub/conftest.c
5242       # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
5243       # Solaris 10 /bin/sh.
5244       echo '/* dummy */' > sub/conftst$i.h
5245     done
5246     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
5247
5248     # We check with '-c' and '-o' for the sake of the "dashmstdout"
5249     # mode.  It turns out that the SunPro C++ compiler does not properly
5250     # handle '-M -o', and we need to detect this.  Also, some Intel
5251     # versions had trouble with output in subdirs.
5252     am__obj=sub/conftest.${OBJEXT-o}
5253     am__minus_obj="-o $am__obj"
5254     case $depmode in
5255     gcc)
5256       # This depmode causes a compiler race in universal mode.
5257       test "$am__universal" = false || continue
5258       ;;
5259     nosideeffect)
5260       # After this tag, mechanisms are not by side-effect, so they'll
5261       # only be used when explicitly requested.
5262       if test "x$enable_dependency_tracking" = xyes; then
5263         continue
5264       else
5265         break
5266       fi
5267       ;;
5268     msvc7 | msvc7msys | msvisualcpp | msvcmsys)
5269       # This compiler won't grok '-c -o', but also, the minuso test has
5270       # not run yet.  These depmodes are late enough in the game, and
5271       # so weak that their functioning should not be impacted.
5272       am__obj=conftest.${OBJEXT-o}
5273       am__minus_obj=
5274       ;;
5275     none) break ;;
5276     esac
5277     if depmode=$depmode \
5278        source=sub/conftest.c object=$am__obj \
5279        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5280        $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
5281          >/dev/null 2>conftest.err &&
5282        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
5283        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
5284        grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
5285        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
5286       # icc doesn't choke on unknown options, it will just issue warnings
5287       # or remarks (even with -Werror).  So we grep stderr for any message
5288       # that says an option was ignored or not supported.
5289       # When given -MP, icc 7.0 and 7.1 complain thusly:
5290       #   icc: Command line warning: ignoring option '-M'; no argument required
5291       # The diagnosis changed in icc 8.0:
5292       #   icc: Command line remark: option '-MP' not supported
5293       if (grep 'ignoring option' conftest.err ||
5294           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
5295         am_cv_CC_dependencies_compiler_type=$depmode
5296         break
5297       fi
5298     fi
5299   done
5300
5301   cd ..
5302   rm -rf conftest.dir
5303 else
5304   am_cv_CC_dependencies_compiler_type=none
5305 fi
5306
5307 fi
5308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
5309 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
5310 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
5311
5312  if
5313   test "x$enable_dependency_tracking" != xno \
5314   && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
5315   am__fastdepCC_TRUE=
5316   am__fastdepCC_FALSE='#'
5317 else
5318   am__fastdepCC_TRUE='#'
5319   am__fastdepCC_FALSE=
5320 fi
5321
5322
5323
5324 if test -n "$ac_tool_prefix"; then
5325   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5326 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
5327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5328 $as_echo_n "checking for $ac_word... " >&6; }
5329 if ${ac_cv_prog_RANLIB+:} false; then :
5330   $as_echo_n "(cached) " >&6
5331 else
5332   if test -n "$RANLIB"; then
5333   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5334 else
5335 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5336 for as_dir in $PATH
5337 do
5338   IFS=$as_save_IFS
5339   test -z "$as_dir" && as_dir=.
5340     for ac_exec_ext in '' $ac_executable_extensions; do
5341   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5342     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5343     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5344     break 2
5345   fi
5346 done
5347   done
5348 IFS=$as_save_IFS
5349
5350 fi
5351 fi
5352 RANLIB=$ac_cv_prog_RANLIB
5353 if test -n "$RANLIB"; then
5354   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5355 $as_echo "$RANLIB" >&6; }
5356 else
5357   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5358 $as_echo "no" >&6; }
5359 fi
5360
5361
5362 fi
5363 if test -z "$ac_cv_prog_RANLIB"; then
5364   ac_ct_RANLIB=$RANLIB
5365   # Extract the first word of "ranlib", so it can be a program name with args.
5366 set dummy ranlib; ac_word=$2
5367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5368 $as_echo_n "checking for $ac_word... " >&6; }
5369 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
5370   $as_echo_n "(cached) " >&6
5371 else
5372   if test -n "$ac_ct_RANLIB"; then
5373   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5374 else
5375 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5376 for as_dir in $PATH
5377 do
5378   IFS=$as_save_IFS
5379   test -z "$as_dir" && as_dir=.
5380     for ac_exec_ext in '' $ac_executable_extensions; do
5381   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5382     ac_cv_prog_ac_ct_RANLIB="ranlib"
5383     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5384     break 2
5385   fi
5386 done
5387   done
5388 IFS=$as_save_IFS
5389
5390 fi
5391 fi
5392 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5393 if test -n "$ac_ct_RANLIB"; then
5394   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5395 $as_echo "$ac_ct_RANLIB" >&6; }
5396 else
5397   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5398 $as_echo "no" >&6; }
5399 fi
5400
5401   if test "x$ac_ct_RANLIB" = x; then
5402     RANLIB=":"
5403   else
5404     case $cross_compiling:$ac_tool_warned in
5405 yes:)
5406 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5407 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5408 ac_tool_warned=yes ;;
5409 esac
5410     RANLIB=$ac_ct_RANLIB
5411   fi
5412 else
5413   RANLIB="$ac_cv_prog_RANLIB"
5414 fi
5415
5416 for ac_prog in 'bison -y' byacc
5417 do
5418   # Extract the first word of "$ac_prog", so it can be a program name with args.
5419 set dummy $ac_prog; ac_word=$2
5420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5421 $as_echo_n "checking for $ac_word... " >&6; }
5422 if ${ac_cv_prog_YACC+:} false; then :
5423   $as_echo_n "(cached) " >&6
5424 else
5425   if test -n "$YACC"; then
5426   ac_cv_prog_YACC="$YACC" # Let the user override the test.
5427 else
5428 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5429 for as_dir in $PATH
5430 do
5431   IFS=$as_save_IFS
5432   test -z "$as_dir" && as_dir=.
5433     for ac_exec_ext in '' $ac_executable_extensions; do
5434   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5435     ac_cv_prog_YACC="$ac_prog"
5436     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5437     break 2
5438   fi
5439 done
5440   done
5441 IFS=$as_save_IFS
5442
5443 fi
5444 fi
5445 YACC=$ac_cv_prog_YACC
5446 if test -n "$YACC"; then
5447   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
5448 $as_echo "$YACC" >&6; }
5449 else
5450   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5451 $as_echo "no" >&6; }
5452 fi
5453
5454
5455   test -n "$YACC" && break
5456 done
5457 test -n "$YACC" || YACC="yacc"
5458
5459
5460 ac_ext=c
5461 ac_cpp='$CPP $CPPFLAGS'
5462 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5463 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5464 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5466 $as_echo_n "checking how to run the C preprocessor... " >&6; }
5467 # On Suns, sometimes $CPP names a directory.
5468 if test -n "$CPP" && test -d "$CPP"; then
5469   CPP=
5470 fi
5471 if test -z "$CPP"; then
5472   if ${ac_cv_prog_CPP+:} false; then :
5473   $as_echo_n "(cached) " >&6
5474 else
5475       # Double quotes because CPP needs to be expanded
5476     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5477     do
5478       ac_preproc_ok=false
5479 for ac_c_preproc_warn_flag in '' yes
5480 do
5481   # Use a header file that comes with gcc, so configuring glibc
5482   # with a fresh cross-compiler works.
5483   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5484   # <limits.h> exists even on freestanding compilers.
5485   # On the NeXT, cc -E runs the code through the compiler's parser,
5486   # not just through cpp. "Syntax error" is here to catch this case.
5487   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5488 /* end confdefs.h.  */
5489 #ifdef __STDC__
5490 # include <limits.h>
5491 #else
5492 # include <assert.h>
5493 #endif
5494                      Syntax error
5495 _ACEOF
5496 if ac_fn_c_try_cpp "$LINENO"; then :
5497
5498 else
5499   # Broken: fails on valid input.
5500 continue
5501 fi
5502 rm -f conftest.err conftest.i conftest.$ac_ext
5503
5504   # OK, works on sane cases.  Now check whether nonexistent headers
5505   # can be detected and how.
5506   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5507 /* end confdefs.h.  */
5508 #include <ac_nonexistent.h>
5509 _ACEOF
5510 if ac_fn_c_try_cpp "$LINENO"; then :
5511   # Broken: success on invalid input.
5512 continue
5513 else
5514   # Passes both tests.
5515 ac_preproc_ok=:
5516 break
5517 fi
5518 rm -f conftest.err conftest.i conftest.$ac_ext
5519
5520 done
5521 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5522 rm -f conftest.i conftest.err conftest.$ac_ext
5523 if $ac_preproc_ok; then :
5524   break
5525 fi
5526
5527     done
5528     ac_cv_prog_CPP=$CPP
5529
5530 fi
5531   CPP=$ac_cv_prog_CPP
5532 else
5533   ac_cv_prog_CPP=$CPP
5534 fi
5535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5536 $as_echo "$CPP" >&6; }
5537 ac_preproc_ok=false
5538 for ac_c_preproc_warn_flag in '' yes
5539 do
5540   # Use a header file that comes with gcc, so configuring glibc
5541   # with a fresh cross-compiler works.
5542   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5543   # <limits.h> exists even on freestanding compilers.
5544   # On the NeXT, cc -E runs the code through the compiler's parser,
5545   # not just through cpp. "Syntax error" is here to catch this case.
5546   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5547 /* end confdefs.h.  */
5548 #ifdef __STDC__
5549 # include <limits.h>
5550 #else
5551 # include <assert.h>
5552 #endif
5553                      Syntax error
5554 _ACEOF
5555 if ac_fn_c_try_cpp "$LINENO"; then :
5556
5557 else
5558   # Broken: fails on valid input.
5559 continue
5560 fi
5561 rm -f conftest.err conftest.i conftest.$ac_ext
5562
5563   # OK, works on sane cases.  Now check whether nonexistent headers
5564   # can be detected and how.
5565   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5566 /* end confdefs.h.  */
5567 #include <ac_nonexistent.h>
5568 _ACEOF
5569 if ac_fn_c_try_cpp "$LINENO"; then :
5570   # Broken: success on invalid input.
5571 continue
5572 else
5573   # Passes both tests.
5574 ac_preproc_ok=:
5575 break
5576 fi
5577 rm -f conftest.err conftest.i conftest.$ac_ext
5578
5579 done
5580 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5581 rm -f conftest.i conftest.err conftest.$ac_ext
5582 if $ac_preproc_ok; then :
5583
5584 else
5585   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5586 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5587 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
5588 See \`config.log' for more details" "$LINENO" 5; }
5589 fi
5590
5591 ac_ext=c
5592 ac_cpp='$CPP $CPPFLAGS'
5593 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5594 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5595 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5596
5597
5598 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5599 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5600 if ${ac_cv_path_GREP+:} false; then :
5601   $as_echo_n "(cached) " >&6
5602 else
5603   if test -z "$GREP"; then
5604   ac_path_GREP_found=false
5605   # Loop through the user's path and test for each of PROGNAME-LIST
5606   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5607 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5608 do
5609   IFS=$as_save_IFS
5610   test -z "$as_dir" && as_dir=.
5611     for ac_prog in grep ggrep; do
5612     for ac_exec_ext in '' $ac_executable_extensions; do
5613       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5614       as_fn_executable_p "$ac_path_GREP" || continue
5615 # Check for GNU ac_path_GREP and select it if it is found.
5616   # Check for GNU $ac_path_GREP
5617 case `"$ac_path_GREP" --version 2>&1` in
5618 *GNU*)
5619   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5620 *)
5621   ac_count=0
5622   $as_echo_n 0123456789 >"conftest.in"
5623   while :
5624   do
5625     cat "conftest.in" "conftest.in" >"conftest.tmp"
5626     mv "conftest.tmp" "conftest.in"
5627     cp "conftest.in" "conftest.nl"
5628     $as_echo 'GREP' >> "conftest.nl"
5629     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5630     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5631     as_fn_arith $ac_count + 1 && ac_count=$as_val
5632     if test $ac_count -gt ${ac_path_GREP_max-0}; then
5633       # Best one so far, save it but keep looking for a better one
5634       ac_cv_path_GREP="$ac_path_GREP"
5635       ac_path_GREP_max=$ac_count
5636     fi
5637     # 10*(2^10) chars as input seems more than enough
5638     test $ac_count -gt 10 && break
5639   done
5640   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5641 esac
5642
5643       $ac_path_GREP_found && break 3
5644     done
5645   done
5646   done
5647 IFS=$as_save_IFS
5648   if test -z "$ac_cv_path_GREP"; then
5649     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5650   fi
5651 else
5652   ac_cv_path_GREP=$GREP
5653 fi
5654
5655 fi
5656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5657 $as_echo "$ac_cv_path_GREP" >&6; }
5658  GREP="$ac_cv_path_GREP"
5659
5660
5661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5662 $as_echo_n "checking for egrep... " >&6; }
5663 if ${ac_cv_path_EGREP+:} false; then :
5664   $as_echo_n "(cached) " >&6
5665 else
5666   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5667    then ac_cv_path_EGREP="$GREP -E"
5668    else
5669      if test -z "$EGREP"; then
5670   ac_path_EGREP_found=false
5671   # Loop through the user's path and test for each of PROGNAME-LIST
5672   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5673 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5674 do
5675   IFS=$as_save_IFS
5676   test -z "$as_dir" && as_dir=.
5677     for ac_prog in egrep; do
5678     for ac_exec_ext in '' $ac_executable_extensions; do
5679       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5680       as_fn_executable_p "$ac_path_EGREP" || continue
5681 # Check for GNU ac_path_EGREP and select it if it is found.
5682   # Check for GNU $ac_path_EGREP
5683 case `"$ac_path_EGREP" --version 2>&1` in
5684 *GNU*)
5685   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5686 *)
5687   ac_count=0
5688   $as_echo_n 0123456789 >"conftest.in"
5689   while :
5690   do
5691     cat "conftest.in" "conftest.in" >"conftest.tmp"
5692     mv "conftest.tmp" "conftest.in"
5693     cp "conftest.in" "conftest.nl"
5694     $as_echo 'EGREP' >> "conftest.nl"
5695     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5696     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5697     as_fn_arith $ac_count + 1 && ac_count=$as_val
5698     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5699       # Best one so far, save it but keep looking for a better one
5700       ac_cv_path_EGREP="$ac_path_EGREP"
5701       ac_path_EGREP_max=$ac_count
5702     fi
5703     # 10*(2^10) chars as input seems more than enough
5704     test $ac_count -gt 10 && break
5705   done
5706   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5707 esac
5708
5709       $ac_path_EGREP_found && break 3
5710     done
5711   done
5712   done
5713 IFS=$as_save_IFS
5714   if test -z "$ac_cv_path_EGREP"; then
5715     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5716   fi
5717 else
5718   ac_cv_path_EGREP=$EGREP
5719 fi
5720
5721    fi
5722 fi
5723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5724 $as_echo "$ac_cv_path_EGREP" >&6; }
5725  EGREP="$ac_cv_path_EGREP"
5726
5727
5728
5729
5730   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
5731 $as_echo_n "checking for Minix Amsterdam compiler... " >&6; }
5732 if ${gl_cv_c_amsterdam_compiler+:} false; then :
5733   $as_echo_n "(cached) " >&6
5734 else
5735
5736       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5737 /* end confdefs.h.  */
5738
5739 #ifdef __ACK__
5740 Amsterdam
5741 #endif
5742
5743 _ACEOF
5744 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5745   $EGREP "Amsterdam" >/dev/null 2>&1; then :
5746   gl_cv_c_amsterdam_compiler=yes
5747 else
5748   gl_cv_c_amsterdam_compiler=no
5749 fi
5750 rm -f conftest*
5751
5752
5753 fi
5754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
5755 $as_echo "$gl_cv_c_amsterdam_compiler" >&6; }
5756   if test -z "$AR"; then
5757     if test $gl_cv_c_amsterdam_compiler = yes; then
5758       AR='cc -c.a'
5759       if test -z "$ARFLAGS"; then
5760         ARFLAGS='-o'
5761       fi
5762     else
5763                   if test -n "$ac_tool_prefix"; then
5764   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
5765 set dummy ${ac_tool_prefix}ar; ac_word=$2
5766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5767 $as_echo_n "checking for $ac_word... " >&6; }
5768 if ${ac_cv_prog_AR+:} false; then :
5769   $as_echo_n "(cached) " >&6
5770 else
5771   if test -n "$AR"; then
5772   ac_cv_prog_AR="$AR" # Let the user override the test.
5773 else
5774 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5775 for as_dir in $PATH
5776 do
5777   IFS=$as_save_IFS
5778   test -z "$as_dir" && as_dir=.
5779     for ac_exec_ext in '' $ac_executable_extensions; do
5780   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5781     ac_cv_prog_AR="${ac_tool_prefix}ar"
5782     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5783     break 2
5784   fi
5785 done
5786   done
5787 IFS=$as_save_IFS
5788
5789 fi
5790 fi
5791 AR=$ac_cv_prog_AR
5792 if test -n "$AR"; then
5793   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5794 $as_echo "$AR" >&6; }
5795 else
5796   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5797 $as_echo "no" >&6; }
5798 fi
5799
5800
5801 fi
5802 if test -z "$ac_cv_prog_AR"; then
5803   ac_ct_AR=$AR
5804   # Extract the first word of "ar", so it can be a program name with args.
5805 set dummy ar; ac_word=$2
5806 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5807 $as_echo_n "checking for $ac_word... " >&6; }
5808 if ${ac_cv_prog_ac_ct_AR+:} false; then :
5809   $as_echo_n "(cached) " >&6
5810 else
5811   if test -n "$ac_ct_AR"; then
5812   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5813 else
5814 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5815 for as_dir in $PATH
5816 do
5817   IFS=$as_save_IFS
5818   test -z "$as_dir" && as_dir=.
5819     for ac_exec_ext in '' $ac_executable_extensions; do
5820   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5821     ac_cv_prog_ac_ct_AR="ar"
5822     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5823     break 2
5824   fi
5825 done
5826   done
5827 IFS=$as_save_IFS
5828
5829 fi
5830 fi
5831 ac_ct_AR=$ac_cv_prog_ac_ct_AR
5832 if test -n "$ac_ct_AR"; then
5833   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5834 $as_echo "$ac_ct_AR" >&6; }
5835 else
5836   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5837 $as_echo "no" >&6; }
5838 fi
5839
5840   if test "x$ac_ct_AR" = x; then
5841     AR="ar"
5842   else
5843     case $cross_compiling:$ac_tool_warned in
5844 yes:)
5845 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5846 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5847 ac_tool_warned=yes ;;
5848 esac
5849     AR=$ac_ct_AR
5850   fi
5851 else
5852   AR="$ac_cv_prog_AR"
5853 fi
5854
5855       if test -z "$ARFLAGS"; then
5856         ARFLAGS='cru'
5857       fi
5858     fi
5859   else
5860     if test -z "$ARFLAGS"; then
5861       ARFLAGS='cru'
5862     fi
5863   fi
5864
5865
5866   if test -z "$RANLIB"; then
5867     if test $gl_cv_c_amsterdam_compiler = yes; then
5868       RANLIB=':'
5869     else
5870             if test -n "$ac_tool_prefix"; then
5871   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5872 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
5873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5874 $as_echo_n "checking for $ac_word... " >&6; }
5875 if ${ac_cv_prog_RANLIB+:} false; then :
5876   $as_echo_n "(cached) " >&6
5877 else
5878   if test -n "$RANLIB"; then
5879   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5880 else
5881 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5882 for as_dir in $PATH
5883 do
5884   IFS=$as_save_IFS
5885   test -z "$as_dir" && as_dir=.
5886     for ac_exec_ext in '' $ac_executable_extensions; do
5887   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5888     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5889     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5890     break 2
5891   fi
5892 done
5893   done
5894 IFS=$as_save_IFS
5895
5896 fi
5897 fi
5898 RANLIB=$ac_cv_prog_RANLIB
5899 if test -n "$RANLIB"; then
5900   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5901 $as_echo "$RANLIB" >&6; }
5902 else
5903   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5904 $as_echo "no" >&6; }
5905 fi
5906
5907
5908 fi
5909 if test -z "$ac_cv_prog_RANLIB"; then
5910   ac_ct_RANLIB=$RANLIB
5911   # Extract the first word of "ranlib", so it can be a program name with args.
5912 set dummy ranlib; ac_word=$2
5913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5914 $as_echo_n "checking for $ac_word... " >&6; }
5915 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
5916   $as_echo_n "(cached) " >&6
5917 else
5918   if test -n "$ac_ct_RANLIB"; then
5919   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5920 else
5921 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5922 for as_dir in $PATH
5923 do
5924   IFS=$as_save_IFS
5925   test -z "$as_dir" && as_dir=.
5926     for ac_exec_ext in '' $ac_executable_extensions; do
5927   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5928     ac_cv_prog_ac_ct_RANLIB="ranlib"
5929     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5930     break 2
5931   fi
5932 done
5933   done
5934 IFS=$as_save_IFS
5935
5936 fi
5937 fi
5938 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5939 if test -n "$ac_ct_RANLIB"; then
5940   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5941 $as_echo "$ac_ct_RANLIB" >&6; }
5942 else
5943   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5944 $as_echo "no" >&6; }
5945 fi
5946
5947   if test "x$ac_ct_RANLIB" = x; then
5948     RANLIB=":"
5949   else
5950     case $cross_compiling:$ac_tool_warned in
5951 yes:)
5952 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5953 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5954 ac_tool_warned=yes ;;
5955 esac
5956     RANLIB=$ac_ct_RANLIB
5957   fi
5958 else
5959   RANLIB="$ac_cv_prog_RANLIB"
5960 fi
5961
5962     fi
5963   fi
5964
5965
5966
5967 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5968 $as_echo_n "checking for ANSI C header files... " >&6; }
5969 if ${ac_cv_header_stdc+:} false; then :
5970   $as_echo_n "(cached) " >&6
5971 else
5972   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5973 /* end confdefs.h.  */
5974 #include <stdlib.h>
5975 #include <stdarg.h>
5976 #include <string.h>
5977 #include <float.h>
5978
5979 int
5980 main ()
5981 {
5982
5983   ;
5984   return 0;
5985 }
5986 _ACEOF
5987 if ac_fn_c_try_compile "$LINENO"; then :
5988   ac_cv_header_stdc=yes
5989 else
5990   ac_cv_header_stdc=no
5991 fi
5992 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5993
5994 if test $ac_cv_header_stdc = yes; then
5995   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5996   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5997 /* end confdefs.h.  */
5998 #include <string.h>
5999
6000 _ACEOF
6001 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6002   $EGREP "memchr" >/dev/null 2>&1; then :
6003
6004 else
6005   ac_cv_header_stdc=no
6006 fi
6007 rm -f conftest*
6008
6009 fi
6010
6011 if test $ac_cv_header_stdc = yes; then
6012   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6013   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6014 /* end confdefs.h.  */
6015 #include <stdlib.h>
6016
6017 _ACEOF
6018 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6019   $EGREP "free" >/dev/null 2>&1; then :
6020
6021 else
6022   ac_cv_header_stdc=no
6023 fi
6024 rm -f conftest*
6025
6026 fi
6027
6028 if test $ac_cv_header_stdc = yes; then
6029   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6030   if test "$cross_compiling" = yes; then :
6031   :
6032 else
6033   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6034 /* end confdefs.h.  */
6035 #include <ctype.h>
6036 #include <stdlib.h>
6037 #if ((' ' & 0x0FF) == 0x020)
6038 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6039 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6040 #else
6041 # define ISLOWER(c) \
6042                    (('a' <= (c) && (c) <= 'i') \
6043                      || ('j' <= (c) && (c) <= 'r') \
6044                      || ('s' <= (c) && (c) <= 'z'))
6045 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6046 #endif
6047
6048 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6049 int
6050 main ()
6051 {
6052   int i;
6053   for (i = 0; i < 256; i++)
6054     if (XOR (islower (i), ISLOWER (i))
6055         || toupper (i) != TOUPPER (i))
6056       return 2;
6057   return 0;
6058 }
6059 _ACEOF
6060 if ac_fn_c_try_run "$LINENO"; then :
6061
6062 else
6063   ac_cv_header_stdc=no
6064 fi
6065 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6066   conftest.$ac_objext conftest.beam conftest.$ac_ext
6067 fi
6068
6069 fi
6070 fi
6071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6072 $as_echo "$ac_cv_header_stdc" >&6; }
6073 if test $ac_cv_header_stdc = yes; then
6074
6075 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
6076
6077 fi
6078
6079 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
6080 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
6081                   inttypes.h stdint.h unistd.h
6082 do :
6083   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6084 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
6085 "
6086 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6087   cat >>confdefs.h <<_ACEOF
6088 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6089 _ACEOF
6090
6091 fi
6092
6093 done
6094
6095
6096
6097   ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
6098 if test "x$ac_cv_header_minix_config_h" = xyes; then :
6099   MINIX=yes
6100 else
6101   MINIX=
6102 fi
6103
6104
6105   if test "$MINIX" = yes; then
6106
6107 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
6108
6109
6110 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
6111
6112
6113 $as_echo "#define _MINIX 1" >>confdefs.h
6114
6115
6116 $as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
6117
6118   fi
6119
6120
6121   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
6122 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
6123 if ${ac_cv_safe_to_define___extensions__+:} false; then :
6124   $as_echo_n "(cached) " >&6
6125 else
6126   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6127 /* end confdefs.h.  */
6128
6129 #         define __EXTENSIONS__ 1
6130           $ac_includes_default
6131 int
6132 main ()
6133 {
6134
6135   ;
6136   return 0;
6137 }
6138 _ACEOF
6139 if ac_fn_c_try_compile "$LINENO"; then :
6140   ac_cv_safe_to_define___extensions__=yes
6141 else
6142   ac_cv_safe_to_define___extensions__=no
6143 fi
6144 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6145 fi
6146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
6147 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
6148   test $ac_cv_safe_to_define___extensions__ = yes &&
6149     $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
6150
6151   $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
6152
6153   $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
6154
6155   $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
6156
6157   $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
6158
6159   $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
6160
6161   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
6162 $as_echo_n "checking whether _XOPEN_SOURCE should be defined... " >&6; }
6163 if ${ac_cv_should_define__xopen_source+:} false; then :
6164   $as_echo_n "(cached) " >&6
6165 else
6166   ac_cv_should_define__xopen_source=no
6167      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6168 /* end confdefs.h.  */
6169
6170           #include <wchar.h>
6171           mbstate_t x;
6172 int
6173 main ()
6174 {
6175
6176   ;
6177   return 0;
6178 }
6179 _ACEOF
6180 if ac_fn_c_try_compile "$LINENO"; then :
6181
6182 else
6183   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6184 /* end confdefs.h.  */
6185
6186              #define _XOPEN_SOURCE 500
6187              #include <wchar.h>
6188              mbstate_t x;
6189 int
6190 main ()
6191 {
6192
6193   ;
6194   return 0;
6195 }
6196 _ACEOF
6197 if ac_fn_c_try_compile "$LINENO"; then :
6198   ac_cv_should_define__xopen_source=yes
6199 fi
6200 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6201 fi
6202 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6203 fi
6204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
6205 $as_echo "$ac_cv_should_define__xopen_source" >&6; }
6206   test $ac_cv_should_define__xopen_source = yes &&
6207     $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
6208
6209
6210
6211
6212
6213
6214
6215
6216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
6217 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
6218 if ${ac_cv_sys_largefile_source+:} false; then :
6219   $as_echo_n "(cached) " >&6
6220 else
6221   while :; do
6222   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6223 /* end confdefs.h.  */
6224 #include <sys/types.h> /* for off_t */
6225      #include <stdio.h>
6226 int
6227 main ()
6228 {
6229 int (*fp) (FILE *, off_t, int) = fseeko;
6230      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
6231   ;
6232   return 0;
6233 }
6234 _ACEOF
6235 if ac_fn_c_try_link "$LINENO"; then :
6236   ac_cv_sys_largefile_source=no; break
6237 fi
6238 rm -f core conftest.err conftest.$ac_objext \
6239     conftest$ac_exeext conftest.$ac_ext
6240   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6241 /* end confdefs.h.  */
6242 #define _LARGEFILE_SOURCE 1
6243 #include <sys/types.h> /* for off_t */
6244      #include <stdio.h>
6245 int
6246 main ()
6247 {
6248 int (*fp) (FILE *, off_t, int) = fseeko;
6249      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
6250   ;
6251   return 0;
6252 }
6253 _ACEOF
6254 if ac_fn_c_try_link "$LINENO"; then :
6255   ac_cv_sys_largefile_source=1; break
6256 fi
6257 rm -f core conftest.err conftest.$ac_objext \
6258     conftest$ac_exeext conftest.$ac_ext
6259   ac_cv_sys_largefile_source=unknown
6260   break
6261 done
6262 fi
6263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
6264 $as_echo "$ac_cv_sys_largefile_source" >&6; }
6265 case $ac_cv_sys_largefile_source in #(
6266   no | unknown) ;;
6267   *)
6268 cat >>confdefs.h <<_ACEOF
6269 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
6270 _ACEOF
6271 ;;
6272 esac
6273 rm -rf conftest*
6274
6275 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
6276 # in glibc 2.1.3, but that breaks too many other things.
6277 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
6278 if test $ac_cv_sys_largefile_source != unknown; then
6279
6280 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
6281
6282 fi
6283
6284 # Check whether --enable-largefile was given.
6285 if test "${enable_largefile+set}" = set; then :
6286   enableval=$enable_largefile;
6287 fi
6288
6289 if test "$enable_largefile" != no; then
6290
6291   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
6292 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
6293 if ${ac_cv_sys_largefile_CC+:} false; then :
6294   $as_echo_n "(cached) " >&6
6295 else
6296   ac_cv_sys_largefile_CC=no
6297      if test "$GCC" != yes; then
6298        ac_save_CC=$CC
6299        while :; do
6300          # IRIX 6.2 and later do not support large files by default,
6301          # so use the C compiler's -n32 option if that helps.
6302          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6303 /* end confdefs.h.  */
6304 #include <sys/types.h>
6305  /* Check that off_t can represent 2**63 - 1 correctly.
6306     We can't simply define LARGE_OFF_T to be 9223372036854775807,
6307     since some C++ compilers masquerading as C compilers
6308     incorrectly reject 9223372036854775807.  */
6309 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6310   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6311                        && LARGE_OFF_T % 2147483647 == 1)
6312                       ? 1 : -1];
6313 int
6314 main ()
6315 {
6316
6317   ;
6318   return 0;
6319 }
6320 _ACEOF
6321          if ac_fn_c_try_compile "$LINENO"; then :
6322   break
6323 fi
6324 rm -f core conftest.err conftest.$ac_objext
6325          CC="$CC -n32"
6326          if ac_fn_c_try_compile "$LINENO"; then :
6327   ac_cv_sys_largefile_CC=' -n32'; break
6328 fi
6329 rm -f core conftest.err conftest.$ac_objext
6330          break
6331        done
6332        CC=$ac_save_CC
6333        rm -f conftest.$ac_ext
6334     fi
6335 fi
6336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
6337 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
6338   if test "$ac_cv_sys_largefile_CC" != no; then
6339     CC=$CC$ac_cv_sys_largefile_CC
6340   fi
6341
6342   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
6343 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
6344 if ${ac_cv_sys_file_offset_bits+:} false; then :
6345   $as_echo_n "(cached) " >&6
6346 else
6347   while :; do
6348   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6349 /* end confdefs.h.  */
6350 #include <sys/types.h>
6351  /* Check that off_t can represent 2**63 - 1 correctly.
6352     We can't simply define LARGE_OFF_T to be 9223372036854775807,
6353     since some C++ compilers masquerading as C compilers
6354     incorrectly reject 9223372036854775807.  */
6355 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6356   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6357                        && LARGE_OFF_T % 2147483647 == 1)
6358                       ? 1 : -1];
6359 int
6360 main ()
6361 {
6362
6363   ;
6364   return 0;
6365 }
6366 _ACEOF
6367 if ac_fn_c_try_compile "$LINENO"; then :
6368   ac_cv_sys_file_offset_bits=no; break
6369 fi
6370 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6371   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6372 /* end confdefs.h.  */
6373 #define _FILE_OFFSET_BITS 64
6374 #include <sys/types.h>
6375  /* Check that off_t can represent 2**63 - 1 correctly.
6376     We can't simply define LARGE_OFF_T to be 9223372036854775807,
6377     since some C++ compilers masquerading as C compilers
6378     incorrectly reject 9223372036854775807.  */
6379 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6380   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6381                        && LARGE_OFF_T % 2147483647 == 1)
6382                       ? 1 : -1];
6383 int
6384 main ()
6385 {
6386
6387   ;
6388   return 0;
6389 }
6390 _ACEOF
6391 if ac_fn_c_try_compile "$LINENO"; then :
6392   ac_cv_sys_file_offset_bits=64; break
6393 fi
6394 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6395   ac_cv_sys_file_offset_bits=unknown
6396   break
6397 done
6398 fi
6399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
6400 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
6401 case $ac_cv_sys_file_offset_bits in #(
6402   no | unknown) ;;
6403   *)
6404 cat >>confdefs.h <<_ACEOF
6405 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
6406 _ACEOF
6407 ;;
6408 esac
6409 rm -rf conftest*
6410   if test $ac_cv_sys_file_offset_bits = unknown; then
6411     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
6412 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
6413 if ${ac_cv_sys_large_files+:} false; then :
6414   $as_echo_n "(cached) " >&6
6415 else
6416   while :; do
6417   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6418 /* end confdefs.h.  */
6419 #include <sys/types.h>
6420  /* Check that off_t can represent 2**63 - 1 correctly.
6421     We can't simply define LARGE_OFF_T to be 9223372036854775807,
6422     since some C++ compilers masquerading as C compilers
6423     incorrectly reject 9223372036854775807.  */
6424 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6425   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6426                        && LARGE_OFF_T % 2147483647 == 1)
6427                       ? 1 : -1];
6428 int
6429 main ()
6430 {
6431
6432   ;
6433   return 0;
6434 }
6435 _ACEOF
6436 if ac_fn_c_try_compile "$LINENO"; then :
6437   ac_cv_sys_large_files=no; break
6438 fi
6439 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6440   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6441 /* end confdefs.h.  */
6442 #define _LARGE_FILES 1
6443 #include <sys/types.h>
6444  /* Check that off_t can represent 2**63 - 1 correctly.
6445     We can't simply define LARGE_OFF_T to be 9223372036854775807,
6446     since some C++ compilers masquerading as C compilers
6447     incorrectly reject 9223372036854775807.  */
6448 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6449   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6450                        && LARGE_OFF_T % 2147483647 == 1)
6451                       ? 1 : -1];
6452 int
6453 main ()
6454 {
6455
6456   ;
6457   return 0;
6458 }
6459 _ACEOF
6460 if ac_fn_c_try_compile "$LINENO"; then :
6461   ac_cv_sys_large_files=1; break
6462 fi
6463 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6464   ac_cv_sys_large_files=unknown
6465   break
6466 done
6467 fi
6468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
6469 $as_echo "$ac_cv_sys_large_files" >&6; }
6470 case $ac_cv_sys_large_files in #(
6471   no | unknown) ;;
6472   *)
6473 cat >>confdefs.h <<_ACEOF
6474 #define _LARGE_FILES $ac_cv_sys_large_files
6475 _ACEOF
6476 ;;
6477 esac
6478 rm -rf conftest*
6479   fi
6480
6481
6482 $as_echo "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h
6483
6484 fi
6485
6486    case $ac_cv_prog_cc_stdc in #(
6487   no) :
6488     ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #(
6489   *) :
6490     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
6491 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
6492 if ${ac_cv_prog_cc_c99+:} false; then :
6493   $as_echo_n "(cached) " >&6
6494 else
6495   ac_cv_prog_cc_c99=no
6496 ac_save_CC=$CC
6497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6498 /* end confdefs.h.  */
6499 #include <stdarg.h>
6500 #include <stdbool.h>
6501 #include <stdlib.h>
6502 #include <wchar.h>
6503 #include <stdio.h>
6504
6505 // Check varargs macros.  These examples are taken from C99 6.10.3.5.
6506 #define debug(...) fprintf (stderr, __VA_ARGS__)
6507 #define showlist(...) puts (#__VA_ARGS__)
6508 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
6509 static void
6510 test_varargs_macros (void)
6511 {
6512   int x = 1234;
6513   int y = 5678;
6514   debug ("Flag");
6515   debug ("X = %d\n", x);
6516   showlist (The first, second, and third items.);
6517   report (x>y, "x is %d but y is %d", x, y);
6518 }
6519
6520 // Check long long types.
6521 #define BIG64 18446744073709551615ull
6522 #define BIG32 4294967295ul
6523 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
6524 #if !BIG_OK
6525   your preprocessor is broken;
6526 #endif
6527 #if BIG_OK
6528 #else
6529   your preprocessor is broken;
6530 #endif
6531 static long long int bignum = -9223372036854775807LL;
6532 static unsigned long long int ubignum = BIG64;
6533
6534 struct incomplete_array
6535 {
6536   int datasize;
6537   double data[];
6538 };
6539
6540 struct named_init {
6541   int number;
6542   const wchar_t *name;
6543   double average;
6544 };
6545
6546 typedef const char *ccp;
6547
6548 static inline int
6549 test_restrict (ccp restrict text)
6550 {
6551   // See if C++-style comments work.
6552   // Iterate through items via the restricted pointer.
6553   // Also check for declarations in for loops.
6554   for (unsigned int i = 0; *(text+i) != '\0'; ++i)
6555     continue;
6556   return 0;
6557 }
6558
6559 // Check varargs and va_copy.
6560 static void
6561 test_varargs (const char *format, ...)
6562 {
6563   va_list args;
6564   va_start (args, format);
6565   va_list args_copy;
6566   va_copy (args_copy, args);
6567
6568   const char *str;
6569   int number;
6570   float fnumber;
6571
6572   while (*format)
6573     {
6574       switch (*format++)
6575         {
6576         case 's': // string
6577           str = va_arg (args_copy, const char *);
6578           break;
6579         case 'd': // int
6580           number = va_arg (args_copy, int);
6581           break;
6582         case 'f': // float
6583           fnumber = va_arg (args_copy, double);
6584           break;
6585         default:
6586           break;
6587         }
6588     }
6589   va_end (args_copy);
6590   va_end (args);
6591 }
6592
6593 int
6594 main ()
6595 {
6596
6597   // Check bool.
6598   _Bool success = false;
6599
6600   // Check restrict.
6601   if (test_restrict ("String literal") == 0)
6602     success = true;
6603   char *restrict newvar = "Another string";
6604
6605   // Check varargs.
6606   test_varargs ("s, d' f .", "string", 65, 34.234);
6607   test_varargs_macros ();
6608
6609   // Check flexible array members.
6610   struct incomplete_array *ia =
6611     malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
6612   ia->datasize = 10;
6613   for (int i = 0; i < ia->datasize; ++i)
6614     ia->data[i] = i * 1.234;
6615
6616   // Check named initializers.
6617   struct named_init ni = {
6618     .number = 34,
6619     .name = L"Test wide string",
6620     .average = 543.34343,
6621   };
6622
6623   ni.number = 58;
6624
6625   int dynamic_array[ni.number];
6626   dynamic_array[ni.number - 1] = 543;
6627
6628   // work around unused variable warnings
6629   return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
6630           || dynamic_array[ni.number - 1] != 543);
6631
6632   ;
6633   return 0;
6634 }
6635 _ACEOF
6636 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
6637 do
6638   CC="$ac_save_CC $ac_arg"
6639   if ac_fn_c_try_compile "$LINENO"; then :
6640   ac_cv_prog_cc_c99=$ac_arg
6641 fi
6642 rm -f core conftest.err conftest.$ac_objext
6643   test "x$ac_cv_prog_cc_c99" != "xno" && break
6644 done
6645 rm -f conftest.$ac_ext
6646 CC=$ac_save_CC
6647
6648 fi
6649 # AC_CACHE_VAL
6650 case "x$ac_cv_prog_cc_c99" in
6651   x)
6652     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6653 $as_echo "none needed" >&6; } ;;
6654   xno)
6655     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6656 $as_echo "unsupported" >&6; } ;;
6657   *)
6658     CC="$CC $ac_cv_prog_cc_c99"
6659     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
6660 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
6661 esac
6662 if test "x$ac_cv_prog_cc_c99" != xno; then :
6663   ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
6664 else
6665   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
6666 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
6667 if ${ac_cv_prog_cc_c89+:} false; then :
6668   $as_echo_n "(cached) " >&6
6669 else
6670   ac_cv_prog_cc_c89=no
6671 ac_save_CC=$CC
6672 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6673 /* end confdefs.h.  */
6674 #include <stdarg.h>
6675 #include <stdio.h>
6676 struct stat;
6677 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
6678 struct buf { int x; };
6679 FILE * (*rcsopen) (struct buf *, struct stat *, int);
6680 static char *e (p, i)
6681      char **p;
6682      int i;
6683 {
6684   return p[i];
6685 }
6686 static char *f (char * (*g) (char **, int), char **p, ...)
6687 {
6688   char *s;
6689   va_list v;
6690   va_start (v,p);
6691   s = g (p, va_arg (v,int));
6692   va_end (v);
6693   return s;
6694 }
6695
6696 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
6697    function prototypes and stuff, but not '\xHH' hex character constants.
6698    These don't provoke an error unfortunately, instead are silently treated
6699    as 'x'.  The following induces an error, until -std is added to get
6700    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
6701    array size at least.  It's necessary to write '\x00'==0 to get something
6702    that's true only with -std.  */
6703 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
6704
6705 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
6706    inside strings and character constants.  */
6707 #define FOO(x) 'x'
6708 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
6709
6710 int test (int i, double x);
6711 struct s1 {int (*f) (int a);};
6712 struct s2 {int (*f) (double a);};
6713 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
6714 int argc;
6715 char **argv;
6716 int
6717 main ()
6718 {
6719 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
6720   ;
6721   return 0;
6722 }
6723 _ACEOF
6724 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
6725         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
6726 do
6727   CC="$ac_save_CC $ac_arg"
6728   if ac_fn_c_try_compile "$LINENO"; then :
6729   ac_cv_prog_cc_c89=$ac_arg
6730 fi
6731 rm -f core conftest.err conftest.$ac_objext
6732   test "x$ac_cv_prog_cc_c89" != "xno" && break
6733 done
6734 rm -f conftest.$ac_ext
6735 CC=$ac_save_CC
6736
6737 fi
6738 # AC_CACHE_VAL
6739 case "x$ac_cv_prog_cc_c89" in
6740   x)
6741     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6742 $as_echo "none needed" >&6; } ;;
6743   xno)
6744     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6745 $as_echo "unsupported" >&6; } ;;
6746   *)
6747     CC="$CC $ac_cv_prog_cc_c89"
6748     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
6749 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
6750 esac
6751 if test "x$ac_cv_prog_cc_c89" != xno; then :
6752   ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
6753 else
6754   ac_cv_prog_cc_stdc=no
6755 fi
6756
6757 fi
6758  ;;
6759 esac
6760   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5
6761 $as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; }
6762   if ${ac_cv_prog_cc_stdc+:} false; then :
6763   $as_echo_n "(cached) " >&6
6764 fi
6765
6766   case $ac_cv_prog_cc_stdc in #(
6767   no) :
6768     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6769 $as_echo "unsupported" >&6; } ;; #(
6770   '') :
6771     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6772 $as_echo "none needed" >&6; } ;; #(
6773   *) :
6774     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5
6775 $as_echo "$ac_cv_prog_cc_stdc" >&6; } ;;
6776 esac
6777
6778
6779
6780
6781   # Code from module acl:
6782   # Code from module alloca:
6783   # Code from module alloca-opt:
6784   # Code from module allocator:
6785   # Code from module areadlink:
6786   # Code from module areadlinkat:
6787   # Code from module argmatch:
6788   # Code from module argp:
6789   # Code from module argp-version-etc:
6790   # Code from module at-internal:
6791   # Code from module backupfile:
6792   # Code from module bitrotate:
6793   # Code from module btowc:
6794   # Code from module c-ctype:
6795   # Code from module c-strcase:
6796   # Code from module c-strcaseeq:
6797   # Code from module canonicalize-lgpl:
6798   # Code from module careadlinkat:
6799   # Code from module chdir:
6800   # Code from module chdir-long:
6801   # Code from module chown:
6802   # Code from module clock-time:
6803   # Code from module cloexec:
6804   # Code from module close:
6805   # Code from module close-stream:
6806   # Code from module closedir:
6807   # Code from module closeout:
6808   # Code from module configmake:
6809   # Code from module d-ino:
6810   # Code from module dirent:
6811   # Code from module dirent-safer:
6812   # Code from module dirfd:
6813   # Code from module dirname:
6814   # Code from module dirname-lgpl:
6815   # Code from module dosname:
6816   # Code from module double-slash-root:
6817   # Code from module dup:
6818   # Code from module dup2:
6819   # Code from module environ:
6820   # Code from module errno:
6821   # Code from module error:
6822   # Code from module exclude:
6823   # Code from module exitfail:
6824   # Code from module extensions:
6825
6826   # Code from module extern-inline:
6827   # Code from module fchdir:
6828   # Code from module fchmodat:
6829   # Code from module fchownat:
6830   # Code from module fcntl:
6831   # Code from module fcntl-h:
6832   # Code from module fd-hook:
6833   # Code from module fdopendir:
6834   # Code from module fdutimensat:
6835   # Code from module fileblocks:
6836   # Code from module filename:
6837   # Code from module filenamecat-lgpl:
6838   # Code from module float:
6839   # Code from module fnmatch:
6840   # Code from module fnmatch-gnu:
6841   # Code from module fpending:
6842   # Code from module fseek:
6843   # Code from module fseeko:
6844
6845   # Code from module fstat:
6846   # Code from module fstatat:
6847   # Code from module full-write:
6848   # Code from module futimens:
6849   # Code from module getcwd:
6850   # Code from module getcwd-lgpl:
6851   # Code from module getdelim:
6852   # Code from module getdtablesize:
6853   # Code from module getline:
6854   # Code from module getopt-gnu:
6855   # Code from module getopt-posix:
6856   # Code from module getpagesize:
6857   # Code from module gettext:
6858   # Code from module gettext-h:
6859   # Code from module gettime:
6860   # Code from module gettimeofday:
6861   # Code from module gitlog-to-changelog:
6862   # Code from module hash:
6863   # Code from module havelib:
6864   # Code from module human:
6865   # Code from module include_next:
6866   # Code from module intprops:
6867   # Code from module inttostr:
6868   # Code from module inttypes:
6869   # Code from module inttypes-incomplete:
6870   # Code from module iswblank:
6871   # Code from module langinfo:
6872   # Code from module largefile:
6873
6874   # Code from module lchown:
6875   # Code from module link:
6876   # Code from module link-follow:
6877   # Code from module linkat:
6878   # Code from module localcharset:
6879   # Code from module locale:
6880   # Code from module localeconv:
6881   # Code from module lseek:
6882   # Code from module lstat:
6883   # Code from module malloc-gnu:
6884   # Code from module malloc-posix:
6885   # Code from module malloca:
6886   # Code from module manywarnings:
6887   # Code from module mbchar:
6888   # Code from module mbrtowc:
6889   # Code from module mbscasecmp:
6890   # Code from module mbsinit:
6891   # Code from module mbsrtowcs:
6892   # Code from module mbtowc:
6893   # Code from module mbuiter:
6894   # Code from module memchr:
6895   # Code from module mempcpy:
6896   # Code from module memrchr:
6897   # Code from module mkdir:
6898   # Code from module mkdirat:
6899   # Code from module mkdtemp:
6900   # Code from module mkfifo:
6901   # Code from module mkfifoat:
6902   # Code from module mknod:
6903   # Code from module mktime:
6904   # Code from module modechange:
6905   # Code from module msvc-inval:
6906   # Code from module msvc-nothrow:
6907   # Code from module multiarch:
6908   # Code from module nl_langinfo:
6909   # Code from module nocrash:
6910   # Code from module obstack:
6911   # Code from module open:
6912   # Code from module openat:
6913   # Code from module openat-die:
6914   # Code from module openat-h:
6915   # Code from module opendir:
6916   # Code from module parse-datetime:
6917   # Code from module pathmax:
6918   # Code from module priv-set:
6919   # Code from module progname:
6920   # Code from module qacl:
6921   # Code from module quote:
6922   # Code from module quotearg:
6923   # Code from module quotearg-simple:
6924   # Code from module raise:
6925   # Code from module rawmemchr:
6926   # Code from module read:
6927   # Code from module readdir:
6928   # Code from module readlink:
6929   # Code from module readlinkat:
6930   # Code from module realloc-posix:
6931   # Code from module regex:
6932   # Code from module rename:
6933   # Code from module renameat:
6934   # Code from module rewinddir:
6935   # Code from module rmdir:
6936   # Code from module root-uid:
6937   # Code from module rpmatch:
6938   # Code from module safe-read:
6939   # Code from module safe-write:
6940   # Code from module same-inode:
6941   # Code from module save-cwd:
6942   # Code from module savedir:
6943   # Code from module secure_getenv:
6944   # Code from module selinux-at:
6945   # Code from module selinux-h:
6946   # Code from module setenv:
6947   # Code from module signal-h:
6948   # Code from module size_max:
6949   # Code from module sleep:
6950   # Code from module snippet/_Noreturn:
6951   # Code from module snippet/arg-nonnull:
6952   # Code from module snippet/c++defs:
6953   # Code from module snippet/unused-parameter:
6954   # Code from module snippet/warn-on-use:
6955   # Code from module snprintf:
6956   # Code from module ssize_t:
6957   # Code from module stat:
6958   # Code from module stat-macros:
6959   # Code from module stat-time:
6960   # Code from module statat:
6961   # Code from module stdalign:
6962   # Code from module stdarg:
6963
6964
6965
6966   # Code from module stdbool:
6967   # Code from module stddef:
6968   # Code from module stdint:
6969   # Code from module stdio:
6970   # Code from module stdlib:
6971   # Code from module stpcpy:
6972   # Code from module strcase:
6973   # Code from module strchrnul:
6974   # Code from module strdup-posix:
6975   # Code from module streq:
6976   # Code from module strerror:
6977   # Code from module strerror-override:
6978   # Code from module string:
6979   # Code from module strings:
6980   # Code from module strndup:
6981   # Code from module strnlen:
6982   # Code from module strnlen1:
6983   # Code from module strtol:
6984   # Code from module strtoul:
6985   # Code from module strtoull:
6986   # Code from module strtoumax:
6987   # Code from module symlink:
6988   # Code from module symlinkat:
6989   # Code from module sys_stat:
6990   # Code from module sys_time:
6991   # Code from module sys_types:
6992   # Code from module sysexits:
6993   # Code from module tempname:
6994   # Code from module time:
6995   # Code from module time_r:
6996   # Code from module timespec:
6997   # Code from module unistd:
6998   # Code from module unistd-safer:
6999   # Code from module unitypes:
7000   # Code from module uniwidth/base:
7001   # Code from module uniwidth/width:
7002   # Code from module unlink:
7003   # Code from module unlinkat:
7004   # Code from module unlinkdir:
7005   # Code from module unlocked-io:
7006   # Code from module unsetenv:
7007   # Code from module utimens:
7008   # Code from module utimensat:
7009   # Code from module vasnprintf:
7010   # Code from module vasprintf:
7011   # Code from module verify:
7012   # Code from module version-etc:
7013   # Code from module version-etc-fsf:
7014   # Code from module vsnprintf:
7015   # Code from module warnings:
7016   # Code from module wchar:
7017   # Code from module wcrtomb:
7018   # Code from module wctype-h:
7019   # Code from module wcwidth:
7020   # Code from module write:
7021   # Code from module xalloc:
7022   # Code from module xalloc-die:
7023   # Code from module xalloc-oversized:
7024   # Code from module xgetcwd:
7025   # Code from module xsize:
7026   # Code from module xstrndup:
7027   # Code from module xstrtol:
7028   # Code from module xstrtoumax:
7029   # Code from module xvasprintf:
7030
7031
7032 # Check whether --enable-largefile was given.
7033 if test "${enable_largefile+set}" = set; then :
7034   enableval=$enable_largefile;
7035 fi
7036
7037 if test "$enable_largefile" != no; then
7038
7039   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
7040 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
7041 if ${ac_cv_sys_largefile_CC+:} false; then :
7042   $as_echo_n "(cached) " >&6
7043 else
7044   ac_cv_sys_largefile_CC=no
7045      if test "$GCC" != yes; then
7046        ac_save_CC=$CC
7047        while :; do
7048          # IRIX 6.2 and later do not support large files by default,
7049          # so use the C compiler's -n32 option if that helps.
7050          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7051 /* end confdefs.h.  */
7052 #include <sys/types.h>
7053  /* Check that off_t can represent 2**63 - 1 correctly.
7054     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7055     since some C++ compilers masquerading as C compilers
7056     incorrectly reject 9223372036854775807.  */
7057 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7058   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7059                        && LARGE_OFF_T % 2147483647 == 1)
7060                       ? 1 : -1];
7061 int
7062 main ()
7063 {
7064
7065   ;
7066   return 0;
7067 }
7068 _ACEOF
7069          if ac_fn_c_try_compile "$LINENO"; then :
7070   break
7071 fi
7072 rm -f core conftest.err conftest.$ac_objext
7073          CC="$CC -n32"
7074          if ac_fn_c_try_compile "$LINENO"; then :
7075   ac_cv_sys_largefile_CC=' -n32'; break
7076 fi
7077 rm -f core conftest.err conftest.$ac_objext
7078          break
7079        done
7080        CC=$ac_save_CC
7081        rm -f conftest.$ac_ext
7082     fi
7083 fi
7084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
7085 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
7086   if test "$ac_cv_sys_largefile_CC" != no; then
7087     CC=$CC$ac_cv_sys_largefile_CC
7088   fi
7089
7090   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
7091 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
7092 if ${ac_cv_sys_file_offset_bits+:} false; then :
7093   $as_echo_n "(cached) " >&6
7094 else
7095   while :; do
7096   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7097 /* end confdefs.h.  */
7098 #include <sys/types.h>
7099  /* Check that off_t can represent 2**63 - 1 correctly.
7100     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7101     since some C++ compilers masquerading as C compilers
7102     incorrectly reject 9223372036854775807.  */
7103 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7104   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7105                        && LARGE_OFF_T % 2147483647 == 1)
7106                       ? 1 : -1];
7107 int
7108 main ()
7109 {
7110
7111   ;
7112   return 0;
7113 }
7114 _ACEOF
7115 if ac_fn_c_try_compile "$LINENO"; then :
7116   ac_cv_sys_file_offset_bits=no; break
7117 fi
7118 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7119   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7120 /* end confdefs.h.  */
7121 #define _FILE_OFFSET_BITS 64
7122 #include <sys/types.h>
7123  /* Check that off_t can represent 2**63 - 1 correctly.
7124     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7125     since some C++ compilers masquerading as C compilers
7126     incorrectly reject 9223372036854775807.  */
7127 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7128   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7129                        && LARGE_OFF_T % 2147483647 == 1)
7130                       ? 1 : -1];
7131 int
7132 main ()
7133 {
7134
7135   ;
7136   return 0;
7137 }
7138 _ACEOF
7139 if ac_fn_c_try_compile "$LINENO"; then :
7140   ac_cv_sys_file_offset_bits=64; break
7141 fi
7142 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7143   ac_cv_sys_file_offset_bits=unknown
7144   break
7145 done
7146 fi
7147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
7148 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
7149 case $ac_cv_sys_file_offset_bits in #(
7150   no | unknown) ;;
7151   *)
7152 cat >>confdefs.h <<_ACEOF
7153 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
7154 _ACEOF
7155 ;;
7156 esac
7157 rm -rf conftest*
7158   if test $ac_cv_sys_file_offset_bits = unknown; then
7159     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
7160 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
7161 if ${ac_cv_sys_large_files+:} false; then :
7162   $as_echo_n "(cached) " >&6
7163 else
7164   while :; do
7165   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7166 /* end confdefs.h.  */
7167 #include <sys/types.h>
7168  /* Check that off_t can represent 2**63 - 1 correctly.
7169     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7170     since some C++ compilers masquerading as C compilers
7171     incorrectly reject 9223372036854775807.  */
7172 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7173   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7174                        && LARGE_OFF_T % 2147483647 == 1)
7175                       ? 1 : -1];
7176 int
7177 main ()
7178 {
7179
7180   ;
7181   return 0;
7182 }
7183 _ACEOF
7184 if ac_fn_c_try_compile "$LINENO"; then :
7185   ac_cv_sys_large_files=no; break
7186 fi
7187 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7188   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7189 /* end confdefs.h.  */
7190 #define _LARGE_FILES 1
7191 #include <sys/types.h>
7192  /* Check that off_t can represent 2**63 - 1 correctly.
7193     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7194     since some C++ compilers masquerading as C compilers
7195     incorrectly reject 9223372036854775807.  */
7196 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7197   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7198                        && LARGE_OFF_T % 2147483647 == 1)
7199                       ? 1 : -1];
7200 int
7201 main ()
7202 {
7203
7204   ;
7205   return 0;
7206 }
7207 _ACEOF
7208 if ac_fn_c_try_compile "$LINENO"; then :
7209   ac_cv_sys_large_files=1; break
7210 fi
7211 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7212   ac_cv_sys_large_files=unknown
7213   break
7214 done
7215 fi
7216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
7217 $as_echo "$ac_cv_sys_large_files" >&6; }
7218 case $ac_cv_sys_large_files in #(
7219   no | unknown) ;;
7220   *)
7221 cat >>confdefs.h <<_ACEOF
7222 #define _LARGE_FILES $ac_cv_sys_large_files
7223 _ACEOF
7224 ;;
7225 esac
7226 rm -rf conftest*
7227   fi
7228
7229
7230 $as_echo "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h
7231
7232 fi
7233
7234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5
7235 $as_echo_n "checking for library containing strerror... " >&6; }
7236 if ${ac_cv_search_strerror+:} false; then :
7237   $as_echo_n "(cached) " >&6
7238 else
7239   ac_func_search_save_LIBS=$LIBS
7240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7241 /* end confdefs.h.  */
7242
7243 /* Override any GCC internal prototype to avoid an error.
7244    Use char because int might match the return type of a GCC
7245    builtin and then its argument prototype would still apply.  */
7246 #ifdef __cplusplus
7247 extern "C"
7248 #endif
7249 char strerror ();
7250 int
7251 main ()
7252 {
7253 return strerror ();
7254   ;
7255   return 0;
7256 }
7257 _ACEOF
7258 for ac_lib in '' cposix; do
7259   if test -z "$ac_lib"; then
7260     ac_res="none required"
7261   else
7262     ac_res=-l$ac_lib
7263     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7264   fi
7265   if ac_fn_c_try_link "$LINENO"; then :
7266   ac_cv_search_strerror=$ac_res
7267 fi
7268 rm -f core conftest.err conftest.$ac_objext \
7269     conftest$ac_exeext
7270   if ${ac_cv_search_strerror+:} false; then :
7271   break
7272 fi
7273 done
7274 if ${ac_cv_search_strerror+:} false; then :
7275
7276 else
7277   ac_cv_search_strerror=no
7278 fi
7279 rm conftest.$ac_ext
7280 LIBS=$ac_func_search_save_LIBS
7281 fi
7282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_strerror" >&5
7283 $as_echo "$ac_cv_search_strerror" >&6; }
7284 ac_res=$ac_cv_search_strerror
7285 if test "$ac_res" != no; then :
7286   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7287
7288 fi
7289
7290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
7291 $as_echo_n "checking for inline... " >&6; }
7292 if ${ac_cv_c_inline+:} false; then :
7293   $as_echo_n "(cached) " >&6
7294 else
7295   ac_cv_c_inline=no
7296 for ac_kw in inline __inline__ __inline; do
7297   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7298 /* end confdefs.h.  */
7299 #ifndef __cplusplus
7300 typedef int foo_t;
7301 static $ac_kw foo_t static_foo () {return 0; }
7302 $ac_kw foo_t foo () {return 0; }
7303 #endif
7304
7305 _ACEOF
7306 if ac_fn_c_try_compile "$LINENO"; then :
7307   ac_cv_c_inline=$ac_kw
7308 fi
7309 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7310   test "$ac_cv_c_inline" != no && break
7311 done
7312
7313 fi
7314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
7315 $as_echo "$ac_cv_c_inline" >&6; }
7316
7317 case $ac_cv_c_inline in
7318   inline | yes) ;;
7319   *)
7320     case $ac_cv_c_inline in
7321       no) ac_val=;;
7322       *) ac_val=$ac_cv_c_inline;;
7323     esac
7324     cat >>confdefs.h <<_ACEOF
7325 #ifndef __cplusplus
7326 #define inline $ac_val
7327 #endif
7328 _ACEOF
7329     ;;
7330 esac
7331
7332
7333
7334
7335
7336   for ac_header in $ac_header_list
7337 do :
7338   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7339 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
7340 "
7341 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7342   cat >>confdefs.h <<_ACEOF
7343 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7344 _ACEOF
7345
7346 fi
7347
7348 done
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386 for ac_header in sys/buf.h
7387 do :
7388   ac_fn_c_check_header_compile "$LINENO" "sys/buf.h" "ac_cv_header_sys_buf_h" "#if HAVE_SYS_PARAM_H
7389 #include <sys/param.h>
7390 #endif
7391 "
7392 if test "x$ac_cv_header_sys_buf_h" = xyes; then :
7393   cat >>confdefs.h <<_ACEOF
7394 #define HAVE_SYS_BUF_H 1
7395 _ACEOF
7396
7397 fi
7398
7399 done
7400
7401
7402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
7403 $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
7404 if ${ac_cv_header_sys_wait_h+:} false; then :
7405   $as_echo_n "(cached) " >&6
7406 else
7407   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7408 /* end confdefs.h.  */
7409 #include <sys/types.h>
7410 #include <sys/wait.h>
7411 #ifndef WEXITSTATUS
7412 # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
7413 #endif
7414 #ifndef WIFEXITED
7415 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
7416 #endif
7417
7418 int
7419 main ()
7420 {
7421   int s;
7422   wait (&s);
7423   s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
7424   ;
7425   return 0;
7426 }
7427 _ACEOF
7428 if ac_fn_c_try_compile "$LINENO"; then :
7429   ac_cv_header_sys_wait_h=yes
7430 else
7431   ac_cv_header_sys_wait_h=no
7432 fi
7433 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7434 fi
7435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
7436 $as_echo "$ac_cv_header_sys_wait_h" >&6; }
7437 if test $ac_cv_header_sys_wait_h = yes; then
7438
7439 $as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
7440
7441 fi
7442
7443
7444 ac_header_dirent=no
7445 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
7446   as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7448 $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
7449 if eval \${$as_ac_Header+:} false; then :
7450   $as_echo_n "(cached) " >&6
7451 else
7452   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7453 /* end confdefs.h.  */
7454 #include <sys/types.h>
7455 #include <$ac_hdr>
7456
7457 int
7458 main ()
7459 {
7460 if ((DIR *) 0)
7461 return 0;
7462   ;
7463   return 0;
7464 }
7465 _ACEOF
7466 if ac_fn_c_try_compile "$LINENO"; then :
7467   eval "$as_ac_Header=yes"
7468 else
7469   eval "$as_ac_Header=no"
7470 fi
7471 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7472 fi
7473 eval ac_res=\$$as_ac_Header
7474                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7475 $as_echo "$ac_res" >&6; }
7476 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7477   cat >>confdefs.h <<_ACEOF
7478 #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
7479 _ACEOF
7480
7481 ac_header_dirent=$ac_hdr; break
7482 fi
7483
7484 done
7485 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7486 if test $ac_header_dirent = dirent.h; then
7487   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7488 $as_echo_n "checking for library containing opendir... " >&6; }
7489 if ${ac_cv_search_opendir+:} false; then :
7490   $as_echo_n "(cached) " >&6
7491 else
7492   ac_func_search_save_LIBS=$LIBS
7493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7494 /* end confdefs.h.  */
7495
7496 /* Override any GCC internal prototype to avoid an error.
7497    Use char because int might match the return type of a GCC
7498    builtin and then its argument prototype would still apply.  */
7499 #ifdef __cplusplus
7500 extern "C"
7501 #endif
7502 char opendir ();
7503 int
7504 main ()
7505 {
7506 return opendir ();
7507   ;
7508   return 0;
7509 }
7510 _ACEOF
7511 for ac_lib in '' dir; do
7512   if test -z "$ac_lib"; then
7513     ac_res="none required"
7514   else
7515     ac_res=-l$ac_lib
7516     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7517   fi
7518   if ac_fn_c_try_link "$LINENO"; then :
7519   ac_cv_search_opendir=$ac_res
7520 fi
7521 rm -f core conftest.err conftest.$ac_objext \
7522     conftest$ac_exeext
7523   if ${ac_cv_search_opendir+:} false; then :
7524   break
7525 fi
7526 done
7527 if ${ac_cv_search_opendir+:} false; then :
7528
7529 else
7530   ac_cv_search_opendir=no
7531 fi
7532 rm conftest.$ac_ext
7533 LIBS=$ac_func_search_save_LIBS
7534 fi
7535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7536 $as_echo "$ac_cv_search_opendir" >&6; }
7537 ac_res=$ac_cv_search_opendir
7538 if test "$ac_res" != no; then :
7539   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7540
7541 fi
7542
7543 else
7544   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7545 $as_echo_n "checking for library containing opendir... " >&6; }
7546 if ${ac_cv_search_opendir+:} false; then :
7547   $as_echo_n "(cached) " >&6
7548 else
7549   ac_func_search_save_LIBS=$LIBS
7550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7551 /* end confdefs.h.  */
7552
7553 /* Override any GCC internal prototype to avoid an error.
7554    Use char because int might match the return type of a GCC
7555    builtin and then its argument prototype would still apply.  */
7556 #ifdef __cplusplus
7557 extern "C"
7558 #endif
7559 char opendir ();
7560 int
7561 main ()
7562 {
7563 return opendir ();
7564   ;
7565   return 0;
7566 }
7567 _ACEOF
7568 for ac_lib in '' x; do
7569   if test -z "$ac_lib"; then
7570     ac_res="none required"
7571   else
7572     ac_res=-l$ac_lib
7573     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7574   fi
7575   if ac_fn_c_try_link "$LINENO"; then :
7576   ac_cv_search_opendir=$ac_res
7577 fi
7578 rm -f core conftest.err conftest.$ac_objext \
7579     conftest$ac_exeext
7580   if ${ac_cv_search_opendir+:} false; then :
7581   break
7582 fi
7583 done
7584 if ${ac_cv_search_opendir+:} false; then :
7585
7586 else
7587   ac_cv_search_opendir=no
7588 fi
7589 rm conftest.$ac_ext
7590 LIBS=$ac_func_search_save_LIBS
7591 fi
7592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7593 $as_echo "$ac_cv_search_opendir" >&6; }
7594 ac_res=$ac_cv_search_opendir
7595 if test "$ac_res" != no; then :
7596   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7597
7598 fi
7599
7600 fi
7601
7602 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7603 $as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
7604 if ${ac_cv_header_sys_types_h_makedev+:} false; then :
7605   $as_echo_n "(cached) " >&6
7606 else
7607   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7608 /* end confdefs.h.  */
7609 #include <sys/types.h>
7610 int
7611 main ()
7612 {
7613 return makedev(0, 0);
7614   ;
7615   return 0;
7616 }
7617 _ACEOF
7618 if ac_fn_c_try_link "$LINENO"; then :
7619   ac_cv_header_sys_types_h_makedev=yes
7620 else
7621   ac_cv_header_sys_types_h_makedev=no
7622 fi
7623 rm -f core conftest.err conftest.$ac_objext \
7624     conftest$ac_exeext conftest.$ac_ext
7625
7626 fi
7627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7628 $as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
7629
7630 if test $ac_cv_header_sys_types_h_makedev = no; then
7631 ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
7632 if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
7633
7634 $as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
7635
7636 fi
7637
7638
7639
7640   if test $ac_cv_header_sys_mkdev_h = no; then
7641     ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
7642 if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
7643
7644 $as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
7645
7646 fi
7647
7648
7649   fi
7650 fi
7651
7652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
7653 $as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
7654 if ${ac_cv_header_stat_broken+:} false; then :
7655   $as_echo_n "(cached) " >&6
7656 else
7657   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7658 /* end confdefs.h.  */
7659 #include <sys/types.h>
7660 #include <sys/stat.h>
7661
7662 #if defined S_ISBLK && defined S_IFDIR
7663 extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
7664 #endif
7665
7666 #if defined S_ISBLK && defined S_IFCHR
7667 extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
7668 #endif
7669
7670 #if defined S_ISLNK && defined S_IFREG
7671 extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
7672 #endif
7673
7674 #if defined S_ISSOCK && defined S_IFREG
7675 extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
7676 #endif
7677
7678 _ACEOF
7679 if ac_fn_c_try_compile "$LINENO"; then :
7680   ac_cv_header_stat_broken=no
7681 else
7682   ac_cv_header_stat_broken=yes
7683 fi
7684 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7685 fi
7686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
7687 $as_echo "$ac_cv_header_stat_broken" >&6; }
7688 if test $ac_cv_header_stat_broken = yes; then
7689
7690 $as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
7691
7692 fi
7693
7694 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7695 $as_echo_n "checking for ANSI C header files... " >&6; }
7696 if ${ac_cv_header_stdc+:} false; then :
7697   $as_echo_n "(cached) " >&6
7698 else
7699   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7700 /* end confdefs.h.  */
7701 #include <stdlib.h>
7702 #include <stdarg.h>
7703 #include <string.h>
7704 #include <float.h>
7705
7706 int
7707 main ()
7708 {
7709
7710   ;
7711   return 0;
7712 }
7713 _ACEOF
7714 if ac_fn_c_try_compile "$LINENO"; then :
7715   ac_cv_header_stdc=yes
7716 else
7717   ac_cv_header_stdc=no
7718 fi
7719 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7720
7721 if test $ac_cv_header_stdc = yes; then
7722   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
7723   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7724 /* end confdefs.h.  */
7725 #include <string.h>
7726
7727 _ACEOF
7728 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7729   $EGREP "memchr" >/dev/null 2>&1; then :
7730
7731 else
7732   ac_cv_header_stdc=no
7733 fi
7734 rm -f conftest*
7735
7736 fi
7737
7738 if test $ac_cv_header_stdc = yes; then
7739   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
7740   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7741 /* end confdefs.h.  */
7742 #include <stdlib.h>
7743
7744 _ACEOF
7745 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7746   $EGREP "free" >/dev/null 2>&1; then :
7747
7748 else
7749   ac_cv_header_stdc=no
7750 fi
7751 rm -f conftest*
7752
7753 fi
7754
7755 if test $ac_cv_header_stdc = yes; then
7756   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
7757   if test "$cross_compiling" = yes; then :
7758   :
7759 else
7760   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7761 /* end confdefs.h.  */
7762 #include <ctype.h>
7763 #include <stdlib.h>
7764 #if ((' ' & 0x0FF) == 0x020)
7765 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7766 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7767 #else
7768 # define ISLOWER(c) \
7769                    (('a' <= (c) && (c) <= 'i') \
7770                      || ('j' <= (c) && (c) <= 'r') \
7771                      || ('s' <= (c) && (c) <= 'z'))
7772 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7773 #endif
7774
7775 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7776 int
7777 main ()
7778 {
7779   int i;
7780   for (i = 0; i < 256; i++)
7781     if (XOR (islower (i), ISLOWER (i))
7782         || toupper (i) != TOUPPER (i))
7783       return 2;
7784   return 0;
7785 }
7786 _ACEOF
7787 if ac_fn_c_try_run "$LINENO"; then :
7788
7789 else
7790   ac_cv_header_stdc=no
7791 fi
7792 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7793   conftest.$ac_objext conftest.beam conftest.$ac_ext
7794 fi
7795
7796 fi
7797 fi
7798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7799 $as_echo "$ac_cv_header_stdc" >&6; }
7800 if test $ac_cv_header_stdc = yes; then
7801
7802 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
7803
7804 fi
7805
7806
7807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for st_fstype string in struct stat" >&5
7808 $as_echo_n "checking for st_fstype string in struct stat... " >&6; }
7809 if ${diff_cv_st_fstype_string+:} false; then :
7810   $as_echo_n "(cached) " >&6
7811 else
7812   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7813 /* end confdefs.h.  */
7814 #include <sys/types.h>
7815 #include <sys/stat.h>
7816 int
7817 main ()
7818 {
7819 struct stat s; s.st_fstype[0] = 'x';
7820   ;
7821   return 0;
7822 }
7823 _ACEOF
7824 if ac_fn_c_try_compile "$LINENO"; then :
7825   diff_cv_st_fstype_string=yes
7826 else
7827   diff_cv_st_fstype_string=no
7828 fi
7829 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7830 fi
7831
7832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $diff_cv_st_fstype_string" >&5
7833 $as_echo "$diff_cv_st_fstype_string" >&6; }
7834 if test $diff_cv_st_fstype_string = yes; then
7835
7836 $as_echo "#define HAVE_ST_FSTYPE_STRING 1" >>confdefs.h
7837
7838 fi
7839
7840 # even if we use gnulib's acl.h with integrated m4 file later on (used because
7841 # of very useful file_has_acl() function) we need following checks that restrict
7842 # tar to use POSIX.1e ACLs only.
7843
7844 # Check whether --with-posix-acls was given.
7845 if test "${with_posix_acls+set}" = set; then :
7846   withval=$with_posix_acls;
7847 else
7848   with_posix_acls=yes
7849 fi
7850
7851 if test "x$with_posix_acls" != "xno"; then
7852   for ac_header in sys/acl.h
7853 do :
7854   ac_fn_c_check_header_mongrel "$LINENO" "sys/acl.h" "ac_cv_header_sys_acl_h" "$ac_includes_default"
7855 if test "x$ac_cv_header_sys_acl_h" = xyes; then :
7856   cat >>confdefs.h <<_ACEOF
7857 #define HAVE_SYS_ACL_H 1
7858 _ACEOF
7859
7860 else
7861   with_posix_acls=no
7862 fi
7863
7864 done
7865
7866   for tar_acl_func in acl_get_file acl_get_fd acl_set_file acl_set_fd \
7867                       acl_to_text acl_from_text; do \
7868     test "x$with_posix_acls" = xno && break
7869     as_ac_Search=`$as_echo "ac_cv_search_$tar_acl_func" | $as_tr_sh`
7870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing $tar_acl_func" >&5
7871 $as_echo_n "checking for library containing $tar_acl_func... " >&6; }
7872 if eval \${$as_ac_Search+:} false; then :
7873   $as_echo_n "(cached) " >&6
7874 else
7875   ac_func_search_save_LIBS=$LIBS
7876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7877 /* end confdefs.h.  */
7878
7879 /* Override any GCC internal prototype to avoid an error.
7880    Use char because int might match the return type of a GCC
7881    builtin and then its argument prototype would still apply.  */
7882 #ifdef __cplusplus
7883 extern "C"
7884 #endif
7885 char $tar_acl_func ();
7886 int
7887 main ()
7888 {
7889 return $tar_acl_func ();
7890   ;
7891   return 0;
7892 }
7893 _ACEOF
7894 for ac_lib in '' acl pacl; do
7895   if test -z "$ac_lib"; then
7896     ac_res="none required"
7897   else
7898     ac_res=-l$ac_lib
7899     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7900   fi
7901   if ac_fn_c_try_link "$LINENO"; then :
7902   eval "$as_ac_Search=\$ac_res"
7903 fi
7904 rm -f core conftest.err conftest.$ac_objext \
7905     conftest$ac_exeext
7906   if eval \${$as_ac_Search+:} false; then :
7907   break
7908 fi
7909 done
7910 if eval \${$as_ac_Search+:} false; then :
7911
7912 else
7913   eval "$as_ac_Search=no"
7914 fi
7915 rm conftest.$ac_ext
7916 LIBS=$ac_func_search_save_LIBS
7917 fi
7918 eval ac_res=\$$as_ac_Search
7919                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7920 $as_echo "$ac_res" >&6; }
7921 eval ac_res=\$$as_ac_Search
7922 if test "$ac_res" != no; then :
7923   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7924
7925 else
7926   with_posix_acls=no
7927 fi
7928
7929   done
7930   if test "x$with_posix_acls" != xno; then
7931
7932 $as_echo "#define HAVE_POSIX_ACLS /**/" >>confdefs.h
7933
7934   fi
7935 else
7936   # disable acls in gnulib's checks
7937   export enable_acl=no
7938 fi
7939
7940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
7941 $as_echo_n "checking return type of signal handlers... " >&6; }
7942 if ${ac_cv_type_signal+:} false; then :
7943   $as_echo_n "(cached) " >&6
7944 else
7945   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7946 /* end confdefs.h.  */
7947 #include <sys/types.h>
7948 #include <signal.h>
7949
7950 int
7951 main ()
7952 {
7953 return *(signal (0, 0)) (0) == 1;
7954   ;
7955   return 0;
7956 }
7957 _ACEOF
7958 if ac_fn_c_try_compile "$LINENO"; then :
7959   ac_cv_type_signal=int
7960 else
7961   ac_cv_type_signal=void
7962 fi
7963 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7964 fi
7965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
7966 $as_echo "$ac_cv_type_signal" >&6; }
7967
7968 cat >>confdefs.h <<_ACEOF
7969 #define RETSIGTYPE $ac_cv_type_signal
7970 _ACEOF
7971
7972
7973 ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
7974 if test "x$ac_cv_type_mode_t" = xyes; then :
7975
7976 else
7977
7978 cat >>confdefs.h <<_ACEOF
7979 #define mode_t int
7980 _ACEOF
7981
7982 fi
7983
7984 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
7985 if test "x$ac_cv_type_pid_t" = xyes; then :
7986
7987 else
7988
7989 cat >>confdefs.h <<_ACEOF
7990 #define pid_t int
7991 _ACEOF
7992
7993 fi
7994
7995 ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
7996 if test "x$ac_cv_type_off_t" = xyes; then :
7997
7998 else
7999
8000 cat >>confdefs.h <<_ACEOF
8001 #define off_t long int
8002 _ACEOF
8003
8004 fi
8005
8006 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
8007 if test "x$ac_cv_type_size_t" = xyes; then :
8008
8009 else
8010
8011 cat >>confdefs.h <<_ACEOF
8012 #define size_t unsigned int
8013 _ACEOF
8014
8015 fi
8016
8017 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8018 $as_echo_n "checking for uid_t in sys/types.h... " >&6; }
8019 if ${ac_cv_type_uid_t+:} false; then :
8020   $as_echo_n "(cached) " >&6
8021 else
8022   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8023 /* end confdefs.h.  */
8024 #include <sys/types.h>
8025
8026 _ACEOF
8027 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8028   $EGREP "uid_t" >/dev/null 2>&1; then :
8029   ac_cv_type_uid_t=yes
8030 else
8031   ac_cv_type_uid_t=no
8032 fi
8033 rm -f conftest*
8034
8035 fi
8036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8037 $as_echo "$ac_cv_type_uid_t" >&6; }
8038 if test $ac_cv_type_uid_t = no; then
8039
8040 $as_echo "#define uid_t int" >>confdefs.h
8041
8042
8043 $as_echo "#define gid_t int" >>confdefs.h
8044
8045 fi
8046
8047 ac_fn_c_check_type "$LINENO" "major_t" "ac_cv_type_major_t" "$ac_includes_default"
8048 if test "x$ac_cv_type_major_t" = xyes; then :
8049
8050 else
8051
8052 $as_echo "#define major_t int" >>confdefs.h
8053
8054 fi
8055
8056 ac_fn_c_check_type "$LINENO" "minor_t" "ac_cv_type_minor_t" "$ac_includes_default"
8057 if test "x$ac_cv_type_minor_t" = xyes; then :
8058
8059 else
8060
8061 $as_echo "#define minor_t int" >>confdefs.h
8062
8063 fi
8064
8065 ac_fn_c_check_type "$LINENO" "dev_t" "ac_cv_type_dev_t" "$ac_includes_default"
8066 if test "x$ac_cv_type_dev_t" = xyes; then :
8067
8068 else
8069
8070 cat >>confdefs.h <<_ACEOF
8071 #define dev_t unsigned
8072 _ACEOF
8073
8074 fi
8075
8076 ac_fn_c_check_type "$LINENO" "ino_t" "ac_cv_type_ino_t" "$ac_includes_default"
8077 if test "x$ac_cv_type_ino_t" = xyes; then :
8078
8079 else
8080
8081 cat >>confdefs.h <<_ACEOF
8082 #define ino_t unsigned
8083 _ACEOF
8084
8085 fi
8086
8087
8088
8089   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
8090 $as_echo_n "checking for ssize_t... " >&6; }
8091 if ${gt_cv_ssize_t+:} false; then :
8092   $as_echo_n "(cached) " >&6
8093 else
8094   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8095 /* end confdefs.h.  */
8096 #include <sys/types.h>
8097 int
8098 main ()
8099 {
8100 int x = sizeof (ssize_t *) + sizeof (ssize_t);
8101             return !x;
8102   ;
8103   return 0;
8104 }
8105 _ACEOF
8106 if ac_fn_c_try_compile "$LINENO"; then :
8107   gt_cv_ssize_t=yes
8108 else
8109   gt_cv_ssize_t=no
8110 fi
8111 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8112 fi
8113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
8114 $as_echo "$gt_cv_ssize_t" >&6; }
8115   if test $gt_cv_ssize_t = no; then
8116
8117 $as_echo "#define ssize_t int" >>confdefs.h
8118
8119   fi
8120
8121
8122 # gnulib modules
8123
8124
8125
8126
8127
8128           LIBC_FATAL_STDERR_=1
8129   export LIBC_FATAL_STDERR_
8130
8131 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
8132 # for constant arguments.  Useless!
8133 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
8134 $as_echo_n "checking for working alloca.h... " >&6; }
8135 if ${ac_cv_working_alloca_h+:} false; then :
8136   $as_echo_n "(cached) " >&6
8137 else
8138   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8139 /* end confdefs.h.  */
8140 #include <alloca.h>
8141 int
8142 main ()
8143 {
8144 char *p = (char *) alloca (2 * sizeof (int));
8145                           if (p) return 0;
8146   ;
8147   return 0;
8148 }
8149 _ACEOF
8150 if ac_fn_c_try_link "$LINENO"; then :
8151   ac_cv_working_alloca_h=yes
8152 else
8153   ac_cv_working_alloca_h=no
8154 fi
8155 rm -f core conftest.err conftest.$ac_objext \
8156     conftest$ac_exeext conftest.$ac_ext
8157 fi
8158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
8159 $as_echo "$ac_cv_working_alloca_h" >&6; }
8160 if test $ac_cv_working_alloca_h = yes; then
8161
8162 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
8163
8164 fi
8165
8166 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
8167 $as_echo_n "checking for alloca... " >&6; }
8168 if ${ac_cv_func_alloca_works+:} false; then :
8169   $as_echo_n "(cached) " >&6
8170 else
8171   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8172 /* end confdefs.h.  */
8173 #ifdef __GNUC__
8174 # define alloca __builtin_alloca
8175 #else
8176 # ifdef _MSC_VER
8177 #  include <malloc.h>
8178 #  define alloca _alloca
8179 # else
8180 #  ifdef HAVE_ALLOCA_H
8181 #   include <alloca.h>
8182 #  else
8183 #   ifdef _AIX
8184  #pragma alloca
8185 #   else
8186 #    ifndef alloca /* predefined by HP cc +Olibcalls */
8187 void *alloca (size_t);
8188 #    endif
8189 #   endif
8190 #  endif
8191 # endif
8192 #endif
8193
8194 int
8195 main ()
8196 {
8197 char *p = (char *) alloca (1);
8198                                     if (p) return 0;
8199   ;
8200   return 0;
8201 }
8202 _ACEOF
8203 if ac_fn_c_try_link "$LINENO"; then :
8204   ac_cv_func_alloca_works=yes
8205 else
8206   ac_cv_func_alloca_works=no
8207 fi
8208 rm -f core conftest.err conftest.$ac_objext \
8209     conftest$ac_exeext conftest.$ac_ext
8210 fi
8211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
8212 $as_echo "$ac_cv_func_alloca_works" >&6; }
8213
8214 if test $ac_cv_func_alloca_works = yes; then
8215
8216 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
8217
8218 else
8219   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
8220 # that cause trouble.  Some versions do not even contain alloca or
8221 # contain a buggy version.  If you still want to use their alloca,
8222 # use ar to extract alloca.o from them instead of compiling alloca.c.
8223
8224
8225
8226
8227
8228 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
8229
8230 $as_echo "#define C_ALLOCA 1" >>confdefs.h
8231
8232
8233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
8234 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
8235 if ${ac_cv_os_cray+:} false; then :
8236   $as_echo_n "(cached) " >&6
8237 else
8238   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8239 /* end confdefs.h.  */
8240 #if defined CRAY && ! defined CRAY2
8241 webecray
8242 #else
8243 wenotbecray
8244 #endif
8245
8246 _ACEOF
8247 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8248   $EGREP "webecray" >/dev/null 2>&1; then :
8249   ac_cv_os_cray=yes
8250 else
8251   ac_cv_os_cray=no
8252 fi
8253 rm -f conftest*
8254
8255 fi
8256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
8257 $as_echo "$ac_cv_os_cray" >&6; }
8258 if test $ac_cv_os_cray = yes; then
8259   for ac_func in _getb67 GETB67 getb67; do
8260     as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8261 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8262 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
8263
8264 cat >>confdefs.h <<_ACEOF
8265 #define CRAY_STACKSEG_END $ac_func
8266 _ACEOF
8267
8268     break
8269 fi
8270
8271   done
8272 fi
8273
8274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
8275 $as_echo_n "checking stack direction for C alloca... " >&6; }
8276 if ${ac_cv_c_stack_direction+:} false; then :
8277   $as_echo_n "(cached) " >&6
8278 else
8279   if test "$cross_compiling" = yes; then :
8280   ac_cv_c_stack_direction=0
8281 else
8282   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8283 /* end confdefs.h.  */
8284 $ac_includes_default
8285 int
8286 find_stack_direction (int *addr, int depth)
8287 {
8288   int dir, dummy = 0;
8289   if (! addr)
8290     addr = &dummy;
8291   *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
8292   dir = depth ? find_stack_direction (addr, depth - 1) : 0;
8293   return dir + dummy;
8294 }
8295
8296 int
8297 main (int argc, char **argv)
8298 {
8299   return find_stack_direction (0, argc + !argv + 20) < 0;
8300 }
8301 _ACEOF
8302 if ac_fn_c_try_run "$LINENO"; then :
8303   ac_cv_c_stack_direction=1
8304 else
8305   ac_cv_c_stack_direction=-1
8306 fi
8307 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8308   conftest.$ac_objext conftest.beam conftest.$ac_ext
8309 fi
8310
8311 fi
8312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
8313 $as_echo "$ac_cv_c_stack_direction" >&6; }
8314 cat >>confdefs.h <<_ACEOF
8315 #define STACK_DIRECTION $ac_cv_c_stack_direction
8316 _ACEOF
8317
8318
8319 fi
8320
8321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
8322 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
8323 if ${ac_cv_c_restrict+:} false; then :
8324   $as_echo_n "(cached) " >&6
8325 else
8326   ac_cv_c_restrict=no
8327    # The order here caters to the fact that C++ does not require restrict.
8328    for ac_kw in __restrict __restrict__ _Restrict restrict; do
8329      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8330 /* end confdefs.h.  */
8331 typedef int * int_ptr;
8332         int foo (int_ptr $ac_kw ip) {
8333         return ip[0];
8334        }
8335 int
8336 main ()
8337 {
8338 int s[1];
8339         int * $ac_kw t = s;
8340         t[0] = 0;
8341         return foo(t)
8342   ;
8343   return 0;
8344 }
8345 _ACEOF
8346 if ac_fn_c_try_compile "$LINENO"; then :
8347   ac_cv_c_restrict=$ac_kw
8348 fi
8349 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8350      test "$ac_cv_c_restrict" != no && break
8351    done
8352
8353 fi
8354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
8355 $as_echo "$ac_cv_c_restrict" >&6; }
8356
8357  case $ac_cv_c_restrict in
8358    restrict) ;;
8359    no) $as_echo "#define restrict /**/" >>confdefs.h
8360  ;;
8361    *)  cat >>confdefs.h <<_ACEOF
8362 #define restrict $ac_cv_c_restrict
8363 _ACEOF
8364  ;;
8365  esac
8366
8367 ac_fn_c_check_decl "$LINENO" "clearerr_unlocked" "ac_cv_have_decl_clearerr_unlocked" "$ac_includes_default"
8368 if test "x$ac_cv_have_decl_clearerr_unlocked" = xyes; then :
8369   ac_have_decl=1
8370 else
8371   ac_have_decl=0
8372 fi
8373
8374 cat >>confdefs.h <<_ACEOF
8375 #define HAVE_DECL_CLEARERR_UNLOCKED $ac_have_decl
8376 _ACEOF
8377
8378 ac_fn_c_check_decl "$LINENO" "feof_unlocked" "ac_cv_have_decl_feof_unlocked" "$ac_includes_default"
8379 if test "x$ac_cv_have_decl_feof_unlocked" = xyes; then :
8380   ac_have_decl=1
8381 else
8382   ac_have_decl=0
8383 fi
8384
8385 cat >>confdefs.h <<_ACEOF
8386 #define HAVE_DECL_FEOF_UNLOCKED $ac_have_decl
8387 _ACEOF
8388
8389 ac_fn_c_check_decl "$LINENO" "ferror_unlocked" "ac_cv_have_decl_ferror_unlocked" "$ac_includes_default"
8390 if test "x$ac_cv_have_decl_ferror_unlocked" = xyes; then :
8391   ac_have_decl=1
8392 else
8393   ac_have_decl=0
8394 fi
8395
8396 cat >>confdefs.h <<_ACEOF
8397 #define HAVE_DECL_FERROR_UNLOCKED $ac_have_decl
8398 _ACEOF
8399
8400 ac_fn_c_check_decl "$LINENO" "fflush_unlocked" "ac_cv_have_decl_fflush_unlocked" "$ac_includes_default"
8401 if test "x$ac_cv_have_decl_fflush_unlocked" = xyes; then :
8402   ac_have_decl=1
8403 else
8404   ac_have_decl=0
8405 fi
8406
8407 cat >>confdefs.h <<_ACEOF
8408 #define HAVE_DECL_FFLUSH_UNLOCKED $ac_have_decl
8409 _ACEOF
8410
8411 ac_fn_c_check_decl "$LINENO" "fgets_unlocked" "ac_cv_have_decl_fgets_unlocked" "$ac_includes_default"
8412 if test "x$ac_cv_have_decl_fgets_unlocked" = xyes; then :
8413   ac_have_decl=1
8414 else
8415   ac_have_decl=0
8416 fi
8417
8418 cat >>confdefs.h <<_ACEOF
8419 #define HAVE_DECL_FGETS_UNLOCKED $ac_have_decl
8420 _ACEOF
8421
8422 ac_fn_c_check_decl "$LINENO" "fputc_unlocked" "ac_cv_have_decl_fputc_unlocked" "$ac_includes_default"
8423 if test "x$ac_cv_have_decl_fputc_unlocked" = xyes; then :
8424   ac_have_decl=1
8425 else
8426   ac_have_decl=0
8427 fi
8428
8429 cat >>confdefs.h <<_ACEOF
8430 #define HAVE_DECL_FPUTC_UNLOCKED $ac_have_decl
8431 _ACEOF
8432
8433 ac_fn_c_check_decl "$LINENO" "fputs_unlocked" "ac_cv_have_decl_fputs_unlocked" "$ac_includes_default"
8434 if test "x$ac_cv_have_decl_fputs_unlocked" = xyes; then :
8435   ac_have_decl=1
8436 else
8437   ac_have_decl=0
8438 fi
8439
8440 cat >>confdefs.h <<_ACEOF
8441 #define HAVE_DECL_FPUTS_UNLOCKED $ac_have_decl
8442 _ACEOF
8443
8444 ac_fn_c_check_decl "$LINENO" "fread_unlocked" "ac_cv_have_decl_fread_unlocked" "$ac_includes_default"
8445 if test "x$ac_cv_have_decl_fread_unlocked" = xyes; then :
8446   ac_have_decl=1
8447 else
8448   ac_have_decl=0
8449 fi
8450
8451 cat >>confdefs.h <<_ACEOF
8452 #define HAVE_DECL_FREAD_UNLOCKED $ac_have_decl
8453 _ACEOF
8454
8455 ac_fn_c_check_decl "$LINENO" "fwrite_unlocked" "ac_cv_have_decl_fwrite_unlocked" "$ac_includes_default"
8456 if test "x$ac_cv_have_decl_fwrite_unlocked" = xyes; then :
8457   ac_have_decl=1
8458 else
8459   ac_have_decl=0
8460 fi
8461
8462 cat >>confdefs.h <<_ACEOF
8463 #define HAVE_DECL_FWRITE_UNLOCKED $ac_have_decl
8464 _ACEOF
8465
8466 ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
8467 if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then :
8468   ac_have_decl=1
8469 else
8470   ac_have_decl=0
8471 fi
8472
8473 cat >>confdefs.h <<_ACEOF
8474 #define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
8475 _ACEOF
8476
8477 ac_fn_c_check_decl "$LINENO" "getchar_unlocked" "ac_cv_have_decl_getchar_unlocked" "$ac_includes_default"
8478 if test "x$ac_cv_have_decl_getchar_unlocked" = xyes; then :
8479   ac_have_decl=1
8480 else
8481   ac_have_decl=0
8482 fi
8483
8484 cat >>confdefs.h <<_ACEOF
8485 #define HAVE_DECL_GETCHAR_UNLOCKED $ac_have_decl
8486 _ACEOF
8487
8488 ac_fn_c_check_decl "$LINENO" "putc_unlocked" "ac_cv_have_decl_putc_unlocked" "$ac_includes_default"
8489 if test "x$ac_cv_have_decl_putc_unlocked" = xyes; then :
8490   ac_have_decl=1
8491 else
8492   ac_have_decl=0
8493 fi
8494
8495 cat >>confdefs.h <<_ACEOF
8496 #define HAVE_DECL_PUTC_UNLOCKED $ac_have_decl
8497 _ACEOF
8498
8499 ac_fn_c_check_decl "$LINENO" "putchar_unlocked" "ac_cv_have_decl_putchar_unlocked" "$ac_includes_default"
8500 if test "x$ac_cv_have_decl_putchar_unlocked" = xyes; then :
8501   ac_have_decl=1
8502 else
8503   ac_have_decl=0
8504 fi
8505
8506 cat >>confdefs.h <<_ACEOF
8507 #define HAVE_DECL_PUTCHAR_UNLOCKED $ac_have_decl
8508 _ACEOF
8509
8510
8511
8512
8513   for ac_func in $ac_func_list
8514 do :
8515   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8516 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8517 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
8518   cat >>confdefs.h <<_ACEOF
8519 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
8520 _ACEOF
8521
8522 fi
8523 done
8524
8525
8526
8527
8528
8529
8530
8531
8532
8533
8534   XGETTEXT_EXTRA_OPTIONS=
8535
8536 # Make sure we can run config.sub.
8537 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
8538   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
8539
8540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
8541 $as_echo_n "checking build system type... " >&6; }
8542 if ${ac_cv_build+:} false; then :
8543   $as_echo_n "(cached) " >&6
8544 else
8545   ac_build_alias=$build_alias
8546 test "x$ac_build_alias" = x &&
8547   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
8548 test "x$ac_build_alias" = x &&
8549   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
8550 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
8551   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
8552
8553 fi
8554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
8555 $as_echo "$ac_cv_build" >&6; }
8556 case $ac_cv_build in
8557 *-*-*) ;;
8558 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
8559 esac
8560 build=$ac_cv_build
8561 ac_save_IFS=$IFS; IFS='-'
8562 set x $ac_cv_build
8563 shift
8564 build_cpu=$1
8565 build_vendor=$2
8566 shift; shift
8567 # Remember, the first character of IFS is used to create $*,
8568 # except with old shells:
8569 build_os=$*
8570 IFS=$ac_save_IFS
8571 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
8572
8573
8574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
8575 $as_echo_n "checking host system type... " >&6; }
8576 if ${ac_cv_host+:} false; then :
8577   $as_echo_n "(cached) " >&6
8578 else
8579   if test "x$host_alias" = x; then
8580   ac_cv_host=$ac_cv_build
8581 else
8582   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
8583     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
8584 fi
8585
8586 fi
8587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
8588 $as_echo "$ac_cv_host" >&6; }
8589 case $ac_cv_host in
8590 *-*-*) ;;
8591 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
8592 esac
8593 host=$ac_cv_host
8594 ac_save_IFS=$IFS; IFS='-'
8595 set x $ac_cv_host
8596 shift
8597 host_cpu=$1
8598 host_vendor=$2
8599 shift; shift
8600 # Remember, the first character of IFS is used to create $*,
8601 # except with old shells:
8602 host_os=$*
8603 IFS=$ac_save_IFS
8604 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
8605
8606
8607     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_ino member in directory struct" >&5
8608 $as_echo_n "checking for d_ino member in directory struct... " >&6; }
8609 if ${gl_cv_struct_dirent_d_ino+:} false; then :
8610   $as_echo_n "(cached) " >&6
8611 else
8612   if test "$cross_compiling" = yes; then :
8613   case "$host_os" in
8614                            # Guess yes on glibc systems with Linux kernel.
8615               linux*-gnu*) gl_cv_struct_dirent_d_ino="guessing yes" ;;
8616                            # If we don't know, assume the worst.
8617               *)           gl_cv_struct_dirent_d_ino="guessing no" ;;
8618             esac
8619
8620 else
8621   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8622 /* end confdefs.h.  */
8623 #include <sys/types.h>
8624              #include <sys/stat.h>
8625              #include <dirent.h>
8626
8627 int
8628 main ()
8629 {
8630 DIR *dp = opendir (".");
8631              struct dirent *e;
8632              struct stat st;
8633              if (! dp)
8634                return 1;
8635              e = readdir (dp);
8636              if (! e)
8637                return 2;
8638              if (stat (e->d_name, &st) != 0)
8639                return 3;
8640              if (e->d_ino != st.st_ino)
8641                return 4;
8642              return 0;
8643
8644   ;
8645   return 0;
8646 }
8647 _ACEOF
8648 if ac_fn_c_try_run "$LINENO"; then :
8649   gl_cv_struct_dirent_d_ino=yes
8650 else
8651   gl_cv_struct_dirent_d_ino=no
8652 fi
8653 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8654   conftest.$ac_objext conftest.beam conftest.$ac_ext
8655 fi
8656
8657 fi
8658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_ino" >&5
8659 $as_echo "$gl_cv_struct_dirent_d_ino" >&6; }
8660    case "$gl_cv_struct_dirent_d_ino" in
8661      *yes)
8662
8663 $as_echo "#define D_INO_IN_DIRENT 1" >>confdefs.h
8664
8665        ;;
8666    esac
8667
8668
8669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long file names" >&5
8670 $as_echo_n "checking for long file names... " >&6; }
8671 if ${ac_cv_sys_long_file_names+:} false; then :
8672   $as_echo_n "(cached) " >&6
8673 else
8674   ac_cv_sys_long_file_names=yes
8675 # Test for long file names in all the places we know might matter:
8676 #      .                the current directory, where building will happen
8677 #      $prefix/lib      where we will be installing things
8678 #      $exec_prefix/lib likewise
8679 #      $TMPDIR          if set, where it might want to write temporary files
8680 #      /tmp             where it might want to write temporary files
8681 #      /var/tmp         likewise
8682 #      /usr/tmp         likewise
8683 for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do
8684   # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib
8685   # in the usual case where exec_prefix is '${prefix}'.
8686   case $ac_dir in #(
8687     . | /* | ?:[\\/]*) ;; #(
8688     *) continue;;
8689   esac
8690   test -w "$ac_dir/." || continue # It is less confusing to not echo anything here.
8691   ac_xdir=$ac_dir/cf$$
8692   (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
8693   ac_tf1=$ac_xdir/conftest9012345
8694   ac_tf2=$ac_xdir/conftest9012346
8695   touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" ||
8696     ac_cv_sys_long_file_names=no
8697   rm -f -r "$ac_xdir" 2>/dev/null
8698   test $ac_cv_sys_long_file_names = no && break
8699 done
8700 fi
8701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_long_file_names" >&5
8702 $as_echo "$ac_cv_sys_long_file_names" >&6; }
8703 if test $ac_cv_sys_long_file_names = yes; then
8704
8705 $as_echo "#define HAVE_LONG_FILE_NAMES 1" >>confdefs.h
8706
8707 fi
8708
8709
8710
8711
8712   GNULIB_BTOWC=0;
8713   GNULIB_WCTOB=0;
8714   GNULIB_MBSINIT=0;
8715   GNULIB_MBRTOWC=0;
8716   GNULIB_MBRLEN=0;
8717   GNULIB_MBSRTOWCS=0;
8718   GNULIB_MBSNRTOWCS=0;
8719   GNULIB_WCRTOMB=0;
8720   GNULIB_WCSRTOMBS=0;
8721   GNULIB_WCSNRTOMBS=0;
8722   GNULIB_WCWIDTH=0;
8723   GNULIB_WMEMCHR=0;
8724   GNULIB_WMEMCMP=0;
8725   GNULIB_WMEMCPY=0;
8726   GNULIB_WMEMMOVE=0;
8727   GNULIB_WMEMSET=0;
8728   GNULIB_WCSLEN=0;
8729   GNULIB_WCSNLEN=0;
8730   GNULIB_WCSCPY=0;
8731   GNULIB_WCPCPY=0;
8732   GNULIB_WCSNCPY=0;
8733   GNULIB_WCPNCPY=0;
8734   GNULIB_WCSCAT=0;
8735   GNULIB_WCSNCAT=0;
8736   GNULIB_WCSCMP=0;
8737   GNULIB_WCSNCMP=0;
8738   GNULIB_WCSCASECMP=0;
8739   GNULIB_WCSNCASECMP=0;
8740   GNULIB_WCSCOLL=0;
8741   GNULIB_WCSXFRM=0;
8742   GNULIB_WCSDUP=0;
8743   GNULIB_WCSCHR=0;
8744   GNULIB_WCSRCHR=0;
8745   GNULIB_WCSCSPN=0;
8746   GNULIB_WCSSPN=0;
8747   GNULIB_WCSPBRK=0;
8748   GNULIB_WCSSTR=0;
8749   GNULIB_WCSTOK=0;
8750   GNULIB_WCSWIDTH=0;
8751     HAVE_BTOWC=1;
8752   HAVE_MBSINIT=1;
8753   HAVE_MBRTOWC=1;
8754   HAVE_MBRLEN=1;
8755   HAVE_MBSRTOWCS=1;
8756   HAVE_MBSNRTOWCS=1;
8757   HAVE_WCRTOMB=1;
8758   HAVE_WCSRTOMBS=1;
8759   HAVE_WCSNRTOMBS=1;
8760   HAVE_WMEMCHR=1;
8761   HAVE_WMEMCMP=1;
8762   HAVE_WMEMCPY=1;
8763   HAVE_WMEMMOVE=1;
8764   HAVE_WMEMSET=1;
8765   HAVE_WCSLEN=1;
8766   HAVE_WCSNLEN=1;
8767   HAVE_WCSCPY=1;
8768   HAVE_WCPCPY=1;
8769   HAVE_WCSNCPY=1;
8770   HAVE_WCPNCPY=1;
8771   HAVE_WCSCAT=1;
8772   HAVE_WCSNCAT=1;
8773   HAVE_WCSCMP=1;
8774   HAVE_WCSNCMP=1;
8775   HAVE_WCSCASECMP=1;
8776   HAVE_WCSNCASECMP=1;
8777   HAVE_WCSCOLL=1;
8778   HAVE_WCSXFRM=1;
8779   HAVE_WCSDUP=1;
8780   HAVE_WCSCHR=1;
8781   HAVE_WCSRCHR=1;
8782   HAVE_WCSCSPN=1;
8783   HAVE_WCSSPN=1;
8784   HAVE_WCSPBRK=1;
8785   HAVE_WCSSTR=1;
8786   HAVE_WCSTOK=1;
8787   HAVE_WCSWIDTH=1;
8788   HAVE_DECL_WCTOB=1;
8789   HAVE_DECL_WCWIDTH=1;
8790   REPLACE_MBSTATE_T=0;
8791   REPLACE_BTOWC=0;
8792   REPLACE_WCTOB=0;
8793   REPLACE_MBSINIT=0;
8794   REPLACE_MBRTOWC=0;
8795   REPLACE_MBRLEN=0;
8796   REPLACE_MBSRTOWCS=0;
8797   REPLACE_MBSNRTOWCS=0;
8798   REPLACE_WCRTOMB=0;
8799   REPLACE_WCSRTOMBS=0;
8800   REPLACE_WCSNRTOMBS=0;
8801   REPLACE_WCWIDTH=0;
8802   REPLACE_WCSWIDTH=0;
8803
8804
8805             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
8806 $as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
8807 if ${gl_cv_header_wchar_h_correct_inline+:} false; then :
8808   $as_echo_n "(cached) " >&6
8809 else
8810   gl_cv_header_wchar_h_correct_inline=yes
8811      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8812 /* end confdefs.h.  */
8813
8814        #define wcstod renamed_wcstod
8815 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
8816    <wchar.h>.
8817    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
8818    included before <wchar.h>.  */
8819 #include <stddef.h>
8820 #include <stdio.h>
8821 #include <time.h>
8822 #include <wchar.h>
8823 extern int zero (void);
8824 int main () { return zero(); }
8825
8826 _ACEOF
8827      if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
8828   (eval $ac_compile) 2>&5
8829   ac_status=$?
8830   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8831   test $ac_status = 0; }; then
8832        mv conftest.$ac_objext conftest1.$ac_objext
8833        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8834 /* end confdefs.h.  */
8835
8836          #define wcstod renamed_wcstod
8837 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
8838    <wchar.h>.
8839    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
8840    included before <wchar.h>.  */
8841 #include <stddef.h>
8842 #include <stdio.h>
8843 #include <time.h>
8844 #include <wchar.h>
8845 int zero (void) { return 0; }
8846
8847 _ACEOF
8848        if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
8849   (eval $ac_compile) 2>&5
8850   ac_status=$?
8851   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8852   test $ac_status = 0; }; then
8853          mv conftest.$ac_objext conftest2.$ac_objext
8854          if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
8855            :
8856          else
8857            gl_cv_header_wchar_h_correct_inline=no
8858          fi
8859        fi
8860      fi
8861      rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext
8862
8863 fi
8864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
8865 $as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; }
8866   if test $gl_cv_header_wchar_h_correct_inline = no; then
8867     as_fn_error $? "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
8868 This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
8869 C99 mode. You have four options:
8870   - Add the flag -fgnu89-inline to CC and reconfigure, or
8871   - Fix your include files, using parts of
8872     <http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
8873   - Use a gcc version older than 4.3, or
8874   - Don't use the flags -std=c99 or -std=gnu99.
8875 Configuration aborted." "$LINENO" 5
8876   fi
8877
8878
8879
8880
8881   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
8882 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
8883 if ${am_cv_langinfo_codeset+:} false; then :
8884   $as_echo_n "(cached) " >&6
8885 else
8886   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8887 /* end confdefs.h.  */
8888 #include <langinfo.h>
8889 int
8890 main ()
8891 {
8892 char* cs = nl_langinfo(CODESET); return !cs;
8893   ;
8894   return 0;
8895 }
8896 _ACEOF
8897 if ac_fn_c_try_link "$LINENO"; then :
8898   am_cv_langinfo_codeset=yes
8899 else
8900   am_cv_langinfo_codeset=no
8901 fi
8902 rm -f core conftest.err conftest.$ac_objext \
8903     conftest$ac_exeext conftest.$ac_ext
8904
8905 fi
8906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
8907 $as_echo "$am_cv_langinfo_codeset" >&6; }
8908   if test $am_cv_langinfo_codeset = yes; then
8909
8910 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
8911
8912   fi
8913
8914
8915
8916
8917   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
8918 $as_echo_n "checking for a traditional french locale... " >&6; }
8919 if ${gt_cv_locale_fr+:} false; then :
8920   $as_echo_n "(cached) " >&6
8921 else
8922
8923     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8924 /* end confdefs.h.  */
8925
8926 #include <locale.h>
8927 #include <time.h>
8928 #if HAVE_LANGINFO_CODESET
8929 # include <langinfo.h>
8930 #endif
8931 #include <stdlib.h>
8932 #include <string.h>
8933 struct tm t;
8934 char buf[16];
8935 int main () {
8936   /* Check whether the given locale name is recognized by the system.  */
8937 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
8938   /* On native Windows, setlocale(category, "") looks at the system settings,
8939      not at the environment variables.  Also, when an encoding suffix such
8940      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
8941      category of the locale to "C".  */
8942   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
8943       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
8944     return 1;
8945 #else
8946   if (setlocale (LC_ALL, "") == NULL) return 1;
8947 #endif
8948   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
8949      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
8950      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
8951      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
8952      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
8953      some unit tests fail.
8954      On MirBSD 10, when an unsupported locale is specified, setlocale()
8955      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
8956 #if HAVE_LANGINFO_CODESET
8957   {
8958     const char *cs = nl_langinfo (CODESET);
8959     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
8960         || strcmp (cs, "UTF-8") == 0)
8961       return 1;
8962   }
8963 #endif
8964 #ifdef __CYGWIN__
8965   /* On Cygwin, avoid locale names without encoding suffix, because the
8966      locale_charset() function relies on the encoding suffix.  Note that
8967      LC_ALL is set on the command line.  */
8968   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
8969 #endif
8970   /* Check whether in the abbreviation of the second month, the second
8971      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
8972      one byte long. This excludes the UTF-8 encoding.  */
8973   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
8974   if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
8975 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
8976   /* Check whether the decimal separator is a comma.
8977      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
8978      are nl_langinfo(RADIXCHAR) are both ".".  */
8979   if (localeconv () ->decimal_point[0] != ',') return 1;
8980 #endif
8981   return 0;
8982 }
8983
8984 _ACEOF
8985     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
8986   (eval $ac_link) 2>&5
8987   ac_status=$?
8988   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8989   test $ac_status = 0; } && test -s conftest$ac_exeext; then
8990       case "$host_os" in
8991         # Handle native Windows specially, because there setlocale() interprets
8992         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
8993         # "fr" or "fra" as "French" or "French_France.1252",
8994         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
8995         # "ja" as "Japanese" or "Japanese_Japan.932",
8996         # and similar.
8997         mingw*)
8998           # Test for the native Windows locale name.
8999           if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
9000             gt_cv_locale_fr=French_France.1252
9001           else
9002             # None found.
9003             gt_cv_locale_fr=none
9004           fi
9005           ;;
9006         *)
9007           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
9008           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
9009           # configure script would override the LC_ALL setting. Likewise for
9010           # LC_CTYPE, which is also set at the beginning of the configure script.
9011           # Test for the usual locale name.
9012           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
9013             gt_cv_locale_fr=fr_FR
9014           else
9015             # Test for the locale name with explicit encoding suffix.
9016             if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
9017               gt_cv_locale_fr=fr_FR.ISO-8859-1
9018             else
9019               # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
9020               if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
9021                 gt_cv_locale_fr=fr_FR.ISO8859-1
9022               else
9023                 # Test for the HP-UX locale name.
9024                 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
9025                   gt_cv_locale_fr=fr_FR.iso88591
9026                 else
9027                   # Test for the Solaris 7 locale name.
9028                   if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
9029                     gt_cv_locale_fr=fr
9030                   else
9031                     # None found.
9032                     gt_cv_locale_fr=none
9033                   fi
9034                 fi
9035               fi
9036             fi
9037           fi
9038           ;;
9039       esac
9040     fi
9041     rm -fr conftest*
9042
9043 fi
9044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
9045 $as_echo "$gt_cv_locale_fr" >&6; }
9046   LOCALE_FR=$gt_cv_locale_fr
9047
9048
9049
9050   GNULIB__EXIT=0;
9051   GNULIB_ATOLL=0;
9052   GNULIB_CALLOC_POSIX=0;
9053   GNULIB_CANONICALIZE_FILE_NAME=0;
9054   GNULIB_GETLOADAVG=0;
9055   GNULIB_GETSUBOPT=0;
9056   GNULIB_GRANTPT=0;
9057   GNULIB_MALLOC_POSIX=0;
9058   GNULIB_MBTOWC=0;
9059   GNULIB_MKDTEMP=0;
9060   GNULIB_MKOSTEMP=0;
9061   GNULIB_MKOSTEMPS=0;
9062   GNULIB_MKSTEMP=0;
9063   GNULIB_MKSTEMPS=0;
9064   GNULIB_POSIX_OPENPT=0;
9065   GNULIB_PTSNAME=0;
9066   GNULIB_PTSNAME_R=0;
9067   GNULIB_PUTENV=0;
9068   GNULIB_RANDOM=0;
9069   GNULIB_RANDOM_R=0;
9070   GNULIB_REALLOC_POSIX=0;
9071   GNULIB_REALPATH=0;
9072   GNULIB_RPMATCH=0;
9073   GNULIB_SECURE_GETENV=0;
9074   GNULIB_SETENV=0;
9075   GNULIB_STRTOD=0;
9076   GNULIB_STRTOLL=0;
9077   GNULIB_STRTOULL=0;
9078   GNULIB_SYSTEM_POSIX=0;
9079   GNULIB_UNLOCKPT=0;
9080   GNULIB_UNSETENV=0;
9081   GNULIB_WCTOMB=0;
9082     HAVE__EXIT=1;
9083   HAVE_ATOLL=1;
9084   HAVE_CANONICALIZE_FILE_NAME=1;
9085   HAVE_DECL_GETLOADAVG=1;
9086   HAVE_GETSUBOPT=1;
9087   HAVE_GRANTPT=1;
9088   HAVE_MKDTEMP=1;
9089   HAVE_MKOSTEMP=1;
9090   HAVE_MKOSTEMPS=1;
9091   HAVE_MKSTEMP=1;
9092   HAVE_MKSTEMPS=1;
9093   HAVE_POSIX_OPENPT=1;
9094   HAVE_PTSNAME=1;
9095   HAVE_PTSNAME_R=1;
9096   HAVE_RANDOM=1;
9097   HAVE_RANDOM_H=1;
9098   HAVE_RANDOM_R=1;
9099   HAVE_REALPATH=1;
9100   HAVE_RPMATCH=1;
9101   HAVE_SECURE_GETENV=1;
9102   HAVE_SETENV=1;
9103   HAVE_DECL_SETENV=1;
9104   HAVE_STRTOD=1;
9105   HAVE_STRTOLL=1;
9106   HAVE_STRTOULL=1;
9107   HAVE_STRUCT_RANDOM_DATA=1;
9108   HAVE_SYS_LOADAVG_H=0;
9109   HAVE_UNLOCKPT=1;
9110   HAVE_DECL_UNSETENV=1;
9111   REPLACE_CALLOC=0;
9112   REPLACE_CANONICALIZE_FILE_NAME=0;
9113   REPLACE_MALLOC=0;
9114   REPLACE_MBTOWC=0;
9115   REPLACE_MKSTEMP=0;
9116   REPLACE_PTSNAME=0;
9117   REPLACE_PTSNAME_R=0;
9118   REPLACE_PUTENV=0;
9119   REPLACE_RANDOM_R=0;
9120   REPLACE_REALLOC=0;
9121   REPLACE_REALPATH=0;
9122   REPLACE_SETENV=0;
9123   REPLACE_STRTOD=0;
9124   REPLACE_UNSETENV=0;
9125   REPLACE_WCTOMB=0;
9126
9127
9128
9129
9130
9131
9132
9133
9134
9135   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
9136 $as_echo_n "checking whether // is distinct from /... " >&6; }
9137 if ${gl_cv_double_slash_root+:} false; then :
9138   $as_echo_n "(cached) " >&6
9139 else
9140    if test x"$cross_compiling" = xyes ; then
9141         # When cross-compiling, there is no way to tell whether // is special
9142         # short of a list of hosts.  However, the only known hosts to date
9143         # that have a distinct // are Apollo DomainOS (too old to port to),
9144         # Cygwin, and z/OS.  If anyone knows of another system for which // has
9145         # special semantics and is distinct from /, please report it to
9146         # <bug-gnulib@gnu.org>.
9147         case $host in
9148           *-cygwin | i370-ibm-openedition)
9149             gl_cv_double_slash_root=yes ;;
9150           *)
9151             # Be optimistic and assume that / and // are the same when we
9152             # don't know.
9153             gl_cv_double_slash_root='unknown, assuming no' ;;
9154         esac
9155       else
9156         set x `ls -di / // 2>/dev/null`
9157         if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
9158           gl_cv_double_slash_root=no
9159         else
9160           gl_cv_double_slash_root=yes
9161         fi
9162       fi
9163 fi
9164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
9165 $as_echo "$gl_cv_double_slash_root" >&6; }
9166   if test "$gl_cv_double_slash_root" = yes; then
9167
9168 $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
9169
9170   fi
9171
9172
9173
9174
9175
9176      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether realpath works" >&5
9177 $as_echo_n "checking whether realpath works... " >&6; }
9178 if ${gl_cv_func_realpath_works+:} false; then :
9179   $as_echo_n "(cached) " >&6
9180 else
9181
9182     touch conftest.a
9183     mkdir conftest.d
9184     if test "$cross_compiling" = yes; then :
9185   case "$host_os" in
9186                        # Guess yes on glibc systems.
9187         *-gnu* | gnu*) gl_cv_func_realpath_works="guessing yes" ;;
9188                        # If we don't know, assume the worst.
9189         *)             gl_cv_func_realpath_works="guessing no" ;;
9190       esac
9191
9192 else
9193   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9194 /* end confdefs.h.  */
9195
9196
9197
9198 #include <stdlib.h>
9199 #if defined __MACH__ && defined __APPLE__
9200 /* Avoid a crash on Mac OS X.  */
9201 #include <mach/mach.h>
9202 #include <mach/mach_error.h>
9203 #include <mach/thread_status.h>
9204 #include <mach/exception.h>
9205 #include <mach/task.h>
9206 #include <pthread.h>
9207 /* The exception port on which our thread listens.  */
9208 static mach_port_t our_exception_port;
9209 /* The main function of the thread listening for exceptions of type
9210    EXC_BAD_ACCESS.  */
9211 static void *
9212 mach_exception_thread (void *arg)
9213 {
9214   /* Buffer for a message to be received.  */
9215   struct {
9216     mach_msg_header_t head;
9217     mach_msg_body_t msgh_body;
9218     char data[1024];
9219   } msg;
9220   mach_msg_return_t retval;
9221   /* Wait for a message on the exception port.  */
9222   retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
9223                      our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
9224   if (retval != MACH_MSG_SUCCESS)
9225     abort ();
9226   exit (1);
9227 }
9228 static void
9229 nocrash_init (void)
9230 {
9231   mach_port_t self = mach_task_self ();
9232   /* Allocate a port on which the thread shall listen for exceptions.  */
9233   if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
9234       == KERN_SUCCESS) {
9235     /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html.  */
9236     if (mach_port_insert_right (self, our_exception_port, our_exception_port,
9237                                 MACH_MSG_TYPE_MAKE_SEND)
9238         == KERN_SUCCESS) {
9239       /* The exceptions we want to catch.  Only EXC_BAD_ACCESS is interesting
9240          for us.  */
9241       exception_mask_t mask = EXC_MASK_BAD_ACCESS;
9242       /* Create the thread listening on the exception port.  */
9243       pthread_attr_t attr;
9244       pthread_t thread;
9245       if (pthread_attr_init (&attr) == 0
9246           && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
9247           && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
9248         pthread_attr_destroy (&attr);
9249         /* Replace the exception port info for these exceptions with our own.
9250            Note that we replace the exception port for the entire task, not only
9251            for a particular thread.  This has the effect that when our exception
9252            port gets the message, the thread specific exception port has already
9253            been asked, and we don't need to bother about it.
9254            See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html.  */
9255         task_set_exception_ports (self, mask, our_exception_port,
9256                                   EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
9257       }
9258     }
9259   }
9260 }
9261 #elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
9262 /* Avoid a crash on native Windows.  */
9263 #define WIN32_LEAN_AND_MEAN
9264 #include <windows.h>
9265 #include <winerror.h>
9266 static LONG WINAPI
9267 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
9268 {
9269   switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
9270     {
9271     case EXCEPTION_ACCESS_VIOLATION:
9272     case EXCEPTION_IN_PAGE_ERROR:
9273     case EXCEPTION_STACK_OVERFLOW:
9274     case EXCEPTION_GUARD_PAGE:
9275     case EXCEPTION_PRIV_INSTRUCTION:
9276     case EXCEPTION_ILLEGAL_INSTRUCTION:
9277     case EXCEPTION_DATATYPE_MISALIGNMENT:
9278     case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
9279     case EXCEPTION_NONCONTINUABLE_EXCEPTION:
9280       exit (1);
9281     }
9282   return EXCEPTION_CONTINUE_SEARCH;
9283 }
9284 static void
9285 nocrash_init (void)
9286 {
9287   SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
9288 }
9289 #else
9290 /* Avoid a crash on POSIX systems.  */
9291 #include <signal.h>
9292 /* A POSIX signal handler.  */
9293 static void
9294 exception_handler (int sig)
9295 {
9296   exit (1);
9297 }
9298 static void
9299 nocrash_init (void)
9300 {
9301 #ifdef SIGSEGV
9302   signal (SIGSEGV, exception_handler);
9303 #endif
9304 #ifdef SIGBUS
9305   signal (SIGBUS, exception_handler);
9306 #endif
9307 }
9308 #endif
9309
9310         #include <stdlib.h>
9311         #include <string.h>
9312
9313 int
9314 main ()
9315 {
9316
9317         int result = 0;
9318         {
9319           char *name = realpath ("conftest.a", NULL);
9320           if (!(name && *name == '/'))
9321             result |= 1;
9322         }
9323         {
9324           char *name = realpath ("conftest.b/../conftest.a", NULL);
9325           if (name != NULL)
9326             result |= 2;
9327         }
9328         {
9329           char *name = realpath ("conftest.a/", NULL);
9330           if (name != NULL)
9331             result |= 4;
9332         }
9333         {
9334           char *name1 = realpath (".", NULL);
9335           char *name2 = realpath ("conftest.d//./..", NULL);
9336           if (strcmp (name1, name2) != 0)
9337             result |= 8;
9338         }
9339         return result;
9340
9341   ;
9342   return 0;
9343 }
9344
9345 _ACEOF
9346 if ac_fn_c_try_run "$LINENO"; then :
9347   gl_cv_func_realpath_works=yes
9348 else
9349   gl_cv_func_realpath_works=no
9350 fi
9351 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9352   conftest.$ac_objext conftest.beam conftest.$ac_ext
9353 fi
9354
9355     rm -rf conftest.a conftest.d
9356
9357 fi
9358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_realpath_works" >&5
9359 $as_echo "$gl_cv_func_realpath_works" >&6; }
9360   case "$gl_cv_func_realpath_works" in
9361     *yes)
9362
9363 $as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
9364
9365       ;;
9366   esac
9367
9368
9369
9370
9371
9372
9373
9374
9375
9376
9377
9378   GNULIB_CHDIR=0;
9379   GNULIB_CHOWN=0;
9380   GNULIB_CLOSE=0;
9381   GNULIB_DUP=0;
9382   GNULIB_DUP2=0;
9383   GNULIB_DUP3=0;
9384   GNULIB_ENVIRON=0;
9385   GNULIB_EUIDACCESS=0;
9386   GNULIB_FACCESSAT=0;
9387   GNULIB_FCHDIR=0;
9388   GNULIB_FCHOWNAT=0;
9389   GNULIB_FDATASYNC=0;
9390   GNULIB_FSYNC=0;
9391   GNULIB_FTRUNCATE=0;
9392   GNULIB_GETCWD=0;
9393   GNULIB_GETDOMAINNAME=0;
9394   GNULIB_GETDTABLESIZE=0;
9395   GNULIB_GETGROUPS=0;
9396   GNULIB_GETHOSTNAME=0;
9397   GNULIB_GETLOGIN=0;
9398   GNULIB_GETLOGIN_R=0;
9399   GNULIB_GETPAGESIZE=0;
9400   GNULIB_GETUSERSHELL=0;
9401   GNULIB_GROUP_MEMBER=0;
9402   GNULIB_ISATTY=0;
9403   GNULIB_LCHOWN=0;
9404   GNULIB_LINK=0;
9405   GNULIB_LINKAT=0;
9406   GNULIB_LSEEK=0;
9407   GNULIB_PIPE=0;
9408   GNULIB_PIPE2=0;
9409   GNULIB_PREAD=0;
9410   GNULIB_PWRITE=0;
9411   GNULIB_READ=0;
9412   GNULIB_READLINK=0;
9413   GNULIB_READLINKAT=0;
9414   GNULIB_RMDIR=0;
9415   GNULIB_SETHOSTNAME=0;
9416   GNULIB_SLEEP=0;
9417   GNULIB_SYMLINK=0;
9418   GNULIB_SYMLINKAT=0;
9419   GNULIB_TTYNAME_R=0;
9420   GNULIB_UNISTD_H_NONBLOCKING=0;
9421   GNULIB_UNISTD_H_SIGPIPE=0;
9422   GNULIB_UNLINK=0;
9423   GNULIB_UNLINKAT=0;
9424   GNULIB_USLEEP=0;
9425   GNULIB_WRITE=0;
9426     HAVE_CHOWN=1;
9427   HAVE_DUP2=1;
9428   HAVE_DUP3=1;
9429   HAVE_EUIDACCESS=1;
9430   HAVE_FACCESSAT=1;
9431   HAVE_FCHDIR=1;
9432   HAVE_FCHOWNAT=1;
9433   HAVE_FDATASYNC=1;
9434   HAVE_FSYNC=1;
9435   HAVE_FTRUNCATE=1;
9436   HAVE_GETDTABLESIZE=1;
9437   HAVE_GETGROUPS=1;
9438   HAVE_GETHOSTNAME=1;
9439   HAVE_GETLOGIN=1;
9440   HAVE_GETPAGESIZE=1;
9441   HAVE_GROUP_MEMBER=1;
9442   HAVE_LCHOWN=1;
9443   HAVE_LINK=1;
9444   HAVE_LINKAT=1;
9445   HAVE_PIPE=1;
9446   HAVE_PIPE2=1;
9447   HAVE_PREAD=1;
9448   HAVE_PWRITE=1;
9449   HAVE_READLINK=1;
9450   HAVE_READLINKAT=1;
9451   HAVE_SETHOSTNAME=1;
9452   HAVE_SLEEP=1;
9453   HAVE_SYMLINK=1;
9454   HAVE_SYMLINKAT=1;
9455   HAVE_UNLINKAT=1;
9456   HAVE_USLEEP=1;
9457   HAVE_DECL_ENVIRON=1;
9458   HAVE_DECL_FCHDIR=1;
9459   HAVE_DECL_FDATASYNC=1;
9460   HAVE_DECL_GETDOMAINNAME=1;
9461   HAVE_DECL_GETLOGIN_R=1;
9462   HAVE_DECL_GETPAGESIZE=1;
9463   HAVE_DECL_GETUSERSHELL=1;
9464   HAVE_DECL_SETHOSTNAME=1;
9465   HAVE_DECL_TTYNAME_R=1;
9466   HAVE_OS_H=0;
9467   HAVE_SYS_PARAM_H=0;
9468   REPLACE_CHOWN=0;
9469   REPLACE_CLOSE=0;
9470   REPLACE_DUP=0;
9471   REPLACE_DUP2=0;
9472   REPLACE_FCHOWNAT=0;
9473   REPLACE_FTRUNCATE=0;
9474   REPLACE_GETCWD=0;
9475   REPLACE_GETDOMAINNAME=0;
9476   REPLACE_GETLOGIN_R=0;
9477   REPLACE_GETGROUPS=0;
9478   REPLACE_GETPAGESIZE=0;
9479   REPLACE_ISATTY=0;
9480   REPLACE_LCHOWN=0;
9481   REPLACE_LINK=0;
9482   REPLACE_LINKAT=0;
9483   REPLACE_LSEEK=0;
9484   REPLACE_PREAD=0;
9485   REPLACE_PWRITE=0;
9486   REPLACE_READ=0;
9487   REPLACE_READLINK=0;
9488   REPLACE_RMDIR=0;
9489   REPLACE_SLEEP=0;
9490   REPLACE_SYMLINK=0;
9491   REPLACE_TTYNAME_R=0;
9492   REPLACE_UNLINK=0;
9493   REPLACE_UNLINKAT=0;
9494   REPLACE_USLEEP=0;
9495   REPLACE_WRITE=0;
9496   UNISTD_H_HAVE_WINSOCK2_H=0;
9497   UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
9498
9499
9500
9501
9502
9503
9504       for ac_header in unistd.h
9505 do :
9506   ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
9507 if test "x$ac_cv_header_unistd_h" = xyes; then :
9508   cat >>confdefs.h <<_ACEOF
9509 #define HAVE_UNISTD_H 1
9510 _ACEOF
9511
9512 fi
9513
9514 done
9515
9516   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working chown" >&5
9517 $as_echo_n "checking for working chown... " >&6; }
9518 if ${ac_cv_func_chown_works+:} false; then :
9519   $as_echo_n "(cached) " >&6
9520 else
9521   if test "$cross_compiling" = yes; then :
9522   case "$host_os" in # ((
9523                   # Guess yes on glibc systems.
9524           *-gnu*) ac_cv_func_chown_works=yes ;;
9525                   # If we don't know, assume the worst.
9526           *)      ac_cv_func_chown_works=no ;;
9527         esac
9528
9529 else
9530   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9531 /* end confdefs.h.  */
9532 $ac_includes_default
9533            #include <fcntl.h>
9534
9535 int
9536 main ()
9537 {
9538
9539             char *f = "conftest.chown";
9540             struct stat before, after;
9541
9542             if (creat (f, 0600) < 0)
9543               return 1;
9544             if (stat (f, &before) < 0)
9545               return 1;
9546             if (chown (f, (uid_t) -1, (gid_t) -1) == -1)
9547               return 1;
9548             if (stat (f, &after) < 0)
9549               return 1;
9550             return ! (before.st_uid == after.st_uid && before.st_gid == after.st_gid);
9551
9552   ;
9553   return 0;
9554 }
9555
9556 _ACEOF
9557 if ac_fn_c_try_run "$LINENO"; then :
9558   ac_cv_func_chown_works=yes
9559 else
9560   ac_cv_func_chown_works=no
9561 fi
9562 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9563   conftest.$ac_objext conftest.beam conftest.$ac_ext
9564 fi
9565
9566      rm -f conftest.chown
9567
9568 fi
9569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_chown_works" >&5
9570 $as_echo "$ac_cv_func_chown_works" >&6; }
9571   if test $ac_cv_func_chown_works = yes; then
9572
9573 $as_echo "#define HAVE_CHOWN 1" >>confdefs.h
9574
9575   fi
9576
9577
9578   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether chown dereferences symlinks" >&5
9579 $as_echo_n "checking whether chown dereferences symlinks... " >&6; }
9580 if ${gl_cv_func_chown_follows_symlink+:} false; then :
9581   $as_echo_n "(cached) " >&6
9582 else
9583
9584       if test "$cross_compiling" = yes; then :
9585   gl_cv_func_chown_follows_symlink=yes
9586
9587 else
9588   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9589 /* end confdefs.h.  */
9590
9591 #include <unistd.h>
9592 #include <stdlib.h>
9593 #include <errno.h>
9594
9595         int
9596         main ()
9597         {
9598           int result = 0;
9599           char const *dangling_symlink = "conftest.dangle";
9600
9601           unlink (dangling_symlink);
9602           if (symlink ("conftest.no-such", dangling_symlink))
9603             abort ();
9604
9605           /* Exit successfully on a conforming system,
9606              i.e., where chown must fail with ENOENT.  */
9607           if (chown (dangling_symlink, getuid (), getgid ()) == 0)
9608             result |= 1;
9609           if (errno != ENOENT)
9610             result |= 2;
9611           return result;
9612         }
9613
9614 _ACEOF
9615 if ac_fn_c_try_run "$LINENO"; then :
9616   gl_cv_func_chown_follows_symlink=yes
9617 else
9618   gl_cv_func_chown_follows_symlink=no
9619 fi
9620 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9621   conftest.$ac_objext conftest.beam conftest.$ac_ext
9622 fi
9623
9624
9625
9626 fi
9627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_chown_follows_symlink" >&5
9628 $as_echo "$gl_cv_func_chown_follows_symlink" >&6; }
9629
9630   if test $gl_cv_func_chown_follows_symlink = no; then
9631
9632 $as_echo "#define CHOWN_MODIFIES_SYMLINK 1" >>confdefs.h
9633
9634   fi
9635
9636
9637
9638
9639
9640
9641
9642
9643
9644
9645
9646
9647     if test $ac_cv_func_chown = no; then
9648     HAVE_CHOWN=0
9649   else
9650         if test $gl_cv_func_chown_follows_symlink = no; then
9651       REPLACE_CHOWN=1
9652     fi
9653
9654         if test $ac_cv_func_chown_works = no; then
9655
9656 $as_echo "#define CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE 1" >>confdefs.h
9657
9658       REPLACE_CHOWN=1
9659     fi
9660
9661                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether chown honors trailing slash" >&5
9662 $as_echo_n "checking whether chown honors trailing slash... " >&6; }
9663 if ${gl_cv_func_chown_slash_works+:} false; then :
9664   $as_echo_n "(cached) " >&6
9665 else
9666   touch conftest.file && rm -f conftest.link
9667        if test "$cross_compiling" = yes; then :
9668   case "$host_os" in
9669                    # Guess yes on glibc systems.
9670            *-gnu*) gl_cv_func_chown_slash_works="guessing yes" ;;
9671                    # If we don't know, assume the worst.
9672            *)      gl_cv_func_chown_slash_works="guessing no" ;;
9673          esac
9674
9675 else
9676   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9677 /* end confdefs.h.  */
9678
9679 #include <unistd.h>
9680 #include <stdlib.h>
9681 #include <errno.h>
9682
9683 int
9684 main ()
9685 {
9686     if (symlink ("conftest.file", "conftest.link")) return 1;
9687           if (chown ("conftest.link/", getuid (), getgid ()) == 0) return 2;
9688
9689   ;
9690   return 0;
9691 }
9692 _ACEOF
9693 if ac_fn_c_try_run "$LINENO"; then :
9694   gl_cv_func_chown_slash_works=yes
9695 else
9696   gl_cv_func_chown_slash_works=no
9697 fi
9698 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9699   conftest.$ac_objext conftest.beam conftest.$ac_ext
9700 fi
9701
9702       rm -f conftest.link conftest.file
9703 fi
9704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_chown_slash_works" >&5
9705 $as_echo "$gl_cv_func_chown_slash_works" >&6; }
9706     case "$gl_cv_func_chown_slash_works" in
9707       *yes) ;;
9708       *)
9709
9710 $as_echo "#define CHOWN_TRAILING_SLASH_BUG 1" >>confdefs.h
9711
9712         REPLACE_CHOWN=1
9713         ;;
9714     esac
9715
9716         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether chown always updates ctime" >&5
9717 $as_echo_n "checking whether chown always updates ctime... " >&6; }
9718 if ${gl_cv_func_chown_ctime_works+:} false; then :
9719   $as_echo_n "(cached) " >&6
9720 else
9721   if test "$cross_compiling" = yes; then :
9722   case "$host_os" in
9723                    # Guess yes on glibc systems.
9724            *-gnu*) gl_cv_func_chown_ctime_works="guessing yes" ;;
9725                    # If we don't know, assume the worst.
9726            *)      gl_cv_func_chown_ctime_works="guessing no" ;;
9727          esac
9728
9729 else
9730   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9731 /* end confdefs.h.  */
9732
9733 #include <unistd.h>
9734 #include <stdlib.h>
9735 #include <errno.h>
9736 #include <fcntl.h>
9737 #include <sys/stat.h>
9738
9739 int
9740 main ()
9741 {
9742     struct stat st1, st2;
9743           if (close (creat ("conftest.file", 0600))) return 1;
9744           if (stat ("conftest.file", &st1)) return 2;
9745           sleep (1);
9746           if (chown ("conftest.file", st1.st_uid, st1.st_gid)) return 3;
9747           if (stat ("conftest.file", &st2)) return 4;
9748           if (st2.st_ctime <= st1.st_ctime) return 5;
9749
9750   ;
9751   return 0;
9752 }
9753 _ACEOF
9754 if ac_fn_c_try_run "$LINENO"; then :
9755   gl_cv_func_chown_ctime_works=yes
9756 else
9757   gl_cv_func_chown_ctime_works=no
9758 fi
9759 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9760   conftest.$ac_objext conftest.beam conftest.$ac_ext
9761 fi
9762
9763       rm -f conftest.file
9764 fi
9765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_chown_ctime_works" >&5
9766 $as_echo "$gl_cv_func_chown_ctime_works" >&6; }
9767     case "$gl_cv_func_chown_ctime_works" in
9768       *yes) ;;
9769       *)
9770
9771 $as_echo "#define CHOWN_CHANGE_TIME_BUG 1" >>confdefs.h
9772
9773         REPLACE_CHOWN=1
9774         ;;
9775     esac
9776   fi
9777
9778
9779
9780
9781
9782   if test $ac_cv_func__set_invalid_parameter_handler = yes; then
9783     HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
9784
9785 $as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
9786
9787   else
9788     HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
9789   fi
9790
9791
9792
9793
9794
9795
9796
9797      GNULIB_OPENDIR=0;
9798   GNULIB_READDIR=0;
9799   GNULIB_REWINDDIR=0;
9800   GNULIB_CLOSEDIR=0;
9801   GNULIB_DIRFD=0;
9802   GNULIB_FDOPENDIR=0;
9803   GNULIB_SCANDIR=0;
9804   GNULIB_ALPHASORT=0;
9805     HAVE_OPENDIR=1;
9806   HAVE_READDIR=1;
9807   HAVE_REWINDDIR=1;
9808   HAVE_CLOSEDIR=1;
9809   HAVE_DECL_DIRFD=1;
9810   HAVE_DECL_FDOPENDIR=1;
9811   HAVE_FDOPENDIR=1;
9812   HAVE_SCANDIR=1;
9813   HAVE_ALPHASORT=1;
9814   REPLACE_OPENDIR=0;
9815   REPLACE_CLOSEDIR=0;
9816   REPLACE_DIRFD=0;
9817   REPLACE_FDOPENDIR=0;
9818
9819
9820
9821   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
9822 $as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
9823 if ${gl_cv_have_include_next+:} false; then :
9824   $as_echo_n "(cached) " >&6
9825 else
9826   rm -rf conftestd1a conftestd1b conftestd2
9827      mkdir conftestd1a conftestd1b conftestd2
9828                                                   cat <<EOF > conftestd1a/conftest.h
9829 #define DEFINED_IN_CONFTESTD1
9830 #include_next <conftest.h>
9831 #ifdef DEFINED_IN_CONFTESTD2
9832 int foo;
9833 #else
9834 #error "include_next doesn't work"
9835 #endif
9836 EOF
9837      cat <<EOF > conftestd1b/conftest.h
9838 #define DEFINED_IN_CONFTESTD1
9839 #include <stdio.h>
9840 #include_next <conftest.h>
9841 #ifdef DEFINED_IN_CONFTESTD2
9842 int foo;
9843 #else
9844 #error "include_next doesn't work"
9845 #endif
9846 EOF
9847      cat <<EOF > conftestd2/conftest.h
9848 #ifndef DEFINED_IN_CONFTESTD1
9849 #error "include_next test doesn't work"
9850 #endif
9851 #define DEFINED_IN_CONFTESTD2
9852 EOF
9853      gl_save_CPPFLAGS="$CPPFLAGS"
9854      CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
9855      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9856 /* end confdefs.h.  */
9857 #include <conftest.h>
9858 _ACEOF
9859 if ac_fn_c_try_compile "$LINENO"; then :
9860   gl_cv_have_include_next=yes
9861 else
9862   CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
9863         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9864 /* end confdefs.h.  */
9865 #include <conftest.h>
9866 _ACEOF
9867 if ac_fn_c_try_compile "$LINENO"; then :
9868   gl_cv_have_include_next=buggy
9869 else
9870   gl_cv_have_include_next=no
9871 fi
9872 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9873
9874 fi
9875 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9876      CPPFLAGS="$gl_save_CPPFLAGS"
9877      rm -rf conftestd1a conftestd1b conftestd2
9878
9879 fi
9880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
9881 $as_echo "$gl_cv_have_include_next" >&6; }
9882   PRAGMA_SYSTEM_HEADER=
9883   if test $gl_cv_have_include_next = yes; then
9884     INCLUDE_NEXT=include_next
9885     INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
9886     if test -n "$GCC"; then
9887       PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
9888     fi
9889   else
9890     if test $gl_cv_have_include_next = buggy; then
9891       INCLUDE_NEXT=include
9892       INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
9893     else
9894       INCLUDE_NEXT=include
9895       INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
9896     fi
9897   fi
9898
9899
9900
9901   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5
9902 $as_echo_n "checking whether system header files limit the line length... " >&6; }
9903 if ${gl_cv_pragma_columns+:} false; then :
9904   $as_echo_n "(cached) " >&6
9905 else
9906        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9907 /* end confdefs.h.  */
9908
9909 #ifdef __TANDEM
9910 choke me
9911 #endif
9912
9913 _ACEOF
9914 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9915   $EGREP "choke me" >/dev/null 2>&1; then :
9916   gl_cv_pragma_columns=yes
9917 else
9918   gl_cv_pragma_columns=no
9919 fi
9920 rm -f conftest*
9921
9922
9923 fi
9924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5
9925 $as_echo "$gl_cv_pragma_columns" >&6; }
9926   if test $gl_cv_pragma_columns = yes; then
9927     PRAGMA_COLUMNS="#pragma COLUMNS 10000"
9928   else
9929     PRAGMA_COLUMNS=
9930   fi
9931
9932
9933
9934
9935
9936
9937
9938
9939
9940
9941
9942
9943
9944
9945
9946
9947
9948   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
9949 $as_echo_n "checking if environ is properly declared... " >&6; }
9950   if ${gt_cv_var_environ_declaration+:} false; then :
9951   $as_echo_n "(cached) " >&6
9952 else
9953
9954     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9955 /* end confdefs.h.  */
9956 #if HAVE_UNISTD_H
9957      #include <unistd.h>
9958      #endif
9959      /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>.  */
9960      #include <stdlib.h>
9961
9962            extern struct { int foo; } environ;
9963 int
9964 main ()
9965 {
9966 environ.foo = 1;
9967   ;
9968   return 0;
9969 }
9970 _ACEOF
9971 if ac_fn_c_try_compile "$LINENO"; then :
9972   gt_cv_var_environ_declaration=no
9973 else
9974   gt_cv_var_environ_declaration=yes
9975 fi
9976 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9977 fi
9978
9979   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
9980 $as_echo "$gt_cv_var_environ_declaration" >&6; }
9981   if test $gt_cv_var_environ_declaration = yes; then
9982
9983 $as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
9984
9985   fi
9986
9987
9988   if test $gt_cv_var_environ_declaration != yes; then
9989     HAVE_DECL_ENVIRON=0
9990   fi
9991
9992
9993
9994   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
9995 $as_echo_n "checking for complete errno.h... " >&6; }
9996 if ${gl_cv_header_errno_h_complete+:} false; then :
9997   $as_echo_n "(cached) " >&6
9998 else
9999
10000     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10001 /* end confdefs.h.  */
10002
10003 #include <errno.h>
10004 #if !defined ETXTBSY
10005 booboo
10006 #endif
10007 #if !defined ENOMSG
10008 booboo
10009 #endif
10010 #if !defined EIDRM
10011 booboo
10012 #endif
10013 #if !defined ENOLINK
10014 booboo
10015 #endif
10016 #if !defined EPROTO
10017 booboo
10018 #endif
10019 #if !defined EMULTIHOP
10020 booboo
10021 #endif
10022 #if !defined EBADMSG
10023 booboo
10024 #endif
10025 #if !defined EOVERFLOW
10026 booboo
10027 #endif
10028 #if !defined ENOTSUP
10029 booboo
10030 #endif
10031 #if !defined ENETRESET
10032 booboo
10033 #endif
10034 #if !defined ECONNABORTED
10035 booboo
10036 #endif
10037 #if !defined ESTALE
10038 booboo
10039 #endif
10040 #if !defined EDQUOT
10041 booboo
10042 #endif
10043 #if !defined ECANCELED
10044 booboo
10045 #endif
10046 #if !defined EOWNERDEAD
10047 booboo
10048 #endif
10049 #if !defined ENOTRECOVERABLE
10050 booboo
10051 #endif
10052 #if !defined EILSEQ
10053 booboo
10054 #endif
10055
10056 _ACEOF
10057 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10058   $EGREP "booboo" >/dev/null 2>&1; then :
10059   gl_cv_header_errno_h_complete=no
10060 else
10061   gl_cv_header_errno_h_complete=yes
10062 fi
10063 rm -f conftest*
10064
10065
10066 fi
10067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
10068 $as_echo "$gl_cv_header_errno_h_complete" >&6; }
10069   if test $gl_cv_header_errno_h_complete = yes; then
10070     ERRNO_H=''
10071   else
10072
10073
10074
10075
10076
10077
10078
10079
10080      if test $gl_cv_have_include_next = yes; then
10081        gl_cv_next_errno_h='<'errno.h'>'
10082      else
10083        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
10084 $as_echo_n "checking absolute name of <errno.h>... " >&6; }
10085 if ${gl_cv_next_errno_h+:} false; then :
10086   $as_echo_n "(cached) " >&6
10087 else
10088
10089                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10090 /* end confdefs.h.  */
10091 #include <errno.h>
10092
10093 _ACEOF
10094                                                                                                                         case "$host_os" in
10095                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
10096                  *)    gl_absname_cpp="$ac_cpp" ;;
10097                esac
10098
10099                case "$host_os" in
10100                  mingw*)
10101                                                                                                                                      gl_dirsep_regex='[/\\]'
10102                    ;;
10103                  *)
10104                    gl_dirsep_regex='\/'
10105                    ;;
10106                esac
10107                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
10108
10109                gl_header_literal_regex=`echo 'errno.h' \
10110                                         | sed -e "$gl_make_literal_regex_sed"`
10111                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10112                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10113                    s|^/[^/]|//&|
10114                    p
10115                    q
10116                  }'
10117                                                             gl_cv_next_errno_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10118                       sed -n "$gl_absolute_header_sed"`'"'
10119
10120
10121 fi
10122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
10123 $as_echo "$gl_cv_next_errno_h" >&6; }
10124      fi
10125      NEXT_ERRNO_H=$gl_cv_next_errno_h
10126
10127      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10128        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10129        gl_next_as_first_directive='<'errno.h'>'
10130      else
10131        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10132        gl_next_as_first_directive=$gl_cv_next_errno_h
10133      fi
10134      NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
10135
10136
10137
10138
10139     ERRNO_H='errno.h'
10140   fi
10141
10142    if test -n "$ERRNO_H"; then
10143   GL_GENERATE_ERRNO_H_TRUE=
10144   GL_GENERATE_ERRNO_H_FALSE='#'
10145 else
10146   GL_GENERATE_ERRNO_H_TRUE='#'
10147   GL_GENERATE_ERRNO_H_FALSE=
10148 fi
10149
10150
10151   if test -n "$ERRNO_H"; then
10152     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
10153 $as_echo_n "checking for EMULTIHOP value... " >&6; }
10154 if ${gl_cv_header_errno_h_EMULTIHOP+:} false; then :
10155   $as_echo_n "(cached) " >&6
10156 else
10157
10158       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10159 /* end confdefs.h.  */
10160
10161 #include <errno.h>
10162 #ifdef EMULTIHOP
10163 yes
10164 #endif
10165
10166 _ACEOF
10167 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10168   $EGREP "yes" >/dev/null 2>&1; then :
10169   gl_cv_header_errno_h_EMULTIHOP=yes
10170 else
10171   gl_cv_header_errno_h_EMULTIHOP=no
10172 fi
10173 rm -f conftest*
10174
10175       if test $gl_cv_header_errno_h_EMULTIHOP = no; then
10176         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10177 /* end confdefs.h.  */
10178
10179 #define _XOPEN_SOURCE_EXTENDED 1
10180 #include <errno.h>
10181 #ifdef EMULTIHOP
10182 yes
10183 #endif
10184
10185 _ACEOF
10186 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10187   $EGREP "yes" >/dev/null 2>&1; then :
10188   gl_cv_header_errno_h_EMULTIHOP=hidden
10189 fi
10190 rm -f conftest*
10191
10192         if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
10193                               if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP"        "
10194 #define _XOPEN_SOURCE_EXTENDED 1
10195 #include <errno.h>
10196 /* The following two lines are a workaround against an autoconf-2.52 bug.  */
10197 #include <stdio.h>
10198 #include <stdlib.h>
10199 "; then :
10200
10201 fi
10202
10203         fi
10204       fi
10205
10206 fi
10207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
10208 $as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
10209     case $gl_cv_header_errno_h_EMULTIHOP in
10210       yes | no)
10211         EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
10212         ;;
10213       *)
10214         EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
10215         ;;
10216     esac
10217
10218
10219   fi
10220
10221
10222   if test -n "$ERRNO_H"; then
10223     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
10224 $as_echo_n "checking for ENOLINK value... " >&6; }
10225 if ${gl_cv_header_errno_h_ENOLINK+:} false; then :
10226   $as_echo_n "(cached) " >&6
10227 else
10228
10229       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10230 /* end confdefs.h.  */
10231
10232 #include <errno.h>
10233 #ifdef ENOLINK
10234 yes
10235 #endif
10236
10237 _ACEOF
10238 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10239   $EGREP "yes" >/dev/null 2>&1; then :
10240   gl_cv_header_errno_h_ENOLINK=yes
10241 else
10242   gl_cv_header_errno_h_ENOLINK=no
10243 fi
10244 rm -f conftest*
10245
10246       if test $gl_cv_header_errno_h_ENOLINK = no; then
10247         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10248 /* end confdefs.h.  */
10249
10250 #define _XOPEN_SOURCE_EXTENDED 1
10251 #include <errno.h>
10252 #ifdef ENOLINK
10253 yes
10254 #endif
10255
10256 _ACEOF
10257 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10258   $EGREP "yes" >/dev/null 2>&1; then :
10259   gl_cv_header_errno_h_ENOLINK=hidden
10260 fi
10261 rm -f conftest*
10262
10263         if test $gl_cv_header_errno_h_ENOLINK = hidden; then
10264                               if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK"        "
10265 #define _XOPEN_SOURCE_EXTENDED 1
10266 #include <errno.h>
10267 /* The following two lines are a workaround against an autoconf-2.52 bug.  */
10268 #include <stdio.h>
10269 #include <stdlib.h>
10270 "; then :
10271
10272 fi
10273
10274         fi
10275       fi
10276
10277 fi
10278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
10279 $as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; }
10280     case $gl_cv_header_errno_h_ENOLINK in
10281       yes | no)
10282         ENOLINK_HIDDEN=0; ENOLINK_VALUE=
10283         ;;
10284       *)
10285         ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
10286         ;;
10287     esac
10288
10289
10290   fi
10291
10292
10293   if test -n "$ERRNO_H"; then
10294     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
10295 $as_echo_n "checking for EOVERFLOW value... " >&6; }
10296 if ${gl_cv_header_errno_h_EOVERFLOW+:} false; then :
10297   $as_echo_n "(cached) " >&6
10298 else
10299
10300       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10301 /* end confdefs.h.  */
10302
10303 #include <errno.h>
10304 #ifdef EOVERFLOW
10305 yes
10306 #endif
10307
10308 _ACEOF
10309 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10310   $EGREP "yes" >/dev/null 2>&1; then :
10311   gl_cv_header_errno_h_EOVERFLOW=yes
10312 else
10313   gl_cv_header_errno_h_EOVERFLOW=no
10314 fi
10315 rm -f conftest*
10316
10317       if test $gl_cv_header_errno_h_EOVERFLOW = no; then
10318         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10319 /* end confdefs.h.  */
10320
10321 #define _XOPEN_SOURCE_EXTENDED 1
10322 #include <errno.h>
10323 #ifdef EOVERFLOW
10324 yes
10325 #endif
10326
10327 _ACEOF
10328 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10329   $EGREP "yes" >/dev/null 2>&1; then :
10330   gl_cv_header_errno_h_EOVERFLOW=hidden
10331 fi
10332 rm -f conftest*
10333
10334         if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
10335                               if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW"        "
10336 #define _XOPEN_SOURCE_EXTENDED 1
10337 #include <errno.h>
10338 /* The following two lines are a workaround against an autoconf-2.52 bug.  */
10339 #include <stdio.h>
10340 #include <stdlib.h>
10341 "; then :
10342
10343 fi
10344
10345         fi
10346       fi
10347
10348 fi
10349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
10350 $as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
10351     case $gl_cv_header_errno_h_EOVERFLOW in
10352       yes | no)
10353         EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
10354         ;;
10355       *)
10356         EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
10357         ;;
10358     esac
10359
10360
10361   fi
10362
10363
10364 ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
10365 if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
10366   ac_have_decl=1
10367 else
10368   ac_have_decl=0
10369 fi
10370
10371 cat >>confdefs.h <<_ACEOF
10372 #define HAVE_DECL_STRERROR_R $ac_have_decl
10373 _ACEOF
10374
10375 for ac_func in strerror_r
10376 do :
10377   ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
10378 if test "x$ac_cv_func_strerror_r" = xyes; then :
10379   cat >>confdefs.h <<_ACEOF
10380 #define HAVE_STRERROR_R 1
10381 _ACEOF
10382
10383 fi
10384 done
10385
10386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
10387 $as_echo_n "checking whether strerror_r returns char *... " >&6; }
10388 if ${ac_cv_func_strerror_r_char_p+:} false; then :
10389   $as_echo_n "(cached) " >&6
10390 else
10391
10392     ac_cv_func_strerror_r_char_p=no
10393     if test $ac_cv_have_decl_strerror_r = yes; then
10394       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10395 /* end confdefs.h.  */
10396 $ac_includes_default
10397 int
10398 main ()
10399 {
10400
10401           char buf[100];
10402           char x = *strerror_r (0, buf, sizeof buf);
10403           char *p = strerror_r (0, buf, sizeof buf);
10404           return !p || x;
10405
10406   ;
10407   return 0;
10408 }
10409 _ACEOF
10410 if ac_fn_c_try_compile "$LINENO"; then :
10411   ac_cv_func_strerror_r_char_p=yes
10412 fi
10413 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10414     else
10415       # strerror_r is not declared.  Choose between
10416       # systems that have relatively inaccessible declarations for the
10417       # function.  BeOS and DEC UNIX 4.0 fall in this category, but the
10418       # former has a strerror_r that returns char*, while the latter
10419       # has a strerror_r that returns `int'.
10420       # This test should segfault on the DEC system.
10421       if test "$cross_compiling" = yes; then :
10422   :
10423 else
10424   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10425 /* end confdefs.h.  */
10426 $ac_includes_default
10427         extern char *strerror_r ();
10428 int
10429 main ()
10430 {
10431 char buf[100];
10432           char x = *strerror_r (0, buf, sizeof buf);
10433           return ! isalpha (x);
10434   ;
10435   return 0;
10436 }
10437 _ACEOF
10438 if ac_fn_c_try_run "$LINENO"; then :
10439   ac_cv_func_strerror_r_char_p=yes
10440 fi
10441 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10442   conftest.$ac_objext conftest.beam conftest.$ac_ext
10443 fi
10444
10445     fi
10446
10447 fi
10448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
10449 $as_echo "$ac_cv_func_strerror_r_char_p" >&6; }
10450 if test $ac_cv_func_strerror_r_char_p = yes; then
10451
10452 $as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h
10453
10454 fi
10455
10456
10457
10458
10459 ac_fn_c_check_decl "$LINENO" "fchdir" "ac_cv_have_decl_fchdir" "$ac_includes_default"
10460 if test "x$ac_cv_have_decl_fchdir" = xyes; then :
10461   ac_have_decl=1
10462 else
10463   ac_have_decl=0
10464 fi
10465
10466 cat >>confdefs.h <<_ACEOF
10467 #define HAVE_DECL_FCHDIR $ac_have_decl
10468 _ACEOF
10469
10470
10471      GNULIB_FCHMODAT=0;
10472   GNULIB_FSTAT=0;
10473   GNULIB_FSTATAT=0;
10474   GNULIB_FUTIMENS=0;
10475   GNULIB_LCHMOD=0;
10476   GNULIB_LSTAT=0;
10477   GNULIB_MKDIRAT=0;
10478   GNULIB_MKFIFO=0;
10479   GNULIB_MKFIFOAT=0;
10480   GNULIB_MKNOD=0;
10481   GNULIB_MKNODAT=0;
10482   GNULIB_STAT=0;
10483   GNULIB_UTIMENSAT=0;
10484     HAVE_FCHMODAT=1;
10485   HAVE_FSTATAT=1;
10486   HAVE_FUTIMENS=1;
10487   HAVE_LCHMOD=1;
10488   HAVE_LSTAT=1;
10489   HAVE_MKDIRAT=1;
10490   HAVE_MKFIFO=1;
10491   HAVE_MKFIFOAT=1;
10492   HAVE_MKNOD=1;
10493   HAVE_MKNODAT=1;
10494   HAVE_UTIMENSAT=1;
10495   REPLACE_FSTAT=0;
10496   REPLACE_FSTATAT=0;
10497   REPLACE_FUTIMENS=0;
10498   REPLACE_LSTAT=0;
10499   REPLACE_MKDIR=0;
10500   REPLACE_MKFIFO=0;
10501   REPLACE_MKNOD=0;
10502   REPLACE_STAT=0;
10503   REPLACE_UTIMENSAT=0;
10504
10505
10506
10507
10508
10509
10510   GNULIB_FCNTL=0;
10511   GNULIB_NONBLOCKING=0;
10512   GNULIB_OPEN=0;
10513   GNULIB_OPENAT=0;
10514     HAVE_FCNTL=1;
10515   HAVE_OPENAT=1;
10516   REPLACE_FCNTL=0;
10517   REPLACE_OPEN=0;
10518   REPLACE_OPENAT=0;
10519
10520
10521
10522
10523
10524
10525
10526
10527
10528
10529   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
10530 $as_echo_n "checking for working fcntl.h... " >&6; }
10531 if ${gl_cv_header_working_fcntl_h+:} false; then :
10532   $as_echo_n "(cached) " >&6
10533 else
10534   if test "$cross_compiling" = yes; then :
10535   gl_cv_header_working_fcntl_h=cross-compiling
10536 else
10537   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10538 /* end confdefs.h.  */
10539 #include <sys/types.h>
10540            #include <sys/stat.h>
10541            #if HAVE_UNISTD_H
10542            # include <unistd.h>
10543            #else /* on Windows with MSVC */
10544            # include <io.h>
10545            # include <stdlib.h>
10546            # defined sleep(n) _sleep ((n) * 1000)
10547            #endif
10548            #include <fcntl.h>
10549            #ifndef O_NOATIME
10550             #define O_NOATIME 0
10551            #endif
10552            #ifndef O_NOFOLLOW
10553             #define O_NOFOLLOW 0
10554            #endif
10555            static int const constants[] =
10556             {
10557               O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
10558               O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
10559             };
10560
10561 int
10562 main ()
10563 {
10564
10565             int result = !constants;
10566             #if HAVE_SYMLINK
10567             {
10568               static char const sym[] = "conftest.sym";
10569               if (symlink ("/dev/null", sym) != 0)
10570                 result |= 2;
10571               else
10572                 {
10573                   int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
10574                   if (fd >= 0)
10575                     {
10576                       close (fd);
10577                       result |= 4;
10578                     }
10579                 }
10580               if (unlink (sym) != 0 || symlink (".", sym) != 0)
10581                 result |= 2;
10582               else
10583                 {
10584                   int fd = open (sym, O_RDONLY | O_NOFOLLOW);
10585                   if (fd >= 0)
10586                     {
10587                       close (fd);
10588                       result |= 4;
10589                     }
10590                 }
10591               unlink (sym);
10592             }
10593             #endif
10594             {
10595               static char const file[] = "confdefs.h";
10596               int fd = open (file, O_RDONLY | O_NOATIME);
10597               if (fd < 0)
10598                 result |= 8;
10599               else
10600                 {
10601                   struct stat st0;
10602                   if (fstat (fd, &st0) != 0)
10603                     result |= 16;
10604                   else
10605                     {
10606                       char c;
10607                       sleep (1);
10608                       if (read (fd, &c, 1) != 1)
10609                         result |= 24;
10610                       else
10611                         {
10612                           if (close (fd) != 0)
10613                             result |= 32;
10614                           else
10615                             {
10616                               struct stat st1;
10617                               if (stat (file, &st1) != 0)
10618                                 result |= 40;
10619                               else
10620                                 if (st0.st_atime != st1.st_atime)
10621                                   result |= 64;
10622                             }
10623                         }
10624                     }
10625                 }
10626             }
10627             return result;
10628   ;
10629   return 0;
10630 }
10631 _ACEOF
10632 if ac_fn_c_try_run "$LINENO"; then :
10633   gl_cv_header_working_fcntl_h=yes
10634 else
10635   case $? in #(
10636         4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
10637         64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
10638         68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
10639          *) gl_cv_header_working_fcntl_h='no';;
10640         esac
10641 fi
10642 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10643   conftest.$ac_objext conftest.beam conftest.$ac_ext
10644 fi
10645
10646 fi
10647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
10648 $as_echo "$gl_cv_header_working_fcntl_h" >&6; }
10649
10650   case $gl_cv_header_working_fcntl_h in #(
10651   *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
10652   *) ac_val=1;;
10653   esac
10654
10655 cat >>confdefs.h <<_ACEOF
10656 #define HAVE_WORKING_O_NOATIME $ac_val
10657 _ACEOF
10658
10659
10660   case $gl_cv_header_working_fcntl_h in #(
10661   *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
10662   *) ac_val=1;;
10663   esac
10664
10665 cat >>confdefs.h <<_ACEOF
10666 #define HAVE_WORKING_O_NOFOLLOW $ac_val
10667 _ACEOF
10668
10669
10670
10671
10672
10673
10674    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
10675 $as_echo_n "checking for mbstate_t... " >&6; }
10676 if ${ac_cv_type_mbstate_t+:} false; then :
10677   $as_echo_n "(cached) " >&6
10678 else
10679   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10680 /* end confdefs.h.  */
10681 $ac_includes_default
10682 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
10683    <wchar.h>.
10684    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
10685    included before <wchar.h>.  */
10686 #include <stddef.h>
10687 #include <stdio.h>
10688 #include <time.h>
10689 #include <wchar.h>
10690 int
10691 main ()
10692 {
10693 mbstate_t x; return sizeof x;
10694   ;
10695   return 0;
10696 }
10697 _ACEOF
10698 if ac_fn_c_try_compile "$LINENO"; then :
10699   ac_cv_type_mbstate_t=yes
10700 else
10701   ac_cv_type_mbstate_t=no
10702 fi
10703 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10704 fi
10705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
10706 $as_echo "$ac_cv_type_mbstate_t" >&6; }
10707    if test $ac_cv_type_mbstate_t = yes; then
10708
10709 $as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
10710
10711    else
10712
10713 $as_echo "#define mbstate_t int" >>confdefs.h
10714
10715    fi
10716
10717
10718
10719
10720
10721
10722
10723
10724
10725
10726
10727
10728
10729
10730
10731
10732
10733
10734
10735
10736   GNULIB_DPRINTF=0;
10737   GNULIB_FCLOSE=0;
10738   GNULIB_FDOPEN=0;
10739   GNULIB_FFLUSH=0;
10740   GNULIB_FGETC=0;
10741   GNULIB_FGETS=0;
10742   GNULIB_FOPEN=0;
10743   GNULIB_FPRINTF=0;
10744   GNULIB_FPRINTF_POSIX=0;
10745   GNULIB_FPURGE=0;
10746   GNULIB_FPUTC=0;
10747   GNULIB_FPUTS=0;
10748   GNULIB_FREAD=0;
10749   GNULIB_FREOPEN=0;
10750   GNULIB_FSCANF=0;
10751   GNULIB_FSEEK=0;
10752   GNULIB_FSEEKO=0;
10753   GNULIB_FTELL=0;
10754   GNULIB_FTELLO=0;
10755   GNULIB_FWRITE=0;
10756   GNULIB_GETC=0;
10757   GNULIB_GETCHAR=0;
10758   GNULIB_GETDELIM=0;
10759   GNULIB_GETLINE=0;
10760   GNULIB_OBSTACK_PRINTF=0;
10761   GNULIB_OBSTACK_PRINTF_POSIX=0;
10762   GNULIB_PCLOSE=0;
10763   GNULIB_PERROR=0;
10764   GNULIB_POPEN=0;
10765   GNULIB_PRINTF=0;
10766   GNULIB_PRINTF_POSIX=0;
10767   GNULIB_PUTC=0;
10768   GNULIB_PUTCHAR=0;
10769   GNULIB_PUTS=0;
10770   GNULIB_REMOVE=0;
10771   GNULIB_RENAME=0;
10772   GNULIB_RENAMEAT=0;
10773   GNULIB_SCANF=0;
10774   GNULIB_SNPRINTF=0;
10775   GNULIB_SPRINTF_POSIX=0;
10776   GNULIB_STDIO_H_NONBLOCKING=0;
10777   GNULIB_STDIO_H_SIGPIPE=0;
10778   GNULIB_TMPFILE=0;
10779   GNULIB_VASPRINTF=0;
10780   GNULIB_VFSCANF=0;
10781   GNULIB_VSCANF=0;
10782   GNULIB_VDPRINTF=0;
10783   GNULIB_VFPRINTF=0;
10784   GNULIB_VFPRINTF_POSIX=0;
10785   GNULIB_VPRINTF=0;
10786   GNULIB_VPRINTF_POSIX=0;
10787   GNULIB_VSNPRINTF=0;
10788   GNULIB_VSPRINTF_POSIX=0;
10789     HAVE_DECL_FPURGE=1;
10790   HAVE_DECL_FSEEKO=1;
10791   HAVE_DECL_FTELLO=1;
10792   HAVE_DECL_GETDELIM=1;
10793   HAVE_DECL_GETLINE=1;
10794   HAVE_DECL_OBSTACK_PRINTF=1;
10795   HAVE_DECL_SNPRINTF=1;
10796   HAVE_DECL_VSNPRINTF=1;
10797   HAVE_DPRINTF=1;
10798   HAVE_FSEEKO=1;
10799   HAVE_FTELLO=1;
10800   HAVE_PCLOSE=1;
10801   HAVE_POPEN=1;
10802   HAVE_RENAMEAT=1;
10803   HAVE_VASPRINTF=1;
10804   HAVE_VDPRINTF=1;
10805   REPLACE_DPRINTF=0;
10806   REPLACE_FCLOSE=0;
10807   REPLACE_FDOPEN=0;
10808   REPLACE_FFLUSH=0;
10809   REPLACE_FOPEN=0;
10810   REPLACE_FPRINTF=0;
10811   REPLACE_FPURGE=0;
10812   REPLACE_FREOPEN=0;
10813   REPLACE_FSEEK=0;
10814   REPLACE_FSEEKO=0;
10815   REPLACE_FTELL=0;
10816   REPLACE_FTELLO=0;
10817   REPLACE_GETDELIM=0;
10818   REPLACE_GETLINE=0;
10819   REPLACE_OBSTACK_PRINTF=0;
10820   REPLACE_PERROR=0;
10821   REPLACE_POPEN=0;
10822   REPLACE_PRINTF=0;
10823   REPLACE_REMOVE=0;
10824   REPLACE_RENAME=0;
10825   REPLACE_RENAMEAT=0;
10826   REPLACE_SNPRINTF=0;
10827   REPLACE_SPRINTF=0;
10828   REPLACE_STDIO_READ_FUNCS=0;
10829   REPLACE_STDIO_WRITE_FUNCS=0;
10830   REPLACE_TMPFILE=0;
10831   REPLACE_VASPRINTF=0;
10832   REPLACE_VDPRINTF=0;
10833   REPLACE_VFPRINTF=0;
10834   REPLACE_VPRINTF=0;
10835   REPLACE_VSNPRINTF=0;
10836   REPLACE_VSPRINTF=0;
10837
10838
10839     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdin defaults to large file offsets" >&5
10840 $as_echo_n "checking whether stdin defaults to large file offsets... " >&6; }
10841 if ${gl_cv_var_stdin_large_offset+:} false; then :
10842   $as_echo_n "(cached) " >&6
10843 else
10844   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10845 /* end confdefs.h.  */
10846 #include <stdio.h>
10847 int
10848 main ()
10849 {
10850 #if defined __SL64 && defined __SCLE /* cygwin */
10851   /* Cygwin 1.5.24 and earlier fail to put stdin in 64-bit mode, making
10852      fseeko/ftello needlessly fail.  This bug was fixed in 1.5.25, and
10853      it is easier to do a version check than building a runtime test.  */
10854 # include <cygwin/version.h>
10855 # if CYGWIN_VERSION_DLL_COMBINED < CYGWIN_VERSION_DLL_MAKE_COMBINED (1005, 25)
10856   choke me
10857 # endif
10858 #endif
10859   ;
10860   return 0;
10861 }
10862 _ACEOF
10863 if ac_fn_c_try_link "$LINENO"; then :
10864   gl_cv_var_stdin_large_offset=yes
10865 else
10866   gl_cv_var_stdin_large_offset=no
10867 fi
10868 rm -f core conftest.err conftest.$ac_objext \
10869     conftest$ac_exeext conftest.$ac_ext
10870 fi
10871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var_stdin_large_offset" >&5
10872 $as_echo "$gl_cv_var_stdin_large_offset" >&6; }
10873
10874
10875
10876
10877
10878   case "$host_os" in
10879     mingw*)
10880                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
10881 $as_echo_n "checking for 64-bit off_t... " >&6; }
10882 if ${gl_cv_type_off_t_64+:} false; then :
10883   $as_echo_n "(cached) " >&6
10884 else
10885   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10886 /* end confdefs.h.  */
10887 #include <sys/types.h>
10888                 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
10889
10890 int
10891 main ()
10892 {
10893
10894   ;
10895   return 0;
10896 }
10897 _ACEOF
10898 if ac_fn_c_try_compile "$LINENO"; then :
10899   gl_cv_type_off_t_64=yes
10900 else
10901   gl_cv_type_off_t_64=no
10902 fi
10903 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10904
10905 fi
10906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
10907 $as_echo "$gl_cv_type_off_t_64" >&6; }
10908       if test $gl_cv_type_off_t_64 = no; then
10909         WINDOWS_64_BIT_OFF_T=1
10910       else
10911         WINDOWS_64_BIT_OFF_T=0
10912       fi
10913                   WINDOWS_64_BIT_ST_SIZE=1
10914       ;;
10915     *)
10916                                                       WINDOWS_64_BIT_OFF_T=0
10917       WINDOWS_64_BIT_ST_SIZE=0
10918       ;;
10919   esac
10920
10921
10922
10923
10924
10925
10926
10927
10928
10929
10930
10931
10932
10933
10934
10935
10936
10937      if test $gl_cv_have_include_next = yes; then
10938        gl_cv_next_sys_types_h='<'sys/types.h'>'
10939      else
10940        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
10941 $as_echo_n "checking absolute name of <sys/types.h>... " >&6; }
10942 if ${gl_cv_next_sys_types_h+:} false; then :
10943   $as_echo_n "(cached) " >&6
10944 else
10945
10946                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10947 /* end confdefs.h.  */
10948 #include <sys/types.h>
10949
10950 _ACEOF
10951                                                                                                                         case "$host_os" in
10952                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
10953                  *)    gl_absname_cpp="$ac_cpp" ;;
10954                esac
10955
10956                case "$host_os" in
10957                  mingw*)
10958                                                                                                                                      gl_dirsep_regex='[/\\]'
10959                    ;;
10960                  *)
10961                    gl_dirsep_regex='\/'
10962                    ;;
10963                esac
10964                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
10965
10966                gl_header_literal_regex=`echo 'sys/types.h' \
10967                                         | sed -e "$gl_make_literal_regex_sed"`
10968                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10969                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10970                    s|^/[^/]|//&|
10971                    p
10972                    q
10973                  }'
10974                                                             gl_cv_next_sys_types_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10975                       sed -n "$gl_absolute_header_sed"`'"'
10976
10977
10978 fi
10979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
10980 $as_echo "$gl_cv_next_sys_types_h" >&6; }
10981      fi
10982      NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h
10983
10984      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10985        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10986        gl_next_as_first_directive='<'sys/types.h'>'
10987      else
10988        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10989        gl_next_as_first_directive=$gl_cv_next_sys_types_h
10990      fi
10991      NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
10992
10993
10994
10995
10996
10997
10998
10999
11000
11001
11002
11003 ac_fn_c_check_decl "$LINENO" "fseeko" "ac_cv_have_decl_fseeko" "$ac_includes_default"
11004 if test "x$ac_cv_have_decl_fseeko" = xyes; then :
11005   ac_have_decl=1
11006 else
11007   ac_have_decl=0
11008 fi
11009
11010 cat >>confdefs.h <<_ACEOF
11011 #define HAVE_DECL_FSEEKO $ac_have_decl
11012 _ACEOF
11013
11014
11015
11016
11017
11018
11019
11020
11021
11022   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fseeko" >&5
11023 $as_echo_n "checking for fseeko... " >&6; }
11024 if ${gl_cv_func_fseeko+:} false; then :
11025   $as_echo_n "(cached) " >&6
11026 else
11027
11028       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11029 /* end confdefs.h.  */
11030 #include <stdio.h>
11031
11032 int
11033 main ()
11034 {
11035 fseeko (stdin, 0, 0);
11036   ;
11037   return 0;
11038 }
11039 _ACEOF
11040 if ac_fn_c_try_link "$LINENO"; then :
11041   gl_cv_func_fseeko=yes
11042 else
11043   gl_cv_func_fseeko=no
11044 fi
11045 rm -f core conftest.err conftest.$ac_objext \
11046     conftest$ac_exeext conftest.$ac_ext
11047
11048 fi
11049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fseeko" >&5
11050 $as_echo "$gl_cv_func_fseeko" >&6; }
11051
11052
11053   if test $ac_cv_have_decl_fseeko = no; then
11054     HAVE_DECL_FSEEKO=0
11055   fi
11056
11057   if test $gl_cv_func_fseeko = no; then
11058     HAVE_FSEEKO=0
11059   else
11060     if test $WINDOWS_64_BIT_OFF_T = 1; then
11061       REPLACE_FSEEKO=1
11062     fi
11063     if test $gl_cv_var_stdin_large_offset = no; then
11064       REPLACE_FSEEKO=1
11065     fi
11066
11067   fi
11068
11069
11070
11071
11072
11073
11074
11075
11076
11077
11078
11079
11080
11081
11082
11083
11084
11085      if test $gl_cv_have_include_next = yes; then
11086        gl_cv_next_sys_stat_h='<'sys/stat.h'>'
11087      else
11088        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
11089 $as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
11090 if ${gl_cv_next_sys_stat_h+:} false; then :
11091   $as_echo_n "(cached) " >&6
11092 else
11093
11094              if test $ac_cv_header_sys_stat_h = yes; then
11095
11096
11097                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11098 /* end confdefs.h.  */
11099 #include <sys/stat.h>
11100
11101 _ACEOF
11102                                                                                                                         case "$host_os" in
11103                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
11104                  *)    gl_absname_cpp="$ac_cpp" ;;
11105                esac
11106
11107                case "$host_os" in
11108                  mingw*)
11109                                                                                                                                      gl_dirsep_regex='[/\\]'
11110                    ;;
11111                  *)
11112                    gl_dirsep_regex='\/'
11113                    ;;
11114                esac
11115                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11116
11117                gl_header_literal_regex=`echo 'sys/stat.h' \
11118                                         | sed -e "$gl_make_literal_regex_sed"`
11119                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11120                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11121                    s|^/[^/]|//&|
11122                    p
11123                    q
11124                  }'
11125                                                             gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11126                       sed -n "$gl_absolute_header_sed"`'"'
11127           else
11128                gl_cv_next_sys_stat_h='<'sys/stat.h'>'
11129              fi
11130
11131
11132 fi
11133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
11134 $as_echo "$gl_cv_next_sys_stat_h" >&6; }
11135      fi
11136      NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
11137
11138      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11139        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11140        gl_next_as_first_directive='<'sys/stat.h'>'
11141      else
11142        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11143        gl_next_as_first_directive=$gl_cv_next_sys_stat_h
11144      fi
11145      NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
11146
11147
11148
11149
11150
11151
11152
11153
11154
11155
11156
11157   if test $WINDOWS_64_BIT_ST_SIZE = 1; then
11158
11159 $as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
11160
11161   fi
11162
11163       ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
11164      #include <sys/stat.h>
11165 "
11166 if test "x$ac_cv_type_nlink_t" = xyes; then :
11167
11168 else
11169
11170 $as_echo "#define nlink_t int" >>confdefs.h
11171
11172 fi
11173
11174
11175
11176     for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat     mknod mknodat stat utimensat; do
11177     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
11178     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
11179 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
11180 if eval \${$as_gl_Symbol+:} false; then :
11181   $as_echo_n "(cached) " >&6
11182 else
11183   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11184 /* end confdefs.h.  */
11185 #include <sys/stat.h>
11186
11187 int
11188 main ()
11189 {
11190 #undef $gl_func
11191   (void) $gl_func;
11192   ;
11193   return 0;
11194 }
11195 _ACEOF
11196 if ac_fn_c_try_compile "$LINENO"; then :
11197   eval "$as_gl_Symbol=yes"
11198 else
11199   eval "$as_gl_Symbol=no"
11200 fi
11201 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11202 fi
11203 eval ac_res=\$$as_gl_Symbol
11204                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11205 $as_echo "$ac_res" >&6; }
11206     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
11207   cat >>confdefs.h <<_ACEOF
11208 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
11209 _ACEOF
11210
11211                      eval ac_cv_have_decl_$gl_func=yes
11212 fi
11213       done
11214
11215
11216
11217       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
11218 $as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
11219 if ${gl_cv_func_lstat_dereferences_slashed_symlink+:} false; then :
11220   $as_echo_n "(cached) " >&6
11221 else
11222   rm -f conftest.sym conftest.file
11223      echo >conftest.file
11224      if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then
11225        if test "$cross_compiling" = yes; then :
11226   case "$host_os" in
11227                     # Guess yes on glibc systems.
11228             *-gnu*) gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
11229                     # If we don't know, assume the worst.
11230             *)      gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
11231           esac
11232
11233 else
11234   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11235 /* end confdefs.h.  */
11236 $ac_includes_default
11237 int
11238 main ()
11239 {
11240 struct stat sbuf;
11241               /* Linux will dereference the symlink and fail, as required by
11242                  POSIX.  That is better in the sense that it means we will not
11243                  have to compile and use the lstat wrapper.  */
11244               return lstat ("conftest.sym/", &sbuf) == 0;
11245
11246   ;
11247   return 0;
11248 }
11249 _ACEOF
11250 if ac_fn_c_try_run "$LINENO"; then :
11251   gl_cv_func_lstat_dereferences_slashed_symlink=yes
11252 else
11253   gl_cv_func_lstat_dereferences_slashed_symlink=no
11254 fi
11255 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11256   conftest.$ac_objext conftest.beam conftest.$ac_ext
11257 fi
11258
11259      else
11260        # If the 'ln -s' command failed, then we probably don't even
11261        # have an lstat function.
11262        gl_cv_func_lstat_dereferences_slashed_symlink="guessing no"
11263      fi
11264      rm -f conftest.sym conftest.file
11265
11266 fi
11267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
11268 $as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
11269   case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
11270     *yes)
11271
11272 cat >>confdefs.h <<_ACEOF
11273 #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
11274 _ACEOF
11275
11276       ;;
11277   esac
11278
11279
11280
11281
11282
11283
11284
11285    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5
11286 $as_echo_n "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; }
11287 if ${gl_cv_func_getcwd_null+:} false; then :
11288   $as_echo_n "(cached) " >&6
11289 else
11290   if test "$cross_compiling" = yes; then :
11291   case "$host_os" in
11292                      # Guess yes on glibc systems.
11293             *-gnu*)  gl_cv_func_getcwd_null="guessing yes";;
11294                      # Guess yes on Cygwin.
11295             cygwin*) gl_cv_func_getcwd_null="guessing yes";;
11296                      # If we don't know, assume the worst.
11297             *)       gl_cv_func_getcwd_null="guessing no";;
11298           esac
11299
11300 else
11301   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11302 /* end confdefs.h.  */
11303
11304 #        if HAVE_UNISTD_H
11305 #         include <unistd.h>
11306 #        else /* on Windows with MSVC */
11307 #         include <direct.h>
11308 #        endif
11309 #        ifndef getcwd
11310          char *getcwd ();
11311 #        endif
11312
11313 int
11314 main ()
11315 {
11316
11317 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
11318 /* mingw cwd does not start with '/', but getcwd does allocate.
11319    However, mingw fails to honor non-zero size.  */
11320 #else
11321            if (chdir ("/") != 0)
11322              return 1;
11323            else
11324              {
11325                char *f = getcwd (NULL, 0);
11326                if (! f)
11327                  return 2;
11328                if (f[0] != '/')
11329                  return 3;
11330                if (f[1] != '\0')
11331                  return 4;
11332                return 0;
11333              }
11334 #endif
11335
11336   ;
11337   return 0;
11338 }
11339 _ACEOF
11340 if ac_fn_c_try_run "$LINENO"; then :
11341   gl_cv_func_getcwd_null=yes
11342 else
11343   gl_cv_func_getcwd_null=no
11344 fi
11345 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11346   conftest.$ac_objext conftest.beam conftest.$ac_ext
11347 fi
11348
11349 fi
11350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_null" >&5
11351 $as_echo "$gl_cv_func_getcwd_null" >&6; }
11352
11353
11354   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getcwd with POSIX signature" >&5
11355 $as_echo_n "checking for getcwd with POSIX signature... " >&6; }
11356 if ${gl_cv_func_getcwd_posix_signature+:} false; then :
11357   $as_echo_n "(cached) " >&6
11358 else
11359   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11360 /* end confdefs.h.  */
11361 #include <unistd.h>
11362 int
11363 main ()
11364 {
11365 extern
11366            #ifdef __cplusplus
11367            "C"
11368            #endif
11369            char *getcwd (char *, size_t);
11370
11371   ;
11372   return 0;
11373 }
11374
11375 _ACEOF
11376 if ac_fn_c_try_compile "$LINENO"; then :
11377   gl_cv_func_getcwd_posix_signature=yes
11378 else
11379   gl_cv_func_getcwd_posix_signature=no
11380 fi
11381 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11382
11383 fi
11384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_posix_signature" >&5
11385 $as_echo "$gl_cv_func_getcwd_posix_signature" >&6; }
11386
11387 ac_fn_c_check_decl "$LINENO" "getcwd" "ac_cv_have_decl_getcwd" "$ac_includes_default"
11388 if test "x$ac_cv_have_decl_getcwd" = xyes; then :
11389   ac_have_decl=1
11390 else
11391   ac_have_decl=0
11392 fi
11393
11394 cat >>confdefs.h <<_ACEOF
11395 #define HAVE_DECL_GETCWD $ac_have_decl
11396 _ACEOF
11397
11398 ac_fn_c_check_decl "$LINENO" "getdelim" "ac_cv_have_decl_getdelim" "$ac_includes_default"
11399 if test "x$ac_cv_have_decl_getdelim" = xyes; then :
11400   ac_have_decl=1
11401 else
11402   ac_have_decl=0
11403 fi
11404
11405 cat >>confdefs.h <<_ACEOF
11406 #define HAVE_DECL_GETDELIM $ac_have_decl
11407 _ACEOF
11408
11409
11410
11411
11412
11413 ac_fn_c_check_decl "$LINENO" "getline" "ac_cv_have_decl_getline" "$ac_includes_default"
11414 if test "x$ac_cv_have_decl_getline" = xyes; then :
11415   ac_have_decl=1
11416 else
11417   ac_have_decl=0
11418 fi
11419
11420 cat >>confdefs.h <<_ACEOF
11421 #define HAVE_DECL_GETLINE $ac_have_decl
11422 _ACEOF
11423
11424
11425
11426
11427
11428
11429
11430
11431
11432
11433
11434
11435
11436
11437
11438
11439      if test $gl_cv_have_include_next = yes; then
11440        gl_cv_next_getopt_h='<'getopt.h'>'
11441      else
11442        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5
11443 $as_echo_n "checking absolute name of <getopt.h>... " >&6; }
11444 if ${gl_cv_next_getopt_h+:} false; then :
11445   $as_echo_n "(cached) " >&6
11446 else
11447
11448              if test $ac_cv_header_getopt_h = yes; then
11449
11450
11451                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11452 /* end confdefs.h.  */
11453 #include <getopt.h>
11454
11455 _ACEOF
11456                                                                                                                         case "$host_os" in
11457                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
11458                  *)    gl_absname_cpp="$ac_cpp" ;;
11459                esac
11460
11461                case "$host_os" in
11462                  mingw*)
11463                                                                                                                                      gl_dirsep_regex='[/\\]'
11464                    ;;
11465                  *)
11466                    gl_dirsep_regex='\/'
11467                    ;;
11468                esac
11469                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11470
11471                gl_header_literal_regex=`echo 'getopt.h' \
11472                                         | sed -e "$gl_make_literal_regex_sed"`
11473                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11474                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11475                    s|^/[^/]|//&|
11476                    p
11477                    q
11478                  }'
11479                                                             gl_cv_next_getopt_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11480                       sed -n "$gl_absolute_header_sed"`'"'
11481           else
11482                gl_cv_next_getopt_h='<'getopt.h'>'
11483              fi
11484
11485
11486 fi
11487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5
11488 $as_echo "$gl_cv_next_getopt_h" >&6; }
11489      fi
11490      NEXT_GETOPT_H=$gl_cv_next_getopt_h
11491
11492      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11493        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11494        gl_next_as_first_directive='<'getopt.h'>'
11495      else
11496        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11497        gl_next_as_first_directive=$gl_cv_next_getopt_h
11498      fi
11499      NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive
11500
11501
11502
11503
11504   if test $ac_cv_header_getopt_h = yes; then
11505     HAVE_GETOPT_H=1
11506   else
11507     HAVE_GETOPT_H=0
11508   fi
11509
11510
11511   gl_replace_getopt=
11512
11513     if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
11514     for ac_header in getopt.h
11515 do :
11516   ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
11517 if test "x$ac_cv_header_getopt_h" = xyes; then :
11518   cat >>confdefs.h <<_ACEOF
11519 #define HAVE_GETOPT_H 1
11520 _ACEOF
11521
11522 else
11523   gl_replace_getopt=yes
11524 fi
11525
11526 done
11527
11528   fi
11529
11530     if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
11531     for ac_func in getopt_long_only
11532 do :
11533   ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
11534 if test "x$ac_cv_func_getopt_long_only" = xyes; then :
11535   cat >>confdefs.h <<_ACEOF
11536 #define HAVE_GETOPT_LONG_ONLY 1
11537 _ACEOF
11538
11539 else
11540   gl_replace_getopt=yes
11541 fi
11542 done
11543
11544   fi
11545
11546           if test -z "$gl_replace_getopt"; then
11547     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5
11548 $as_echo_n "checking whether getopt is POSIX compatible... " >&6; }
11549 if ${gl_cv_func_getopt_posix+:} false; then :
11550   $as_echo_n "(cached) " >&6
11551 else
11552
11553                                                 if test $cross_compiling = no; then
11554                               if test "$cross_compiling" = yes; then :
11555   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11556 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11557 as_fn_error $? "cannot run test program while cross compiling
11558 See \`config.log' for more details" "$LINENO" 5; }
11559 else
11560   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11561 /* end confdefs.h.  */
11562
11563 #include <unistd.h>
11564 #include <stdlib.h>
11565 #include <string.h>
11566
11567 int
11568 main ()
11569 {
11570   static char program[] = "program";
11571   static char a[] = "-a";
11572   static char foo[] = "foo";
11573   static char bar[] = "bar";
11574   char *argv[] = { program, a, foo, bar, NULL };
11575   int c;
11576
11577   c = getopt (4, argv, "ab");
11578   if (!(c == 'a'))
11579     return 1;
11580   c = getopt (4, argv, "ab");
11581   if (!(c == -1))
11582     return 2;
11583   if (!(optind == 2))
11584     return 3;
11585   return 0;
11586 }
11587
11588 _ACEOF
11589 if ac_fn_c_try_run "$LINENO"; then :
11590   gl_cv_func_getopt_posix=maybe
11591 else
11592   gl_cv_func_getopt_posix=no
11593 fi
11594 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11595   conftest.$ac_objext conftest.beam conftest.$ac_ext
11596 fi
11597
11598           if test $gl_cv_func_getopt_posix = maybe; then
11599                                     if test "$cross_compiling" = yes; then :
11600   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11601 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11602 as_fn_error $? "cannot run test program while cross compiling
11603 See \`config.log' for more details" "$LINENO" 5; }
11604 else
11605   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11606 /* end confdefs.h.  */
11607
11608 #include <unistd.h>
11609 #include <stdlib.h>
11610 #include <string.h>
11611
11612 int
11613 main ()
11614 {
11615   static char program[] = "program";
11616   static char donald[] = "donald";
11617   static char p[] = "-p";
11618   static char billy[] = "billy";
11619   static char duck[] = "duck";
11620   static char a[] = "-a";
11621   static char bar[] = "bar";
11622   char *argv[] = { program, donald, p, billy, duck, a, bar, NULL };
11623   int c;
11624
11625   c = getopt (7, argv, "+abp:q:");
11626   if (!(c == -1))
11627     return 4;
11628   if (!(strcmp (argv[0], "program") == 0))
11629     return 5;
11630   if (!(strcmp (argv[1], "donald") == 0))
11631     return 6;
11632   if (!(strcmp (argv[2], "-p") == 0))
11633     return 7;
11634   if (!(strcmp (argv[3], "billy") == 0))
11635     return 8;
11636   if (!(strcmp (argv[4], "duck") == 0))
11637     return 9;
11638   if (!(strcmp (argv[5], "-a") == 0))
11639     return 10;
11640   if (!(strcmp (argv[6], "bar") == 0))
11641     return 11;
11642   if (!(optind == 1))
11643     return 12;
11644   return 0;
11645 }
11646
11647 _ACEOF
11648 if ac_fn_c_try_run "$LINENO"; then :
11649   gl_cv_func_getopt_posix=maybe
11650 else
11651   gl_cv_func_getopt_posix=no
11652 fi
11653 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11654   conftest.$ac_objext conftest.beam conftest.$ac_ext
11655 fi
11656
11657           fi
11658           if test $gl_cv_func_getopt_posix = maybe; then
11659                         if test "$cross_compiling" = yes; then :
11660   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11661 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11662 as_fn_error $? "cannot run test program while cross compiling
11663 See \`config.log' for more details" "$LINENO" 5; }
11664 else
11665   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11666 /* end confdefs.h.  */
11667
11668 #include <unistd.h>
11669 #include <stdlib.h>
11670 #include <string.h>
11671
11672 int
11673 main ()
11674 {
11675   static char program[] = "program";
11676   static char ab[] = "-ab";
11677   char *argv[3] = { program, ab, NULL };
11678   if (getopt (2, argv, "ab:") != 'a')
11679     return 13;
11680   if (getopt (2, argv, "ab:") != '?')
11681     return 14;
11682   if (optopt != 'b')
11683     return 15;
11684   if (optind != 2)
11685     return 16;
11686   return 0;
11687 }
11688
11689 _ACEOF
11690 if ac_fn_c_try_run "$LINENO"; then :
11691   gl_cv_func_getopt_posix=yes
11692 else
11693   gl_cv_func_getopt_posix=no
11694 fi
11695 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11696   conftest.$ac_objext conftest.beam conftest.$ac_ext
11697 fi
11698
11699           fi
11700         else
11701           case "$host_os" in
11702             darwin* | aix* | mingw*) gl_cv_func_getopt_posix="guessing no";;
11703             *)                       gl_cv_func_getopt_posix="guessing yes";;
11704           esac
11705         fi
11706
11707 fi
11708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5
11709 $as_echo "$gl_cv_func_getopt_posix" >&6; }
11710     case "$gl_cv_func_getopt_posix" in
11711       *no) gl_replace_getopt=yes ;;
11712     esac
11713   fi
11714
11715   if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
11716     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
11717 $as_echo_n "checking for working GNU getopt function... " >&6; }
11718 if ${gl_cv_func_getopt_gnu+:} false; then :
11719   $as_echo_n "(cached) " >&6
11720 else
11721   # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the
11722        # optstring is necessary for programs like m4 that have POSIX-mandated
11723        # semantics for supporting options interspersed with files.
11724        # Also, since getopt_long is a GNU extension, we require optind=0.
11725        # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT;
11726        # so take care to revert to the correct (non-)export state.
11727        gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }'
11728        case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in
11729          xx) gl_had_POSIXLY_CORRECT=exported ;;
11730          x)  gl_had_POSIXLY_CORRECT=yes      ;;
11731          *)  gl_had_POSIXLY_CORRECT=         ;;
11732        esac
11733        POSIXLY_CORRECT=1
11734        export POSIXLY_CORRECT
11735        if test "$cross_compiling" = yes; then :
11736            gl_cv_func_getopt_gnu="guessing no"
11737
11738 else
11739   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11740 /* end confdefs.h.  */
11741 #include <getopt.h>
11742                            #include <stddef.h>
11743                            #include <string.h>
11744
11745 #include <stdlib.h>
11746 #if defined __MACH__ && defined __APPLE__
11747 /* Avoid a crash on Mac OS X.  */
11748 #include <mach/mach.h>
11749 #include <mach/mach_error.h>
11750 #include <mach/thread_status.h>
11751 #include <mach/exception.h>
11752 #include <mach/task.h>
11753 #include <pthread.h>
11754 /* The exception port on which our thread listens.  */
11755 static mach_port_t our_exception_port;
11756 /* The main function of the thread listening for exceptions of type
11757    EXC_BAD_ACCESS.  */
11758 static void *
11759 mach_exception_thread (void *arg)
11760 {
11761   /* Buffer for a message to be received.  */
11762   struct {
11763     mach_msg_header_t head;
11764     mach_msg_body_t msgh_body;
11765     char data[1024];
11766   } msg;
11767   mach_msg_return_t retval;
11768   /* Wait for a message on the exception port.  */
11769   retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
11770                      our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
11771   if (retval != MACH_MSG_SUCCESS)
11772     abort ();
11773   exit (1);
11774 }
11775 static void
11776 nocrash_init (void)
11777 {
11778   mach_port_t self = mach_task_self ();
11779   /* Allocate a port on which the thread shall listen for exceptions.  */
11780   if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
11781       == KERN_SUCCESS) {
11782     /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html.  */
11783     if (mach_port_insert_right (self, our_exception_port, our_exception_port,
11784                                 MACH_MSG_TYPE_MAKE_SEND)
11785         == KERN_SUCCESS) {
11786       /* The exceptions we want to catch.  Only EXC_BAD_ACCESS is interesting
11787          for us.  */
11788       exception_mask_t mask = EXC_MASK_BAD_ACCESS;
11789       /* Create the thread listening on the exception port.  */
11790       pthread_attr_t attr;
11791       pthread_t thread;
11792       if (pthread_attr_init (&attr) == 0
11793           && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
11794           && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
11795         pthread_attr_destroy (&attr);
11796         /* Replace the exception port info for these exceptions with our own.
11797            Note that we replace the exception port for the entire task, not only
11798            for a particular thread.  This has the effect that when our exception
11799            port gets the message, the thread specific exception port has already
11800            been asked, and we don't need to bother about it.
11801            See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html.  */
11802         task_set_exception_ports (self, mask, our_exception_port,
11803                                   EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
11804       }
11805     }
11806   }
11807 }
11808 #elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
11809 /* Avoid a crash on native Windows.  */
11810 #define WIN32_LEAN_AND_MEAN
11811 #include <windows.h>
11812 #include <winerror.h>
11813 static LONG WINAPI
11814 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
11815 {
11816   switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
11817     {
11818     case EXCEPTION_ACCESS_VIOLATION:
11819     case EXCEPTION_IN_PAGE_ERROR:
11820     case EXCEPTION_STACK_OVERFLOW:
11821     case EXCEPTION_GUARD_PAGE:
11822     case EXCEPTION_PRIV_INSTRUCTION:
11823     case EXCEPTION_ILLEGAL_INSTRUCTION:
11824     case EXCEPTION_DATATYPE_MISALIGNMENT:
11825     case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
11826     case EXCEPTION_NONCONTINUABLE_EXCEPTION:
11827       exit (1);
11828     }
11829   return EXCEPTION_CONTINUE_SEARCH;
11830 }
11831 static void
11832 nocrash_init (void)
11833 {
11834   SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
11835 }
11836 #else
11837 /* Avoid a crash on POSIX systems.  */
11838 #include <signal.h>
11839 /* A POSIX signal handler.  */
11840 static void
11841 exception_handler (int sig)
11842 {
11843   exit (1);
11844 }
11845 static void
11846 nocrash_init (void)
11847 {
11848 #ifdef SIGSEGV
11849   signal (SIGSEGV, exception_handler);
11850 #endif
11851 #ifdef SIGBUS
11852   signal (SIGBUS, exception_handler);
11853 #endif
11854 }
11855 #endif
11856
11857
11858 int
11859 main ()
11860 {
11861
11862              int result = 0;
11863
11864              nocrash_init();
11865
11866              /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
11867                 and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
11868                 OSF/1 5.1, Solaris 10.  */
11869              {
11870                static char conftest[] = "conftest";
11871                static char plus[] = "-+";
11872                char *argv[3] = { conftest, plus, NULL };
11873                opterr = 0;
11874                if (getopt (2, argv, "+a") != '?')
11875                  result |= 1;
11876              }
11877              /* This code succeeds on glibc 2.8, mingw,
11878                 and fails on Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
11879                 IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x.  */
11880              {
11881                static char program[] = "program";
11882                static char p[] = "-p";
11883                static char foo[] = "foo";
11884                static char bar[] = "bar";
11885                char *argv[] = { program, p, foo, bar, NULL };
11886
11887                optind = 1;
11888                if (getopt (4, argv, "p::") != 'p')
11889                  result |= 2;
11890                else if (optarg != NULL)
11891                  result |= 4;
11892                else if (getopt (4, argv, "p::") != -1)
11893                  result |= 6;
11894                else if (optind != 2)
11895                  result |= 8;
11896              }
11897              /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0.  */
11898              {
11899                static char program[] = "program";
11900                static char foo[] = "foo";
11901                static char p[] = "-p";
11902                char *argv[] = { program, foo, p, NULL };
11903                optind = 0;
11904                if (getopt (3, argv, "-p") != 1)
11905                  result |= 16;
11906                else if (getopt (3, argv, "-p") != 'p')
11907                  result |= 16;
11908              }
11909              /* This code fails on glibc 2.11.  */
11910              {
11911                static char program[] = "program";
11912                static char b[] = "-b";
11913                static char a[] = "-a";
11914                char *argv[] = { program, b, a, NULL };
11915                optind = opterr = 0;
11916                if (getopt (3, argv, "+:a:b") != 'b')
11917                  result |= 32;
11918                else if (getopt (3, argv, "+:a:b") != ':')
11919                  result |= 32;
11920              }
11921              /* This code dumps core on glibc 2.14.  */
11922              {
11923                static char program[] = "program";
11924                static char w[] = "-W";
11925                static char dummy[] = "dummy";
11926                char *argv[] = { program, w, dummy, NULL };
11927                optind = opterr = 1;
11928                if (getopt (3, argv, "W;") != 'W')
11929                  result |= 64;
11930              }
11931              return result;
11932
11933   ;
11934   return 0;
11935 }
11936 _ACEOF
11937 if ac_fn_c_try_run "$LINENO"; then :
11938   gl_cv_func_getopt_gnu=yes
11939 else
11940   gl_cv_func_getopt_gnu=no
11941 fi
11942 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11943   conftest.$ac_objext conftest.beam conftest.$ac_ext
11944 fi
11945
11946        case $gl_had_POSIXLY_CORRECT in
11947          exported) ;;
11948          yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;;
11949          *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;;
11950        esac
11951
11952 fi
11953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5
11954 $as_echo "$gl_cv_func_getopt_gnu" >&6; }
11955     if test "$gl_cv_func_getopt_gnu" != yes; then
11956       gl_replace_getopt=yes
11957     else
11958       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt_long function" >&5
11959 $as_echo_n "checking for working GNU getopt_long function... " >&6; }
11960 if ${gl_cv_func_getopt_long_gnu+:} false; then :
11961   $as_echo_n "(cached) " >&6
11962 else
11963   if test "$cross_compiling" = yes; then :
11964               case "$host_os" in
11965               openbsd*) gl_cv_func_getopt_long_gnu="guessing no";;
11966               *)        gl_cv_func_getopt_long_gnu="guessing yes";;
11967             esac
11968
11969 else
11970   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11971 /* end confdefs.h.  */
11972 #include <getopt.h>
11973                 #include <stddef.h>
11974                 #include <string.h>
11975
11976 int
11977 main ()
11978 {
11979 static const struct option long_options[] =
11980                   {
11981                     { "xtremely-",no_argument,       NULL, 1003 },
11982                     { "xtra",     no_argument,       NULL, 1001 },
11983                     { "xtreme",   no_argument,       NULL, 1002 },
11984                     { "xtremely", no_argument,       NULL, 1003 },
11985                     { NULL,       0,                 NULL, 0 }
11986                   };
11987                 /* This code fails on OpenBSD 5.0.  */
11988                 {
11989                   static char program[] = "program";
11990                   static char xtremel[] = "--xtremel";
11991                   char *argv[] = { program, xtremel, NULL };
11992                   int option_index;
11993                   optind = 1; opterr = 0;
11994                   if (getopt_long (2, argv, "", long_options, &option_index) != 1003)
11995                     return 1;
11996                 }
11997                 return 0;
11998
11999   ;
12000   return 0;
12001 }
12002 _ACEOF
12003 if ac_fn_c_try_run "$LINENO"; then :
12004   gl_cv_func_getopt_long_gnu=yes
12005 else
12006   gl_cv_func_getopt_long_gnu=no
12007 fi
12008 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12009   conftest.$ac_objext conftest.beam conftest.$ac_ext
12010 fi
12011
12012
12013 fi
12014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_long_gnu" >&5
12015 $as_echo "$gl_cv_func_getopt_long_gnu" >&6; }
12016       case "$gl_cv_func_getopt_long_gnu" in
12017         *yes) ;;
12018         *) gl_replace_getopt=yes ;;
12019       esac
12020     fi
12021   fi
12022
12023
12024
12025
12026
12027
12028     REPLACE_GETOPT=1
12029
12030   if test $REPLACE_GETOPT = 1; then
12031
12032   GETOPT_H=getopt.h
12033
12034 $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
12035
12036
12037
12038   fi
12039
12040 ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default"
12041 if test "x$ac_cv_have_decl_getenv" = xyes; then :
12042   ac_have_decl=1
12043 else
12044   ac_have_decl=0
12045 fi
12046
12047 cat >>confdefs.h <<_ACEOF
12048 #define HAVE_DECL_GETENV $ac_have_decl
12049 _ACEOF
12050
12051 :
12052
12053
12054
12055
12056
12057   GNULIB_GETTIMEOFDAY=0;
12058     HAVE_GETTIMEOFDAY=1;
12059   HAVE_STRUCT_TIMEVAL=1;
12060   HAVE_SYS_TIME_H=1;
12061   REPLACE_GETTIMEOFDAY=0;
12062   REPLACE_STRUCT_TIMEVAL=0;
12063
12064
12065
12066
12067
12068
12069
12070
12071
12072
12073
12074
12075
12076
12077      if test $gl_cv_have_include_next = yes; then
12078        gl_cv_next_sys_time_h='<'sys/time.h'>'
12079      else
12080        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
12081 $as_echo_n "checking absolute name of <sys/time.h>... " >&6; }
12082 if ${gl_cv_next_sys_time_h+:} false; then :
12083   $as_echo_n "(cached) " >&6
12084 else
12085
12086              if test $ac_cv_header_sys_time_h = yes; then
12087
12088
12089                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12090 /* end confdefs.h.  */
12091 #include <sys/time.h>
12092
12093 _ACEOF
12094                                                                                                                         case "$host_os" in
12095                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
12096                  *)    gl_absname_cpp="$ac_cpp" ;;
12097                esac
12098
12099                case "$host_os" in
12100                  mingw*)
12101                                                                                                                                      gl_dirsep_regex='[/\\]'
12102                    ;;
12103                  *)
12104                    gl_dirsep_regex='\/'
12105                    ;;
12106                esac
12107                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12108
12109                gl_header_literal_regex=`echo 'sys/time.h' \
12110                                         | sed -e "$gl_make_literal_regex_sed"`
12111                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12112                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12113                    s|^/[^/]|//&|
12114                    p
12115                    q
12116                  }'
12117                                                             gl_cv_next_sys_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12118                       sed -n "$gl_absolute_header_sed"`'"'
12119           else
12120                gl_cv_next_sys_time_h='<'sys/time.h'>'
12121              fi
12122
12123
12124 fi
12125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
12126 $as_echo "$gl_cv_next_sys_time_h" >&6; }
12127      fi
12128      NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
12129
12130      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12131        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12132        gl_next_as_first_directive='<'sys/time.h'>'
12133      else
12134        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12135        gl_next_as_first_directive=$gl_cv_next_sys_time_h
12136      fi
12137      NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
12138
12139
12140
12141
12142
12143   if test $ac_cv_header_sys_time_h != yes; then
12144     HAVE_SYS_TIME_H=0
12145   fi
12146
12147
12148
12149
12150
12151   if test $ac_cv_header_sys_socket_h != yes; then
12152                     for ac_header in winsock2.h
12153 do :
12154   ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
12155 if test "x$ac_cv_header_winsock2_h" = xyes; then :
12156   cat >>confdefs.h <<_ACEOF
12157 #define HAVE_WINSOCK2_H 1
12158 _ACEOF
12159
12160 fi
12161
12162 done
12163
12164   fi
12165   if test "$ac_cv_header_winsock2_h" = yes; then
12166     HAVE_WINSOCK2_H=1
12167     UNISTD_H_HAVE_WINSOCK2_H=1
12168     SYS_IOCTL_H_HAVE_WINSOCK2_H=1
12169   else
12170     HAVE_WINSOCK2_H=0
12171   fi
12172
12173
12174   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
12175 $as_echo_n "checking for struct timeval... " >&6; }
12176 if ${gl_cv_sys_struct_timeval+:} false; then :
12177   $as_echo_n "(cached) " >&6
12178 else
12179   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12180 /* end confdefs.h.  */
12181 #if HAVE_SYS_TIME_H
12182              #include <sys/time.h>
12183             #endif
12184             #include <time.h>
12185             #if HAVE_WINSOCK2_H
12186             # include <winsock2.h>
12187             #endif
12188
12189 int
12190 main ()
12191 {
12192 static struct timeval x; x.tv_sec = x.tv_usec;
12193   ;
12194   return 0;
12195 }
12196 _ACEOF
12197 if ac_fn_c_try_compile "$LINENO"; then :
12198   gl_cv_sys_struct_timeval=yes
12199 else
12200   gl_cv_sys_struct_timeval=no
12201 fi
12202 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12203
12204 fi
12205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
12206 $as_echo "$gl_cv_sys_struct_timeval" >&6; }
12207   if test $gl_cv_sys_struct_timeval != yes; then
12208     HAVE_STRUCT_TIMEVAL=0
12209   else
12210                             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
12211 $as_echo_n "checking for wide-enough struct timeval.tv_sec member... " >&6; }
12212 if ${gl_cv_sys_struct_timeval_tv_sec+:} false; then :
12213   $as_echo_n "(cached) " >&6
12214 else
12215   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12216 /* end confdefs.h.  */
12217 #if HAVE_SYS_TIME_H
12218                #include <sys/time.h>
12219               #endif
12220               #include <time.h>
12221               #if HAVE_WINSOCK2_H
12222               # include <winsock2.h>
12223               #endif
12224
12225 int
12226 main ()
12227 {
12228 static struct timeval x;
12229               typedef int verify_tv_sec_type[
12230                 sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
12231               ];
12232
12233   ;
12234   return 0;
12235 }
12236 _ACEOF
12237 if ac_fn_c_try_compile "$LINENO"; then :
12238   gl_cv_sys_struct_timeval_tv_sec=yes
12239 else
12240   gl_cv_sys_struct_timeval_tv_sec=no
12241 fi
12242 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12243
12244 fi
12245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
12246 $as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
12247     if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
12248       REPLACE_STRUCT_TIMEVAL=1
12249     fi
12250   fi
12251
12252
12253     for gl_func in gettimeofday; do
12254     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
12255     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
12256 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
12257 if eval \${$as_gl_Symbol+:} false; then :
12258   $as_echo_n "(cached) " >&6
12259 else
12260   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12261 /* end confdefs.h.  */
12262
12263 #if HAVE_SYS_TIME_H
12264 # include <sys/time.h>
12265 #endif
12266 #include <time.h>
12267
12268 int
12269 main ()
12270 {
12271 #undef $gl_func
12272   (void) $gl_func;
12273   ;
12274   return 0;
12275 }
12276 _ACEOF
12277 if ac_fn_c_try_compile "$LINENO"; then :
12278   eval "$as_gl_Symbol=yes"
12279 else
12280   eval "$as_gl_Symbol=no"
12281 fi
12282 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12283 fi
12284 eval ac_res=\$$as_gl_Symbol
12285                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12286 $as_echo "$ac_res" >&6; }
12287     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
12288   cat >>confdefs.h <<_ACEOF
12289 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
12290 _ACEOF
12291
12292                      eval ac_cv_have_decl_$gl_func=yes
12293 fi
12294       done
12295
12296
12297
12298
12299
12300
12301   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
12302 $as_echo_n "checking for unsigned long long int... " >&6; }
12303 if ${ac_cv_type_unsigned_long_long_int+:} false; then :
12304   $as_echo_n "(cached) " >&6
12305 else
12306   ac_cv_type_unsigned_long_long_int=yes
12307      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
12308        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12309 /* end confdefs.h.  */
12310
12311   /* For now, do not test the preprocessor; as of 2007 there are too many
12312          implementations with broken preprocessors.  Perhaps this can
12313          be revisited in 2012.  In the meantime, code should not expect
12314          #if to work with literals wider than 32 bits.  */
12315       /* Test literals.  */
12316       long long int ll = 9223372036854775807ll;
12317       long long int nll = -9223372036854775807LL;
12318       unsigned long long int ull = 18446744073709551615ULL;
12319       /* Test constant expressions.   */
12320       typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
12321                      ? 1 : -1)];
12322       typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
12323                      ? 1 : -1)];
12324       int i = 63;
12325 int
12326 main ()
12327 {
12328 /* Test availability of runtime routines for shift and division.  */
12329       long long int llmax = 9223372036854775807ll;
12330       unsigned long long int ullmax = 18446744073709551615ull;
12331       return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
12332               | (llmax / ll) | (llmax % ll)
12333               | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
12334               | (ullmax / ull) | (ullmax % ull));
12335   ;
12336   return 0;
12337 }
12338
12339 _ACEOF
12340 if ac_fn_c_try_link "$LINENO"; then :
12341
12342 else
12343   ac_cv_type_unsigned_long_long_int=no
12344 fi
12345 rm -f core conftest.err conftest.$ac_objext \
12346     conftest$ac_exeext conftest.$ac_ext
12347      fi
12348 fi
12349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
12350 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
12351   if test $ac_cv_type_unsigned_long_long_int = yes; then
12352
12353 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
12354
12355   fi
12356
12357
12358
12359   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
12360 $as_echo_n "checking for long long int... " >&6; }
12361 if ${ac_cv_type_long_long_int+:} false; then :
12362   $as_echo_n "(cached) " >&6
12363 else
12364   ac_cv_type_long_long_int=yes
12365       if test "x${ac_cv_prog_cc_c99-no}" = xno; then
12366         ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
12367         if test $ac_cv_type_long_long_int = yes; then
12368                                         if test "$cross_compiling" = yes; then :
12369   :
12370 else
12371   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12372 /* end confdefs.h.  */
12373 #include <limits.h>
12374                  #ifndef LLONG_MAX
12375                  # define HALF \
12376                           (1LL << (sizeof (long long int) * CHAR_BIT - 2))
12377                  # define LLONG_MAX (HALF - 1 + HALF)
12378                  #endif
12379 int
12380 main ()
12381 {
12382 long long int n = 1;
12383                  int i;
12384                  for (i = 0; ; i++)
12385                    {
12386                      long long int m = n << i;
12387                      if (m >> i != n)
12388                        return 1;
12389                      if (LLONG_MAX / 2 < m)
12390                        break;
12391                    }
12392                  return 0;
12393   ;
12394   return 0;
12395 }
12396 _ACEOF
12397 if ac_fn_c_try_run "$LINENO"; then :
12398
12399 else
12400   ac_cv_type_long_long_int=no
12401 fi
12402 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12403   conftest.$ac_objext conftest.beam conftest.$ac_ext
12404 fi
12405
12406         fi
12407       fi
12408 fi
12409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
12410 $as_echo "$ac_cv_type_long_long_int" >&6; }
12411   if test $ac_cv_type_long_long_int = yes; then
12412
12413 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
12414
12415   fi
12416
12417
12418
12419
12420
12421
12422     gl_cv_c_multiarch=no
12423   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12424 /* end confdefs.h.  */
12425 #ifndef __APPLE_CC__
12426          not a universal capable compiler
12427         #endif
12428         typedef int dummy;
12429
12430 _ACEOF
12431 if ac_fn_c_try_compile "$LINENO"; then :
12432
12433                arch=
12434      prev=
12435      for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
12436        if test -n "$prev"; then
12437          case $word in
12438            i?86 | x86_64 | ppc | ppc64)
12439              if test -z "$arch" || test "$arch" = "$word"; then
12440                arch="$word"
12441              else
12442                gl_cv_c_multiarch=yes
12443              fi
12444              ;;
12445          esac
12446          prev=
12447        else
12448          if test "x$word" = "x-arch"; then
12449            prev=arch
12450          fi
12451        fi
12452      done
12453
12454 fi
12455 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12456   if test $gl_cv_c_multiarch = yes; then
12457     APPLE_UNIVERSAL_BUILD=1
12458   else
12459     APPLE_UNIVERSAL_BUILD=0
12460   fi
12461
12462
12463
12464
12465
12466   if test $ac_cv_type_long_long_int = yes; then
12467     HAVE_LONG_LONG_INT=1
12468   else
12469     HAVE_LONG_LONG_INT=0
12470   fi
12471
12472
12473   if test $ac_cv_type_unsigned_long_long_int = yes; then
12474     HAVE_UNSIGNED_LONG_LONG_INT=1
12475   else
12476     HAVE_UNSIGNED_LONG_LONG_INT=0
12477   fi
12478
12479
12480
12481   if test $ac_cv_header_wchar_h = yes; then
12482     HAVE_WCHAR_H=1
12483   else
12484     HAVE_WCHAR_H=0
12485   fi
12486
12487
12488       if test $ac_cv_header_inttypes_h = yes; then
12489     HAVE_INTTYPES_H=1
12490   else
12491     HAVE_INTTYPES_H=0
12492   fi
12493
12494
12495       if test $ac_cv_header_sys_types_h = yes; then
12496     HAVE_SYS_TYPES_H=1
12497   else
12498     HAVE_SYS_TYPES_H=0
12499   fi
12500
12501
12502
12503
12504
12505
12506
12507
12508
12509
12510
12511      if test $gl_cv_have_include_next = yes; then
12512        gl_cv_next_stdint_h='<'stdint.h'>'
12513      else
12514        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
12515 $as_echo_n "checking absolute name of <stdint.h>... " >&6; }
12516 if ${gl_cv_next_stdint_h+:} false; then :
12517   $as_echo_n "(cached) " >&6
12518 else
12519
12520              if test $ac_cv_header_stdint_h = yes; then
12521
12522
12523                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12524 /* end confdefs.h.  */
12525 #include <stdint.h>
12526
12527 _ACEOF
12528                                                                                                                         case "$host_os" in
12529                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
12530                  *)    gl_absname_cpp="$ac_cpp" ;;
12531                esac
12532
12533                case "$host_os" in
12534                  mingw*)
12535                                                                                                                                      gl_dirsep_regex='[/\\]'
12536                    ;;
12537                  *)
12538                    gl_dirsep_regex='\/'
12539                    ;;
12540                esac
12541                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12542
12543                gl_header_literal_regex=`echo 'stdint.h' \
12544                                         | sed -e "$gl_make_literal_regex_sed"`
12545                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12546                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12547                    s|^/[^/]|//&|
12548                    p
12549                    q
12550                  }'
12551                                                             gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12552                       sed -n "$gl_absolute_header_sed"`'"'
12553           else
12554                gl_cv_next_stdint_h='<'stdint.h'>'
12555              fi
12556
12557
12558 fi
12559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
12560 $as_echo "$gl_cv_next_stdint_h" >&6; }
12561      fi
12562      NEXT_STDINT_H=$gl_cv_next_stdint_h
12563
12564      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12565        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12566        gl_next_as_first_directive='<'stdint.h'>'
12567      else
12568        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12569        gl_next_as_first_directive=$gl_cv_next_stdint_h
12570      fi
12571      NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
12572
12573
12574
12575
12576   if test $ac_cv_header_stdint_h = yes; then
12577     HAVE_STDINT_H=1
12578   else
12579     HAVE_STDINT_H=0
12580   fi
12581
12582
12583     if test $ac_cv_header_stdint_h = yes; then
12584     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
12585 $as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
12586 if ${gl_cv_header_working_stdint_h+:} false; then :
12587   $as_echo_n "(cached) " >&6
12588 else
12589   gl_cv_header_working_stdint_h=no
12590        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12591 /* end confdefs.h.  */
12592
12593
12594 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
12595 #include <stdint.h>
12596 /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>.  */
12597 #if !(defined WCHAR_MIN && defined WCHAR_MAX)
12598 #error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
12599 #endif
12600
12601
12602   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12603      included before <wchar.h>.  */
12604   #include <stddef.h>
12605   #include <signal.h>
12606   #if HAVE_WCHAR_H
12607   # include <stdio.h>
12608   # include <time.h>
12609   # include <wchar.h>
12610   #endif
12611
12612
12613 #ifdef INT8_MAX
12614 int8_t a1 = INT8_MAX;
12615 int8_t a1min = INT8_MIN;
12616 #endif
12617 #ifdef INT16_MAX
12618 int16_t a2 = INT16_MAX;
12619 int16_t a2min = INT16_MIN;
12620 #endif
12621 #ifdef INT32_MAX
12622 int32_t a3 = INT32_MAX;
12623 int32_t a3min = INT32_MIN;
12624 #endif
12625 #ifdef INT64_MAX
12626 int64_t a4 = INT64_MAX;
12627 int64_t a4min = INT64_MIN;
12628 #endif
12629 #ifdef UINT8_MAX
12630 uint8_t b1 = UINT8_MAX;
12631 #else
12632 typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
12633 #endif
12634 #ifdef UINT16_MAX
12635 uint16_t b2 = UINT16_MAX;
12636 #endif
12637 #ifdef UINT32_MAX
12638 uint32_t b3 = UINT32_MAX;
12639 #endif
12640 #ifdef UINT64_MAX
12641 uint64_t b4 = UINT64_MAX;
12642 #endif
12643 int_least8_t c1 = INT8_C (0x7f);
12644 int_least8_t c1max = INT_LEAST8_MAX;
12645 int_least8_t c1min = INT_LEAST8_MIN;
12646 int_least16_t c2 = INT16_C (0x7fff);
12647 int_least16_t c2max = INT_LEAST16_MAX;
12648 int_least16_t c2min = INT_LEAST16_MIN;
12649 int_least32_t c3 = INT32_C (0x7fffffff);
12650 int_least32_t c3max = INT_LEAST32_MAX;
12651 int_least32_t c3min = INT_LEAST32_MIN;
12652 int_least64_t c4 = INT64_C (0x7fffffffffffffff);
12653 int_least64_t c4max = INT_LEAST64_MAX;
12654 int_least64_t c4min = INT_LEAST64_MIN;
12655 uint_least8_t d1 = UINT8_C (0xff);
12656 uint_least8_t d1max = UINT_LEAST8_MAX;
12657 uint_least16_t d2 = UINT16_C (0xffff);
12658 uint_least16_t d2max = UINT_LEAST16_MAX;
12659 uint_least32_t d3 = UINT32_C (0xffffffff);
12660 uint_least32_t d3max = UINT_LEAST32_MAX;
12661 uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
12662 uint_least64_t d4max = UINT_LEAST64_MAX;
12663 int_fast8_t e1 = INT_FAST8_MAX;
12664 int_fast8_t e1min = INT_FAST8_MIN;
12665 int_fast16_t e2 = INT_FAST16_MAX;
12666 int_fast16_t e2min = INT_FAST16_MIN;
12667 int_fast32_t e3 = INT_FAST32_MAX;
12668 int_fast32_t e3min = INT_FAST32_MIN;
12669 int_fast64_t e4 = INT_FAST64_MAX;
12670 int_fast64_t e4min = INT_FAST64_MIN;
12671 uint_fast8_t f1 = UINT_FAST8_MAX;
12672 uint_fast16_t f2 = UINT_FAST16_MAX;
12673 uint_fast32_t f3 = UINT_FAST32_MAX;
12674 uint_fast64_t f4 = UINT_FAST64_MAX;
12675 #ifdef INTPTR_MAX
12676 intptr_t g = INTPTR_MAX;
12677 intptr_t gmin = INTPTR_MIN;
12678 #endif
12679 #ifdef UINTPTR_MAX
12680 uintptr_t h = UINTPTR_MAX;
12681 #endif
12682 intmax_t i = INTMAX_MAX;
12683 uintmax_t j = UINTMAX_MAX;
12684
12685 #include <limits.h> /* for CHAR_BIT */
12686 #define TYPE_MINIMUM(t) \
12687   ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
12688 #define TYPE_MAXIMUM(t) \
12689   ((t) ((t) 0 < (t) -1 \
12690         ? (t) -1 \
12691         : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
12692 struct s {
12693   int check_PTRDIFF:
12694       PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
12695       && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
12696       ? 1 : -1;
12697   /* Detect bug in FreeBSD 6.0 / ia64.  */
12698   int check_SIG_ATOMIC:
12699       SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
12700       && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
12701       ? 1 : -1;
12702   int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
12703   int check_WCHAR:
12704       WCHAR_MIN == TYPE_MINIMUM (wchar_t)
12705       && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
12706       ? 1 : -1;
12707   /* Detect bug in mingw.  */
12708   int check_WINT:
12709       WINT_MIN == TYPE_MINIMUM (wint_t)
12710       && WINT_MAX == TYPE_MAXIMUM (wint_t)
12711       ? 1 : -1;
12712
12713   /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others.  */
12714   int check_UINT8_C:
12715         (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
12716   int check_UINT16_C:
12717         (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
12718
12719   /* Detect bugs in OpenBSD 3.9 stdint.h.  */
12720 #ifdef UINT8_MAX
12721   int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
12722 #endif
12723 #ifdef UINT16_MAX
12724   int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
12725 #endif
12726 #ifdef UINT32_MAX
12727   int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
12728 #endif
12729 #ifdef UINT64_MAX
12730   int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
12731 #endif
12732   int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
12733   int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
12734   int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
12735   int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
12736   int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
12737   int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
12738   int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
12739   int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
12740   int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
12741   int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
12742   int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
12743 };
12744
12745 int
12746 main ()
12747 {
12748
12749   ;
12750   return 0;
12751 }
12752 _ACEOF
12753 if ac_fn_c_try_compile "$LINENO"; then :
12754                                                     if test "$cross_compiling" = yes; then :
12755                  gl_cv_header_working_stdint_h=yes
12756
12757 else
12758   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12759 /* end confdefs.h.  */
12760
12761
12762 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
12763 #include <stdint.h>
12764
12765
12766   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12767      included before <wchar.h>.  */
12768   #include <stddef.h>
12769   #include <signal.h>
12770   #if HAVE_WCHAR_H
12771   # include <stdio.h>
12772   # include <time.h>
12773   # include <wchar.h>
12774   #endif
12775
12776
12777 #include <stdio.h>
12778 #include <string.h>
12779 #define MVAL(macro) MVAL1(macro)
12780 #define MVAL1(expression) #expression
12781 static const char *macro_values[] =
12782   {
12783 #ifdef INT8_MAX
12784     MVAL (INT8_MAX),
12785 #endif
12786 #ifdef INT16_MAX
12787     MVAL (INT16_MAX),
12788 #endif
12789 #ifdef INT32_MAX
12790     MVAL (INT32_MAX),
12791 #endif
12792 #ifdef INT64_MAX
12793     MVAL (INT64_MAX),
12794 #endif
12795 #ifdef UINT8_MAX
12796     MVAL (UINT8_MAX),
12797 #endif
12798 #ifdef UINT16_MAX
12799     MVAL (UINT16_MAX),
12800 #endif
12801 #ifdef UINT32_MAX
12802     MVAL (UINT32_MAX),
12803 #endif
12804 #ifdef UINT64_MAX
12805     MVAL (UINT64_MAX),
12806 #endif
12807     NULL
12808   };
12809
12810 int
12811 main ()
12812 {
12813
12814   const char **mv;
12815   for (mv = macro_values; *mv != NULL; mv++)
12816     {
12817       const char *value = *mv;
12818       /* Test whether it looks like a cast expression.  */
12819       if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
12820           || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
12821           || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
12822           || strncmp (value, "((int)"/*)*/, 6) == 0
12823           || strncmp (value, "((signed short)"/*)*/, 15) == 0
12824           || strncmp (value, "((signed char)"/*)*/, 14) == 0)
12825         return mv - macro_values + 1;
12826     }
12827   return 0;
12828
12829   ;
12830   return 0;
12831 }
12832 _ACEOF
12833 if ac_fn_c_try_run "$LINENO"; then :
12834   gl_cv_header_working_stdint_h=yes
12835 fi
12836 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12837   conftest.$ac_objext conftest.beam conftest.$ac_ext
12838 fi
12839
12840
12841 fi
12842 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12843
12844 fi
12845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
12846 $as_echo "$gl_cv_header_working_stdint_h" >&6; }
12847   fi
12848   if test "$gl_cv_header_working_stdint_h" = yes; then
12849     STDINT_H=
12850   else
12851             for ac_header in sys/inttypes.h sys/bitypes.h
12852 do :
12853   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12854 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12855 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12856   cat >>confdefs.h <<_ACEOF
12857 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12858 _ACEOF
12859
12860 fi
12861
12862 done
12863
12864     if test $ac_cv_header_sys_inttypes_h = yes; then
12865       HAVE_SYS_INTTYPES_H=1
12866     else
12867       HAVE_SYS_INTTYPES_H=0
12868     fi
12869
12870     if test $ac_cv_header_sys_bitypes_h = yes; then
12871       HAVE_SYS_BITYPES_H=1
12872     else
12873       HAVE_SYS_BITYPES_H=0
12874     fi
12875
12876
12877
12878
12879   if test $APPLE_UNIVERSAL_BUILD = 0; then
12880
12881
12882   for gltype in ptrdiff_t size_t ; do
12883     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
12884 $as_echo_n "checking for bit size of $gltype... " >&6; }
12885 if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
12886   $as_echo_n "(cached) " >&6
12887 else
12888   if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result"        "
12889   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12890      included before <wchar.h>.  */
12891   #include <stddef.h>
12892   #include <signal.h>
12893   #if HAVE_WCHAR_H
12894   # include <stdio.h>
12895   # include <time.h>
12896   # include <wchar.h>
12897   #endif
12898
12899 #include <limits.h>"; then :
12900
12901 else
12902   result=unknown
12903 fi
12904
12905        eval gl_cv_bitsizeof_${gltype}=\$result
12906
12907 fi
12908 eval ac_res=\$gl_cv_bitsizeof_${gltype}
12909                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12910 $as_echo "$ac_res" >&6; }
12911     eval result=\$gl_cv_bitsizeof_${gltype}
12912     if test $result = unknown; then
12913                                                 result=0
12914     fi
12915     GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
12916     cat >>confdefs.h <<_ACEOF
12917 #define BITSIZEOF_${GLTYPE} $result
12918 _ACEOF
12919
12920     eval BITSIZEOF_${GLTYPE}=\$result
12921   done
12922
12923
12924   fi
12925
12926
12927   for gltype in sig_atomic_t wchar_t wint_t ; do
12928     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
12929 $as_echo_n "checking for bit size of $gltype... " >&6; }
12930 if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
12931   $as_echo_n "(cached) " >&6
12932 else
12933   if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result"        "
12934   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12935      included before <wchar.h>.  */
12936   #include <stddef.h>
12937   #include <signal.h>
12938   #if HAVE_WCHAR_H
12939   # include <stdio.h>
12940   # include <time.h>
12941   # include <wchar.h>
12942   #endif
12943
12944 #include <limits.h>"; then :
12945
12946 else
12947   result=unknown
12948 fi
12949
12950        eval gl_cv_bitsizeof_${gltype}=\$result
12951
12952 fi
12953 eval ac_res=\$gl_cv_bitsizeof_${gltype}
12954                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12955 $as_echo "$ac_res" >&6; }
12956     eval result=\$gl_cv_bitsizeof_${gltype}
12957     if test $result = unknown; then
12958                                                 result=0
12959     fi
12960     GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
12961     cat >>confdefs.h <<_ACEOF
12962 #define BITSIZEOF_${GLTYPE} $result
12963 _ACEOF
12964
12965     eval BITSIZEOF_${GLTYPE}=\$result
12966   done
12967
12968
12969
12970
12971   for gltype in sig_atomic_t wchar_t wint_t ; do
12972     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
12973 $as_echo_n "checking whether $gltype is signed... " >&6; }
12974 if eval \${gl_cv_type_${gltype}_signed+:} false; then :
12975   $as_echo_n "(cached) " >&6
12976 else
12977   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12978 /* end confdefs.h.  */
12979
12980   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12981      included before <wchar.h>.  */
12982   #include <stddef.h>
12983   #include <signal.h>
12984   #if HAVE_WCHAR_H
12985   # include <stdio.h>
12986   # include <time.h>
12987   # include <wchar.h>
12988   #endif
12989
12990             int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
12991 int
12992 main ()
12993 {
12994
12995   ;
12996   return 0;
12997 }
12998 _ACEOF
12999 if ac_fn_c_try_compile "$LINENO"; then :
13000   result=yes
13001 else
13002   result=no
13003 fi
13004 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13005        eval gl_cv_type_${gltype}_signed=\$result
13006
13007 fi
13008 eval ac_res=\$gl_cv_type_${gltype}_signed
13009                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13010 $as_echo "$ac_res" >&6; }
13011     eval result=\$gl_cv_type_${gltype}_signed
13012     GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
13013     if test "$result" = yes; then
13014       cat >>confdefs.h <<_ACEOF
13015 #define HAVE_SIGNED_${GLTYPE} 1
13016 _ACEOF
13017
13018       eval HAVE_SIGNED_${GLTYPE}=1
13019     else
13020       eval HAVE_SIGNED_${GLTYPE}=0
13021     fi
13022   done
13023
13024
13025   gl_cv_type_ptrdiff_t_signed=yes
13026   gl_cv_type_size_t_signed=no
13027   if test $APPLE_UNIVERSAL_BUILD = 0; then
13028
13029
13030   for gltype in ptrdiff_t size_t ; do
13031     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
13032 $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
13033 if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
13034   $as_echo_n "(cached) " >&6
13035 else
13036   eval gl_cv_type_${gltype}_suffix=no
13037        eval result=\$gl_cv_type_${gltype}_signed
13038        if test "$result" = yes; then
13039          glsufu=
13040        else
13041          glsufu=u
13042        fi
13043        for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
13044          case $glsuf in
13045            '')  gltype1='int';;
13046            l)   gltype1='long int';;
13047            ll)  gltype1='long long int';;
13048            i64) gltype1='__int64';;
13049            u)   gltype1='unsigned int';;
13050            ul)  gltype1='unsigned long int';;
13051            ull) gltype1='unsigned long long int';;
13052            ui64)gltype1='unsigned __int64';;
13053          esac
13054          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13055 /* end confdefs.h.  */
13056
13057   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
13058      included before <wchar.h>.  */
13059   #include <stddef.h>
13060   #include <signal.h>
13061   #if HAVE_WCHAR_H
13062   # include <stdio.h>
13063   # include <time.h>
13064   # include <wchar.h>
13065   #endif
13066
13067               extern $gltype foo;
13068               extern $gltype1 foo;
13069 int
13070 main ()
13071 {
13072
13073   ;
13074   return 0;
13075 }
13076 _ACEOF
13077 if ac_fn_c_try_compile "$LINENO"; then :
13078   eval gl_cv_type_${gltype}_suffix=\$glsuf
13079 fi
13080 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13081          eval result=\$gl_cv_type_${gltype}_suffix
13082          test "$result" != no && break
13083        done
13084 fi
13085 eval ac_res=\$gl_cv_type_${gltype}_suffix
13086                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13087 $as_echo "$ac_res" >&6; }
13088     GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
13089     eval result=\$gl_cv_type_${gltype}_suffix
13090     test "$result" = no && result=
13091     eval ${GLTYPE}_SUFFIX=\$result
13092     cat >>confdefs.h <<_ACEOF
13093 #define ${GLTYPE}_SUFFIX $result
13094 _ACEOF
13095
13096   done
13097
13098
13099   fi
13100
13101
13102   for gltype in sig_atomic_t wchar_t wint_t ; do
13103     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
13104 $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
13105 if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
13106   $as_echo_n "(cached) " >&6
13107 else
13108   eval gl_cv_type_${gltype}_suffix=no
13109        eval result=\$gl_cv_type_${gltype}_signed
13110        if test "$result" = yes; then
13111          glsufu=
13112        else
13113          glsufu=u
13114        fi
13115        for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
13116          case $glsuf in
13117            '')  gltype1='int';;
13118            l)   gltype1='long int';;
13119            ll)  gltype1='long long int';;
13120            i64) gltype1='__int64';;
13121            u)   gltype1='unsigned int';;
13122            ul)  gltype1='unsigned long int';;
13123            ull) gltype1='unsigned long long int';;
13124            ui64)gltype1='unsigned __int64';;
13125          esac
13126          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13127 /* end confdefs.h.  */
13128
13129   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
13130      included before <wchar.h>.  */
13131   #include <stddef.h>
13132   #include <signal.h>
13133   #if HAVE_WCHAR_H
13134   # include <stdio.h>
13135   # include <time.h>
13136   # include <wchar.h>
13137   #endif
13138
13139               extern $gltype foo;
13140               extern $gltype1 foo;
13141 int
13142 main ()
13143 {
13144
13145   ;
13146   return 0;
13147 }
13148 _ACEOF
13149 if ac_fn_c_try_compile "$LINENO"; then :
13150   eval gl_cv_type_${gltype}_suffix=\$glsuf
13151 fi
13152 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13153          eval result=\$gl_cv_type_${gltype}_suffix
13154          test "$result" != no && break
13155        done
13156 fi
13157 eval ac_res=\$gl_cv_type_${gltype}_suffix
13158                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13159 $as_echo "$ac_res" >&6; }
13160     GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
13161     eval result=\$gl_cv_type_${gltype}_suffix
13162     test "$result" = no && result=
13163     eval ${GLTYPE}_SUFFIX=\$result
13164     cat >>confdefs.h <<_ACEOF
13165 #define ${GLTYPE}_SUFFIX $result
13166 _ACEOF
13167
13168   done
13169
13170
13171
13172           if test $BITSIZEOF_WINT_T -lt 32; then
13173     BITSIZEOF_WINT_T=32
13174   fi
13175
13176     STDINT_H=stdint.h
13177   fi
13178
13179    if test -n "$STDINT_H"; then
13180   GL_GENERATE_STDINT_H_TRUE=
13181   GL_GENERATE_STDINT_H_FALSE='#'
13182 else
13183   GL_GENERATE_STDINT_H_TRUE='#'
13184   GL_GENERATE_STDINT_H_FALSE=
13185 fi
13186
13187
13188
13189
13190
13191   GNULIB_IMAXABS=0;
13192   GNULIB_IMAXDIV=0;
13193   GNULIB_STRTOIMAX=0;
13194   GNULIB_STRTOUMAX=0;
13195     HAVE_DECL_IMAXABS=1;
13196   HAVE_DECL_IMAXDIV=1;
13197   HAVE_DECL_STRTOIMAX=1;
13198   HAVE_DECL_STRTOUMAX=1;
13199   REPLACE_STRTOIMAX=0;
13200   INT32_MAX_LT_INTMAX_MAX=1;
13201   INT64_MAX_EQ_LONG_MAX='defined _LP64';
13202   PRI_MACROS_BROKEN=0;
13203   PRIPTR_PREFIX=__PRIPTR_PREFIX;
13204   UINT32_MAX_LT_UINTMAX_MAX=1;
13205   UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
13206
13207
13208
13209
13210
13211
13212
13213
13214
13215
13216
13217
13218
13219
13220
13221      if test $gl_cv_have_include_next = yes; then
13222        gl_cv_next_inttypes_h='<'inttypes.h'>'
13223      else
13224        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
13225 $as_echo_n "checking absolute name of <inttypes.h>... " >&6; }
13226 if ${gl_cv_next_inttypes_h+:} false; then :
13227   $as_echo_n "(cached) " >&6
13228 else
13229
13230              if test $ac_cv_header_inttypes_h = yes; then
13231
13232
13233                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13234 /* end confdefs.h.  */
13235 #include <inttypes.h>
13236
13237 _ACEOF
13238                                                                                                                         case "$host_os" in
13239                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
13240                  *)    gl_absname_cpp="$ac_cpp" ;;
13241                esac
13242
13243                case "$host_os" in
13244                  mingw*)
13245                                                                                                                                      gl_dirsep_regex='[/\\]'
13246                    ;;
13247                  *)
13248                    gl_dirsep_regex='\/'
13249                    ;;
13250                esac
13251                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13252
13253                gl_header_literal_regex=`echo 'inttypes.h' \
13254                                         | sed -e "$gl_make_literal_regex_sed"`
13255                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13256                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13257                    s|^/[^/]|//&|
13258                    p
13259                    q
13260                  }'
13261                                                             gl_cv_next_inttypes_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13262                       sed -n "$gl_absolute_header_sed"`'"'
13263           else
13264                gl_cv_next_inttypes_h='<'inttypes.h'>'
13265              fi
13266
13267
13268 fi
13269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
13270 $as_echo "$gl_cv_next_inttypes_h" >&6; }
13271      fi
13272      NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
13273
13274      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13275        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13276        gl_next_as_first_directive='<'inttypes.h'>'
13277      else
13278        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13279        gl_next_as_first_directive=$gl_cv_next_inttypes_h
13280      fi
13281      NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
13282
13283
13284
13285
13286
13287
13288
13289
13290     for gl_func in imaxabs imaxdiv strtoimax strtoumax; do
13291     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
13292     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
13293 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
13294 if eval \${$as_gl_Symbol+:} false; then :
13295   $as_echo_n "(cached) " >&6
13296 else
13297   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13298 /* end confdefs.h.  */
13299 #include <inttypes.h>
13300
13301 int
13302 main ()
13303 {
13304 #undef $gl_func
13305   (void) $gl_func;
13306   ;
13307   return 0;
13308 }
13309 _ACEOF
13310 if ac_fn_c_try_compile "$LINENO"; then :
13311   eval "$as_gl_Symbol=yes"
13312 else
13313   eval "$as_gl_Symbol=no"
13314 fi
13315 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13316 fi
13317 eval ac_res=\$$as_gl_Symbol
13318                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13319 $as_echo "$ac_res" >&6; }
13320     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
13321   cat >>confdefs.h <<_ACEOF
13322 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
13323 _ACEOF
13324
13325                      eval ac_cv_have_decl_$gl_func=yes
13326 fi
13327       done
13328
13329
13330
13331   for ac_header in inttypes.h
13332 do :
13333   ac_fn_c_check_header_mongrel "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
13334 if test "x$ac_cv_header_inttypes_h" = xyes; then :
13335   cat >>confdefs.h <<_ACEOF
13336 #define HAVE_INTTYPES_H 1
13337 _ACEOF
13338
13339 fi
13340
13341 done
13342
13343   if test $ac_cv_header_inttypes_h = yes; then
13344     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the inttypes.h PRIxNN macros are broken" >&5
13345 $as_echo_n "checking whether the inttypes.h PRIxNN macros are broken... " >&6; }
13346 if ${gt_cv_inttypes_pri_broken+:} false; then :
13347   $as_echo_n "(cached) " >&6
13348 else
13349
13350         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13351 /* end confdefs.h.  */
13352
13353 #include <inttypes.h>
13354 #ifdef PRId32
13355 char *p = PRId32;
13356 #endif
13357
13358 int
13359 main ()
13360 {
13361
13362   ;
13363   return 0;
13364 }
13365 _ACEOF
13366 if ac_fn_c_try_compile "$LINENO"; then :
13367   gt_cv_inttypes_pri_broken=no
13368 else
13369   gt_cv_inttypes_pri_broken=yes
13370 fi
13371 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13372
13373 fi
13374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_inttypes_pri_broken" >&5
13375 $as_echo "$gt_cv_inttypes_pri_broken" >&6; }
13376   fi
13377   if test "$gt_cv_inttypes_pri_broken" = yes; then
13378
13379 cat >>confdefs.h <<_ACEOF
13380 #define PRI_MACROS_BROKEN 1
13381 _ACEOF
13382
13383     PRI_MACROS_BROKEN=1
13384   else
13385     PRI_MACROS_BROKEN=0
13386   fi
13387
13388
13389
13390   GNULIB_ISWBLANK=0;
13391   GNULIB_WCTYPE=0;
13392   GNULIB_ISWCTYPE=0;
13393   GNULIB_WCTRANS=0;
13394   GNULIB_TOWCTRANS=0;
13395     HAVE_ISWBLANK=1;
13396   HAVE_WCTYPE_T=1;
13397   HAVE_WCTRANS_T=1;
13398   REPLACE_ISWBLANK=0;
13399
13400
13401
13402
13403   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
13404 $as_echo_n "checking for wint_t... " >&6; }
13405 if ${gt_cv_c_wint_t+:} false; then :
13406   $as_echo_n "(cached) " >&6
13407 else
13408   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13409 /* end confdefs.h.  */
13410
13411 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
13412    <wchar.h>.
13413    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
13414    before <wchar.h>.  */
13415 #include <stddef.h>
13416 #include <stdio.h>
13417 #include <time.h>
13418 #include <wchar.h>
13419             wint_t foo = (wchar_t)'\0';
13420 int
13421 main ()
13422 {
13423
13424   ;
13425   return 0;
13426 }
13427 _ACEOF
13428 if ac_fn_c_try_compile "$LINENO"; then :
13429   gt_cv_c_wint_t=yes
13430 else
13431   gt_cv_c_wint_t=no
13432 fi
13433 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13434 fi
13435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
13436 $as_echo "$gt_cv_c_wint_t" >&6; }
13437   if test $gt_cv_c_wint_t = yes; then
13438
13439 $as_echo "#define HAVE_WINT_T 1" >>confdefs.h
13440
13441   fi
13442
13443
13444
13445
13446
13447
13448   if test $ac_cv_func_iswcntrl = yes; then
13449     HAVE_ISWCNTRL=1
13450   else
13451     HAVE_ISWCNTRL=0
13452   fi
13453
13454
13455
13456   if test $gt_cv_c_wint_t = yes; then
13457     HAVE_WINT_T=1
13458   else
13459     HAVE_WINT_T=0
13460   fi
13461
13462
13463
13464
13465
13466
13467
13468
13469
13470
13471
13472      if test $gl_cv_have_include_next = yes; then
13473        gl_cv_next_wctype_h='<'wctype.h'>'
13474      else
13475        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
13476 $as_echo_n "checking absolute name of <wctype.h>... " >&6; }
13477 if ${gl_cv_next_wctype_h+:} false; then :
13478   $as_echo_n "(cached) " >&6
13479 else
13480
13481              if test $ac_cv_header_wctype_h = yes; then
13482
13483
13484                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13485 /* end confdefs.h.  */
13486 #include <wctype.h>
13487
13488 _ACEOF
13489                                                                                                                         case "$host_os" in
13490                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
13491                  *)    gl_absname_cpp="$ac_cpp" ;;
13492                esac
13493
13494                case "$host_os" in
13495                  mingw*)
13496                                                                                                                                      gl_dirsep_regex='[/\\]'
13497                    ;;
13498                  *)
13499                    gl_dirsep_regex='\/'
13500                    ;;
13501                esac
13502                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13503
13504                gl_header_literal_regex=`echo 'wctype.h' \
13505                                         | sed -e "$gl_make_literal_regex_sed"`
13506                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13507                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13508                    s|^/[^/]|//&|
13509                    p
13510                    q
13511                  }'
13512                                                             gl_cv_next_wctype_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13513                       sed -n "$gl_absolute_header_sed"`'"'
13514           else
13515                gl_cv_next_wctype_h='<'wctype.h'>'
13516              fi
13517
13518
13519 fi
13520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
13521 $as_echo "$gl_cv_next_wctype_h" >&6; }
13522      fi
13523      NEXT_WCTYPE_H=$gl_cv_next_wctype_h
13524
13525      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13526        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13527        gl_next_as_first_directive='<'wctype.h'>'
13528      else
13529        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13530        gl_next_as_first_directive=$gl_cv_next_wctype_h
13531      fi
13532      NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
13533
13534
13535
13536
13537   if test $ac_cv_header_wctype_h = yes; then
13538     if test $ac_cv_func_iswcntrl = yes; then
13539                   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
13540 $as_echo_n "checking whether iswcntrl works... " >&6; }
13541 if ${gl_cv_func_iswcntrl_works+:} false; then :
13542   $as_echo_n "(cached) " >&6
13543 else
13544
13545           if test "$cross_compiling" = yes; then :
13546   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13547 /* end confdefs.h.  */
13548 #include <stdlib.h>
13549                           #if __GNU_LIBRARY__ == 1
13550                           Linux libc5 i18n is broken.
13551                           #endif
13552 int
13553 main ()
13554 {
13555
13556   ;
13557   return 0;
13558 }
13559 _ACEOF
13560 if ac_fn_c_try_compile "$LINENO"; then :
13561   gl_cv_func_iswcntrl_works="guessing yes"
13562 else
13563   gl_cv_func_iswcntrl_works="guessing no"
13564 fi
13565 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13566
13567 else
13568   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13569 /* end confdefs.h.  */
13570
13571                /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
13572                   included before <wchar.h>.
13573                   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
13574                   must be included before <wchar.h>.  */
13575                #include <stddef.h>
13576                #include <stdio.h>
13577                #include <time.h>
13578                #include <wchar.h>
13579                #include <wctype.h>
13580                int main () { return iswprint ('x') == 0; }
13581
13582 _ACEOF
13583 if ac_fn_c_try_run "$LINENO"; then :
13584   gl_cv_func_iswcntrl_works=yes
13585 else
13586   gl_cv_func_iswcntrl_works=no
13587 fi
13588 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13589   conftest.$ac_objext conftest.beam conftest.$ac_ext
13590 fi
13591
13592
13593 fi
13594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
13595 $as_echo "$gl_cv_func_iswcntrl_works" >&6; }
13596     fi
13597     HAVE_WCTYPE_H=1
13598   else
13599     HAVE_WCTYPE_H=0
13600   fi
13601
13602
13603   case "$gl_cv_func_iswcntrl_works" in
13604     *yes) REPLACE_ISWCNTRL=0 ;;
13605     *)    REPLACE_ISWCNTRL=1 ;;
13606   esac
13607
13608
13609   if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
13610         :
13611   fi
13612
13613   if test $REPLACE_ISWCNTRL = 1; then
13614     REPLACE_TOWLOWER=1
13615   else
13616     for ac_func in towlower
13617 do :
13618   ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
13619 if test "x$ac_cv_func_towlower" = xyes; then :
13620   cat >>confdefs.h <<_ACEOF
13621 #define HAVE_TOWLOWER 1
13622 _ACEOF
13623
13624 fi
13625 done
13626
13627     if test $ac_cv_func_towlower = yes; then
13628       REPLACE_TOWLOWER=0
13629     else
13630       ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
13631              included before <wchar.h>.
13632              BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
13633              must be included before <wchar.h>.  */
13634           #include <stddef.h>
13635           #include <stdio.h>
13636           #include <time.h>
13637           #include <wchar.h>
13638           #if HAVE_WCTYPE_H
13639           # include <wctype.h>
13640           #endif
13641
13642 "
13643 if test "x$ac_cv_have_decl_towlower" = xyes; then :
13644   ac_have_decl=1
13645 else
13646   ac_have_decl=0
13647 fi
13648
13649 cat >>confdefs.h <<_ACEOF
13650 #define HAVE_DECL_TOWLOWER $ac_have_decl
13651 _ACEOF
13652
13653       if test $ac_cv_have_decl_towlower = yes; then
13654                                 REPLACE_TOWLOWER=1
13655       else
13656         REPLACE_TOWLOWER=0
13657       fi
13658     fi
13659   fi
13660
13661
13662   if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
13663         :
13664   fi
13665
13666           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
13667 $as_echo_n "checking for wctype_t... " >&6; }
13668 if ${gl_cv_type_wctype_t+:} false; then :
13669   $as_echo_n "(cached) " >&6
13670 else
13671   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13672 /* end confdefs.h.  */
13673 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
13674                included before <wchar.h>.
13675                BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
13676                must be included before <wchar.h>.  */
13677             #include <stddef.h>
13678             #include <stdio.h>
13679             #include <time.h>
13680             #include <wchar.h>
13681             #if HAVE_WCTYPE_H
13682             # include <wctype.h>
13683             #endif
13684             wctype_t a;
13685
13686 int
13687 main ()
13688 {
13689
13690   ;
13691   return 0;
13692 }
13693 _ACEOF
13694 if ac_fn_c_try_compile "$LINENO"; then :
13695   gl_cv_type_wctype_t=yes
13696 else
13697   gl_cv_type_wctype_t=no
13698 fi
13699 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13700
13701 fi
13702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
13703 $as_echo "$gl_cv_type_wctype_t" >&6; }
13704   if test $gl_cv_type_wctype_t = no; then
13705     HAVE_WCTYPE_T=0
13706   fi
13707
13708       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
13709 $as_echo_n "checking for wctrans_t... " >&6; }
13710 if ${gl_cv_type_wctrans_t+:} false; then :
13711   $as_echo_n "(cached) " >&6
13712 else
13713   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13714 /* end confdefs.h.  */
13715 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
13716                included before <wchar.h>.
13717                BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
13718                must be included before <wchar.h>.  */
13719             #include <stddef.h>
13720             #include <stdio.h>
13721             #include <time.h>
13722             #include <wchar.h>
13723             #include <wctype.h>
13724             wctrans_t a;
13725
13726 int
13727 main ()
13728 {
13729
13730   ;
13731   return 0;
13732 }
13733 _ACEOF
13734 if ac_fn_c_try_compile "$LINENO"; then :
13735   gl_cv_type_wctrans_t=yes
13736 else
13737   gl_cv_type_wctrans_t=no
13738 fi
13739 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13740
13741 fi
13742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
13743 $as_echo "$gl_cv_type_wctrans_t" >&6; }
13744   if test $gl_cv_type_wctrans_t = no; then
13745     HAVE_WCTRANS_T=0
13746   fi
13747
13748
13749     for gl_func in wctype iswctype wctrans towctrans     ; do
13750     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
13751     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
13752 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
13753 if eval \${$as_gl_Symbol+:} false; then :
13754   $as_echo_n "(cached) " >&6
13755 else
13756   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13757 /* end confdefs.h.  */
13758
13759 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
13760    <wchar.h>.
13761    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
13762    included before <wchar.h>.  */
13763 #if !(defined __GLIBC__ && !defined __UCLIBC__)
13764 # include <stddef.h>
13765 # include <stdio.h>
13766 # include <time.h>
13767 # include <wchar.h>
13768 #endif
13769 #include <wctype.h>
13770
13771 int
13772 main ()
13773 {
13774 #undef $gl_func
13775   (void) $gl_func;
13776   ;
13777   return 0;
13778 }
13779 _ACEOF
13780 if ac_fn_c_try_compile "$LINENO"; then :
13781   eval "$as_gl_Symbol=yes"
13782 else
13783   eval "$as_gl_Symbol=no"
13784 fi
13785 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13786 fi
13787 eval ac_res=\$$as_gl_Symbol
13788                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13789 $as_echo "$ac_res" >&6; }
13790     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
13791   cat >>confdefs.h <<_ACEOF
13792 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
13793 _ACEOF
13794
13795                      eval ac_cv_have_decl_$gl_func=yes
13796 fi
13797       done
13798
13799
13800
13801
13802
13803   GNULIB_NL_LANGINFO=0;
13804     HAVE_NL_LANGINFO=1;
13805   REPLACE_NL_LANGINFO=0;
13806
13807
13808
13809
13810
13811
13812
13813
13814
13815
13816
13817
13818   case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink in
13819   yes+*yes)
13820     ;;
13821   yes+*)
13822     # Solaris 9 has *at functions, but uniformly mishandles trailing
13823     # slash in all of them.
13824     REPLACE_OPENAT=1
13825     ;;
13826   *)
13827     HAVE_OPENAT=0
13828     ;;
13829   esac
13830
13831
13832
13833
13834     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library >= 2.1 or uClibc" >&5
13835 $as_echo_n "checking whether we are using the GNU C Library >= 2.1 or uClibc... " >&6; }
13836 if ${ac_cv_gnu_library_2_1+:} false; then :
13837   $as_echo_n "(cached) " >&6
13838 else
13839   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13840 /* end confdefs.h.  */
13841
13842 #include <features.h>
13843 #ifdef __GNU_LIBRARY__
13844  #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
13845   Lucky GNU user
13846  #endif
13847 #endif
13848 #ifdef __UCLIBC__
13849  Lucky user
13850 #endif
13851
13852 _ACEOF
13853 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13854   $EGREP "Lucky" >/dev/null 2>&1; then :
13855   ac_cv_gnu_library_2_1=yes
13856 else
13857   ac_cv_gnu_library_2_1=no
13858 fi
13859 rm -f conftest*
13860
13861
13862
13863 fi
13864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2_1" >&5
13865 $as_echo "$ac_cv_gnu_library_2_1" >&6; }
13866
13867     GLIBC21="$ac_cv_gnu_library_2_1"
13868
13869
13870
13871   GNULIB_LOCALECONV=0;
13872   GNULIB_SETLOCALE=0;
13873   GNULIB_DUPLOCALE=0;
13874     HAVE_DUPLOCALE=1;
13875   REPLACE_LOCALECONV=0;
13876   REPLACE_SETLOCALE=0;
13877   REPLACE_DUPLOCALE=0;
13878   REPLACE_STRUCT_LCONV=0;
13879
13880
13881     REPLACE_NULL=0;
13882   HAVE_WCHAR_T=1;
13883
13884
13885   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
13886 $as_echo_n "checking for wchar_t... " >&6; }
13887 if ${gt_cv_c_wchar_t+:} false; then :
13888   $as_echo_n "(cached) " >&6
13889 else
13890   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13891 /* end confdefs.h.  */
13892 #include <stddef.h>
13893             wchar_t foo = (wchar_t)'\0';
13894 int
13895 main ()
13896 {
13897
13898   ;
13899   return 0;
13900 }
13901 _ACEOF
13902 if ac_fn_c_try_compile "$LINENO"; then :
13903   gt_cv_c_wchar_t=yes
13904 else
13905   gt_cv_c_wchar_t=no
13906 fi
13907 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13908 fi
13909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
13910 $as_echo "$gt_cv_c_wchar_t" >&6; }
13911   if test $gt_cv_c_wchar_t = yes; then
13912
13913 $as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
13914
13915   fi
13916
13917
13918
13919
13920   STDDEF_H=
13921   if test $gt_cv_c_wchar_t = no; then
13922     HAVE_WCHAR_T=0
13923     STDDEF_H=stddef.h
13924   fi
13925   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
13926 $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
13927 if ${gl_cv_decl_null_works+:} false; then :
13928   $as_echo_n "(cached) " >&6
13929 else
13930   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13931 /* end confdefs.h.  */
13932 #include <stddef.h>
13933       int test[2 * (sizeof NULL == sizeof (void *)) -1];
13934
13935 int
13936 main ()
13937 {
13938
13939   ;
13940   return 0;
13941 }
13942 _ACEOF
13943 if ac_fn_c_try_compile "$LINENO"; then :
13944   gl_cv_decl_null_works=yes
13945 else
13946   gl_cv_decl_null_works=no
13947 fi
13948 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13949 fi
13950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
13951 $as_echo "$gl_cv_decl_null_works" >&6; }
13952   if test $gl_cv_decl_null_works = no; then
13953     REPLACE_NULL=1
13954     STDDEF_H=stddef.h
13955   fi
13956
13957    if test -n "$STDDEF_H"; then
13958   GL_GENERATE_STDDEF_H_TRUE=
13959   GL_GENERATE_STDDEF_H_FALSE='#'
13960 else
13961   GL_GENERATE_STDDEF_H_TRUE='#'
13962   GL_GENERATE_STDDEF_H_FALSE=
13963 fi
13964
13965   if test -n "$STDDEF_H"; then
13966
13967
13968
13969
13970
13971
13972
13973
13974      if test $gl_cv_have_include_next = yes; then
13975        gl_cv_next_stddef_h='<'stddef.h'>'
13976      else
13977        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
13978 $as_echo_n "checking absolute name of <stddef.h>... " >&6; }
13979 if ${gl_cv_next_stddef_h+:} false; then :
13980   $as_echo_n "(cached) " >&6
13981 else
13982
13983                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13984 /* end confdefs.h.  */
13985 #include <stddef.h>
13986
13987 _ACEOF
13988                                                                                                                         case "$host_os" in
13989                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
13990                  *)    gl_absname_cpp="$ac_cpp" ;;
13991                esac
13992
13993                case "$host_os" in
13994                  mingw*)
13995                                                                                                                                      gl_dirsep_regex='[/\\]'
13996                    ;;
13997                  *)
13998                    gl_dirsep_regex='\/'
13999                    ;;
14000                esac
14001                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
14002
14003                gl_header_literal_regex=`echo 'stddef.h' \
14004                                         | sed -e "$gl_make_literal_regex_sed"`
14005                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
14006                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
14007                    s|^/[^/]|//&|
14008                    p
14009                    q
14010                  }'
14011                                                             gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
14012                       sed -n "$gl_absolute_header_sed"`'"'
14013
14014
14015 fi
14016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
14017 $as_echo "$gl_cv_next_stddef_h" >&6; }
14018      fi
14019      NEXT_STDDEF_H=$gl_cv_next_stddef_h
14020
14021      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
14022        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
14023        gl_next_as_first_directive='<'stddef.h'>'
14024      else
14025        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
14026        gl_next_as_first_directive=$gl_cv_next_stddef_h
14027      fi
14028      NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
14029
14030
14031
14032
14033   fi
14034
14035
14036
14037
14038
14039
14040   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5
14041 $as_echo_n "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; }
14042 if ${gl_cv_func_malloc_posix+:} false; then :
14043   $as_echo_n "(cached) " >&6
14044 else
14045
14046                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14047 /* end confdefs.h.  */
14048
14049 int
14050 main ()
14051 {
14052 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
14053              choke me
14054              #endif
14055
14056   ;
14057   return 0;
14058 }
14059 _ACEOF
14060 if ac_fn_c_try_compile "$LINENO"; then :
14061   gl_cv_func_malloc_posix=yes
14062 else
14063   gl_cv_func_malloc_posix=no
14064 fi
14065 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14066
14067 fi
14068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
14069 $as_echo "$gl_cv_func_malloc_posix" >&6; }
14070
14071
14072
14073       for ac_header in stdlib.h
14074 do :
14075   ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
14076 if test "x$ac_cv_header_stdlib_h" = xyes; then :
14077   cat >>confdefs.h <<_ACEOF
14078 #define HAVE_STDLIB_H 1
14079 _ACEOF
14080
14081 fi
14082
14083 done
14084
14085   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
14086 $as_echo_n "checking for GNU libc compatible malloc... " >&6; }
14087 if ${ac_cv_func_malloc_0_nonnull+:} false; then :
14088   $as_echo_n "(cached) " >&6
14089 else
14090   if test "$cross_compiling" = yes; then :
14091   case "$host_os" in
14092           # Guess yes on platforms where we know the result.
14093           *-gnu* | freebsd* | netbsd* | openbsd* \
14094           | hpux* | solaris* | cygwin* | mingw*)
14095             ac_cv_func_malloc_0_nonnull=yes ;;
14096           # If we don't know, assume the worst.
14097           *) ac_cv_func_malloc_0_nonnull=no ;;
14098         esac
14099
14100 else
14101   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14102 /* end confdefs.h.  */
14103 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
14104             # include <stdlib.h>
14105             #else
14106             char *malloc ();
14107             #endif
14108
14109 int
14110 main ()
14111 {
14112 return ! malloc (0);
14113   ;
14114   return 0;
14115 }
14116
14117 _ACEOF
14118 if ac_fn_c_try_run "$LINENO"; then :
14119   ac_cv_func_malloc_0_nonnull=yes
14120 else
14121   ac_cv_func_malloc_0_nonnull=no
14122 fi
14123 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14124   conftest.$ac_objext conftest.beam conftest.$ac_ext
14125 fi
14126
14127
14128 fi
14129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
14130 $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
14131   if test $ac_cv_func_malloc_0_nonnull = yes; then :
14132   gl_cv_func_malloc_0_nonnull=1
14133 else
14134   gl_cv_func_malloc_0_nonnull=0
14135 fi
14136
14137
14138 cat >>confdefs.h <<_ACEOF
14139 #define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull
14140 _ACEOF
14141
14142
14143
14144
14145
14146
14147
14148
14149
14150   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
14151 $as_echo_n "checking for a traditional japanese locale... " >&6; }
14152 if ${gt_cv_locale_ja+:} false; then :
14153   $as_echo_n "(cached) " >&6
14154 else
14155
14156     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14157 /* end confdefs.h.  */
14158
14159 #include <locale.h>
14160 #include <time.h>
14161 #if HAVE_LANGINFO_CODESET
14162 # include <langinfo.h>
14163 #endif
14164 #include <stdlib.h>
14165 #include <string.h>
14166 struct tm t;
14167 char buf[16];
14168 int main ()
14169 {
14170   const char *p;
14171   /* Check whether the given locale name is recognized by the system.  */
14172 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
14173   /* On native Windows, setlocale(category, "") looks at the system settings,
14174      not at the environment variables.  Also, when an encoding suffix such
14175      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
14176      category of the locale to "C".  */
14177   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
14178       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
14179     return 1;
14180 #else
14181   if (setlocale (LC_ALL, "") == NULL) return 1;
14182 #endif
14183   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
14184      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
14185      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
14186      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
14187      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
14188      some unit tests fail.
14189      On MirBSD 10, when an unsupported locale is specified, setlocale()
14190      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
14191 #if HAVE_LANGINFO_CODESET
14192   {
14193     const char *cs = nl_langinfo (CODESET);
14194     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
14195         || strcmp (cs, "UTF-8") == 0)
14196       return 1;
14197   }
14198 #endif
14199 #ifdef __CYGWIN__
14200   /* On Cygwin, avoid locale names without encoding suffix, because the
14201      locale_charset() function relies on the encoding suffix.  Note that
14202      LC_ALL is set on the command line.  */
14203   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
14204 #endif
14205   /* Check whether MB_CUR_MAX is > 1.  This excludes the dysfunctional locales
14206      on Cygwin 1.5.x.  */
14207   if (MB_CUR_MAX == 1)
14208     return 1;
14209   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
14210      This excludes the UTF-8 encoding (except on MirBSD).  */
14211   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
14212   if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
14213   for (p = buf; *p != '\0'; p++)
14214     if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
14215       return 1;
14216   return 0;
14217 }
14218
14219 _ACEOF
14220     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14221   (eval $ac_link) 2>&5
14222   ac_status=$?
14223   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14224   test $ac_status = 0; } && test -s conftest$ac_exeext; then
14225       case "$host_os" in
14226         # Handle native Windows specially, because there setlocale() interprets
14227         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
14228         # "fr" or "fra" as "French" or "French_France.1252",
14229         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
14230         # "ja" as "Japanese" or "Japanese_Japan.932",
14231         # and similar.
14232         mingw*)
14233           # Note that on native Windows, the Japanese locale is
14234           # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
14235           # cannot use it here.
14236           gt_cv_locale_ja=none
14237           ;;
14238         *)
14239           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
14240           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
14241           # configure script would override the LC_ALL setting. Likewise for
14242           # LC_CTYPE, which is also set at the beginning of the configure script.
14243           # Test for the AIX locale name.
14244           if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14245             gt_cv_locale_ja=ja_JP
14246           else
14247             # Test for the locale name with explicit encoding suffix.
14248             if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14249               gt_cv_locale_ja=ja_JP.EUC-JP
14250             else
14251               # Test for the HP-UX, OSF/1, NetBSD locale name.
14252               if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14253                 gt_cv_locale_ja=ja_JP.eucJP
14254               else
14255                 # Test for the IRIX, FreeBSD locale name.
14256                 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14257                   gt_cv_locale_ja=ja_JP.EUC
14258                 else
14259                   # Test for the Solaris 7 locale name.
14260                   if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14261                     gt_cv_locale_ja=ja
14262                   else
14263                     # Special test for NetBSD 1.6.
14264                     if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
14265                       gt_cv_locale_ja=ja_JP.eucJP
14266                     else
14267                       # None found.
14268                       gt_cv_locale_ja=none
14269                     fi
14270                   fi
14271                 fi
14272               fi
14273             fi
14274           fi
14275           ;;
14276       esac
14277     fi
14278     rm -fr conftest*
14279
14280 fi
14281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
14282 $as_echo "$gt_cv_locale_ja" >&6; }
14283   LOCALE_JA=$gt_cv_locale_ja
14284
14285
14286
14287
14288
14289   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
14290 $as_echo_n "checking for a transitional chinese locale... " >&6; }
14291 if ${gt_cv_locale_zh_CN+:} false; then :
14292   $as_echo_n "(cached) " >&6
14293 else
14294
14295     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14296 /* end confdefs.h.  */
14297
14298 #include <locale.h>
14299 #include <stdlib.h>
14300 #include <time.h>
14301 #if HAVE_LANGINFO_CODESET
14302 # include <langinfo.h>
14303 #endif
14304 #include <stdlib.h>
14305 #include <string.h>
14306 struct tm t;
14307 char buf[16];
14308 int main ()
14309 {
14310   const char *p;
14311   /* Check whether the given locale name is recognized by the system.  */
14312 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
14313   /* On native Windows, setlocale(category, "") looks at the system settings,
14314      not at the environment variables.  Also, when an encoding suffix such
14315      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
14316      category of the locale to "C".  */
14317   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
14318       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
14319     return 1;
14320 #else
14321   if (setlocale (LC_ALL, "") == NULL) return 1;
14322 #endif
14323   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
14324      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
14325      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
14326      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
14327      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
14328      some unit tests fail.
14329      On MirBSD 10, when an unsupported locale is specified, setlocale()
14330      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
14331 #if HAVE_LANGINFO_CODESET
14332   {
14333     const char *cs = nl_langinfo (CODESET);
14334     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
14335         || strcmp (cs, "UTF-8") == 0)
14336       return 1;
14337   }
14338 #endif
14339 #ifdef __CYGWIN__
14340   /* On Cygwin, avoid locale names without encoding suffix, because the
14341      locale_charset() function relies on the encoding suffix.  Note that
14342      LC_ALL is set on the command line.  */
14343   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
14344 #endif
14345   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
14346      This excludes the UTF-8 encoding (except on MirBSD).  */
14347   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
14348   if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
14349   for (p = buf; *p != '\0'; p++)
14350     if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
14351       return 1;
14352   /* Check whether a typical GB18030 multibyte sequence is recognized as a
14353      single wide character.  This excludes the GB2312 and GBK encodings.  */
14354   if (mblen ("\203\062\332\066", 5) != 4)
14355     return 1;
14356   return 0;
14357 }
14358
14359 _ACEOF
14360     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14361   (eval $ac_link) 2>&5
14362   ac_status=$?
14363   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14364   test $ac_status = 0; } && test -s conftest$ac_exeext; then
14365       case "$host_os" in
14366         # Handle native Windows specially, because there setlocale() interprets
14367         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
14368         # "fr" or "fra" as "French" or "French_France.1252",
14369         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
14370         # "ja" as "Japanese" or "Japanese_Japan.932",
14371         # and similar.
14372         mingw*)
14373           # Test for the hypothetical native Windows locale name.
14374           if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14375             gt_cv_locale_zh_CN=Chinese_China.54936
14376           else
14377             # None found.
14378             gt_cv_locale_zh_CN=none
14379           fi
14380           ;;
14381         solaris2.8)
14382           # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
14383           # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
14384           # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
14385           gt_cv_locale_zh_CN=none
14386           ;;
14387         *)
14388           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
14389           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
14390           # configure script would override the LC_ALL setting. Likewise for
14391           # LC_CTYPE, which is also set at the beginning of the configure script.
14392           # Test for the locale name without encoding suffix.
14393           if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14394             gt_cv_locale_zh_CN=zh_CN
14395           else
14396             # Test for the locale name with explicit encoding suffix.
14397             if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14398               gt_cv_locale_zh_CN=zh_CN.GB18030
14399             else
14400               # None found.
14401               gt_cv_locale_zh_CN=none
14402             fi
14403           fi
14404           ;;
14405       esac
14406     else
14407       # If there was a link error, due to mblen(), the system is so old that
14408       # it certainly doesn't have a chinese locale.
14409       gt_cv_locale_zh_CN=none
14410     fi
14411     rm -fr conftest*
14412
14413 fi
14414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
14415 $as_echo "$gt_cv_locale_zh_CN" >&6; }
14416   LOCALE_ZH_CN=$gt_cv_locale_zh_CN
14417
14418
14419
14420
14421   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
14422 $as_echo_n "checking for a french Unicode locale... " >&6; }
14423 if ${gt_cv_locale_fr_utf8+:} false; then :
14424   $as_echo_n "(cached) " >&6
14425 else
14426
14427     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14428 /* end confdefs.h.  */
14429
14430 #include <locale.h>
14431 #include <time.h>
14432 #if HAVE_LANGINFO_CODESET
14433 # include <langinfo.h>
14434 #endif
14435 #include <stdlib.h>
14436 #include <string.h>
14437 struct tm t;
14438 char buf[16];
14439 int main () {
14440   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
14441      imitates locale dependent behaviour by looking at the environment
14442      variables, and all locales use the UTF-8 encoding.  */
14443 #if !(defined __BEOS__ || defined __HAIKU__)
14444   /* Check whether the given locale name is recognized by the system.  */
14445 # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
14446   /* On native Windows, setlocale(category, "") looks at the system settings,
14447      not at the environment variables.  Also, when an encoding suffix such
14448      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
14449      category of the locale to "C".  */
14450   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
14451       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
14452     return 1;
14453 # else
14454   if (setlocale (LC_ALL, "") == NULL) return 1;
14455 # endif
14456   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
14457      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
14458      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
14459      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
14460      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
14461      some unit tests fail.  */
14462 # if HAVE_LANGINFO_CODESET
14463   {
14464     const char *cs = nl_langinfo (CODESET);
14465     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
14466       return 1;
14467   }
14468 # endif
14469 # ifdef __CYGWIN__
14470   /* On Cygwin, avoid locale names without encoding suffix, because the
14471      locale_charset() function relies on the encoding suffix.  Note that
14472      LC_ALL is set on the command line.  */
14473   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
14474 # endif
14475   /* Check whether in the abbreviation of the second month, the second
14476      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
14477      two bytes long, with UTF-8 encoding.  */
14478   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
14479   if (strftime (buf, sizeof (buf), "%b", &t) < 4
14480       || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
14481     return 1;
14482 #endif
14483 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
14484   /* Check whether the decimal separator is a comma.
14485      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
14486      are nl_langinfo(RADIXCHAR) are both ".".  */
14487   if (localeconv () ->decimal_point[0] != ',') return 1;
14488 #endif
14489   return 0;
14490 }
14491
14492 _ACEOF
14493     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14494   (eval $ac_link) 2>&5
14495   ac_status=$?
14496   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14497   test $ac_status = 0; } && test -s conftest$ac_exeext; then
14498       case "$host_os" in
14499         # Handle native Windows specially, because there setlocale() interprets
14500         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
14501         # "fr" or "fra" as "French" or "French_France.1252",
14502         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
14503         # "ja" as "Japanese" or "Japanese_Japan.932",
14504         # and similar.
14505         mingw*)
14506           # Test for the hypothetical native Windows locale name.
14507           if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14508             gt_cv_locale_fr_utf8=French_France.65001
14509           else
14510             # None found.
14511             gt_cv_locale_fr_utf8=none
14512           fi
14513           ;;
14514         *)
14515           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
14516           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
14517           # configure script would override the LC_ALL setting. Likewise for
14518           # LC_CTYPE, which is also set at the beginning of the configure script.
14519           # Test for the usual locale name.
14520           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14521             gt_cv_locale_fr_utf8=fr_FR
14522           else
14523             # Test for the locale name with explicit encoding suffix.
14524             if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14525               gt_cv_locale_fr_utf8=fr_FR.UTF-8
14526             else
14527               # Test for the Solaris 7 locale name.
14528               if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14529                 gt_cv_locale_fr_utf8=fr.UTF-8
14530               else
14531                 # None found.
14532                 gt_cv_locale_fr_utf8=none
14533               fi
14534             fi
14535           fi
14536           ;;
14537       esac
14538     fi
14539     rm -fr conftest*
14540
14541 fi
14542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
14543 $as_echo "$gt_cv_locale_fr_utf8" >&6; }
14544   LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
14545
14546
14547
14548   GNULIB_FFSL=0;
14549   GNULIB_FFSLL=0;
14550   GNULIB_MEMCHR=0;
14551   GNULIB_MEMMEM=0;
14552   GNULIB_MEMPCPY=0;
14553   GNULIB_MEMRCHR=0;
14554   GNULIB_RAWMEMCHR=0;
14555   GNULIB_STPCPY=0;
14556   GNULIB_STPNCPY=0;
14557   GNULIB_STRCHRNUL=0;
14558   GNULIB_STRDUP=0;
14559   GNULIB_STRNCAT=0;
14560   GNULIB_STRNDUP=0;
14561   GNULIB_STRNLEN=0;
14562   GNULIB_STRPBRK=0;
14563   GNULIB_STRSEP=0;
14564   GNULIB_STRSTR=0;
14565   GNULIB_STRCASESTR=0;
14566   GNULIB_STRTOK_R=0;
14567   GNULIB_MBSLEN=0;
14568   GNULIB_MBSNLEN=0;
14569   GNULIB_MBSCHR=0;
14570   GNULIB_MBSRCHR=0;
14571   GNULIB_MBSSTR=0;
14572   GNULIB_MBSCASECMP=0;
14573   GNULIB_MBSNCASECMP=0;
14574   GNULIB_MBSPCASECMP=0;
14575   GNULIB_MBSCASESTR=0;
14576   GNULIB_MBSCSPN=0;
14577   GNULIB_MBSPBRK=0;
14578   GNULIB_MBSSPN=0;
14579   GNULIB_MBSSEP=0;
14580   GNULIB_MBSTOK_R=0;
14581   GNULIB_STRERROR=0;
14582   GNULIB_STRERROR_R=0;
14583   GNULIB_STRSIGNAL=0;
14584   GNULIB_STRVERSCMP=0;
14585   HAVE_MBSLEN=0;
14586     HAVE_FFSL=1;
14587   HAVE_FFSLL=1;
14588   HAVE_MEMCHR=1;
14589   HAVE_DECL_MEMMEM=1;
14590   HAVE_MEMPCPY=1;
14591   HAVE_DECL_MEMRCHR=1;
14592   HAVE_RAWMEMCHR=1;
14593   HAVE_STPCPY=1;
14594   HAVE_STPNCPY=1;
14595   HAVE_STRCHRNUL=1;
14596   HAVE_DECL_STRDUP=1;
14597   HAVE_DECL_STRNDUP=1;
14598   HAVE_DECL_STRNLEN=1;
14599   HAVE_STRPBRK=1;
14600   HAVE_STRSEP=1;
14601   HAVE_STRCASESTR=1;
14602   HAVE_DECL_STRTOK_R=1;
14603   HAVE_DECL_STRERROR_R=1;
14604   HAVE_DECL_STRSIGNAL=1;
14605   HAVE_STRVERSCMP=1;
14606   REPLACE_MEMCHR=0;
14607   REPLACE_MEMMEM=0;
14608   REPLACE_STPNCPY=0;
14609   REPLACE_STRDUP=0;
14610   REPLACE_STRSTR=0;
14611   REPLACE_STRCASESTR=0;
14612   REPLACE_STRCHRNUL=0;
14613   REPLACE_STRERROR=0;
14614   REPLACE_STRERROR_R=0;
14615   REPLACE_STRNCAT=0;
14616   REPLACE_STRNDUP=0;
14617   REPLACE_STRNLEN=0;
14618   REPLACE_STRSIGNAL=0;
14619   REPLACE_STRTOK_R=0;
14620   UNDEFINE_STRTOK_R=0;
14621
14622
14623
14624
14625
14626
14627
14628
14629
14630   # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
14631   # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
14632   # irrelevant for anonymous mappings.
14633   ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
14634 if test "x$ac_cv_func_mmap" = xyes; then :
14635   gl_have_mmap=yes
14636 else
14637   gl_have_mmap=no
14638 fi
14639
14640
14641   # Try to allow MAP_ANONYMOUS.
14642   gl_have_mmap_anonymous=no
14643   if test $gl_have_mmap = yes; then
14644     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
14645 $as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
14646     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14647 /* end confdefs.h.  */
14648
14649 #include <sys/mman.h>
14650 #ifdef MAP_ANONYMOUS
14651     I cannot identify this map
14652 #endif
14653
14654 _ACEOF
14655 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14656   $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
14657   gl_have_mmap_anonymous=yes
14658 fi
14659 rm -f conftest*
14660
14661     if test $gl_have_mmap_anonymous != yes; then
14662       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14663 /* end confdefs.h.  */
14664
14665 #include <sys/mman.h>
14666 #ifdef MAP_ANON
14667     I cannot identify this map
14668 #endif
14669
14670 _ACEOF
14671 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14672   $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
14673
14674 $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
14675
14676          gl_have_mmap_anonymous=yes
14677 fi
14678 rm -f conftest*
14679
14680     fi
14681     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
14682 $as_echo "$gl_have_mmap_anonymous" >&6; }
14683     if test $gl_have_mmap_anonymous = yes; then
14684
14685 $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
14686
14687     fi
14688   fi
14689
14690
14691
14692
14693
14694
14695   if test $HAVE_MEMCHR = 1; then
14696     # Detect platform-specific bugs in some versions of glibc:
14697     # memchr should not dereference anything with length 0
14698     #   http://bugzilla.redhat.com/499689
14699     # memchr should not dereference overestimated length after a match
14700     #   http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
14701     #   http://sourceware.org/bugzilla/show_bug.cgi?id=10162
14702     # Assume that memchr works on platforms that lack mprotect.
14703     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
14704 $as_echo_n "checking whether memchr works... " >&6; }
14705 if ${gl_cv_func_memchr_works+:} false; then :
14706   $as_echo_n "(cached) " >&6
14707 else
14708   if test "$cross_compiling" = yes; then :
14709          gl_cv_func_memchr_works="guessing no"
14710 else
14711   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14712 /* end confdefs.h.  */
14713
14714 #include <string.h>
14715 #if HAVE_SYS_MMAN_H
14716 # include <fcntl.h>
14717 # include <unistd.h>
14718 # include <sys/types.h>
14719 # include <sys/mman.h>
14720 # ifndef MAP_FILE
14721 #  define MAP_FILE 0
14722 # endif
14723 #endif
14724
14725 int
14726 main ()
14727 {
14728
14729   int result = 0;
14730   char *fence = NULL;
14731 #if HAVE_SYS_MMAN_H && HAVE_MPROTECT
14732 # if HAVE_MAP_ANONYMOUS
14733   const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
14734   const int fd = -1;
14735 # else /* !HAVE_MAP_ANONYMOUS */
14736   const int flags = MAP_FILE | MAP_PRIVATE;
14737   int fd = open ("/dev/zero", O_RDONLY, 0666);
14738   if (fd >= 0)
14739 # endif
14740     {
14741       int pagesize = getpagesize ();
14742       char *two_pages =
14743         (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
14744                        flags, fd, 0);
14745       if (two_pages != (char *)(-1)
14746           && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
14747         fence = two_pages + pagesize;
14748     }
14749 #endif
14750   if (fence)
14751     {
14752       if (memchr (fence, 0, 0))
14753         result |= 1;
14754       strcpy (fence - 9, "12345678");
14755       if (memchr (fence - 9, 0, 79) != fence - 1)
14756         result |= 2;
14757       if (memchr (fence - 1, 0, 3) != fence - 1)
14758         result |= 4;
14759     }
14760   return result;
14761
14762   ;
14763   return 0;
14764 }
14765 _ACEOF
14766 if ac_fn_c_try_run "$LINENO"; then :
14767   gl_cv_func_memchr_works=yes
14768 else
14769   gl_cv_func_memchr_works=no
14770 fi
14771 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14772   conftest.$ac_objext conftest.beam conftest.$ac_ext
14773 fi
14774
14775 fi
14776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
14777 $as_echo "$gl_cv_func_memchr_works" >&6; }
14778     if test "$gl_cv_func_memchr_works" != yes; then
14779       REPLACE_MEMCHR=1
14780     fi
14781   fi
14782
14783 ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default"
14784 if test "x$ac_cv_have_decl_memrchr" = xyes; then :
14785   ac_have_decl=1
14786 else
14787   ac_have_decl=0
14788 fi
14789
14790 cat >>confdefs.h <<_ACEOF
14791 #define HAVE_DECL_MEMRCHR $ac_have_decl
14792 _ACEOF
14793
14794
14795
14796
14797
14798
14799
14800
14801
14802
14803
14804
14805   GNULIB_MKTIME=0;
14806   GNULIB_NANOSLEEP=0;
14807   GNULIB_STRPTIME=0;
14808   GNULIB_TIMEGM=0;
14809   GNULIB_TIME_R=0;
14810     HAVE_DECL_LOCALTIME_R=1;
14811   HAVE_NANOSLEEP=1;
14812   HAVE_STRPTIME=1;
14813   HAVE_TIMEGM=1;
14814         REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
14815   REPLACE_MKTIME=GNULIB_PORTCHECK;
14816   REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
14817   REPLACE_TIMEGM=GNULIB_PORTCHECK;
14818
14819 ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
14820 if test "x$ac_cv_have_decl_alarm" = xyes; then :
14821   ac_have_decl=1
14822 else
14823   ac_have_decl=0
14824 fi
14825
14826 cat >>confdefs.h <<_ACEOF
14827 #define HAVE_DECL_ALARM $ac_have_decl
14828 _ACEOF
14829
14830
14831
14832
14833
14834   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
14835 $as_echo_n "checking for promoted mode_t type... " >&6; }
14836 if ${gl_cv_promoted_mode_t+:} false; then :
14837   $as_echo_n "(cached) " >&6
14838 else
14839
14840                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14841 /* end confdefs.h.  */
14842 #include <sys/types.h>
14843 int
14844 main ()
14845 {
14846 typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
14847   ;
14848   return 0;
14849 }
14850 _ACEOF
14851 if ac_fn_c_try_compile "$LINENO"; then :
14852   gl_cv_promoted_mode_t='int'
14853 else
14854   gl_cv_promoted_mode_t='mode_t'
14855 fi
14856 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14857
14858 fi
14859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
14860 $as_echo "$gl_cv_promoted_mode_t" >&6; }
14861
14862 cat >>confdefs.h <<_ACEOF
14863 #define PROMOTED_MODE_T $gl_cv_promoted_mode_t
14864 _ACEOF
14865
14866
14867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
14868 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
14869 if ${ac_cv_header_stdbool_h+:} false; then :
14870   $as_echo_n "(cached) " >&6
14871 else
14872   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14873 /* end confdefs.h.  */
14874
14875              #include <stdbool.h>
14876              #ifndef bool
14877               "error: bool is not defined"
14878              #endif
14879              #ifndef false
14880               "error: false is not defined"
14881              #endif
14882              #if false
14883               "error: false is not 0"
14884              #endif
14885              #ifndef true
14886               "error: true is not defined"
14887              #endif
14888              #if true != 1
14889               "error: true is not 1"
14890              #endif
14891              #ifndef __bool_true_false_are_defined
14892               "error: __bool_true_false_are_defined is not defined"
14893              #endif
14894
14895              struct s { _Bool s: 1; _Bool t; } s;
14896
14897              char a[true == 1 ? 1 : -1];
14898              char b[false == 0 ? 1 : -1];
14899              char c[__bool_true_false_are_defined == 1 ? 1 : -1];
14900              char d[(bool) 0.5 == true ? 1 : -1];
14901              /* See body of main program for 'e'.  */
14902              char f[(_Bool) 0.0 == false ? 1 : -1];
14903              char g[true];
14904              char h[sizeof (_Bool)];
14905              char i[sizeof s.t];
14906              enum { j = false, k = true, l = false * true, m = true * 256 };
14907              /* The following fails for
14908                 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
14909              _Bool n[m];
14910              char o[sizeof n == m * sizeof n[0] ? 1 : -1];
14911              char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
14912              /* Catch a bug in an HP-UX C compiler.  See
14913                 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
14914                 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
14915               */
14916              _Bool q = true;
14917              _Bool *pq = &q;
14918
14919 int
14920 main ()
14921 {
14922
14923              bool e = &s;
14924              *pq |= q;
14925              *pq |= ! q;
14926              /* Refer to every declared value, to avoid compiler optimizations.  */
14927              return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
14928                      + !m + !n + !o + !p + !q + !pq);
14929
14930   ;
14931   return 0;
14932 }
14933 _ACEOF
14934 if ac_fn_c_try_compile "$LINENO"; then :
14935   ac_cv_header_stdbool_h=yes
14936 else
14937   ac_cv_header_stdbool_h=no
14938 fi
14939 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14940 fi
14941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
14942 $as_echo "$ac_cv_header_stdbool_h" >&6; }
14943    ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
14944 if test "x$ac_cv_type__Bool" = xyes; then :
14945
14946 cat >>confdefs.h <<_ACEOF
14947 #define HAVE__BOOL 1
14948 _ACEOF
14949
14950
14951 fi
14952
14953
14954
14955
14956
14957   # Define two additional variables used in the Makefile substitution.
14958
14959   if test "$ac_cv_header_stdbool_h" = yes; then
14960     STDBOOL_H=''
14961   else
14962     STDBOOL_H='stdbool.h'
14963   fi
14964
14965    if test -n "$STDBOOL_H"; then
14966   GL_GENERATE_STDBOOL_H_TRUE=
14967   GL_GENERATE_STDBOOL_H_FALSE='#'
14968 else
14969   GL_GENERATE_STDBOOL_H_TRUE='#'
14970   GL_GENERATE_STDBOOL_H_FALSE=
14971 fi
14972
14973
14974   if test "$ac_cv_type__Bool" = yes; then
14975     HAVE__BOOL=1
14976   else
14977     HAVE__BOOL=0
14978   fi
14979
14980
14981
14982   # parse-datetime.y works with bison only.
14983   : ${YACC='bison -y'}
14984
14985
14986   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compound literals" >&5
14987 $as_echo_n "checking for compound literals... " >&6; }
14988 if ${gl_cv_compound_literals+:} false; then :
14989   $as_echo_n "(cached) " >&6
14990 else
14991   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14992 /* end confdefs.h.  */
14993 struct s { int i, j; };
14994 int
14995 main ()
14996 {
14997 struct s t = (struct s) { 3, 4 };
14998         if (t.i != 0) return 0;
14999   ;
15000   return 0;
15001 }
15002 _ACEOF
15003 if ac_fn_c_try_compile "$LINENO"; then :
15004   gl_cv_compound_literals=yes
15005 else
15006   gl_cv_compound_literals=no
15007 fi
15008 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15009 fi
15010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compound_literals" >&5
15011 $as_echo "$gl_cv_compound_literals" >&6; }
15012   if test $gl_cv_compound_literals = yes; then
15013
15014 $as_echo "#define HAVE_COMPOUND_LITERALS 1" >>confdefs.h
15015
15016   fi
15017
15018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
15019 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
15020 if ${ac_cv_struct_tm+:} false; then :
15021   $as_echo_n "(cached) " >&6
15022 else
15023   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15024 /* end confdefs.h.  */
15025 #include <sys/types.h>
15026 #include <time.h>
15027
15028 int
15029 main ()
15030 {
15031 struct tm tm;
15032                                      int *p = &tm.tm_sec;
15033                                      return !p;
15034   ;
15035   return 0;
15036 }
15037 _ACEOF
15038 if ac_fn_c_try_compile "$LINENO"; then :
15039   ac_cv_struct_tm=time.h
15040 else
15041   ac_cv_struct_tm=sys/time.h
15042 fi
15043 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15044 fi
15045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
15046 $as_echo "$ac_cv_struct_tm" >&6; }
15047 if test $ac_cv_struct_tm = sys/time.h; then
15048
15049 $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
15050
15051 fi
15052
15053
15054  ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include <time.h>
15055 "
15056 if test "x$ac_cv_member_struct_tm_tm_gmtoff" = xyes; then :
15057
15058 $as_echo "#define HAVE_TM_GMTOFF 1" >>confdefs.h
15059
15060 fi
15061
15062
15063
15064
15065
15066   GNULIB_PTHREAD_SIGMASK=0;
15067   GNULIB_RAISE=0;
15068   GNULIB_SIGNAL_H_SIGPIPE=0;
15069   GNULIB_SIGPROCMASK=0;
15070   GNULIB_SIGACTION=0;
15071     HAVE_POSIX_SIGNALBLOCKING=1;
15072   HAVE_PTHREAD_SIGMASK=1;
15073   HAVE_RAISE=1;
15074   HAVE_SIGSET_T=1;
15075   HAVE_SIGINFO_T=1;
15076   HAVE_SIGACTION=1;
15077   HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
15078
15079   HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
15080
15081   HAVE_SIGHANDLER_T=1;
15082   REPLACE_PTHREAD_SIGMASK=0;
15083   REPLACE_RAISE=0;
15084
15085
15086
15087
15088
15089
15090
15091
15092
15093
15094
15095
15096 # Check whether --with-selinux was given.
15097 if test "${with_selinux+set}" = set; then :
15098   withval=$with_selinux;
15099 else
15100   with_selinux=maybe
15101 fi
15102
15103
15104   LIB_SELINUX=
15105   if test "$with_selinux" != no; then
15106     gl_save_LIBS=$LIBS
15107     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setfilecon" >&5
15108 $as_echo_n "checking for library containing setfilecon... " >&6; }
15109 if ${ac_cv_search_setfilecon+:} false; then :
15110   $as_echo_n "(cached) " >&6
15111 else
15112   ac_func_search_save_LIBS=$LIBS
15113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15114 /* end confdefs.h.  */
15115
15116 /* Override any GCC internal prototype to avoid an error.
15117    Use char because int might match the return type of a GCC
15118    builtin and then its argument prototype would still apply.  */
15119 #ifdef __cplusplus
15120 extern "C"
15121 #endif
15122 char setfilecon ();
15123 int
15124 main ()
15125 {
15126 return setfilecon ();
15127   ;
15128   return 0;
15129 }
15130 _ACEOF
15131 for ac_lib in '' selinux; do
15132   if test -z "$ac_lib"; then
15133     ac_res="none required"
15134   else
15135     ac_res=-l$ac_lib
15136     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
15137   fi
15138   if ac_fn_c_try_link "$LINENO"; then :
15139   ac_cv_search_setfilecon=$ac_res
15140 fi
15141 rm -f core conftest.err conftest.$ac_objext \
15142     conftest$ac_exeext
15143   if ${ac_cv_search_setfilecon+:} false; then :
15144   break
15145 fi
15146 done
15147 if ${ac_cv_search_setfilecon+:} false; then :
15148
15149 else
15150   ac_cv_search_setfilecon=no
15151 fi
15152 rm conftest.$ac_ext
15153 LIBS=$ac_func_search_save_LIBS
15154 fi
15155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setfilecon" >&5
15156 $as_echo "$ac_cv_search_setfilecon" >&6; }
15157 ac_res=$ac_cv_search_setfilecon
15158 if test "$ac_res" != no; then :
15159   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15160   test "$ac_cv_search_setfilecon" = "none required" ||
15161                     LIB_SELINUX=$ac_cv_search_setfilecon
15162 fi
15163
15164     LIBS=$gl_save_LIBS
15165   fi
15166
15167
15168   # Warn if SELinux is found but libselinux is absent;
15169   if test "$ac_cv_search_setfilecon" = no &&
15170      test "$host" = "$build" && test -d /selinux; then
15171     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This system supports SELinux but libselinux is missing." >&5
15172 $as_echo "$as_me: WARNING: This system supports SELinux but libselinux is missing." >&2;}
15173     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GNU tar will be compiled without SELinux support." >&5
15174 $as_echo "$as_me: WARNING: GNU tar will be compiled without SELinux support." >&2;}
15175   fi
15176
15177
15178
15179 ac_fn_c_check_decl "$LINENO" "setenv" "ac_cv_have_decl_setenv" "$ac_includes_default"
15180 if test "x$ac_cv_have_decl_setenv" = xyes; then :
15181   ac_have_decl=1
15182 else
15183   ac_have_decl=0
15184 fi
15185
15186 cat >>confdefs.h <<_ACEOF
15187 #define HAVE_DECL_SETENV $ac_have_decl
15188 _ACEOF
15189
15190
15191
15192
15193
15194
15195   if test $ac_cv_have_decl_setenv = no; then
15196     HAVE_DECL_SETENV=0
15197   fi
15198
15199
15200
15201
15202
15203   for ac_header in search.h
15204 do :
15205   ac_fn_c_check_header_mongrel "$LINENO" "search.h" "ac_cv_header_search_h" "$ac_includes_default"
15206 if test "x$ac_cv_header_search_h" = xyes; then :
15207   cat >>confdefs.h <<_ACEOF
15208 #define HAVE_SEARCH_H 1
15209 _ACEOF
15210
15211 fi
15212
15213 done
15214
15215   for ac_func in tsearch
15216 do :
15217   ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch"
15218 if test "x$ac_cv_func_tsearch" = xyes; then :
15219   cat >>confdefs.h <<_ACEOF
15220 #define HAVE_TSEARCH 1
15221 _ACEOF
15222
15223 fi
15224 done
15225
15226
15227
15228
15229   ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
15230       #include <signal.h>
15231       /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>.  */
15232       #include <sys/types.h>
15233
15234 "
15235 if test "x$ac_cv_type_sigset_t" = xyes; then :
15236
15237 cat >>confdefs.h <<_ACEOF
15238 #define HAVE_SIGSET_T 1
15239 _ACEOF
15240
15241 gl_cv_type_sigset_t=yes
15242 else
15243   gl_cv_type_sigset_t=no
15244 fi
15245
15246   if test $gl_cv_type_sigset_t != yes; then
15247     HAVE_SIGSET_T=0
15248   fi
15249
15250
15251
15252
15253
15254
15255
15256
15257
15258
15259
15260   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf returns a byte count as in C99" >&5
15261 $as_echo_n "checking whether snprintf returns a byte count as in C99... " >&6; }
15262 if ${gl_cv_func_snprintf_retval_c99+:} false; then :
15263   $as_echo_n "(cached) " >&6
15264 else
15265
15266       if test "$cross_compiling" = yes; then :
15267
15268          case "$host_os" in
15269                                  # Guess yes on glibc systems.
15270            *-gnu*)               gl_cv_func_snprintf_retval_c99="guessing yes";;
15271                                  # Guess yes on FreeBSD >= 5.
15272            freebsd[1-4]*)        gl_cv_func_snprintf_retval_c99="guessing no";;
15273            freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
15274                                  # Guess yes on Mac OS X >= 10.3.
15275            darwin[1-6].*)        gl_cv_func_snprintf_retval_c99="guessing no";;
15276            darwin*)              gl_cv_func_snprintf_retval_c99="guessing yes";;
15277                                  # Guess yes on OpenBSD >= 3.9.
15278            openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
15279                                  gl_cv_func_snprintf_retval_c99="guessing no";;
15280            openbsd*)             gl_cv_func_snprintf_retval_c99="guessing yes";;
15281                                  # Guess yes on Solaris >= 2.10.
15282            solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";;
15283            solaris*)             gl_cv_func_printf_sizes_c99="guessing no";;
15284                                  # Guess yes on AIX >= 4.
15285            aix[1-3]*)            gl_cv_func_snprintf_retval_c99="guessing no";;
15286            aix*)                 gl_cv_func_snprintf_retval_c99="guessing yes";;
15287                                  # Guess yes on NetBSD >= 3.
15288            netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
15289                                  gl_cv_func_snprintf_retval_c99="guessing no";;
15290            netbsd*)              gl_cv_func_snprintf_retval_c99="guessing yes";;
15291                                  # Guess yes on BeOS.
15292            beos*)                gl_cv_func_snprintf_retval_c99="guessing yes";;
15293                                  # If we don't know, assume the worst.
15294            *)                    gl_cv_func_snprintf_retval_c99="guessing no";;
15295          esac
15296
15297 else
15298   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15299 /* end confdefs.h.  */
15300
15301 #include <stdio.h>
15302 #include <string.h>
15303 #if HAVE_SNPRINTF
15304 # define my_snprintf snprintf
15305 #else
15306 # include <stdarg.h>
15307 static int my_snprintf (char *buf, int size, const char *format, ...)
15308 {
15309   va_list args;
15310   int ret;
15311   va_start (args, format);
15312   ret = vsnprintf (buf, size, format, args);
15313   va_end (args);
15314   return ret;
15315 }
15316 #endif
15317 static char buf[100];
15318 int main ()
15319 {
15320   strcpy (buf, "ABCDEF");
15321   if (my_snprintf (buf, 3, "%d %d", 4567, 89) != 7)
15322     return 1;
15323   if (my_snprintf (buf, 0, "%d %d", 4567, 89) != 7)
15324     return 2;
15325   if (my_snprintf (NULL, 0, "%d %d", 4567, 89) != 7)
15326     return 3;
15327   return 0;
15328 }
15329 _ACEOF
15330 if ac_fn_c_try_run "$LINENO"; then :
15331   gl_cv_func_snprintf_retval_c99=yes
15332 else
15333   gl_cv_func_snprintf_retval_c99=no
15334 fi
15335 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15336   conftest.$ac_objext conftest.beam conftest.$ac_ext
15337 fi
15338
15339
15340 fi
15341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_retval_c99" >&5
15342 $as_echo "$gl_cv_func_snprintf_retval_c99" >&6; }
15343
15344 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
15345 if test "x$ac_cv_have_decl_snprintf" = xyes; then :
15346   ac_have_decl=1
15347 else
15348   ac_have_decl=0
15349 fi
15350
15351 cat >>confdefs.h <<_ACEOF
15352 #define HAVE_DECL_SNPRINTF $ac_have_decl
15353 _ACEOF
15354
15355
15356   GNULIB_FFS=0;
15357     HAVE_FFS=1;
15358   HAVE_STRCASECMP=1;
15359   HAVE_DECL_STRNCASECMP=1;
15360
15361
15362
15363 ac_fn_c_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default"
15364 if test "x$ac_cv_have_decl_strdup" = xyes; then :
15365   ac_have_decl=1
15366 else
15367   ac_have_decl=0
15368 fi
15369
15370 cat >>confdefs.h <<_ACEOF
15371 #define HAVE_DECL_STRDUP $ac_have_decl
15372 _ACEOF
15373
15374
15375      REPLACE_STRERROR_0=0
15376   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5
15377 $as_echo_n "checking whether strerror(0) succeeds... " >&6; }
15378 if ${gl_cv_func_strerror_0_works+:} false; then :
15379   $as_echo_n "(cached) " >&6
15380 else
15381   if test "$cross_compiling" = yes; then :
15382   case "$host_os" in
15383                  # Guess yes on glibc systems.
15384          *-gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
15385                  # If we don't know, assume the worst.
15386          *)      gl_cv_func_strerror_0_works="guessing no" ;;
15387        esac
15388
15389 else
15390   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15391 /* end confdefs.h.  */
15392 #include <string.h>
15393            #include <errno.h>
15394
15395 int
15396 main ()
15397 {
15398 int result = 0;
15399            char *str;
15400            errno = 0;
15401            str = strerror (0);
15402            if (!*str) result |= 1;
15403            if (errno) result |= 2;
15404            if (strstr (str, "nknown") || strstr (str, "ndefined"))
15405              result |= 4;
15406            return result;
15407   ;
15408   return 0;
15409 }
15410 _ACEOF
15411 if ac_fn_c_try_run "$LINENO"; then :
15412   gl_cv_func_strerror_0_works=yes
15413 else
15414   gl_cv_func_strerror_0_works=no
15415 fi
15416 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15417   conftest.$ac_objext conftest.beam conftest.$ac_ext
15418 fi
15419
15420
15421 fi
15422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5
15423 $as_echo "$gl_cv_func_strerror_0_works" >&6; }
15424   case "$gl_cv_func_strerror_0_works" in
15425     *yes) ;;
15426     *)
15427       REPLACE_STRERROR_0=1
15428
15429 $as_echo "#define REPLACE_STRERROR_0 1" >>confdefs.h
15430
15431       ;;
15432   esac
15433
15434
15435
15436
15437
15438
15439
15440
15441
15442
15443
15444
15445      if test $gl_cv_have_include_next = yes; then
15446        gl_cv_next_string_h='<'string.h'>'
15447      else
15448        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
15449 $as_echo_n "checking absolute name of <string.h>... " >&6; }
15450 if ${gl_cv_next_string_h+:} false; then :
15451   $as_echo_n "(cached) " >&6
15452 else
15453
15454                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15455 /* end confdefs.h.  */
15456 #include <string.h>
15457
15458 _ACEOF
15459                                                                                                                         case "$host_os" in
15460                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
15461                  *)    gl_absname_cpp="$ac_cpp" ;;
15462                esac
15463
15464                case "$host_os" in
15465                  mingw*)
15466                                                                                                                                      gl_dirsep_regex='[/\\]'
15467                    ;;
15468                  *)
15469                    gl_dirsep_regex='\/'
15470                    ;;
15471                esac
15472                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
15473
15474                gl_header_literal_regex=`echo 'string.h' \
15475                                         | sed -e "$gl_make_literal_regex_sed"`
15476                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
15477                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
15478                    s|^/[^/]|//&|
15479                    p
15480                    q
15481                  }'
15482                                                             gl_cv_next_string_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
15483                       sed -n "$gl_absolute_header_sed"`'"'
15484
15485
15486 fi
15487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
15488 $as_echo "$gl_cv_next_string_h" >&6; }
15489      fi
15490      NEXT_STRING_H=$gl_cv_next_string_h
15491
15492      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
15493        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
15494        gl_next_as_first_directive='<'string.h'>'
15495      else
15496        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
15497        gl_next_as_first_directive=$gl_cv_next_string_h
15498      fi
15499      NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
15500
15501
15502
15503
15504
15505
15506     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
15507     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
15508     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
15509 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
15510 if eval \${$as_gl_Symbol+:} false; then :
15511   $as_echo_n "(cached) " >&6
15512 else
15513   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15514 /* end confdefs.h.  */
15515 #include <string.h>
15516
15517 int
15518 main ()
15519 {
15520 #undef $gl_func
15521   (void) $gl_func;
15522   ;
15523   return 0;
15524 }
15525 _ACEOF
15526 if ac_fn_c_try_compile "$LINENO"; then :
15527   eval "$as_gl_Symbol=yes"
15528 else
15529   eval "$as_gl_Symbol=no"
15530 fi
15531 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15532 fi
15533 eval ac_res=\$$as_gl_Symbol
15534                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15535 $as_echo "$ac_res" >&6; }
15536     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
15537   cat >>confdefs.h <<_ACEOF
15538 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
15539 _ACEOF
15540
15541                      eval ac_cv_have_decl_$gl_func=yes
15542 fi
15543       done
15544
15545
15546
15547
15548
15549
15550
15551
15552
15553
15554
15555
15556
15557
15558
15559
15560      if test $gl_cv_have_include_next = yes; then
15561        gl_cv_next_strings_h='<'strings.h'>'
15562      else
15563        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <strings.h>" >&5
15564 $as_echo_n "checking absolute name of <strings.h>... " >&6; }
15565 if ${gl_cv_next_strings_h+:} false; then :
15566   $as_echo_n "(cached) " >&6
15567 else
15568
15569              if test $ac_cv_header_strings_h = yes; then
15570
15571
15572                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15573 /* end confdefs.h.  */
15574 #include <strings.h>
15575
15576 _ACEOF
15577                                                                                                                         case "$host_os" in
15578                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
15579                  *)    gl_absname_cpp="$ac_cpp" ;;
15580                esac
15581
15582                case "$host_os" in
15583                  mingw*)
15584                                                                                                                                      gl_dirsep_regex='[/\\]'
15585                    ;;
15586                  *)
15587                    gl_dirsep_regex='\/'
15588                    ;;
15589                esac
15590                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
15591
15592                gl_header_literal_regex=`echo 'strings.h' \
15593                                         | sed -e "$gl_make_literal_regex_sed"`
15594                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
15595                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
15596                    s|^/[^/]|//&|
15597                    p
15598                    q
15599                  }'
15600                                                             gl_cv_next_strings_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
15601                       sed -n "$gl_absolute_header_sed"`'"'
15602           else
15603                gl_cv_next_strings_h='<'strings.h'>'
15604              fi
15605
15606
15607 fi
15608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_strings_h" >&5
15609 $as_echo "$gl_cv_next_strings_h" >&6; }
15610      fi
15611      NEXT_STRINGS_H=$gl_cv_next_strings_h
15612
15613      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
15614        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
15615        gl_next_as_first_directive='<'strings.h'>'
15616      else
15617        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
15618        gl_next_as_first_directive=$gl_cv_next_strings_h
15619      fi
15620      NEXT_AS_FIRST_DIRECTIVE_STRINGS_H=$gl_next_as_first_directive
15621
15622
15623
15624
15625   if test $ac_cv_header_strings_h = yes; then
15626     HAVE_STRINGS_H=1
15627   else
15628     HAVE_STRINGS_H=0
15629   fi
15630
15631
15632
15633     for gl_func in ffs strcasecmp strncasecmp; do
15634     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
15635     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
15636 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
15637 if eval \${$as_gl_Symbol+:} false; then :
15638   $as_echo_n "(cached) " >&6
15639 else
15640   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15641 /* end confdefs.h.  */
15642
15643     /* Minix 3.1.8 has a bug: <sys/types.h> must be included before
15644        <strings.h>.  */
15645     #include <sys/types.h>
15646     #include <strings.h>
15647
15648 int
15649 main ()
15650 {
15651 #undef $gl_func
15652   (void) $gl_func;
15653   ;
15654   return 0;
15655 }
15656 _ACEOF
15657 if ac_fn_c_try_compile "$LINENO"; then :
15658   eval "$as_gl_Symbol=yes"
15659 else
15660   eval "$as_gl_Symbol=no"
15661 fi
15662 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15663 fi
15664 eval ac_res=\$$as_gl_Symbol
15665                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15666 $as_echo "$ac_res" >&6; }
15667     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
15668   cat >>confdefs.h <<_ACEOF
15669 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
15670 _ACEOF
15671
15672                      eval ac_cv_have_decl_$gl_func=yes
15673 fi
15674       done
15675
15676
15677 ac_fn_c_check_decl "$LINENO" "strndup" "ac_cv_have_decl_strndup" "$ac_includes_default"
15678 if test "x$ac_cv_have_decl_strndup" = xyes; then :
15679   ac_have_decl=1
15680 else
15681   ac_have_decl=0
15682 fi
15683
15684 cat >>confdefs.h <<_ACEOF
15685 #define HAVE_DECL_STRNDUP $ac_have_decl
15686 _ACEOF
15687
15688
15689
15690 ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
15691 if test "x$ac_cv_have_decl_strnlen" = xyes; then :
15692   ac_have_decl=1
15693 else
15694   ac_have_decl=0
15695 fi
15696
15697 cat >>confdefs.h <<_ACEOF
15698 #define HAVE_DECL_STRNLEN $ac_have_decl
15699 _ACEOF
15700
15701
15702
15703 ac_fn_c_check_decl "$LINENO" "strtoumax" "ac_cv_have_decl_strtoumax" "$ac_includes_default"
15704 if test "x$ac_cv_have_decl_strtoumax" = xyes; then :
15705   ac_have_decl=1
15706 else
15707   ac_have_decl=0
15708 fi
15709
15710 cat >>confdefs.h <<_ACEOF
15711 #define HAVE_DECL_STRTOUMAX $ac_have_decl
15712 _ACEOF
15713
15714
15715
15716
15717
15718
15719
15720   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
15721 $as_echo_n "checking for struct timespec in <time.h>... " >&6; }
15722 if ${gl_cv_sys_struct_timespec_in_time_h+:} false; then :
15723   $as_echo_n "(cached) " >&6
15724 else
15725   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15726 /* end confdefs.h.  */
15727 #include <time.h>
15728
15729 int
15730 main ()
15731 {
15732 static struct timespec x; x.tv_sec = x.tv_nsec;
15733   ;
15734   return 0;
15735 }
15736 _ACEOF
15737 if ac_fn_c_try_compile "$LINENO"; then :
15738   gl_cv_sys_struct_timespec_in_time_h=yes
15739 else
15740   gl_cv_sys_struct_timespec_in_time_h=no
15741 fi
15742 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15743 fi
15744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
15745 $as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
15746
15747   TIME_H_DEFINES_STRUCT_TIMESPEC=0
15748   SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
15749   PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
15750   if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
15751     TIME_H_DEFINES_STRUCT_TIMESPEC=1
15752   else
15753     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
15754 $as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
15755 if ${gl_cv_sys_struct_timespec_in_sys_time_h+:} false; then :
15756   $as_echo_n "(cached) " >&6
15757 else
15758   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15759 /* end confdefs.h.  */
15760 #include <sys/time.h>
15761
15762 int
15763 main ()
15764 {
15765 static struct timespec x; x.tv_sec = x.tv_nsec;
15766   ;
15767   return 0;
15768 }
15769 _ACEOF
15770 if ac_fn_c_try_compile "$LINENO"; then :
15771   gl_cv_sys_struct_timespec_in_sys_time_h=yes
15772 else
15773   gl_cv_sys_struct_timespec_in_sys_time_h=no
15774 fi
15775 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15776 fi
15777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
15778 $as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
15779     if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
15780       SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
15781     else
15782       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
15783 $as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
15784 if ${gl_cv_sys_struct_timespec_in_pthread_h+:} false; then :
15785   $as_echo_n "(cached) " >&6
15786 else
15787   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15788 /* end confdefs.h.  */
15789 #include <pthread.h>
15790
15791 int
15792 main ()
15793 {
15794 static struct timespec x; x.tv_sec = x.tv_nsec;
15795   ;
15796   return 0;
15797 }
15798 _ACEOF
15799 if ac_fn_c_try_compile "$LINENO"; then :
15800   gl_cv_sys_struct_timespec_in_pthread_h=yes
15801 else
15802   gl_cv_sys_struct_timespec_in_pthread_h=no
15803 fi
15804 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15805 fi
15806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
15807 $as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
15808       if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
15809         PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
15810       fi
15811     fi
15812   fi
15813
15814
15815
15816
15817
15818
15819
15820
15821
15822
15823
15824
15825
15826
15827
15828      if test $gl_cv_have_include_next = yes; then
15829        gl_cv_next_time_h='<'time.h'>'
15830      else
15831        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
15832 $as_echo_n "checking absolute name of <time.h>... " >&6; }
15833 if ${gl_cv_next_time_h+:} false; then :
15834   $as_echo_n "(cached) " >&6
15835 else
15836
15837                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15838 /* end confdefs.h.  */
15839 #include <time.h>
15840
15841 _ACEOF
15842                                                                                                                         case "$host_os" in
15843                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
15844                  *)    gl_absname_cpp="$ac_cpp" ;;
15845                esac
15846
15847                case "$host_os" in
15848                  mingw*)
15849                                                                                                                                      gl_dirsep_regex='[/\\]'
15850                    ;;
15851                  *)
15852                    gl_dirsep_regex='\/'
15853                    ;;
15854                esac
15855                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
15856
15857                gl_header_literal_regex=`echo 'time.h' \
15858                                         | sed -e "$gl_make_literal_regex_sed"`
15859                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
15860                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
15861                    s|^/[^/]|//&|
15862                    p
15863                    q
15864                  }'
15865                                                             gl_cv_next_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
15866                       sed -n "$gl_absolute_header_sed"`'"'
15867
15868
15869 fi
15870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
15871 $as_echo "$gl_cv_next_time_h" >&6; }
15872      fi
15873      NEXT_TIME_H=$gl_cv_next_time_h
15874
15875      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
15876        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
15877        gl_next_as_first_directive='<'time.h'>'
15878      else
15879        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
15880        gl_next_as_first_directive=$gl_cv_next_time_h
15881      fi
15882      NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
15883
15884
15885
15886
15887
15888
15889
15890
15891
15892
15893
15894
15895
15896
15897
15898
15899 gl_libunistring_sed_extract_major='/^[0-9]/{s/^\([0-9]*\).*/\1/p;q;}
15900 i\
15901 0
15902 q
15903 '
15904 gl_libunistring_sed_extract_minor='/^[0-9][0-9]*[.][0-9]/{s/^[0-9]*[.]\([0-9]*\).*/\1/p;q;}
15905 i\
15906 0
15907 q
15908 '
15909 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;}
15910 i\
15911 0
15912 q
15913 '
15914
15915
15916   if test "$HAVE_LIBUNISTRING" = yes; then
15917     LIBUNISTRING_VERSION_MAJOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_major"`
15918     LIBUNISTRING_VERSION_MINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_minor"`
15919     LIBUNISTRING_VERSION_SUBMINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_subminor"`
15920   fi
15921
15922
15923
15924 ac_fn_c_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default"
15925 if test "x$ac_cv_have_decl_unsetenv" = xyes; then :
15926   ac_have_decl=1
15927 else
15928   ac_have_decl=0
15929 fi
15930
15931 cat >>confdefs.h <<_ACEOF
15932 #define HAVE_DECL_UNSETENV $ac_have_decl
15933 _ACEOF
15934
15935
15936   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the utimes function works" >&5
15937 $as_echo_n "checking whether the utimes function works... " >&6; }
15938 if ${gl_cv_func_working_utimes+:} false; then :
15939   $as_echo_n "(cached) " >&6
15940 else
15941
15942   if test "$cross_compiling" = yes; then :
15943   gl_cv_func_working_utimes=no
15944 else
15945   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15946 /* end confdefs.h.  */
15947
15948 #include <sys/types.h>
15949 #include <sys/stat.h>
15950 #include <fcntl.h>
15951 #include <sys/time.h>
15952 #include <time.h>
15953 #include <unistd.h>
15954 #include <stdlib.h>
15955 #include <stdio.h>
15956 #include <utime.h>
15957
15958 static int
15959 inorder (time_t a, time_t b, time_t c)
15960 {
15961   return a <= b && b <= c;
15962 }
15963
15964 int
15965 main ()
15966 {
15967   int result = 0;
15968   char const *file = "conftest.utimes";
15969   static struct timeval timeval[2] = {{9, 10}, {999999, 999999}};
15970
15971   /* Test whether utimes() essentially works.  */
15972   {
15973     struct stat sbuf;
15974     FILE *f = fopen (file, "w");
15975     if (f == NULL)
15976       result |= 1;
15977     else if (fclose (f) != 0)
15978       result |= 1;
15979     else if (utimes (file, timeval) != 0)
15980       result |= 2;
15981     else if (lstat (file, &sbuf) != 0)
15982       result |= 1;
15983     else if (!(sbuf.st_atime == timeval[0].tv_sec
15984                && sbuf.st_mtime == timeval[1].tv_sec))
15985       result |= 4;
15986     if (unlink (file) != 0)
15987       result |= 1;
15988   }
15989
15990   /* Test whether utimes() with a NULL argument sets the file's timestamp
15991      to the current time.  Use 'fstat' as well as 'time' to
15992      determine the "current" time, to accommodate NFS file systems
15993      if there is a time skew between the host and the NFS server.  */
15994   {
15995     int fd = open (file, O_WRONLY|O_CREAT, 0644);
15996     if (fd < 0)
15997       result |= 1;
15998     else
15999       {
16000         time_t t0, t2;
16001         struct stat st0, st1, st2;
16002         if (time (&t0) == (time_t) -1)
16003           result |= 1;
16004         else if (fstat (fd, &st0) != 0)
16005           result |= 1;
16006         else if (utimes (file, timeval) != 0)
16007           result |= 2;
16008         else if (utimes (file, NULL) != 0)
16009           result |= 8;
16010         else if (fstat (fd, &st1) != 0)
16011           result |= 1;
16012         else if (write (fd, "\n", 1) != 1)
16013           result |= 1;
16014         else if (fstat (fd, &st2) != 0)
16015           result |= 1;
16016         else if (time (&t2) == (time_t) -1)
16017           result |= 1;
16018         else
16019           {
16020             int m_ok_POSIX = inorder (t0, st1.st_mtime, t2);
16021             int m_ok_NFS = inorder (st0.st_mtime, st1.st_mtime, st2.st_mtime);
16022             if (! (st1.st_atime == st1.st_mtime))
16023               result |= 16;
16024             if (! (m_ok_POSIX || m_ok_NFS))
16025               result |= 32;
16026           }
16027         if (close (fd) != 0)
16028           result |= 1;
16029       }
16030     if (unlink (file) != 0)
16031       result |= 1;
16032   }
16033
16034   /* Test whether utimes() with a NULL argument works on read-only files.  */
16035   {
16036     int fd = open (file, O_WRONLY|O_CREAT, 0444);
16037     if (fd < 0)
16038       result |= 1;
16039     else if (close (fd) != 0)
16040       result |= 1;
16041     else if (utimes (file, NULL) != 0)
16042       result |= 64;
16043     if (unlink (file) != 0)
16044       result |= 1;
16045   }
16046
16047   return result;
16048 }
16049
16050 _ACEOF
16051 if ac_fn_c_try_run "$LINENO"; then :
16052   gl_cv_func_working_utimes=yes
16053 else
16054   gl_cv_func_working_utimes=no
16055 fi
16056 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16057   conftest.$ac_objext conftest.beam conftest.$ac_ext
16058 fi
16059
16060 fi
16061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_utimes" >&5
16062 $as_echo "$gl_cv_func_working_utimes" >&6; }
16063
16064   if test $gl_cv_func_working_utimes = yes; then
16065
16066 $as_echo "#define HAVE_WORKING_UTIMES 1" >>confdefs.h
16067
16068   fi
16069
16070
16071
16072
16073
16074   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct utimbuf" >&5
16075 $as_echo_n "checking for struct utimbuf... " >&6; }
16076 if ${gl_cv_sys_struct_utimbuf+:} false; then :
16077   $as_echo_n "(cached) " >&6
16078 else
16079   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16080 /* end confdefs.h.  */
16081 #if HAVE_SYS_TIME_H
16082              #include <sys/time.h>
16083             #endif
16084             #include <time.h>
16085             #ifdef HAVE_UTIME_H
16086              #include <utime.h>
16087             #endif
16088
16089 int
16090 main ()
16091 {
16092 static struct utimbuf x; x.actime = x.modtime;
16093   ;
16094   return 0;
16095 }
16096 _ACEOF
16097 if ac_fn_c_try_compile "$LINENO"; then :
16098   gl_cv_sys_struct_utimbuf=yes
16099 else
16100   gl_cv_sys_struct_utimbuf=no
16101 fi
16102 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16103 fi
16104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_utimbuf" >&5
16105 $as_echo "$gl_cv_sys_struct_utimbuf" >&6; }
16106
16107   if test $gl_cv_sys_struct_utimbuf = yes; then
16108
16109 $as_echo "#define HAVE_STRUCT_UTIMBUF 1" >>confdefs.h
16110
16111   fi
16112
16113
16114
16115
16116
16117
16118
16119
16120
16121
16122
16123
16124
16125   if test $ac_cv_header_features_h = yes; then
16126     HAVE_FEATURES_H=1
16127   else
16128     HAVE_FEATURES_H=0
16129   fi
16130
16131
16132
16133   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5
16134 $as_echo_n "checking for inttypes.h... " >&6; }
16135 if ${gl_cv_header_inttypes_h+:} false; then :
16136   $as_echo_n "(cached) " >&6
16137 else
16138   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16139 /* end confdefs.h.  */
16140
16141 #include <sys/types.h>
16142 #include <inttypes.h>
16143
16144 int
16145 main ()
16146 {
16147 uintmax_t i = (uintmax_t) -1; return !i;
16148   ;
16149   return 0;
16150 }
16151 _ACEOF
16152 if ac_fn_c_try_compile "$LINENO"; then :
16153   gl_cv_header_inttypes_h=yes
16154 else
16155   gl_cv_header_inttypes_h=no
16156 fi
16157 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16158 fi
16159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_inttypes_h" >&5
16160 $as_echo "$gl_cv_header_inttypes_h" >&6; }
16161   if test $gl_cv_header_inttypes_h = yes; then
16162
16163 cat >>confdefs.h <<_ACEOF
16164 #define HAVE_INTTYPES_H_WITH_UINTMAX 1
16165 _ACEOF
16166
16167   fi
16168
16169
16170   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint.h" >&5
16171 $as_echo_n "checking for stdint.h... " >&6; }
16172 if ${gl_cv_header_stdint_h+:} false; then :
16173   $as_echo_n "(cached) " >&6
16174 else
16175   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16176 /* end confdefs.h.  */
16177 #include <sys/types.h>
16178             #include <stdint.h>
16179 int
16180 main ()
16181 {
16182 uintmax_t i = (uintmax_t) -1; return !i;
16183   ;
16184   return 0;
16185 }
16186 _ACEOF
16187 if ac_fn_c_try_compile "$LINENO"; then :
16188   gl_cv_header_stdint_h=yes
16189 else
16190   gl_cv_header_stdint_h=no
16191 fi
16192 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16193 fi
16194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_h" >&5
16195 $as_echo "$gl_cv_header_stdint_h" >&6; }
16196   if test $gl_cv_header_stdint_h = yes; then
16197
16198 cat >>confdefs.h <<_ACEOF
16199 #define HAVE_STDINT_H_WITH_UINTMAX 1
16200 _ACEOF
16201
16202   fi
16203
16204
16205
16206
16207   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intmax_t" >&5
16208 $as_echo_n "checking for intmax_t... " >&6; }
16209 if ${gt_cv_c_intmax_t+:} false; then :
16210   $as_echo_n "(cached) " >&6
16211 else
16212   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16213 /* end confdefs.h.  */
16214
16215 #include <stddef.h>
16216 #include <stdlib.h>
16217 #if HAVE_STDINT_H_WITH_UINTMAX
16218 #include <stdint.h>
16219 #endif
16220 #if HAVE_INTTYPES_H_WITH_UINTMAX
16221 #include <inttypes.h>
16222 #endif
16223
16224 int
16225 main ()
16226 {
16227 intmax_t x = -1; return !x;
16228   ;
16229   return 0;
16230 }
16231 _ACEOF
16232 if ac_fn_c_try_compile "$LINENO"; then :
16233   gt_cv_c_intmax_t=yes
16234 else
16235   gt_cv_c_intmax_t=no
16236 fi
16237 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16238 fi
16239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_intmax_t" >&5
16240 $as_echo "$gt_cv_c_intmax_t" >&6; }
16241   if test $gt_cv_c_intmax_t = yes; then
16242
16243 $as_echo "#define HAVE_INTMAX_T 1" >>confdefs.h
16244
16245   else
16246
16247     test $ac_cv_type_long_long_int = yes \
16248       && ac_type='long long' \
16249       || ac_type='long'
16250
16251 cat >>confdefs.h <<_ACEOF
16252 #define intmax_t $ac_type
16253 _ACEOF
16254
16255   fi
16256
16257
16258   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
16259 $as_echo_n "checking where to find the exponent in a 'double'... " >&6; }
16260 if ${gl_cv_cc_double_expbit0+:} false; then :
16261   $as_echo_n "(cached) " >&6
16262 else
16263
16264       if test "$cross_compiling" = yes; then :
16265
16266                                                                       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16267 /* end confdefs.h.  */
16268
16269 #if defined arm || defined __arm || defined __arm__
16270   mixed_endianness
16271 #endif
16272
16273 _ACEOF
16274 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16275   $EGREP "mixed_endianness" >/dev/null 2>&1; then :
16276   gl_cv_cc_double_expbit0="unknown"
16277 else
16278
16279                                                          :
16280 if ${ac_cv_c_bigendian+:} false; then :
16281   $as_echo_n "(cached) " >&6
16282 else
16283   ac_cv_c_bigendian=unknown
16284     # See if we're dealing with a universal compiler.
16285     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16286 /* end confdefs.h.  */
16287 #ifndef __APPLE_CC__
16288                not a universal capable compiler
16289              #endif
16290              typedef int dummy;
16291
16292 _ACEOF
16293 if ac_fn_c_try_compile "$LINENO"; then :
16294
16295         # Check for potential -arch flags.  It is not universal unless
16296         # there are at least two -arch flags with different values.
16297         ac_arch=
16298         ac_prev=
16299         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
16300          if test -n "$ac_prev"; then
16301            case $ac_word in
16302              i?86 | x86_64 | ppc | ppc64)
16303                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
16304                  ac_arch=$ac_word
16305                else
16306                  ac_cv_c_bigendian=universal
16307                  break
16308                fi
16309                ;;
16310            esac
16311            ac_prev=
16312          elif test "x$ac_word" = "x-arch"; then
16313            ac_prev=arch
16314          fi
16315        done
16316 fi
16317 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16318     if test $ac_cv_c_bigendian = unknown; then
16319       # See if sys/param.h defines the BYTE_ORDER macro.
16320       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16321 /* end confdefs.h.  */
16322 #include <sys/types.h>
16323              #include <sys/param.h>
16324
16325 int
16326 main ()
16327 {
16328 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
16329                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
16330                      && LITTLE_ENDIAN)
16331               bogus endian macros
16332              #endif
16333
16334   ;
16335   return 0;
16336 }
16337 _ACEOF
16338 if ac_fn_c_try_compile "$LINENO"; then :
16339   # It does; now see whether it defined to BIG_ENDIAN or not.
16340          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16341 /* end confdefs.h.  */
16342 #include <sys/types.h>
16343                 #include <sys/param.h>
16344
16345 int
16346 main ()
16347 {
16348 #if BYTE_ORDER != BIG_ENDIAN
16349                  not big endian
16350                 #endif
16351
16352   ;
16353   return 0;
16354 }
16355 _ACEOF
16356 if ac_fn_c_try_compile "$LINENO"; then :
16357   ac_cv_c_bigendian=yes
16358 else
16359   ac_cv_c_bigendian=no
16360 fi
16361 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16362 fi
16363 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16364     fi
16365     if test $ac_cv_c_bigendian = unknown; then
16366       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
16367       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16368 /* end confdefs.h.  */
16369 #include <limits.h>
16370
16371 int
16372 main ()
16373 {
16374 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
16375               bogus endian macros
16376              #endif
16377
16378   ;
16379   return 0;
16380 }
16381 _ACEOF
16382 if ac_fn_c_try_compile "$LINENO"; then :
16383   # It does; now see whether it defined to _BIG_ENDIAN or not.
16384          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16385 /* end confdefs.h.  */
16386 #include <limits.h>
16387
16388 int
16389 main ()
16390 {
16391 #ifndef _BIG_ENDIAN
16392                  not big endian
16393                 #endif
16394
16395   ;
16396   return 0;
16397 }
16398 _ACEOF
16399 if ac_fn_c_try_compile "$LINENO"; then :
16400   ac_cv_c_bigendian=yes
16401 else
16402   ac_cv_c_bigendian=no
16403 fi
16404 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16405 fi
16406 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16407     fi
16408     if test $ac_cv_c_bigendian = unknown; then
16409       # Compile a test program.
16410       if test "$cross_compiling" = yes; then :
16411   # Try to guess by grepping values from an object file.
16412          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16413 /* end confdefs.h.  */
16414 short int ascii_mm[] =
16415                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
16416                 short int ascii_ii[] =
16417                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
16418                 int use_ascii (int i) {
16419                   return ascii_mm[i] + ascii_ii[i];
16420                 }
16421                 short int ebcdic_ii[] =
16422                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
16423                 short int ebcdic_mm[] =
16424                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
16425                 int use_ebcdic (int i) {
16426                   return ebcdic_mm[i] + ebcdic_ii[i];
16427                 }
16428                 extern int foo;
16429
16430 int
16431 main ()
16432 {
16433 return use_ascii (foo) == use_ebcdic (foo);
16434   ;
16435   return 0;
16436 }
16437 _ACEOF
16438 if ac_fn_c_try_compile "$LINENO"; then :
16439   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
16440               ac_cv_c_bigendian=yes
16441             fi
16442             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
16443               if test "$ac_cv_c_bigendian" = unknown; then
16444                 ac_cv_c_bigendian=no
16445               else
16446                 # finding both strings is unlikely to happen, but who knows?
16447                 ac_cv_c_bigendian=unknown
16448               fi
16449             fi
16450 fi
16451 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16452 else
16453   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16454 /* end confdefs.h.  */
16455 $ac_includes_default
16456 int
16457 main ()
16458 {
16459
16460              /* Are we little or big endian?  From Harbison&Steele.  */
16461              union
16462              {
16463                long int l;
16464                char c[sizeof (long int)];
16465              } u;
16466              u.l = 1;
16467              return u.c[sizeof (long int) - 1] == 1;
16468
16469   ;
16470   return 0;
16471 }
16472 _ACEOF
16473 if ac_fn_c_try_run "$LINENO"; then :
16474   ac_cv_c_bigendian=no
16475 else
16476   ac_cv_c_bigendian=yes
16477 fi
16478 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16479   conftest.$ac_objext conftest.beam conftest.$ac_ext
16480 fi
16481
16482     fi
16483 fi
16484 :
16485  case $ac_cv_c_bigendian in #(
16486    yes)
16487      gl_cv_cc_double_expbit0="word 0 bit 20";; #(
16488    no)
16489      gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
16490    universal)
16491
16492 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
16493
16494      ;; #(
16495    *)
16496      gl_cv_cc_double_expbit0="unknown" ;;
16497  esac
16498
16499
16500 fi
16501 rm -f conftest*
16502
16503
16504 else
16505   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16506 /* end confdefs.h.  */
16507
16508 #include <float.h>
16509 #include <stddef.h>
16510 #include <stdio.h>
16511 #include <string.h>
16512 #define NWORDS \
16513   ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
16514 typedef union { double value; unsigned int word[NWORDS]; } memory_double;
16515 static unsigned int ored_words[NWORDS];
16516 static unsigned int anded_words[NWORDS];
16517 static void add_to_ored_words (double x)
16518 {
16519   memory_double m;
16520   size_t i;
16521   /* Clear it first, in case sizeof (double) < sizeof (memory_double).  */
16522   memset (&m, 0, sizeof (memory_double));
16523   m.value = x;
16524   for (i = 0; i < NWORDS; i++)
16525     {
16526       ored_words[i] |= m.word[i];
16527       anded_words[i] &= m.word[i];
16528     }
16529 }
16530 int main ()
16531 {
16532   size_t j;
16533   FILE *fp = fopen ("conftest.out", "w");
16534   if (fp == NULL)
16535     return 1;
16536   for (j = 0; j < NWORDS; j++)
16537     anded_words[j] = ~ (unsigned int) 0;
16538   add_to_ored_words (0.25);
16539   add_to_ored_words (0.5);
16540   add_to_ored_words (1.0);
16541   add_to_ored_words (2.0);
16542   add_to_ored_words (4.0);
16543   /* Remove bits that are common (e.g. if representation of the first mantissa
16544      bit is explicit).  */
16545   for (j = 0; j < NWORDS; j++)
16546     ored_words[j] &= ~anded_words[j];
16547   /* Now find the nonzero word.  */
16548   for (j = 0; j < NWORDS; j++)
16549     if (ored_words[j] != 0)
16550       break;
16551   if (j < NWORDS)
16552     {
16553       size_t i;
16554       for (i = j + 1; i < NWORDS; i++)
16555         if (ored_words[i] != 0)
16556           {
16557             fprintf (fp, "unknown");
16558             return (fclose (fp) != 0);
16559           }
16560       for (i = 0; ; i++)
16561         if ((ored_words[j] >> i) & 1)
16562           {
16563             fprintf (fp, "word %d bit %d", (int) j, (int) i);
16564             return (fclose (fp) != 0);
16565           }
16566     }
16567   fprintf (fp, "unknown");
16568   return (fclose (fp) != 0);
16569 }
16570
16571 _ACEOF
16572 if ac_fn_c_try_run "$LINENO"; then :
16573   gl_cv_cc_double_expbit0=`cat conftest.out`
16574 else
16575   gl_cv_cc_double_expbit0="unknown"
16576 fi
16577 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16578   conftest.$ac_objext conftest.beam conftest.$ac_ext
16579 fi
16580
16581       rm -f conftest.out
16582
16583 fi
16584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
16585 $as_echo "$gl_cv_cc_double_expbit0" >&6; }
16586   case "$gl_cv_cc_double_expbit0" in
16587     word*bit*)
16588       word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
16589       bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
16590
16591 cat >>confdefs.h <<_ACEOF
16592 #define DBL_EXPBIT0_WORD $word
16593 _ACEOF
16594
16595
16596 cat >>confdefs.h <<_ACEOF
16597 #define DBL_EXPBIT0_BIT $bit
16598 _ACEOF
16599
16600       ;;
16601   esac
16602
16603
16604
16605
16606
16607
16608   for ac_func in snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb
16609 do :
16610   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16611 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16612 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16613   cat >>confdefs.h <<_ACEOF
16614 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16615 _ACEOF
16616
16617 fi
16618 done
16619
16620       ac_fn_c_check_decl "$LINENO" "_snprintf" "ac_cv_have_decl__snprintf" "#include <stdio.h>
16621 "
16622 if test "x$ac_cv_have_decl__snprintf" = xyes; then :
16623   ac_have_decl=1
16624 else
16625   ac_have_decl=0
16626 fi
16627
16628 cat >>confdefs.h <<_ACEOF
16629 #define HAVE_DECL__SNPRINTF $ac_have_decl
16630 _ACEOF
16631
16632
16633
16634   case "$gl_cv_func_snprintf_retval_c99" in
16635     *yes)
16636
16637 $as_echo "#define HAVE_SNPRINTF_RETVAL_C99 1" >>confdefs.h
16638
16639       ;;
16640   esac
16641
16642 ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
16643 if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
16644   ac_have_decl=1
16645 else
16646   ac_have_decl=0
16647 fi
16648
16649 cat >>confdefs.h <<_ACEOF
16650 #define HAVE_DECL_VSNPRINTF $ac_have_decl
16651 _ACEOF
16652
16653
16654
16655
16656
16657
16658    if false; then
16659   GL_COND_LIBTOOL_TRUE=
16660   GL_COND_LIBTOOL_FALSE='#'
16661 else
16662   GL_COND_LIBTOOL_TRUE='#'
16663   GL_COND_LIBTOOL_FALSE=
16664 fi
16665
16666   gl_cond_libtool=false
16667   gl_libdeps=
16668   gl_ltlibdeps=
16669   gl_m4_base='m4'
16670
16671
16672
16673
16674
16675
16676
16677
16678
16679   gl_source_base='gnu'
16680
16681
16682   if test $ac_cv_func_alloca_works = no; then
16683     :
16684   fi
16685
16686   # Define an additional variable used in the Makefile substitution.
16687   if test $ac_cv_working_alloca_h = yes; then
16688     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
16689 $as_echo_n "checking for alloca as a compiler built-in... " >&6; }
16690 if ${gl_cv_rpl_alloca+:} false; then :
16691   $as_echo_n "(cached) " >&6
16692 else
16693
16694       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16695 /* end confdefs.h.  */
16696
16697 #if defined __GNUC__ || defined _AIX || defined _MSC_VER
16698         Need own alloca
16699 #endif
16700
16701 _ACEOF
16702 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16703   $EGREP "Need own alloca" >/dev/null 2>&1; then :
16704   gl_cv_rpl_alloca=yes
16705 else
16706   gl_cv_rpl_alloca=no
16707 fi
16708 rm -f conftest*
16709
16710
16711 fi
16712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
16713 $as_echo "$gl_cv_rpl_alloca" >&6; }
16714     if test $gl_cv_rpl_alloca = yes; then
16715
16716 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
16717
16718       ALLOCA_H=alloca.h
16719     else
16720                   ALLOCA_H=
16721     fi
16722   else
16723     ALLOCA_H=alloca.h
16724   fi
16725
16726    if test -n "$ALLOCA_H"; then
16727   GL_GENERATE_ALLOCA_H_TRUE=
16728   GL_GENERATE_ALLOCA_H_FALSE='#'
16729 else
16730   GL_GENERATE_ALLOCA_H_TRUE='#'
16731   GL_GENERATE_ALLOCA_H_FALSE=
16732 fi
16733
16734
16735
16736
16737 cat >>confdefs.h <<_ACEOF
16738 #define GNULIB_AREADLINKAT 1
16739 _ACEOF
16740
16741
16742
16743
16744
16745
16746
16747   ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
16748 "
16749 if test "x$ac_cv_have_decl_program_invocation_name" = xyes; then :
16750   ac_have_decl=1
16751 else
16752   ac_have_decl=0
16753 fi
16754
16755 cat >>confdefs.h <<_ACEOF
16756 #define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl
16757 _ACEOF
16758 if test $ac_have_decl = 1; then :
16759
16760 else
16761
16762 $as_echo "#define GNULIB_PROGRAM_INVOCATION_NAME 1" >>confdefs.h
16763
16764 fi
16765
16766   ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
16767 "
16768 if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes; then :
16769   ac_have_decl=1
16770 else
16771   ac_have_decl=0
16772 fi
16773
16774 cat >>confdefs.h <<_ACEOF
16775 #define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl
16776 _ACEOF
16777 if test $ac_have_decl = 1; then :
16778
16779 else
16780
16781 $as_echo "#define GNULIB_PROGRAM_INVOCATION_SHORT_NAME 1" >>confdefs.h
16782
16783 fi
16784
16785
16786   # Check if program_invocation_name and program_invocation_short_name
16787   # are defined elsewhere. It is improbable that only one of them will
16788   # be defined and other not, I prefer to stay on the safe side and to
16789   # test each one separately.
16790   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether program_invocation_name is defined" >&5
16791 $as_echo_n "checking whether program_invocation_name is defined... " >&6; }
16792   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16793 /* end confdefs.h.  */
16794 #include <argp.h>
16795 int
16796 main ()
16797 {
16798 program_invocation_name = "test";
16799   ;
16800   return 0;
16801 }
16802 _ACEOF
16803 if ac_fn_c_try_link "$LINENO"; then :
16804
16805 $as_echo "#define HAVE_PROGRAM_INVOCATION_NAME 1" >>confdefs.h
16806
16807                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16808 $as_echo "yes" >&6; }
16809 else
16810   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16811 $as_echo "no" >&6; }
16812 fi
16813 rm -f core conftest.err conftest.$ac_objext \
16814     conftest$ac_exeext conftest.$ac_ext
16815
16816   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether program_invocation_short_name is defined" >&5
16817 $as_echo_n "checking whether program_invocation_short_name is defined... " >&6; }
16818   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16819 /* end confdefs.h.  */
16820 #include <argp.h>
16821 int
16822 main ()
16823 {
16824 program_invocation_short_name = "test";
16825   ;
16826   return 0;
16827 }
16828 _ACEOF
16829 if ac_fn_c_try_link "$LINENO"; then :
16830
16831 $as_echo "#define HAVE_PROGRAM_INVOCATION_SHORT_NAME 1" >>confdefs.h
16832
16833                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16834 $as_echo "yes" >&6; }
16835 else
16836   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16837 $as_echo "no" >&6; }
16838 fi
16839 rm -f core conftest.err conftest.$ac_objext \
16840     conftest$ac_exeext conftest.$ac_ext
16841
16842
16843
16844
16845
16846
16847
16848
16849
16850
16851
16852
16853
16854
16855
16856
16857
16858
16859
16860   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=argp_error:2:c-format"
16861
16862
16863
16864   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=argp_failure:4:c-format"
16865
16866
16867
16868
16869
16870
16871
16872
16873
16874   gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext"
16875
16876
16877
16878
16879
16880
16881
16882
16883
16884
16885
16886
16887   if test $ac_cv_func_btowc = no; then
16888     HAVE_BTOWC=0
16889   else
16890
16891
16892
16893
16894         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(0) is correct" >&5
16895 $as_echo_n "checking whether btowc(0) is correct... " >&6; }
16896 if ${gl_cv_func_btowc_nul+:} false; then :
16897   $as_echo_n "(cached) " >&6
16898 else
16899
16900         if test "$cross_compiling" = yes; then :
16901
16902            case "$host_os" in
16903                       # Guess no on Cygwin.
16904              cygwin*) gl_cv_func_btowc_nul="guessing no" ;;
16905                       # Guess yes otherwise.
16906              *)       gl_cv_func_btowc_nul="guessing yes" ;;
16907            esac
16908
16909 else
16910   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16911 /* end confdefs.h.  */
16912
16913 #include <string.h>
16914 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
16915    <wchar.h>.
16916    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
16917    included before <wchar.h>.  */
16918 #include <stddef.h>
16919 #include <stdio.h>
16920 #include <time.h>
16921 #include <wchar.h>
16922 int main ()
16923 {
16924   if (btowc ('\0') != 0)
16925     return 1;
16926   return 0;
16927 }
16928 _ACEOF
16929 if ac_fn_c_try_run "$LINENO"; then :
16930   gl_cv_func_btowc_nul=yes
16931 else
16932   gl_cv_func_btowc_nul=no
16933 fi
16934 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16935   conftest.$ac_objext conftest.beam conftest.$ac_ext
16936 fi
16937
16938
16939 fi
16940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_nul" >&5
16941 $as_echo "$gl_cv_func_btowc_nul" >&6; }
16942
16943         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(EOF) is correct" >&5
16944 $as_echo_n "checking whether btowc(EOF) is correct... " >&6; }
16945 if ${gl_cv_func_btowc_eof+:} false; then :
16946   $as_echo_n "(cached) " >&6
16947 else
16948
16949                         case "$host_os" in
16950                  # Guess no on IRIX.
16951           irix*) gl_cv_func_btowc_eof="guessing no" ;;
16952                  # Guess yes otherwise.
16953           *)     gl_cv_func_btowc_eof="guessing yes" ;;
16954         esac
16955         if test $LOCALE_FR != none; then
16956           if test "$cross_compiling" = yes; then :
16957   :
16958 else
16959   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16960 /* end confdefs.h.  */
16961
16962 #include <locale.h>
16963 #include <string.h>
16964 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
16965    <wchar.h>.
16966    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
16967    included before <wchar.h>.  */
16968 #include <stddef.h>
16969 #include <stdio.h>
16970 #include <time.h>
16971 #include <wchar.h>
16972 int main ()
16973 {
16974   if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
16975     {
16976       if (btowc (EOF) != WEOF)
16977         return 1;
16978     }
16979   return 0;
16980 }
16981 _ACEOF
16982 if ac_fn_c_try_run "$LINENO"; then :
16983   gl_cv_func_btowc_eof=yes
16984 else
16985   gl_cv_func_btowc_eof=no
16986 fi
16987 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16988   conftest.$ac_objext conftest.beam conftest.$ac_ext
16989 fi
16990
16991         fi
16992
16993 fi
16994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_eof" >&5
16995 $as_echo "$gl_cv_func_btowc_eof" >&6; }
16996
16997     case "$gl_cv_func_btowc_nul" in
16998       *yes) ;;
16999       *) REPLACE_BTOWC=1 ;;
17000     esac
17001     case "$gl_cv_func_btowc_eof" in
17002       *yes) ;;
17003       *) REPLACE_BTOWC=1 ;;
17004     esac
17005   fi
17006
17007   if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then
17008
17009
17010
17011
17012
17013
17014
17015
17016   gl_LIBOBJS="$gl_LIBOBJS btowc.$ac_objext"
17017
17018
17019   :
17020
17021   fi
17022
17023
17024
17025
17026
17027           GNULIB_BTOWC=1
17028
17029
17030
17031
17032
17033 $as_echo "#define GNULIB_TEST_BTOWC 1" >>confdefs.h
17034
17035
17036
17037
17038
17039
17040   if test $ac_cv_func_canonicalize_file_name = no; then
17041     HAVE_CANONICALIZE_FILE_NAME=0
17042     if test $ac_cv_func_realpath = no; then
17043       HAVE_REALPATH=0
17044     else
17045       case "$gl_cv_func_realpath_works" in
17046         *yes) ;;
17047         *)    REPLACE_REALPATH=1 ;;
17048       esac
17049     fi
17050   else
17051     case "$gl_cv_func_realpath_works" in
17052       *yes)
17053         ;;
17054       *)
17055         REPLACE_CANONICALIZE_FILE_NAME=1
17056         REPLACE_REALPATH=1
17057         ;;
17058     esac
17059   fi
17060
17061   if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then
17062
17063
17064
17065
17066
17067
17068
17069
17070   gl_LIBOBJS="$gl_LIBOBJS canonicalize-lgpl.$ac_objext"
17071
17072   fi
17073
17074
17075 cat >>confdefs.h <<_ACEOF
17076 #define GNULIB_CANONICALIZE_LGPL 1
17077 _ACEOF
17078
17079
17080
17081
17082
17083
17084
17085           GNULIB_CANONICALIZE_FILE_NAME=1
17086
17087
17088
17089
17090
17091 $as_echo "#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1" >>confdefs.h
17092
17093
17094
17095
17096
17097
17098
17099
17100           GNULIB_REALPATH=1
17101
17102
17103
17104
17105
17106 $as_echo "#define GNULIB_TEST_REALPATH 1" >>confdefs.h
17107
17108
17109
17110
17111
17112
17113
17114
17115
17116           GNULIB_CHDIR=1
17117
17118
17119
17120
17121
17122 $as_echo "#define GNULIB_TEST_CHDIR 1" >>confdefs.h
17123
17124
17125
17126
17127
17128   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether this system has an arbitrary file name length limit" >&5
17129 $as_echo_n "checking whether this system has an arbitrary file name length limit... " >&6; }
17130 if ${gl_cv_have_arbitrary_file_name_length_limit+:} false; then :
17131   $as_echo_n "(cached) " >&6
17132 else
17133   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17134 /* end confdefs.h.  */
17135
17136 /* Arrange to define PATH_MAX, like "pathmax.h" does. */
17137 #if HAVE_UNISTD_H
17138 # include <unistd.h>
17139 #endif
17140 #include <limits.h>
17141 #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
17142 # include <sys/param.h>
17143 #endif
17144 #if !defined PATH_MAX && defined MAXPATHLEN
17145 # define PATH_MAX MAXPATHLEN
17146 #endif
17147 #ifdef __hpux
17148 # undef PATH_MAX
17149 # define PATH_MAX 1024
17150 #endif
17151 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
17152 # undef PATH_MAX
17153 # define PATH_MAX 260
17154 #endif
17155
17156 #ifdef PATH_MAX
17157 have_arbitrary_file_name_length_limit
17158 #endif
17159 _ACEOF
17160 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17161   $EGREP "have_arbitrary_file_name_length_limit" >/dev/null 2>&1; then :
17162   gl_cv_have_arbitrary_file_name_length_limit=yes
17163 else
17164   gl_cv_have_arbitrary_file_name_length_limit=no
17165 fi
17166 rm -f conftest*
17167
17168 fi
17169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_arbitrary_file_name_length_limit" >&5
17170 $as_echo "$gl_cv_have_arbitrary_file_name_length_limit" >&6; }
17171
17172   if test $gl_cv_have_arbitrary_file_name_length_limit = yes; then
17173
17174
17175
17176
17177
17178
17179
17180
17181   gl_LIBOBJS="$gl_LIBOBJS chdir-long.$ac_objext"
17182
17183     :
17184   fi
17185
17186   if test $HAVE_CHOWN = 0 || test $REPLACE_CHOWN = 1; then
17187
17188
17189
17190
17191
17192
17193
17194
17195   gl_LIBOBJS="$gl_LIBOBJS chown.$ac_objext"
17196
17197   fi
17198   if test $REPLACE_CHOWN = 1 && test $ac_cv_func_fchown = no; then
17199
17200
17201
17202
17203
17204
17205
17206
17207   gl_LIBOBJS="$gl_LIBOBJS fchown-stub.$ac_objext"
17208
17209   fi
17210
17211
17212
17213
17214
17215           GNULIB_CHOWN=1
17216
17217
17218
17219
17220
17221 $as_echo "#define GNULIB_TEST_CHOWN 1" >>confdefs.h
17222
17223
17224
17225
17226
17227
17228   # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
17229   # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
17230
17231   # Save and restore LIBS so e.g., -lrt, isn't added to it.  Otherwise, *all*
17232   # programs in the package would end up linked with that potentially-shared
17233   # library, inducing unnecessary run-time overhead.
17234   LIB_CLOCK_GETTIME=
17235
17236   gl_saved_libs=$LIBS
17237     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
17238 $as_echo_n "checking for library containing clock_gettime... " >&6; }
17239 if ${ac_cv_search_clock_gettime+:} false; then :
17240   $as_echo_n "(cached) " >&6
17241 else
17242   ac_func_search_save_LIBS=$LIBS
17243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17244 /* end confdefs.h.  */
17245
17246 /* Override any GCC internal prototype to avoid an error.
17247    Use char because int might match the return type of a GCC
17248    builtin and then its argument prototype would still apply.  */
17249 #ifdef __cplusplus
17250 extern "C"
17251 #endif
17252 char clock_gettime ();
17253 int
17254 main ()
17255 {
17256 return clock_gettime ();
17257   ;
17258   return 0;
17259 }
17260 _ACEOF
17261 for ac_lib in '' rt posix4; do
17262   if test -z "$ac_lib"; then
17263     ac_res="none required"
17264   else
17265     ac_res=-l$ac_lib
17266     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17267   fi
17268   if ac_fn_c_try_link "$LINENO"; then :
17269   ac_cv_search_clock_gettime=$ac_res
17270 fi
17271 rm -f core conftest.err conftest.$ac_objext \
17272     conftest$ac_exeext
17273   if ${ac_cv_search_clock_gettime+:} false; then :
17274   break
17275 fi
17276 done
17277 if ${ac_cv_search_clock_gettime+:} false; then :
17278
17279 else
17280   ac_cv_search_clock_gettime=no
17281 fi
17282 rm conftest.$ac_ext
17283 LIBS=$ac_func_search_save_LIBS
17284 fi
17285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
17286 $as_echo "$ac_cv_search_clock_gettime" >&6; }
17287 ac_res=$ac_cv_search_clock_gettime
17288 if test "$ac_res" != no; then :
17289   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17290   test "$ac_cv_search_clock_gettime" = "none required" ||
17291                     LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime
17292 fi
17293
17294     for ac_func in clock_gettime clock_settime
17295 do :
17296   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17297 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17298 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17299   cat >>confdefs.h <<_ACEOF
17300 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17301 _ACEOF
17302
17303 fi
17304 done
17305
17306   LIBS=$gl_saved_libs
17307
17308
17309
17310 $as_echo "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h
17311
17312
17313
17314
17315
17316   if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
17317     REPLACE_CLOSE=1
17318   fi
17319
17320
17321
17322
17323
17324   if test $ac_cv_header_sys_socket_h != yes; then
17325                     for ac_header in winsock2.h
17326 do :
17327   ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
17328 if test "x$ac_cv_header_winsock2_h" = xyes; then :
17329   cat >>confdefs.h <<_ACEOF
17330 #define HAVE_WINSOCK2_H 1
17331 _ACEOF
17332
17333 fi
17334
17335 done
17336
17337   fi
17338   if test "$ac_cv_header_winsock2_h" = yes; then
17339     HAVE_WINSOCK2_H=1
17340     UNISTD_H_HAVE_WINSOCK2_H=1
17341     SYS_IOCTL_H_HAVE_WINSOCK2_H=1
17342   else
17343     HAVE_WINSOCK2_H=0
17344   fi
17345
17346
17347     if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
17348                         REPLACE_CLOSE=1
17349     fi
17350
17351
17352     if test $REPLACE_CLOSE = 0; then
17353
17354
17355
17356   if test $ac_cv_func_fchdir = no; then
17357     HAVE_FCHDIR=0
17358   fi
17359
17360       if test $HAVE_FCHDIR = 0; then
17361         REPLACE_CLOSE=1
17362       fi
17363     fi
17364
17365
17366   if test $REPLACE_CLOSE = 1; then
17367
17368
17369
17370
17371
17372
17373
17374
17375   gl_LIBOBJS="$gl_LIBOBJS close.$ac_objext"
17376
17377   fi
17378
17379
17380
17381
17382
17383           GNULIB_CLOSE=1
17384
17385
17386
17387
17388
17389 $as_echo "#define GNULIB_TEST_CLOSE 1" >>confdefs.h
17390
17391
17392
17393
17394   :
17395
17396
17397
17398 cat >>confdefs.h <<_ACEOF
17399 #define GNULIB_CLOSE_STREAM 1
17400 _ACEOF
17401
17402
17403
17404
17405
17406   for ac_func in closedir
17407 do :
17408   ac_fn_c_check_func "$LINENO" "closedir" "ac_cv_func_closedir"
17409 if test "x$ac_cv_func_closedir" = xyes; then :
17410   cat >>confdefs.h <<_ACEOF
17411 #define HAVE_CLOSEDIR 1
17412 _ACEOF
17413
17414 fi
17415 done
17416
17417   if test $ac_cv_func_closedir = no; then
17418     HAVE_CLOSEDIR=0
17419   fi
17420
17421
17422
17423
17424   if test $ac_cv_func_fchdir = no; then
17425     HAVE_FCHDIR=0
17426   fi
17427
17428     if test $HAVE_FCHDIR = 0; then
17429       if test $HAVE_CLOSEDIR = 1; then
17430         REPLACE_CLOSEDIR=1
17431       fi
17432     fi
17433
17434
17435   if test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1; then
17436
17437
17438
17439
17440
17441
17442
17443
17444   gl_LIBOBJS="$gl_LIBOBJS closedir.$ac_objext"
17445
17446   fi
17447
17448
17449
17450
17451
17452           GNULIB_CLOSEDIR=1
17453
17454
17455
17456
17457
17458 $as_echo "#define GNULIB_TEST_CLOSEDIR 1" >>confdefs.h
17459
17460
17461
17462
17463   :
17464
17465
17466           if test "x$datarootdir" = x; then
17467     datarootdir='${datadir}'
17468
17469   fi
17470     if test "x$docdir" = x; then
17471     docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
17472
17473   fi
17474     if test "x$htmldir" = x; then
17475     htmldir='${docdir}'
17476
17477   fi
17478   if test "x$dvidir" = x; then
17479     dvidir='${docdir}'
17480
17481   fi
17482   if test "x$pdfdir" = x; then
17483     pdfdir='${docdir}'
17484
17485   fi
17486   if test "x$psdir" = x; then
17487     psdir='${docdir}'
17488
17489   fi
17490   if test "x$lispdir" = x; then
17491     lispdir='${datarootdir}/emacs/site-lisp'
17492
17493   fi
17494   if test "x$localedir" = x; then
17495     localedir='${datarootdir}/locale'
17496
17497   fi
17498
17499       pkglibexecdir='${libexecdir}/${PACKAGE}'
17500
17501
17502       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_ino member in directory struct" >&5
17503 $as_echo_n "checking for d_ino member in directory struct... " >&6; }
17504 if ${gl_cv_struct_dirent_d_ino+:} false; then :
17505   $as_echo_n "(cached) " >&6
17506 else
17507   if test "$cross_compiling" = yes; then :
17508   case "$host_os" in
17509                            # Guess yes on glibc systems with Linux kernel.
17510               linux*-gnu*) gl_cv_struct_dirent_d_ino="guessing yes" ;;
17511                            # If we don't know, assume the worst.
17512               *)           gl_cv_struct_dirent_d_ino="guessing no" ;;
17513             esac
17514
17515 else
17516   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17517 /* end confdefs.h.  */
17518 #include <sys/types.h>
17519              #include <sys/stat.h>
17520              #include <dirent.h>
17521
17522 int
17523 main ()
17524 {
17525 DIR *dp = opendir (".");
17526              struct dirent *e;
17527              struct stat st;
17528              if (! dp)
17529                return 1;
17530              e = readdir (dp);
17531              if (! e)
17532                return 2;
17533              if (stat (e->d_name, &st) != 0)
17534                return 3;
17535              if (e->d_ino != st.st_ino)
17536                return 4;
17537              return 0;
17538
17539   ;
17540   return 0;
17541 }
17542 _ACEOF
17543 if ac_fn_c_try_run "$LINENO"; then :
17544   gl_cv_struct_dirent_d_ino=yes
17545 else
17546   gl_cv_struct_dirent_d_ino=no
17547 fi
17548 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17549   conftest.$ac_objext conftest.beam conftest.$ac_ext
17550 fi
17551
17552 fi
17553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_ino" >&5
17554 $as_echo "$gl_cv_struct_dirent_d_ino" >&6; }
17555    case "$gl_cv_struct_dirent_d_ino" in
17556      *yes)
17557
17558 $as_echo "#define D_INO_IN_DIRENT 1" >>confdefs.h
17559
17560        ;;
17561    esac
17562
17563
17564
17565
17566
17567
17568
17569
17570
17571
17572
17573
17574
17575
17576      if test $gl_cv_have_include_next = yes; then
17577        gl_cv_next_dirent_h='<'dirent.h'>'
17578      else
17579        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
17580 $as_echo_n "checking absolute name of <dirent.h>... " >&6; }
17581 if ${gl_cv_next_dirent_h+:} false; then :
17582   $as_echo_n "(cached) " >&6
17583 else
17584
17585              if test $ac_cv_header_dirent_h = yes; then
17586
17587
17588                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17589 /* end confdefs.h.  */
17590 #include <dirent.h>
17591
17592 _ACEOF
17593                                                                                                                         case "$host_os" in
17594                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
17595                  *)    gl_absname_cpp="$ac_cpp" ;;
17596                esac
17597
17598                case "$host_os" in
17599                  mingw*)
17600                                                                                                                                      gl_dirsep_regex='[/\\]'
17601                    ;;
17602                  *)
17603                    gl_dirsep_regex='\/'
17604                    ;;
17605                esac
17606                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17607
17608                gl_header_literal_regex=`echo 'dirent.h' \
17609                                         | sed -e "$gl_make_literal_regex_sed"`
17610                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17611                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17612                    s|^/[^/]|//&|
17613                    p
17614                    q
17615                  }'
17616                                                             gl_cv_next_dirent_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17617                       sed -n "$gl_absolute_header_sed"`'"'
17618           else
17619                gl_cv_next_dirent_h='<'dirent.h'>'
17620              fi
17621
17622
17623 fi
17624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
17625 $as_echo "$gl_cv_next_dirent_h" >&6; }
17626      fi
17627      NEXT_DIRENT_H=$gl_cv_next_dirent_h
17628
17629      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17630        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17631        gl_next_as_first_directive='<'dirent.h'>'
17632      else
17633        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17634        gl_next_as_first_directive=$gl_cv_next_dirent_h
17635      fi
17636      NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive
17637
17638
17639
17640
17641   if test $ac_cv_header_dirent_h = yes; then
17642     HAVE_DIRENT_H=1
17643   else
17644     HAVE_DIRENT_H=0
17645   fi
17646
17647
17648
17649     for gl_func in alphasort closedir dirfd fdopendir opendir readdir rewinddir scandir; do
17650     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
17651     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
17652 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
17653 if eval \${$as_gl_Symbol+:} false; then :
17654   $as_echo_n "(cached) " >&6
17655 else
17656   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17657 /* end confdefs.h.  */
17658 #include <dirent.h>
17659
17660 int
17661 main ()
17662 {
17663 #undef $gl_func
17664   (void) $gl_func;
17665   ;
17666   return 0;
17667 }
17668 _ACEOF
17669 if ac_fn_c_try_compile "$LINENO"; then :
17670   eval "$as_gl_Symbol=yes"
17671 else
17672   eval "$as_gl_Symbol=no"
17673 fi
17674 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17675 fi
17676 eval ac_res=\$$as_gl_Symbol
17677                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17678 $as_echo "$ac_res" >&6; }
17679     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
17680   cat >>confdefs.h <<_ACEOF
17681 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
17682 _ACEOF
17683
17684                      eval ac_cv_have_decl_$gl_func=yes
17685 fi
17686       done
17687
17688
17689
17690
17691
17692
17693
17694 cat >>confdefs.h <<_ACEOF
17695 #define GNULIB_DIRENT_SAFER 1
17696 _ACEOF
17697
17698
17699
17700
17701
17702
17703
17704   for ac_func in dirfd
17705 do :
17706   ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd"
17707 if test "x$ac_cv_func_dirfd" = xyes; then :
17708   cat >>confdefs.h <<_ACEOF
17709 #define HAVE_DIRFD 1
17710 _ACEOF
17711
17712 fi
17713 done
17714
17715   ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
17716       #include <dirent.h>
17717 "
17718 if test "x$ac_cv_have_decl_dirfd" = xyes; then :
17719   ac_have_decl=1
17720 else
17721   ac_have_decl=0
17722 fi
17723
17724 cat >>confdefs.h <<_ACEOF
17725 #define HAVE_DECL_DIRFD $ac_have_decl
17726 _ACEOF
17727
17728   if test $ac_cv_have_decl_dirfd = no; then
17729     HAVE_DECL_DIRFD=0
17730   fi
17731
17732   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dirfd is a macro" >&5
17733 $as_echo_n "checking whether dirfd is a macro... " >&6; }
17734 if ${gl_cv_func_dirfd_macro+:} false; then :
17735   $as_echo_n "(cached) " >&6
17736 else
17737   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17738 /* end confdefs.h.  */
17739
17740 #include <sys/types.h>
17741 #include <dirent.h>
17742 #ifdef dirfd
17743  dirent_header_defines_dirfd
17744 #endif
17745 _ACEOF
17746 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17747   $EGREP "dirent_header_defines_dirfd" >/dev/null 2>&1; then :
17748   gl_cv_func_dirfd_macro=yes
17749 else
17750   gl_cv_func_dirfd_macro=no
17751 fi
17752 rm -f conftest*
17753
17754 fi
17755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dirfd_macro" >&5
17756 $as_echo "$gl_cv_func_dirfd_macro" >&6; }
17757
17758   # Use the replacement only if we have no function or macro with that name.
17759   if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no; then
17760     if test $ac_cv_have_decl_dirfd = yes; then
17761       # If the system declares dirfd already, let's declare rpl_dirfd instead.
17762       REPLACE_DIRFD=1
17763     fi
17764   fi
17765
17766   if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no; then
17767
17768
17769
17770
17771
17772
17773
17774
17775   gl_LIBOBJS="$gl_LIBOBJS dirfd.$ac_objext"
17776
17777
17778   { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get the file descriptor associated with an open DIR*" >&5
17779 $as_echo_n "checking how to get the file descriptor associated with an open DIR*... " >&6; }
17780 if ${gl_cv_sys_dir_fd_member_name+:} false; then :
17781   $as_echo_n "(cached) " >&6
17782 else
17783
17784       dirfd_save_CFLAGS=$CFLAGS
17785       for ac_expr in d_fd dd_fd; do
17786
17787         CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr"
17788         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17789 /* end confdefs.h.  */
17790
17791            #include <sys/types.h>
17792            #include <dirent.h>
17793 int
17794 main ()
17795 {
17796 DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;
17797   ;
17798   return 0;
17799 }
17800 _ACEOF
17801 if ac_fn_c_try_compile "$LINENO"; then :
17802   dir_fd_found=yes
17803
17804 fi
17805 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17806         CFLAGS=$dirfd_save_CFLAGS
17807         test "$dir_fd_found" = yes && break
17808       done
17809       test "$dir_fd_found" = yes || ac_expr=no_such_member
17810
17811       gl_cv_sys_dir_fd_member_name=$ac_expr
17812
17813
17814 fi
17815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_dir_fd_member_name" >&5
17816 $as_echo "$gl_cv_sys_dir_fd_member_name" >&6; }
17817   if test $gl_cv_sys_dir_fd_member_name != no_such_member; then
17818
17819 cat >>confdefs.h <<_ACEOF
17820 #define DIR_FD_MEMBER_NAME $gl_cv_sys_dir_fd_member_name
17821 _ACEOF
17822
17823   fi
17824
17825
17826   fi
17827
17828
17829
17830
17831
17832           GNULIB_DIRFD=1
17833
17834
17835
17836
17837
17838 $as_echo "#define GNULIB_TEST_DIRFD 1" >>confdefs.h
17839
17840
17841
17842
17843
17844
17845
17846
17847 cat >>confdefs.h <<_ACEOF
17848 #define GNULIB_DIRNAME 1
17849 _ACEOF
17850
17851
17852
17853
17854
17855
17856
17857
17858   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
17859 $as_echo_n "checking whether // is distinct from /... " >&6; }
17860 if ${gl_cv_double_slash_root+:} false; then :
17861   $as_echo_n "(cached) " >&6
17862 else
17863    if test x"$cross_compiling" = xyes ; then
17864         # When cross-compiling, there is no way to tell whether // is special
17865         # short of a list of hosts.  However, the only known hosts to date
17866         # that have a distinct // are Apollo DomainOS (too old to port to),
17867         # Cygwin, and z/OS.  If anyone knows of another system for which // has
17868         # special semantics and is distinct from /, please report it to
17869         # <bug-gnulib@gnu.org>.
17870         case $host in
17871           *-cygwin | i370-ibm-openedition)
17872             gl_cv_double_slash_root=yes ;;
17873           *)
17874             # Be optimistic and assume that / and // are the same when we
17875             # don't know.
17876             gl_cv_double_slash_root='unknown, assuming no' ;;
17877         esac
17878       else
17879         set x `ls -di / // 2>/dev/null`
17880         if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
17881           gl_cv_double_slash_root=no
17882         else
17883           gl_cv_double_slash_root=yes
17884         fi
17885       fi
17886 fi
17887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
17888 $as_echo "$gl_cv_double_slash_root" >&6; }
17889   if test "$gl_cv_double_slash_root" = yes; then
17890
17891 $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
17892
17893   fi
17894
17895
17896
17897
17898   if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
17899     REPLACE_DUP=1
17900   fi
17901
17902
17903
17904
17905   if test $ac_cv_func_fchdir = no; then
17906     HAVE_FCHDIR=0
17907   fi
17908
17909     if test $HAVE_FCHDIR = 0; then
17910       REPLACE_DUP=1
17911     fi
17912
17913
17914   if test $REPLACE_DUP = 1; then
17915
17916
17917
17918
17919
17920
17921
17922
17923   gl_LIBOBJS="$gl_LIBOBJS dup.$ac_objext"
17924
17925     :
17926   fi
17927
17928
17929
17930
17931
17932           GNULIB_DUP=1
17933
17934
17935
17936
17937
17938 $as_echo "#define GNULIB_TEST_DUP 1" >>confdefs.h
17939
17940
17941
17942
17943
17944
17945
17946
17947 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
17948
17949
17950   if test $HAVE_DUP2 = 1; then
17951     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
17952 $as_echo_n "checking whether dup2 works... " >&6; }
17953 if ${gl_cv_func_dup2_works+:} false; then :
17954   $as_echo_n "(cached) " >&6
17955 else
17956   if test "$cross_compiling" = yes; then :
17957   case "$host_os" in
17958            mingw*) # on this platform, dup2 always returns 0 for success
17959              gl_cv_func_dup2_works="guessing no" ;;
17960            cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
17961              gl_cv_func_dup2_works="guessing no" ;;
17962            linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a
17963                    # closed fd may yield -EBADF instead of -1 / errno=EBADF.
17964              gl_cv_func_dup2_works="guessing no" ;;
17965            freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF.
17966              gl_cv_func_dup2_works="guessing no" ;;
17967            haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
17968              gl_cv_func_dup2_works="guessing no" ;;
17969            *) gl_cv_func_dup2_works="guessing yes" ;;
17970          esac
17971 else
17972   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17973 /* end confdefs.h.  */
17974
17975          #include <unistd.h>
17976 #include <fcntl.h>
17977 #include <errno.h>
17978 int
17979 main ()
17980 {
17981 int result = 0;
17982 #ifdef FD_CLOEXEC
17983             if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
17984               result |= 1;
17985 #endif
17986             if (dup2 (1, 1) == 0)
17987               result |= 2;
17988 #ifdef FD_CLOEXEC
17989             if (fcntl (1, F_GETFD) != FD_CLOEXEC)
17990               result |= 4;
17991 #endif
17992             close (0);
17993             if (dup2 (0, 0) != -1)
17994               result |= 8;
17995             /* Many gnulib modules require POSIX conformance of EBADF.  */
17996             if (dup2 (2, 1000000) == -1 && errno != EBADF)
17997               result |= 16;
17998             /* Flush out a cygwin core dump.  */
17999             if (dup2 (2, -1) != -1 || errno != EBADF)
18000               result |= 32;
18001             return result;
18002
18003   ;
18004   return 0;
18005 }
18006
18007 _ACEOF
18008 if ac_fn_c_try_run "$LINENO"; then :
18009   gl_cv_func_dup2_works=yes
18010 else
18011   gl_cv_func_dup2_works=no
18012 fi
18013 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18014   conftest.$ac_objext conftest.beam conftest.$ac_ext
18015 fi
18016
18017
18018 fi
18019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
18020 $as_echo "$gl_cv_func_dup2_works" >&6; }
18021     case "$gl_cv_func_dup2_works" in
18022       *yes) ;;
18023       *)
18024         REPLACE_DUP2=1
18025         ;;
18026     esac
18027   fi
18028
18029
18030
18031
18032   if test $ac_cv_func_fchdir = no; then
18033     HAVE_FCHDIR=0
18034   fi
18035
18036     if test $HAVE_FCHDIR = 0; then
18037       if test $HAVE_DUP2 = 1; then
18038         REPLACE_DUP2=1
18039       fi
18040     fi
18041
18042
18043   if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
18044
18045
18046
18047
18048
18049
18050
18051
18052   gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
18053
18054
18055   fi
18056
18057
18058
18059
18060
18061           GNULIB_DUP2=1
18062
18063
18064
18065
18066
18067 $as_echo "#define GNULIB_TEST_DUP2 1" >>confdefs.h
18068
18069
18070
18071
18072
18073
18074
18075
18076
18077           GNULIB_ENVIRON=1
18078
18079
18080
18081
18082
18083 $as_echo "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h
18084
18085
18086
18087
18088
18089       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
18090 $as_echo_n "checking for error_at_line... " >&6; }
18091 if ${ac_cv_lib_error_at_line+:} false; then :
18092   $as_echo_n "(cached) " >&6
18093 else
18094   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18095 /* end confdefs.h.  */
18096 #include <error.h>
18097 int
18098 main ()
18099 {
18100 error_at_line (0, 0, "", 0, "an error occurred");
18101   ;
18102   return 0;
18103 }
18104 _ACEOF
18105 if ac_fn_c_try_link "$LINENO"; then :
18106   ac_cv_lib_error_at_line=yes
18107 else
18108   ac_cv_lib_error_at_line=no
18109 fi
18110 rm -f core conftest.err conftest.$ac_objext \
18111     conftest$ac_exeext conftest.$ac_ext
18112 fi
18113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
18114 $as_echo "$ac_cv_lib_error_at_line" >&6; }
18115
18116   if test $ac_cv_lib_error_at_line = no; then
18117
18118
18119
18120
18121
18122
18123
18124
18125   gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext"
18126
18127
18128
18129   :
18130
18131   fi
18132
18133
18134   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error:3:c-format"
18135
18136
18137
18138   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error_at_line:5:c-format"
18139
18140
18141
18142
18143
18144
18145
18146   if test $ac_cv_have_decl_fchdir = no; then
18147     HAVE_DECL_FCHDIR=0
18148   fi
18149
18150
18151   if test $HAVE_FCHDIR = 0; then
18152
18153
18154
18155
18156
18157
18158
18159
18160   gl_LIBOBJS="$gl_LIBOBJS fchdir.$ac_objext"
18161
18162     :
18163
18164 $as_echo "#define REPLACE_FCHDIR 1" >>confdefs.h
18165
18166                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open can visit directories" >&5
18167 $as_echo_n "checking whether open can visit directories... " >&6; }
18168 if ${gl_cv_func_open_directory_works+:} false; then :
18169   $as_echo_n "(cached) " >&6
18170 else
18171   if test "$cross_compiling" = yes; then :
18172   case "$host_os" in
18173                    # Guess yes on glibc systems.
18174            *-gnu*) gl_cv_func_open_directory_works="guessing yes" ;;
18175                    # If we don't know, assume the worst.
18176            *)      gl_cv_func_open_directory_works="guessing no" ;;
18177          esac
18178
18179 else
18180   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18181 /* end confdefs.h.  */
18182 #include <fcntl.h>
18183
18184 int
18185 main ()
18186 {
18187 return open(".", O_RDONLY) < 0;
18188   ;
18189   return 0;
18190 }
18191 _ACEOF
18192 if ac_fn_c_try_run "$LINENO"; then :
18193   gl_cv_func_open_directory_works=yes
18194 else
18195   gl_cv_func_open_directory_works=no
18196 fi
18197 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18198   conftest.$ac_objext conftest.beam conftest.$ac_ext
18199 fi
18200
18201 fi
18202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_directory_works" >&5
18203 $as_echo "$gl_cv_func_open_directory_works" >&6; }
18204     case "$gl_cv_func_open_directory_works" in
18205       *yes) ;;
18206       *)
18207
18208 $as_echo "#define REPLACE_OPEN_DIRECTORY 1" >>confdefs.h
18209
18210         ;;
18211     esac
18212   fi
18213
18214
18215
18216
18217
18218
18219           GNULIB_FCHDIR=1
18220
18221
18222
18223
18224
18225 $as_echo "#define GNULIB_TEST_FCHDIR 1" >>confdefs.h
18226
18227
18228
18229
18230
18231
18232
18233   if test $ac_cv_func_fchmodat != yes; then
18234     HAVE_FCHMODAT=0
18235   fi
18236
18237   if test $HAVE_FCHMODAT = 0; then
18238
18239
18240
18241
18242
18243
18244
18245
18246   gl_LIBOBJS="$gl_LIBOBJS fchmodat.$ac_objext"
18247
18248   fi
18249
18250
18251 cat >>confdefs.h <<_ACEOF
18252 #define GNULIB_FCHMODAT 1
18253 _ACEOF
18254
18255
18256
18257
18258
18259
18260           GNULIB_FCHMODAT=1
18261
18262
18263
18264
18265
18266 $as_echo "#define GNULIB_TEST_FCHMODAT 1" >>confdefs.h
18267
18268
18269
18270
18271
18272
18273
18274   ac_fn_c_check_func "$LINENO" "fchownat" "ac_cv_func_fchownat"
18275 if test "x$ac_cv_func_fchownat" = xyes; then :
18276
18277
18278
18279   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fchownat works with AT_SYMLINK_NOFOLLOW" >&5
18280 $as_echo_n "checking whether fchownat works with AT_SYMLINK_NOFOLLOW... " >&6; }
18281 if ${gl_cv_func_fchownat_nofollow_works+:} false; then :
18282   $as_echo_n "(cached) " >&6
18283 else
18284
18285      gl_dangle=conftest.dangle
18286      # Remove any remnants of a previous test.
18287      rm -f $gl_dangle
18288      # Arrange for deletion of the temporary file this test creates.
18289      ac_clean_files="$ac_clean_files $gl_dangle"
18290      ln -s conftest.no-such $gl_dangle
18291      if test "$cross_compiling" = yes; then :
18292   gl_cv_func_fchownat_nofollow_works=no
18293 else
18294   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18295 /* end confdefs.h.  */
18296
18297 #include <fcntl.h>
18298 #include <unistd.h>
18299 #include <stdlib.h>
18300 #include <errno.h>
18301 #include <sys/types.h>
18302 int
18303 main ()
18304 {
18305   return (fchownat (AT_FDCWD, "$gl_dangle", -1, getgid (),
18306                     AT_SYMLINK_NOFOLLOW) != 0
18307           && errno == ENOENT);
18308 }
18309
18310 _ACEOF
18311 if ac_fn_c_try_run "$LINENO"; then :
18312   gl_cv_func_fchownat_nofollow_works=yes
18313 else
18314   gl_cv_func_fchownat_nofollow_works=no
18315 fi
18316 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18317   conftest.$ac_objext conftest.beam conftest.$ac_ext
18318 fi
18319
18320
18321 fi
18322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fchownat_nofollow_works" >&5
18323 $as_echo "$gl_cv_func_fchownat_nofollow_works" >&6; }
18324   if test $gl_cv_func_fchownat_nofollow_works = no; then :
18325   REPLACE_FCHOWNAT=1
18326
18327 $as_echo "#define FCHOWNAT_NOFOLLOW_BUG 1" >>confdefs.h
18328
18329
18330 fi
18331
18332
18333
18334
18335   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fchownat works with an empty file name" >&5
18336 $as_echo_n "checking whether fchownat works with an empty file name... " >&6; }
18337 if ${gl_cv_func_fchownat_empty_filename_works+:} false; then :
18338   $as_echo_n "(cached) " >&6
18339 else
18340   if test "$cross_compiling" = yes; then :
18341   gl_cv_func_fchownat_empty_filename_works="guessing no"
18342 else
18343   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18344 /* end confdefs.h.  */
18345 #include <unistd.h>
18346             #include <fcntl.h>
18347
18348 int
18349 main ()
18350 {
18351 int fd;
18352             int ret;
18353             if (mkdir ("conftestdir", 0700) < 0)
18354               return 2;
18355             fd = open ("conftestdir", O_RDONLY);
18356             if (fd < 0)
18357               return 3;
18358             ret = fchownat (fd, "", -1, -1, 0);
18359             close (fd);
18360             rmdir ("conftestdir");
18361             return ret == 0;
18362
18363   ;
18364   return 0;
18365 }
18366 _ACEOF
18367 if ac_fn_c_try_run "$LINENO"; then :
18368   gl_cv_func_fchownat_empty_filename_works=yes
18369 else
18370   gl_cv_func_fchownat_empty_filename_works=no
18371 fi
18372 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18373   conftest.$ac_objext conftest.beam conftest.$ac_ext
18374 fi
18375
18376
18377 fi
18378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fchownat_empty_filename_works" >&5
18379 $as_echo "$gl_cv_func_fchownat_empty_filename_works" >&6; }
18380   if test "$gl_cv_func_fchownat_empty_filename_works" != yes; then :
18381   REPLACE_FCHOWNAT=1
18382
18383 $as_echo "#define FCHOWNAT_EMPTY_FILENAME_BUG 1" >>confdefs.h
18384
18385
18386 fi
18387
18388      if test $REPLACE_CHOWN = 1; then
18389        REPLACE_FCHOWNAT=1
18390      fi
18391 else
18392   HAVE_FCHOWNAT=0
18393 fi
18394
18395
18396   if test $HAVE_FCHOWNAT = 0 || test $REPLACE_FCHOWNAT = 1; then
18397
18398
18399
18400
18401
18402
18403
18404
18405   gl_LIBOBJS="$gl_LIBOBJS fchownat.$ac_objext"
18406
18407   fi
18408
18409
18410 cat >>confdefs.h <<_ACEOF
18411 #define GNULIB_FCHOWNAT 1
18412 _ACEOF
18413
18414
18415
18416
18417
18418
18419           GNULIB_FCHOWNAT=1
18420
18421
18422
18423
18424
18425 $as_echo "#define GNULIB_TEST_FCHOWNAT 1" >>confdefs.h
18426
18427
18428
18429
18430
18431
18432
18433
18434   if test $ac_cv_func_fcntl = no; then
18435
18436
18437
18438   if test $ac_cv_func_fcntl = no; then
18439     HAVE_FCNTL=0
18440   else
18441     REPLACE_FCNTL=1
18442   fi
18443
18444   else
18445             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
18446 $as_echo_n "checking whether fcntl handles F_DUPFD correctly... " >&6; }
18447 if ${gl_cv_func_fcntl_f_dupfd_works+:} false; then :
18448   $as_echo_n "(cached) " >&6
18449 else
18450   if test "$cross_compiling" = yes; then :
18451   # Guess that it works on glibc systems
18452           case $host_os in #((
18453             *-gnu*) gl_cv_func_fcntl_f_dupfd_works="guessing yes";;
18454             *)      gl_cv_func_fcntl_f_dupfd_works="guessing no";;
18455           esac
18456 else
18457   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18458 /* end confdefs.h.  */
18459
18460 #include <fcntl.h>
18461 #include <errno.h>
18462
18463 int
18464 main ()
18465 {
18466 int result = 0;
18467       if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
18468       if (errno != EINVAL) result |= 2;
18469       return result;
18470
18471   ;
18472   return 0;
18473 }
18474 _ACEOF
18475 if ac_fn_c_try_run "$LINENO"; then :
18476   gl_cv_func_fcntl_f_dupfd_works=yes
18477 else
18478   gl_cv_func_fcntl_f_dupfd_works=no
18479 fi
18480 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18481   conftest.$ac_objext conftest.beam conftest.$ac_ext
18482 fi
18483
18484 fi
18485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
18486 $as_echo "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
18487     case $gl_cv_func_fcntl_f_dupfd_works in
18488       *yes) ;;
18489       *)
18490
18491
18492   if test $ac_cv_func_fcntl = no; then
18493     HAVE_FCNTL=0
18494   else
18495     REPLACE_FCNTL=1
18496   fi
18497
18498
18499 $as_echo "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
18500  ;;
18501     esac
18502
18503         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
18504 $as_echo_n "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
18505 if ${gl_cv_func_fcntl_f_dupfd_cloexec+:} false; then :
18506   $as_echo_n "(cached) " >&6
18507 else
18508   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18509 /* end confdefs.h.  */
18510
18511 #include <fcntl.h>
18512 #ifndef F_DUPFD_CLOEXEC
18513 choke me
18514 #endif
18515
18516 int
18517 main ()
18518 {
18519
18520   ;
18521   return 0;
18522 }
18523 _ACEOF
18524 if ac_fn_c_try_compile "$LINENO"; then :
18525   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18526 /* end confdefs.h.  */
18527
18528 #ifdef __linux__
18529 /* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
18530    it to support the semantics on older kernels that failed with EINVAL.  */
18531 choke me
18532 #endif
18533
18534 int
18535 main ()
18536 {
18537
18538   ;
18539   return 0;
18540 }
18541 _ACEOF
18542 if ac_fn_c_try_compile "$LINENO"; then :
18543   gl_cv_func_fcntl_f_dupfd_cloexec=yes
18544 else
18545   gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
18546 fi
18547 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18548 else
18549   gl_cv_func_fcntl_f_dupfd_cloexec=no
18550 fi
18551 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18552 fi
18553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
18554 $as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
18555     if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then
18556
18557
18558
18559   if test $ac_cv_func_fcntl = no; then
18560     HAVE_FCNTL=0
18561   else
18562     REPLACE_FCNTL=1
18563   fi
18564
18565           fi
18566   fi
18567
18568
18569
18570
18571   if test $ac_cv_func_fchdir = no; then
18572     HAVE_FCHDIR=0
18573   fi
18574
18575     if test $HAVE_FCHDIR = 0; then
18576
18577
18578
18579   if test $ac_cv_func_fcntl = no; then
18580     HAVE_FCNTL=0
18581   else
18582     REPLACE_FCNTL=1
18583   fi
18584
18585     fi
18586
18587
18588   if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
18589
18590
18591
18592
18593
18594
18595
18596
18597   gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
18598
18599   fi
18600
18601
18602
18603
18604
18605           GNULIB_FCNTL=1
18606
18607
18608
18609
18610
18611 $as_echo "#define GNULIB_TEST_FCNTL 1" >>confdefs.h
18612
18613
18614
18615
18616
18617
18618
18619
18620
18621
18622
18623
18624
18625
18626      if test $gl_cv_have_include_next = yes; then
18627        gl_cv_next_fcntl_h='<'fcntl.h'>'
18628      else
18629        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
18630 $as_echo_n "checking absolute name of <fcntl.h>... " >&6; }
18631 if ${gl_cv_next_fcntl_h+:} false; then :
18632   $as_echo_n "(cached) " >&6
18633 else
18634
18635                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18636 /* end confdefs.h.  */
18637 #include <fcntl.h>
18638
18639 _ACEOF
18640                                                                                                                         case "$host_os" in
18641                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
18642                  *)    gl_absname_cpp="$ac_cpp" ;;
18643                esac
18644
18645                case "$host_os" in
18646                  mingw*)
18647                                                                                                                                      gl_dirsep_regex='[/\\]'
18648                    ;;
18649                  *)
18650                    gl_dirsep_regex='\/'
18651                    ;;
18652                esac
18653                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18654
18655                gl_header_literal_regex=`echo 'fcntl.h' \
18656                                         | sed -e "$gl_make_literal_regex_sed"`
18657                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18658                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18659                    s|^/[^/]|//&|
18660                    p
18661                    q
18662                  }'
18663                                                             gl_cv_next_fcntl_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18664                       sed -n "$gl_absolute_header_sed"`'"'
18665
18666
18667 fi
18668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
18669 $as_echo "$gl_cv_next_fcntl_h" >&6; }
18670      fi
18671      NEXT_FCNTL_H=$gl_cv_next_fcntl_h
18672
18673      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18674        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18675        gl_next_as_first_directive='<'fcntl.h'>'
18676      else
18677        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18678        gl_next_as_first_directive=$gl_cv_next_fcntl_h
18679      fi
18680      NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
18681
18682
18683
18684
18685
18686
18687
18688
18689
18690
18691     for gl_func in fcntl openat; do
18692     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
18693     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
18694 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
18695 if eval \${$as_gl_Symbol+:} false; then :
18696   $as_echo_n "(cached) " >&6
18697 else
18698   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18699 /* end confdefs.h.  */
18700 #include <fcntl.h>
18701
18702 int
18703 main ()
18704 {
18705 #undef $gl_func
18706   (void) $gl_func;
18707   ;
18708   return 0;
18709 }
18710 _ACEOF
18711 if ac_fn_c_try_compile "$LINENO"; then :
18712   eval "$as_gl_Symbol=yes"
18713 else
18714   eval "$as_gl_Symbol=no"
18715 fi
18716 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18717 fi
18718 eval ac_res=\$$as_gl_Symbol
18719                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18720 $as_echo "$ac_res" >&6; }
18721     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
18722   cat >>confdefs.h <<_ACEOF
18723 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
18724 _ACEOF
18725
18726                      eval ac_cv_have_decl_$gl_func=yes
18727 fi
18728       done
18729
18730
18731
18732
18733
18734
18735
18736     ac_fn_c_check_decl "$LINENO" "fdopendir" "ac_cv_have_decl_fdopendir" "
18737 #include <dirent.h>
18738
18739 "
18740 if test "x$ac_cv_have_decl_fdopendir" = xyes; then :
18741   ac_have_decl=1
18742 else
18743   ac_have_decl=0
18744 fi
18745
18746 cat >>confdefs.h <<_ACEOF
18747 #define HAVE_DECL_FDOPENDIR $ac_have_decl
18748 _ACEOF
18749 if test $ac_have_decl = 1; then :
18750
18751 else
18752   HAVE_DECL_FDOPENDIR=0
18753 fi
18754
18755
18756   if test $ac_cv_func_fdopendir = no; then
18757     HAVE_FDOPENDIR=0
18758   else
18759     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fdopendir works" >&5
18760 $as_echo_n "checking whether fdopendir works... " >&6; }
18761 if ${gl_cv_func_fdopendir_works+:} false; then :
18762   $as_echo_n "(cached) " >&6
18763 else
18764   if test "$cross_compiling" = yes; then :
18765   case "$host_os" in
18766                     # Guess yes on glibc systems.
18767             *-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;;
18768                     # If we don't know, assume the worst.
18769             *)      gl_cv_func_fdopendir_works="guessing no" ;;
18770           esac
18771
18772 else
18773   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18774 /* end confdefs.h.  */
18775
18776 #include <dirent.h>
18777 #include <fcntl.h>
18778 #include <unistd.h>
18779 #if !HAVE_DECL_FDOPENDIR
18780 extern
18781 # ifdef __cplusplus
18782 "C"
18783 # endif
18784 DIR *fdopendir (int);
18785 #endif
18786
18787 int
18788 main ()
18789 {
18790 int result = 0;
18791      int fd = open ("conftest.c", O_RDONLY);
18792      if (fd < 0) result |= 1;
18793      if (fdopendir (fd)) result |= 2;
18794      if (close (fd)) result |= 4;
18795      return result;
18796   ;
18797   return 0;
18798 }
18799 _ACEOF
18800 if ac_fn_c_try_run "$LINENO"; then :
18801   gl_cv_func_fdopendir_works=yes
18802 else
18803   gl_cv_func_fdopendir_works=no
18804 fi
18805 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18806   conftest.$ac_objext conftest.beam conftest.$ac_ext
18807 fi
18808
18809 fi
18810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopendir_works" >&5
18811 $as_echo "$gl_cv_func_fdopendir_works" >&6; }
18812     case "$gl_cv_func_fdopendir_works" in
18813       *yes) ;;
18814       *)
18815         REPLACE_FDOPENDIR=1
18816         ;;
18817     esac
18818   fi
18819
18820   if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then
18821
18822
18823
18824
18825
18826
18827
18828
18829   gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext"
18830
18831   fi
18832
18833
18834
18835
18836
18837           GNULIB_FDOPENDIR=1
18838
18839
18840
18841
18842
18843 $as_echo "#define GNULIB_TEST_FDOPENDIR 1" >>confdefs.h
18844
18845
18846
18847
18848
18849 cat >>confdefs.h <<_ACEOF
18850 #define GNULIB_FDOPENDIR 1
18851 _ACEOF
18852
18853
18854
18855
18856 cat >>confdefs.h <<_ACEOF
18857 #define GNULIB_FDUTIMENSAT 1
18858 _ACEOF
18859
18860
18861
18862
18863     ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
18864 if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
18865
18866 cat >>confdefs.h <<_ACEOF
18867 #define HAVE_STRUCT_STAT_ST_BLOCKS 1
18868 _ACEOF
18869
18870
18871 $as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
18872
18873 else
18874   :
18875 fi
18876
18877
18878
18879
18880   if test $ac_cv_member_struct_stat_st_blocks = no; then
18881
18882
18883
18884
18885
18886
18887
18888
18889   gl_LIBOBJS="$gl_LIBOBJS fileblocks.$ac_objext"
18890
18891
18892
18893   :
18894
18895   fi
18896
18897
18898
18899
18900
18901
18902   FLOAT_H=
18903   REPLACE_FLOAT_LDBL=0
18904   case "$host_os" in
18905     aix* | beos* | openbsd* | mirbsd* | irix*)
18906       FLOAT_H=float.h
18907       ;;
18908     freebsd*)
18909       case "$host_cpu" in
18910         i[34567]86 )
18911           FLOAT_H=float.h
18912           ;;
18913         x86_64 )
18914           # On x86_64 systems, the C compiler may still be generating
18915           # 32-bit code.
18916           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18917 /* end confdefs.h.  */
18918 #if defined __LP64__ || defined __x86_64__ || defined __amd64__
18919              yes
18920              #endif
18921 _ACEOF
18922 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18923   $EGREP "yes" >/dev/null 2>&1; then :
18924
18925 else
18926   FLOAT_H=float.h
18927 fi
18928 rm -f conftest*
18929
18930           ;;
18931       esac
18932       ;;
18933     linux*)
18934       case "$host_cpu" in
18935         powerpc*)
18936           FLOAT_H=float.h
18937           ;;
18938       esac
18939       ;;
18940   esac
18941   case "$host_os" in
18942     aix* | freebsd* | linux*)
18943       if test -n "$FLOAT_H"; then
18944         REPLACE_FLOAT_LDBL=1
18945       fi
18946       ;;
18947   esac
18948
18949     REPLACE_ITOLD=0
18950   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5
18951 $as_echo_n "checking whether conversion from 'int' to 'long double' works... " >&6; }
18952 if ${gl_cv_func_itold_works+:} false; then :
18953   $as_echo_n "(cached) " >&6
18954 else
18955
18956       if test "$cross_compiling" = yes; then :
18957   case "$host" in
18958            sparc*-*-linux*)
18959              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18960 /* end confdefs.h.  */
18961 #if defined __LP64__ || defined __arch64__
18962                 yes
18963                 #endif
18964 _ACEOF
18965 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18966   $EGREP "yes" >/dev/null 2>&1; then :
18967   gl_cv_func_itold_works="guessing no"
18968 else
18969   gl_cv_func_itold_works="guessing yes"
18970 fi
18971 rm -f conftest*
18972
18973              ;;
18974            *) gl_cv_func_itold_works="guessing yes" ;;
18975          esac
18976
18977 else
18978   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18979 /* end confdefs.h.  */
18980
18981 int i = -1;
18982 volatile long double ld;
18983 int main ()
18984 {
18985   ld += i * 1.0L;
18986   if (ld > 0)
18987     return 1;
18988   return 0;
18989 }
18990 _ACEOF
18991 if ac_fn_c_try_run "$LINENO"; then :
18992   gl_cv_func_itold_works=yes
18993 else
18994   gl_cv_func_itold_works=no
18995 fi
18996 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18997   conftest.$ac_objext conftest.beam conftest.$ac_ext
18998 fi
18999
19000
19001 fi
19002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5
19003 $as_echo "$gl_cv_func_itold_works" >&6; }
19004   case "$gl_cv_func_itold_works" in
19005     *no)
19006       REPLACE_ITOLD=1
19007                   FLOAT_H=float.h
19008       ;;
19009   esac
19010
19011   if test -n "$FLOAT_H"; then
19012
19013
19014
19015
19016
19017
19018
19019
19020      if test $gl_cv_have_include_next = yes; then
19021        gl_cv_next_float_h='<'float.h'>'
19022      else
19023        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
19024 $as_echo_n "checking absolute name of <float.h>... " >&6; }
19025 if ${gl_cv_next_float_h+:} false; then :
19026   $as_echo_n "(cached) " >&6
19027 else
19028
19029                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19030 /* end confdefs.h.  */
19031 #include <float.h>
19032
19033 _ACEOF
19034                                                                                                                         case "$host_os" in
19035                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
19036                  *)    gl_absname_cpp="$ac_cpp" ;;
19037                esac
19038
19039                case "$host_os" in
19040                  mingw*)
19041                                                                                                                                      gl_dirsep_regex='[/\\]'
19042                    ;;
19043                  *)
19044                    gl_dirsep_regex='\/'
19045                    ;;
19046                esac
19047                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19048
19049                gl_header_literal_regex=`echo 'float.h' \
19050                                         | sed -e "$gl_make_literal_regex_sed"`
19051                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19052                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19053                    s|^/[^/]|//&|
19054                    p
19055                    q
19056                  }'
19057                                                             gl_cv_next_float_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19058                       sed -n "$gl_absolute_header_sed"`'"'
19059
19060
19061 fi
19062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
19063 $as_echo "$gl_cv_next_float_h" >&6; }
19064      fi
19065      NEXT_FLOAT_H=$gl_cv_next_float_h
19066
19067      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19068        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19069        gl_next_as_first_directive='<'float.h'>'
19070      else
19071        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19072        gl_next_as_first_directive=$gl_cv_next_float_h
19073      fi
19074      NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive
19075
19076
19077
19078
19079   fi
19080
19081    if test -n "$FLOAT_H"; then
19082   GL_GENERATE_FLOAT_H_TRUE=
19083   GL_GENERATE_FLOAT_H_FALSE='#'
19084 else
19085   GL_GENERATE_FLOAT_H_TRUE='#'
19086   GL_GENERATE_FLOAT_H_FALSE=
19087 fi
19088
19089
19090
19091   if test $REPLACE_FLOAT_LDBL = 1; then
19092
19093
19094
19095
19096
19097
19098
19099
19100   gl_LIBOBJS="$gl_LIBOBJS float.$ac_objext"
19101
19102   fi
19103   if test $REPLACE_ITOLD = 1; then
19104
19105
19106
19107
19108
19109
19110
19111
19112   gl_LIBOBJS="$gl_LIBOBJS itold.$ac_objext"
19113
19114   fi
19115
19116
19117
19118
19119
19120   FNMATCH_H=
19121   gl_fnmatch_required_lowercase=`
19122     echo $gl_fnmatch_required | LC_ALL=C tr '[A-Z]' '[a-z]'
19123   `
19124   gl_fnmatch_cache_var="gl_cv_func_fnmatch_${gl_fnmatch_required_lowercase}"
19125   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working $gl_fnmatch_required fnmatch" >&5
19126 $as_echo_n "checking for working $gl_fnmatch_required fnmatch... " >&6; }
19127 if eval \${$gl_fnmatch_cache_var+:} false; then :
19128   $as_echo_n "(cached) " >&6
19129 else
19130                            if test $gl_fnmatch_required = GNU; then
19131        gl_fnmatch_gnu_start=
19132        gl_fnmatch_gnu_end=
19133      else
19134        gl_fnmatch_gnu_start='#if 0'
19135        gl_fnmatch_gnu_end='#endif'
19136      fi
19137      if test "$cross_compiling" = yes; then :
19138   eval "$gl_fnmatch_cache_var=\"guessing no\""
19139 else
19140   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19141 /* end confdefs.h.  */
19142 #include <fnmatch.h>
19143             static int
19144             y (char const *pattern, char const *string, int flags)
19145             {
19146               return fnmatch (pattern, string, flags) == 0;
19147             }
19148             static int
19149             n (char const *pattern, char const *string, int flags)
19150             {
19151               return fnmatch (pattern, string, flags) == FNM_NOMATCH;
19152             }
19153
19154 int
19155 main ()
19156 {
19157 char const *Apat = 'A' < '\\\\' ? "[A-\\\\\\\\]" : "[\\\\\\\\-A]";
19158             char const *apat = 'a' < '\\\\' ? "[a-\\\\\\\\]" : "[\\\\\\\\-a]";
19159             static char const A_1[] = { 'A' - 1, 0 };
19160             static char const A01[] = { 'A' + 1, 0 };
19161             static char const a_1[] = { 'a' - 1, 0 };
19162             static char const a01[] = { 'a' + 1, 0 };
19163             static char const bs_1[] = { '\\\\' - 1, 0 };
19164             static char const bs01[] = { '\\\\' + 1, 0 };
19165             int result = 0;
19166             if (!n ("a*", "", 0))
19167               return 1;
19168             if (!y ("a*", "abc", 0))
19169               return 1;
19170             if (!y ("[/b", "[/b", 0)) /*"]]"*/ /* glibc Bugzilla bug 12378 */
19171               return 1;
19172             if (!n ("d*/*1", "d/s/1", FNM_PATHNAME))
19173               return 2;
19174             if (!y ("a\\\\bc", "abc", 0))
19175               return 3;
19176             if (!n ("a\\\\bc", "abc", FNM_NOESCAPE))
19177               return 3;
19178             if (!y ("*x", ".x", 0))
19179               return 4;
19180             if (!n ("*x", ".x", FNM_PERIOD))
19181               return 4;
19182             if (!y (Apat, "\\\\", 0))
19183               return 5;
19184             if (!y (Apat, "A", 0))
19185               return 5;
19186             if (!y (apat, "\\\\", 0))
19187               return 5;
19188             if (!y (apat, "a", 0))
19189               return 5;
19190             if (!(n (Apat, A_1, 0) == ('A' < '\\\\')))
19191               return 5;
19192             if (!(n (apat, a_1, 0) == ('a' < '\\\\')))
19193               return 5;
19194             if (!(y (Apat, A01, 0) == ('A' < '\\\\')))
19195               return 5;
19196             if (!(y (apat, a01, 0) == ('a' < '\\\\')))
19197               return 5;
19198             if (!(y (Apat, bs_1, 0) == ('A' < '\\\\')))
19199               return 5;
19200             if (!(y (apat, bs_1, 0) == ('a' < '\\\\')))
19201               return 5;
19202             if (!(n (Apat, bs01, 0) == ('A' < '\\\\')))
19203               return 5;
19204             if (!(n (apat, bs01, 0) == ('a' < '\\\\')))
19205               return 5;
19206             $gl_fnmatch_gnu_start
19207             if (!y ("xxXX", "xXxX", FNM_CASEFOLD))
19208               result |= 8;
19209             if (!y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH))
19210               result |= 16;
19211             if (!n ("d*/*1", "d/s/1", FNM_FILE_NAME))
19212               result |= 32;
19213             if (!y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR))
19214               result |= 64;
19215             if (!y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR))
19216               result |= 64;
19217             if (!y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR))
19218               result |= 64;
19219             $gl_fnmatch_gnu_end
19220             return result;
19221
19222   ;
19223   return 0;
19224 }
19225 _ACEOF
19226 if ac_fn_c_try_run "$LINENO"; then :
19227   eval "$gl_fnmatch_cache_var=yes"
19228 else
19229   eval "$gl_fnmatch_cache_var=no"
19230 fi
19231 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19232   conftest.$ac_objext conftest.beam conftest.$ac_ext
19233 fi
19234
19235
19236 fi
19237 eval ac_res=\$$gl_fnmatch_cache_var
19238                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
19239 $as_echo "$ac_res" >&6; }
19240   eval "gl_fnmatch_result=\"\$$gl_fnmatch_cache_var\""
19241   if test "$gl_fnmatch_result" = yes; then
19242             rm -f "$gl_source_base/fnmatch.h"
19243   else
19244     FNMATCH_H=fnmatch.h
19245   fi
19246
19247    if test -n "$FNMATCH_H"; then
19248   GL_GENERATE_FNMATCH_H_TRUE=
19249   GL_GENERATE_FNMATCH_H_FALSE='#'
19250 else
19251   GL_GENERATE_FNMATCH_H_TRUE='#'
19252   GL_GENERATE_FNMATCH_H_FALSE=
19253 fi
19254
19255
19256   if test -n "$FNMATCH_H"; then
19257
19258
19259
19260
19261
19262
19263
19264
19265   gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
19266
19267
19268
19269 cat >>confdefs.h <<_ACEOF
19270 #define fnmatch ${gl_fnmatch_required_lowercase}_fnmatch
19271 _ACEOF
19272
19273
19274   ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
19275 "
19276 if test "x$ac_cv_have_decl_isblank" = xyes; then :
19277   ac_have_decl=1
19278 else
19279   ac_have_decl=0
19280 fi
19281
19282 cat >>confdefs.h <<_ACEOF
19283 #define HAVE_DECL_ISBLANK $ac_have_decl
19284 _ACEOF
19285
19286
19287
19288
19289   fi
19290
19291
19292
19293
19294
19295   if test -n "$FNMATCH_H"; then
19296
19297
19298
19299
19300
19301
19302
19303
19304   gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
19305
19306
19307
19308 cat >>confdefs.h <<_ACEOF
19309 #define fnmatch ${gl_fnmatch_required_lowercase}_fnmatch
19310 _ACEOF
19311
19312
19313   ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
19314 "
19315 if test "x$ac_cv_have_decl_isblank" = xyes; then :
19316   ac_have_decl=1
19317 else
19318   ac_have_decl=0
19319 fi
19320
19321 cat >>confdefs.h <<_ACEOF
19322 #define HAVE_DECL_ISBLANK $ac_have_decl
19323 _ACEOF
19324
19325
19326
19327
19328   fi
19329
19330
19331
19332   fp_headers='
19333 #     include <stdio.h>
19334 #     if HAVE_STDIO_EXT_H
19335 #      include <stdio_ext.h>
19336 #     endif
19337 '
19338   ac_fn_c_check_decl "$LINENO" "__fpending" "ac_cv_have_decl___fpending" "$fp_headers
19339 "
19340 if test "x$ac_cv_have_decl___fpending" = xyes; then :
19341   ac_have_decl=1
19342 else
19343   ac_have_decl=0
19344 fi
19345
19346 cat >>confdefs.h <<_ACEOF
19347 #define HAVE_DECL___FPENDING $ac_have_decl
19348 _ACEOF
19349
19350
19351   if test $ac_cv_func___fpending = no; then
19352
19353
19354
19355
19356
19357
19358
19359
19360   gl_LIBOBJS="$gl_LIBOBJS fpending.$ac_objext"
19361
19362
19363   { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to determine the number of pending output bytes on a stream" >&5
19364 $as_echo_n "checking how to determine the number of pending output bytes on a stream... " >&6; }
19365 if ${ac_cv_sys_pending_output_n_bytes+:} false; then :
19366   $as_echo_n "(cached) " >&6
19367 else
19368
19369       for ac_expr in                                                    \
19370                                                                         \
19371           '# glibc2'                                                    \
19372           'fp->_IO_write_ptr - fp->_IO_write_base'                      \
19373                                                                         \
19374           '# traditional Unix'                                          \
19375           'fp->_ptr - fp->_base'                                        \
19376                                                                         \
19377           '# BSD'                                                       \
19378           'fp->_p - fp->_bf._base'                                      \
19379                                                                         \
19380           '# SCO, Unixware'                                             \
19381           '(fp->__ptr ? fp->__ptr - fp->__base : 0)'                    \
19382                                                                         \
19383           '# QNX'                                                       \
19384           '(fp->_Mode & 0x2000 /*_MWRITE*/ ? fp->_Next - fp->_Buf : 0)' \
19385                                                                         \
19386           '# old glibc?'                                                \
19387           'fp->__bufp - fp->__buffer'                                   \
19388                                                                         \
19389           '# old glibc iostream?'                                       \
19390           'fp->_pptr - fp->_pbase'                                      \
19391                                                                         \
19392           '# emx+gcc'                                                   \
19393           'fp->_ptr - fp->_buffer'                                      \
19394                                                                         \
19395           '# Minix'                                                     \
19396           'fp->_ptr - fp->_buf'                                         \
19397                                                                         \
19398           '# Plan9'                                                     \
19399           'fp->wp - fp->buf'                                            \
19400                                                                         \
19401           '# VMS'                                                       \
19402           '(*fp)->_ptr - (*fp)->_base'                                  \
19403                                                                         \
19404           '# e.g., DGUX R4.11; the info is not available'               \
19405           1                                                             \
19406           ; do
19407
19408         # Skip each embedded comment.
19409         case "$ac_expr" in '#'*) continue;; esac
19410
19411         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19412 /* end confdefs.h.  */
19413 #include <stdio.h>
19414 int
19415 main ()
19416 {
19417 FILE *fp = stdin; (void) ($ac_expr);
19418   ;
19419   return 0;
19420 }
19421 _ACEOF
19422 if ac_fn_c_try_compile "$LINENO"; then :
19423   fp_done=yes
19424
19425 fi
19426 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19427         test "$fp_done" = yes && break
19428       done
19429
19430       ac_cv_sys_pending_output_n_bytes=$ac_expr
19431
19432
19433 fi
19434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_pending_output_n_bytes" >&5
19435 $as_echo "$ac_cv_sys_pending_output_n_bytes" >&6; }
19436
19437 cat >>confdefs.h <<_ACEOF
19438 #define PENDING_OUTPUT_N_BYTES $ac_cv_sys_pending_output_n_bytes
19439 _ACEOF
19440
19441
19442   fi
19443
19444
19445
19446     if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then
19447     REPLACE_FSEEK=1
19448   fi
19449
19450   if test $REPLACE_FSEEK = 1; then
19451
19452
19453
19454
19455
19456
19457
19458
19459   gl_LIBOBJS="$gl_LIBOBJS fseek.$ac_objext"
19460
19461   fi
19462
19463
19464
19465
19466
19467           GNULIB_FSEEK=1
19468
19469
19470
19471
19472
19473 $as_echo "#define GNULIB_TEST_FSEEK 1" >>confdefs.h
19474
19475
19476
19477
19478
19479
19480
19481
19482
19483
19484
19485   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fseeko" >&5
19486 $as_echo_n "checking for fseeko... " >&6; }
19487 if ${gl_cv_func_fseeko+:} false; then :
19488   $as_echo_n "(cached) " >&6
19489 else
19490
19491       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19492 /* end confdefs.h.  */
19493 #include <stdio.h>
19494
19495 int
19496 main ()
19497 {
19498 fseeko (stdin, 0, 0);
19499   ;
19500   return 0;
19501 }
19502 _ACEOF
19503 if ac_fn_c_try_link "$LINENO"; then :
19504   gl_cv_func_fseeko=yes
19505 else
19506   gl_cv_func_fseeko=no
19507 fi
19508 rm -f core conftest.err conftest.$ac_objext \
19509     conftest$ac_exeext conftest.$ac_ext
19510
19511 fi
19512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fseeko" >&5
19513 $as_echo "$gl_cv_func_fseeko" >&6; }
19514
19515
19516   if test $ac_cv_have_decl_fseeko = no; then
19517     HAVE_DECL_FSEEKO=0
19518   fi
19519
19520   if test $gl_cv_func_fseeko = no; then
19521     HAVE_FSEEKO=0
19522   else
19523     if test $WINDOWS_64_BIT_OFF_T = 1; then
19524       REPLACE_FSEEKO=1
19525     fi
19526     if test $gl_cv_var_stdin_large_offset = no; then
19527       REPLACE_FSEEKO=1
19528     fi
19529
19530   fi
19531
19532   if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then
19533
19534
19535
19536
19537
19538
19539
19540
19541   gl_LIBOBJS="$gl_LIBOBJS fseeko.$ac_objext"
19542
19543
19544       for ac_func in _fseeki64
19545 do :
19546   ac_fn_c_check_func "$LINENO" "_fseeki64" "ac_cv_func__fseeki64"
19547 if test "x$ac_cv_func__fseeki64" = xyes; then :
19548   cat >>confdefs.h <<_ACEOF
19549 #define HAVE__FSEEKI64 1
19550 _ACEOF
19551
19552 fi
19553 done
19554
19555
19556   fi
19557
19558
19559
19560
19561
19562           GNULIB_FSEEKO=1
19563
19564
19565
19566
19567
19568 $as_echo "#define GNULIB_TEST_FSEEKO 1" >>confdefs.h
19569
19570
19571
19572
19573
19574
19575
19576   if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
19577     REPLACE_FSTAT=1
19578   fi
19579
19580
19581   if test $WINDOWS_64_BIT_ST_SIZE = 1; then
19582     REPLACE_FSTAT=1
19583   fi
19584
19585
19586
19587
19588
19589   if test $ac_cv_func_fchdir = no; then
19590     HAVE_FCHDIR=0
19591   fi
19592
19593     if test $HAVE_FCHDIR = 0; then
19594       case "$gl_cv_func_open_directory_works" in
19595         *yes) ;;
19596         *)
19597           REPLACE_FSTAT=1
19598           ;;
19599       esac
19600     fi
19601
19602
19603   if test $REPLACE_FSTAT = 1; then
19604
19605
19606
19607
19608
19609
19610
19611
19612   gl_LIBOBJS="$gl_LIBOBJS fstat.$ac_objext"
19613
19614     :
19615   fi
19616
19617
19618
19619
19620
19621           GNULIB_FSTAT=1
19622
19623
19624
19625
19626
19627 $as_echo "#define GNULIB_TEST_FSTAT 1" >>confdefs.h
19628
19629
19630
19631
19632
19633
19634
19635
19636
19637   if test $ac_cv_func_fstatat = no; then
19638     HAVE_FSTATAT=0
19639   else
19640             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fstatat (..., 0) works" >&5
19641 $as_echo_n "checking whether fstatat (..., 0) works... " >&6; }
19642 if ${gl_cv_func_fstatat_zero_flag+:} false; then :
19643   $as_echo_n "(cached) " >&6
19644 else
19645   if test "$cross_compiling" = yes; then :
19646   case "$host_os" in
19647             aix*) gl_cv_func_fstatat_zero_flag="guessing no";;
19648             *)    gl_cv_func_fstatat_zero_flag="guessing yes";;
19649           esac
19650
19651 else
19652   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19653 /* end confdefs.h.  */
19654
19655               #include <fcntl.h>
19656               #include <sys/stat.h>
19657               int
19658               main (void)
19659               {
19660                 struct stat a;
19661                 return fstatat (AT_FDCWD, ".", &a, 0) != 0;
19662               }
19663
19664 _ACEOF
19665 if ac_fn_c_try_run "$LINENO"; then :
19666   gl_cv_func_fstatat_zero_flag=yes
19667 else
19668   gl_cv_func_fstatat_zero_flag=no
19669 fi
19670 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19671   conftest.$ac_objext conftest.beam conftest.$ac_ext
19672 fi
19673
19674
19675 fi
19676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fstatat_zero_flag" >&5
19677 $as_echo "$gl_cv_func_fstatat_zero_flag" >&6; }
19678
19679     case $gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in
19680     *yes+*yes) ;;
19681     *) REPLACE_FSTATAT=1
19682        case $gl_cv_func_fstatat_zero_flag in
19683        *yes)
19684
19685 $as_echo "#define HAVE_WORKING_FSTATAT_ZERO_FLAG 1" >>confdefs.h
19686
19687          ;;
19688        esac
19689        ;;
19690     esac
19691   fi
19692
19693   if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
19694
19695
19696
19697
19698
19699
19700
19701
19702   gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext"
19703
19704   fi
19705
19706
19707
19708
19709
19710           GNULIB_FSTATAT=1
19711
19712
19713
19714
19715
19716 $as_echo "#define GNULIB_TEST_FSTATAT 1" >>confdefs.h
19717
19718
19719
19720
19721
19722
19723
19724   if test $ac_cv_func_futimens = no; then
19725     HAVE_FUTIMENS=0
19726   else
19727     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether futimens works" >&5
19728 $as_echo_n "checking whether futimens works... " >&6; }
19729 if ${gl_cv_func_futimens_works+:} false; then :
19730   $as_echo_n "(cached) " >&6
19731 else
19732   if test "$cross_compiling" = yes; then :
19733   gl_cv_func_futimens_works="guessing no"
19734 else
19735   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19736 /* end confdefs.h.  */
19737
19738 #include <fcntl.h>
19739 #include <sys/stat.h>
19740 #include <unistd.h>
19741 #include <errno.h>
19742
19743 int
19744 main ()
19745 {
19746 struct timespec ts[2] = { { 1, UTIME_OMIT }, { 1, UTIME_NOW } };
19747       int fd = creat ("conftest.file", 0600);
19748       struct stat st;
19749       if (fd < 0) return 1;
19750       errno = 0;
19751       if (futimens (AT_FDCWD, NULL) == 0) return 2;
19752       if (errno != EBADF) return 3;
19753       if (futimens (fd, ts)) return 4;
19754       sleep (1);
19755       ts[0].tv_nsec = UTIME_NOW;
19756       ts[1].tv_nsec = UTIME_OMIT;
19757       if (futimens (fd, ts)) return 5;
19758       if (fstat (fd, &st)) return 6;
19759       if (st.st_ctime < st.st_atime) return 7;
19760
19761   ;
19762   return 0;
19763 }
19764 _ACEOF
19765 if ac_fn_c_try_run "$LINENO"; then :
19766            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19767 /* end confdefs.h.  */
19768
19769 #ifdef __linux__
19770 /* The Linux kernel added futimens in 2.6.22, but has bugs with UTIME_OMIT
19771    in several file systems as recently as 2.6.32.  Always replace futimens
19772    to support older kernels.  */
19773 choke me
19774 #endif
19775
19776 int
19777 main ()
19778 {
19779
19780   ;
19781   return 0;
19782 }
19783 _ACEOF
19784 if ac_fn_c_try_compile "$LINENO"; then :
19785   gl_cv_func_futimens_works=yes
19786 else
19787   gl_cv_func_futimens_works="needs runtime check"
19788 fi
19789 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19790 else
19791   gl_cv_func_futimens_works=no
19792 fi
19793 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19794   conftest.$ac_objext conftest.beam conftest.$ac_ext
19795 fi
19796
19797       rm -f conftest.file
19798 fi
19799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_futimens_works" >&5
19800 $as_echo "$gl_cv_func_futimens_works" >&6; }
19801     if test "$gl_cv_func_futimens_works" != yes; then
19802       REPLACE_FUTIMENS=1
19803     fi
19804   fi
19805
19806   if test $HAVE_FUTIMENS = 0 || test $REPLACE_FUTIMENS = 1; then
19807
19808
19809
19810
19811
19812
19813
19814
19815   gl_LIBOBJS="$gl_LIBOBJS futimens.$ac_objext"
19816
19817   fi
19818
19819
19820
19821
19822
19823           GNULIB_FUTIMENS=1
19824
19825
19826
19827
19828
19829 $as_echo "#define GNULIB_TEST_FUTIMENS 1" >>confdefs.h
19830
19831
19832
19833
19834
19835
19836
19837
19838   gl_abort_bug=no
19839   case "$host_os" in
19840     mingw*)
19841       gl_cv_func_getcwd_path_max=yes
19842       ;;
19843     *)
19844
19845
19846
19847
19848
19849   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd handles long file names properly" >&5
19850 $as_echo_n "checking whether getcwd handles long file names properly... " >&6; }
19851 if ${gl_cv_func_getcwd_path_max+:} false; then :
19852   $as_echo_n "(cached) " >&6
19853 else
19854   # Arrange for deletion of the temporary directory this test creates.
19855      ac_clean_files="$ac_clean_files confdir3"
19856           if test "$cross_compiling" = yes; then :
19857   case "$host_os" in
19858        aix*) gl_cv_func_getcwd_path_max='no, it has the AIX bug';;
19859        *) gl_cv_func_getcwd_path_max=no;;
19860      esac
19861 else
19862   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19863 /* end confdefs.h.  */
19864
19865 #include <errno.h>
19866 #include <stdlib.h>
19867 #if HAVE_UNISTD_H
19868 # include <unistd.h>
19869 #else
19870 # include <direct.h>
19871 #endif
19872 #include <string.h>
19873 #include <limits.h>
19874 #include <sys/stat.h>
19875 #include <sys/types.h>
19876 #include <fcntl.h>
19877
19878
19879 /* Arrange to define PATH_MAX, like "pathmax.h" does. */
19880 #if HAVE_UNISTD_H
19881 # include <unistd.h>
19882 #endif
19883 #include <limits.h>
19884 #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
19885 # include <sys/param.h>
19886 #endif
19887 #if !defined PATH_MAX && defined MAXPATHLEN
19888 # define PATH_MAX MAXPATHLEN
19889 #endif
19890 #ifdef __hpux
19891 # undef PATH_MAX
19892 # define PATH_MAX 1024
19893 #endif
19894 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
19895 # undef PATH_MAX
19896 # define PATH_MAX 260
19897 #endif
19898
19899
19900 #ifndef AT_FDCWD
19901 # define AT_FDCWD 0
19902 #endif
19903 #ifdef ENAMETOOLONG
19904 # define is_ENAMETOOLONG(x) ((x) == ENAMETOOLONG)
19905 #else
19906 # define is_ENAMETOOLONG(x) 0
19907 #endif
19908
19909 /* Use the getcwd function, not any macro.  */
19910 #undef getcwd
19911
19912 /* Don't get link errors because mkdir is redefined to rpl_mkdir.  */
19913 #undef mkdir
19914
19915 #ifndef S_IRWXU
19916 # define S_IRWXU 0700
19917 #endif
19918
19919 /* The length of this name must be 8.  */
19920 #define DIR_NAME "confdir3"
19921 #define DIR_NAME_LEN 8
19922 #define DIR_NAME_SIZE (DIR_NAME_LEN + 1)
19923
19924 /* The length of "../".  */
19925 #define DOTDOTSLASH_LEN 3
19926
19927 /* Leftover bytes in the buffer, to work around library or OS bugs.  */
19928 #define BUF_SLOP 20
19929
19930 int
19931 main ()
19932 {
19933 #ifndef PATH_MAX
19934   /* The Hurd doesn't define this, so getcwd can't exhibit the bug --
19935      at least not on a local file system.  And if we were to start worrying
19936      about remote file systems, we'd have to enable the wrapper function
19937      all of the time, just to be safe.  That's not worth the cost.  */
19938   exit (0);
19939 #elif ((INT_MAX / (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1) \
19940         - DIR_NAME_SIZE - BUF_SLOP) \
19941        <= PATH_MAX)
19942   /* FIXME: Assuming there's a system for which this is true,
19943      this should be done in a compile test.  */
19944   exit (0);
19945 #else
19946   char buf[PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1)
19947            + DIR_NAME_SIZE + BUF_SLOP];
19948   char *cwd = getcwd (buf, PATH_MAX);
19949   size_t initial_cwd_len;
19950   size_t cwd_len;
19951   int fail = 0;
19952   size_t n_chdirs = 0;
19953
19954   if (cwd == NULL)
19955     exit (10);
19956
19957   cwd_len = initial_cwd_len = strlen (cwd);
19958
19959   while (1)
19960     {
19961       size_t dotdot_max = PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN);
19962       char *c = NULL;
19963
19964       cwd_len += DIR_NAME_SIZE;
19965       /* If mkdir or chdir fails, it could be that this system cannot create
19966          any file with an absolute name longer than PATH_MAX, such as cygwin.
19967          If so, leave fail as 0, because the current working directory can't
19968          be too long for getcwd if it can't even be created.  For other
19969          errors, be pessimistic and consider that as a failure, too.  */
19970       if (mkdir (DIR_NAME, S_IRWXU) < 0 || chdir (DIR_NAME) < 0)
19971         {
19972           if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
19973             fail = 20;
19974           break;
19975         }
19976
19977       if (PATH_MAX <= cwd_len && cwd_len < PATH_MAX + DIR_NAME_SIZE)
19978         {
19979           c = getcwd (buf, PATH_MAX);
19980           if (!c && errno == ENOENT)
19981             {
19982               fail = 11;
19983               break;
19984             }
19985           if (c)
19986             {
19987               fail = 31;
19988               break;
19989             }
19990           if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
19991             {
19992               fail = 21;
19993               break;
19994             }
19995         }
19996
19997       if (dotdot_max <= cwd_len - initial_cwd_len)
19998         {
19999           if (dotdot_max + DIR_NAME_SIZE < cwd_len - initial_cwd_len)
20000             break;
20001           c = getcwd (buf, cwd_len + 1);
20002           if (!c)
20003             {
20004               if (! (errno == ERANGE || errno == ENOENT
20005                      || is_ENAMETOOLONG (errno)))
20006                 {
20007                   fail = 22;
20008                   break;
20009                 }
20010               if (AT_FDCWD || errno == ERANGE || errno == ENOENT)
20011                 {
20012                   fail = 12;
20013                   break;
20014                 }
20015             }
20016         }
20017
20018       if (c && strlen (c) != cwd_len)
20019         {
20020           fail = 23;
20021           break;
20022         }
20023       ++n_chdirs;
20024     }
20025
20026   /* Leaving behind such a deep directory is not polite.
20027      So clean up here, right away, even though the driving
20028      shell script would also clean up.  */
20029   {
20030     size_t i;
20031
20032     /* Try rmdir first, in case the chdir failed.  */
20033     rmdir (DIR_NAME);
20034     for (i = 0; i <= n_chdirs; i++)
20035       {
20036         if (chdir ("..") < 0)
20037           break;
20038         if (rmdir (DIR_NAME) != 0)
20039           break;
20040       }
20041   }
20042
20043   exit (fail);
20044 #endif
20045 }
20046
20047 _ACEOF
20048 if ac_fn_c_try_run "$LINENO"; then :
20049   gl_cv_func_getcwd_path_max=yes
20050 else
20051   case $? in
20052      10|11|12) gl_cv_func_getcwd_path_max='no, but it is partly working';;
20053      31) gl_cv_func_getcwd_path_max='no, it has the AIX bug';;
20054      *) gl_cv_func_getcwd_path_max=no;;
20055      esac
20056 fi
20057 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20058   conftest.$ac_objext conftest.beam conftest.$ac_ext
20059 fi
20060
20061
20062 fi
20063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_path_max" >&5
20064 $as_echo "$gl_cv_func_getcwd_path_max" >&6; }
20065
20066       case "$gl_cv_func_getcwd_null" in
20067         *yes)
20068
20069
20070
20071
20072   for ac_func in getpagesize
20073 do :
20074   ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
20075 if test "x$ac_cv_func_getpagesize" = xyes; then :
20076   cat >>confdefs.h <<_ACEOF
20077 #define HAVE_GETPAGESIZE 1
20078 _ACEOF
20079
20080 fi
20081 done
20082
20083   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd aborts when 4k < cwd_length < 16k" >&5
20084 $as_echo_n "checking whether getcwd aborts when 4k < cwd_length < 16k... " >&6; }
20085 if ${gl_cv_func_getcwd_abort_bug+:} false; then :
20086   $as_echo_n "(cached) " >&6
20087 else
20088   # Remove any remnants of a previous test.
20089      rm -rf confdir-14B---
20090      # Arrange for deletion of the temporary directory this test creates.
20091      ac_clean_files="$ac_clean_files confdir-14B---"
20092           if test "$cross_compiling" = yes; then :
20093   gl_cv_func_getcwd_abort_bug=yes
20094 else
20095   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20096 /* end confdefs.h.  */
20097
20098 #include <stdlib.h>
20099 #if HAVE_UNISTD_H
20100 # include <unistd.h>
20101 #else /* on Windows with MSVC */
20102 # include <direct.h>
20103 #endif
20104 #include <string.h>
20105 #include <sys/stat.h>
20106
20107
20108 /* Arrange to define PATH_MAX, like "pathmax.h" does. */
20109 #if HAVE_UNISTD_H
20110 # include <unistd.h>
20111 #endif
20112 #include <limits.h>
20113 #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
20114 # include <sys/param.h>
20115 #endif
20116 #if !defined PATH_MAX && defined MAXPATHLEN
20117 # define PATH_MAX MAXPATHLEN
20118 #endif
20119 #ifdef __hpux
20120 # undef PATH_MAX
20121 # define PATH_MAX 1024
20122 #endif
20123 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
20124 # undef PATH_MAX
20125 # define PATH_MAX 260
20126 #endif
20127
20128
20129 /* Don't get link errors because mkdir is redefined to rpl_mkdir.  */
20130 #undef mkdir
20131
20132 #ifndef S_IRWXU
20133 # define S_IRWXU 0700
20134 #endif
20135
20136 /* FIXME: skip the run-test altogether on systems without getpagesize.  */
20137 #if ! HAVE_GETPAGESIZE
20138 # define getpagesize() 0
20139 #endif
20140
20141 /* This size is chosen to be larger than PATH_MAX (4k), yet smaller than
20142    the 16kB pagesize on ia64 linux.  Those conditions make the code below
20143    trigger a bug in glibc's getcwd implementation before 2.4.90-10.  */
20144 #define TARGET_LEN (5 * 1024)
20145
20146 int
20147 main ()
20148 {
20149   char *cwd;
20150   size_t initial_cwd_len;
20151   int fail = 0;
20152
20153   /* The bug is triggered when PATH_MAX < getpagesize (), so skip
20154      this relatively expensive and invasive test if that's not true.  */
20155 #ifdef PATH_MAX
20156   int bug_possible = PATH_MAX < getpagesize ();
20157 #else
20158   int bug_possible = 0;
20159 #endif
20160   if (! bug_possible)
20161     return 0;
20162
20163   cwd = getcwd (NULL, 0);
20164   if (cwd == NULL)
20165     return 2;
20166
20167   initial_cwd_len = strlen (cwd);
20168   free (cwd);
20169
20170   if (1)
20171     {
20172       static char const dir_name[] = "confdir-14B---";
20173       size_t desired_depth = ((TARGET_LEN - 1 - initial_cwd_len)
20174                               / sizeof dir_name);
20175       size_t d;
20176       for (d = 0; d < desired_depth; d++)
20177         {
20178           if (mkdir (dir_name, S_IRWXU) < 0 || chdir (dir_name) < 0)
20179             {
20180               if (! (errno == ERANGE || errno == ENAMETOOLONG
20181                      || errno == ENOENT))
20182                 fail = 3; /* Unable to construct deep hierarchy.  */
20183               break;
20184             }
20185         }
20186
20187       /* If libc has the bug in question, this invocation of getcwd
20188          results in a failed assertion.  */
20189       cwd = getcwd (NULL, 0);
20190       if (cwd == NULL)
20191         fail = 4; /* getcwd didn't assert, but it failed for a long name
20192                      where the answer could have been learned.  */
20193       free (cwd);
20194
20195       /* Call rmdir first, in case the above chdir failed.  */
20196       rmdir (dir_name);
20197       while (0 < d--)
20198         {
20199           if (chdir ("..") < 0)
20200             {
20201               fail = 5;
20202               break;
20203             }
20204           rmdir (dir_name);
20205         }
20206     }
20207
20208   return fail;
20209 }
20210
20211 _ACEOF
20212 if ac_fn_c_try_run "$LINENO"; then :
20213   gl_cv_func_getcwd_abort_bug=no
20214 else
20215                                 ret=$?
20216      if test $ret -ge 128 || test $ret = 4; then
20217        gl_cv_func_getcwd_abort_bug=yes
20218      else
20219        gl_cv_func_getcwd_abort_bug=no
20220      fi
20221 fi
20222 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20223   conftest.$ac_objext conftest.beam conftest.$ac_ext
20224 fi
20225
20226
20227 fi
20228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_abort_bug" >&5
20229 $as_echo "$gl_cv_func_getcwd_abort_bug" >&6; }
20230   if test $gl_cv_func_getcwd_abort_bug = yes; then :
20231   gl_abort_bug=yes
20232 fi
20233
20234           ;;
20235       esac
20236       ;;
20237   esac
20238       case "$gl_cv_func_getcwd_path_max" in
20239     "no"|"no, it has the AIX bug") ;;
20240     *)
20241
20242 $as_echo "#define HAVE_MINIMALLY_WORKING_GETCWD 1" >>confdefs.h
20243
20244       ;;
20245   esac
20246   case "$gl_cv_func_getcwd_path_max" in
20247     "no, but it is partly working")
20248
20249 $as_echo "#define HAVE_PARTLY_WORKING_GETCWD 1" >>confdefs.h
20250
20251       ;;
20252   esac
20253
20254   if { case "$gl_cv_func_getcwd_null" in *yes) false;; *) true;; esac; } \
20255      || test $gl_cv_func_getcwd_posix_signature != yes \
20256      || test "$gl_cv_func_getcwd_path_max" != yes \
20257      || test $gl_abort_bug = yes; then
20258     REPLACE_GETCWD=1
20259   fi
20260
20261   if test $REPLACE_GETCWD = 1; then
20262
20263
20264
20265
20266
20267
20268
20269
20270   gl_LIBOBJS="$gl_LIBOBJS getcwd.$ac_objext"
20271
20272
20273
20274
20275   :
20276
20277   fi
20278
20279
20280 cat >>confdefs.h <<_ACEOF
20281 #define GNULIB_GETCWD 1
20282 _ACEOF
20283
20284
20285
20286
20287
20288
20289
20290           GNULIB_GETCWD=1
20291
20292
20293
20294
20295
20296 $as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
20297
20298
20299
20300
20301
20302
20303
20304
20305   case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_posix_signature in
20306   *yes,yes) ;;
20307   *)
20308         REPLACE_GETCWD=1
20309     ;;
20310   esac
20311
20312   if test $REPLACE_GETCWD = 1; then
20313
20314
20315
20316
20317
20318
20319
20320
20321   gl_LIBOBJS="$gl_LIBOBJS getcwd-lgpl.$ac_objext"
20322
20323   fi
20324
20325
20326
20327
20328
20329           GNULIB_GETCWD=1
20330
20331
20332
20333
20334
20335 $as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
20336
20337
20338
20339
20340
20341
20342
20343
20344
20345
20346
20347   if test $ac_cv_func_getdelim = yes; then
20348     HAVE_GETDELIM=1
20349         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getdelim function" >&5
20350 $as_echo_n "checking for working getdelim function... " >&6; }
20351 if ${gl_cv_func_working_getdelim+:} false; then :
20352   $as_echo_n "(cached) " >&6
20353 else
20354   echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data
20355     if test "$cross_compiling" = yes; then :
20356         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20357 /* end confdefs.h.  */
20358
20359 #include <features.h>
20360 #ifdef __GNU_LIBRARY__
20361  #if (__GLIBC__ >= 2) && !defined __UCLIBC__
20362   Lucky GNU user
20363  #endif
20364 #endif
20365
20366 _ACEOF
20367 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20368   $EGREP "Lucky GNU user" >/dev/null 2>&1; then :
20369   gl_cv_func_working_getdelim="guessing yes"
20370 else
20371   gl_cv_func_working_getdelim="guessing no"
20372 fi
20373 rm -f conftest*
20374
20375
20376 else
20377   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20378 /* end confdefs.h.  */
20379
20380 #    include <stdio.h>
20381 #    include <stdlib.h>
20382 #    include <string.h>
20383     int main ()
20384     {
20385       FILE *in = fopen ("./conftest.data", "r");
20386       if (!in)
20387         return 1;
20388       {
20389         /* Test result for a NULL buffer and a zero size.
20390            Based on a test program from Karl Heuer.  */
20391         char *line = NULL;
20392         size_t siz = 0;
20393         int len = getdelim (&line, &siz, '\n', in);
20394         if (!(len == 4 && line && strcmp (line, "foo\n") == 0))
20395           return 2;
20396       }
20397       {
20398         /* Test result for a NULL buffer and a non-zero size.
20399            This crashes on FreeBSD 8.0.  */
20400         char *line = NULL;
20401         size_t siz = (size_t)(~0) / 4;
20402         if (getdelim (&line, &siz, '\n', in) == -1)
20403           return 3;
20404       }
20405       return 0;
20406     }
20407
20408 _ACEOF
20409 if ac_fn_c_try_run "$LINENO"; then :
20410   gl_cv_func_working_getdelim=yes
20411 else
20412   gl_cv_func_working_getdelim=no
20413 fi
20414 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20415   conftest.$ac_objext conftest.beam conftest.$ac_ext
20416 fi
20417
20418 fi
20419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_getdelim" >&5
20420 $as_echo "$gl_cv_func_working_getdelim" >&6; }
20421     case "$gl_cv_func_working_getdelim" in
20422       *no)
20423         REPLACE_GETDELIM=1
20424         ;;
20425     esac
20426   else
20427     HAVE_GETDELIM=0
20428   fi
20429
20430   if test $ac_cv_have_decl_getdelim = no; then
20431     HAVE_DECL_GETDELIM=0
20432   fi
20433
20434   if test $HAVE_GETDELIM = 0 || test $REPLACE_GETDELIM = 1; then
20435
20436
20437
20438
20439
20440
20441
20442
20443   gl_LIBOBJS="$gl_LIBOBJS getdelim.$ac_objext"
20444
20445
20446   for ac_func in flockfile funlockfile
20447 do :
20448   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
20449 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
20450 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
20451   cat >>confdefs.h <<_ACEOF
20452 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
20453 _ACEOF
20454
20455 fi
20456 done
20457
20458   ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
20459 if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then :
20460   ac_have_decl=1
20461 else
20462   ac_have_decl=0
20463 fi
20464
20465 cat >>confdefs.h <<_ACEOF
20466 #define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
20467 _ACEOF
20468
20469
20470   fi
20471
20472
20473
20474
20475
20476           GNULIB_GETDELIM=1
20477
20478
20479
20480
20481
20482 $as_echo "#define GNULIB_TEST_GETDELIM 1" >>confdefs.h
20483
20484
20485
20486
20487
20488
20489   if test $ac_cv_func_getdtablesize != yes; then
20490     HAVE_GETDTABLESIZE=0
20491   fi
20492
20493   if test $HAVE_GETDTABLESIZE = 0; then
20494
20495
20496
20497
20498
20499
20500
20501
20502   gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext"
20503
20504     :
20505   fi
20506
20507
20508
20509
20510
20511           GNULIB_GETDTABLESIZE=1
20512
20513
20514
20515
20516
20517 $as_echo "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h
20518
20519
20520
20521
20522
20523
20524
20525
20526
20527
20528   gl_getline_needs_run_time_check=no
20529   ac_fn_c_check_func "$LINENO" "getline" "ac_cv_func_getline"
20530 if test "x$ac_cv_func_getline" = xyes; then :
20531                    gl_getline_needs_run_time_check=yes
20532 else
20533   am_cv_func_working_getline=no
20534 fi
20535
20536   if test $gl_getline_needs_run_time_check = yes; then
20537     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getline function" >&5
20538 $as_echo_n "checking for working getline function... " >&6; }
20539 if ${am_cv_func_working_getline+:} false; then :
20540   $as_echo_n "(cached) " >&6
20541 else
20542   echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data
20543     if test "$cross_compiling" = yes; then :
20544         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20545 /* end confdefs.h.  */
20546
20547 #include <features.h>
20548 #ifdef __GNU_LIBRARY__
20549  #if (__GLIBC__ >= 2) && !defined __UCLIBC__
20550   Lucky GNU user
20551  #endif
20552 #endif
20553
20554 _ACEOF
20555 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20556   $EGREP "Lucky GNU user" >/dev/null 2>&1; then :
20557   am_cv_func_working_getline="guessing yes"
20558 else
20559   am_cv_func_working_getline="guessing no"
20560 fi
20561 rm -f conftest*
20562
20563
20564 else
20565   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20566 /* end confdefs.h.  */
20567
20568 #    include <stdio.h>
20569 #    include <stdlib.h>
20570 #    include <string.h>
20571     int main ()
20572     {
20573       FILE *in = fopen ("./conftest.data", "r");
20574       if (!in)
20575         return 1;
20576       {
20577         /* Test result for a NULL buffer and a zero size.
20578            Based on a test program from Karl Heuer.  */
20579         char *line = NULL;
20580         size_t siz = 0;
20581         int len = getline (&line, &siz, in);
20582         if (!(len == 4 && line && strcmp (line, "foo\n") == 0))
20583           return 2;
20584       }
20585       {
20586         /* Test result for a NULL buffer and a non-zero size.
20587            This crashes on FreeBSD 8.0.  */
20588         char *line = NULL;
20589         size_t siz = (size_t)(~0) / 4;
20590         if (getline (&line, &siz, in) == -1)
20591           return 3;
20592       }
20593       return 0;
20594     }
20595
20596 _ACEOF
20597 if ac_fn_c_try_run "$LINENO"; then :
20598   am_cv_func_working_getline=yes
20599 else
20600   am_cv_func_working_getline=no
20601 fi
20602 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20603   conftest.$ac_objext conftest.beam conftest.$ac_ext
20604 fi
20605
20606 fi
20607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_working_getline" >&5
20608 $as_echo "$am_cv_func_working_getline" >&6; }
20609   fi
20610
20611   if test $ac_cv_have_decl_getline = no; then
20612     HAVE_DECL_GETLINE=0
20613   fi
20614
20615   case "$am_cv_func_working_getline" in
20616     *no)
20617                         REPLACE_GETLINE=1
20618       ;;
20619   esac
20620
20621   if test $REPLACE_GETLINE = 1; then
20622
20623
20624
20625
20626
20627
20628
20629
20630   gl_LIBOBJS="$gl_LIBOBJS getline.$ac_objext"
20631
20632
20633   :
20634
20635   fi
20636
20637
20638
20639
20640
20641           GNULIB_GETLINE=1
20642
20643
20644
20645
20646
20647 $as_echo "#define GNULIB_TEST_GETLINE 1" >>confdefs.h
20648
20649
20650
20651
20652
20653
20654
20655
20656   if test $REPLACE_GETOPT = 1; then
20657
20658
20659
20660
20661
20662
20663
20664
20665   gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
20666
20667
20668
20669
20670
20671
20672
20673
20674
20675   gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
20676
20677
20678
20679
20680         GNULIB_GL_UNISTD_H_GETOPT=1
20681   fi
20682
20683
20684
20685 $as_echo "#define GNULIB_TEST_GETOPT_GNU 1" >>confdefs.h
20686
20687
20688
20689
20690
20691
20692
20693     REPLACE_GETOPT=1
20694
20695   if test $REPLACE_GETOPT = 1; then
20696
20697   GETOPT_H=getopt.h
20698
20699 $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
20700
20701
20702
20703   fi
20704
20705   if test $REPLACE_GETOPT = 1; then
20706
20707
20708
20709
20710
20711
20712
20713
20714   gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
20715
20716
20717
20718
20719
20720
20721
20722
20723
20724   gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
20725
20726
20727
20728
20729         GNULIB_GL_UNISTD_H_GETOPT=1
20730   fi
20731
20732
20733
20734
20735   for ac_func in getpagesize
20736 do :
20737   ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
20738 if test "x$ac_cv_func_getpagesize" = xyes; then :
20739   cat >>confdefs.h <<_ACEOF
20740 #define HAVE_GETPAGESIZE 1
20741 _ACEOF
20742
20743 fi
20744 done
20745
20746   if test $ac_cv_func_getpagesize = no; then
20747     HAVE_GETPAGESIZE=0
20748     for ac_header in OS.h
20749 do :
20750   ac_fn_c_check_header_mongrel "$LINENO" "OS.h" "ac_cv_header_OS_h" "$ac_includes_default"
20751 if test "x$ac_cv_header_OS_h" = xyes; then :
20752   cat >>confdefs.h <<_ACEOF
20753 #define HAVE_OS_H 1
20754 _ACEOF
20755
20756 fi
20757
20758 done
20759
20760     if test $ac_cv_header_OS_h = yes; then
20761       HAVE_OS_H=1
20762     fi
20763     for ac_header in sys/param.h
20764 do :
20765   ac_fn_c_check_header_mongrel "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default"
20766 if test "x$ac_cv_header_sys_param_h" = xyes; then :
20767   cat >>confdefs.h <<_ACEOF
20768 #define HAVE_SYS_PARAM_H 1
20769 _ACEOF
20770
20771 fi
20772
20773 done
20774
20775     if test $ac_cv_header_sys_param_h = yes; then
20776       HAVE_SYS_PARAM_H=1
20777     fi
20778   fi
20779   case "$host_os" in
20780     mingw*)
20781       REPLACE_GETPAGESIZE=1
20782       ;;
20783   esac
20784       ac_fn_c_check_decl "$LINENO" "getpagesize" "ac_cv_have_decl_getpagesize" "$ac_includes_default"
20785 if test "x$ac_cv_have_decl_getpagesize" = xyes; then :
20786
20787 else
20788   HAVE_DECL_GETPAGESIZE=0
20789 fi
20790
20791
20792   if test $REPLACE_GETPAGESIZE = 1; then
20793
20794
20795
20796
20797
20798
20799
20800
20801   gl_LIBOBJS="$gl_LIBOBJS getpagesize.$ac_objext"
20802
20803   fi
20804
20805
20806
20807
20808
20809           GNULIB_GETPAGESIZE=1
20810
20811
20812
20813
20814
20815 $as_echo "#define GNULIB_TEST_GETPAGESIZE 1" >>confdefs.h
20816
20817
20818
20819
20820
20821
20822
20823
20824
20825
20826
20827
20828
20829
20830
20831
20832
20833   gl_gettimeofday_timezone=void
20834   if test $ac_cv_func_gettimeofday != yes; then
20835     HAVE_GETTIMEOFDAY=0
20836   else
20837
20838
20839
20840  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5
20841 $as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; }
20842 if ${gl_cv_func_gettimeofday_clobber+:} false; then :
20843   $as_echo_n "(cached) " >&6
20844 else
20845   if test "$cross_compiling" = yes; then :
20846   # When cross-compiling:
20847       case "$host_os" in
20848                 # Guess all is fine on glibc systems.
20849         *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
20850                 # If we don't know, assume the worst.
20851         *)      gl_cv_func_gettimeofday_clobber="guessing yes" ;;
20852       esac
20853
20854 else
20855   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20856 /* end confdefs.h.  */
20857 #include <string.h>
20858           #include <sys/time.h>
20859           #include <time.h>
20860           #include <stdlib.h>
20861
20862 int
20863 main ()
20864 {
20865
20866           time_t t = 0;
20867           struct tm *lt;
20868           struct tm saved_lt;
20869           struct timeval tv;
20870           lt = localtime (&t);
20871           saved_lt = *lt;
20872           gettimeofday (&tv, NULL);
20873           return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
20874
20875   ;
20876   return 0;
20877 }
20878 _ACEOF
20879 if ac_fn_c_try_run "$LINENO"; then :
20880   gl_cv_func_gettimeofday_clobber=no
20881 else
20882   gl_cv_func_gettimeofday_clobber=yes
20883 fi
20884 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20885   conftest.$ac_objext conftest.beam conftest.$ac_ext
20886 fi
20887
20888 fi
20889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5
20890 $as_echo "$gl_cv_func_gettimeofday_clobber" >&6; }
20891
20892  case "$gl_cv_func_gettimeofday_clobber" in
20893    *yes)
20894      REPLACE_GETTIMEOFDAY=1
20895
20896
20897 $as_echo "#define gmtime rpl_gmtime" >>confdefs.h
20898
20899
20900 $as_echo "#define localtime rpl_localtime" >>confdefs.h
20901
20902
20903
20904 $as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
20905
20906      ;;
20907  esac
20908
20909     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
20910 $as_echo_n "checking for gettimeofday with POSIX signature... " >&6; }
20911 if ${gl_cv_func_gettimeofday_posix_signature+:} false; then :
20912   $as_echo_n "(cached) " >&6
20913 else
20914   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20915 /* end confdefs.h.  */
20916 #include <sys/time.h>
20917               struct timeval c;
20918               int gettimeofday (struct timeval *restrict, void *restrict);
20919
20920 int
20921 main ()
20922 {
20923 /* glibc uses struct timezone * rather than the POSIX void *
20924                  if _GNU_SOURCE is defined.  However, since the only portable
20925                  use of gettimeofday uses NULL as the second parameter, and
20926                  since the glibc definition is actually more typesafe, it is
20927                  not worth wrapping this to get a compliant signature.  */
20928               int (*f) (struct timeval *restrict, void *restrict)
20929                 = gettimeofday;
20930               int x = f (&c, 0);
20931               return !(x | c.tv_sec | c.tv_usec);
20932
20933   ;
20934   return 0;
20935 }
20936 _ACEOF
20937 if ac_fn_c_try_compile "$LINENO"; then :
20938   gl_cv_func_gettimeofday_posix_signature=yes
20939 else
20940   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20941 /* end confdefs.h.  */
20942 #include <sys/time.h>
20943 int gettimeofday (struct timeval *restrict, struct timezone *restrict);
20944
20945 int
20946 main ()
20947 {
20948
20949   ;
20950   return 0;
20951 }
20952 _ACEOF
20953 if ac_fn_c_try_compile "$LINENO"; then :
20954   gl_cv_func_gettimeofday_posix_signature=almost
20955 else
20956   gl_cv_func_gettimeofday_posix_signature=no
20957 fi
20958 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20959 fi
20960 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20961 fi
20962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
20963 $as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; }
20964     if test $gl_cv_func_gettimeofday_posix_signature = almost; then
20965       gl_gettimeofday_timezone='struct timezone'
20966     elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
20967       REPLACE_GETTIMEOFDAY=1
20968     fi
20969         if test $REPLACE_STRUCT_TIMEVAL = 1; then
20970       REPLACE_GETTIMEOFDAY=1
20971     fi
20972
20973   fi
20974
20975 cat >>confdefs.h <<_ACEOF
20976 #define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone
20977 _ACEOF
20978
20979
20980   if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
20981
20982
20983
20984
20985
20986
20987
20988
20989   gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
20990
20991
20992   for ac_header in sys/timeb.h
20993 do :
20994   ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
20995 if test "x$ac_cv_header_sys_timeb_h" = xyes; then :
20996   cat >>confdefs.h <<_ACEOF
20997 #define HAVE_SYS_TIMEB_H 1
20998 _ACEOF
20999
21000 fi
21001
21002 done
21003
21004   for ac_func in _ftime
21005 do :
21006   ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
21007 if test "x$ac_cv_func__ftime" = xyes; then :
21008   cat >>confdefs.h <<_ACEOF
21009 #define HAVE__FTIME 1
21010 _ACEOF
21011
21012 fi
21013 done
21014
21015
21016   fi
21017
21018
21019
21020
21021
21022           GNULIB_GETTIMEOFDAY=1
21023
21024
21025
21026
21027
21028 $as_echo "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h
21029
21030
21031
21032
21033   :
21034
21035
21036
21037
21038   :
21039
21040   :
21041   :
21042   :
21043   :
21044
21045
21046
21047
21048
21049
21050   PRIPTR_PREFIX=
21051   if test -n "$STDINT_H"; then
21052         PRIPTR_PREFIX='"l"'
21053   else
21054         for glpfx in '' l ll I64; do
21055       case $glpfx in
21056         '')  gltype1='int';;
21057         l)   gltype1='long int';;
21058         ll)  gltype1='long long int';;
21059         I64) gltype1='__int64';;
21060       esac
21061       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21062 /* end confdefs.h.  */
21063 #include <stdint.h>
21064            extern intptr_t foo;
21065            extern $gltype1 foo;
21066 int
21067 main ()
21068 {
21069
21070   ;
21071   return 0;
21072 }
21073 _ACEOF
21074 if ac_fn_c_try_compile "$LINENO"; then :
21075   PRIPTR_PREFIX='"'$glpfx'"'
21076 fi
21077 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21078       test -n "$PRIPTR_PREFIX" && break
21079     done
21080   fi
21081
21082
21083
21084   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT32_MAX < INTMAX_MAX" >&5
21085 $as_echo_n "checking whether INT32_MAX < INTMAX_MAX... " >&6; }
21086 if ${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+:} false; then :
21087   $as_echo_n "(cached) " >&6
21088 else
21089   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21090 /* end confdefs.h.  */
21091 /* Work also in C++ mode.  */
21092             #define __STDC_LIMIT_MACROS 1
21093
21094             /* Work if build is not clean.  */
21095             #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
21096
21097             #include <limits.h>
21098             #if HAVE_STDINT_H
21099              #include <stdint.h>
21100             #endif
21101
21102             #if defined INT32_MAX && defined INTMAX_MAX
21103              #define CONDITION (INT32_MAX < INTMAX_MAX)
21104             #elif HAVE_LONG_LONG_INT
21105              #define CONDITION (sizeof (int) < sizeof (long long int))
21106             #else
21107              #define CONDITION 0
21108             #endif
21109             int test[CONDITION ? 1 : -1];
21110 int
21111 main ()
21112 {
21113
21114   ;
21115   return 0;
21116 }
21117 _ACEOF
21118 if ac_fn_c_try_compile "$LINENO"; then :
21119   gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes
21120 else
21121   gl_cv_test_INT32_MAX_LT_INTMAX_MAX=no
21122 fi
21123 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21124 fi
21125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&5
21126 $as_echo "$gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&6; }
21127   if test $gl_cv_test_INT32_MAX_LT_INTMAX_MAX = yes; then
21128     INT32_MAX_LT_INTMAX_MAX=1;
21129   else
21130     INT32_MAX_LT_INTMAX_MAX=0;
21131   fi
21132
21133
21134   if test $APPLE_UNIVERSAL_BUILD = 0; then
21135
21136   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT64_MAX == LONG_MAX" >&5
21137 $as_echo_n "checking whether INT64_MAX == LONG_MAX... " >&6; }
21138 if ${gl_cv_test_INT64_MAX_EQ_LONG_MAX+:} false; then :
21139   $as_echo_n "(cached) " >&6
21140 else
21141   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21142 /* end confdefs.h.  */
21143 /* Work also in C++ mode.  */
21144             #define __STDC_LIMIT_MACROS 1
21145
21146             /* Work if build is not clean.  */
21147             #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
21148
21149             #include <limits.h>
21150             #if HAVE_STDINT_H
21151              #include <stdint.h>
21152             #endif
21153
21154             #if defined INT64_MAX
21155              #define CONDITION (INT64_MAX == LONG_MAX)
21156             #elif HAVE_LONG_LONG_INT
21157              #define CONDITION (sizeof (long long int) == sizeof (long int))
21158             #else
21159              #define CONDITION 0
21160             #endif
21161             int test[CONDITION ? 1 : -1];
21162 int
21163 main ()
21164 {
21165
21166   ;
21167   return 0;
21168 }
21169 _ACEOF
21170 if ac_fn_c_try_compile "$LINENO"; then :
21171   gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes
21172 else
21173   gl_cv_test_INT64_MAX_EQ_LONG_MAX=no
21174 fi
21175 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21176 fi
21177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&5
21178 $as_echo "$gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&6; }
21179   if test $gl_cv_test_INT64_MAX_EQ_LONG_MAX = yes; then
21180     INT64_MAX_EQ_LONG_MAX=1;
21181   else
21182     INT64_MAX_EQ_LONG_MAX=0;
21183   fi
21184
21185
21186   else
21187     INT64_MAX_EQ_LONG_MAX=-1
21188   fi
21189
21190   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT32_MAX < UINTMAX_MAX" >&5
21191 $as_echo_n "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; }
21192 if ${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+:} false; then :
21193   $as_echo_n "(cached) " >&6
21194 else
21195   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21196 /* end confdefs.h.  */
21197 /* Work also in C++ mode.  */
21198             #define __STDC_LIMIT_MACROS 1
21199
21200             /* Work if build is not clean.  */
21201             #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
21202
21203             #include <limits.h>
21204             #if HAVE_STDINT_H
21205              #include <stdint.h>
21206             #endif
21207
21208             #if defined UINT32_MAX && defined UINTMAX_MAX
21209              #define CONDITION (UINT32_MAX < UINTMAX_MAX)
21210             #elif HAVE_LONG_LONG_INT
21211              #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int))
21212             #else
21213              #define CONDITION 0
21214             #endif
21215             int test[CONDITION ? 1 : -1];
21216 int
21217 main ()
21218 {
21219
21220   ;
21221   return 0;
21222 }
21223 _ACEOF
21224 if ac_fn_c_try_compile "$LINENO"; then :
21225   gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes
21226 else
21227   gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=no
21228 fi
21229 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21230 fi
21231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&5
21232 $as_echo "$gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&6; }
21233   if test $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX = yes; then
21234     UINT32_MAX_LT_UINTMAX_MAX=1;
21235   else
21236     UINT32_MAX_LT_UINTMAX_MAX=0;
21237   fi
21238
21239
21240   if test $APPLE_UNIVERSAL_BUILD = 0; then
21241
21242   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT64_MAX == ULONG_MAX" >&5
21243 $as_echo_n "checking whether UINT64_MAX == ULONG_MAX... " >&6; }
21244 if ${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+:} false; then :
21245   $as_echo_n "(cached) " >&6
21246 else
21247   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21248 /* end confdefs.h.  */
21249 /* Work also in C++ mode.  */
21250             #define __STDC_LIMIT_MACROS 1
21251
21252             /* Work if build is not clean.  */
21253             #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
21254
21255             #include <limits.h>
21256             #if HAVE_STDINT_H
21257              #include <stdint.h>
21258             #endif
21259
21260             #if defined UINT64_MAX
21261              #define CONDITION (UINT64_MAX == ULONG_MAX)
21262             #elif HAVE_LONG_LONG_INT
21263              #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int))
21264             #else
21265              #define CONDITION 0
21266             #endif
21267             int test[CONDITION ? 1 : -1];
21268 int
21269 main ()
21270 {
21271
21272   ;
21273   return 0;
21274 }
21275 _ACEOF
21276 if ac_fn_c_try_compile "$LINENO"; then :
21277   gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes
21278 else
21279   gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=no
21280 fi
21281 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21282 fi
21283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&5
21284 $as_echo "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; }
21285   if test $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX = yes; then
21286     UINT64_MAX_EQ_ULONG_MAX=1;
21287   else
21288     UINT64_MAX_EQ_ULONG_MAX=0;
21289   fi
21290
21291
21292   else
21293     UINT64_MAX_EQ_ULONG_MAX=-1
21294   fi
21295
21296
21297
21298
21299
21300
21301
21302
21303   ac_fn_c_check_decl "$LINENO" "iswblank" "ac_cv_have_decl_iswblank" "
21304 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
21305    <wchar.h>.
21306    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
21307    before <wchar.h>.  */
21308 #include <stddef.h>
21309 #include <stdio.h>
21310 #include <time.h>
21311 #include <wchar.h>
21312 #include <wctype.h>
21313
21314 "
21315 if test "x$ac_cv_have_decl_iswblank" = xyes; then :
21316   ac_have_decl=1
21317 else
21318   ac_have_decl=0
21319 fi
21320
21321 cat >>confdefs.h <<_ACEOF
21322 #define HAVE_DECL_ISWBLANK $ac_have_decl
21323 _ACEOF
21324
21325   if test $ac_cv_func_iswblank = no; then
21326     HAVE_ISWBLANK=0
21327     if test $ac_cv_have_decl_iswblank = yes; then
21328       REPLACE_ISWBLANK=1
21329     fi
21330   fi
21331   if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
21332         :
21333   else
21334     if test $HAVE_ISWBLANK = 0 || test $REPLACE_ISWBLANK = 1; then
21335             :
21336     fi
21337   fi
21338
21339
21340   if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
21341     :
21342   else
21343     if test $HAVE_ISWBLANK = 0 || test $REPLACE_ISWBLANK = 1; then
21344
21345
21346
21347
21348
21349
21350
21351
21352   gl_LIBOBJS="$gl_LIBOBJS iswblank.$ac_objext"
21353
21354     fi
21355   fi
21356
21357
21358
21359
21360
21361           GNULIB_ISWBLANK=1
21362
21363
21364
21365
21366
21367 $as_echo "#define GNULIB_TEST_ISWBLANK 1" >>confdefs.h
21368
21369
21370
21371
21372
21373
21374
21375
21376
21377
21378
21379
21380
21381
21382
21383
21384
21385      if test $gl_cv_have_include_next = yes; then
21386        gl_cv_next_langinfo_h='<'langinfo.h'>'
21387      else
21388        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <langinfo.h>" >&5
21389 $as_echo_n "checking absolute name of <langinfo.h>... " >&6; }
21390 if ${gl_cv_next_langinfo_h+:} false; then :
21391   $as_echo_n "(cached) " >&6
21392 else
21393
21394              if test $ac_cv_header_langinfo_h = yes; then
21395
21396
21397                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21398 /* end confdefs.h.  */
21399 #include <langinfo.h>
21400
21401 _ACEOF
21402                                                                                                                         case "$host_os" in
21403                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
21404                  *)    gl_absname_cpp="$ac_cpp" ;;
21405                esac
21406
21407                case "$host_os" in
21408                  mingw*)
21409                                                                                                                                      gl_dirsep_regex='[/\\]'
21410                    ;;
21411                  *)
21412                    gl_dirsep_regex='\/'
21413                    ;;
21414                esac
21415                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21416
21417                gl_header_literal_regex=`echo 'langinfo.h' \
21418                                         | sed -e "$gl_make_literal_regex_sed"`
21419                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21420                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21421                    s|^/[^/]|//&|
21422                    p
21423                    q
21424                  }'
21425                                                             gl_cv_next_langinfo_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21426                       sed -n "$gl_absolute_header_sed"`'"'
21427           else
21428                gl_cv_next_langinfo_h='<'langinfo.h'>'
21429              fi
21430
21431
21432 fi
21433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_langinfo_h" >&5
21434 $as_echo "$gl_cv_next_langinfo_h" >&6; }
21435      fi
21436      NEXT_LANGINFO_H=$gl_cv_next_langinfo_h
21437
21438      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21439        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21440        gl_next_as_first_directive='<'langinfo.h'>'
21441      else
21442        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21443        gl_next_as_first_directive=$gl_cv_next_langinfo_h
21444      fi
21445      NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H=$gl_next_as_first_directive
21446
21447
21448
21449
21450
21451     HAVE_LANGINFO_CODESET=0
21452   HAVE_LANGINFO_T_FMT_AMPM=0
21453   HAVE_LANGINFO_ERA=0
21454   HAVE_LANGINFO_YESEXPR=0
21455
21456   if test $ac_cv_header_langinfo_h = yes; then
21457     HAVE_LANGINFO_H=1
21458             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines CODESET" >&5
21459 $as_echo_n "checking whether langinfo.h defines CODESET... " >&6; }
21460 if ${gl_cv_header_langinfo_codeset+:} false; then :
21461   $as_echo_n "(cached) " >&6
21462 else
21463   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21464 /* end confdefs.h.  */
21465 #include <langinfo.h>
21466 int a = CODESET;
21467
21468 int
21469 main ()
21470 {
21471
21472   ;
21473   return 0;
21474 }
21475 _ACEOF
21476 if ac_fn_c_try_compile "$LINENO"; then :
21477   gl_cv_header_langinfo_codeset=yes
21478 else
21479   gl_cv_header_langinfo_codeset=no
21480 fi
21481 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21482
21483 fi
21484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_codeset" >&5
21485 $as_echo "$gl_cv_header_langinfo_codeset" >&6; }
21486     if test $gl_cv_header_langinfo_codeset = yes; then
21487       HAVE_LANGINFO_CODESET=1
21488     fi
21489     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines T_FMT_AMPM" >&5
21490 $as_echo_n "checking whether langinfo.h defines T_FMT_AMPM... " >&6; }
21491 if ${gl_cv_header_langinfo_t_fmt_ampm+:} false; then :
21492   $as_echo_n "(cached) " >&6
21493 else
21494   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21495 /* end confdefs.h.  */
21496 #include <langinfo.h>
21497 int a = T_FMT_AMPM;
21498
21499 int
21500 main ()
21501 {
21502
21503   ;
21504   return 0;
21505 }
21506 _ACEOF
21507 if ac_fn_c_try_compile "$LINENO"; then :
21508   gl_cv_header_langinfo_t_fmt_ampm=yes
21509 else
21510   gl_cv_header_langinfo_t_fmt_ampm=no
21511 fi
21512 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21513
21514 fi
21515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_t_fmt_ampm" >&5
21516 $as_echo "$gl_cv_header_langinfo_t_fmt_ampm" >&6; }
21517     if test $gl_cv_header_langinfo_t_fmt_ampm = yes; then
21518       HAVE_LANGINFO_T_FMT_AMPM=1
21519     fi
21520     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines ERA" >&5
21521 $as_echo_n "checking whether langinfo.h defines ERA... " >&6; }
21522 if ${gl_cv_header_langinfo_era+:} false; then :
21523   $as_echo_n "(cached) " >&6
21524 else
21525   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21526 /* end confdefs.h.  */
21527 #include <langinfo.h>
21528 int a = ERA;
21529
21530 int
21531 main ()
21532 {
21533
21534   ;
21535   return 0;
21536 }
21537 _ACEOF
21538 if ac_fn_c_try_compile "$LINENO"; then :
21539   gl_cv_header_langinfo_era=yes
21540 else
21541   gl_cv_header_langinfo_era=no
21542 fi
21543 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21544
21545 fi
21546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_era" >&5
21547 $as_echo "$gl_cv_header_langinfo_era" >&6; }
21548     if test $gl_cv_header_langinfo_era = yes; then
21549       HAVE_LANGINFO_ERA=1
21550     fi
21551     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines YESEXPR" >&5
21552 $as_echo_n "checking whether langinfo.h defines YESEXPR... " >&6; }
21553 if ${gl_cv_header_langinfo_yesexpr+:} false; then :
21554   $as_echo_n "(cached) " >&6
21555 else
21556   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21557 /* end confdefs.h.  */
21558 #include <langinfo.h>
21559 int a = YESEXPR;
21560
21561 int
21562 main ()
21563 {
21564
21565   ;
21566   return 0;
21567 }
21568 _ACEOF
21569 if ac_fn_c_try_compile "$LINENO"; then :
21570   gl_cv_header_langinfo_yesexpr=yes
21571 else
21572   gl_cv_header_langinfo_yesexpr=no
21573 fi
21574 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21575
21576 fi
21577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_yesexpr" >&5
21578 $as_echo "$gl_cv_header_langinfo_yesexpr" >&6; }
21579     if test $gl_cv_header_langinfo_yesexpr = yes; then
21580       HAVE_LANGINFO_YESEXPR=1
21581     fi
21582   else
21583     HAVE_LANGINFO_H=0
21584   fi
21585
21586
21587
21588
21589
21590
21591
21592     for gl_func in nl_langinfo; do
21593     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
21594     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
21595 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
21596 if eval \${$as_gl_Symbol+:} false; then :
21597   $as_echo_n "(cached) " >&6
21598 else
21599   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21600 /* end confdefs.h.  */
21601 #include <langinfo.h>
21602
21603 int
21604 main ()
21605 {
21606 #undef $gl_func
21607   (void) $gl_func;
21608   ;
21609   return 0;
21610 }
21611 _ACEOF
21612 if ac_fn_c_try_compile "$LINENO"; then :
21613   eval "$as_gl_Symbol=yes"
21614 else
21615   eval "$as_gl_Symbol=no"
21616 fi
21617 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21618 fi
21619 eval ac_res=\$$as_gl_Symbol
21620                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
21621 $as_echo "$ac_res" >&6; }
21622     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
21623   cat >>confdefs.h <<_ACEOF
21624 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
21625 _ACEOF
21626
21627                      eval ac_cv_have_decl_$gl_func=yes
21628 fi
21629       done
21630
21631
21632
21633
21634
21635
21636
21637   for ac_func in lchown
21638 do :
21639   ac_fn_c_check_func "$LINENO" "lchown" "ac_cv_func_lchown"
21640 if test "x$ac_cv_func_lchown" = xyes; then :
21641   cat >>confdefs.h <<_ACEOF
21642 #define HAVE_LCHOWN 1
21643 _ACEOF
21644
21645 fi
21646 done
21647
21648   if test $ac_cv_func_lchown = no; then
21649     HAVE_LCHOWN=0
21650   else
21651         case "$gl_cv_func_chown_slash_works" in
21652       *yes) ;;
21653       *)
21654         REPLACE_LCHOWN=1
21655         ;;
21656     esac
21657     case "$gl_cv_func_chown_ctime_works" in
21658       *yes) ;;
21659       *)
21660         REPLACE_LCHOWN=1
21661         ;;
21662     esac
21663   fi
21664
21665   if test $HAVE_LCHOWN = 0 || test $REPLACE_LCHOWN = 1; then
21666
21667
21668
21669
21670
21671
21672
21673
21674   gl_LIBOBJS="$gl_LIBOBJS lchown.$ac_objext"
21675
21676   fi
21677
21678
21679
21680
21681
21682           GNULIB_LCHOWN=1
21683
21684
21685
21686
21687
21688 $as_echo "#define GNULIB_TEST_LCHOWN 1" >>confdefs.h
21689
21690
21691
21692
21693
21694
21695   if test $ac_cv_func_link = no; then
21696     HAVE_LINK=0
21697   else
21698     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether link obeys POSIX" >&5
21699 $as_echo_n "checking whether link obeys POSIX... " >&6; }
21700 if ${gl_cv_func_link_works+:} false; then :
21701   $as_echo_n "(cached) " >&6
21702 else
21703   touch conftest.a
21704        # Assume that if we have lstat, we can also check symlinks.
21705        if test $ac_cv_func_lstat = yes; then
21706          ln -s conftest.a conftest.lnk
21707        fi
21708        if test "$cross_compiling" = yes; then :
21709   case "$host_os" in
21710                     # Guess yes on glibc systems.
21711             *-gnu*) gl_cv_func_link_works="guessing yes" ;;
21712                     # If we don't know, assume the worst.
21713             *)      gl_cv_func_link_works="guessing no" ;;
21714           esac
21715
21716 else
21717   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21718 /* end confdefs.h.  */
21719 #include <unistd.h>
21720
21721 int
21722 main ()
21723 {
21724 int result = 0;
21725              if (!link ("conftest.a", "conftest.b/"))
21726                result |= 1;
21727 #if HAVE_LSTAT
21728              if (!link ("conftest.lnk/", "conftest.b"))
21729                result |= 2;
21730              if (rename ("conftest.a", "conftest.b"))
21731                result |= 4;
21732              if (!link ("conftest.b", "conftest.lnk"))
21733                result |= 8;
21734 #endif
21735              return result;
21736
21737   ;
21738   return 0;
21739 }
21740 _ACEOF
21741 if ac_fn_c_try_run "$LINENO"; then :
21742   gl_cv_func_link_works=yes
21743 else
21744   gl_cv_func_link_works=no
21745 fi
21746 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21747   conftest.$ac_objext conftest.beam conftest.$ac_ext
21748 fi
21749
21750        rm -f conftest.a conftest.b conftest.lnk
21751 fi
21752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_link_works" >&5
21753 $as_echo "$gl_cv_func_link_works" >&6; }
21754     case "$gl_cv_func_link_works" in
21755       *yes) ;;
21756       *)
21757         REPLACE_LINK=1
21758         ;;
21759     esac
21760   fi
21761
21762   if test $HAVE_LINK = 0 || test $REPLACE_LINK = 1; then
21763
21764
21765
21766
21767
21768
21769
21770
21771   gl_LIBOBJS="$gl_LIBOBJS link.$ac_objext"
21772
21773   fi
21774
21775
21776
21777
21778
21779           GNULIB_LINK=1
21780
21781
21782
21783
21784
21785 $as_echo "#define GNULIB_TEST_LINK 1" >>confdefs.h
21786
21787
21788
21789
21790           gl_link_follows_symlinks=0 # assume GNU behavior
21791   if test $ac_cv_func_readlink = yes; then
21792                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __xpg4" >&5
21793 $as_echo_n "checking for __xpg4... " >&6; }
21794 if ${gl_cv_have___xpg4+:} false; then :
21795   $as_echo_n "(cached) " >&6
21796 else
21797   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21798 /* end confdefs.h.  */
21799 extern int __xpg4;
21800 int
21801 main ()
21802 {
21803 return __xpg4;
21804   ;
21805   return 0;
21806 }
21807 _ACEOF
21808 if ac_fn_c_try_link "$LINENO"; then :
21809   gl_cv_have___xpg4=yes
21810 else
21811   gl_cv_have___xpg4=no
21812 fi
21813 rm -f core conftest.err conftest.$ac_objext \
21814     conftest$ac_exeext conftest.$ac_ext
21815
21816 fi
21817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have___xpg4" >&5
21818 $as_echo "$gl_cv_have___xpg4" >&6; }
21819     if test $gl_cv_have___xpg4 = yes; then
21820       gl_link_follows_symlinks=-1
21821     else
21822       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether link(2) dereferences a symlink" >&5
21823 $as_echo_n "checking whether link(2) dereferences a symlink... " >&6; }
21824 if ${gl_cv_func_link_follows_symlink+:} false; then :
21825   $as_echo_n "(cached) " >&6
21826 else
21827
21828          # Create a regular file.
21829          echo > conftest.file
21830          if test "$cross_compiling" = yes; then :
21831                                                  case "$host_os" in
21832                            # On glibc/Linux we know the result.
21833               linux*-gnu*) gl_cv_func_link_follows_symlink="guessing no" ;;
21834                            # Otherwise, we don't know.
21835               *)           gl_cv_func_link_follows_symlink=unknown ;;
21836             esac
21837
21838 else
21839   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21840 /* end confdefs.h.  */
21841
21842 #       include <sys/types.h>
21843 #       include <sys/stat.h>
21844 #       include <unistd.h>
21845 #       include <stdlib.h>
21846
21847 #       define SAME_INODE(Stat_buf_1, Stat_buf_2) \
21848           ((Stat_buf_1).st_ino == (Stat_buf_2).st_ino \
21849            && (Stat_buf_1).st_dev == (Stat_buf_2).st_dev)
21850
21851         int
21852         main ()
21853         {
21854           const char *file = "conftest.file";
21855           const char *sym = "conftest.sym";
21856           const char *hard = "conftest.hard";
21857           struct stat sb_file, sb_hard;
21858
21859           /* Create a symlink to the regular file. */
21860           if (symlink (file, sym))
21861             return 2;
21862
21863           /* Create a hard link to that symlink.  */
21864           if (link (sym, hard))
21865             return 3;
21866
21867           if (lstat (hard, &sb_hard))
21868             return 4;
21869           if (lstat (file, &sb_file))
21870             return 5;
21871
21872           /* If the dev/inode of hard and file are the same, then
21873              the link call followed the symlink.  */
21874           return SAME_INODE (sb_hard, sb_file) ? 1 : 0;
21875         }
21876
21877 _ACEOF
21878 if ac_fn_c_try_run "$LINENO"; then :
21879   gl_cv_func_link_follows_symlink=no
21880 else
21881              gl_cv_func_link_follows_symlink=yes
21882 fi
21883 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21884   conftest.$ac_objext conftest.beam conftest.$ac_ext
21885 fi
21886
21887          rm -f conftest.file conftest.sym conftest.hard
21888
21889 fi
21890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_link_follows_symlink" >&5
21891 $as_echo "$gl_cv_func_link_follows_symlink" >&6; }
21892       case "$gl_cv_func_link_follows_symlink" in
21893         *yes) gl_link_follows_symlinks=1 ;;
21894         *no) ;; # already defaulted to 0
21895         *) gl_link_follows_symlinks=-2 ;;
21896       esac
21897     fi
21898   fi
21899
21900 cat >>confdefs.h <<_ACEOF
21901 #define LINK_FOLLOWS_SYMLINKS $gl_link_follows_symlinks
21902 _ACEOF
21903
21904
21905
21906
21907
21908
21909
21910
21911
21912   if test $ac_cv_func_linkat = no; then
21913     HAVE_LINKAT=0
21914   else
21915     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether linkat(,AT_SYMLINK_FOLLOW) works" >&5
21916 $as_echo_n "checking whether linkat(,AT_SYMLINK_FOLLOW) works... " >&6; }
21917 if ${gl_cv_func_linkat_follow+:} false; then :
21918   $as_echo_n "(cached) " >&6
21919 else
21920   rm -rf conftest.f1 conftest.f2
21921        touch conftest.f1
21922        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21923 /* end confdefs.h.  */
21924
21925 #include <fcntl.h>
21926 #include <unistd.h>
21927 #ifdef __linux__
21928 /* Linux added linkat in 2.6.16, but did not add AT_SYMLINK_FOLLOW
21929    until 2.6.18.  Always replace linkat to support older kernels.  */
21930 choke me
21931 #endif
21932
21933 int
21934 main ()
21935 {
21936 return linkat (AT_FDCWD, "conftest.f1", AT_FDCWD, "conftest.f2",
21937                     AT_SYMLINK_FOLLOW);
21938   ;
21939   return 0;
21940 }
21941 _ACEOF
21942 if ac_fn_c_try_compile "$LINENO"; then :
21943   gl_cv_func_linkat_follow=yes
21944 else
21945   gl_cv_func_linkat_follow="need runtime check"
21946 fi
21947 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21948        rm -rf conftest.f1 conftest.f2
21949 fi
21950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_linkat_follow" >&5
21951 $as_echo "$gl_cv_func_linkat_follow" >&6; }
21952     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether linkat handles trailing slash correctly" >&5
21953 $as_echo_n "checking whether linkat handles trailing slash correctly... " >&6; }
21954 if ${gl_cv_func_linkat_slash+:} false; then :
21955   $as_echo_n "(cached) " >&6
21956 else
21957   rm -rf conftest.a conftest.b conftest.c conftest.d
21958        if test "$cross_compiling" = yes; then :
21959   # Guess yes on glibc systems, no otherwise.
21960           case "$host_os" in
21961             *-gnu*) gl_cv_func_linkat_slash="guessing yes";;
21962             *)      gl_cv_func_linkat_slash="guessing no";;
21963           esac
21964
21965 else
21966   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21967 /* end confdefs.h.  */
21968 #include <unistd.h>
21969               #include <fcntl.h>
21970               #include <errno.h>
21971               #include <stdio.h>
21972
21973 int
21974 main ()
21975 {
21976 int result;
21977               int fd;
21978               /* Create a regular file.  */
21979               fd = open ("conftest.a", O_CREAT | O_EXCL | O_WRONLY, 0600);
21980               if (fd < 0)
21981                 return 1;
21982               if (write (fd, "hello", 5) < 5)
21983                 return 2;
21984               if (close (fd) < 0)
21985                 return 3;
21986               /* Test whether hard links are supported on the current
21987                  device.  */
21988               if (linkat (AT_FDCWD, "conftest.a", AT_FDCWD, "conftest.b",
21989                           AT_SYMLINK_FOLLOW) < 0)
21990                 return 0;
21991               result = 0;
21992               /* Test whether a trailing "/" is treated like "/.".  */
21993               if (linkat (AT_FDCWD, "conftest.a/", AT_FDCWD, "conftest.c",
21994                           AT_SYMLINK_FOLLOW) == 0)
21995                 result |= 4;
21996               if (linkat (AT_FDCWD, "conftest.a", AT_FDCWD, "conftest.d/",
21997                           AT_SYMLINK_FOLLOW) == 0)
21998                 result |= 8;
21999               return result;
22000
22001   ;
22002   return 0;
22003 }
22004 _ACEOF
22005 if ac_fn_c_try_run "$LINENO"; then :
22006   gl_cv_func_linkat_slash=yes
22007 else
22008   gl_cv_func_linkat_slash=no
22009 fi
22010 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22011   conftest.$ac_objext conftest.beam conftest.$ac_ext
22012 fi
22013
22014        rm -rf conftest.a conftest.b conftest.c conftest.d
22015 fi
22016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_linkat_slash" >&5
22017 $as_echo "$gl_cv_func_linkat_slash" >&6; }
22018     case "$gl_cv_func_linkat_slash" in
22019       *yes) gl_linkat_slash_bug=0 ;;
22020       *)    gl_linkat_slash_bug=1 ;;
22021     esac
22022     if test "$gl_cv_func_linkat_follow" != yes \
22023        || test $gl_linkat_slash_bug = 1; then
22024       REPLACE_LINKAT=1
22025
22026 cat >>confdefs.h <<_ACEOF
22027 #define LINKAT_TRAILING_SLASH_BUG $gl_linkat_slash_bug
22028 _ACEOF
22029
22030     fi
22031   fi
22032
22033   if test $HAVE_LINKAT = 0 || test $REPLACE_LINKAT = 1; then
22034
22035
22036
22037
22038
22039
22040
22041
22042   gl_LIBOBJS="$gl_LIBOBJS linkat.$ac_objext"
22043
22044   fi
22045   if test $HAVE_LINKAT = 0; then
22046
22047
22048
22049
22050
22051
22052
22053
22054   gl_LIBOBJS="$gl_LIBOBJS at-func2.$ac_objext"
22055
22056   fi
22057
22058
22059
22060
22061
22062           GNULIB_LINKAT=1
22063
22064
22065
22066
22067
22068 $as_echo "#define GNULIB_TEST_LINKAT 1" >>confdefs.h
22069
22070
22071
22072
22073
22074
22075
22076
22077
22078
22079
22080   LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(abs_top_builddir)/$gl_source_base\""
22081
22082
22083
22084
22085
22086
22087
22088
22089
22090   case "$host_os" in
22091     solaris*)
22092
22093 $as_echo "#define _LCONV_C99 1" >>confdefs.h
22094
22095       ;;
22096   esac
22097
22098   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h conforms to POSIX:2001" >&5
22099 $as_echo_n "checking whether locale.h conforms to POSIX:2001... " >&6; }
22100 if ${gl_cv_header_locale_h_posix2001+:} false; then :
22101   $as_echo_n "(cached) " >&6
22102 else
22103   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22104 /* end confdefs.h.  */
22105 #include <locale.h>
22106             int x = LC_MESSAGES;
22107             int y = sizeof (((struct lconv *) 0)->decimal_point);
22108 int
22109 main ()
22110 {
22111
22112   ;
22113   return 0;
22114 }
22115 _ACEOF
22116 if ac_fn_c_try_compile "$LINENO"; then :
22117   gl_cv_header_locale_h_posix2001=yes
22118 else
22119   gl_cv_header_locale_h_posix2001=no
22120 fi
22121 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22122 fi
22123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_h_posix2001" >&5
22124 $as_echo "$gl_cv_header_locale_h_posix2001" >&6; }
22125
22126
22127   if test $ac_cv_header_xlocale_h = yes; then
22128     HAVE_XLOCALE_H=1
22129                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h defines locale_t" >&5
22130 $as_echo_n "checking whether locale.h defines locale_t... " >&6; }
22131 if ${gl_cv_header_locale_has_locale_t+:} false; then :
22132   $as_echo_n "(cached) " >&6
22133 else
22134   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22135 /* end confdefs.h.  */
22136 #include <locale.h>
22137               locale_t x;
22138 int
22139 main ()
22140 {
22141
22142   ;
22143   return 0;
22144 }
22145 _ACEOF
22146 if ac_fn_c_try_compile "$LINENO"; then :
22147   gl_cv_header_locale_has_locale_t=yes
22148 else
22149   gl_cv_header_locale_has_locale_t=no
22150 fi
22151 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22152
22153 fi
22154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_has_locale_t" >&5
22155 $as_echo "$gl_cv_header_locale_has_locale_t" >&6; }
22156     if test $gl_cv_header_locale_has_locale_t = yes; then
22157       gl_cv_header_locale_h_needs_xlocale_h=no
22158     else
22159       gl_cv_header_locale_h_needs_xlocale_h=yes
22160     fi
22161   else
22162     HAVE_XLOCALE_H=0
22163     gl_cv_header_locale_h_needs_xlocale_h=no
22164   fi
22165
22166
22167           { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct lconv is properly defined" >&5
22168 $as_echo_n "checking whether struct lconv is properly defined... " >&6; }
22169 if ${gl_cv_sys_struct_lconv_ok+:} false; then :
22170   $as_echo_n "(cached) " >&6
22171 else
22172   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22173 /* end confdefs.h.  */
22174 #include <locale.h>
22175             struct lconv l;
22176             int x = sizeof (l.decimal_point);
22177             int y = sizeof (l.int_p_cs_precedes);
22178 int
22179 main ()
22180 {
22181
22182   ;
22183   return 0;
22184 }
22185 _ACEOF
22186 if ac_fn_c_try_compile "$LINENO"; then :
22187   gl_cv_sys_struct_lconv_ok=yes
22188 else
22189   gl_cv_sys_struct_lconv_ok=no
22190 fi
22191 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22192
22193 fi
22194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_lconv_ok" >&5
22195 $as_echo "$gl_cv_sys_struct_lconv_ok" >&6; }
22196   if test $gl_cv_sys_struct_lconv_ok = no; then
22197     REPLACE_STRUCT_LCONV=1
22198   fi
22199
22200
22201
22202
22203
22204
22205
22206
22207
22208      if test $gl_cv_have_include_next = yes; then
22209        gl_cv_next_locale_h='<'locale.h'>'
22210      else
22211        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <locale.h>" >&5
22212 $as_echo_n "checking absolute name of <locale.h>... " >&6; }
22213 if ${gl_cv_next_locale_h+:} false; then :
22214   $as_echo_n "(cached) " >&6
22215 else
22216
22217                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22218 /* end confdefs.h.  */
22219 #include <locale.h>
22220
22221 _ACEOF
22222                                                                                                                         case "$host_os" in
22223                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
22224                  *)    gl_absname_cpp="$ac_cpp" ;;
22225                esac
22226
22227                case "$host_os" in
22228                  mingw*)
22229                                                                                                                                      gl_dirsep_regex='[/\\]'
22230                    ;;
22231                  *)
22232                    gl_dirsep_regex='\/'
22233                    ;;
22234                esac
22235                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22236
22237                gl_header_literal_regex=`echo 'locale.h' \
22238                                         | sed -e "$gl_make_literal_regex_sed"`
22239                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22240                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22241                    s|^/[^/]|//&|
22242                    p
22243                    q
22244                  }'
22245                                                             gl_cv_next_locale_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22246                       sed -n "$gl_absolute_header_sed"`'"'
22247
22248
22249 fi
22250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_locale_h" >&5
22251 $as_echo "$gl_cv_next_locale_h" >&6; }
22252      fi
22253      NEXT_LOCALE_H=$gl_cv_next_locale_h
22254
22255      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22256        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22257        gl_next_as_first_directive='<'locale.h'>'
22258      else
22259        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22260        gl_next_as_first_directive=$gl_cv_next_locale_h
22261      fi
22262      NEXT_AS_FIRST_DIRECTIVE_LOCALE_H=$gl_next_as_first_directive
22263
22264
22265
22266
22267
22268
22269     for gl_func in setlocale duplocale; do
22270     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
22271     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
22272 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
22273 if eval \${$as_gl_Symbol+:} false; then :
22274   $as_echo_n "(cached) " >&6
22275 else
22276   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22277 /* end confdefs.h.  */
22278 #include <locale.h>
22279 /* Some systems provide declarations in a non-standard header.  */
22280 #if HAVE_XLOCALE_H
22281 # include <xlocale.h>
22282 #endif
22283
22284 int
22285 main ()
22286 {
22287 #undef $gl_func
22288   (void) $gl_func;
22289   ;
22290   return 0;
22291 }
22292 _ACEOF
22293 if ac_fn_c_try_compile "$LINENO"; then :
22294   eval "$as_gl_Symbol=yes"
22295 else
22296   eval "$as_gl_Symbol=no"
22297 fi
22298 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22299 fi
22300 eval ac_res=\$$as_gl_Symbol
22301                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
22302 $as_echo "$ac_res" >&6; }
22303     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
22304   cat >>confdefs.h <<_ACEOF
22305 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
22306 _ACEOF
22307
22308                      eval ac_cv_have_decl_$gl_func=yes
22309 fi
22310       done
22311
22312
22313
22314
22315
22316
22317   if test $REPLACE_STRUCT_LCONV = 1; then
22318     REPLACE_LOCALECONV=1
22319   fi
22320
22321   if test $REPLACE_LOCALECONV = 1; then
22322
22323
22324
22325
22326
22327
22328
22329
22330   gl_LIBOBJS="$gl_LIBOBJS localeconv.$ac_objext"
22331
22332
22333   ac_fn_c_check_member "$LINENO" "struct lconv" "decimal_point" "ac_cv_member_struct_lconv_decimal_point" "#include <locale.h>
22334 "
22335 if test "x$ac_cv_member_struct_lconv_decimal_point" = xyes; then :
22336
22337 cat >>confdefs.h <<_ACEOF
22338 #define HAVE_STRUCT_LCONV_DECIMAL_POINT 1
22339 _ACEOF
22340
22341
22342 fi
22343
22344
22345   fi
22346
22347
22348
22349
22350
22351           GNULIB_LOCALECONV=1
22352
22353
22354
22355
22356
22357 $as_echo "#define GNULIB_TEST_LOCALECONV 1" >>confdefs.h
22358
22359
22360
22361
22362
22363
22364
22365
22366
22367   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lseek detects pipes" >&5
22368 $as_echo_n "checking whether lseek detects pipes... " >&6; }
22369 if ${gl_cv_func_lseek_pipe+:} false; then :
22370   $as_echo_n "(cached) " >&6
22371 else
22372   case "$host_os" in
22373        mingw*)
22374                                                                gl_cv_func_lseek_pipe=no
22375          ;;
22376        *)
22377          if test $cross_compiling = no; then
22378            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22379 /* end confdefs.h.  */
22380
22381 #include <sys/types.h> /* for off_t */
22382 #include <stdio.h> /* for SEEK_CUR */
22383 #if HAVE_UNISTD_H
22384 # include <unistd.h>
22385 #else /* on Windows with MSVC */
22386 # include <io.h>
22387 #endif
22388
22389 int
22390 main ()
22391 {
22392
22393   /* Exit with success only if stdin is seekable.  */
22394   return lseek (0, (off_t)0, SEEK_CUR) < 0;
22395
22396   ;
22397   return 0;
22398 }
22399 _ACEOF
22400 if ac_fn_c_try_link "$LINENO"; then :
22401   if test -s conftest$ac_exeext \
22402                  && ./conftest$ac_exeext < conftest.$ac_ext \
22403                  && test 1 = "`echo hi \
22404                    | { ./conftest$ac_exeext; echo $?; cat >/dev/null; }`"; then
22405                 gl_cv_func_lseek_pipe=yes
22406               else
22407                 gl_cv_func_lseek_pipe=no
22408               fi
22409
22410 else
22411   gl_cv_func_lseek_pipe=no
22412 fi
22413 rm -f core conftest.err conftest.$ac_objext \
22414     conftest$ac_exeext conftest.$ac_ext
22415          else
22416            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22417 /* end confdefs.h.  */
22418
22419 #if defined __BEOS__
22420 /* BeOS mistakenly return 0 when trying to seek on pipes.  */
22421   Choke me.
22422 #endif
22423 _ACEOF
22424 if ac_fn_c_try_compile "$LINENO"; then :
22425   gl_cv_func_lseek_pipe=yes
22426 else
22427   gl_cv_func_lseek_pipe=no
22428 fi
22429 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22430          fi
22431          ;;
22432      esac
22433
22434 fi
22435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lseek_pipe" >&5
22436 $as_echo "$gl_cv_func_lseek_pipe" >&6; }
22437   if test $gl_cv_func_lseek_pipe = no; then
22438     REPLACE_LSEEK=1
22439
22440 $as_echo "#define LSEEK_PIPE_BROKEN 1" >>confdefs.h
22441
22442   fi
22443
22444
22445   if test $WINDOWS_64_BIT_OFF_T = 1; then
22446     REPLACE_LSEEK=1
22447   fi
22448
22449   if test $REPLACE_LSEEK = 1; then
22450
22451
22452
22453
22454
22455
22456
22457
22458   gl_LIBOBJS="$gl_LIBOBJS lseek.$ac_objext"
22459
22460   fi
22461
22462
22463
22464
22465
22466           GNULIB_LSEEK=1
22467
22468
22469
22470
22471
22472 $as_echo "#define GNULIB_TEST_LSEEK 1" >>confdefs.h
22473
22474
22475
22476
22477
22478
22479   if test $ac_cv_func_lstat = yes; then
22480
22481     case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
22482       *no)
22483         REPLACE_LSTAT=1
22484         ;;
22485     esac
22486   else
22487     HAVE_LSTAT=0
22488   fi
22489
22490   if test $REPLACE_LSTAT = 1; then
22491
22492
22493
22494
22495
22496
22497
22498
22499   gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
22500
22501     :
22502   fi
22503
22504
22505
22506
22507
22508           GNULIB_LSTAT=1
22509
22510
22511
22512
22513
22514 $as_echo "#define GNULIB_TEST_LSTAT 1" >>confdefs.h
22515
22516
22517
22518
22519
22520
22521       for ac_header in stdlib.h
22522 do :
22523   ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
22524 if test "x$ac_cv_header_stdlib_h" = xyes; then :
22525   cat >>confdefs.h <<_ACEOF
22526 #define HAVE_STDLIB_H 1
22527 _ACEOF
22528
22529 fi
22530
22531 done
22532
22533   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
22534 $as_echo_n "checking for GNU libc compatible malloc... " >&6; }
22535 if ${ac_cv_func_malloc_0_nonnull+:} false; then :
22536   $as_echo_n "(cached) " >&6
22537 else
22538   if test "$cross_compiling" = yes; then :
22539   case "$host_os" in
22540           # Guess yes on platforms where we know the result.
22541           *-gnu* | freebsd* | netbsd* | openbsd* \
22542           | hpux* | solaris* | cygwin* | mingw*)
22543             ac_cv_func_malloc_0_nonnull=yes ;;
22544           # If we don't know, assume the worst.
22545           *) ac_cv_func_malloc_0_nonnull=no ;;
22546         esac
22547
22548 else
22549   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22550 /* end confdefs.h.  */
22551 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
22552             # include <stdlib.h>
22553             #else
22554             char *malloc ();
22555             #endif
22556
22557 int
22558 main ()
22559 {
22560 return ! malloc (0);
22561   ;
22562   return 0;
22563 }
22564
22565 _ACEOF
22566 if ac_fn_c_try_run "$LINENO"; then :
22567   ac_cv_func_malloc_0_nonnull=yes
22568 else
22569   ac_cv_func_malloc_0_nonnull=no
22570 fi
22571 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22572   conftest.$ac_objext conftest.beam conftest.$ac_ext
22573 fi
22574
22575
22576 fi
22577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
22578 $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
22579   if test $ac_cv_func_malloc_0_nonnull = yes; then :
22580
22581 $as_echo "#define HAVE_MALLOC_GNU 1" >>confdefs.h
22582
22583 else
22584   $as_echo "#define HAVE_MALLOC_GNU 0" >>confdefs.h
22585
22586      REPLACE_MALLOC=1
22587
22588 fi
22589
22590
22591   if test $REPLACE_MALLOC = 1; then
22592
22593
22594
22595
22596
22597
22598
22599
22600   gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
22601
22602   fi
22603
22604
22605 cat >>confdefs.h <<_ACEOF
22606 #define GNULIB_MALLOC_GNU 1
22607 _ACEOF
22608
22609
22610
22611
22612
22613   if test $gl_cv_func_malloc_posix = yes; then
22614
22615 $as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
22616
22617   else
22618     REPLACE_MALLOC=1
22619   fi
22620
22621   if test $REPLACE_MALLOC = 1; then
22622
22623
22624
22625
22626
22627
22628
22629
22630   gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
22631
22632   fi
22633
22634
22635
22636
22637
22638           GNULIB_MALLOC_POSIX=1
22639
22640
22641
22642
22643
22644 $as_echo "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
22645
22646
22647
22648
22649
22650
22651
22652
22653
22654
22655
22656
22657
22658
22659
22660
22661
22662
22663
22664
22665   if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
22666
22667
22668
22669      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
22670 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
22671 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
22672   $as_echo_n "(cached) " >&6
22673 else
22674
22675                   case "$host_os" in
22676                      # Guess no on AIX and OSF/1.
22677         aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
22678                      # Guess yes otherwise.
22679         *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
22680       esac
22681       if test $LOCALE_JA != none; then
22682         if test "$cross_compiling" = yes; then :
22683   :
22684 else
22685   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22686 /* end confdefs.h.  */
22687
22688 #include <locale.h>
22689 #include <string.h>
22690 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22691    <wchar.h>.
22692    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22693    included before <wchar.h>.  */
22694 #include <stddef.h>
22695 #include <stdio.h>
22696 #include <time.h>
22697 #include <wchar.h>
22698 int main ()
22699 {
22700   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
22701     {
22702       const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
22703       mbstate_t state;
22704       wchar_t wc;
22705
22706       memset (&state, '\0', sizeof (mbstate_t));
22707       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
22708         if (mbsinit (&state))
22709           return 1;
22710     }
22711   return 0;
22712 }
22713 _ACEOF
22714 if ac_fn_c_try_run "$LINENO"; then :
22715   gl_cv_func_mbrtowc_incomplete_state=yes
22716 else
22717   gl_cv_func_mbrtowc_incomplete_state=no
22718 fi
22719 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22720   conftest.$ac_objext conftest.beam conftest.$ac_ext
22721 fi
22722
22723       fi
22724
22725 fi
22726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
22727 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
22728
22729
22730
22731
22732      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
22733 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
22734 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
22735   $as_echo_n "(cached) " >&6
22736 else
22737
22738                   case "$host_os" in
22739                     # Guess no on Solaris 8.
22740         solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
22741                     # Guess yes otherwise.
22742         *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
22743       esac
22744       if test $LOCALE_ZH_CN != none; then
22745         if test "$cross_compiling" = yes; then :
22746   :
22747 else
22748   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22749 /* end confdefs.h.  */
22750
22751 #include <locale.h>
22752 #include <stdlib.h>
22753 #include <string.h>
22754 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22755    <wchar.h>.
22756    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22757    included before <wchar.h>.  */
22758 #include <stddef.h>
22759 #include <stdio.h>
22760 #include <time.h>
22761 #include <wchar.h>
22762 int main ()
22763 {
22764   /* This fails on Solaris 8:
22765      mbrtowc returns 2, and sets wc to 0x00F0.
22766      mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
22767   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
22768     {
22769       char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
22770       mbstate_t state;
22771       wchar_t wc;
22772
22773       memset (&state, '\0', sizeof (mbstate_t));
22774       if (mbrtowc (&wc, input + 3, 6, &state) != 4
22775           && mbtowc (&wc, input + 3, 6) == 4)
22776         return 1;
22777     }
22778   return 0;
22779 }
22780 _ACEOF
22781 if ac_fn_c_try_run "$LINENO"; then :
22782   gl_cv_func_mbrtowc_sanitycheck=yes
22783 else
22784   gl_cv_func_mbrtowc_sanitycheck=no
22785 fi
22786 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22787   conftest.$ac_objext conftest.beam conftest.$ac_ext
22788 fi
22789
22790       fi
22791
22792 fi
22793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
22794 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
22795
22796     REPLACE_MBSTATE_T=0
22797     case "$gl_cv_func_mbrtowc_incomplete_state" in
22798       *yes) ;;
22799       *) REPLACE_MBSTATE_T=1 ;;
22800     esac
22801     case "$gl_cv_func_mbrtowc_sanitycheck" in
22802       *yes) ;;
22803       *) REPLACE_MBSTATE_T=1 ;;
22804     esac
22805   else
22806     REPLACE_MBSTATE_T=1
22807   fi
22808
22809
22810
22811   if test $ac_cv_func_mbrtowc = no; then
22812     HAVE_MBRTOWC=0
22813     ac_fn_c_check_decl "$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" "
22814 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22815    <wchar.h>.
22816    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22817    included before <wchar.h>.  */
22818 #include <stddef.h>
22819 #include <stdio.h>
22820 #include <time.h>
22821 #include <wchar.h>
22822
22823 "
22824 if test "x$ac_cv_have_decl_mbrtowc" = xyes; then :
22825   ac_have_decl=1
22826 else
22827   ac_have_decl=0
22828 fi
22829
22830 cat >>confdefs.h <<_ACEOF
22831 #define HAVE_DECL_MBRTOWC $ac_have_decl
22832 _ACEOF
22833
22834     if test $ac_cv_have_decl_mbrtowc = yes; then
22835                         REPLACE_MBRTOWC=1
22836     fi
22837   else
22838     if test $REPLACE_MBSTATE_T = 1; then
22839       REPLACE_MBRTOWC=1
22840     else
22841
22842
22843
22844      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5
22845 $as_echo_n "checking whether mbrtowc handles a NULL pwc argument... " >&6; }
22846 if ${gl_cv_func_mbrtowc_null_arg1+:} false; then :
22847   $as_echo_n "(cached) " >&6
22848 else
22849
22850                   case "$host_os" in
22851                   # Guess no on Solaris.
22852         solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;;
22853                   # Guess yes otherwise.
22854         *)        gl_cv_func_mbrtowc_null_arg1="guessing yes" ;;
22855       esac
22856       if test $LOCALE_FR_UTF8 != none; then
22857         if test "$cross_compiling" = yes; then :
22858   :
22859 else
22860   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22861 /* end confdefs.h.  */
22862
22863 #include <locale.h>
22864 #include <stdlib.h>
22865 #include <string.h>
22866 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22867    <wchar.h>.
22868    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22869    included before <wchar.h>.  */
22870 #include <stddef.h>
22871 #include <stdio.h>
22872 #include <time.h>
22873 #include <wchar.h>
22874 int main ()
22875 {
22876   int result = 0;
22877
22878   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
22879     {
22880       char input[] = "\303\237er";
22881       mbstate_t state;
22882       wchar_t wc;
22883       size_t ret;
22884
22885       memset (&state, '\0', sizeof (mbstate_t));
22886       wc = (wchar_t) 0xBADFACE;
22887       ret = mbrtowc (&wc, input, 5, &state);
22888       if (ret != 2)
22889         result |= 1;
22890       if (!mbsinit (&state))
22891         result |= 2;
22892
22893       memset (&state, '\0', sizeof (mbstate_t));
22894       ret = mbrtowc (NULL, input, 5, &state);
22895       if (ret != 2) /* Solaris 7 fails here: ret is -1.  */
22896         result |= 4;
22897       if (!mbsinit (&state))
22898         result |= 8;
22899     }
22900   return result;
22901 }
22902 _ACEOF
22903 if ac_fn_c_try_run "$LINENO"; then :
22904   gl_cv_func_mbrtowc_null_arg1=yes
22905 else
22906   gl_cv_func_mbrtowc_null_arg1=no
22907 fi
22908 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22909   conftest.$ac_objext conftest.beam conftest.$ac_ext
22910 fi
22911
22912       fi
22913
22914 fi
22915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5
22916 $as_echo "$gl_cv_func_mbrtowc_null_arg1" >&6; }
22917
22918
22919
22920
22921      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
22922 $as_echo_n "checking whether mbrtowc handles a NULL string argument... " >&6; }
22923 if ${gl_cv_func_mbrtowc_null_arg2+:} false; then :
22924   $as_echo_n "(cached) " >&6
22925 else
22926
22927                   case "$host_os" in
22928               # Guess no on OSF/1.
22929         osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;;
22930               # Guess yes otherwise.
22931         *)    gl_cv_func_mbrtowc_null_arg2="guessing yes" ;;
22932       esac
22933       if test $LOCALE_FR_UTF8 != none; then
22934         if test "$cross_compiling" = yes; then :
22935   :
22936 else
22937   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22938 /* end confdefs.h.  */
22939
22940 #include <locale.h>
22941 #include <string.h>
22942 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22943    <wchar.h>.
22944    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22945    included before <wchar.h>.  */
22946 #include <stddef.h>
22947 #include <stdio.h>
22948 #include <time.h>
22949 #include <wchar.h>
22950 int main ()
22951 {
22952   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
22953     {
22954       mbstate_t state;
22955       wchar_t wc;
22956       int ret;
22957
22958       memset (&state, '\0', sizeof (mbstate_t));
22959       wc = (wchar_t) 0xBADFACE;
22960       mbrtowc (&wc, NULL, 5, &state);
22961       /* Check that wc was not modified.  */
22962       if (wc != (wchar_t) 0xBADFACE)
22963         return 1;
22964     }
22965   return 0;
22966 }
22967 _ACEOF
22968 if ac_fn_c_try_run "$LINENO"; then :
22969   gl_cv_func_mbrtowc_null_arg2=yes
22970 else
22971   gl_cv_func_mbrtowc_null_arg2=no
22972 fi
22973 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22974   conftest.$ac_objext conftest.beam conftest.$ac_ext
22975 fi
22976
22977       fi
22978
22979 fi
22980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5
22981 $as_echo "$gl_cv_func_mbrtowc_null_arg2" >&6; }
22982
22983
22984
22985
22986
22987
22988   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
22989 $as_echo_n "checking whether mbrtowc has a correct return value... " >&6; }
22990 if ${gl_cv_func_mbrtowc_retval+:} false; then :
22991   $as_echo_n "(cached) " >&6
22992 else
22993
22994                   case "$host_os" in
22995                                    # Guess no on HP-UX, Solaris, native Windows.
22996         hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;;
22997                                    # Guess yes otherwise.
22998         *)                         gl_cv_func_mbrtowc_retval="guessing yes" ;;
22999       esac
23000       if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \
23001          || { case "$host_os" in mingw*) true;; *) false;; esac; }; then
23002         if test "$cross_compiling" = yes; then :
23003   :
23004 else
23005   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23006 /* end confdefs.h.  */
23007
23008 #include <locale.h>
23009 #include <string.h>
23010 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
23011    <wchar.h>.
23012    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
23013    included before <wchar.h>.  */
23014 #include <stddef.h>
23015 #include <stdio.h>
23016 #include <time.h>
23017 #include <wchar.h>
23018 int main ()
23019 {
23020   int result = 0;
23021   int found_some_locale = 0;
23022   /* This fails on Solaris.  */
23023   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
23024     {
23025       char input[] = "B\303\274\303\237er"; /* "Büßer" */
23026       mbstate_t state;
23027       wchar_t wc;
23028
23029       memset (&state, '\0', sizeof (mbstate_t));
23030       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
23031         {
23032           input[1] = '\0';
23033           if (mbrtowc (&wc, input + 2, 5, &state) != 1)
23034             result |= 1;
23035         }
23036       found_some_locale = 1;
23037     }
23038   /* This fails on HP-UX 11.11.  */
23039   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
23040     {
23041       char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
23042       mbstate_t state;
23043       wchar_t wc;
23044
23045       memset (&state, '\0', sizeof (mbstate_t));
23046       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
23047         {
23048           input[1] = '\0';
23049           if (mbrtowc (&wc, input + 2, 5, &state) != 2)
23050             result |= 2;
23051         }
23052       found_some_locale = 1;
23053     }
23054   /* This fails on native Windows.  */
23055   if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
23056     {
23057       char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */
23058       mbstate_t state;
23059       wchar_t wc;
23060
23061       memset (&state, '\0', sizeof (mbstate_t));
23062       if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
23063         {
23064           input[3] = '\0';
23065           if (mbrtowc (&wc, input + 4, 4, &state) != 1)
23066             result |= 4;
23067         }
23068       found_some_locale = 1;
23069     }
23070   if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
23071     {
23072       char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */
23073       mbstate_t state;
23074       wchar_t wc;
23075
23076       memset (&state, '\0', sizeof (mbstate_t));
23077       if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
23078         {
23079           input[3] = '\0';
23080           if (mbrtowc (&wc, input + 4, 4, &state) != 1)
23081             result |= 8;
23082         }
23083       found_some_locale = 1;
23084     }
23085   if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
23086     {
23087       char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */
23088       mbstate_t state;
23089       wchar_t wc;
23090
23091       memset (&state, '\0', sizeof (mbstate_t));
23092       if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
23093         {
23094           input[3] = '\0';
23095           if (mbrtowc (&wc, input + 4, 4, &state) != 1)
23096             result |= 16;
23097         }
23098       found_some_locale = 1;
23099     }
23100   return (found_some_locale ? result : 77);
23101 }
23102 _ACEOF
23103 if ac_fn_c_try_run "$LINENO"; then :
23104   gl_cv_func_mbrtowc_retval=yes
23105 else
23106   if test $? != 77; then
23107              gl_cv_func_mbrtowc_retval=no
23108            fi
23109
23110 fi
23111 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23112   conftest.$ac_objext conftest.beam conftest.$ac_ext
23113 fi
23114
23115       fi
23116
23117 fi
23118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
23119 $as_echo "$gl_cv_func_mbrtowc_retval" >&6; }
23120
23121
23122
23123
23124      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
23125 $as_echo_n "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
23126 if ${gl_cv_func_mbrtowc_nul_retval+:} false; then :
23127   $as_echo_n "(cached) " >&6
23128 else
23129
23130                   case "$host_os" in
23131                        # Guess no on Solaris 8 and 9.
23132         solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
23133                        # Guess yes otherwise.
23134         *)             gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
23135       esac
23136       if test $LOCALE_ZH_CN != none; then
23137         if test "$cross_compiling" = yes; then :
23138   :
23139 else
23140   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23141 /* end confdefs.h.  */
23142
23143 #include <locale.h>
23144 #include <string.h>
23145 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
23146    <wchar.h>.
23147    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
23148    included before <wchar.h>.  */
23149 #include <stddef.h>
23150 #include <stdio.h>
23151 #include <time.h>
23152 #include <wchar.h>
23153 int main ()
23154 {
23155   /* This fails on Solaris 8 and 9.  */
23156   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
23157     {
23158       mbstate_t state;
23159       wchar_t wc;
23160
23161       memset (&state, '\0', sizeof (mbstate_t));
23162       if (mbrtowc (&wc, "", 1, &state) != 0)
23163         return 1;
23164     }
23165   return 0;
23166 }
23167 _ACEOF
23168 if ac_fn_c_try_run "$LINENO"; then :
23169   gl_cv_func_mbrtowc_nul_retval=yes
23170 else
23171   gl_cv_func_mbrtowc_nul_retval=no
23172 fi
23173 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23174   conftest.$ac_objext conftest.beam conftest.$ac_ext
23175 fi
23176
23177       fi
23178
23179 fi
23180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
23181 $as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; }
23182
23183       case "$gl_cv_func_mbrtowc_null_arg1" in
23184         *yes) ;;
23185         *)
23186 $as_echo "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h
23187
23188            REPLACE_MBRTOWC=1
23189            ;;
23190       esac
23191       case "$gl_cv_func_mbrtowc_null_arg2" in
23192         *yes) ;;
23193         *)
23194 $as_echo "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h
23195
23196            REPLACE_MBRTOWC=1
23197            ;;
23198       esac
23199       case "$gl_cv_func_mbrtowc_retval" in
23200         *yes) ;;
23201         *)
23202 $as_echo "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
23203
23204            REPLACE_MBRTOWC=1
23205            ;;
23206       esac
23207       case "$gl_cv_func_mbrtowc_nul_retval" in
23208         *yes) ;;
23209         *)
23210 $as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
23211
23212            REPLACE_MBRTOWC=1
23213            ;;
23214       esac
23215     fi
23216   fi
23217
23218   if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
23219
23220
23221
23222
23223
23224
23225
23226
23227   gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext"
23228
23229
23230   :
23231
23232   fi
23233
23234
23235
23236
23237
23238           GNULIB_MBRTOWC=1
23239
23240
23241
23242
23243
23244 $as_echo "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h
23245
23246
23247
23248
23249
23250
23251
23252
23253           GNULIB_MBSCASECMP=1
23254
23255
23256
23257
23258
23259 $as_echo "#define GNULIB_TEST_MBSCASECMP 1" >>confdefs.h
23260
23261
23262
23263
23264
23265
23266
23267
23268
23269
23270
23271
23272
23273
23274   if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
23275
23276
23277
23278      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
23279 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
23280 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
23281   $as_echo_n "(cached) " >&6
23282 else
23283
23284                   case "$host_os" in
23285                      # Guess no on AIX and OSF/1.
23286         aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
23287                      # Guess yes otherwise.
23288         *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
23289       esac
23290       if test $LOCALE_JA != none; then
23291         if test "$cross_compiling" = yes; then :
23292   :
23293 else
23294   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23295 /* end confdefs.h.  */
23296
23297 #include <locale.h>
23298 #include <string.h>
23299 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
23300    <wchar.h>.
23301    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
23302    included before <wchar.h>.  */
23303 #include <stddef.h>
23304 #include <stdio.h>
23305 #include <time.h>
23306 #include <wchar.h>
23307 int main ()
23308 {
23309   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
23310     {
23311       const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
23312       mbstate_t state;
23313       wchar_t wc;
23314
23315       memset (&state, '\0', sizeof (mbstate_t));
23316       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
23317         if (mbsinit (&state))
23318           return 1;
23319     }
23320   return 0;
23321 }
23322 _ACEOF
23323 if ac_fn_c_try_run "$LINENO"; then :
23324   gl_cv_func_mbrtowc_incomplete_state=yes
23325 else
23326   gl_cv_func_mbrtowc_incomplete_state=no
23327 fi
23328 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23329   conftest.$ac_objext conftest.beam conftest.$ac_ext
23330 fi
23331
23332       fi
23333
23334 fi
23335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
23336 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
23337
23338
23339
23340
23341      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
23342 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
23343 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
23344   $as_echo_n "(cached) " >&6
23345 else
23346
23347                   case "$host_os" in
23348                     # Guess no on Solaris 8.
23349         solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
23350                     # Guess yes otherwise.
23351         *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
23352       esac
23353       if test $LOCALE_ZH_CN != none; then
23354         if test "$cross_compiling" = yes; then :
23355   :
23356 else
23357   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23358 /* end confdefs.h.  */
23359
23360 #include <locale.h>
23361 #include <stdlib.h>
23362 #include <string.h>
23363 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
23364    <wchar.h>.
23365    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
23366    included before <wchar.h>.  */
23367 #include <stddef.h>
23368 #include <stdio.h>
23369 #include <time.h>
23370 #include <wchar.h>
23371 int main ()
23372 {
23373   /* This fails on Solaris 8:
23374      mbrtowc returns 2, and sets wc to 0x00F0.
23375      mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
23376   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
23377     {
23378       char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
23379       mbstate_t state;
23380       wchar_t wc;
23381
23382       memset (&state, '\0', sizeof (mbstate_t));
23383       if (mbrtowc (&wc, input + 3, 6, &state) != 4
23384           && mbtowc (&wc, input + 3, 6) == 4)
23385         return 1;
23386     }
23387   return 0;
23388 }
23389 _ACEOF
23390 if ac_fn_c_try_run "$LINENO"; then :
23391   gl_cv_func_mbrtowc_sanitycheck=yes
23392 else
23393   gl_cv_func_mbrtowc_sanitycheck=no
23394 fi
23395 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23396   conftest.$ac_objext conftest.beam conftest.$ac_ext
23397 fi
23398
23399       fi
23400
23401 fi
23402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
23403 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
23404
23405     REPLACE_MBSTATE_T=0
23406     case "$gl_cv_func_mbrtowc_incomplete_state" in
23407       *yes) ;;
23408       *) REPLACE_MBSTATE_T=1 ;;
23409     esac
23410     case "$gl_cv_func_mbrtowc_sanitycheck" in
23411       *yes) ;;
23412       *) REPLACE_MBSTATE_T=1 ;;
23413     esac
23414   else
23415     REPLACE_MBSTATE_T=1
23416   fi
23417
23418
23419
23420   if test $ac_cv_func_mbsinit = no; then
23421     HAVE_MBSINIT=0
23422     ac_fn_c_check_decl "$LINENO" "mbsinit" "ac_cv_have_decl_mbsinit" "
23423 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
23424    <wchar.h>.
23425    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
23426    included before <wchar.h>.  */
23427 #include <stddef.h>
23428 #include <stdio.h>
23429 #include <time.h>
23430 #include <wchar.h>
23431
23432 "
23433 if test "x$ac_cv_have_decl_mbsinit" = xyes; then :
23434   ac_have_decl=1
23435 else
23436   ac_have_decl=0
23437 fi
23438
23439 cat >>confdefs.h <<_ACEOF
23440 #define HAVE_DECL_MBSINIT $ac_have_decl
23441 _ACEOF
23442
23443     if test $ac_cv_have_decl_mbsinit = yes; then
23444                         REPLACE_MBSINIT=1
23445     fi
23446   else
23447     if test $REPLACE_MBSTATE_T = 1; then
23448       REPLACE_MBSINIT=1
23449     else
23450                         case "$host_os" in
23451         mingw*) REPLACE_MBSINIT=1 ;;
23452       esac
23453     fi
23454   fi
23455
23456   if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
23457
23458
23459
23460
23461
23462
23463
23464
23465   gl_LIBOBJS="$gl_LIBOBJS mbsinit.$ac_objext"
23466
23467
23468   :
23469
23470   fi
23471
23472
23473
23474
23475
23476           GNULIB_MBSINIT=1
23477
23478
23479
23480
23481
23482 $as_echo "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h
23483
23484
23485
23486
23487
23488
23489
23490
23491
23492
23493
23494
23495
23496   if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
23497
23498
23499
23500      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
23501 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
23502 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
23503   $as_echo_n "(cached) " >&6
23504 else
23505
23506                   case "$host_os" in
23507                      # Guess no on AIX and OSF/1.
23508         aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
23509                      # Guess yes otherwise.
23510         *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
23511       esac
23512       if test $LOCALE_JA != none; then
23513         if test "$cross_compiling" = yes; then :
23514   :
23515 else
23516   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23517 /* end confdefs.h.  */
23518
23519 #include <locale.h>
23520 #include <string.h>
23521 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
23522    <wchar.h>.
23523    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
23524    included before <wchar.h>.  */
23525 #include <stddef.h>
23526 #include <stdio.h>
23527 #include <time.h>
23528 #include <wchar.h>
23529 int main ()
23530 {
23531   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
23532     {
23533       const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
23534       mbstate_t state;
23535       wchar_t wc;
23536
23537       memset (&state, '\0', sizeof (mbstate_t));
23538       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
23539         if (mbsinit (&state))
23540           return 1;
23541     }
23542   return 0;
23543 }
23544 _ACEOF
23545 if ac_fn_c_try_run "$LINENO"; then :
23546   gl_cv_func_mbrtowc_incomplete_state=yes
23547 else
23548   gl_cv_func_mbrtowc_incomplete_state=no
23549 fi
23550 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23551   conftest.$ac_objext conftest.beam conftest.$ac_ext
23552 fi
23553
23554       fi
23555
23556 fi
23557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
23558 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
23559
23560
23561
23562
23563      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
23564 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
23565 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
23566   $as_echo_n "(cached) " >&6
23567 else
23568
23569                   case "$host_os" in
23570                     # Guess no on Solaris 8.
23571         solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
23572                     # Guess yes otherwise.
23573         *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
23574       esac
23575       if test $LOCALE_ZH_CN != none; then
23576         if test "$cross_compiling" = yes; then :
23577   :
23578 else
23579   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23580 /* end confdefs.h.  */
23581
23582 #include <locale.h>
23583 #include <stdlib.h>
23584 #include <string.h>
23585 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
23586    <wchar.h>.
23587    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
23588    included before <wchar.h>.  */
23589 #include <stddef.h>
23590 #include <stdio.h>
23591 #include <time.h>
23592 #include <wchar.h>
23593 int main ()
23594 {
23595   /* This fails on Solaris 8:
23596      mbrtowc returns 2, and sets wc to 0x00F0.
23597      mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
23598   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
23599     {
23600       char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
23601       mbstate_t state;
23602       wchar_t wc;
23603
23604       memset (&state, '\0', sizeof (mbstate_t));
23605       if (mbrtowc (&wc, input + 3, 6, &state) != 4
23606           && mbtowc (&wc, input + 3, 6) == 4)
23607         return 1;
23608     }
23609   return 0;
23610 }
23611 _ACEOF
23612 if ac_fn_c_try_run "$LINENO"; then :
23613   gl_cv_func_mbrtowc_sanitycheck=yes
23614 else
23615   gl_cv_func_mbrtowc_sanitycheck=no
23616 fi
23617 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23618   conftest.$ac_objext conftest.beam conftest.$ac_ext
23619 fi
23620
23621       fi
23622
23623 fi
23624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
23625 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
23626
23627     REPLACE_MBSTATE_T=0
23628     case "$gl_cv_func_mbrtowc_incomplete_state" in
23629       *yes) ;;
23630       *) REPLACE_MBSTATE_T=1 ;;
23631     esac
23632     case "$gl_cv_func_mbrtowc_sanitycheck" in
23633       *yes) ;;
23634       *) REPLACE_MBSTATE_T=1 ;;
23635     esac
23636   else
23637     REPLACE_MBSTATE_T=1
23638   fi
23639
23640
23641
23642   if test $ac_cv_func_mbsrtowcs = no; then
23643     HAVE_MBSRTOWCS=0
23644     ac_fn_c_check_decl "$LINENO" "mbsrtowcs" "ac_cv_have_decl_mbsrtowcs" "
23645 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
23646    <wchar.h>.
23647    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
23648    included before <wchar.h>.  */
23649 #include <stddef.h>
23650 #include <stdio.h>
23651 #include <time.h>
23652 #include <wchar.h>
23653
23654 "
23655 if test "x$ac_cv_have_decl_mbsrtowcs" = xyes; then :
23656   ac_have_decl=1
23657 else
23658   ac_have_decl=0
23659 fi
23660
23661 cat >>confdefs.h <<_ACEOF
23662 #define HAVE_DECL_MBSRTOWCS $ac_have_decl
23663 _ACEOF
23664
23665     if test $ac_cv_have_decl_mbsrtowcs = yes; then
23666                         REPLACE_MBSRTOWCS=1
23667     fi
23668   else
23669     if test $REPLACE_MBSTATE_T = 1; then
23670       REPLACE_MBSRTOWCS=1
23671     else
23672
23673
23674
23675
23676
23677
23678      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbsrtowcs works" >&5
23679 $as_echo_n "checking whether mbsrtowcs works... " >&6; }
23680 if ${gl_cv_func_mbsrtowcs_works+:} false; then :
23681   $as_echo_n "(cached) " >&6
23682 else
23683
23684                   case "$host_os" in
23685                                    # Guess no on HP-UX, Solaris, mingw.
23686         hpux* | solaris* | mingw*) gl_cv_func_mbsrtowcs_works="guessing no" ;;
23687                                    # Guess yes otherwise.
23688         *)                         gl_cv_func_mbsrtowcs_works="guessing yes" ;;
23689       esac
23690       if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
23691         if test "$cross_compiling" = yes; then :
23692   :
23693 else
23694   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23695 /* end confdefs.h.  */
23696
23697 #include <locale.h>
23698 #include <string.h>
23699 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
23700    <wchar.h>.
23701    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
23702    included before <wchar.h>.  */
23703 #include <stddef.h>
23704 #include <stdio.h>
23705 #include <time.h>
23706 #include <wchar.h>
23707 int main ()
23708 {
23709   int result = 0;
23710   /* Test whether the function supports a NULL destination argument.
23711      This fails on native Windows.  */
23712   if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
23713     {
23714       const char input[] = "\337er";
23715       const char *src = input;
23716       mbstate_t state;
23717
23718       memset (&state, '\0', sizeof (mbstate_t));
23719       if (mbsrtowcs (NULL, &src, 1, &state) != 3
23720           || src != input)
23721         result |= 1;
23722     }
23723   /* Test whether the function works when started with a conversion state
23724      in non-initial state.  This fails on HP-UX 11.11 and Solaris 10.  */
23725   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
23726     {
23727       const char input[] = "B\303\274\303\237er";
23728       mbstate_t state;
23729
23730       memset (&state, '\0', sizeof (mbstate_t));
23731       if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
23732         if (!mbsinit (&state))
23733           {
23734             const char *src = input + 2;
23735             if (mbsrtowcs (NULL, &src, 10, &state) != 4)
23736               result |= 2;
23737           }
23738     }
23739   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
23740     {
23741       const char input[] = "<\306\374\313\334\270\354>";
23742       mbstate_t state;
23743
23744       memset (&state, '\0', sizeof (mbstate_t));
23745       if (mbrtowc (NULL, input + 3, 1, &state) == (size_t)(-2))
23746         if (!mbsinit (&state))
23747           {
23748             const char *src = input + 4;
23749             if (mbsrtowcs (NULL, &src, 10, &state) != 3)
23750               result |= 4;
23751           }
23752     }
23753   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
23754     {
23755       const char input[] = "B\250\271\201\060\211\070er";
23756       mbstate_t state;
23757
23758       memset (&state, '\0', sizeof (mbstate_t));
23759       if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
23760         if (!mbsinit (&state))
23761           {
23762             const char *src = input + 2;
23763             if (mbsrtowcs (NULL, &src, 10, &state) != 4)
23764               result |= 8;
23765           }
23766     }
23767   return result;
23768 }
23769 _ACEOF
23770 if ac_fn_c_try_run "$LINENO"; then :
23771   gl_cv_func_mbsrtowcs_works=yes
23772 else
23773   gl_cv_func_mbsrtowcs_works=no
23774 fi
23775 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23776   conftest.$ac_objext conftest.beam conftest.$ac_ext
23777 fi
23778
23779       fi
23780
23781 fi
23782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbsrtowcs_works" >&5
23783 $as_echo "$gl_cv_func_mbsrtowcs_works" >&6; }
23784
23785       case "$gl_cv_func_mbsrtowcs_works" in
23786         *yes) ;;
23787         *) REPLACE_MBSRTOWCS=1 ;;
23788       esac
23789     fi
23790   fi
23791
23792   if test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1; then
23793
23794
23795
23796
23797
23798
23799
23800
23801   gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs.$ac_objext"
23802
23803
23804
23805
23806
23807
23808
23809
23810
23811   gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs-state.$ac_objext"
23812
23813
23814   :
23815
23816   fi
23817
23818
23819
23820
23821
23822           GNULIB_MBSRTOWCS=1
23823
23824
23825
23826
23827
23828 $as_echo "#define GNULIB_TEST_MBSRTOWCS 1" >>confdefs.h
23829
23830
23831
23832
23833
23834
23835   if false; then
23836     REPLACE_MBTOWC=1
23837   fi
23838
23839   if test $REPLACE_MBTOWC = 1; then
23840
23841
23842
23843
23844
23845
23846
23847
23848   gl_LIBOBJS="$gl_LIBOBJS mbtowc.$ac_objext"
23849
23850
23851   :
23852
23853   fi
23854
23855
23856
23857
23858
23859           GNULIB_MBTOWC=1
23860
23861
23862
23863
23864
23865 $as_echo "#define GNULIB_TEST_MBTOWC 1" >>confdefs.h
23866
23867
23868
23869
23870
23871   :
23872
23873
23874   if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
23875
23876
23877
23878
23879
23880
23881
23882
23883   gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext"
23884
23885
23886   for ac_header in bp-sym.h
23887 do :
23888   ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
23889 if test "x$ac_cv_header_bp_sym_h" = xyes; then :
23890   cat >>confdefs.h <<_ACEOF
23891 #define HAVE_BP_SYM_H 1
23892 _ACEOF
23893
23894 fi
23895
23896 done
23897
23898
23899   fi
23900
23901
23902
23903
23904
23905           GNULIB_MEMCHR=1
23906
23907
23908
23909
23910
23911 $as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
23912
23913
23914
23915
23916
23917
23918
23919
23920
23921   for ac_func in mempcpy
23922 do :
23923   ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
23924 if test "x$ac_cv_func_mempcpy" = xyes; then :
23925   cat >>confdefs.h <<_ACEOF
23926 #define HAVE_MEMPCPY 1
23927 _ACEOF
23928
23929 fi
23930 done
23931
23932   if test $ac_cv_func_mempcpy = no; then
23933     HAVE_MEMPCPY=0
23934   fi
23935
23936   if test $HAVE_MEMPCPY = 0; then
23937
23938
23939
23940
23941
23942
23943
23944
23945   gl_LIBOBJS="$gl_LIBOBJS mempcpy.$ac_objext"
23946
23947
23948   :
23949
23950   fi
23951
23952
23953
23954
23955
23956           GNULIB_MEMPCPY=1
23957
23958
23959
23960
23961
23962 $as_echo "#define GNULIB_TEST_MEMPCPY 1" >>confdefs.h
23963
23964
23965
23966
23967
23968
23969
23970
23971   if test $ac_cv_have_decl_memrchr = no; then
23972     HAVE_DECL_MEMRCHR=0
23973   fi
23974
23975   for ac_func in memrchr
23976 do :
23977   ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr"
23978 if test "x$ac_cv_func_memrchr" = xyes; then :
23979   cat >>confdefs.h <<_ACEOF
23980 #define HAVE_MEMRCHR 1
23981 _ACEOF
23982
23983 fi
23984 done
23985
23986
23987   if test $ac_cv_func_memrchr = no; then
23988
23989
23990
23991
23992
23993
23994
23995
23996   gl_LIBOBJS="$gl_LIBOBJS memrchr.$ac_objext"
23997
23998     :
23999   fi
24000
24001
24002
24003
24004
24005           GNULIB_MEMRCHR=1
24006
24007
24008
24009
24010
24011 $as_echo "#define GNULIB_TEST_MEMRCHR 1" >>confdefs.h
24012
24013
24014
24015
24016
24017   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing slash" >&5
24018 $as_echo_n "checking whether mkdir handles trailing slash... " >&6; }
24019 if ${gl_cv_func_mkdir_trailing_slash_works+:} false; then :
24020   $as_echo_n "(cached) " >&6
24021 else
24022   rm -rf conftest.dir
24023       if test "$cross_compiling" = yes; then :
24024   case "$host_os" in
24025                  # Guess yes on glibc systems.
24026          *-gnu*) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
24027                  # If we don't know, assume the worst.
24028          *)      gl_cv_func_mkdir_trailing_slash_works="guessing no" ;;
24029        esac
24030
24031 else
24032   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24033 /* end confdefs.h.  */
24034
24035 #       include <sys/types.h>
24036 #       include <sys/stat.h>
24037
24038 int
24039 main ()
24040 {
24041 return mkdir ("conftest.dir/", 0700);
24042   ;
24043   return 0;
24044 }
24045 _ACEOF
24046 if ac_fn_c_try_run "$LINENO"; then :
24047   gl_cv_func_mkdir_trailing_slash_works=yes
24048 else
24049   gl_cv_func_mkdir_trailing_slash_works=no
24050 fi
24051 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24052   conftest.$ac_objext conftest.beam conftest.$ac_ext
24053 fi
24054
24055     rm -rf conftest.dir
24056
24057
24058 fi
24059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_slash_works" >&5
24060 $as_echo "$gl_cv_func_mkdir_trailing_slash_works" >&6; }
24061   case "$gl_cv_func_mkdir_trailing_slash_works" in
24062     *yes) ;;
24063     *)
24064       REPLACE_MKDIR=1
24065       ;;
24066   esac
24067
24068   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing dot" >&5
24069 $as_echo_n "checking whether mkdir handles trailing dot... " >&6; }
24070 if ${gl_cv_func_mkdir_trailing_dot_works+:} false; then :
24071   $as_echo_n "(cached) " >&6
24072 else
24073   rm -rf conftest.dir
24074       if test "$cross_compiling" = yes; then :
24075   case "$host_os" in
24076                  # Guess yes on glibc systems.
24077          *-gnu*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
24078                  # If we don't know, assume the worst.
24079          *)      gl_cv_func_mkdir_trailing_dot_works="guessing no" ;;
24080        esac
24081
24082 else
24083   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24084 /* end confdefs.h.  */
24085
24086 #       include <sys/types.h>
24087 #       include <sys/stat.h>
24088
24089 int
24090 main ()
24091 {
24092 return !mkdir ("conftest.dir/./", 0700);
24093   ;
24094   return 0;
24095 }
24096 _ACEOF
24097 if ac_fn_c_try_run "$LINENO"; then :
24098   gl_cv_func_mkdir_trailing_dot_works=yes
24099 else
24100   gl_cv_func_mkdir_trailing_dot_works=no
24101 fi
24102 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24103   conftest.$ac_objext conftest.beam conftest.$ac_ext
24104 fi
24105
24106     rm -rf conftest.dir
24107
24108
24109 fi
24110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_dot_works" >&5
24111 $as_echo "$gl_cv_func_mkdir_trailing_dot_works" >&6; }
24112   case "$gl_cv_func_mkdir_trailing_dot_works" in
24113     *yes) ;;
24114     *)
24115       REPLACE_MKDIR=1
24116
24117 $as_echo "#define FUNC_MKDIR_DOT_BUG 1" >>confdefs.h
24118
24119       ;;
24120   esac
24121
24122   if test $REPLACE_MKDIR = 1; then
24123
24124
24125
24126
24127
24128
24129
24130
24131   gl_LIBOBJS="$gl_LIBOBJS mkdir.$ac_objext"
24132
24133   fi
24134
24135
24136
24137
24138   if test $ac_cv_func_mkdirat != yes; then
24139     HAVE_MKDIRAT=0
24140   fi
24141
24142   if test $HAVE_MKDIRAT = 0; then
24143
24144
24145
24146
24147
24148
24149
24150
24151   gl_LIBOBJS="$gl_LIBOBJS mkdirat.$ac_objext"
24152
24153
24154
24155
24156   fi
24157
24158
24159
24160
24161
24162           GNULIB_MKDIRAT=1
24163
24164
24165
24166
24167
24168 $as_echo "#define GNULIB_TEST_MKDIRAT 1" >>confdefs.h
24169
24170
24171
24172
24173
24174   for ac_func in mkdtemp
24175 do :
24176   ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
24177 if test "x$ac_cv_func_mkdtemp" = xyes; then :
24178   cat >>confdefs.h <<_ACEOF
24179 #define HAVE_MKDTEMP 1
24180 _ACEOF
24181
24182 fi
24183 done
24184
24185   if test $ac_cv_func_mkdtemp = no; then
24186     HAVE_MKDTEMP=0
24187   fi
24188
24189   if test $HAVE_MKDTEMP = 0; then
24190
24191
24192
24193
24194
24195
24196
24197
24198   gl_LIBOBJS="$gl_LIBOBJS mkdtemp.$ac_objext"
24199
24200     :
24201
24202   fi
24203
24204
24205
24206
24207
24208           GNULIB_MKDTEMP=1
24209
24210
24211
24212
24213
24214 $as_echo "#define GNULIB_TEST_MKDTEMP 1" >>confdefs.h
24215
24216
24217
24218
24219
24220
24221   if test $ac_cv_func_mkfifo = no; then
24222     HAVE_MKFIFO=0
24223   else
24224
24225     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkfifo rejects trailing slashes" >&5
24226 $as_echo_n "checking whether mkfifo rejects trailing slashes... " >&6; }
24227 if ${gl_cv_func_mkfifo_works+:} false; then :
24228   $as_echo_n "(cached) " >&6
24229 else
24230   # Assume that if we have lstat, we can also check symlinks.
24231        if test $ac_cv_func_lstat = yes; then
24232          ln -s conftest.tmp conftest.lnk
24233        fi
24234        if test "$cross_compiling" = yes; then :
24235   case "$host_os" in
24236                     # Guess yes on glibc systems.
24237             *-gnu*) gl_cv_func_mkfifo_works="guessing yes" ;;
24238                     # If we don't know, assume the worst.
24239             *)      gl_cv_func_mkfifo_works="guessing no" ;;
24240           esac
24241
24242 else
24243   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24244 /* end confdefs.h.  */
24245 #include <sys/stat.h>
24246
24247 int
24248 main ()
24249 {
24250 int result = 0;
24251              if (!mkfifo ("conftest.tmp/", 0600))
24252                result |= 1;
24253 #if HAVE_LSTAT
24254              if (!mkfifo ("conftest.lnk/", 0600))
24255                result |= 2;
24256 #endif
24257              return result;
24258
24259   ;
24260   return 0;
24261 }
24262 _ACEOF
24263 if ac_fn_c_try_run "$LINENO"; then :
24264   gl_cv_func_mkfifo_works=yes
24265 else
24266   gl_cv_func_mkfifo_works=no
24267 fi
24268 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24269   conftest.$ac_objext conftest.beam conftest.$ac_ext
24270 fi
24271
24272        rm -f conftest.tmp conftest.lnk
24273 fi
24274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkfifo_works" >&5
24275 $as_echo "$gl_cv_func_mkfifo_works" >&6; }
24276     case "$gl_cv_func_mkfifo_works" in
24277       *yes) ;;
24278       *)
24279
24280 $as_echo "#define MKFIFO_TRAILING_SLASH_BUG 1" >>confdefs.h
24281
24282         REPLACE_MKFIFO=1
24283         ;;
24284     esac
24285   fi
24286
24287   if test $HAVE_MKFIFO = 0 || test $REPLACE_MKFIFO = 1; then
24288
24289
24290
24291
24292
24293
24294
24295
24296   gl_LIBOBJS="$gl_LIBOBJS mkfifo.$ac_objext"
24297
24298   fi
24299
24300
24301
24302
24303
24304           GNULIB_MKFIFO=1
24305
24306
24307
24308
24309
24310 $as_echo "#define GNULIB_TEST_MKFIFO 1" >>confdefs.h
24311
24312
24313
24314
24315
24316
24317
24318
24319   if test $ac_cv_func_mkfifoat = no; then
24320     # No known system has mkfifoat but not mknodat
24321     HAVE_MKFIFOAT=0
24322     HAVE_MKNODAT=0
24323   fi
24324
24325   if test $HAVE_MKFIFOAT = 0; then
24326
24327
24328
24329
24330
24331
24332
24333
24334   gl_LIBOBJS="$gl_LIBOBJS mkfifoat.$ac_objext"
24335
24336   fi
24337   if test $HAVE_MKNODAT = 0; then
24338
24339
24340
24341
24342
24343
24344
24345
24346   gl_LIBOBJS="$gl_LIBOBJS mknodat.$ac_objext"
24347
24348   fi
24349
24350
24351
24352
24353
24354           GNULIB_MKFIFOAT=1
24355
24356
24357
24358
24359
24360 $as_echo "#define GNULIB_TEST_MKFIFOAT 1" >>confdefs.h
24361
24362
24363
24364
24365
24366
24367
24368
24369           GNULIB_MKNODAT=1
24370
24371
24372
24373
24374
24375 $as_echo "#define GNULIB_TEST_MKNODAT 1" >>confdefs.h
24376
24377
24378
24379
24380
24381
24382
24383
24384   if test $ac_cv_func_mknod = no; then
24385     HAVE_MKNOD=0
24386   else
24387         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mknod can create fifo without root privileges" >&5
24388 $as_echo_n "checking whether mknod can create fifo without root privileges... " >&6; }
24389 if ${gl_cv_func_mknod_works+:} false; then :
24390   $as_echo_n "(cached) " >&6
24391 else
24392   if test "$cross_compiling" = yes; then :
24393   case "$host_os" in
24394                     # Guess yes on glibc systems.
24395             *-gnu*) gl_cv_func_mknod_works="guessing yes" ;;
24396                     # If we don't know, assume the worst.
24397             *)      gl_cv_func_mknod_works="guessing no" ;;
24398           esac
24399
24400 else
24401   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24402 /* end confdefs.h.  */
24403 #include <sys/stat.h>
24404              #include <unistd.h>
24405
24406              /* Copied from root-uid.h.  FIXME: Just use root-uid.h.  */
24407              #ifdef __TANDEM
24408              # define ROOT_UID 65535
24409              #else
24410              # define ROOT_UID 0
24411              #endif
24412
24413 int
24414 main ()
24415 {
24416 /* Indeterminate for super-user, assume no.  Why are you running
24417          configure as root, anyway?  */
24418       if (geteuid () == ROOT_UID) return 99;
24419       if (mknod ("conftest.fifo", S_IFIFO | 0600, 0)) return 2;
24420   ;
24421   return 0;
24422 }
24423 _ACEOF
24424 if ac_fn_c_try_run "$LINENO"; then :
24425   gl_cv_func_mknod_works=yes
24426 else
24427   if test $? = 99 && test x"$FORCE_UNSAFE_CONFIGURE" = x; then
24428             { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24429 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24430 as_fn_error $? "you should not run configure as root (set FORCE_UNSAFE_CONFIGURE=1 in environment to bypass this check)
24431 See \`config.log' for more details" "$LINENO" 5; }
24432           fi
24433           gl_cv_func_mknod_works=no
24434 fi
24435 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24436   conftest.$ac_objext conftest.beam conftest.$ac_ext
24437 fi
24438
24439        rm -f conftest.fifo
24440 fi
24441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mknod_works" >&5
24442 $as_echo "$gl_cv_func_mknod_works" >&6; }
24443     case "$gl_cv_func_mknod_works" in
24444       *yes) ;;
24445       *)
24446         REPLACE_MKNOD=1
24447
24448 $as_echo "#define MKNOD_FIFO_BUG 1" >>confdefs.h
24449
24450         ;;
24451     esac
24452         if test $REPLACE_MKFIFO = 1; then
24453       REPLACE_MKNOD=1
24454     fi
24455   fi
24456
24457   if test $HAVE_MKNOD = 0 || test $REPLACE_MKNOD = 1; then
24458
24459
24460
24461
24462
24463
24464
24465
24466   gl_LIBOBJS="$gl_LIBOBJS mknod.$ac_objext"
24467
24468   fi
24469
24470
24471
24472
24473
24474           GNULIB_MKNOD=1
24475
24476
24477
24478
24479
24480 $as_echo "#define GNULIB_TEST_MKNOD 1" >>confdefs.h
24481
24482
24483
24484
24485
24486
24487
24488
24489
24490   if test $APPLE_UNIVERSAL_BUILD = 1; then
24491     # A universal build on Apple Mac OS X platforms.
24492     # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode.
24493     # But we need a configuration result that is valid in both modes.
24494     gl_cv_func_working_mktime=no
24495   fi
24496   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5
24497 $as_echo_n "checking for working mktime... " >&6; }
24498 if ${gl_cv_func_working_mktime+:} false; then :
24499   $as_echo_n "(cached) " >&6
24500 else
24501   if test "$cross_compiling" = yes; then :
24502   gl_cv_func_working_mktime=no
24503 else
24504   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24505 /* end confdefs.h.  */
24506 /* Test program from Paul Eggert and Tony Leneis.  */
24507 #include <limits.h>
24508 #include <stdlib.h>
24509 #include <time.h>
24510
24511 #ifdef HAVE_UNISTD_H
24512 # include <unistd.h>
24513 #endif
24514
24515 #if HAVE_DECL_ALARM
24516 # include <signal.h>
24517 #endif
24518
24519 /* Work around redefinition to rpl_putenv by other config tests.  */
24520 #undef putenv
24521
24522 static time_t time_t_max;
24523 static time_t time_t_min;
24524
24525 /* Values we'll use to set the TZ environment variable.  */
24526 static char *tz_strings[] = {
24527   (char *) 0, "TZ=GMT0", "TZ=JST-9",
24528   "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
24529 };
24530 #define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
24531
24532 /* Return 0 if mktime fails to convert a date in the spring-forward gap.
24533    Based on a problem report from Andreas Jaeger.  */
24534 static int
24535 spring_forward_gap ()
24536 {
24537   /* glibc (up to about 1998-10-07) failed this test. */
24538   struct tm tm;
24539
24540   /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
24541      instead of "TZ=America/Vancouver" in order to detect the bug even
24542      on systems that don't support the Olson extension, or don't have the
24543      full zoneinfo tables installed.  */
24544   putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
24545
24546   tm.tm_year = 98;
24547   tm.tm_mon = 3;
24548   tm.tm_mday = 5;
24549   tm.tm_hour = 2;
24550   tm.tm_min = 0;
24551   tm.tm_sec = 0;
24552   tm.tm_isdst = -1;
24553   return mktime (&tm) != (time_t) -1;
24554 }
24555
24556 static int
24557 mktime_test1 (time_t now)
24558 {
24559   struct tm *lt;
24560   return ! (lt = localtime (&now)) || mktime (lt) == now;
24561 }
24562
24563 static int
24564 mktime_test (time_t now)
24565 {
24566   return (mktime_test1 (now)
24567           && mktime_test1 ((time_t) (time_t_max - now))
24568           && mktime_test1 ((time_t) (time_t_min + now)));
24569 }
24570
24571 static int
24572 irix_6_4_bug ()
24573 {
24574   /* Based on code from Ariel Faigon.  */
24575   struct tm tm;
24576   tm.tm_year = 96;
24577   tm.tm_mon = 3;
24578   tm.tm_mday = 0;
24579   tm.tm_hour = 0;
24580   tm.tm_min = 0;
24581   tm.tm_sec = 0;
24582   tm.tm_isdst = -1;
24583   mktime (&tm);
24584   return tm.tm_mon == 2 && tm.tm_mday == 31;
24585 }
24586
24587 static int
24588 bigtime_test (int j)
24589 {
24590   struct tm tm;
24591   time_t now;
24592   tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
24593   now = mktime (&tm);
24594   if (now != (time_t) -1)
24595     {
24596       struct tm *lt = localtime (&now);
24597       if (! (lt
24598              && lt->tm_year == tm.tm_year
24599              && lt->tm_mon == tm.tm_mon
24600              && lt->tm_mday == tm.tm_mday
24601              && lt->tm_hour == tm.tm_hour
24602              && lt->tm_min == tm.tm_min
24603              && lt->tm_sec == tm.tm_sec
24604              && lt->tm_yday == tm.tm_yday
24605              && lt->tm_wday == tm.tm_wday
24606              && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
24607                   == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
24608         return 0;
24609     }
24610   return 1;
24611 }
24612
24613 static int
24614 year_2050_test ()
24615 {
24616   /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
24617      ignoring leap seconds.  */
24618   unsigned long int answer = 2527315200UL;
24619
24620   struct tm tm;
24621   time_t t;
24622   tm.tm_year = 2050 - 1900;
24623   tm.tm_mon = 2 - 1;
24624   tm.tm_mday = 1;
24625   tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
24626   tm.tm_isdst = -1;
24627
24628   /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
24629      instead of "TZ=America/Vancouver" in order to detect the bug even
24630      on systems that don't support the Olson extension, or don't have the
24631      full zoneinfo tables installed.  */
24632   putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
24633
24634   t = mktime (&tm);
24635
24636   /* Check that the result is either a failure, or close enough
24637      to the correct answer that we can assume the discrepancy is
24638      due to leap seconds.  */
24639   return (t == (time_t) -1
24640           || (0 < t && answer - 120 <= t && t <= answer + 120));
24641 }
24642
24643 int
24644 main ()
24645 {
24646   int result = 0;
24647   time_t t, delta;
24648   int i, j;
24649   int time_t_signed_magnitude = (time_t) ~ (time_t) 0 < (time_t) -1;
24650   int time_t_signed = ! ((time_t) 0 < (time_t) -1);
24651
24652 #if HAVE_DECL_ALARM
24653   /* This test makes some buggy mktime implementations loop.
24654      Give up after 60 seconds; a mktime slower than that
24655      isn't worth using anyway.  */
24656   signal (SIGALRM, SIG_DFL);
24657   alarm (60);
24658 #endif
24659
24660   time_t_max = (! time_t_signed
24661                 ? (time_t) -1
24662                 : ((((time_t) 1 << (sizeof (time_t) * CHAR_BIT - 2)) - 1)
24663                    * 2 + 1));
24664   time_t_min = (! time_t_signed
24665                 ? (time_t) 0
24666                 : time_t_signed_magnitude
24667                 ? ~ (time_t) 0
24668                 : ~ time_t_max);
24669
24670   delta = time_t_max / 997; /* a suitable prime number */
24671   for (i = 0; i < N_STRINGS; i++)
24672     {
24673       if (tz_strings[i])
24674         putenv (tz_strings[i]);
24675
24676       for (t = 0; t <= time_t_max - delta && (result & 1) == 0; t += delta)
24677         if (! mktime_test (t))
24678           result |= 1;
24679       if ((result & 2) == 0
24680           && ! (mktime_test ((time_t) 1)
24681                 && mktime_test ((time_t) (60 * 60))
24682                 && mktime_test ((time_t) (60 * 60 * 24))))
24683         result |= 2;
24684
24685       for (j = 1; (result & 4) == 0; j <<= 1)
24686         {
24687           if (! bigtime_test (j))
24688             result |= 4;
24689           if (INT_MAX / 2 < j)
24690             break;
24691         }
24692       if ((result & 8) == 0 && ! bigtime_test (INT_MAX))
24693         result |= 8;
24694     }
24695   if (! irix_6_4_bug ())
24696     result |= 16;
24697   if (! spring_forward_gap ())
24698     result |= 32;
24699   if (! year_2050_test ())
24700     result |= 64;
24701   return result;
24702 }
24703 _ACEOF
24704 if ac_fn_c_try_run "$LINENO"; then :
24705   gl_cv_func_working_mktime=yes
24706 else
24707   gl_cv_func_working_mktime=no
24708 fi
24709 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24710   conftest.$ac_objext conftest.beam conftest.$ac_ext
24711 fi
24712
24713
24714 fi
24715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mktime" >&5
24716 $as_echo "$gl_cv_func_working_mktime" >&6; }
24717
24718   if test $gl_cv_func_working_mktime = no; then
24719     REPLACE_MKTIME=1
24720   else
24721     REPLACE_MKTIME=0
24722   fi
24723
24724   if test $REPLACE_MKTIME = 1; then
24725
24726
24727
24728
24729
24730
24731
24732
24733   gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext"
24734
24735     :
24736   fi
24737
24738
24739
24740
24741
24742           GNULIB_MKTIME=1
24743
24744
24745
24746
24747
24748 $as_echo "#define GNULIB_TEST_MKTIME 1" >>confdefs.h
24749
24750
24751
24752
24753   :
24754
24755
24756
24757   if test $ac_cv_func__set_invalid_parameter_handler = yes; then
24758     HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
24759
24760 $as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
24761
24762   else
24763     HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
24764   fi
24765
24766
24767   if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
24768
24769
24770
24771
24772
24773
24774
24775
24776   gl_LIBOBJS="$gl_LIBOBJS msvc-inval.$ac_objext"
24777
24778   fi
24779
24780
24781
24782   if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
24783
24784
24785
24786
24787
24788
24789
24790
24791   gl_LIBOBJS="$gl_LIBOBJS msvc-nothrow.$ac_objext"
24792
24793   fi
24794
24795
24796
24797
24798
24799      if test $ac_cv_func_nl_langinfo = yes; then
24800     # On Irix 6.5, YESEXPR is defined, but nl_langinfo(YESEXPR) is broken.
24801     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether YESEXPR works" >&5
24802 $as_echo_n "checking whether YESEXPR works... " >&6; }
24803 if ${gl_cv_func_nl_langinfo_yesexpr_works+:} false; then :
24804   $as_echo_n "(cached) " >&6
24805 else
24806   if test "$cross_compiling" = yes; then :
24807
24808          case "$host_os" in
24809                    # Guess no on irix systems.
24810            irix*)  gl_cv_func_nl_langinfo_yesexpr_works="guessing no";;
24811                    # Guess yes elsewhere.
24812            *)      gl_cv_func_nl_langinfo_yesexpr_works="guessing yes";;
24813          esac
24814
24815 else
24816   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24817 /* end confdefs.h.  */
24818 #include <langinfo.h>
24819
24820 int
24821 main ()
24822 {
24823 return !*nl_langinfo(YESEXPR);
24824
24825   ;
24826   return 0;
24827 }
24828 _ACEOF
24829 if ac_fn_c_try_run "$LINENO"; then :
24830   gl_cv_func_nl_langinfo_yesexpr_works=yes
24831 else
24832   gl_cv_func_nl_langinfo_yesexpr_works=no
24833 fi
24834 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24835   conftest.$ac_objext conftest.beam conftest.$ac_ext
24836 fi
24837
24838
24839 fi
24840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_nl_langinfo_yesexpr_works" >&5
24841 $as_echo "$gl_cv_func_nl_langinfo_yesexpr_works" >&6; }
24842     case $gl_cv_func_nl_langinfo_yesexpr_works in
24843       *yes) FUNC_NL_LANGINFO_YESEXPR_WORKS=1 ;;
24844       *)    FUNC_NL_LANGINFO_YESEXPR_WORKS=0 ;;
24845     esac
24846
24847 cat >>confdefs.h <<_ACEOF
24848 #define FUNC_NL_LANGINFO_YESEXPR_WORKS $FUNC_NL_LANGINFO_YESEXPR_WORKS
24849 _ACEOF
24850
24851     if test $HAVE_LANGINFO_CODESET = 1 && test $HAVE_LANGINFO_ERA = 1 \
24852         && test $FUNC_NL_LANGINFO_YESEXPR_WORKS = 1; then
24853       :
24854     else
24855       REPLACE_NL_LANGINFO=1
24856
24857 $as_echo "#define REPLACE_NL_LANGINFO 1" >>confdefs.h
24858
24859     fi
24860   else
24861     HAVE_NL_LANGINFO=0
24862   fi
24863
24864   if test $HAVE_NL_LANGINFO = 0 || test $REPLACE_NL_LANGINFO = 1; then
24865
24866
24867
24868
24869
24870
24871
24872
24873   gl_LIBOBJS="$gl_LIBOBJS nl_langinfo.$ac_objext"
24874
24875   fi
24876
24877
24878
24879
24880
24881           GNULIB_NL_LANGINFO=1
24882
24883
24884
24885
24886
24887 $as_echo "#define GNULIB_TEST_NL_LANGINFO 1" >>confdefs.h
24888
24889
24890
24891
24892
24893
24894
24895
24896
24897
24898
24899
24900
24901
24902
24903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for obstacks" >&5
24904 $as_echo_n "checking for obstacks... " >&6; }
24905 if ${ac_cv_func_obstack+:} false; then :
24906   $as_echo_n "(cached) " >&6
24907 else
24908   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24909 /* end confdefs.h.  */
24910 $ac_includes_default
24911                       #include "obstack.h"
24912 int
24913 main ()
24914 {
24915 struct obstack mem;
24916                        #define obstack_chunk_alloc malloc
24917                        #define obstack_chunk_free free
24918                        obstack_init (&mem);
24919                        obstack_free (&mem, 0);
24920   ;
24921   return 0;
24922 }
24923 _ACEOF
24924 if ac_fn_c_try_link "$LINENO"; then :
24925   ac_cv_func_obstack=yes
24926 else
24927   ac_cv_func_obstack=no
24928 fi
24929 rm -f core conftest.err conftest.$ac_objext \
24930     conftest$ac_exeext conftest.$ac_ext
24931 fi
24932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_obstack" >&5
24933 $as_echo "$ac_cv_func_obstack" >&6; }
24934 if test $ac_cv_func_obstack = yes; then
24935
24936 $as_echo "#define HAVE_OBSTACK 1" >>confdefs.h
24937
24938 else
24939
24940
24941
24942
24943
24944
24945
24946
24947   gl_LIBOBJS="$gl_LIBOBJS obstack.$ac_objext"
24948
24949 fi
24950
24951
24952
24953   case "$host_os" in
24954     mingw* | pw*)
24955       REPLACE_OPEN=1
24956       ;;
24957     *)
24958
24959       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
24960 $as_echo_n "checking whether open recognizes a trailing slash... " >&6; }
24961 if ${gl_cv_func_open_slash+:} false; then :
24962   $as_echo_n "(cached) " >&6
24963 else
24964   # Assume that if we have lstat, we can also check symlinks.
24965           if test $ac_cv_func_lstat = yes; then
24966             touch conftest.tmp
24967             ln -s conftest.tmp conftest.lnk
24968           fi
24969           if test "$cross_compiling" = yes; then :
24970
24971              case "$host_os" in
24972                freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
24973                  gl_cv_func_open_slash="guessing no" ;;
24974                *)
24975                  gl_cv_func_open_slash="guessing yes" ;;
24976              esac
24977
24978 else
24979   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24980 /* end confdefs.h.  */
24981
24982 #include <fcntl.h>
24983 #if HAVE_UNISTD_H
24984 # include <unistd.h>
24985 #endif
24986 int main ()
24987 {
24988   int result = 0;
24989 #if HAVE_LSTAT
24990   if (open ("conftest.lnk/", O_RDONLY) != -1)
24991     result |= 1;
24992 #endif
24993   if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
24994     result |= 2;
24995   return result;
24996 }
24997 _ACEOF
24998 if ac_fn_c_try_run "$LINENO"; then :
24999   gl_cv_func_open_slash=yes
25000 else
25001   gl_cv_func_open_slash=no
25002 fi
25003 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25004   conftest.$ac_objext conftest.beam conftest.$ac_ext
25005 fi
25006
25007           rm -f conftest.sl conftest.tmp conftest.lnk
25008
25009 fi
25010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5
25011 $as_echo "$gl_cv_func_open_slash" >&6; }
25012       case "$gl_cv_func_open_slash" in
25013         *no)
25014
25015 $as_echo "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
25016
25017           REPLACE_OPEN=1
25018           ;;
25019       esac
25020       ;;
25021   esac
25022
25023     if test $REPLACE_OPEN = 0; then
25024
25025
25026
25027   if test $ac_cv_func_fchdir = no; then
25028     HAVE_FCHDIR=0
25029   fi
25030
25031       if test $HAVE_FCHDIR = 0; then
25032         REPLACE_OPEN=1
25033       fi
25034     fi
25035
25036
25037
25038   if test $REPLACE_OPEN = 1; then
25039
25040
25041
25042
25043
25044
25045
25046
25047   gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext"
25048
25049
25050
25051   :
25052
25053   fi
25054
25055
25056
25057
25058
25059           GNULIB_OPEN=1
25060
25061
25062
25063
25064
25065 $as_echo "#define GNULIB_TEST_OPEN 1" >>confdefs.h
25066
25067
25068
25069
25070
25071
25072
25073
25074   case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink in
25075   yes+*yes)
25076     ;;
25077   yes+*)
25078     # Solaris 9 has *at functions, but uniformly mishandles trailing
25079     # slash in all of them.
25080     REPLACE_OPENAT=1
25081     ;;
25082   *)
25083     HAVE_OPENAT=0
25084     ;;
25085   esac
25086
25087   if test $HAVE_OPENAT = 0 || test $REPLACE_OPENAT = 1; then
25088
25089
25090
25091
25092
25093
25094
25095
25096   gl_LIBOBJS="$gl_LIBOBJS openat.$ac_objext"
25097
25098
25099
25100   :
25101
25102   fi
25103
25104
25105 cat >>confdefs.h <<_ACEOF
25106 #define GNULIB_OPENAT 1
25107 _ACEOF
25108
25109
25110
25111
25112
25113
25114           GNULIB_OPENAT=1
25115
25116
25117
25118
25119
25120 $as_echo "#define GNULIB_TEST_OPENAT 1" >>confdefs.h
25121
25122
25123
25124
25125
25126
25127   for ac_func in opendir
25128 do :
25129   ac_fn_c_check_func "$LINENO" "opendir" "ac_cv_func_opendir"
25130 if test "x$ac_cv_func_opendir" = xyes; then :
25131   cat >>confdefs.h <<_ACEOF
25132 #define HAVE_OPENDIR 1
25133 _ACEOF
25134
25135 fi
25136 done
25137
25138   if test $ac_cv_func_opendir = no; then
25139     HAVE_OPENDIR=0
25140   fi
25141
25142
25143
25144
25145   if test $ac_cv_func_fchdir = no; then
25146     HAVE_FCHDIR=0
25147   fi
25148
25149     if test $HAVE_FCHDIR = 0; then
25150       if test $HAVE_OPENDIR = 1; then
25151         REPLACE_OPENDIR=1
25152       fi
25153     fi
25154
25155
25156   if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then
25157
25158
25159
25160
25161
25162
25163
25164
25165   gl_LIBOBJS="$gl_LIBOBJS opendir.$ac_objext"
25166
25167   fi
25168
25169
25170
25171
25172
25173           GNULIB_OPENDIR=1
25174
25175
25176
25177
25178
25179 $as_echo "#define GNULIB_TEST_OPENDIR 1" >>confdefs.h
25180
25181
25182
25183
25184
25185
25186
25187
25188
25189   ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
25190 #include <$ac_cv_struct_tm>
25191
25192 "
25193 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
25194
25195 cat >>confdefs.h <<_ACEOF
25196 #define HAVE_STRUCT_TM_TM_ZONE 1
25197 _ACEOF
25198
25199
25200 fi
25201
25202 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
25203
25204 $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
25205
25206 else
25207   ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
25208 "
25209 if test "x$ac_cv_have_decl_tzname" = xyes; then :
25210   ac_have_decl=1
25211 else
25212   ac_have_decl=0
25213 fi
25214
25215 cat >>confdefs.h <<_ACEOF
25216 #define HAVE_DECL_TZNAME $ac_have_decl
25217 _ACEOF
25218
25219   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
25220 $as_echo_n "checking for tzname... " >&6; }
25221 if ${ac_cv_var_tzname+:} false; then :
25222   $as_echo_n "(cached) " >&6
25223 else
25224   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25225 /* end confdefs.h.  */
25226 #include <time.h>
25227 #if !HAVE_DECL_TZNAME
25228 extern char *tzname[];
25229 #endif
25230
25231 int
25232 main ()
25233 {
25234 return tzname[0][0];
25235   ;
25236   return 0;
25237 }
25238 _ACEOF
25239 if ac_fn_c_try_link "$LINENO"; then :
25240   ac_cv_var_tzname=yes
25241 else
25242   ac_cv_var_tzname=no
25243 fi
25244 rm -f core conftest.err conftest.$ac_objext \
25245     conftest$ac_exeext conftest.$ac_ext
25246 fi
25247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
25248 $as_echo "$ac_cv_var_tzname" >&6; }
25249   if test $ac_cv_var_tzname = yes; then
25250
25251 $as_echo "#define HAVE_TZNAME 1" >>confdefs.h
25252
25253   fi
25254 fi
25255
25256
25257
25258   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25259 /* end confdefs.h.  */
25260
25261 #include <time.h> /* for time_t */
25262 #include <limits.h> /* for CHAR_BIT, LONG_MIN, LONG_MAX */
25263 #define TYPE_MINIMUM(t) \
25264   ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
25265 #define TYPE_MAXIMUM(t) \
25266   ((t) ((t) 0 < (t) -1 \
25267         ? (t) -1 \
25268         : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
25269 typedef int verify_min[2 * (LONG_MIN <= TYPE_MINIMUM (time_t)) - 1];
25270 typedef int verify_max[2 * (TYPE_MAXIMUM (time_t) <= LONG_MAX) - 1];
25271
25272 _ACEOF
25273 if ac_fn_c_try_compile "$LINENO"; then :
25274
25275 $as_echo "#define TIME_T_FITS_IN_LONG_INT 1" >>confdefs.h
25276
25277
25278 fi
25279 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25280
25281
25282
25283
25284
25285   for ac_func in getppriv
25286 do :
25287   ac_fn_c_check_func "$LINENO" "getppriv" "ac_cv_func_getppriv"
25288 if test "x$ac_cv_func_getppriv" = xyes; then :
25289   cat >>confdefs.h <<_ACEOF
25290 #define HAVE_GETPPRIV 1
25291 _ACEOF
25292
25293 fi
25294 done
25295
25296
25297
25298   ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
25299 "
25300 if test "x$ac_cv_have_decl_program_invocation_name" = xyes; then :
25301   ac_have_decl=1
25302 else
25303   ac_have_decl=0
25304 fi
25305
25306 cat >>confdefs.h <<_ACEOF
25307 #define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl
25308 _ACEOF
25309
25310   ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
25311 "
25312 if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes; then :
25313   ac_have_decl=1
25314 else
25315   ac_have_decl=0
25316 fi
25317
25318 cat >>confdefs.h <<_ACEOF
25319 #define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl
25320 _ACEOF
25321
25322
25323   # Check whether --enable-acl was given.
25324 if test "${enable_acl+set}" = set; then :
25325   enableval=$enable_acl;
25326 else
25327   enable_acl=auto
25328 fi
25329
25330
25331   LIB_ACL=
25332   use_acl=0
25333   if test "x$enable_acl" != "xno"; then
25334         for ac_header in sys/acl.h
25335 do :
25336   ac_fn_c_check_header_mongrel "$LINENO" "sys/acl.h" "ac_cv_header_sys_acl_h" "$ac_includes_default"
25337 if test "x$ac_cv_header_sys_acl_h" = xyes; then :
25338   cat >>confdefs.h <<_ACEOF
25339 #define HAVE_SYS_ACL_H 1
25340 _ACEOF
25341
25342 fi
25343
25344 done
25345
25346     if test $ac_cv_header_sys_acl_h = yes; then
25347       ac_save_LIBS=$LIBS
25348
25349                   if test $use_acl = 0; then
25350         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing acl_get_file" >&5
25351 $as_echo_n "checking for library containing acl_get_file... " >&6; }
25352 if ${ac_cv_search_acl_get_file+:} false; then :
25353   $as_echo_n "(cached) " >&6
25354 else
25355   ac_func_search_save_LIBS=$LIBS
25356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25357 /* end confdefs.h.  */
25358
25359 /* Override any GCC internal prototype to avoid an error.
25360    Use char because int might match the return type of a GCC
25361    builtin and then its argument prototype would still apply.  */
25362 #ifdef __cplusplus
25363 extern "C"
25364 #endif
25365 char acl_get_file ();
25366 int
25367 main ()
25368 {
25369 return acl_get_file ();
25370   ;
25371   return 0;
25372 }
25373 _ACEOF
25374 for ac_lib in '' acl pacl; do
25375   if test -z "$ac_lib"; then
25376     ac_res="none required"
25377   else
25378     ac_res=-l$ac_lib
25379     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
25380   fi
25381   if ac_fn_c_try_link "$LINENO"; then :
25382   ac_cv_search_acl_get_file=$ac_res
25383 fi
25384 rm -f core conftest.err conftest.$ac_objext \
25385     conftest$ac_exeext
25386   if ${ac_cv_search_acl_get_file+:} false; then :
25387   break
25388 fi
25389 done
25390 if ${ac_cv_search_acl_get_file+:} false; then :
25391
25392 else
25393   ac_cv_search_acl_get_file=no
25394 fi
25395 rm conftest.$ac_ext
25396 LIBS=$ac_func_search_save_LIBS
25397 fi
25398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_acl_get_file" >&5
25399 $as_echo "$ac_cv_search_acl_get_file" >&6; }
25400 ac_res=$ac_cv_search_acl_get_file
25401 if test "$ac_res" != no; then :
25402   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
25403   if test "$ac_cv_search_acl_get_file" != "none required"; then
25404              LIB_ACL=$ac_cv_search_acl_get_file
25405            fi
25406            for ac_func in acl_get_file acl_get_fd acl_set_file acl_set_fd \
25407               acl_free acl_from_mode acl_from_text \
25408               acl_delete_def_file acl_extended_file \
25409               acl_delete_fd_np acl_delete_file_np \
25410               acl_copy_ext_native acl_create_entry_np \
25411               acl_to_short_text acl_free_text
25412 do :
25413   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
25414 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
25415 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
25416   cat >>confdefs.h <<_ACEOF
25417 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
25418 _ACEOF
25419
25420 fi
25421 done
25422
25423            # If the acl_get_file bug is detected, don't enable the ACL support.
25424
25425   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working acl_get_file" >&5
25426 $as_echo_n "checking for working acl_get_file... " >&6; }
25427 if ${gl_cv_func_working_acl_get_file+:} false; then :
25428   $as_echo_n "(cached) " >&6
25429 else
25430   if test "$cross_compiling" = yes; then :
25431   gl_cv_func_working_acl_get_file=cross-compiling
25432 else
25433   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25434 /* end confdefs.h.  */
25435 #include <sys/types.h>
25436            #include <sys/acl.h>
25437            #include <errno.h>
25438
25439 int
25440 main ()
25441 {
25442 if (!acl_get_file (".", ACL_TYPE_ACCESS) && errno == ENOENT)
25443               return 1;
25444             return 0;
25445
25446   ;
25447   return 0;
25448 }
25449 _ACEOF
25450 if ac_fn_c_try_run "$LINENO"; then :
25451   gl_cv_func_working_acl_get_file=yes
25452 else
25453   gl_cv_func_working_acl_get_file=no
25454 fi
25455 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25456   conftest.$ac_objext conftest.beam conftest.$ac_ext
25457 fi
25458
25459 fi
25460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_acl_get_file" >&5
25461 $as_echo "$gl_cv_func_working_acl_get_file" >&6; }
25462
25463   if test $gl_cv_func_working_acl_get_file = yes; then :
25464   use_acl=1
25465 fi
25466
25467            if test $use_acl = 1; then
25468                           for ac_header in acl/libacl.h
25469 do :
25470   ac_fn_c_check_header_mongrel "$LINENO" "acl/libacl.h" "ac_cv_header_acl_libacl_h" "$ac_includes_default"
25471 if test "x$ac_cv_header_acl_libacl_h" = xyes; then :
25472   cat >>confdefs.h <<_ACEOF
25473 #define HAVE_ACL_LIBACL_H 1
25474 _ACEOF
25475
25476 fi
25477
25478 done
25479
25480
25481
25482
25483
25484
25485
25486
25487
25488   for ac_func in acl_entries
25489 do :
25490   ac_fn_c_check_func "$LINENO" "acl_entries" "ac_cv_func_acl_entries"
25491 if test "x$ac_cv_func_acl_entries" = xyes; then :
25492   cat >>confdefs.h <<_ACEOF
25493 #define HAVE_ACL_ENTRIES 1
25494 _ACEOF
25495
25496 else
25497
25498     gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
25499
25500 fi
25501 done
25502
25503
25504              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ACL_FIRST_ENTRY" >&5
25505 $as_echo_n "checking for ACL_FIRST_ENTRY... " >&6; }
25506 if ${gl_cv_acl_ACL_FIRST_ENTRY+:} false; then :
25507   $as_echo_n "(cached) " >&6
25508 else
25509   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25510 /* end confdefs.h.  */
25511 #include <sys/types.h>
25512 #include <sys/acl.h>
25513 int type = ACL_FIRST_ENTRY;
25514 int
25515 main ()
25516 {
25517
25518   ;
25519   return 0;
25520 }
25521 _ACEOF
25522 if ac_fn_c_try_compile "$LINENO"; then :
25523   gl_cv_acl_ACL_FIRST_ENTRY=yes
25524 else
25525   gl_cv_acl_ACL_FIRST_ENTRY=no
25526 fi
25527 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25528 fi
25529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_acl_ACL_FIRST_ENTRY" >&5
25530 $as_echo "$gl_cv_acl_ACL_FIRST_ENTRY" >&6; }
25531              if test $gl_cv_acl_ACL_FIRST_ENTRY = yes; then
25532
25533 $as_echo "#define HAVE_ACL_FIRST_ENTRY 1" >>confdefs.h
25534
25535              fi
25536                           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ACL_TYPE_EXTENDED" >&5
25537 $as_echo_n "checking for ACL_TYPE_EXTENDED... " >&6; }
25538 if ${gl_cv_acl_ACL_TYPE_EXTENDED+:} false; then :
25539   $as_echo_n "(cached) " >&6
25540 else
25541   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25542 /* end confdefs.h.  */
25543 #include <sys/types.h>
25544 #include <sys/acl.h>
25545 int type = ACL_TYPE_EXTENDED;
25546 int
25547 main ()
25548 {
25549
25550   ;
25551   return 0;
25552 }
25553 _ACEOF
25554 if ac_fn_c_try_compile "$LINENO"; then :
25555   gl_cv_acl_ACL_TYPE_EXTENDED=yes
25556 else
25557   gl_cv_acl_ACL_TYPE_EXTENDED=no
25558 fi
25559 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25560 fi
25561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_acl_ACL_TYPE_EXTENDED" >&5
25562 $as_echo "$gl_cv_acl_ACL_TYPE_EXTENDED" >&6; }
25563              if test $gl_cv_acl_ACL_TYPE_EXTENDED = yes; then
25564
25565 $as_echo "#define HAVE_ACL_TYPE_EXTENDED 1" >>confdefs.h
25566
25567              fi
25568            else
25569              LIB_ACL=
25570            fi
25571
25572 fi
25573
25574       fi
25575
25576             if test $use_acl = 0; then
25577         for ac_func in facl
25578 do :
25579   ac_fn_c_check_func "$LINENO" "facl" "ac_cv_func_facl"
25580 if test "x$ac_cv_func_facl" = xyes; then :
25581   cat >>confdefs.h <<_ACEOF
25582 #define HAVE_FACL 1
25583 _ACEOF
25584
25585 fi
25586 done
25587
25588         if test $ac_cv_func_facl = yes; then
25589           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing acl_trivial" >&5
25590 $as_echo_n "checking for library containing acl_trivial... " >&6; }
25591 if ${ac_cv_search_acl_trivial+:} false; then :
25592   $as_echo_n "(cached) " >&6
25593 else
25594   ac_func_search_save_LIBS=$LIBS
25595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25596 /* end confdefs.h.  */
25597
25598 /* Override any GCC internal prototype to avoid an error.
25599    Use char because int might match the return type of a GCC
25600    builtin and then its argument prototype would still apply.  */
25601 #ifdef __cplusplus
25602 extern "C"
25603 #endif
25604 char acl_trivial ();
25605 int
25606 main ()
25607 {
25608 return acl_trivial ();
25609   ;
25610   return 0;
25611 }
25612 _ACEOF
25613 for ac_lib in '' sec; do
25614   if test -z "$ac_lib"; then
25615     ac_res="none required"
25616   else
25617     ac_res=-l$ac_lib
25618     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
25619   fi
25620   if ac_fn_c_try_link "$LINENO"; then :
25621   ac_cv_search_acl_trivial=$ac_res
25622 fi
25623 rm -f core conftest.err conftest.$ac_objext \
25624     conftest$ac_exeext
25625   if ${ac_cv_search_acl_trivial+:} false; then :
25626   break
25627 fi
25628 done
25629 if ${ac_cv_search_acl_trivial+:} false; then :
25630
25631 else
25632   ac_cv_search_acl_trivial=no
25633 fi
25634 rm conftest.$ac_ext
25635 LIBS=$ac_func_search_save_LIBS
25636 fi
25637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_acl_trivial" >&5
25638 $as_echo "$ac_cv_search_acl_trivial" >&6; }
25639 ac_res=$ac_cv_search_acl_trivial
25640 if test "$ac_res" != no; then :
25641   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
25642   if test "$ac_cv_search_acl_trivial" != "none required"; then
25643                LIB_ACL=$ac_cv_search_acl_trivial
25644              fi
25645
25646 fi
25647
25648           for ac_func in acl_trivial
25649 do :
25650   ac_fn_c_check_func "$LINENO" "acl_trivial" "ac_cv_func_acl_trivial"
25651 if test "x$ac_cv_func_acl_trivial" = xyes; then :
25652   cat >>confdefs.h <<_ACEOF
25653 #define HAVE_ACL_TRIVIAL 1
25654 _ACEOF
25655
25656 fi
25657 done
25658
25659           use_acl=1
25660         fi
25661       fi
25662
25663             if test $use_acl = 0; then
25664         for ac_func in getacl
25665 do :
25666   ac_fn_c_check_func "$LINENO" "getacl" "ac_cv_func_getacl"
25667 if test "x$ac_cv_func_getacl" = xyes; then :
25668   cat >>confdefs.h <<_ACEOF
25669 #define HAVE_GETACL 1
25670 _ACEOF
25671
25672 fi
25673 done
25674
25675         if test $ac_cv_func_getacl = yes; then
25676           use_acl=1
25677         fi
25678                 for ac_header in aclv.h
25679 do :
25680   ac_fn_c_check_header_compile "$LINENO" "aclv.h" "ac_cv_header_aclv_h" "#include <sys/types.h>
25681 "
25682 if test "x$ac_cv_header_aclv_h" = xyes; then :
25683   cat >>confdefs.h <<_ACEOF
25684 #define HAVE_ACLV_H 1
25685 _ACEOF
25686
25687 fi
25688
25689 done
25690
25691       fi
25692
25693             if test $use_acl = 0; then
25694         for ac_func in aclx_get
25695 do :
25696   ac_fn_c_check_func "$LINENO" "aclx_get" "ac_cv_func_aclx_get"
25697 if test "x$ac_cv_func_aclx_get" = xyes; then :
25698   cat >>confdefs.h <<_ACEOF
25699 #define HAVE_ACLX_GET 1
25700 _ACEOF
25701
25702 fi
25703 done
25704
25705         if test $ac_cv_func_aclx_get = yes; then
25706           use_acl=1
25707         fi
25708       fi
25709
25710             if test $use_acl = 0 || test "$ac_cv_func_aclx_get" = yes; then
25711         for ac_func in statacl
25712 do :
25713   ac_fn_c_check_func "$LINENO" "statacl" "ac_cv_func_statacl"
25714 if test "x$ac_cv_func_statacl" = xyes; then :
25715   cat >>confdefs.h <<_ACEOF
25716 #define HAVE_STATACL 1
25717 _ACEOF
25718
25719 fi
25720 done
25721
25722         if test $ac_cv_func_statacl = yes; then
25723           use_acl=1
25724         fi
25725       fi
25726
25727             if test $use_acl = 0; then
25728         for ac_func in aclsort
25729 do :
25730   ac_fn_c_check_func "$LINENO" "aclsort" "ac_cv_func_aclsort"
25731 if test "x$ac_cv_func_aclsort" = xyes; then :
25732   cat >>confdefs.h <<_ACEOF
25733 #define HAVE_ACLSORT 1
25734 _ACEOF
25735
25736 fi
25737 done
25738
25739         if test $ac_cv_func_aclsort = yes; then
25740           use_acl=1
25741         fi
25742       fi
25743
25744       LIBS=$ac_save_LIBS
25745     fi
25746     if test "x$enable_acl$use_acl" = "xyes0"; then
25747       as_fn_error $? "ACLs enabled but support not detected" "$LINENO" 5
25748     elif test "x$enable_acl$use_acl" = "xauto0"; then
25749       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libacl development library was not found or not usable." >&5
25750 $as_echo "$as_me: WARNING: libacl development library was not found or not usable." >&2;}
25751       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GNU tar will be built without ACL support." >&5
25752 $as_echo "$as_me: WARNING: GNU tar will be built without ACL support." >&2;}
25753     fi
25754   fi
25755
25756
25757 cat >>confdefs.h <<_ACEOF
25758 #define USE_ACL $use_acl
25759 _ACEOF
25760
25761   USE_ACL=$use_acl
25762
25763
25764
25765       :
25766
25767
25768   :
25769
25770
25771
25772
25773
25774   for ac_func in raise
25775 do :
25776   ac_fn_c_check_func "$LINENO" "raise" "ac_cv_func_raise"
25777 if test "x$ac_cv_func_raise" = xyes; then :
25778   cat >>confdefs.h <<_ACEOF
25779 #define HAVE_RAISE 1
25780 _ACEOF
25781
25782 fi
25783 done
25784
25785   if test $ac_cv_func_raise = no; then
25786     HAVE_RAISE=0
25787   else
25788     if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
25789       REPLACE_RAISE=1
25790     fi
25791
25792   fi
25793
25794   if test $HAVE_RAISE = 0 || test $REPLACE_RAISE = 1; then
25795
25796
25797
25798
25799
25800
25801
25802
25803   gl_LIBOBJS="$gl_LIBOBJS raise.$ac_objext"
25804
25805     :
25806   fi
25807
25808
25809
25810
25811
25812           GNULIB_RAISE=1
25813
25814
25815
25816
25817
25818 $as_echo "#define GNULIB_TEST_RAISE 1" >>confdefs.h
25819
25820
25821
25822
25823
25824
25825
25826   for ac_func in rawmemchr
25827 do :
25828   ac_fn_c_check_func "$LINENO" "rawmemchr" "ac_cv_func_rawmemchr"
25829 if test "x$ac_cv_func_rawmemchr" = xyes; then :
25830   cat >>confdefs.h <<_ACEOF
25831 #define HAVE_RAWMEMCHR 1
25832 _ACEOF
25833
25834 fi
25835 done
25836
25837   if test $ac_cv_func_rawmemchr = no; then
25838     HAVE_RAWMEMCHR=0
25839   fi
25840
25841   if test $HAVE_RAWMEMCHR = 0; then
25842
25843
25844
25845
25846
25847
25848
25849
25850   gl_LIBOBJS="$gl_LIBOBJS rawmemchr.$ac_objext"
25851
25852     :
25853   fi
25854
25855
25856
25857
25858
25859           GNULIB_RAWMEMCHR=1
25860
25861
25862
25863
25864
25865 $as_echo "#define GNULIB_TEST_RAWMEMCHR 1" >>confdefs.h
25866
25867
25868
25869
25870
25871
25872   if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
25873     REPLACE_READ=1
25874   fi
25875
25876
25877   if test $REPLACE_READ = 1; then
25878
25879
25880
25881
25882
25883
25884
25885
25886   gl_LIBOBJS="$gl_LIBOBJS read.$ac_objext"
25887
25888     :
25889   fi
25890
25891
25892
25893
25894
25895           GNULIB_READ=1
25896
25897
25898
25899
25900
25901 $as_echo "#define GNULIB_TEST_READ 1" >>confdefs.h
25902
25903
25904
25905
25906
25907
25908   for ac_func in readdir
25909 do :
25910   ac_fn_c_check_func "$LINENO" "readdir" "ac_cv_func_readdir"
25911 if test "x$ac_cv_func_readdir" = xyes; then :
25912   cat >>confdefs.h <<_ACEOF
25913 #define HAVE_READDIR 1
25914 _ACEOF
25915
25916 fi
25917 done
25918
25919   if test $ac_cv_func_readdir = no; then
25920     HAVE_READDIR=0
25921   fi
25922
25923   if test $HAVE_READDIR = 0; then
25924
25925
25926
25927
25928
25929
25930
25931
25932   gl_LIBOBJS="$gl_LIBOBJS readdir.$ac_objext"
25933
25934   fi
25935
25936
25937
25938
25939
25940           GNULIB_READDIR=1
25941
25942
25943
25944
25945
25946 $as_echo "#define GNULIB_TEST_READDIR 1" >>confdefs.h
25947
25948
25949
25950
25951
25952
25953   if test $ac_cv_func_readlink = no; then
25954     HAVE_READLINK=0
25955   else
25956     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
25957 $as_echo_n "checking whether readlink signature is correct... " >&6; }
25958 if ${gl_cv_decl_readlink_works+:} false; then :
25959   $as_echo_n "(cached) " >&6
25960 else
25961   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25962 /* end confdefs.h.  */
25963 #include <unistd.h>
25964       /* Cause compilation failure if original declaration has wrong type.  */
25965       ssize_t readlink (const char *, char *, size_t);
25966 int
25967 main ()
25968 {
25969
25970   ;
25971   return 0;
25972 }
25973 _ACEOF
25974 if ac_fn_c_try_compile "$LINENO"; then :
25975   gl_cv_decl_readlink_works=yes
25976 else
25977   gl_cv_decl_readlink_works=no
25978 fi
25979 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25980 fi
25981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
25982 $as_echo "$gl_cv_decl_readlink_works" >&6; }
25983             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
25984 $as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; }
25985 if ${gl_cv_func_readlink_works+:} false; then :
25986   $as_echo_n "(cached) " >&6
25987 else
25988   # We have readlink, so assume ln -s works.
25989        ln -s conftest.no-such conftest.link
25990        ln -s conftest.link conftest.lnk2
25991        if test "$cross_compiling" = yes; then :
25992   case "$host_os" in
25993                     # Guess yes on glibc systems.
25994             *-gnu*) gl_cv_func_readlink_works="guessing yes" ;;
25995                     # If we don't know, assume the worst.
25996             *)      gl_cv_func_readlink_works="guessing no" ;;
25997           esac
25998
25999 else
26000   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26001 /* end confdefs.h.  */
26002 #include <unistd.h>
26003
26004 int
26005 main ()
26006 {
26007 char buf[20];
26008       return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
26009   ;
26010   return 0;
26011 }
26012 _ACEOF
26013 if ac_fn_c_try_run "$LINENO"; then :
26014   gl_cv_func_readlink_works=yes
26015 else
26016   gl_cv_func_readlink_works=no
26017 fi
26018 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26019   conftest.$ac_objext conftest.beam conftest.$ac_ext
26020 fi
26021
26022       rm -f conftest.link conftest.lnk2
26023 fi
26024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5
26025 $as_echo "$gl_cv_func_readlink_works" >&6; }
26026     case "$gl_cv_func_readlink_works" in
26027       *yes)
26028         if test "$gl_cv_decl_readlink_works" != yes; then
26029           REPLACE_READLINK=1
26030         fi
26031         ;;
26032       *)
26033
26034 $as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
26035
26036         REPLACE_READLINK=1
26037         ;;
26038     esac
26039   fi
26040
26041   if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
26042
26043
26044
26045
26046
26047
26048
26049
26050   gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext"
26051
26052
26053   :
26054
26055   fi
26056
26057
26058
26059
26060
26061           GNULIB_READLINK=1
26062
26063
26064
26065
26066
26067 $as_echo "#define GNULIB_TEST_READLINK 1" >>confdefs.h
26068
26069
26070
26071
26072
26073
26074
26075   if test $ac_cv_func_readlinkat = no; then
26076     HAVE_READLINKAT=0
26077   fi
26078
26079   if test $HAVE_READLINKAT = 0; then
26080
26081
26082
26083
26084
26085
26086
26087
26088   gl_LIBOBJS="$gl_LIBOBJS readlinkat.$ac_objext"
26089
26090   fi
26091
26092
26093
26094
26095
26096           GNULIB_READLINKAT=1
26097
26098
26099
26100
26101
26102 $as_echo "#define GNULIB_TEST_READLINKAT 1" >>confdefs.h
26103
26104
26105
26106
26107
26108
26109   if test $gl_cv_func_malloc_posix = yes; then
26110
26111 $as_echo "#define HAVE_REALLOC_POSIX 1" >>confdefs.h
26112
26113   else
26114     REPLACE_REALLOC=1
26115   fi
26116
26117   if test $REPLACE_REALLOC = 1; then
26118
26119
26120
26121
26122
26123
26124
26125
26126   gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
26127
26128   fi
26129
26130
26131
26132
26133
26134           GNULIB_REALLOC_POSIX=1
26135
26136
26137
26138
26139
26140 $as_echo "#define GNULIB_TEST_REALLOC_POSIX 1" >>confdefs.h
26141
26142
26143
26144
26145
26146 # Check whether --with-included-regex was given.
26147 if test "${with_included_regex+set}" = set; then :
26148   withval=$with_included_regex;
26149 fi
26150
26151
26152   case $with_included_regex in #(
26153   yes|no) ac_use_included_regex=$with_included_regex
26154         ;;
26155   '')
26156     # If the system regex support is good enough that it passes the
26157     # following run test, then default to *not* using the included regex.c.
26158     # If cross compiling, assume the test would fail and use the included
26159     # regex.c.
26160
26161     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working re_compile_pattern" >&5
26162 $as_echo_n "checking for working re_compile_pattern... " >&6; }
26163 if ${gl_cv_func_re_compile_pattern_working+:} false; then :
26164   $as_echo_n "(cached) " >&6
26165 else
26166   if test "$cross_compiling" = yes; then :
26167          gl_cv_func_re_compile_pattern_working=no
26168 else
26169   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26170 /* end confdefs.h.  */
26171 #include <regex.h>
26172
26173             #include <locale.h>
26174             #include <limits.h>
26175             #include <string.h>
26176             #if HAVE_DECL_ALARM
26177             # include <unistd.h>
26178             # include <signal.h>
26179             #endif
26180
26181 int
26182 main ()
26183 {
26184 int result = 0;
26185             static struct re_pattern_buffer regex;
26186             unsigned char folded_chars[UCHAR_MAX + 1];
26187             int i;
26188             const char *s;
26189             struct re_registers regs;
26190
26191 #if HAVE_DECL_ALARM
26192             /* Some builds of glibc go into an infinite loop on this test.  */
26193             signal (SIGALRM, SIG_DFL);
26194             alarm (2);
26195 #endif
26196             if (setlocale (LC_ALL, "en_US.UTF-8"))
26197               {
26198                 {
26199                   /* http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html
26200                      This test needs valgrind to catch the bug on Debian
26201                      GNU/Linux 3.1 x86, but it might catch the bug better
26202                      on other platforms and it shouldn't hurt to try the
26203                      test here.  */
26204                   static char const pat[] = "insert into";
26205                   static char const data[] =
26206                     "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK";
26207                   re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE
26208                                  | RE_ICASE);
26209                   memset (&regex, 0, sizeof regex);
26210                   s = re_compile_pattern (pat, sizeof pat - 1, &regex);
26211                   if (s)
26212                     result |= 1;
26213                   else if (re_search (&regex, data, sizeof data - 1,
26214                                       0, sizeof data - 1, &regs)
26215                            != -1)
26216                     result |= 1;
26217                 }
26218
26219                 {
26220                   /* This test is from glibc bug 15078.
26221                      The test case is from Andreas Schwab in
26222                      <http://www.sourceware.org/ml/libc-alpha/2013-01/msg00967.html>.
26223                      */
26224                   static char const pat[] = "[^x]x";
26225                   static char const data[] =
26226                     /* <U1000><U103B><U103D><U1014><U103A><U102F><U1015><U103A> */
26227                     "\xe1\x80\x80"
26228                     "\xe1\x80\xbb"
26229                     "\xe1\x80\xbd"
26230                     "\xe1\x80\x94"
26231                     "\xe1\x80\xba"
26232                     "\xe1\x80\xaf"
26233                     "\xe1\x80\x95"
26234                     "\xe1\x80\xba"
26235                     "x";
26236                   re_set_syntax (0);
26237                   memset (&regex, 0, sizeof regex);
26238                   s = re_compile_pattern (pat, sizeof pat - 1, &regex);
26239                   if (s)
26240                     result |= 1;
26241                   else
26242                     {
26243                       i = re_search (&regex, data, sizeof data - 1,
26244                                      0, sizeof data - 1, 0);
26245                       if (i != 0 && i != 21)
26246                         result |= 1;
26247                     }
26248                 }
26249
26250                 if (! setlocale (LC_ALL, "C"))
26251                   return 1;
26252               }
26253
26254             /* This test is from glibc bug 3957, reported by Andrew Mackey.  */
26255             re_set_syntax (RE_SYNTAX_EGREP | RE_HAT_LISTS_NOT_NEWLINE);
26256             memset (&regex, 0, sizeof regex);
26257             s = re_compile_pattern ("a[^x]b", 6, &regex);
26258             if (s)
26259               result |= 2;
26260             /* This should fail, but succeeds for glibc-2.5.  */
26261             else if (re_search (&regex, "a\nb", 3, 0, 3, &regs) != -1)
26262               result |= 2;
26263
26264             /* This regular expression is from Spencer ere test number 75
26265                in grep-2.3.  */
26266             re_set_syntax (RE_SYNTAX_POSIX_EGREP);
26267             memset (&regex, 0, sizeof regex);
26268             for (i = 0; i <= UCHAR_MAX; i++)
26269               folded_chars[i] = i;
26270             regex.translate = folded_chars;
26271             s = re_compile_pattern ("a[[:]:]]b\n", 11, &regex);
26272             /* This should fail with _Invalid character class name_ error.  */
26273             if (!s)
26274               result |= 4;
26275
26276             /* Ensure that [b-a] is diagnosed as invalid, when
26277                using RE_NO_EMPTY_RANGES. */
26278             re_set_syntax (RE_SYNTAX_POSIX_EGREP | RE_NO_EMPTY_RANGES);
26279             memset (&regex, 0, sizeof regex);
26280             s = re_compile_pattern ("a[b-a]", 6, &regex);
26281             if (s == 0)
26282               result |= 8;
26283
26284             /* This should succeed, but does not for glibc-2.1.3.  */
26285             memset (&regex, 0, sizeof regex);
26286             s = re_compile_pattern ("{1", 2, &regex);
26287             if (s)
26288               result |= 8;
26289
26290             /* The following example is derived from a problem report
26291                against gawk from Jorge Stolfi <stolfi@ic.unicamp.br>.  */
26292             memset (&regex, 0, sizeof regex);
26293             s = re_compile_pattern ("[an\371]*n", 7, &regex);
26294             if (s)
26295               result |= 8;
26296             /* This should match, but does not for glibc-2.2.1.  */
26297             else if (re_match (&regex, "an", 2, 0, &regs) != 2)
26298               result |= 8;
26299
26300             memset (&regex, 0, sizeof regex);
26301             s = re_compile_pattern ("x", 1, &regex);
26302             if (s)
26303               result |= 8;
26304             /* glibc-2.2.93 does not work with a negative RANGE argument.  */
26305             else if (re_search (&regex, "wxy", 3, 2, -2, &regs) != 1)
26306               result |= 8;
26307
26308             /* The version of regex.c in older versions of gnulib
26309                ignored RE_ICASE.  Detect that problem too.  */
26310             re_set_syntax (RE_SYNTAX_EMACS | RE_ICASE);
26311             memset (&regex, 0, sizeof regex);
26312             s = re_compile_pattern ("x", 1, &regex);
26313             if (s)
26314               result |= 16;
26315             else if (re_search (&regex, "WXY", 3, 0, 3, &regs) < 0)
26316               result |= 16;
26317
26318             /* Catch a bug reported by Vin Shelton in
26319                http://lists.gnu.org/archive/html/bug-coreutils/2007-06/msg00089.html
26320                */
26321             re_set_syntax (RE_SYNTAX_POSIX_BASIC
26322                            & ~RE_CONTEXT_INVALID_DUP
26323                            & ~RE_NO_EMPTY_RANGES);
26324             memset (&regex, 0, sizeof regex);
26325             s = re_compile_pattern ("[[:alnum:]_-]\\\\+$", 16, &regex);
26326             if (s)
26327               result |= 32;
26328
26329             /* REG_STARTEND was added to glibc on 2004-01-15.
26330                Reject older versions.  */
26331             if (! REG_STARTEND)
26332               result |= 64;
26333
26334 #if 0
26335             /* It would be nice to reject hosts whose regoff_t values are too
26336                narrow (including glibc on hosts with 64-bit ptrdiff_t and
26337                32-bit int), but we should wait until glibc implements this
26338                feature.  Otherwise, support for equivalence classes and
26339                multibyte collation symbols would always be broken except
26340                when compiling --without-included-regex.   */
26341             if (sizeof (regoff_t) < sizeof (ptrdiff_t)
26342                 || sizeof (regoff_t) < sizeof (ssize_t))
26343               result |= 64;
26344 #endif
26345
26346             return result;
26347
26348   ;
26349   return 0;
26350 }
26351 _ACEOF
26352 if ac_fn_c_try_run "$LINENO"; then :
26353   gl_cv_func_re_compile_pattern_working=yes
26354 else
26355   gl_cv_func_re_compile_pattern_working=no
26356 fi
26357 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26358   conftest.$ac_objext conftest.beam conftest.$ac_ext
26359 fi
26360
26361 fi
26362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_re_compile_pattern_working" >&5
26363 $as_echo "$gl_cv_func_re_compile_pattern_working" >&6; }
26364     case $gl_cv_func_re_compile_pattern_working in #(
26365     yes) ac_use_included_regex=no;; #(
26366     no) ac_use_included_regex=yes;;
26367     esac
26368     ;;
26369   *) as_fn_error $? "Invalid value for --with-included-regex: $with_included_regex" "$LINENO" 5
26370     ;;
26371   esac
26372
26373   if test $ac_use_included_regex = yes; then
26374
26375 $as_echo "#define _REGEX_INCLUDE_LIMITS_H 1" >>confdefs.h
26376
26377
26378 $as_echo "#define _REGEX_LARGE_OFFSETS 1" >>confdefs.h
26379
26380
26381 $as_echo "#define re_syntax_options rpl_re_syntax_options" >>confdefs.h
26382
26383
26384 $as_echo "#define re_set_syntax rpl_re_set_syntax" >>confdefs.h
26385
26386
26387 $as_echo "#define re_compile_pattern rpl_re_compile_pattern" >>confdefs.h
26388
26389
26390 $as_echo "#define re_compile_fastmap rpl_re_compile_fastmap" >>confdefs.h
26391
26392
26393 $as_echo "#define re_search rpl_re_search" >>confdefs.h
26394
26395
26396 $as_echo "#define re_search_2 rpl_re_search_2" >>confdefs.h
26397
26398
26399 $as_echo "#define re_match rpl_re_match" >>confdefs.h
26400
26401
26402 $as_echo "#define re_match_2 rpl_re_match_2" >>confdefs.h
26403
26404
26405 $as_echo "#define re_set_registers rpl_re_set_registers" >>confdefs.h
26406
26407
26408 $as_echo "#define re_comp rpl_re_comp" >>confdefs.h
26409
26410
26411 $as_echo "#define re_exec rpl_re_exec" >>confdefs.h
26412
26413
26414 $as_echo "#define regcomp rpl_regcomp" >>confdefs.h
26415
26416
26417 $as_echo "#define regexec rpl_regexec" >>confdefs.h
26418
26419
26420 $as_echo "#define regerror rpl_regerror" >>confdefs.h
26421
26422
26423 $as_echo "#define regfree rpl_regfree" >>confdefs.h
26424
26425   fi
26426
26427   if test $ac_use_included_regex = yes; then
26428
26429
26430
26431
26432
26433
26434
26435
26436   gl_LIBOBJS="$gl_LIBOBJS regex.$ac_objext"
26437
26438
26439
26440
26441
26442
26443
26444   for ac_header in libintl.h
26445 do :
26446   ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
26447 if test "x$ac_cv_header_libintl_h" = xyes; then :
26448   cat >>confdefs.h <<_ACEOF
26449 #define HAVE_LIBINTL_H 1
26450 _ACEOF
26451
26452 fi
26453
26454 done
26455
26456
26457   ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
26458 "
26459 if test "x$ac_cv_have_decl_isblank" = xyes; then :
26460   ac_have_decl=1
26461 else
26462   ac_have_decl=0
26463 fi
26464
26465 cat >>confdefs.h <<_ACEOF
26466 #define HAVE_DECL_ISBLANK $ac_have_decl
26467 _ACEOF
26468
26469
26470   fi
26471
26472
26473
26474
26475
26476                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on destination" >&5
26477 $as_echo_n "checking whether rename honors trailing slash on destination... " >&6; }
26478 if ${gl_cv_func_rename_slash_dst_works+:} false; then :
26479   $as_echo_n "(cached) " >&6
26480 else
26481   rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
26482     touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
26483       as_fn_error $? "cannot create temporary files" "$LINENO" 5
26484     # Assume that if we have lstat, we can also check symlinks.
26485     if test $ac_cv_func_lstat = yes; then
26486       ln -s conftest.f conftest.lnk
26487     fi
26488     if test "$cross_compiling" = yes; then :
26489         case "$host_os" in
26490                  # Guess yes on glibc systems.
26491          *-gnu*) gl_cv_func_rename_slash_dst_works="guessing yes" ;;
26492                  # If we don't know, assume the worst.
26493          *)      gl_cv_func_rename_slash_dst_works="guessing no" ;;
26494        esac
26495
26496 else
26497   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26498 /* end confdefs.h.  */
26499
26500 #        include <stdio.h>
26501 #        include <stdlib.h>
26502
26503 int
26504 main ()
26505 {
26506 int result = 0;
26507            if (rename ("conftest.f1", "conftest.f2/") == 0)
26508              result |= 1;
26509            if (rename ("conftest.d1", "conftest.d2/") != 0)
26510              result |= 2;
26511 #if HAVE_LSTAT
26512            if (rename ("conftest.f", "conftest.lnk/") == 0)
26513              result |= 4;
26514 #endif
26515            return result;
26516
26517   ;
26518   return 0;
26519 }
26520 _ACEOF
26521 if ac_fn_c_try_run "$LINENO"; then :
26522   gl_cv_func_rename_slash_dst_works=yes
26523 else
26524   gl_cv_func_rename_slash_dst_works=no
26525 fi
26526 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26527   conftest.$ac_objext conftest.beam conftest.$ac_ext
26528 fi
26529
26530     rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
26531
26532 fi
26533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_dst_works" >&5
26534 $as_echo "$gl_cv_func_rename_slash_dst_works" >&6; }
26535   case "$gl_cv_func_rename_slash_dst_works" in
26536     *yes) ;;
26537     *)
26538       REPLACE_RENAME=1
26539
26540 $as_echo "#define RENAME_TRAILING_SLASH_DEST_BUG 1" >>confdefs.h
26541
26542       ;;
26543   esac
26544
26545             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on source" >&5
26546 $as_echo_n "checking whether rename honors trailing slash on source... " >&6; }
26547 if ${gl_cv_func_rename_slash_src_works+:} false; then :
26548   $as_echo_n "(cached) " >&6
26549 else
26550   rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
26551     touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
26552       as_fn_error $? "cannot create temporary files" "$LINENO" 5
26553     # Assume that if we have lstat, we can also check symlinks.
26554     if test $ac_cv_func_lstat = yes; then
26555       ln -s conftest.f conftest.lnk
26556     fi
26557     if test "$cross_compiling" = yes; then :
26558         case "$host_os" in
26559                  # Guess yes on glibc systems.
26560          *-gnu*) gl_cv_func_rename_slash_src_works="guessing yes" ;;
26561                  # If we don't know, assume the worst.
26562          *)      gl_cv_func_rename_slash_src_works="guessing no" ;;
26563        esac
26564
26565 else
26566   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26567 /* end confdefs.h.  */
26568
26569 #        include <stdio.h>
26570 #        include <stdlib.h>
26571
26572 int
26573 main ()
26574 {
26575 int result = 0;
26576            if (rename ("conftest.f1/", "conftest.d3") == 0)
26577              result |= 1;
26578            if (rename ("conftest.d1/", "conftest.d2") != 0)
26579              result |= 2;
26580 #if HAVE_LSTAT
26581            if (rename ("conftest.lnk/", "conftest.f") == 0)
26582              result |= 4;
26583 #endif
26584            return result;
26585
26586   ;
26587   return 0;
26588 }
26589 _ACEOF
26590 if ac_fn_c_try_run "$LINENO"; then :
26591   gl_cv_func_rename_slash_src_works=yes
26592 else
26593   gl_cv_func_rename_slash_src_works=no
26594 fi
26595 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26596   conftest.$ac_objext conftest.beam conftest.$ac_ext
26597 fi
26598
26599     rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
26600
26601 fi
26602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_src_works" >&5
26603 $as_echo "$gl_cv_func_rename_slash_src_works" >&6; }
26604   case "$gl_cv_func_rename_slash_src_works" in
26605     *yes) ;;
26606     *)
26607       REPLACE_RENAME=1
26608
26609 $as_echo "#define RENAME_TRAILING_SLASH_SOURCE_BUG 1" >>confdefs.h
26610
26611       ;;
26612   esac
26613
26614
26615   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages hard links correctly" >&5
26616 $as_echo_n "checking whether rename manages hard links correctly... " >&6; }
26617 if ${gl_cv_func_rename_link_works+:} false; then :
26618   $as_echo_n "(cached) " >&6
26619 else
26620   if test $ac_cv_func_link = yes; then
26621        rm -rf conftest.f conftest.f1
26622        if touch conftest.f && ln conftest.f conftest.f1 &&
26623            set x `ls -i conftest.f conftest.f1` && test "" = ""; then
26624          if test "$cross_compiling" = yes; then :
26625              case "$host_os" in
26626                       # Guess yes on glibc systems.
26627               *-gnu*) gl_cv_func_rename_link_works="guessing yes" ;;
26628                       # If we don't know, assume the worst.
26629               *)      gl_cv_func_rename_link_works="guessing no" ;;
26630             esac
26631
26632 else
26633   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26634 /* end confdefs.h.  */
26635
26636 #             include <stdio.h>
26637 #             include <stdlib.h>
26638 #             include <unistd.h>
26639
26640 int
26641 main ()
26642 {
26643 int result = 0;
26644                 if (rename ("conftest.f", "conftest.f1"))
26645                   result |= 1;
26646                 if (unlink ("conftest.f1"))
26647                   result |= 2;
26648                 if (rename ("conftest.f", "conftest.f"))
26649                   result |= 4;
26650                 if (rename ("conftest.f1", "conftest.f1") == 0)
26651                   result |= 8;
26652                 return result;
26653
26654   ;
26655   return 0;
26656 }
26657 _ACEOF
26658 if ac_fn_c_try_run "$LINENO"; then :
26659   gl_cv_func_rename_link_works=yes
26660 else
26661   gl_cv_func_rename_link_works=no
26662 fi
26663 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26664   conftest.$ac_objext conftest.beam conftest.$ac_ext
26665 fi
26666
26667        else
26668          gl_cv_func_rename_link_works="guessing no"
26669        fi
26670        rm -rf conftest.f conftest.f1
26671      else
26672        gl_cv_func_rename_link_works=yes
26673      fi
26674
26675 fi
26676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_link_works" >&5
26677 $as_echo "$gl_cv_func_rename_link_works" >&6; }
26678   case "$gl_cv_func_rename_link_works" in
26679     *yes) ;;
26680     *)
26681       REPLACE_RENAME=1
26682
26683 $as_echo "#define RENAME_HARD_LINK_BUG 1" >>confdefs.h
26684
26685       ;;
26686   esac
26687
26688           { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages existing destinations correctly" >&5
26689 $as_echo_n "checking whether rename manages existing destinations correctly... " >&6; }
26690 if ${gl_cv_func_rename_dest_works+:} false; then :
26691   $as_echo_n "(cached) " >&6
26692 else
26693   rm -rf conftest.f conftest.d1 conftest.d2
26694     touch conftest.f && mkdir conftest.d1 conftest.d2 ||
26695       as_fn_error $? "cannot create temporary files" "$LINENO" 5
26696     if test "$cross_compiling" = yes; then :
26697         case "$host_os" in
26698                  # Guess yes on glibc systems.
26699          *-gnu*) gl_cv_func_rename_dest_works="guessing yes" ;;
26700                  # If we don't know, assume the worst.
26701          *)      gl_cv_func_rename_dest_works="guessing no" ;;
26702        esac
26703
26704 else
26705   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26706 /* end confdefs.h.  */
26707
26708 #        include <stdio.h>
26709 #        include <stdlib.h>
26710
26711 int
26712 main ()
26713 {
26714 int result = 0;
26715            if (rename ("conftest.d1", "conftest.d2") != 0)
26716              result |= 1;
26717            if (rename ("conftest.d2", "conftest.f") == 0)
26718              result |= 2;
26719            return result;
26720
26721   ;
26722   return 0;
26723 }
26724 _ACEOF
26725 if ac_fn_c_try_run "$LINENO"; then :
26726   gl_cv_func_rename_dest_works=yes
26727 else
26728   gl_cv_func_rename_dest_works=no
26729 fi
26730 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26731   conftest.$ac_objext conftest.beam conftest.$ac_ext
26732 fi
26733
26734     rm -rf conftest.f conftest.d1 conftest.d2
26735
26736 fi
26737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_dest_works" >&5
26738 $as_echo "$gl_cv_func_rename_dest_works" >&6; }
26739   case "$gl_cv_func_rename_dest_works" in
26740     *yes) ;;
26741     *)
26742       REPLACE_RENAME=1
26743
26744 $as_echo "#define RENAME_DEST_EXISTS_BUG 1" >>confdefs.h
26745
26746       ;;
26747   esac
26748
26749   if test $REPLACE_RENAME = 1; then
26750
26751
26752
26753
26754
26755
26756
26757
26758   gl_LIBOBJS="$gl_LIBOBJS rename.$ac_objext"
26759
26760   fi
26761
26762
26763
26764
26765
26766           GNULIB_RENAME=1
26767
26768
26769
26770
26771
26772 $as_echo "#define GNULIB_TEST_RENAME 1" >>confdefs.h
26773
26774
26775
26776
26777
26778
26779
26780
26781
26782   if test $ac_cv_func_renameat = no; then
26783     HAVE_RENAMEAT=0
26784   elif test $REPLACE_RENAME = 1; then
26785         REPLACE_RENAMEAT=1
26786   fi
26787
26788   if test $HAVE_RENAMEAT = 0 || test $REPLACE_RENAMEAT = 1; then
26789
26790
26791
26792
26793
26794
26795
26796
26797   gl_LIBOBJS="$gl_LIBOBJS renameat.$ac_objext"
26798
26799   fi
26800   if test $HAVE_RENAMEAT = 0; then
26801
26802
26803
26804
26805
26806
26807
26808
26809   gl_LIBOBJS="$gl_LIBOBJS at-func2.$ac_objext"
26810
26811   fi
26812
26813
26814
26815
26816
26817           GNULIB_RENAMEAT=1
26818
26819
26820
26821
26822
26823 $as_echo "#define GNULIB_TEST_RENAMEAT 1" >>confdefs.h
26824
26825
26826
26827
26828
26829
26830   for ac_func in rewinddir
26831 do :
26832   ac_fn_c_check_func "$LINENO" "rewinddir" "ac_cv_func_rewinddir"
26833 if test "x$ac_cv_func_rewinddir" = xyes; then :
26834   cat >>confdefs.h <<_ACEOF
26835 #define HAVE_REWINDDIR 1
26836 _ACEOF
26837
26838 fi
26839 done
26840
26841   if test $ac_cv_func_rewinddir = no; then
26842     HAVE_REWINDDIR=0
26843   fi
26844
26845   if test $HAVE_REWINDDIR = 0; then
26846
26847
26848
26849
26850
26851
26852
26853
26854   gl_LIBOBJS="$gl_LIBOBJS rewinddir.$ac_objext"
26855
26856   fi
26857
26858
26859
26860
26861
26862           GNULIB_REWINDDIR=1
26863
26864
26865
26866
26867
26868 $as_echo "#define GNULIB_TEST_REWINDDIR 1" >>confdefs.h
26869
26870
26871
26872
26873
26874
26875   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rmdir works" >&5
26876 $as_echo_n "checking whether rmdir works... " >&6; }
26877 if ${gl_cv_func_rmdir_works+:} false; then :
26878   $as_echo_n "(cached) " >&6
26879 else
26880   mkdir conftest.dir
26881      touch conftest.file
26882      if test "$cross_compiling" = yes; then :
26883   case "$host_os" in
26884                   # Guess yes on glibc systems.
26885           *-gnu*) gl_cv_func_rmdir_works="guessing yes" ;;
26886                   # If we don't know, assume the worst.
26887           *)      gl_cv_func_rmdir_works="guessing no" ;;
26888         esac
26889
26890 else
26891   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26892 /* end confdefs.h.  */
26893 #include <stdio.h>
26894            #include <errno.h>
26895            #if HAVE_UNISTD_H
26896            # include <unistd.h>
26897            #else /* on Windows with MSVC */
26898            # include <direct.h>
26899            #endif
26900
26901 int
26902 main ()
26903 {
26904 int result = 0;
26905       if (!rmdir ("conftest.file/"))
26906         result |= 1;
26907       else if (errno != ENOTDIR)
26908         result |= 2;
26909       if (!rmdir ("conftest.dir/./"))
26910         result |= 4;
26911       return result;
26912
26913   ;
26914   return 0;
26915 }
26916 _ACEOF
26917 if ac_fn_c_try_run "$LINENO"; then :
26918   gl_cv_func_rmdir_works=yes
26919 else
26920   gl_cv_func_rmdir_works=no
26921 fi
26922 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26923   conftest.$ac_objext conftest.beam conftest.$ac_ext
26924 fi
26925
26926      rm -rf conftest.dir conftest.file
26927 fi
26928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rmdir_works" >&5
26929 $as_echo "$gl_cv_func_rmdir_works" >&6; }
26930   case "$gl_cv_func_rmdir_works" in
26931     *yes) ;;
26932     *)
26933       REPLACE_RMDIR=1
26934       ;;
26935   esac
26936
26937   if test $REPLACE_RMDIR = 1; then
26938
26939
26940
26941
26942
26943
26944
26945
26946   gl_LIBOBJS="$gl_LIBOBJS rmdir.$ac_objext"
26947
26948   fi
26949
26950
26951
26952
26953
26954           GNULIB_RMDIR=1
26955
26956
26957
26958
26959
26960 $as_echo "#define GNULIB_TEST_RMDIR 1" >>confdefs.h
26961
26962
26963
26964
26965
26966
26967
26968   for ac_func in rpmatch
26969 do :
26970   ac_fn_c_check_func "$LINENO" "rpmatch" "ac_cv_func_rpmatch"
26971 if test "x$ac_cv_func_rpmatch" = xyes; then :
26972   cat >>confdefs.h <<_ACEOF
26973 #define HAVE_RPMATCH 1
26974 _ACEOF
26975
26976 fi
26977 done
26978
26979   if test $ac_cv_func_rpmatch = no; then
26980     HAVE_RPMATCH=0
26981   fi
26982
26983   if test $HAVE_RPMATCH = 0; then
26984
26985
26986
26987
26988
26989
26990
26991
26992   gl_LIBOBJS="$gl_LIBOBJS rpmatch.$ac_objext"
26993
26994
26995   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and YESEXPR" >&5
26996 $as_echo_n "checking for nl_langinfo and YESEXPR... " >&6; }
26997 if ${gl_cv_langinfo_yesexpr+:} false; then :
26998   $as_echo_n "(cached) " >&6
26999 else
27000   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27001 /* end confdefs.h.  */
27002 #include <langinfo.h>
27003 int
27004 main ()
27005 {
27006 char* cs = nl_langinfo(YESEXPR); return !cs;
27007   ;
27008   return 0;
27009 }
27010 _ACEOF
27011 if ac_fn_c_try_link "$LINENO"; then :
27012   gl_cv_langinfo_yesexpr=yes
27013 else
27014   gl_cv_langinfo_yesexpr=no
27015 fi
27016 rm -f core conftest.err conftest.$ac_objext \
27017     conftest$ac_exeext conftest.$ac_ext
27018
27019 fi
27020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_langinfo_yesexpr" >&5
27021 $as_echo "$gl_cv_langinfo_yesexpr" >&6; }
27022   if test $gl_cv_langinfo_yesexpr = yes; then
27023
27024 $as_echo "#define HAVE_LANGINFO_YESEXPR 1" >>confdefs.h
27025
27026   fi
27027
27028   fi
27029
27030
27031
27032
27033
27034           GNULIB_RPMATCH=1
27035
27036
27037
27038
27039
27040 $as_echo "#define GNULIB_TEST_RPMATCH 1" >>confdefs.h
27041
27042
27043
27044
27045
27046
27047
27048
27049
27050
27051
27052
27053
27054
27055
27056   :
27057
27058
27059
27060
27061
27062
27063   if test $ac_cv_func_secure_getenv = no; then
27064     HAVE_SECURE_GETENV=0
27065   fi
27066
27067   if test $HAVE_SECURE_GETENV = 0; then
27068
27069
27070
27071
27072
27073
27074
27075
27076   gl_LIBOBJS="$gl_LIBOBJS secure_getenv.$ac_objext"
27077
27078
27079   for ac_func in __secure_getenv
27080 do :
27081   ac_fn_c_check_func "$LINENO" "__secure_getenv" "ac_cv_func___secure_getenv"
27082 if test "x$ac_cv_func___secure_getenv" = xyes; then :
27083   cat >>confdefs.h <<_ACEOF
27084 #define HAVE___SECURE_GETENV 1
27085 _ACEOF
27086
27087 fi
27088 done
27089
27090   if test $ac_cv_func___secure_getenv = no; then
27091     for ac_func in issetugid
27092 do :
27093   ac_fn_c_check_func "$LINENO" "issetugid" "ac_cv_func_issetugid"
27094 if test "x$ac_cv_func_issetugid" = xyes; then :
27095   cat >>confdefs.h <<_ACEOF
27096 #define HAVE_ISSETUGID 1
27097 _ACEOF
27098
27099 fi
27100 done
27101
27102   fi
27103
27104   fi
27105
27106
27107
27108
27109
27110           GNULIB_SECURE_GETENV=1
27111
27112
27113
27114
27115
27116 $as_echo "#define GNULIB_TEST_SECURE_GETENV 1" >>confdefs.h
27117
27118
27119
27120   for ac_header in selinux/flask.h
27121 do :
27122   ac_fn_c_check_header_mongrel "$LINENO" "selinux/flask.h" "ac_cv_header_selinux_flask_h" "$ac_includes_default"
27123 if test "x$ac_cv_header_selinux_flask_h" = xyes; then :
27124   cat >>confdefs.h <<_ACEOF
27125 #define HAVE_SELINUX_FLASK_H 1
27126 _ACEOF
27127
27128 fi
27129
27130 done
27131
27132
27133
27134
27135
27136
27137
27138
27139
27140   gl_LIBOBJS="$gl_LIBOBJS selinux-at.$ac_objext"
27141
27142
27143
27144   if test "$with_selinux" != no; then
27145     for ac_header in selinux/selinux.h
27146 do :
27147   ac_fn_c_check_header_mongrel "$LINENO" "selinux/selinux.h" "ac_cv_header_selinux_selinux_h" "$ac_includes_default"
27148 if test "x$ac_cv_header_selinux_selinux_h" = xyes; then :
27149   cat >>confdefs.h <<_ACEOF
27150 #define HAVE_SELINUX_SELINUX_H 1
27151 _ACEOF
27152
27153 fi
27154
27155 done
27156
27157
27158     if test "$ac_cv_header_selinux_selinux_h" = yes; then
27159       # We do have <selinux/selinux.h>, so do compile getfilecon.c
27160       # and arrange to use its wrappers.
27161
27162
27163
27164
27165
27166
27167
27168
27169
27170      if test $gl_cv_have_include_next = yes; then
27171        gl_cv_next_selinux_selinux_h='<'selinux/selinux.h'>'
27172      else
27173        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <selinux/selinux.h>" >&5
27174 $as_echo_n "checking absolute name of <selinux/selinux.h>... " >&6; }
27175 if ${gl_cv_next_selinux_selinux_h+:} false; then :
27176   $as_echo_n "(cached) " >&6
27177 else
27178
27179              if test $ac_cv_header_selinux_selinux_h = yes; then
27180
27181
27182                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27183 /* end confdefs.h.  */
27184 #include <selinux/selinux.h>
27185
27186 _ACEOF
27187                                                                                                                         case "$host_os" in
27188                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
27189                  *)    gl_absname_cpp="$ac_cpp" ;;
27190                esac
27191
27192                case "$host_os" in
27193                  mingw*)
27194                                                                                                                                      gl_dirsep_regex='[/\\]'
27195                    ;;
27196                  *)
27197                    gl_dirsep_regex='\/'
27198                    ;;
27199                esac
27200                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
27201
27202                gl_header_literal_regex=`echo 'selinux/selinux.h' \
27203                                         | sed -e "$gl_make_literal_regex_sed"`
27204                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27205                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27206                    s|^/[^/]|//&|
27207                    p
27208                    q
27209                  }'
27210                                                             gl_cv_next_selinux_selinux_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27211                       sed -n "$gl_absolute_header_sed"`'"'
27212           else
27213                gl_cv_next_selinux_selinux_h='<'selinux/selinux.h'>'
27214              fi
27215
27216
27217 fi
27218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_selinux_selinux_h" >&5
27219 $as_echo "$gl_cv_next_selinux_selinux_h" >&6; }
27220      fi
27221      NEXT_SELINUX_SELINUX_H=$gl_cv_next_selinux_selinux_h
27222
27223      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27224        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27225        gl_next_as_first_directive='<'selinux/selinux.h'>'
27226      else
27227        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27228        gl_next_as_first_directive=$gl_cv_next_selinux_selinux_h
27229      fi
27230      NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H=$gl_next_as_first_directive
27231
27232
27233
27234
27235
27236 $as_echo "#define getfilecon rpl_getfilecon" >>confdefs.h
27237
27238
27239 $as_echo "#define lgetfilecon rpl_lgetfilecon" >>confdefs.h
27240
27241
27242 $as_echo "#define fgetfilecon rpl_fgetfilecon" >>confdefs.h
27243
27244     fi
27245
27246     case "$ac_cv_search_setfilecon:$ac_cv_header_selinux_selinux_h" in
27247       no:*) # already warned
27248         ;;
27249       *:no)
27250         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libselinux was found but selinux/selinux.h is missing." >&5
27251 $as_echo "$as_me: WARNING: libselinux was found but selinux/selinux.h is missing." >&2;}
27252         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GNU tar will be compiled without SELinux support." >&5
27253 $as_echo "$as_me: WARNING: GNU tar will be compiled without SELinux support." >&2;}
27254     esac
27255   else
27256     # Do as if <selinux/selinux.h> does not exist, even if
27257     # AC_CHECK_HEADERS_ONCE has already determined that it exists.
27258     $as_echo "#define HAVE_SELINUX_SELINUX_H 0" >>confdefs.h
27259
27260   fi
27261
27262
27263
27264   if test "$with_selinux" != no; then
27265     for ac_header in selinux/context.h
27266 do :
27267   ac_fn_c_check_header_mongrel "$LINENO" "selinux/context.h" "ac_cv_header_selinux_context_h" "$ac_includes_default"
27268 if test "x$ac_cv_header_selinux_context_h" = xyes; then :
27269   cat >>confdefs.h <<_ACEOF
27270 #define HAVE_SELINUX_CONTEXT_H 1
27271 _ACEOF
27272  SELINUX_CONTEXT_H=
27273 else
27274   SELINUX_CONTEXT_H=selinux/context.h
27275 fi
27276
27277 done
27278
27279   else
27280     SELINUX_CONTEXT_H=selinux/context.h
27281   fi
27282
27283    if test -n "$SELINUX_CONTEXT_H"; then
27284   GL_GENERATE_SELINUX_CONTEXT_H_TRUE=
27285   GL_GENERATE_SELINUX_CONTEXT_H_FALSE='#'
27286 else
27287   GL_GENERATE_SELINUX_CONTEXT_H_TRUE='#'
27288   GL_GENERATE_SELINUX_CONTEXT_H_FALSE=
27289 fi
27290
27291
27292   if test "$with_selinux" != no && test "$ac_cv_header_selinux_selinux_h" = yes; then
27293
27294
27295
27296
27297
27298
27299
27300
27301   gl_LIBOBJS="$gl_LIBOBJS getfilecon.$ac_objext"
27302
27303   fi
27304
27305
27306      if test $ac_cv_func_setenv = no; then
27307     HAVE_SETENV=0
27308   else
27309     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setenv validates arguments" >&5
27310 $as_echo_n "checking whether setenv validates arguments... " >&6; }
27311 if ${gl_cv_func_setenv_works+:} false; then :
27312   $as_echo_n "(cached) " >&6
27313 else
27314   if test "$cross_compiling" = yes; then :
27315   case "$host_os" in
27316                  # Guess yes on glibc systems.
27317          *-gnu*) gl_cv_func_setenv_works="guessing yes" ;;
27318                  # If we don't know, assume the worst.
27319          *)      gl_cv_func_setenv_works="guessing no" ;;
27320        esac
27321
27322 else
27323   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27324 /* end confdefs.h.  */
27325
27326        #include <stdlib.h>
27327        #include <errno.h>
27328        #include <string.h>
27329
27330 int
27331 main ()
27332 {
27333
27334        int result = 0;
27335        {
27336          if (setenv ("", "", 0) != -1)
27337            result |= 1;
27338          else if (errno != EINVAL)
27339            result |= 2;
27340        }
27341        {
27342          if (setenv ("a", "=", 1) != 0)
27343            result |= 4;
27344          else if (strcmp (getenv ("a"), "=") != 0)
27345            result |= 8;
27346        }
27347        return result;
27348
27349   ;
27350   return 0;
27351 }
27352 _ACEOF
27353 if ac_fn_c_try_run "$LINENO"; then :
27354   gl_cv_func_setenv_works=yes
27355 else
27356   gl_cv_func_setenv_works=no
27357 fi
27358 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27359   conftest.$ac_objext conftest.beam conftest.$ac_ext
27360 fi
27361
27362 fi
27363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setenv_works" >&5
27364 $as_echo "$gl_cv_func_setenv_works" >&6; }
27365     case "$gl_cv_func_setenv_works" in
27366       *yes) ;;
27367       *)
27368         REPLACE_SETENV=1
27369         ;;
27370     esac
27371   fi
27372
27373   if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then
27374
27375
27376
27377
27378
27379
27380
27381
27382   gl_LIBOBJS="$gl_LIBOBJS setenv.$ac_objext"
27383
27384   fi
27385
27386
27387
27388
27389
27390           GNULIB_SETENV=1
27391
27392
27393
27394
27395
27396 $as_echo "#define GNULIB_TEST_SETENV 1" >>confdefs.h
27397
27398
27399
27400
27401
27402
27403
27404
27405
27406
27407
27408
27409
27410
27411      if test $gl_cv_have_include_next = yes; then
27412        gl_cv_next_signal_h='<'signal.h'>'
27413      else
27414        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
27415 $as_echo_n "checking absolute name of <signal.h>... " >&6; }
27416 if ${gl_cv_next_signal_h+:} false; then :
27417   $as_echo_n "(cached) " >&6
27418 else
27419
27420                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27421 /* end confdefs.h.  */
27422 #include <signal.h>
27423
27424 _ACEOF
27425                                                                                                                         case "$host_os" in
27426                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
27427                  *)    gl_absname_cpp="$ac_cpp" ;;
27428                esac
27429
27430                case "$host_os" in
27431                  mingw*)
27432                                                                                                                                      gl_dirsep_regex='[/\\]'
27433                    ;;
27434                  *)
27435                    gl_dirsep_regex='\/'
27436                    ;;
27437                esac
27438                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
27439
27440                gl_header_literal_regex=`echo 'signal.h' \
27441                                         | sed -e "$gl_make_literal_regex_sed"`
27442                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27443                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27444                    s|^/[^/]|//&|
27445                    p
27446                    q
27447                  }'
27448                                                             gl_cv_next_signal_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27449                       sed -n "$gl_absolute_header_sed"`'"'
27450
27451
27452 fi
27453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
27454 $as_echo "$gl_cv_next_signal_h" >&6; }
27455      fi
27456      NEXT_SIGNAL_H=$gl_cv_next_signal_h
27457
27458      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27459        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27460        gl_next_as_first_directive='<'signal.h'>'
27461      else
27462        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27463        gl_next_as_first_directive=$gl_cv_next_signal_h
27464      fi
27465      NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
27466
27467
27468
27469
27470
27471 # AIX declares sig_atomic_t to already include volatile, and C89 compilers
27472 # then choke on 'volatile sig_atomic_t'.  C99 requires that it compile.
27473   ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
27474 #include <signal.h>
27475
27476 "
27477 if test "x$ac_cv_type_volatile_sig_atomic_t" = xyes; then :
27478
27479 else
27480   HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
27481 fi
27482
27483
27484
27485
27486
27487
27488
27489   ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
27490 #include <signal.h>
27491
27492 "
27493 if test "x$ac_cv_type_sighandler_t" = xyes; then :
27494
27495 else
27496   HAVE_SIGHANDLER_T=0
27497 fi
27498
27499
27500
27501     for gl_func in pthread_sigmask sigaction     sigaddset sigdelset sigemptyset sigfillset sigismember     sigpending sigprocmask; do
27502     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
27503     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
27504 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
27505 if eval \${$as_gl_Symbol+:} false; then :
27506   $as_echo_n "(cached) " >&6
27507 else
27508   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27509 /* end confdefs.h.  */
27510 #include <signal.h>
27511
27512 int
27513 main ()
27514 {
27515 #undef $gl_func
27516   (void) $gl_func;
27517   ;
27518   return 0;
27519 }
27520 _ACEOF
27521 if ac_fn_c_try_compile "$LINENO"; then :
27522   eval "$as_gl_Symbol=yes"
27523 else
27524   eval "$as_gl_Symbol=no"
27525 fi
27526 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27527 fi
27528 eval ac_res=\$$as_gl_Symbol
27529                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
27530 $as_echo "$ac_res" >&6; }
27531     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
27532   cat >>confdefs.h <<_ACEOF
27533 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
27534 _ACEOF
27535
27536                      eval ac_cv_have_decl_$gl_func=yes
27537 fi
27538       done
27539
27540
27541
27542   for ac_header in stdint.h
27543 do :
27544   ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
27545 if test "x$ac_cv_header_stdint_h" = xyes; then :
27546   cat >>confdefs.h <<_ACEOF
27547 #define HAVE_STDINT_H 1
27548 _ACEOF
27549
27550 fi
27551
27552 done
27553
27554     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIZE_MAX" >&5
27555 $as_echo_n "checking for SIZE_MAX... " >&6; }
27556 if ${gl_cv_size_max+:} false; then :
27557   $as_echo_n "(cached) " >&6
27558 else
27559
27560     gl_cv_size_max=
27561     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27562 /* end confdefs.h.  */
27563
27564 #include <limits.h>
27565 #if HAVE_STDINT_H
27566 #include <stdint.h>
27567 #endif
27568 #ifdef SIZE_MAX
27569 Found it
27570 #endif
27571
27572 _ACEOF
27573 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27574   $EGREP "Found it" >/dev/null 2>&1; then :
27575   gl_cv_size_max=yes
27576 fi
27577 rm -f conftest*
27578
27579     if test -z "$gl_cv_size_max"; then
27580                         if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) * CHAR_BIT - 1" "size_t_bits_minus_1"        "#include <stddef.h>
27581 #include <limits.h>"; then :
27582
27583 else
27584   size_t_bits_minus_1=
27585 fi
27586
27587       if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) <= sizeof (unsigned int)" "fits_in_uint"        "#include <stddef.h>"; then :
27588
27589 else
27590   fits_in_uint=
27591 fi
27592
27593       if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then
27594         if test $fits_in_uint = 1; then
27595                               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27596 /* end confdefs.h.  */
27597 #include <stddef.h>
27598                  extern size_t foo;
27599                  extern unsigned long foo;
27600
27601 int
27602 main ()
27603 {
27604
27605   ;
27606   return 0;
27607 }
27608 _ACEOF
27609 if ac_fn_c_try_compile "$LINENO"; then :
27610   fits_in_uint=0
27611 fi
27612 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27613         fi
27614                                 if test $fits_in_uint = 1; then
27615           gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)"
27616         else
27617           gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)"
27618         fi
27619       else
27620                 gl_cv_size_max='((size_t)~(size_t)0)'
27621       fi
27622     fi
27623
27624 fi
27625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_size_max" >&5
27626 $as_echo "$gl_cv_size_max" >&6; }
27627   if test "$gl_cv_size_max" != yes; then
27628
27629 cat >>confdefs.h <<_ACEOF
27630 #define SIZE_MAX $gl_cv_size_max
27631 _ACEOF
27632
27633   fi
27634
27635
27636
27637
27638                ac_fn_c_check_decl "$LINENO" "sleep" "ac_cv_have_decl_sleep" "#include <unistd.h>
27639 "
27640 if test "x$ac_cv_have_decl_sleep" = xyes; then :
27641   ac_have_decl=1
27642 else
27643   ac_have_decl=0
27644 fi
27645
27646 cat >>confdefs.h <<_ACEOF
27647 #define HAVE_DECL_SLEEP $ac_have_decl
27648 _ACEOF
27649
27650
27651   if test $ac_cv_have_decl_sleep != yes; then
27652     HAVE_SLEEP=0
27653   else
27654         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working sleep" >&5
27655 $as_echo_n "checking for working sleep... " >&6; }
27656 if ${gl_cv_func_sleep_works+:} false; then :
27657   $as_echo_n "(cached) " >&6
27658 else
27659   if test "$cross_compiling" = yes; then :
27660   case "$host_os" in
27661                  # Guess yes on glibc systems.
27662          *-gnu*) gl_cv_func_sleep_works="guessing yes" ;;
27663                  # If we don't know, assume the worst.
27664          *)      gl_cv_func_sleep_works="guessing no" ;;
27665        esac
27666
27667 else
27668   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27669 /* end confdefs.h.  */
27670
27671 #include <errno.h>
27672 #include <unistd.h>
27673 #include <signal.h>
27674 static void
27675 handle_alarm (int sig)
27676 {
27677   if (sig != SIGALRM)
27678     _exit (2);
27679 }
27680
27681 int
27682 main ()
27683 {
27684
27685     /* Failure to compile this test due to missing alarm is okay,
27686        since all such platforms (mingw) also lack sleep.  */
27687     unsigned int pentecost = 50 * 24 * 60 * 60; /* 50 days.  */
27688     unsigned int remaining;
27689     signal (SIGALRM, handle_alarm);
27690     alarm (1);
27691     remaining = sleep (pentecost);
27692     if (remaining > pentecost)
27693       return 3;
27694     if (remaining <= pentecost - 10)
27695       return 4;
27696     return 0;
27697
27698   ;
27699   return 0;
27700 }
27701 _ACEOF
27702 if ac_fn_c_try_run "$LINENO"; then :
27703   gl_cv_func_sleep_works=yes
27704 else
27705   gl_cv_func_sleep_works=no
27706 fi
27707 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27708   conftest.$ac_objext conftest.beam conftest.$ac_ext
27709 fi
27710
27711 fi
27712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_sleep_works" >&5
27713 $as_echo "$gl_cv_func_sleep_works" >&6; }
27714     case "$gl_cv_func_sleep_works" in
27715       *yes) ;;
27716       *)
27717         REPLACE_SLEEP=1
27718         ;;
27719     esac
27720   fi
27721
27722   if test $HAVE_SLEEP = 0 || test $REPLACE_SLEEP = 1; then
27723
27724
27725
27726
27727
27728
27729
27730
27731   gl_LIBOBJS="$gl_LIBOBJS sleep.$ac_objext"
27732
27733   fi
27734
27735
27736
27737
27738
27739           GNULIB_SLEEP=1
27740
27741
27742
27743
27744
27745 $as_echo "#define GNULIB_TEST_SLEEP 1" >>confdefs.h
27746
27747
27748
27749
27750
27751   gl_cv_func_snprintf_usable=no
27752   for ac_func in snprintf
27753 do :
27754   ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
27755 if test "x$ac_cv_func_snprintf" = xyes; then :
27756   cat >>confdefs.h <<_ACEOF
27757 #define HAVE_SNPRINTF 1
27758 _ACEOF
27759
27760 fi
27761 done
27762
27763   if test $ac_cv_func_snprintf = yes; then
27764
27765
27766
27767   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf respects a size of 1" >&5
27768 $as_echo_n "checking whether snprintf respects a size of 1... " >&6; }
27769 if ${gl_cv_func_snprintf_size1+:} false; then :
27770   $as_echo_n "(cached) " >&6
27771 else
27772
27773       if test "$cross_compiling" = yes; then :
27774   gl_cv_func_snprintf_size1="guessing yes"
27775 else
27776   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27777 /* end confdefs.h.  */
27778
27779 #include <stdio.h>
27780 #if HAVE_SNPRINTF
27781 # define my_snprintf snprintf
27782 #else
27783 # include <stdarg.h>
27784 static int my_snprintf (char *buf, int size, const char *format, ...)
27785 {
27786   va_list args;
27787   int ret;
27788   va_start (args, format);
27789   ret = vsnprintf (buf, size, format, args);
27790   va_end (args);
27791   return ret;
27792 }
27793 #endif
27794 int main()
27795 {
27796   static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
27797   my_snprintf (buf, 1, "%d", 12345);
27798   return buf[1] != 'E';
27799 }
27800 _ACEOF
27801 if ac_fn_c_try_run "$LINENO"; then :
27802   gl_cv_func_snprintf_size1=yes
27803 else
27804   gl_cv_func_snprintf_size1=no
27805 fi
27806 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27807   conftest.$ac_objext conftest.beam conftest.$ac_ext
27808 fi
27809
27810
27811 fi
27812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_size1" >&5
27813 $as_echo "$gl_cv_func_snprintf_size1" >&6; }
27814
27815     case "$gl_cv_func_snprintf_size1" in
27816       *yes)
27817
27818         case "$gl_cv_func_snprintf_retval_c99" in
27819           *yes)
27820
27821
27822      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports POSIX/XSI format strings with positions" >&5
27823 $as_echo_n "checking whether printf supports POSIX/XSI format strings with positions... " >&6; }
27824 if ${gl_cv_func_printf_positions+:} false; then :
27825   $as_echo_n "(cached) " >&6
27826 else
27827
27828       if test "$cross_compiling" = yes; then :
27829
27830          case "$host_os" in
27831            netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*)
27832                          gl_cv_func_printf_positions="guessing no";;
27833            beos*)        gl_cv_func_printf_positions="guessing no";;
27834            mingw* | pw*) gl_cv_func_printf_positions="guessing no";;
27835            *)            gl_cv_func_printf_positions="guessing yes";;
27836          esac
27837
27838 else
27839   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27840 /* end confdefs.h.  */
27841
27842 #include <stdio.h>
27843 #include <string.h>
27844 /* The string "%2$d %1$d", with dollar characters protected from the shell's
27845    dollar expansion (possibly an autoconf bug).  */
27846 static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
27847 static char buf[100];
27848 int main ()
27849 {
27850   sprintf (buf, format, 33, 55);
27851   return (strcmp (buf, "55 33") != 0);
27852 }
27853 _ACEOF
27854 if ac_fn_c_try_run "$LINENO"; then :
27855   gl_cv_func_printf_positions=yes
27856 else
27857   gl_cv_func_printf_positions=no
27858 fi
27859 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27860   conftest.$ac_objext conftest.beam conftest.$ac_ext
27861 fi
27862
27863
27864 fi
27865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_positions" >&5
27866 $as_echo "$gl_cv_func_printf_positions" >&6; }
27867
27868             case "$gl_cv_func_printf_positions" in
27869               *yes)
27870                 gl_cv_func_snprintf_usable=yes
27871                 ;;
27872             esac
27873             ;;
27874         esac
27875         ;;
27876     esac
27877   fi
27878   if test $gl_cv_func_snprintf_usable = no; then
27879
27880
27881
27882
27883
27884
27885
27886
27887
27888
27889   gl_LIBOBJS="$gl_LIBOBJS snprintf.$ac_objext"
27890
27891   if test $ac_cv_func_snprintf = yes; then
27892     REPLACE_SNPRINTF=1
27893   fi
27894   :
27895
27896   fi
27897
27898   if test $ac_cv_have_decl_snprintf = no; then
27899     HAVE_DECL_SNPRINTF=0
27900   fi
27901
27902
27903
27904
27905
27906
27907           GNULIB_SNPRINTF=1
27908
27909
27910
27911
27912
27913 $as_echo "#define GNULIB_TEST_SNPRINTF 1" >>confdefs.h
27914
27915
27916
27917
27918
27919 cat >>confdefs.h <<_ACEOF
27920 #define GNULIB_SNPRINTF 1
27921 _ACEOF
27922
27923
27924
27925   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
27926 $as_echo_n "checking for ssize_t... " >&6; }
27927 if ${gt_cv_ssize_t+:} false; then :
27928   $as_echo_n "(cached) " >&6
27929 else
27930   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27931 /* end confdefs.h.  */
27932 #include <sys/types.h>
27933 int
27934 main ()
27935 {
27936 int x = sizeof (ssize_t *) + sizeof (ssize_t);
27937             return !x;
27938   ;
27939   return 0;
27940 }
27941 _ACEOF
27942 if ac_fn_c_try_compile "$LINENO"; then :
27943   gt_cv_ssize_t=yes
27944 else
27945   gt_cv_ssize_t=no
27946 fi
27947 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27948 fi
27949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
27950 $as_echo "$gt_cv_ssize_t" >&6; }
27951   if test $gt_cv_ssize_t = no; then
27952
27953 $as_echo "#define ssize_t int" >>confdefs.h
27954
27955   fi
27956
27957
27958
27959
27960     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5
27961 $as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; }
27962 if ${gl_cv_func_stat_dir_slash+:} false; then :
27963   $as_echo_n "(cached) " >&6
27964 else
27965   if test "$cross_compiling" = yes; then :
27966   case $host_os in
27967             mingw*) gl_cv_func_stat_dir_slash="guessing no";;
27968             *) gl_cv_func_stat_dir_slash="guessing yes";;
27969           esac
27970 else
27971   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27972 /* end confdefs.h.  */
27973 #include <sys/stat.h>
27974
27975 int
27976 main ()
27977 {
27978 struct stat st; return stat (".", &st) != stat ("./", &st);
27979   ;
27980   return 0;
27981 }
27982 _ACEOF
27983 if ac_fn_c_try_run "$LINENO"; then :
27984   gl_cv_func_stat_dir_slash=yes
27985 else
27986   gl_cv_func_stat_dir_slash=no
27987 fi
27988 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27989   conftest.$ac_objext conftest.beam conftest.$ac_ext
27990 fi
27991
27992 fi
27993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5
27994 $as_echo "$gl_cv_func_stat_dir_slash" >&6; }
27995         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
27996 $as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
27997 if ${gl_cv_func_stat_file_slash+:} false; then :
27998   $as_echo_n "(cached) " >&6
27999 else
28000   touch conftest.tmp
28001        # Assume that if we have lstat, we can also check symlinks.
28002        if test $ac_cv_func_lstat = yes; then
28003          ln -s conftest.tmp conftest.lnk
28004        fi
28005        if test "$cross_compiling" = yes; then :
28006   case "$host_os" in
28007                     # Guess yes on glibc systems.
28008             *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
28009                     # If we don't know, assume the worst.
28010             *)      gl_cv_func_stat_file_slash="guessing no" ;;
28011           esac
28012
28013 else
28014   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28015 /* end confdefs.h.  */
28016 #include <sys/stat.h>
28017
28018 int
28019 main ()
28020 {
28021 int result = 0;
28022       struct stat st;
28023       if (!stat ("conftest.tmp/", &st))
28024         result |= 1;
28025 #if HAVE_LSTAT
28026       if (!stat ("conftest.lnk/", &st))
28027         result |= 2;
28028 #endif
28029       return result;
28030
28031   ;
28032   return 0;
28033 }
28034 _ACEOF
28035 if ac_fn_c_try_run "$LINENO"; then :
28036   gl_cv_func_stat_file_slash=yes
28037 else
28038   gl_cv_func_stat_file_slash=no
28039 fi
28040 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28041   conftest.$ac_objext conftest.beam conftest.$ac_ext
28042 fi
28043
28044        rm -f conftest.tmp conftest.lnk
28045 fi
28046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
28047 $as_echo "$gl_cv_func_stat_file_slash" >&6; }
28048   case $gl_cv_func_stat_dir_slash in
28049     *no) REPLACE_STAT=1
28050
28051 $as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h
28052 ;;
28053   esac
28054   case $gl_cv_func_stat_file_slash in
28055     *no) REPLACE_STAT=1
28056
28057 $as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
28058 ;;
28059   esac
28060
28061   if test $REPLACE_STAT = 1; then
28062
28063
28064
28065
28066
28067
28068
28069
28070   gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
28071
28072     :
28073   fi
28074
28075
28076
28077
28078
28079           GNULIB_STAT=1
28080
28081
28082
28083
28084
28085 $as_echo "#define GNULIB_TEST_STAT 1" >>confdefs.h
28086
28087
28088
28089
28090
28091
28092
28093   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>
28094      #include <sys/stat.h>
28095 "
28096 if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes; then :
28097
28098 cat >>confdefs.h <<_ACEOF
28099 #define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1
28100 _ACEOF
28101
28102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
28103 $as_echo_n "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
28104 if ${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+:} false; then :
28105   $as_echo_n "(cached) " >&6
28106 else
28107   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28108 /* end confdefs.h.  */
28109
28110             #include <sys/types.h>
28111             #include <sys/stat.h>
28112             #if HAVE_SYS_TIME_H
28113             # include <sys/time.h>
28114             #endif
28115             #include <time.h>
28116             struct timespec ts;
28117             struct stat st;
28118
28119 int
28120 main ()
28121 {
28122
28123             st.st_atim = ts;
28124
28125   ;
28126   return 0;
28127 }
28128 _ACEOF
28129 if ac_fn_c_try_compile "$LINENO"; then :
28130   ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
28131 else
28132   ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no
28133 fi
28134 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28135 fi
28136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
28137 $as_echo "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
28138      if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
28139
28140 $as_echo "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
28141
28142      fi
28143 else
28144   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>
28145         #include <sys/stat.h>
28146 "
28147 if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = xyes; then :
28148
28149 cat >>confdefs.h <<_ACEOF
28150 #define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1
28151 _ACEOF
28152
28153
28154 else
28155   ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
28156            #include <sys/stat.h>
28157 "
28158 if test "x$ac_cv_member_struct_stat_st_atimensec" = xyes; then :
28159
28160 cat >>confdefs.h <<_ACEOF
28161 #define HAVE_STRUCT_STAT_ST_ATIMENSEC 1
28162 _ACEOF
28163
28164
28165 else
28166   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>
28167               #include <sys/stat.h>
28168 "
28169 if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = xyes; then :
28170
28171 cat >>confdefs.h <<_ACEOF
28172 #define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1
28173 _ACEOF
28174
28175
28176 fi
28177
28178 fi
28179
28180 fi
28181
28182 fi
28183
28184
28185
28186
28187
28188   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>
28189      #include <sys/stat.h>
28190 "
28191 if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = xyes; then :
28192
28193 cat >>confdefs.h <<_ACEOF
28194 #define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1
28195 _ACEOF
28196
28197
28198 else
28199   ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h>
28200         #include <sys/stat.h>
28201 "
28202 if test "x$ac_cv_member_struct_stat_st_birthtimensec" = xyes; then :
28203
28204 cat >>confdefs.h <<_ACEOF
28205 #define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1
28206 _ACEOF
28207
28208
28209 else
28210   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>
28211           #include <sys/stat.h>
28212 "
28213 if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = xyes; then :
28214
28215 cat >>confdefs.h <<_ACEOF
28216 #define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1
28217 _ACEOF
28218
28219
28220 fi
28221
28222 fi
28223
28224 fi
28225
28226
28227
28228
28229 cat >>confdefs.h <<_ACEOF
28230 #define GNULIB_STATAT 1
28231 _ACEOF
28232
28233
28234   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stdalign.h" >&5
28235 $as_echo_n "checking for working stdalign.h... " >&6; }
28236 if ${gl_cv_header_working_stdalign_h+:} false; then :
28237   $as_echo_n "(cached) " >&6
28238 else
28239   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28240 /* end confdefs.h.  */
28241 #include <stdalign.h>
28242             #include <stddef.h>
28243
28244             /* Test that alignof yields a result consistent with offsetof.
28245                This catches GCC bug 52023
28246                <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>.  */
28247             #ifdef __cplusplus
28248                template <class t> struct alignof_helper { char a; t b; };
28249             # define ao(type) offsetof (alignof_helper<type>, b)
28250             #else
28251             # define ao(type) offsetof (struct { char a; type b; }, b)
28252             #endif
28253             char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1];
28254             char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1];
28255             char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1];
28256
28257             /* Test _Alignas only on platforms where gnulib can help.  */
28258             #if \
28259                 (__GNUC__ || __IBMC__ || __IBMCPP__ \
28260                  || 0x5110 <= __SUNPRO_C || 1300 <= _MSC_VER)
28261               struct alignas_test { char c; char alignas (8) alignas_8; };
28262               char test_alignas[offsetof (struct alignas_test, alignas_8) == 8
28263                                 ? 1 : -1];
28264             #endif
28265
28266 int
28267 main ()
28268 {
28269
28270   ;
28271   return 0;
28272 }
28273 _ACEOF
28274 if ac_fn_c_try_compile "$LINENO"; then :
28275   gl_cv_header_working_stdalign_h=yes
28276 else
28277   gl_cv_header_working_stdalign_h=no
28278 fi
28279 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28280 fi
28281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdalign_h" >&5
28282 $as_echo "$gl_cv_header_working_stdalign_h" >&6; }
28283
28284   if test $gl_cv_header_working_stdalign_h = yes; then
28285     STDALIGN_H=''
28286   else
28287     STDALIGN_H='stdalign.h'
28288   fi
28289
28290
28291    if test -n "$STDALIGN_H"; then
28292   GL_GENERATE_STDALIGN_H_TRUE=
28293   GL_GENERATE_STDALIGN_H_FALSE='#'
28294 else
28295   GL_GENERATE_STDALIGN_H_TRUE='#'
28296   GL_GENERATE_STDALIGN_H_FALSE=
28297 fi
28298
28299
28300
28301   STDARG_H=''
28302   NEXT_STDARG_H='<stdarg.h>'
28303   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5
28304 $as_echo_n "checking for va_copy... " >&6; }
28305   if ${gl_cv_func_va_copy+:} false; then :
28306   $as_echo_n "(cached) " >&6
28307 else
28308
28309     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28310 /* end confdefs.h.  */
28311 #include <stdarg.h>
28312 int
28313 main ()
28314 {
28315
28316 #ifndef va_copy
28317 void (*func) (va_list, va_list) = va_copy;
28318 #endif
28319
28320   ;
28321   return 0;
28322 }
28323 _ACEOF
28324 if ac_fn_c_try_compile "$LINENO"; then :
28325   gl_cv_func_va_copy=yes
28326 else
28327   gl_cv_func_va_copy=no
28328 fi
28329 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28330 fi
28331
28332   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_va_copy" >&5
28333 $as_echo "$gl_cv_func_va_copy" >&6; }
28334   if test $gl_cv_func_va_copy = no; then
28335                                     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28336 /* end confdefs.h.  */
28337 #if defined _AIX && !defined __GNUC__
28338         AIX vaccine
28339        #endif
28340
28341 _ACEOF
28342 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28343   $EGREP "vaccine" >/dev/null 2>&1; then :
28344   gl_aixcc=yes
28345 else
28346   gl_aixcc=no
28347 fi
28348 rm -f conftest*
28349
28350     if test $gl_aixcc = yes; then
28351             STDARG_H=stdarg.h
28352
28353
28354
28355
28356
28357
28358
28359
28360      if test $gl_cv_have_include_next = yes; then
28361        gl_cv_next_stdarg_h='<'stdarg.h'>'
28362      else
28363        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdarg.h>" >&5
28364 $as_echo_n "checking absolute name of <stdarg.h>... " >&6; }
28365 if ${gl_cv_next_stdarg_h+:} false; then :
28366   $as_echo_n "(cached) " >&6
28367 else
28368
28369                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28370 /* end confdefs.h.  */
28371 #include <stdarg.h>
28372
28373 _ACEOF
28374                                                                                                                         case "$host_os" in
28375                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
28376                  *)    gl_absname_cpp="$ac_cpp" ;;
28377                esac
28378
28379                case "$host_os" in
28380                  mingw*)
28381                                                                                                                                      gl_dirsep_regex='[/\\]'
28382                    ;;
28383                  *)
28384                    gl_dirsep_regex='\/'
28385                    ;;
28386                esac
28387                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
28388
28389                gl_header_literal_regex=`echo 'stdarg.h' \
28390                                         | sed -e "$gl_make_literal_regex_sed"`
28391                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
28392                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
28393                    s|^/[^/]|//&|
28394                    p
28395                    q
28396                  }'
28397                                                             gl_cv_next_stdarg_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
28398                       sed -n "$gl_absolute_header_sed"`'"'
28399
28400
28401 fi
28402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdarg_h" >&5
28403 $as_echo "$gl_cv_next_stdarg_h" >&6; }
28404      fi
28405      NEXT_STDARG_H=$gl_cv_next_stdarg_h
28406
28407      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
28408        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
28409        gl_next_as_first_directive='<'stdarg.h'>'
28410      else
28411        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
28412        gl_next_as_first_directive=$gl_cv_next_stdarg_h
28413      fi
28414      NEXT_AS_FIRST_DIRECTIVE_STDARG_H=$gl_next_as_first_directive
28415
28416
28417
28418
28419             if test "$gl_cv_next_stdarg_h" = '""'; then
28420         gl_cv_next_stdarg_h='"///usr/include/stdarg.h"'
28421         NEXT_STDARG_H="$gl_cv_next_stdarg_h"
28422       fi
28423     else
28424
28425   saved_as_echo_n="$as_echo_n"
28426   as_echo_n=':'
28427   if ${gl_cv_func___va_copy+:} false; then :
28428   $as_echo_n "(cached) " >&6
28429 else
28430
28431         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28432 /* end confdefs.h.  */
28433 #include <stdarg.h>
28434 int
28435 main ()
28436 {
28437
28438 #ifndef __va_copy
28439 error, bail out
28440 #endif
28441
28442   ;
28443   return 0;
28444 }
28445 _ACEOF
28446 if ac_fn_c_try_compile "$LINENO"; then :
28447   gl_cv_func___va_copy=yes
28448 else
28449   gl_cv_func___va_copy=no
28450 fi
28451 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28452 fi
28453
28454   as_echo_n="$saved_as_echo_n"
28455
28456       if test $gl_cv_func___va_copy = yes; then
28457
28458 $as_echo "#define va_copy __va_copy" >>confdefs.h
28459
28460       else
28461
28462
28463 $as_echo "#define va_copy gl_va_copy" >>confdefs.h
28464
28465       fi
28466     fi
28467   fi
28468
28469    if test -n "$STDARG_H"; then
28470   GL_GENERATE_STDARG_H_TRUE=
28471   GL_GENERATE_STDARG_H_FALSE='#'
28472 else
28473   GL_GENERATE_STDARG_H_TRUE='#'
28474   GL_GENERATE_STDARG_H_FALSE=
28475 fi
28476
28477
28478
28479
28480
28481
28482   # Define two additional variables used in the Makefile substitution.
28483
28484   if test "$ac_cv_header_stdbool_h" = yes; then
28485     STDBOOL_H=''
28486   else
28487     STDBOOL_H='stdbool.h'
28488   fi
28489
28490    if test -n "$STDBOOL_H"; then
28491   GL_GENERATE_STDBOOL_H_TRUE=
28492   GL_GENERATE_STDBOOL_H_FALSE='#'
28493 else
28494   GL_GENERATE_STDBOOL_H_TRUE='#'
28495   GL_GENERATE_STDBOOL_H_FALSE=
28496 fi
28497
28498
28499   if test "$ac_cv_type__Bool" = yes; then
28500     HAVE__BOOL=1
28501   else
28502     HAVE__BOOL=0
28503   fi
28504
28505
28506
28507
28508
28509   STDDEF_H=
28510   if test $gt_cv_c_wchar_t = no; then
28511     HAVE_WCHAR_T=0
28512     STDDEF_H=stddef.h
28513   fi
28514   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
28515 $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
28516 if ${gl_cv_decl_null_works+:} false; then :
28517   $as_echo_n "(cached) " >&6
28518 else
28519   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28520 /* end confdefs.h.  */
28521 #include <stddef.h>
28522       int test[2 * (sizeof NULL == sizeof (void *)) -1];
28523
28524 int
28525 main ()
28526 {
28527
28528   ;
28529   return 0;
28530 }
28531 _ACEOF
28532 if ac_fn_c_try_compile "$LINENO"; then :
28533   gl_cv_decl_null_works=yes
28534 else
28535   gl_cv_decl_null_works=no
28536 fi
28537 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28538 fi
28539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
28540 $as_echo "$gl_cv_decl_null_works" >&6; }
28541   if test $gl_cv_decl_null_works = no; then
28542     REPLACE_NULL=1
28543     STDDEF_H=stddef.h
28544   fi
28545
28546    if test -n "$STDDEF_H"; then
28547   GL_GENERATE_STDDEF_H_TRUE=
28548   GL_GENERATE_STDDEF_H_FALSE='#'
28549 else
28550   GL_GENERATE_STDDEF_H_TRUE='#'
28551   GL_GENERATE_STDDEF_H_FALSE=
28552 fi
28553
28554   if test -n "$STDDEF_H"; then
28555
28556
28557
28558
28559
28560
28561
28562
28563      if test $gl_cv_have_include_next = yes; then
28564        gl_cv_next_stddef_h='<'stddef.h'>'
28565      else
28566        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
28567 $as_echo_n "checking absolute name of <stddef.h>... " >&6; }
28568 if ${gl_cv_next_stddef_h+:} false; then :
28569   $as_echo_n "(cached) " >&6
28570 else
28571
28572                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28573 /* end confdefs.h.  */
28574 #include <stddef.h>
28575
28576 _ACEOF
28577                                                                                                                         case "$host_os" in
28578                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
28579                  *)    gl_absname_cpp="$ac_cpp" ;;
28580                esac
28581
28582                case "$host_os" in
28583                  mingw*)
28584                                                                                                                                      gl_dirsep_regex='[/\\]'
28585                    ;;
28586                  *)
28587                    gl_dirsep_regex='\/'
28588                    ;;
28589                esac
28590                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
28591
28592                gl_header_literal_regex=`echo 'stddef.h' \
28593                                         | sed -e "$gl_make_literal_regex_sed"`
28594                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
28595                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
28596                    s|^/[^/]|//&|
28597                    p
28598                    q
28599                  }'
28600                                                             gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
28601                       sed -n "$gl_absolute_header_sed"`'"'
28602
28603
28604 fi
28605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
28606 $as_echo "$gl_cv_next_stddef_h" >&6; }
28607      fi
28608      NEXT_STDDEF_H=$gl_cv_next_stddef_h
28609
28610      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
28611        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
28612        gl_next_as_first_directive='<'stddef.h'>'
28613      else
28614        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
28615        gl_next_as_first_directive=$gl_cv_next_stddef_h
28616      fi
28617      NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
28618
28619
28620
28621
28622   fi
28623
28624
28625
28626
28627
28628
28629
28630
28631
28632
28633
28634
28635      if test $gl_cv_have_include_next = yes; then
28636        gl_cv_next_stdio_h='<'stdio.h'>'
28637      else
28638        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
28639 $as_echo_n "checking absolute name of <stdio.h>... " >&6; }
28640 if ${gl_cv_next_stdio_h+:} false; then :
28641   $as_echo_n "(cached) " >&6
28642 else
28643
28644                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28645 /* end confdefs.h.  */
28646 #include <stdio.h>
28647
28648 _ACEOF
28649                                                                                                                         case "$host_os" in
28650                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
28651                  *)    gl_absname_cpp="$ac_cpp" ;;
28652                esac
28653
28654                case "$host_os" in
28655                  mingw*)
28656                                                                                                                                      gl_dirsep_regex='[/\\]'
28657                    ;;
28658                  *)
28659                    gl_dirsep_regex='\/'
28660                    ;;
28661                esac
28662                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
28663
28664                gl_header_literal_regex=`echo 'stdio.h' \
28665                                         | sed -e "$gl_make_literal_regex_sed"`
28666                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
28667                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
28668                    s|^/[^/]|//&|
28669                    p
28670                    q
28671                  }'
28672                                                             gl_cv_next_stdio_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
28673                       sed -n "$gl_absolute_header_sed"`'"'
28674
28675
28676 fi
28677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
28678 $as_echo "$gl_cv_next_stdio_h" >&6; }
28679      fi
28680      NEXT_STDIO_H=$gl_cv_next_stdio_h
28681
28682      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
28683        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
28684        gl_next_as_first_directive='<'stdio.h'>'
28685      else
28686        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
28687        gl_next_as_first_directive=$gl_cv_next_stdio_h
28688      fi
28689      NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
28690
28691
28692
28693
28694
28695       GNULIB_FSCANF=1
28696
28697
28698 cat >>confdefs.h <<_ACEOF
28699 #define GNULIB_FSCANF 1
28700 _ACEOF
28701
28702
28703   GNULIB_SCANF=1
28704
28705
28706 cat >>confdefs.h <<_ACEOF
28707 #define GNULIB_SCANF 1
28708 _ACEOF
28709
28710
28711   GNULIB_FGETC=1
28712   GNULIB_GETC=1
28713   GNULIB_GETCHAR=1
28714   GNULIB_FGETS=1
28715   GNULIB_FREAD=1
28716
28717
28718       GNULIB_FPRINTF=1
28719   GNULIB_PRINTF=1
28720   GNULIB_VFPRINTF=1
28721   GNULIB_VPRINTF=1
28722   GNULIB_FPUTC=1
28723   GNULIB_PUTC=1
28724   GNULIB_PUTCHAR=1
28725   GNULIB_FPUTS=1
28726   GNULIB_PUTS=1
28727   GNULIB_FWRITE=1
28728
28729
28730
28731
28732     for gl_func in dprintf fpurge fseeko ftello getdelim getline gets pclose popen     renameat snprintf tmpfile vdprintf vsnprintf; do
28733     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
28734     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
28735 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
28736 if eval \${$as_gl_Symbol+:} false; then :
28737   $as_echo_n "(cached) " >&6
28738 else
28739   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28740 /* end confdefs.h.  */
28741 #include <stdio.h>
28742
28743 int
28744 main ()
28745 {
28746 #undef $gl_func
28747   (void) $gl_func;
28748   ;
28749   return 0;
28750 }
28751 _ACEOF
28752 if ac_fn_c_try_compile "$LINENO"; then :
28753   eval "$as_gl_Symbol=yes"
28754 else
28755   eval "$as_gl_Symbol=no"
28756 fi
28757 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28758 fi
28759 eval ac_res=\$$as_gl_Symbol
28760                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
28761 $as_echo "$ac_res" >&6; }
28762     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
28763   cat >>confdefs.h <<_ACEOF
28764 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
28765 _ACEOF
28766
28767                      eval ac_cv_have_decl_$gl_func=yes
28768 fi
28769       done
28770
28771
28772
28773
28774
28775
28776
28777
28778
28779
28780
28781
28782      if test $gl_cv_have_include_next = yes; then
28783        gl_cv_next_stdlib_h='<'stdlib.h'>'
28784      else
28785        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
28786 $as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
28787 if ${gl_cv_next_stdlib_h+:} false; then :
28788   $as_echo_n "(cached) " >&6
28789 else
28790
28791                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28792 /* end confdefs.h.  */
28793 #include <stdlib.h>
28794
28795 _ACEOF
28796                                                                                                                         case "$host_os" in
28797                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
28798                  *)    gl_absname_cpp="$ac_cpp" ;;
28799                esac
28800
28801                case "$host_os" in
28802                  mingw*)
28803                                                                                                                                      gl_dirsep_regex='[/\\]'
28804                    ;;
28805                  *)
28806                    gl_dirsep_regex='\/'
28807                    ;;
28808                esac
28809                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
28810
28811                gl_header_literal_regex=`echo 'stdlib.h' \
28812                                         | sed -e "$gl_make_literal_regex_sed"`
28813                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
28814                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
28815                    s|^/[^/]|//&|
28816                    p
28817                    q
28818                  }'
28819                                                             gl_cv_next_stdlib_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
28820                       sed -n "$gl_absolute_header_sed"`'"'
28821
28822
28823 fi
28824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
28825 $as_echo "$gl_cv_next_stdlib_h" >&6; }
28826      fi
28827      NEXT_STDLIB_H=$gl_cv_next_stdlib_h
28828
28829      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
28830        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
28831        gl_next_as_first_directive='<'stdlib.h'>'
28832      else
28833        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
28834        gl_next_as_first_directive=$gl_cv_next_stdlib_h
28835      fi
28836      NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
28837
28838
28839
28840
28841
28842
28843     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
28844     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
28845     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
28846 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
28847 if eval \${$as_gl_Symbol+:} false; then :
28848   $as_echo_n "(cached) " >&6
28849 else
28850   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28851 /* end confdefs.h.  */
28852 #include <stdlib.h>
28853 #if HAVE_SYS_LOADAVG_H
28854 # include <sys/loadavg.h>
28855 #endif
28856 #if HAVE_RANDOM_H
28857 # include <random.h>
28858 #endif
28859
28860 int
28861 main ()
28862 {
28863 #undef $gl_func
28864   (void) $gl_func;
28865   ;
28866   return 0;
28867 }
28868 _ACEOF
28869 if ac_fn_c_try_compile "$LINENO"; then :
28870   eval "$as_gl_Symbol=yes"
28871 else
28872   eval "$as_gl_Symbol=no"
28873 fi
28874 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28875 fi
28876 eval ac_res=\$$as_gl_Symbol
28877                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
28878 $as_echo "$ac_res" >&6; }
28879     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
28880   cat >>confdefs.h <<_ACEOF
28881 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
28882 _ACEOF
28883
28884                      eval ac_cv_have_decl_$gl_func=yes
28885 fi
28886       done
28887
28888
28889
28890
28891
28892
28893
28894
28895   for ac_func in stpcpy
28896 do :
28897   ac_fn_c_check_func "$LINENO" "stpcpy" "ac_cv_func_stpcpy"
28898 if test "x$ac_cv_func_stpcpy" = xyes; then :
28899   cat >>confdefs.h <<_ACEOF
28900 #define HAVE_STPCPY 1
28901 _ACEOF
28902
28903 fi
28904 done
28905
28906   if test $ac_cv_func_stpcpy = no; then
28907     HAVE_STPCPY=0
28908   fi
28909
28910   if test $HAVE_STPCPY = 0; then
28911
28912
28913
28914
28915
28916
28917
28918
28919   gl_LIBOBJS="$gl_LIBOBJS stpcpy.$ac_objext"
28920
28921
28922   :
28923
28924   fi
28925
28926
28927
28928
28929
28930           GNULIB_STPCPY=1
28931
28932
28933
28934
28935
28936 $as_echo "#define GNULIB_TEST_STPCPY 1" >>confdefs.h
28937
28938
28939
28940
28941
28942
28943   for ac_func in strcasecmp
28944 do :
28945   ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp"
28946 if test "x$ac_cv_func_strcasecmp" = xyes; then :
28947   cat >>confdefs.h <<_ACEOF
28948 #define HAVE_STRCASECMP 1
28949 _ACEOF
28950
28951 fi
28952 done
28953
28954   if test $ac_cv_func_strcasecmp = no; then
28955     HAVE_STRCASECMP=0
28956   fi
28957
28958
28959
28960   for ac_func in strncasecmp
28961 do :
28962   ac_fn_c_check_func "$LINENO" "strncasecmp" "ac_cv_func_strncasecmp"
28963 if test "x$ac_cv_func_strncasecmp" = xyes; then :
28964   cat >>confdefs.h <<_ACEOF
28965 #define HAVE_STRNCASECMP 1
28966 _ACEOF
28967
28968 fi
28969 done
28970
28971   if test $ac_cv_func_strncasecmp = yes; then
28972     HAVE_STRNCASECMP=1
28973   else
28974     HAVE_STRNCASECMP=0
28975   fi
28976   ac_fn_c_check_decl "$LINENO" "strncasecmp" "ac_cv_have_decl_strncasecmp" "$ac_includes_default"
28977 if test "x$ac_cv_have_decl_strncasecmp" = xyes; then :
28978   ac_have_decl=1
28979 else
28980   ac_have_decl=0
28981 fi
28982
28983 cat >>confdefs.h <<_ACEOF
28984 #define HAVE_DECL_STRNCASECMP $ac_have_decl
28985 _ACEOF
28986
28987   if test $ac_cv_have_decl_strncasecmp = no; then
28988     HAVE_DECL_STRNCASECMP=0
28989   fi
28990
28991
28992   if test $HAVE_STRCASECMP = 0; then
28993
28994
28995
28996
28997
28998
28999
29000
29001   gl_LIBOBJS="$gl_LIBOBJS strcasecmp.$ac_objext"
29002
29003
29004   :
29005
29006   fi
29007   if test $HAVE_STRNCASECMP = 0; then
29008
29009
29010
29011
29012
29013
29014
29015
29016   gl_LIBOBJS="$gl_LIBOBJS strncasecmp.$ac_objext"
29017
29018
29019   :
29020
29021   fi
29022
29023
29024
29025
29026   for ac_func in strchrnul
29027 do :
29028   ac_fn_c_check_func "$LINENO" "strchrnul" "ac_cv_func_strchrnul"
29029 if test "x$ac_cv_func_strchrnul" = xyes; then :
29030   cat >>confdefs.h <<_ACEOF
29031 #define HAVE_STRCHRNUL 1
29032 _ACEOF
29033
29034 fi
29035 done
29036
29037   if test $ac_cv_func_strchrnul = no; then
29038     HAVE_STRCHRNUL=0
29039   else
29040     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strchrnul works" >&5
29041 $as_echo_n "checking whether strchrnul works... " >&6; }
29042 if ${gl_cv_func_strchrnul_works+:} false; then :
29043   $as_echo_n "(cached) " >&6
29044 else
29045   if test "$cross_compiling" = yes; then :
29046            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29047 /* end confdefs.h.  */
29048
29049 #if defined __CYGWIN__
29050  #include <cygwin/version.h>
29051  #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 9)
29052   Lucky user
29053  #endif
29054 #else
29055   Lucky user
29056 #endif
29057
29058 _ACEOF
29059 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
29060   $EGREP "Lucky user" >/dev/null 2>&1; then :
29061   gl_cv_func_strchrnul_works="guessing yes"
29062 else
29063   gl_cv_func_strchrnul_works="guessing no"
29064 fi
29065 rm -f conftest*
29066
29067
29068 else
29069   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29070 /* end confdefs.h.  */
29071
29072 #include <string.h> /* for strchrnul */
29073
29074 int
29075 main ()
29076 {
29077 const char *buf = "a";
29078       return strchrnul (buf, 'b') != buf + 1;
29079
29080   ;
29081   return 0;
29082 }
29083 _ACEOF
29084 if ac_fn_c_try_run "$LINENO"; then :
29085   gl_cv_func_strchrnul_works=yes
29086 else
29087   gl_cv_func_strchrnul_works=no
29088 fi
29089 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29090   conftest.$ac_objext conftest.beam conftest.$ac_ext
29091 fi
29092
29093
29094 fi
29095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strchrnul_works" >&5
29096 $as_echo "$gl_cv_func_strchrnul_works" >&6; }
29097     case "$gl_cv_func_strchrnul_works" in
29098       *yes) ;;
29099       *) REPLACE_STRCHRNUL=1 ;;
29100     esac
29101   fi
29102
29103   if test $HAVE_STRCHRNUL = 0 || test $REPLACE_STRCHRNUL = 1; then
29104
29105
29106
29107
29108
29109
29110
29111
29112   gl_LIBOBJS="$gl_LIBOBJS strchrnul.$ac_objext"
29113
29114     :
29115   fi
29116
29117
29118
29119
29120
29121           GNULIB_STRCHRNUL=1
29122
29123
29124
29125
29126
29127 $as_echo "#define GNULIB_TEST_STRCHRNUL 1" >>confdefs.h
29128
29129
29130
29131
29132
29133
29134
29135   if test $ac_cv_func_strdup = yes; then
29136     if test $gl_cv_func_malloc_posix != yes; then
29137       REPLACE_STRDUP=1
29138     fi
29139   fi
29140
29141   if test $ac_cv_have_decl_strdup = no; then
29142     HAVE_DECL_STRDUP=0
29143   fi
29144
29145   if test $ac_cv_func_strdup = no || test $REPLACE_STRDUP = 1; then
29146
29147
29148
29149
29150
29151
29152
29153
29154   gl_LIBOBJS="$gl_LIBOBJS strdup.$ac_objext"
29155
29156     :
29157   fi
29158
29159
29160
29161
29162
29163           GNULIB_STRDUP=1
29164
29165
29166
29167
29168
29169 $as_echo "#define GNULIB_TEST_STRDUP 1" >>confdefs.h
29170
29171
29172
29173
29174
29175
29176
29177
29178   if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
29179     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
29180 $as_echo_n "checking for working strerror function... " >&6; }
29181 if ${gl_cv_func_working_strerror+:} false; then :
29182   $as_echo_n "(cached) " >&6
29183 else
29184   if test "$cross_compiling" = yes; then :
29185   case "$host_os" in
29186                    # Guess yes on glibc systems.
29187            *-gnu*) gl_cv_func_working_strerror="guessing yes" ;;
29188                    # If we don't know, assume the worst.
29189            *)      gl_cv_func_working_strerror="guessing no" ;;
29190          esac
29191
29192 else
29193   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29194 /* end confdefs.h.  */
29195 #include <string.h>
29196
29197 int
29198 main ()
29199 {
29200 if (!*strerror (-2)) return 1;
29201   ;
29202   return 0;
29203 }
29204 _ACEOF
29205 if ac_fn_c_try_run "$LINENO"; then :
29206   gl_cv_func_working_strerror=yes
29207 else
29208   gl_cv_func_working_strerror=no
29209 fi
29210 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29211   conftest.$ac_objext conftest.beam conftest.$ac_ext
29212 fi
29213
29214
29215 fi
29216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
29217 $as_echo "$gl_cv_func_working_strerror" >&6; }
29218     case "$gl_cv_func_working_strerror" in
29219       *yes) ;;
29220       *)
29221                         REPLACE_STRERROR=1
29222         ;;
29223     esac
29224
29225   else
29226             REPLACE_STRERROR=1
29227   fi
29228
29229   if test $REPLACE_STRERROR = 1; then
29230
29231
29232
29233
29234
29235
29236
29237
29238   gl_LIBOBJS="$gl_LIBOBJS strerror.$ac_objext"
29239
29240   fi
29241
29242
29243 cat >>confdefs.h <<_ACEOF
29244 #define GNULIB_STRERROR 1
29245 _ACEOF
29246
29247
29248
29249
29250
29251
29252
29253           GNULIB_STRERROR=1
29254
29255
29256
29257
29258
29259 $as_echo "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
29260
29261
29262
29263
29264
29265   if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
29266
29267
29268
29269
29270
29271
29272
29273
29274   gl_LIBOBJS="$gl_LIBOBJS strerror-override.$ac_objext"
29275
29276
29277
29278
29279
29280   if test $ac_cv_header_sys_socket_h != yes; then
29281                     for ac_header in winsock2.h
29282 do :
29283   ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
29284 if test "x$ac_cv_header_winsock2_h" = xyes; then :
29285   cat >>confdefs.h <<_ACEOF
29286 #define HAVE_WINSOCK2_H 1
29287 _ACEOF
29288
29289 fi
29290
29291 done
29292
29293   fi
29294   if test "$ac_cv_header_winsock2_h" = yes; then
29295     HAVE_WINSOCK2_H=1
29296     UNISTD_H_HAVE_WINSOCK2_H=1
29297     SYS_IOCTL_H_HAVE_WINSOCK2_H=1
29298   else
29299     HAVE_WINSOCK2_H=0
29300   fi
29301
29302
29303   fi
29304
29305
29306
29307
29308
29309
29310
29311
29312
29313
29314
29315
29316   if test $ac_cv_have_decl_strndup = no; then
29317     HAVE_DECL_STRNDUP=0
29318   fi
29319
29320   if test $ac_cv_func_strndup = yes; then
29321     HAVE_STRNDUP=1
29322     # AIX 4.3.3, AIX 5.1 have a function that fails to add the terminating '\0'.
29323     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strndup" >&5
29324 $as_echo_n "checking for working strndup... " >&6; }
29325 if ${gl_cv_func_strndup_works+:} false; then :
29326   $as_echo_n "(cached) " >&6
29327 else
29328   if test "$cross_compiling" = yes; then :
29329
29330           case $host_os in
29331             aix | aix[3-6]*) gl_cv_func_strndup_works="guessing no";;
29332             *)               gl_cv_func_strndup_works="guessing yes";;
29333           esac
29334
29335 else
29336   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29337 /* end confdefs.h.  */
29338
29339          #include <string.h>
29340                            #include <stdlib.h>
29341 int
29342 main ()
29343 {
29344
29345 #if !HAVE_DECL_STRNDUP
29346   extern
29347   #ifdef __cplusplus
29348   "C"
29349   #endif
29350   char *strndup (const char *, size_t);
29351 #endif
29352   char *s;
29353   s = strndup ("some longer string", 15);
29354   free (s);
29355   s = strndup ("shorter string", 13);
29356   return s[13] != '\0';
29357   ;
29358   return 0;
29359 }
29360 _ACEOF
29361 if ac_fn_c_try_run "$LINENO"; then :
29362   gl_cv_func_strndup_works=yes
29363 else
29364   gl_cv_func_strndup_works=no
29365 fi
29366 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29367   conftest.$ac_objext conftest.beam conftest.$ac_ext
29368 fi
29369
29370 fi
29371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strndup_works" >&5
29372 $as_echo "$gl_cv_func_strndup_works" >&6; }
29373     case $gl_cv_func_strndup_works in
29374       *no) REPLACE_STRNDUP=1 ;;
29375     esac
29376   else
29377     HAVE_STRNDUP=0
29378   fi
29379
29380   if test $HAVE_STRNDUP = 0 || test $REPLACE_STRNDUP = 1; then
29381
29382
29383
29384
29385
29386
29387
29388
29389   gl_LIBOBJS="$gl_LIBOBJS strndup.$ac_objext"
29390
29391   fi
29392
29393
29394
29395
29396
29397           GNULIB_STRNDUP=1
29398
29399
29400
29401
29402
29403 $as_echo "#define GNULIB_TEST_STRNDUP 1" >>confdefs.h
29404
29405
29406
29407
29408
29409
29410
29411
29412
29413   if test $ac_cv_have_decl_strnlen = no; then
29414     HAVE_DECL_STRNLEN=0
29415   else
29416
29417          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strnlen" >&5
29418 $as_echo_n "checking for working strnlen... " >&6; }
29419 if ${ac_cv_func_strnlen_working+:} false; then :
29420   $as_echo_n "(cached) " >&6
29421 else
29422   if test "$cross_compiling" = yes; then :
29423   # Guess no on AIX systems, yes otherwise.
29424                 case "$host_os" in
29425                   aix*) ac_cv_func_strnlen_working=no;;
29426                   *)    ac_cv_func_strnlen_working=yes;;
29427                 esac
29428 else
29429   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29430 /* end confdefs.h.  */
29431 $ac_includes_default
29432 int
29433 main ()
29434 {
29435
29436 #define S "foobar"
29437 #define S_LEN (sizeof S - 1)
29438
29439   /* At least one implementation is buggy: that of AIX 4.3 would
29440      give strnlen (S, 1) == 3.  */
29441
29442   int i;
29443   for (i = 0; i < S_LEN + 1; ++i)
29444     {
29445       int expected = i <= S_LEN ? i : S_LEN;
29446       if (strnlen (S, i) != expected)
29447         return 1;
29448     }
29449   return 0;
29450
29451   ;
29452   return 0;
29453 }
29454 _ACEOF
29455 if ac_fn_c_try_run "$LINENO"; then :
29456   ac_cv_func_strnlen_working=yes
29457 else
29458   ac_cv_func_strnlen_working=no
29459 fi
29460 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29461   conftest.$ac_objext conftest.beam conftest.$ac_ext
29462 fi
29463
29464 fi
29465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strnlen_working" >&5
29466 $as_echo "$ac_cv_func_strnlen_working" >&6; }
29467 test $ac_cv_func_strnlen_working = no && :
29468
29469
29470     if test $ac_cv_func_strnlen_working = no; then
29471       REPLACE_STRNLEN=1
29472     fi
29473   fi
29474
29475   if test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1; then
29476
29477
29478
29479
29480
29481
29482
29483
29484   gl_LIBOBJS="$gl_LIBOBJS strnlen.$ac_objext"
29485
29486     :
29487   fi
29488
29489
29490
29491
29492
29493           GNULIB_STRNLEN=1
29494
29495
29496
29497
29498
29499 $as_echo "#define GNULIB_TEST_STRNLEN 1" >>confdefs.h
29500
29501
29502
29503
29504   for ac_func in strtol
29505 do :
29506   ac_fn_c_check_func "$LINENO" "strtol" "ac_cv_func_strtol"
29507 if test "x$ac_cv_func_strtol" = xyes; then :
29508   cat >>confdefs.h <<_ACEOF
29509 #define HAVE_STRTOL 1
29510 _ACEOF
29511
29512 fi
29513 done
29514
29515
29516   if test $ac_cv_func_strtol = no; then
29517
29518
29519
29520
29521
29522
29523
29524
29525   gl_LIBOBJS="$gl_LIBOBJS strtol.$ac_objext"
29526
29527   fi
29528
29529   for ac_func in strtoul
29530 do :
29531   ac_fn_c_check_func "$LINENO" "strtoul" "ac_cv_func_strtoul"
29532 if test "x$ac_cv_func_strtoul" = xyes; then :
29533   cat >>confdefs.h <<_ACEOF
29534 #define HAVE_STRTOUL 1
29535 _ACEOF
29536
29537 fi
29538 done
29539
29540
29541   if test $ac_cv_func_strtoul = no; then
29542
29543
29544
29545
29546
29547
29548
29549
29550   gl_LIBOBJS="$gl_LIBOBJS strtoul.$ac_objext"
29551
29552   fi
29553
29554
29555
29556   if test "$ac_cv_type_unsigned_long_long_int" = yes; then
29557     for ac_func in strtoull
29558 do :
29559   ac_fn_c_check_func "$LINENO" "strtoull" "ac_cv_func_strtoull"
29560 if test "x$ac_cv_func_strtoull" = xyes; then :
29561   cat >>confdefs.h <<_ACEOF
29562 #define HAVE_STRTOULL 1
29563 _ACEOF
29564
29565 fi
29566 done
29567
29568     if test $ac_cv_func_strtoull = no; then
29569       HAVE_STRTOULL=0
29570     fi
29571   fi
29572
29573   if test $HAVE_STRTOULL = 0; then
29574
29575
29576
29577
29578
29579
29580
29581
29582   gl_LIBOBJS="$gl_LIBOBJS strtoull.$ac_objext"
29583
29584
29585   :
29586
29587   fi
29588
29589
29590
29591
29592
29593           GNULIB_STRTOULL=1
29594
29595
29596
29597
29598
29599 $as_echo "#define GNULIB_TEST_STRTOULL 1" >>confdefs.h
29600
29601
29602
29603
29604
29605
29606
29607
29608   if test "$ac_cv_have_decl_strtoumax" != yes; then
29609     HAVE_DECL_STRTOUMAX=0
29610   fi
29611
29612   if test $ac_cv_func_strtoumax = no; then
29613
29614
29615
29616
29617
29618
29619
29620
29621   gl_LIBOBJS="$gl_LIBOBJS strtoumax.$ac_objext"
29622
29623
29624   ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
29625 if test "x$ac_cv_have_decl_strtoull" = xyes; then :
29626   ac_have_decl=1
29627 else
29628   ac_have_decl=0
29629 fi
29630
29631 cat >>confdefs.h <<_ACEOF
29632 #define HAVE_DECL_STRTOULL $ac_have_decl
29633 _ACEOF
29634
29635
29636
29637   fi
29638
29639
29640
29641
29642
29643           GNULIB_STRTOUMAX=1
29644
29645
29646
29647
29648
29649
29650
29651         if test $ac_cv_func_symlink = no; then
29652     HAVE_SYMLINK=0
29653   else
29654     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether symlink handles trailing slash correctly" >&5
29655 $as_echo_n "checking whether symlink handles trailing slash correctly... " >&6; }
29656 if ${gl_cv_func_symlink_works+:} false; then :
29657   $as_echo_n "(cached) " >&6
29658 else
29659   if test "$cross_compiling" = yes; then :
29660   case "$host_os" in
29661                     # Guess yes on glibc systems.
29662             *-gnu*) gl_cv_func_symlink_works="guessing yes" ;;
29663                     # If we don't know, assume the worst.
29664             *)      gl_cv_func_symlink_works="guessing no" ;;
29665           esac
29666
29667 else
29668   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29669 /* end confdefs.h.  */
29670 #include <unistd.h>
29671
29672 int
29673 main ()
29674 {
29675 int result = 0;
29676              if (!symlink ("a", "conftest.link/"))
29677                result |= 1;
29678              if (symlink ("conftest.f", "conftest.lnk2"))
29679                result |= 2;
29680              else if (!symlink ("a", "conftest.lnk2/"))
29681                result |= 4;
29682              return result;
29683
29684   ;
29685   return 0;
29686 }
29687 _ACEOF
29688 if ac_fn_c_try_run "$LINENO"; then :
29689   gl_cv_func_symlink_works=yes
29690 else
29691   gl_cv_func_symlink_works=no
29692 fi
29693 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29694   conftest.$ac_objext conftest.beam conftest.$ac_ext
29695 fi
29696
29697       rm -f conftest.f conftest.link conftest.lnk2
29698 fi
29699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_symlink_works" >&5
29700 $as_echo "$gl_cv_func_symlink_works" >&6; }
29701     case "$gl_cv_func_symlink_works" in
29702       *yes) ;;
29703       *)
29704         REPLACE_SYMLINK=1
29705         ;;
29706     esac
29707   fi
29708
29709   if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then
29710
29711
29712
29713
29714
29715
29716
29717
29718   gl_LIBOBJS="$gl_LIBOBJS symlink.$ac_objext"
29719
29720   fi
29721
29722
29723
29724
29725
29726           GNULIB_SYMLINK=1
29727
29728
29729
29730
29731
29732 $as_echo "#define GNULIB_TEST_SYMLINK 1" >>confdefs.h
29733
29734
29735
29736
29737
29738
29739
29740
29741   if test $ac_cv_func_symlinkat = no; then
29742     HAVE_SYMLINKAT=0
29743   fi
29744
29745   if test $HAVE_SYMLINKAT = 0; then
29746
29747
29748
29749
29750
29751
29752
29753
29754   gl_LIBOBJS="$gl_LIBOBJS symlinkat.$ac_objext"
29755
29756   fi
29757
29758
29759
29760
29761
29762           GNULIB_SYMLINKAT=1
29763
29764
29765
29766
29767
29768 $as_echo "#define GNULIB_TEST_SYMLINKAT 1" >>confdefs.h
29769
29770
29771
29772
29773
29774
29775
29776
29777
29778
29779
29780
29781
29782
29783
29784
29785
29786      if test $gl_cv_have_include_next = yes; then
29787        gl_cv_next_sys_stat_h='<'sys/stat.h'>'
29788      else
29789        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
29790 $as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
29791 if ${gl_cv_next_sys_stat_h+:} false; then :
29792   $as_echo_n "(cached) " >&6
29793 else
29794
29795              if test $ac_cv_header_sys_stat_h = yes; then
29796
29797
29798                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29799 /* end confdefs.h.  */
29800 #include <sys/stat.h>
29801
29802 _ACEOF
29803                                                                                                                         case "$host_os" in
29804                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
29805                  *)    gl_absname_cpp="$ac_cpp" ;;
29806                esac
29807
29808                case "$host_os" in
29809                  mingw*)
29810                                                                                                                                      gl_dirsep_regex='[/\\]'
29811                    ;;
29812                  *)
29813                    gl_dirsep_regex='\/'
29814                    ;;
29815                esac
29816                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
29817
29818                gl_header_literal_regex=`echo 'sys/stat.h' \
29819                                         | sed -e "$gl_make_literal_regex_sed"`
29820                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
29821                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
29822                    s|^/[^/]|//&|
29823                    p
29824                    q
29825                  }'
29826                                                             gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
29827                       sed -n "$gl_absolute_header_sed"`'"'
29828           else
29829                gl_cv_next_sys_stat_h='<'sys/stat.h'>'
29830              fi
29831
29832
29833 fi
29834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
29835 $as_echo "$gl_cv_next_sys_stat_h" >&6; }
29836      fi
29837      NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
29838
29839      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
29840        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
29841        gl_next_as_first_directive='<'sys/stat.h'>'
29842      else
29843        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
29844        gl_next_as_first_directive=$gl_cv_next_sys_stat_h
29845      fi
29846      NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
29847
29848
29849
29850
29851
29852
29853
29854
29855
29856
29857
29858   if test $WINDOWS_64_BIT_ST_SIZE = 1; then
29859
29860 $as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
29861
29862   fi
29863
29864       ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
29865      #include <sys/stat.h>
29866 "
29867 if test "x$ac_cv_type_nlink_t" = xyes; then :
29868
29869 else
29870
29871 $as_echo "#define nlink_t int" >>confdefs.h
29872
29873 fi
29874
29875
29876
29877     for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat     mknod mknodat stat utimensat; do
29878     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
29879     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
29880 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
29881 if eval \${$as_gl_Symbol+:} false; then :
29882   $as_echo_n "(cached) " >&6
29883 else
29884   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29885 /* end confdefs.h.  */
29886 #include <sys/stat.h>
29887
29888 int
29889 main ()
29890 {
29891 #undef $gl_func
29892   (void) $gl_func;
29893   ;
29894   return 0;
29895 }
29896 _ACEOF
29897 if ac_fn_c_try_compile "$LINENO"; then :
29898   eval "$as_gl_Symbol=yes"
29899 else
29900   eval "$as_gl_Symbol=no"
29901 fi
29902 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29903 fi
29904 eval ac_res=\$$as_gl_Symbol
29905                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
29906 $as_echo "$ac_res" >&6; }
29907     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
29908   cat >>confdefs.h <<_ACEOF
29909 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
29910 _ACEOF
29911
29912                      eval ac_cv_have_decl_$gl_func=yes
29913 fi
29914       done
29915
29916
29917
29918
29919
29920
29921
29922
29923
29924
29925
29926   if test $ac_cv_header_sysexits_h = yes; then
29927     HAVE_SYSEXITS_H=1
29928
29929
29930
29931
29932
29933
29934
29935
29936
29937      if test $gl_cv_have_include_next = yes; then
29938        gl_cv_next_sysexits_h='<'sysexits.h'>'
29939      else
29940        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sysexits.h>" >&5
29941 $as_echo_n "checking absolute name of <sysexits.h>... " >&6; }
29942 if ${gl_cv_next_sysexits_h+:} false; then :
29943   $as_echo_n "(cached) " >&6
29944 else
29945
29946              if test $ac_cv_header_sysexits_h = yes; then
29947
29948
29949                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29950 /* end confdefs.h.  */
29951 #include <sysexits.h>
29952
29953 _ACEOF
29954                                                                                                                         case "$host_os" in
29955                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
29956                  *)    gl_absname_cpp="$ac_cpp" ;;
29957                esac
29958
29959                case "$host_os" in
29960                  mingw*)
29961                                                                                                                                      gl_dirsep_regex='[/\\]'
29962                    ;;
29963                  *)
29964                    gl_dirsep_regex='\/'
29965                    ;;
29966                esac
29967                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
29968
29969                gl_header_literal_regex=`echo 'sysexits.h' \
29970                                         | sed -e "$gl_make_literal_regex_sed"`
29971                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
29972                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
29973                    s|^/[^/]|//&|
29974                    p
29975                    q
29976                  }'
29977                                                             gl_cv_next_sysexits_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
29978                       sed -n "$gl_absolute_header_sed"`'"'
29979           else
29980                gl_cv_next_sysexits_h='<'sysexits.h'>'
29981              fi
29982
29983
29984 fi
29985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sysexits_h" >&5
29986 $as_echo "$gl_cv_next_sysexits_h" >&6; }
29987      fi
29988      NEXT_SYSEXITS_H=$gl_cv_next_sysexits_h
29989
29990      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
29991        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
29992        gl_next_as_first_directive='<'sysexits.h'>'
29993      else
29994        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
29995        gl_next_as_first_directive=$gl_cv_next_sysexits_h
29996      fi
29997      NEXT_AS_FIRST_DIRECTIVE_SYSEXITS_H=$gl_next_as_first_directive
29998
29999
30000
30001
30002     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30003 /* end confdefs.h.  */
30004 #include <sysexits.h>
30005 int
30006 main ()
30007 {
30008 switch (0)
30009           {
30010           case EX_OK:
30011           case EX_USAGE:
30012           case EX_DATAERR:
30013           case EX_NOINPUT:
30014           case EX_NOUSER:
30015           case EX_NOHOST:
30016           case EX_UNAVAILABLE:
30017           case EX_SOFTWARE:
30018           case EX_OSERR:
30019           case EX_OSFILE:
30020           case EX_CANTCREAT:
30021           case EX_IOERR:
30022           case EX_TEMPFAIL:
30023           case EX_PROTOCOL:
30024           case EX_NOPERM:
30025           case EX_CONFIG:
30026             break;
30027           }
30028
30029   ;
30030   return 0;
30031 }
30032 _ACEOF
30033 if ac_fn_c_try_compile "$LINENO"; then :
30034   SYSEXITS_H=
30035 else
30036   SYSEXITS_H=sysexits.h
30037 fi
30038 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30039   else
30040     HAVE_SYSEXITS_H=0
30041     SYSEXITS_H=sysexits.h
30042   fi
30043
30044
30045    if test -n "$SYSEXITS_H"; then
30046   GL_GENERATE_SYSEXITS_H_TRUE=
30047   GL_GENERATE_SYSEXITS_H_FALSE='#'
30048 else
30049   GL_GENERATE_SYSEXITS_H_TRUE='#'
30050   GL_GENERATE_SYSEXITS_H_FALSE=
30051 fi
30052
30053
30054
30055
30056   :
30057
30058
30059
30060
30061
30062
30063
30064
30065
30066
30067
30068       ac_fn_c_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "#include <time.h>
30069 "
30070 if test "x$ac_cv_have_decl_localtime_r" = xyes; then :
30071   ac_have_decl=1
30072 else
30073   ac_have_decl=0
30074 fi
30075
30076 cat >>confdefs.h <<_ACEOF
30077 #define HAVE_DECL_LOCALTIME_R $ac_have_decl
30078 _ACEOF
30079
30080   if test $ac_cv_have_decl_localtime_r = no; then
30081     HAVE_DECL_LOCALTIME_R=0
30082   fi
30083
30084
30085   if test $ac_cv_func_localtime_r = yes; then
30086     HAVE_LOCALTIME_R=1
30087     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5
30088 $as_echo_n "checking whether localtime_r is compatible with its POSIX signature... " >&6; }
30089 if ${gl_cv_time_r_posix+:} false; then :
30090   $as_echo_n "(cached) " >&6
30091 else
30092   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30093 /* end confdefs.h.  */
30094 #include <time.h>
30095 int
30096 main ()
30097 {
30098 /* We don't need to append 'restrict's to the argument types,
30099                  even though the POSIX signature has the 'restrict's,
30100                  since C99 says they can't affect type compatibility.  */
30101               struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r;
30102               if (ptr) return 0;
30103               /* Check the return type is a pointer.
30104                  On HP-UX 10 it is 'int'.  */
30105               *localtime_r (0, 0);
30106   ;
30107   return 0;
30108 }
30109
30110 _ACEOF
30111 if ac_fn_c_try_compile "$LINENO"; then :
30112   gl_cv_time_r_posix=yes
30113 else
30114   gl_cv_time_r_posix=no
30115 fi
30116 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30117
30118 fi
30119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_r_posix" >&5
30120 $as_echo "$gl_cv_time_r_posix" >&6; }
30121     if test $gl_cv_time_r_posix = yes; then
30122       REPLACE_LOCALTIME_R=0
30123     else
30124       REPLACE_LOCALTIME_R=1
30125     fi
30126   else
30127     HAVE_LOCALTIME_R=0
30128   fi
30129
30130   if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
30131
30132
30133
30134
30135
30136
30137
30138
30139   gl_LIBOBJS="$gl_LIBOBJS time_r.$ac_objext"
30140
30141
30142   :
30143
30144   fi
30145
30146
30147
30148
30149
30150           GNULIB_TIME_R=1
30151
30152
30153
30154
30155
30156 $as_echo "#define GNULIB_TEST_TIME_R 1" >>confdefs.h
30157
30158
30159
30160   :
30161
30162
30163
30164
30165
30166
30167
30168
30169
30170
30171
30172
30173      if test $gl_cv_have_include_next = yes; then
30174        gl_cv_next_unistd_h='<'unistd.h'>'
30175      else
30176        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
30177 $as_echo_n "checking absolute name of <unistd.h>... " >&6; }
30178 if ${gl_cv_next_unistd_h+:} false; then :
30179   $as_echo_n "(cached) " >&6
30180 else
30181
30182              if test $ac_cv_header_unistd_h = yes; then
30183
30184
30185                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30186 /* end confdefs.h.  */
30187 #include <unistd.h>
30188
30189 _ACEOF
30190                                                                                                                         case "$host_os" in
30191                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
30192                  *)    gl_absname_cpp="$ac_cpp" ;;
30193                esac
30194
30195                case "$host_os" in
30196                  mingw*)
30197                                                                                                                                      gl_dirsep_regex='[/\\]'
30198                    ;;
30199                  *)
30200                    gl_dirsep_regex='\/'
30201                    ;;
30202                esac
30203                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
30204
30205                gl_header_literal_regex=`echo 'unistd.h' \
30206                                         | sed -e "$gl_make_literal_regex_sed"`
30207                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
30208                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
30209                    s|^/[^/]|//&|
30210                    p
30211                    q
30212                  }'
30213                                                             gl_cv_next_unistd_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
30214                       sed -n "$gl_absolute_header_sed"`'"'
30215           else
30216                gl_cv_next_unistd_h='<'unistd.h'>'
30217              fi
30218
30219
30220 fi
30221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
30222 $as_echo "$gl_cv_next_unistd_h" >&6; }
30223      fi
30224      NEXT_UNISTD_H=$gl_cv_next_unistd_h
30225
30226      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
30227        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
30228        gl_next_as_first_directive='<'unistd.h'>'
30229      else
30230        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
30231        gl_next_as_first_directive=$gl_cv_next_unistd_h
30232      fi
30233      NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
30234
30235
30236
30237
30238   if test $ac_cv_header_unistd_h = yes; then
30239     HAVE_UNISTD_H=1
30240   else
30241     HAVE_UNISTD_H=0
30242   fi
30243
30244
30245
30246
30247
30248
30249
30250     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
30251     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
30252     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
30253 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
30254 if eval \${$as_gl_Symbol+:} false; then :
30255   $as_echo_n "(cached) " >&6
30256 else
30257   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30258 /* end confdefs.h.  */
30259
30260 #if HAVE_UNISTD_H
30261 # include <unistd.h>
30262 #endif
30263 /* Some systems declare various items in the wrong headers.  */
30264 #if !(defined __GLIBC__ && !defined __UCLIBC__)
30265 # include <fcntl.h>
30266 # include <stdio.h>
30267 # include <stdlib.h>
30268 # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
30269 #  include <io.h>
30270 # endif
30271 #endif
30272
30273 int
30274 main ()
30275 {
30276 #undef $gl_func
30277   (void) $gl_func;
30278   ;
30279   return 0;
30280 }
30281 _ACEOF
30282 if ac_fn_c_try_compile "$LINENO"; then :
30283   eval "$as_gl_Symbol=yes"
30284 else
30285   eval "$as_gl_Symbol=no"
30286 fi
30287 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30288 fi
30289 eval ac_res=\$$as_gl_Symbol
30290                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
30291 $as_echo "$ac_res" >&6; }
30292     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
30293   cat >>confdefs.h <<_ACEOF
30294 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
30295 _ACEOF
30296
30297                      eval ac_cv_have_decl_$gl_func=yes
30298 fi
30299       done
30300
30301
30302
30303
30304
30305
30306
30307       if  { test "$HAVE_LIBUNISTRING" != yes \
30308     || {
30309
30310
30311
30312             test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
30313             || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
30314                  && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
30315                       || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
30316                            && test $LIBUNISTRING_VERSION_SUBMINOR -lt 0
30317                          }
30318                     }
30319                }
30320
30321
30322
30323
30324        }
30325   }; then
30326     LIBUNISTRING_UNITYPES_H='unitypes.h'
30327   else
30328     LIBUNISTRING_UNITYPES_H=
30329   fi
30330
30331
30332
30333
30334       if  { test "$HAVE_LIBUNISTRING" != yes \
30335     || {
30336
30337
30338
30339             test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
30340             || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
30341                  && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
30342                       || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
30343                            && test $LIBUNISTRING_VERSION_SUBMINOR -lt 0
30344                          }
30345                     }
30346                }
30347
30348
30349
30350
30351        }
30352   }; then
30353     LIBUNISTRING_UNIWIDTH_H='uniwidth.h'
30354   else
30355     LIBUNISTRING_UNIWIDTH_H=
30356   fi
30357
30358
30359
30360
30361        if  { test "$HAVE_LIBUNISTRING" != yes \
30362     || {
30363
30364
30365
30366             test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
30367             || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
30368                  && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
30369                       || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
30370                            && test $LIBUNISTRING_VERSION_SUBMINOR -lt 4
30371                          }
30372                     }
30373                }
30374
30375
30376
30377
30378        }
30379   }; then
30380   LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE=
30381   LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE='#'
30382 else
30383   LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE='#'
30384   LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE=
30385 fi
30386
30387
30388
30389
30390
30391
30392
30393     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unlink honors trailing slashes" >&5
30394 $as_echo_n "checking whether unlink honors trailing slashes... " >&6; }
30395 if ${gl_cv_func_unlink_honors_slashes+:} false; then :
30396   $as_echo_n "(cached) " >&6
30397 else
30398   touch conftest.file
30399      # Assume that if we have lstat, we can also check symlinks.
30400      if test $ac_cv_func_lstat = yes; then
30401        ln -s conftest.file conftest.lnk
30402      fi
30403      if test "$cross_compiling" = yes; then :
30404   case "$host_os" in
30405                  # Guess yes on glibc systems.
30406          *-gnu*) gl_cv_func_unlink_honors_slashes="guessing yes" ;;
30407                  # If we don't know, assume the worst.
30408          *)      gl_cv_func_unlink_honors_slashes="guessing no" ;;
30409        esac
30410
30411 else
30412   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30413 /* end confdefs.h.  */
30414 #if HAVE_UNISTD_H
30415            # include <unistd.h>
30416            #else /* on Windows with MSVC */
30417            # include <io.h>
30418            #endif
30419            #include <errno.h>
30420
30421 int
30422 main ()
30423 {
30424 int result = 0;
30425            if (!unlink ("conftest.file/"))
30426              result |= 1;
30427            else if (errno != ENOTDIR)
30428              result |= 2;
30429 #if HAVE_LSTAT
30430            if (!unlink ("conftest.lnk/"))
30431              result |= 4;
30432            else if (errno != ENOTDIR)
30433              result |= 8;
30434 #endif
30435            return result;
30436
30437   ;
30438   return 0;
30439 }
30440 _ACEOF
30441 if ac_fn_c_try_run "$LINENO"; then :
30442   gl_cv_func_unlink_honors_slashes=yes
30443 else
30444   gl_cv_func_unlink_honors_slashes=no
30445 fi
30446 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30447   conftest.$ac_objext conftest.beam conftest.$ac_ext
30448 fi
30449
30450      rm -f conftest.file conftest.lnk
30451 fi
30452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unlink_honors_slashes" >&5
30453 $as_echo "$gl_cv_func_unlink_honors_slashes" >&6; }
30454   case "$gl_cv_func_unlink_honors_slashes" in
30455     *no)
30456       REPLACE_UNLINK=1
30457       ;;
30458   esac
30459
30460       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unlink of a parent directory fails as it should" >&5
30461 $as_echo_n "checking whether unlink of a parent directory fails as it should... " >&6; }
30462 if ${gl_cv_func_unlink_parent_fails+:} false; then :
30463   $as_echo_n "(cached) " >&6
30464 else
30465   case "$host_os" in
30466        darwin*)
30467                                                       if {
30468               # Use the mktemp program if available. If not available, hide the error
30469               # message.
30470               tmp=`(umask 077 && mktemp -d /tmp/gtXXXXXX) 2>/dev/null` &&
30471               test -n "$tmp" && test -d "$tmp"
30472             } ||
30473             {
30474               # Use a simple mkdir command. It is guaranteed to fail if the directory
30475               # already exists.  $RANDOM is bash specific and expands to empty in shells
30476               # other than bash, ksh and zsh.  Its use does not increase security;
30477               # rather, it minimizes the probability of failure in a very cluttered /tmp
30478               # directory.
30479               tmp=/tmp/gt$$-$RANDOM
30480               (umask 077 && mkdir "$tmp")
30481             }; then
30482            mkdir "$tmp/subdir"
30483            GL_SUBDIR_FOR_UNLINK="$tmp/subdir"
30484            export GL_SUBDIR_FOR_UNLINK
30485            if test "$cross_compiling" = yes; then :
30486   # If we don't know, assume the worst.
30487               gl_cv_func_unlink_parent_fails="guessing no"
30488
30489 else
30490   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30491 /* end confdefs.h.  */
30492
30493                 #include <stdlib.h>
30494                 #if HAVE_UNISTD_H
30495                 # include <unistd.h>
30496                 #else /* on Windows with MSVC */
30497                 # include <direct.h>
30498                 # include <io.h>
30499                 #endif
30500                 int main ()
30501                 {
30502                   int result = 0;
30503                   if (chdir (getenv ("GL_SUBDIR_FOR_UNLINK")) != 0)
30504                     result |= 1;
30505                   else if (unlink ("..") == 0)
30506                     result |= 2;
30507                   return result;
30508                 }
30509
30510 _ACEOF
30511 if ac_fn_c_try_run "$LINENO"; then :
30512   gl_cv_func_unlink_parent_fails=yes
30513 else
30514   gl_cv_func_unlink_parent_fails=no
30515 fi
30516 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30517   conftest.$ac_objext conftest.beam conftest.$ac_ext
30518 fi
30519
30520            unset GL_SUBDIR_FOR_UNLINK
30521            rm -rf "$tmp"
30522          else
30523            gl_cv_func_unlink_parent_fails="guessing no"
30524          fi
30525          ;;
30526        *)
30527          gl_cv_func_unlink_parent_fails="guessing yes"
30528          ;;
30529      esac
30530
30531 fi
30532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unlink_parent_fails" >&5
30533 $as_echo "$gl_cv_func_unlink_parent_fails" >&6; }
30534   case "$gl_cv_func_unlink_parent_fails" in
30535     *no)
30536       REPLACE_UNLINK=1
30537
30538 $as_echo "#define UNLINK_PARENT_BUG 1" >>confdefs.h
30539
30540       ;;
30541   esac
30542
30543   if test $REPLACE_UNLINK = 1; then
30544
30545
30546
30547
30548
30549
30550
30551
30552   gl_LIBOBJS="$gl_LIBOBJS unlink.$ac_objext"
30553
30554   fi
30555
30556
30557
30558
30559
30560           GNULIB_UNLINK=1
30561
30562
30563
30564
30565
30566 $as_echo "#define GNULIB_TEST_UNLINK 1" >>confdefs.h
30567
30568
30569
30570
30571
30572
30573
30574
30575
30576   if test $ac_cv_func_unlinkat = no; then
30577     HAVE_UNLINKAT=0
30578   else
30579     case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
30580       *no)
30581         # Solaris 9 has *at functions, but uniformly mishandles trailing
30582         # slash in all of them.
30583         REPLACE_UNLINKAT=1
30584         ;;
30585       *)
30586         # GNU/Hurd has unlinkat, but it has the same bug as unlink.
30587         if test $REPLACE_UNLINK = 1; then
30588           REPLACE_UNLINKAT=1
30589         fi
30590         ;;
30591     esac
30592   fi
30593
30594   if test $HAVE_UNLINKAT = 0 || test $REPLACE_UNLINKAT = 1; then
30595
30596
30597
30598
30599
30600
30601
30602
30603   gl_LIBOBJS="$gl_LIBOBJS unlinkat.$ac_objext"
30604
30605   fi
30606
30607
30608
30609
30610
30611           GNULIB_UNLINKAT=1
30612
30613
30614
30615
30616
30617 $as_echo "#define GNULIB_TEST_UNLINKAT 1" >>confdefs.h
30618
30619
30620
30621
30622
30623
30624
30625   # The Hurd, the Linux kernel, the FreeBSD kernel version 2.2 and later,
30626   # Cygwin, and mingw never let anyone (even root) unlink directories.
30627   # If anyone knows of another system for which unlink can never
30628   # remove a directory, please report it to <bug-coreutils@gnu.org>.
30629   # Unfortunately this is difficult to test for, since it requires root access
30630   # and might create garbage in the file system,
30631   # so the code below simply relies on the kernel name and version number.
30632   case $host_os in
30633   gnu[0-9]* | \
30634   linux-* | linux | \
30635   freebsd2.2* | freebsd[3-9]* | freebsd[1-9][0-9]* | \
30636   cygwin | \
30637   mingw*)
30638
30639 $as_echo "#define UNLINK_CANNOT_UNLINK_DIR 1" >>confdefs.h
30640 ;;
30641   esac
30642
30643
30644
30645 $as_echo "#define USE_UNLOCKED_IO 1" >>confdefs.h
30646
30647
30648
30649
30650
30651
30652
30653
30654
30655
30656
30657
30658
30659
30660
30661
30662
30663
30664
30665
30666
30667   if test $ac_cv_have_decl_unsetenv = no; then
30668     HAVE_DECL_UNSETENV=0
30669   fi
30670   for ac_func in unsetenv
30671 do :
30672   ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
30673 if test "x$ac_cv_func_unsetenv" = xyes; then :
30674   cat >>confdefs.h <<_ACEOF
30675 #define HAVE_UNSETENV 1
30676 _ACEOF
30677
30678 fi
30679 done
30680
30681   if test $ac_cv_func_unsetenv = no; then
30682     HAVE_UNSETENV=0
30683   else
30684     HAVE_UNSETENV=1
30685         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5
30686 $as_echo_n "checking for unsetenv() return type... " >&6; }
30687 if ${gt_cv_func_unsetenv_ret+:} false; then :
30688   $as_echo_n "(cached) " >&6
30689 else
30690   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30691 /* end confdefs.h.  */
30692
30693 #undef _BSD
30694 #define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */
30695 #include <stdlib.h>
30696 extern
30697 #ifdef __cplusplus
30698 "C"
30699 #endif
30700 int unsetenv (const char *name);
30701
30702 int
30703 main ()
30704 {
30705
30706   ;
30707   return 0;
30708 }
30709 _ACEOF
30710 if ac_fn_c_try_compile "$LINENO"; then :
30711   gt_cv_func_unsetenv_ret='int'
30712 else
30713   gt_cv_func_unsetenv_ret='void'
30714 fi
30715 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30716 fi
30717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5
30718 $as_echo "$gt_cv_func_unsetenv_ret" >&6; }
30719     if test $gt_cv_func_unsetenv_ret = 'void'; then
30720
30721 $as_echo "#define VOID_UNSETENV 1" >>confdefs.h
30722
30723       REPLACE_UNSETENV=1
30724     fi
30725
30726                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5
30727 $as_echo_n "checking whether unsetenv obeys POSIX... " >&6; }
30728 if ${gl_cv_func_unsetenv_works+:} false; then :
30729   $as_echo_n "(cached) " >&6
30730 else
30731   if test "$cross_compiling" = yes; then :
30732   case "$host_os" in
30733                  # Guess yes on glibc systems.
30734          *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
30735                  # If we don't know, assume the worst.
30736          *)      gl_cv_func_unsetenv_works="guessing no" ;;
30737        esac
30738
30739 else
30740   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30741 /* end confdefs.h.  */
30742
30743        #include <stdlib.h>
30744        #include <errno.h>
30745        extern char **environ;
30746
30747 int
30748 main ()
30749 {
30750
30751        char entry1[] = "a=1";
30752        char entry2[] = "b=2";
30753        char *env[] = { entry1, entry2, NULL };
30754        if (putenv ((char *) "a=1")) return 1;
30755        if (putenv (entry2)) return 2;
30756        entry2[0] = 'a';
30757        unsetenv ("a");
30758        if (getenv ("a")) return 3;
30759        if (!unsetenv ("") || errno != EINVAL) return 4;
30760        entry2[0] = 'b';
30761        environ = env;
30762        if (!getenv ("a")) return 5;
30763        entry2[0] = 'a';
30764        unsetenv ("a");
30765        if (getenv ("a")) return 6;
30766
30767   ;
30768   return 0;
30769 }
30770 _ACEOF
30771 if ac_fn_c_try_run "$LINENO"; then :
30772   gl_cv_func_unsetenv_works=yes
30773 else
30774   gl_cv_func_unsetenv_works=no
30775 fi
30776 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30777   conftest.$ac_objext conftest.beam conftest.$ac_ext
30778 fi
30779
30780 fi
30781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
30782 $as_echo "$gl_cv_func_unsetenv_works" >&6; }
30783     case "$gl_cv_func_unsetenv_works" in
30784       *yes) ;;
30785       *)
30786         REPLACE_UNSETENV=1
30787         ;;
30788     esac
30789   fi
30790
30791   if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
30792
30793
30794
30795
30796
30797
30798
30799
30800   gl_LIBOBJS="$gl_LIBOBJS unsetenv.$ac_objext"
30801
30802
30803
30804
30805
30806   fi
30807
30808
30809
30810
30811
30812           GNULIB_UNSETENV=1
30813
30814
30815
30816
30817
30818 $as_echo "#define GNULIB_TEST_UNSETENV 1" >>confdefs.h
30819
30820
30821
30822
30823
30824
30825
30826
30827
30828   if test $ac_cv_func_futimens = no && test $ac_cv_func_futimesat = yes; then
30829                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether futimesat handles NULL file" >&5
30830 $as_echo_n "checking whether futimesat handles NULL file... " >&6; }
30831 if ${gl_cv_func_futimesat_works+:} false; then :
30832   $as_echo_n "(cached) " >&6
30833 else
30834   touch conftest.file
30835        if test "$cross_compiling" = yes; then :
30836   case "$host_os" in
30837                    # Guess yes on glibc systems.
30838            *-gnu*) gl_cv_func_futimesat_works="guessing yes" ;;
30839                    # If we don't know, assume the worst.
30840            *)      gl_cv_func_futimesat_works="guessing no" ;;
30841          esac
30842
30843 else
30844   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30845 /* end confdefs.h.  */
30846
30847 #include <stddef.h>
30848 #include <sys/times.h>
30849 #include <fcntl.h>
30850
30851 int
30852 main ()
30853 {
30854     int fd = open ("conftest.file", O_RDWR);
30855           if (fd < 0) return 1;
30856           if (futimesat (fd, NULL, NULL)) return 2;
30857
30858   ;
30859   return 0;
30860 }
30861 _ACEOF
30862 if ac_fn_c_try_run "$LINENO"; then :
30863   gl_cv_func_futimesat_works=yes
30864 else
30865   gl_cv_func_futimesat_works=no
30866 fi
30867 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30868   conftest.$ac_objext conftest.beam conftest.$ac_ext
30869 fi
30870
30871       rm -f conftest.file
30872 fi
30873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_futimesat_works" >&5
30874 $as_echo "$gl_cv_func_futimesat_works" >&6; }
30875     case "$gl_cv_func_futimesat_works" in
30876       *yes) ;;
30877       *)
30878
30879 $as_echo "#define FUTIMESAT_NULL_BUG 1" >>confdefs.h
30880
30881         ;;
30882     esac
30883   fi
30884
30885
30886
30887
30888
30889   if test $ac_cv_func_utimensat = no; then
30890     HAVE_UTIMENSAT=0
30891   else
30892     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether utimensat works" >&5
30893 $as_echo_n "checking whether utimensat works... " >&6; }
30894 if ${gl_cv_func_utimensat_works+:} false; then :
30895   $as_echo_n "(cached) " >&6
30896 else
30897   if test "$cross_compiling" = yes; then :
30898   gl_cv_func_utimensat_works="guessing no"
30899 else
30900   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30901 /* end confdefs.h.  */
30902
30903 #include <fcntl.h>
30904 #include <sys/stat.h>
30905 #include <unistd.h>
30906
30907 int
30908 main ()
30909 {
30910 int result = 0;
30911               const char *f = "conftest.file";
30912               if (close (creat (f, 0600)))
30913                 return 1;
30914               /* Test whether the AT_SYMLINK_NOFOLLOW flag is supported.  */
30915               {
30916                 if (utimensat (AT_FDCWD, f, NULL, AT_SYMLINK_NOFOLLOW))
30917                   result |= 2;
30918               }
30919               /* Test whether UTIME_NOW and UTIME_OMIT work.  */
30920               {
30921                 struct timespec ts[2] = { { 1, UTIME_OMIT }, { 1, UTIME_NOW } };
30922                 if (utimensat (AT_FDCWD, f, ts, 0))
30923                   result |= 4;
30924               }
30925               sleep (1);
30926               {
30927                 struct timespec ts[2] = { { 1, UTIME_NOW }, { 1, UTIME_OMIT } };
30928                 struct stat st;
30929                 if (utimensat (AT_FDCWD, f, ts, 0))
30930                   result |= 8;
30931                 if (stat (f, &st))
30932                   result |= 16;
30933                 else if (st.st_ctime < st.st_atime)
30934                   result |= 32;
30935               }
30936               return result;
30937
30938   ;
30939   return 0;
30940 }
30941 _ACEOF
30942 if ac_fn_c_try_run "$LINENO"; then :
30943            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30944 /* end confdefs.h.  */
30945
30946 #ifdef __linux__
30947 /* The Linux kernel added utimensat in 2.6.22, but has bugs with UTIME_OMIT
30948    in several file systems as recently as 2.6.32.  Always replace utimensat
30949    to support older kernels.  */
30950 choke me
30951 #endif
30952
30953 int
30954 main ()
30955 {
30956
30957   ;
30958   return 0;
30959 }
30960 _ACEOF
30961 if ac_fn_c_try_compile "$LINENO"; then :
30962   gl_cv_func_utimensat_works=yes
30963 else
30964   gl_cv_func_utimensat_works="needs runtime check"
30965 fi
30966 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30967 else
30968   gl_cv_func_utimensat_works=no
30969 fi
30970 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30971   conftest.$ac_objext conftest.beam conftest.$ac_ext
30972 fi
30973
30974 fi
30975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_utimensat_works" >&5
30976 $as_echo "$gl_cv_func_utimensat_works" >&6; }
30977     if test "$gl_cv_func_utimensat_works" != yes; then
30978       REPLACE_UTIMENSAT=1
30979     fi
30980   fi
30981
30982   if test $HAVE_UTIMENSAT = 0 || test $REPLACE_UTIMENSAT = 1; then
30983
30984
30985
30986
30987
30988
30989
30990
30991   gl_LIBOBJS="$gl_LIBOBJS utimensat.$ac_objext"
30992
30993   fi
30994
30995
30996
30997
30998
30999           GNULIB_UTIMENSAT=1
31000
31001
31002
31003
31004
31005 $as_echo "#define GNULIB_TEST_UTIMENSAT 1" >>confdefs.h
31006
31007
31008
31009
31010
31011   if test $ac_cv_func_vasnprintf = no; then
31012
31013
31014
31015
31016
31017
31018
31019
31020
31021
31022   gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
31023
31024
31025
31026
31027
31028
31029
31030
31031
31032   gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
31033
31034
31035
31036
31037
31038
31039
31040
31041
31042   gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
31043
31044
31045
31046
31047
31048
31049
31050
31051
31052   gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
31053
31054   if test $ac_cv_func_vasnprintf = yes; then
31055
31056 $as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h
31057
31058   fi
31059
31060
31061
31062
31063
31064
31065
31066
31067
31068
31069
31070   ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
31071 if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
31072
31073 else
31074
31075 $as_echo "#define ptrdiff_t long" >>confdefs.h
31076
31077
31078 fi
31079
31080
31081
31082
31083
31084
31085
31086   fi
31087
31088
31089   for ac_func in vasprintf
31090 do :
31091   ac_fn_c_check_func "$LINENO" "vasprintf" "ac_cv_func_vasprintf"
31092 if test "x$ac_cv_func_vasprintf" = xyes; then :
31093   cat >>confdefs.h <<_ACEOF
31094 #define HAVE_VASPRINTF 1
31095 _ACEOF
31096
31097 fi
31098 done
31099
31100   if test $ac_cv_func_vasprintf = no; then
31101
31102
31103
31104
31105
31106
31107
31108
31109
31110   gl_LIBOBJS="$gl_LIBOBJS vasprintf.$ac_objext"
31111
31112
31113
31114
31115
31116
31117
31118
31119
31120   gl_LIBOBJS="$gl_LIBOBJS asprintf.$ac_objext"
31121
31122
31123   if test $ac_cv_func_vasprintf = yes; then
31124     REPLACE_VASPRINTF=1
31125   else
31126     HAVE_VASPRINTF=0
31127   fi
31128
31129
31130
31131
31132
31133
31134
31135
31136   fi
31137
31138
31139
31140
31141
31142
31143           GNULIB_VASPRINTF=1
31144
31145
31146
31147
31148
31149 $as_echo "#define GNULIB_TEST_VASPRINTF 1" >>confdefs.h
31150
31151
31152
31153
31154
31155   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=asprintf:2:c-format"
31156
31157
31158
31159   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=vasprintf:2:c-format"
31160
31161
31162 # Check whether --with-packager was given.
31163 if test "${with_packager+set}" = set; then :
31164   withval=$with_packager;       case $withval in
31165         yes|no) ;;
31166         *)
31167 cat >>confdefs.h <<_ACEOF
31168 #define PACKAGE_PACKAGER "$withval"
31169 _ACEOF
31170  ;;
31171       esac
31172
31173 fi
31174
31175
31176
31177 # Check whether --with-packager-version was given.
31178 if test "${with_packager_version+set}" = set; then :
31179   withval=$with_packager_version;       case $withval in
31180         yes|no) ;;
31181         *)
31182 cat >>confdefs.h <<_ACEOF
31183 #define PACKAGE_PACKAGER_VERSION "$withval"
31184 _ACEOF
31185  ;;
31186       esac
31187
31188 fi
31189
31190
31191
31192 # Check whether --with-packager-bug-reports was given.
31193 if test "${with_packager_bug_reports+set}" = set; then :
31194   withval=$with_packager_bug_reports;       case $withval in
31195         yes|no) ;;
31196         *)
31197 cat >>confdefs.h <<_ACEOF
31198 #define PACKAGE_PACKAGER_BUG_REPORTS "$withval"
31199 _ACEOF
31200  ;;
31201       esac
31202
31203 fi
31204
31205
31206   if test "X$with_packager" = "X" && \
31207      test "X$with_packager_version$with_packager_bug_reports" != "X"
31208   then
31209     as_fn_error $? "The --with-packager-{bug-reports,version} options require --with-packager" "$LINENO" 5
31210   fi
31211
31212
31213
31214   gl_cv_func_vsnprintf_usable=no
31215   for ac_func in vsnprintf
31216 do :
31217   ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
31218 if test "x$ac_cv_func_vsnprintf" = xyes; then :
31219   cat >>confdefs.h <<_ACEOF
31220 #define HAVE_VSNPRINTF 1
31221 _ACEOF
31222
31223 fi
31224 done
31225
31226   if test $ac_cv_func_vsnprintf = yes; then
31227
31228
31229
31230   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf respects a size of 1" >&5
31231 $as_echo_n "checking whether snprintf respects a size of 1... " >&6; }
31232 if ${gl_cv_func_snprintf_size1+:} false; then :
31233   $as_echo_n "(cached) " >&6
31234 else
31235
31236       if test "$cross_compiling" = yes; then :
31237   gl_cv_func_snprintf_size1="guessing yes"
31238 else
31239   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31240 /* end confdefs.h.  */
31241
31242 #include <stdio.h>
31243 #if HAVE_SNPRINTF
31244 # define my_snprintf snprintf
31245 #else
31246 # include <stdarg.h>
31247 static int my_snprintf (char *buf, int size, const char *format, ...)
31248 {
31249   va_list args;
31250   int ret;
31251   va_start (args, format);
31252   ret = vsnprintf (buf, size, format, args);
31253   va_end (args);
31254   return ret;
31255 }
31256 #endif
31257 int main()
31258 {
31259   static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
31260   my_snprintf (buf, 1, "%d", 12345);
31261   return buf[1] != 'E';
31262 }
31263 _ACEOF
31264 if ac_fn_c_try_run "$LINENO"; then :
31265   gl_cv_func_snprintf_size1=yes
31266 else
31267   gl_cv_func_snprintf_size1=no
31268 fi
31269 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31270   conftest.$ac_objext conftest.beam conftest.$ac_ext
31271 fi
31272
31273
31274 fi
31275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_size1" >&5
31276 $as_echo "$gl_cv_func_snprintf_size1" >&6; }
31277
31278     case "$gl_cv_func_snprintf_size1" in
31279       *yes)
31280
31281         case "$gl_cv_func_snprintf_retval_c99" in
31282           *yes)
31283
31284
31285      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports POSIX/XSI format strings with positions" >&5
31286 $as_echo_n "checking whether printf supports POSIX/XSI format strings with positions... " >&6; }
31287 if ${gl_cv_func_printf_positions+:} false; then :
31288   $as_echo_n "(cached) " >&6
31289 else
31290
31291       if test "$cross_compiling" = yes; then :
31292
31293          case "$host_os" in
31294            netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*)
31295                          gl_cv_func_printf_positions="guessing no";;
31296            beos*)        gl_cv_func_printf_positions="guessing no";;
31297            mingw* | pw*) gl_cv_func_printf_positions="guessing no";;
31298            *)            gl_cv_func_printf_positions="guessing yes";;
31299          esac
31300
31301 else
31302   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31303 /* end confdefs.h.  */
31304
31305 #include <stdio.h>
31306 #include <string.h>
31307 /* The string "%2$d %1$d", with dollar characters protected from the shell's
31308    dollar expansion (possibly an autoconf bug).  */
31309 static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
31310 static char buf[100];
31311 int main ()
31312 {
31313   sprintf (buf, format, 33, 55);
31314   return (strcmp (buf, "55 33") != 0);
31315 }
31316 _ACEOF
31317 if ac_fn_c_try_run "$LINENO"; then :
31318   gl_cv_func_printf_positions=yes
31319 else
31320   gl_cv_func_printf_positions=no
31321 fi
31322 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31323   conftest.$ac_objext conftest.beam conftest.$ac_ext
31324 fi
31325
31326
31327 fi
31328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_positions" >&5
31329 $as_echo "$gl_cv_func_printf_positions" >&6; }
31330
31331             case "$gl_cv_func_printf_positions" in
31332               *yes)
31333                 gl_cv_func_vsnprintf_usable=yes
31334                 ;;
31335             esac
31336             ;;
31337         esac
31338         ;;
31339     esac
31340   fi
31341   if test $gl_cv_func_vsnprintf_usable = no; then
31342
31343
31344
31345
31346
31347
31348
31349
31350
31351
31352   gl_LIBOBJS="$gl_LIBOBJS vsnprintf.$ac_objext"
31353
31354   if test $ac_cv_func_vsnprintf = yes; then
31355     REPLACE_VSNPRINTF=1
31356   fi
31357   :
31358
31359   fi
31360
31361   if test $ac_cv_have_decl_vsnprintf = no; then
31362     HAVE_DECL_VSNPRINTF=0
31363   fi
31364
31365
31366
31367
31368
31369
31370           GNULIB_VSNPRINTF=1
31371
31372
31373
31374
31375
31376 $as_echo "#define GNULIB_TEST_VSNPRINTF 1" >>confdefs.h
31377
31378
31379
31380
31381
31382
31383
31384
31385
31386
31387
31388
31389
31390
31391
31392      if test $gl_cv_have_include_next = yes; then
31393        gl_cv_next_wchar_h='<'wchar.h'>'
31394      else
31395        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
31396 $as_echo_n "checking absolute name of <wchar.h>... " >&6; }
31397 if ${gl_cv_next_wchar_h+:} false; then :
31398   $as_echo_n "(cached) " >&6
31399 else
31400
31401              if test $ac_cv_header_wchar_h = yes; then
31402
31403
31404                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31405 /* end confdefs.h.  */
31406 #include <wchar.h>
31407
31408 _ACEOF
31409                                                                                                                         case "$host_os" in
31410                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
31411                  *)    gl_absname_cpp="$ac_cpp" ;;
31412                esac
31413
31414                case "$host_os" in
31415                  mingw*)
31416                                                                                                                                      gl_dirsep_regex='[/\\]'
31417                    ;;
31418                  *)
31419                    gl_dirsep_regex='\/'
31420                    ;;
31421                esac
31422                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
31423
31424                gl_header_literal_regex=`echo 'wchar.h' \
31425                                         | sed -e "$gl_make_literal_regex_sed"`
31426                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
31427                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
31428                    s|^/[^/]|//&|
31429                    p
31430                    q
31431                  }'
31432                                                             gl_cv_next_wchar_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
31433                       sed -n "$gl_absolute_header_sed"`'"'
31434           else
31435                gl_cv_next_wchar_h='<'wchar.h'>'
31436              fi
31437
31438
31439 fi
31440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
31441 $as_echo "$gl_cv_next_wchar_h" >&6; }
31442      fi
31443      NEXT_WCHAR_H=$gl_cv_next_wchar_h
31444
31445      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
31446        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
31447        gl_next_as_first_directive='<'wchar.h'>'
31448      else
31449        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
31450        gl_next_as_first_directive=$gl_cv_next_wchar_h
31451      fi
31452      NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
31453
31454
31455
31456
31457   if test $ac_cv_header_wchar_h = yes; then
31458     HAVE_WCHAR_H=1
31459   else
31460     HAVE_WCHAR_H=0
31461   fi
31462
31463
31464
31465
31466
31467   if test $gt_cv_c_wint_t = yes; then
31468     HAVE_WINT_T=1
31469   else
31470     HAVE_WINT_T=0
31471   fi
31472
31473
31474
31475     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
31476     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
31477     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
31478 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
31479 if eval \${$as_gl_Symbol+:} false; then :
31480   $as_echo_n "(cached) " >&6
31481 else
31482   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31483 /* end confdefs.h.  */
31484
31485 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
31486    <wchar.h>.
31487    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
31488    included before <wchar.h>.  */
31489 #if !(defined __GLIBC__ && !defined __UCLIBC__)
31490 # include <stddef.h>
31491 # include <stdio.h>
31492 # include <time.h>
31493 #endif
31494 #include <wchar.h>
31495
31496 int
31497 main ()
31498 {
31499 #undef $gl_func
31500   (void) $gl_func;
31501   ;
31502   return 0;
31503 }
31504 _ACEOF
31505 if ac_fn_c_try_compile "$LINENO"; then :
31506   eval "$as_gl_Symbol=yes"
31507 else
31508   eval "$as_gl_Symbol=no"
31509 fi
31510 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31511 fi
31512 eval ac_res=\$$as_gl_Symbol
31513                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
31514 $as_echo "$ac_res" >&6; }
31515     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
31516   cat >>confdefs.h <<_ACEOF
31517 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
31518 _ACEOF
31519
31520                      eval ac_cv_have_decl_$gl_func=yes
31521 fi
31522       done
31523
31524
31525
31526
31527
31528
31529
31530
31531
31532
31533
31534
31535   if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
31536
31537
31538
31539      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
31540 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
31541 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
31542   $as_echo_n "(cached) " >&6
31543 else
31544
31545                   case "$host_os" in
31546                      # Guess no on AIX and OSF/1.
31547         aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
31548                      # Guess yes otherwise.
31549         *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
31550       esac
31551       if test $LOCALE_JA != none; then
31552         if test "$cross_compiling" = yes; then :
31553   :
31554 else
31555   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31556 /* end confdefs.h.  */
31557
31558 #include <locale.h>
31559 #include <string.h>
31560 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
31561    <wchar.h>.
31562    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
31563    included before <wchar.h>.  */
31564 #include <stddef.h>
31565 #include <stdio.h>
31566 #include <time.h>
31567 #include <wchar.h>
31568 int main ()
31569 {
31570   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
31571     {
31572       const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
31573       mbstate_t state;
31574       wchar_t wc;
31575
31576       memset (&state, '\0', sizeof (mbstate_t));
31577       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
31578         if (mbsinit (&state))
31579           return 1;
31580     }
31581   return 0;
31582 }
31583 _ACEOF
31584 if ac_fn_c_try_run "$LINENO"; then :
31585   gl_cv_func_mbrtowc_incomplete_state=yes
31586 else
31587   gl_cv_func_mbrtowc_incomplete_state=no
31588 fi
31589 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31590   conftest.$ac_objext conftest.beam conftest.$ac_ext
31591 fi
31592
31593       fi
31594
31595 fi
31596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
31597 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
31598
31599
31600
31601
31602      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
31603 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
31604 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
31605   $as_echo_n "(cached) " >&6
31606 else
31607
31608                   case "$host_os" in
31609                     # Guess no on Solaris 8.
31610         solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
31611                     # Guess yes otherwise.
31612         *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
31613       esac
31614       if test $LOCALE_ZH_CN != none; then
31615         if test "$cross_compiling" = yes; then :
31616   :
31617 else
31618   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31619 /* end confdefs.h.  */
31620
31621 #include <locale.h>
31622 #include <stdlib.h>
31623 #include <string.h>
31624 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
31625    <wchar.h>.
31626    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
31627    included before <wchar.h>.  */
31628 #include <stddef.h>
31629 #include <stdio.h>
31630 #include <time.h>
31631 #include <wchar.h>
31632 int main ()
31633 {
31634   /* This fails on Solaris 8:
31635      mbrtowc returns 2, and sets wc to 0x00F0.
31636      mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
31637   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
31638     {
31639       char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
31640       mbstate_t state;
31641       wchar_t wc;
31642
31643       memset (&state, '\0', sizeof (mbstate_t));
31644       if (mbrtowc (&wc, input + 3, 6, &state) != 4
31645           && mbtowc (&wc, input + 3, 6) == 4)
31646         return 1;
31647     }
31648   return 0;
31649 }
31650 _ACEOF
31651 if ac_fn_c_try_run "$LINENO"; then :
31652   gl_cv_func_mbrtowc_sanitycheck=yes
31653 else
31654   gl_cv_func_mbrtowc_sanitycheck=no
31655 fi
31656 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31657   conftest.$ac_objext conftest.beam conftest.$ac_ext
31658 fi
31659
31660       fi
31661
31662 fi
31663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
31664 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
31665
31666     REPLACE_MBSTATE_T=0
31667     case "$gl_cv_func_mbrtowc_incomplete_state" in
31668       *yes) ;;
31669       *) REPLACE_MBSTATE_T=1 ;;
31670     esac
31671     case "$gl_cv_func_mbrtowc_sanitycheck" in
31672       *yes) ;;
31673       *) REPLACE_MBSTATE_T=1 ;;
31674     esac
31675   else
31676     REPLACE_MBSTATE_T=1
31677   fi
31678
31679
31680
31681   if test $ac_cv_func_wcrtomb = no; then
31682     HAVE_WCRTOMB=0
31683     ac_fn_c_check_decl "$LINENO" "wcrtomb" "ac_cv_have_decl_wcrtomb" "
31684 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
31685    <wchar.h>.
31686    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
31687    included before <wchar.h>.  */
31688 #include <stddef.h>
31689 #include <stdio.h>
31690 #include <time.h>
31691 #include <wchar.h>
31692
31693 "
31694 if test "x$ac_cv_have_decl_wcrtomb" = xyes; then :
31695   ac_have_decl=1
31696 else
31697   ac_have_decl=0
31698 fi
31699
31700 cat >>confdefs.h <<_ACEOF
31701 #define HAVE_DECL_WCRTOMB $ac_have_decl
31702 _ACEOF
31703
31704     if test $ac_cv_have_decl_wcrtomb = yes; then
31705                         REPLACE_WCRTOMB=1
31706     fi
31707   else
31708     if test $REPLACE_MBSTATE_T = 1; then
31709       REPLACE_WCRTOMB=1
31710     else
31711
31712
31713
31714
31715
31716              { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wcrtomb return value is correct" >&5
31717 $as_echo_n "checking whether wcrtomb return value is correct... " >&6; }
31718 if ${gl_cv_func_wcrtomb_retval+:} false; then :
31719   $as_echo_n "(cached) " >&6
31720 else
31721
31722                               case "$host_os" in
31723                                      # Guess no on AIX 4, OSF/1 and Solaris.
31724             aix4* | osf* | solaris*) gl_cv_func_wcrtomb_retval="guessing no" ;;
31725                                      # Guess yes otherwise.
31726             *)                       gl_cv_func_wcrtomb_retval="guessing yes" ;;
31727           esac
31728           if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
31729             if test "$cross_compiling" = yes; then :
31730   :
31731 else
31732   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31733 /* end confdefs.h.  */
31734
31735 #include <locale.h>
31736 #include <string.h>
31737 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
31738    <wchar.h>.
31739    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
31740    included before <wchar.h>.  */
31741 #include <stddef.h>
31742 #include <stdio.h>
31743 #include <time.h>
31744 #include <wchar.h>
31745 int main ()
31746 {
31747   int result = 0;
31748   if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
31749     {
31750       if (wcrtomb (NULL, 0, NULL) != 1)
31751         result |= 1;
31752     }
31753   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
31754     {
31755       if (wcrtomb (NULL, 0, NULL) != 1)
31756         result |= 2;
31757     }
31758   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
31759     {
31760       if (wcrtomb (NULL, 0, NULL) != 1)
31761         result |= 4;
31762     }
31763   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
31764     {
31765       if (wcrtomb (NULL, 0, NULL) != 1)
31766         result |= 8;
31767     }
31768   return result;
31769 }
31770 _ACEOF
31771 if ac_fn_c_try_run "$LINENO"; then :
31772   gl_cv_func_wcrtomb_retval=yes
31773 else
31774   gl_cv_func_wcrtomb_retval=no
31775 fi
31776 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31777   conftest.$ac_objext conftest.beam conftest.$ac_ext
31778 fi
31779
31780           fi
31781
31782 fi
31783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcrtomb_retval" >&5
31784 $as_echo "$gl_cv_func_wcrtomb_retval" >&6; }
31785       case "$gl_cv_func_wcrtomb_retval" in
31786         *yes) ;;
31787         *) REPLACE_WCRTOMB=1 ;;
31788       esac
31789     fi
31790   fi
31791
31792   if test $HAVE_WCRTOMB = 0 || test $REPLACE_WCRTOMB = 1; then
31793
31794
31795
31796
31797
31798
31799
31800
31801   gl_LIBOBJS="$gl_LIBOBJS wcrtomb.$ac_objext"
31802
31803
31804   :
31805
31806   fi
31807
31808
31809
31810
31811
31812           GNULIB_WCRTOMB=1
31813
31814
31815
31816
31817
31818 $as_echo "#define GNULIB_TEST_WCRTOMB 1" >>confdefs.h
31819
31820
31821
31822
31823
31824
31825
31826
31827   if test $ac_cv_func_iswcntrl = yes; then
31828     HAVE_ISWCNTRL=1
31829   else
31830     HAVE_ISWCNTRL=0
31831   fi
31832
31833
31834
31835   if test $gt_cv_c_wint_t = yes; then
31836     HAVE_WINT_T=1
31837   else
31838     HAVE_WINT_T=0
31839   fi
31840
31841
31842
31843
31844
31845
31846
31847
31848
31849
31850
31851      if test $gl_cv_have_include_next = yes; then
31852        gl_cv_next_wctype_h='<'wctype.h'>'
31853      else
31854        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
31855 $as_echo_n "checking absolute name of <wctype.h>... " >&6; }
31856 if ${gl_cv_next_wctype_h+:} false; then :
31857   $as_echo_n "(cached) " >&6
31858 else
31859
31860              if test $ac_cv_header_wctype_h = yes; then
31861
31862
31863                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31864 /* end confdefs.h.  */
31865 #include <wctype.h>
31866
31867 _ACEOF
31868                                                                                                                         case "$host_os" in
31869                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
31870                  *)    gl_absname_cpp="$ac_cpp" ;;
31871                esac
31872
31873                case "$host_os" in
31874                  mingw*)
31875                                                                                                                                      gl_dirsep_regex='[/\\]'
31876                    ;;
31877                  *)
31878                    gl_dirsep_regex='\/'
31879                    ;;
31880                esac
31881                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
31882
31883                gl_header_literal_regex=`echo 'wctype.h' \
31884                                         | sed -e "$gl_make_literal_regex_sed"`
31885                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
31886                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
31887                    s|^/[^/]|//&|
31888                    p
31889                    q
31890                  }'
31891                                                             gl_cv_next_wctype_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
31892                       sed -n "$gl_absolute_header_sed"`'"'
31893           else
31894                gl_cv_next_wctype_h='<'wctype.h'>'
31895              fi
31896
31897
31898 fi
31899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
31900 $as_echo "$gl_cv_next_wctype_h" >&6; }
31901      fi
31902      NEXT_WCTYPE_H=$gl_cv_next_wctype_h
31903
31904      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
31905        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
31906        gl_next_as_first_directive='<'wctype.h'>'
31907      else
31908        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
31909        gl_next_as_first_directive=$gl_cv_next_wctype_h
31910      fi
31911      NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
31912
31913
31914
31915
31916   if test $ac_cv_header_wctype_h = yes; then
31917     if test $ac_cv_func_iswcntrl = yes; then
31918                   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
31919 $as_echo_n "checking whether iswcntrl works... " >&6; }
31920 if ${gl_cv_func_iswcntrl_works+:} false; then :
31921   $as_echo_n "(cached) " >&6
31922 else
31923
31924           if test "$cross_compiling" = yes; then :
31925   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31926 /* end confdefs.h.  */
31927 #include <stdlib.h>
31928                           #if __GNU_LIBRARY__ == 1
31929                           Linux libc5 i18n is broken.
31930                           #endif
31931 int
31932 main ()
31933 {
31934
31935   ;
31936   return 0;
31937 }
31938 _ACEOF
31939 if ac_fn_c_try_compile "$LINENO"; then :
31940   gl_cv_func_iswcntrl_works="guessing yes"
31941 else
31942   gl_cv_func_iswcntrl_works="guessing no"
31943 fi
31944 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31945
31946 else
31947   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31948 /* end confdefs.h.  */
31949
31950                /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
31951                   included before <wchar.h>.
31952                   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
31953                   must be included before <wchar.h>.  */
31954                #include <stddef.h>
31955                #include <stdio.h>
31956                #include <time.h>
31957                #include <wchar.h>
31958                #include <wctype.h>
31959                int main () { return iswprint ('x') == 0; }
31960
31961 _ACEOF
31962 if ac_fn_c_try_run "$LINENO"; then :
31963   gl_cv_func_iswcntrl_works=yes
31964 else
31965   gl_cv_func_iswcntrl_works=no
31966 fi
31967 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31968   conftest.$ac_objext conftest.beam conftest.$ac_ext
31969 fi
31970
31971
31972 fi
31973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
31974 $as_echo "$gl_cv_func_iswcntrl_works" >&6; }
31975     fi
31976     HAVE_WCTYPE_H=1
31977   else
31978     HAVE_WCTYPE_H=0
31979   fi
31980
31981
31982   case "$gl_cv_func_iswcntrl_works" in
31983     *yes) REPLACE_ISWCNTRL=0 ;;
31984     *)    REPLACE_ISWCNTRL=1 ;;
31985   esac
31986
31987
31988   if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
31989         :
31990   fi
31991
31992   if test $REPLACE_ISWCNTRL = 1; then
31993     REPLACE_TOWLOWER=1
31994   else
31995     for ac_func in towlower
31996 do :
31997   ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
31998 if test "x$ac_cv_func_towlower" = xyes; then :
31999   cat >>confdefs.h <<_ACEOF
32000 #define HAVE_TOWLOWER 1
32001 _ACEOF
32002
32003 fi
32004 done
32005
32006     if test $ac_cv_func_towlower = yes; then
32007       REPLACE_TOWLOWER=0
32008     else
32009       ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
32010              included before <wchar.h>.
32011              BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
32012              must be included before <wchar.h>.  */
32013           #include <stddef.h>
32014           #include <stdio.h>
32015           #include <time.h>
32016           #include <wchar.h>
32017           #if HAVE_WCTYPE_H
32018           # include <wctype.h>
32019           #endif
32020
32021 "
32022 if test "x$ac_cv_have_decl_towlower" = xyes; then :
32023   ac_have_decl=1
32024 else
32025   ac_have_decl=0
32026 fi
32027
32028 cat >>confdefs.h <<_ACEOF
32029 #define HAVE_DECL_TOWLOWER $ac_have_decl
32030 _ACEOF
32031
32032       if test $ac_cv_have_decl_towlower = yes; then
32033                                 REPLACE_TOWLOWER=1
32034       else
32035         REPLACE_TOWLOWER=0
32036       fi
32037     fi
32038   fi
32039
32040
32041   if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
32042         :
32043   fi
32044
32045           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
32046 $as_echo_n "checking for wctype_t... " >&6; }
32047 if ${gl_cv_type_wctype_t+:} false; then :
32048   $as_echo_n "(cached) " >&6
32049 else
32050   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32051 /* end confdefs.h.  */
32052 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
32053                included before <wchar.h>.
32054                BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
32055                must be included before <wchar.h>.  */
32056             #include <stddef.h>
32057             #include <stdio.h>
32058             #include <time.h>
32059             #include <wchar.h>
32060             #if HAVE_WCTYPE_H
32061             # include <wctype.h>
32062             #endif
32063             wctype_t a;
32064
32065 int
32066 main ()
32067 {
32068
32069   ;
32070   return 0;
32071 }
32072 _ACEOF
32073 if ac_fn_c_try_compile "$LINENO"; then :
32074   gl_cv_type_wctype_t=yes
32075 else
32076   gl_cv_type_wctype_t=no
32077 fi
32078 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32079
32080 fi
32081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
32082 $as_echo "$gl_cv_type_wctype_t" >&6; }
32083   if test $gl_cv_type_wctype_t = no; then
32084     HAVE_WCTYPE_T=0
32085   fi
32086
32087       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
32088 $as_echo_n "checking for wctrans_t... " >&6; }
32089 if ${gl_cv_type_wctrans_t+:} false; then :
32090   $as_echo_n "(cached) " >&6
32091 else
32092   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32093 /* end confdefs.h.  */
32094 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
32095                included before <wchar.h>.
32096                BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
32097                must be included before <wchar.h>.  */
32098             #include <stddef.h>
32099             #include <stdio.h>
32100             #include <time.h>
32101             #include <wchar.h>
32102             #include <wctype.h>
32103             wctrans_t a;
32104
32105 int
32106 main ()
32107 {
32108
32109   ;
32110   return 0;
32111 }
32112 _ACEOF
32113 if ac_fn_c_try_compile "$LINENO"; then :
32114   gl_cv_type_wctrans_t=yes
32115 else
32116   gl_cv_type_wctrans_t=no
32117 fi
32118 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32119
32120 fi
32121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
32122 $as_echo "$gl_cv_type_wctrans_t" >&6; }
32123   if test $gl_cv_type_wctrans_t = no; then
32124     HAVE_WCTRANS_T=0
32125   fi
32126
32127
32128     for gl_func in wctype iswctype wctrans towctrans     ; do
32129     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
32130     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
32131 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
32132 if eval \${$as_gl_Symbol+:} false; then :
32133   $as_echo_n "(cached) " >&6
32134 else
32135   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32136 /* end confdefs.h.  */
32137
32138 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
32139    <wchar.h>.
32140    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
32141    included before <wchar.h>.  */
32142 #if !(defined __GLIBC__ && !defined __UCLIBC__)
32143 # include <stddef.h>
32144 # include <stdio.h>
32145 # include <time.h>
32146 # include <wchar.h>
32147 #endif
32148 #include <wctype.h>
32149
32150 int
32151 main ()
32152 {
32153 #undef $gl_func
32154   (void) $gl_func;
32155   ;
32156   return 0;
32157 }
32158 _ACEOF
32159 if ac_fn_c_try_compile "$LINENO"; then :
32160   eval "$as_gl_Symbol=yes"
32161 else
32162   eval "$as_gl_Symbol=no"
32163 fi
32164 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32165 fi
32166 eval ac_res=\$$as_gl_Symbol
32167                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
32168 $as_echo "$ac_res" >&6; }
32169     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
32170   cat >>confdefs.h <<_ACEOF
32171 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
32172 _ACEOF
32173
32174                      eval ac_cv_have_decl_$gl_func=yes
32175 fi
32176       done
32177
32178
32179
32180
32181
32182
32183
32184
32185
32186
32187
32188
32189
32190   ac_fn_c_check_decl "$LINENO" "wcwidth" "ac_cv_have_decl_wcwidth" "
32191 /* AIX 3.2.5 declares wcwidth in <string.h>. */
32192 #include <string.h>
32193 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
32194    <wchar.h>.
32195    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
32196    before <wchar.h>.  */
32197 #include <stddef.h>
32198 #include <stdio.h>
32199 #include <time.h>
32200 #include <wchar.h>
32201
32202 "
32203 if test "x$ac_cv_have_decl_wcwidth" = xyes; then :
32204   ac_have_decl=1
32205 else
32206   ac_have_decl=0
32207 fi
32208
32209 cat >>confdefs.h <<_ACEOF
32210 #define HAVE_DECL_WCWIDTH $ac_have_decl
32211 _ACEOF
32212
32213   if test $ac_cv_have_decl_wcwidth != yes; then
32214     HAVE_DECL_WCWIDTH=0
32215   fi
32216
32217   if test $ac_cv_func_wcwidth = yes; then
32218     HAVE_WCWIDTH=1
32219                     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wcwidth works reasonably in UTF-8 locales" >&5
32220 $as_echo_n "checking whether wcwidth works reasonably in UTF-8 locales... " >&6; }
32221 if ${gl_cv_func_wcwidth_works+:} false; then :
32222   $as_echo_n "(cached) " >&6
32223 else
32224
32225         if test "$cross_compiling" = yes; then :
32226
32227            case "$host_os" in
32228                      # Guess yes on glibc and AIX 7 systems.
32229              *-gnu* | aix[7-9]*) gl_cv_func_wcwidth_works="guessing yes";;
32230              *)                  gl_cv_func_wcwidth_works="guessing no";;
32231            esac
32232
32233 else
32234   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32235 /* end confdefs.h.  */
32236
32237 #include <locale.h>
32238 /* AIX 3.2.5 declares wcwidth in <string.h>. */
32239 #include <string.h>
32240 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
32241    <wchar.h>.
32242    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
32243    before <wchar.h>.  */
32244 #include <stddef.h>
32245 #include <stdio.h>
32246 #include <time.h>
32247 #include <wchar.h>
32248 #if !HAVE_DECL_WCWIDTH
32249 extern
32250 # ifdef __cplusplus
32251 "C"
32252 # endif
32253 int wcwidth (int);
32254 #endif
32255 int main ()
32256 {
32257   int result = 0;
32258   if (setlocale (LC_ALL, "fr_FR.UTF-8") != NULL)
32259     {
32260       if (wcwidth (0x0301) > 0)
32261         result |= 1;
32262       if (wcwidth (0x05B0) > 0)
32263         result |= 2;
32264       if (wcwidth (0x200B) > 0)
32265         result |= 4;
32266     }
32267   return result;
32268 }
32269 _ACEOF
32270 if ac_fn_c_try_run "$LINENO"; then :
32271   gl_cv_func_wcwidth_works=yes
32272 else
32273   gl_cv_func_wcwidth_works=no
32274 fi
32275 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32276   conftest.$ac_objext conftest.beam conftest.$ac_ext
32277 fi
32278
32279
32280 fi
32281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcwidth_works" >&5
32282 $as_echo "$gl_cv_func_wcwidth_works" >&6; }
32283     case "$gl_cv_func_wcwidth_works" in
32284       *yes) ;;
32285       *no) REPLACE_WCWIDTH=1 ;;
32286     esac
32287   else
32288     HAVE_WCWIDTH=0
32289   fi
32290
32291   if test $HAVE_WCWIDTH = 0 || test $REPLACE_WCWIDTH = 1; then
32292
32293
32294
32295
32296
32297
32298
32299
32300   gl_LIBOBJS="$gl_LIBOBJS wcwidth.$ac_objext"
32301
32302   fi
32303
32304
32305
32306
32307
32308           GNULIB_WCWIDTH=1
32309
32310
32311
32312
32313
32314 $as_echo "#define GNULIB_TEST_WCWIDTH 1" >>confdefs.h
32315
32316
32317
32318
32319
32320
32321   if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
32322     REPLACE_WRITE=1
32323   fi
32324
32325
32326
32327   if test $REPLACE_WRITE = 1; then
32328
32329
32330
32331
32332
32333
32334
32335
32336   gl_LIBOBJS="$gl_LIBOBJS write.$ac_objext"
32337
32338     :
32339   fi
32340
32341
32342
32343
32344
32345           GNULIB_WRITE=1
32346
32347
32348
32349
32350
32351 $as_echo "#define GNULIB_TEST_WRITE 1" >>confdefs.h
32352
32353
32354
32355   :
32356
32357   :
32358
32359
32360
32361   for ac_header in stdint.h
32362 do :
32363   ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
32364 if test "x$ac_cv_header_stdint_h" = xyes; then :
32365   cat >>confdefs.h <<_ACEOF
32366 #define HAVE_STDINT_H 1
32367 _ACEOF
32368
32369 fi
32370
32371 done
32372
32373
32374
32375
32376   :
32377
32378
32379
32380   :
32381
32382   :
32383
32384
32385   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=xasprintf:1:c-format"
32386
32387   # End of code from modules
32388
32389
32390
32391
32392
32393
32394
32395
32396
32397   gltests_libdeps=
32398   gltests_ltlibdeps=
32399
32400
32401
32402
32403
32404
32405
32406
32407
32408   gl_source_base='tests'
32409   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
32410
32411   gl_module_indicator_condition=$gltests_WITNESS
32412
32413
32414
32415
32416
32417
32418
32419
32420
32421   LIBGNU_LIBDEPS="$gl_libdeps"
32422
32423   LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
32424
32425
32426 # paxutils modules
32427
32428
32429
32430
32431
32432
32433
32434
32435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
32436 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
32437 if ${ac_cv_header_time+:} false; then :
32438   $as_echo_n "(cached) " >&6
32439 else
32440   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32441 /* end confdefs.h.  */
32442 #include <sys/types.h>
32443 #include <sys/time.h>
32444 #include <time.h>
32445
32446 int
32447 main ()
32448 {
32449 if ((struct tm *) 0)
32450 return 0;
32451   ;
32452   return 0;
32453 }
32454 _ACEOF
32455 if ac_fn_c_try_compile "$LINENO"; then :
32456   ac_cv_header_time=yes
32457 else
32458   ac_cv_header_time=no
32459 fi
32460 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32461 fi
32462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
32463 $as_echo "$ac_cv_header_time" >&6; }
32464 if test $ac_cv_header_time = yes; then
32465
32466 $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
32467
32468 fi
32469
32470 ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
32471 if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
32472
32473 cat >>confdefs.h <<_ACEOF
32474 #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
32475 _ACEOF
32476
32477
32478 $as_echo "#define HAVE_ST_BLKSIZE 1" >>confdefs.h
32479
32480 fi
32481
32482
32483
32484
32485
32486
32487   # Set LIB_SETSOCKOPT to -lnsl -lsocket if necessary.
32488   pu_save_LIBS=$LIBS
32489   LIB_SETSOCKOPT=
32490   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5
32491 $as_echo_n "checking for library containing setsockopt... " >&6; }
32492 if ${ac_cv_search_setsockopt+:} false; then :
32493   $as_echo_n "(cached) " >&6
32494 else
32495   ac_func_search_save_LIBS=$LIBS
32496 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32497 /* end confdefs.h.  */
32498
32499 /* Override any GCC internal prototype to avoid an error.
32500    Use char because int might match the return type of a GCC
32501    builtin and then its argument prototype would still apply.  */
32502 #ifdef __cplusplus
32503 extern "C"
32504 #endif
32505 char setsockopt ();
32506 int
32507 main ()
32508 {
32509 return setsockopt ();
32510   ;
32511   return 0;
32512 }
32513 _ACEOF
32514 for ac_lib in '' socket; do
32515   if test -z "$ac_lib"; then
32516     ac_res="none required"
32517   else
32518     ac_res=-l$ac_lib
32519     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
32520   fi
32521   if ac_fn_c_try_link "$LINENO"; then :
32522   ac_cv_search_setsockopt=$ac_res
32523 fi
32524 rm -f core conftest.err conftest.$ac_objext \
32525     conftest$ac_exeext
32526   if ${ac_cv_search_setsockopt+:} false; then :
32527   break
32528 fi
32529 done
32530 if ${ac_cv_search_setsockopt+:} false; then :
32531
32532 else
32533   ac_cv_search_setsockopt=no
32534 fi
32535 rm conftest.$ac_ext
32536 LIBS=$ac_func_search_save_LIBS
32537 fi
32538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setsockopt" >&5
32539 $as_echo "$ac_cv_search_setsockopt" >&6; }
32540 ac_res=$ac_cv_search_setsockopt
32541 if test "$ac_res" != no; then :
32542   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
32543
32544 else
32545   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5
32546 $as_echo_n "checking for library containing setsockopt... " >&6; }
32547 if ${ac_cv_search_setsockopt+:} false; then :
32548   $as_echo_n "(cached) " >&6
32549 else
32550   ac_func_search_save_LIBS=$LIBS
32551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32552 /* end confdefs.h.  */
32553
32554 /* Override any GCC internal prototype to avoid an error.
32555    Use char because int might match the return type of a GCC
32556    builtin and then its argument prototype would still apply.  */
32557 #ifdef __cplusplus
32558 extern "C"
32559 #endif
32560 char setsockopt ();
32561 int
32562 main ()
32563 {
32564 return setsockopt ();
32565   ;
32566   return 0;
32567 }
32568 _ACEOF
32569 for ac_lib in '' socket; do
32570   if test -z "$ac_lib"; then
32571     ac_res="none required"
32572   else
32573     ac_res=-l$ac_lib
32574     LIBS="-l$ac_lib -lnsl $ac_func_search_save_LIBS"
32575   fi
32576   if ac_fn_c_try_link "$LINENO"; then :
32577   ac_cv_search_setsockopt=$ac_res
32578 fi
32579 rm -f core conftest.err conftest.$ac_objext \
32580     conftest$ac_exeext
32581   if ${ac_cv_search_setsockopt+:} false; then :
32582   break
32583 fi
32584 done
32585 if ${ac_cv_search_setsockopt+:} false; then :
32586
32587 else
32588   ac_cv_search_setsockopt=no
32589 fi
32590 rm conftest.$ac_ext
32591 LIBS=$ac_func_search_save_LIBS
32592 fi
32593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setsockopt" >&5
32594 $as_echo "$ac_cv_search_setsockopt" >&6; }
32595 ac_res=$ac_cv_search_setsockopt
32596 if test "$ac_res" != no; then :
32597   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
32598
32599 fi
32600
32601 fi
32602
32603   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5
32604 $as_echo_n "checking for library containing setsockopt... " >&6; }
32605 if ${ac_cv_search_setsockopt+:} false; then :
32606   $as_echo_n "(cached) " >&6
32607 else
32608   ac_func_search_save_LIBS=$LIBS
32609 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32610 /* end confdefs.h.  */
32611
32612 /* Override any GCC internal prototype to avoid an error.
32613    Use char because int might match the return type of a GCC
32614    builtin and then its argument prototype would still apply.  */
32615 #ifdef __cplusplus
32616 extern "C"
32617 #endif
32618 char setsockopt ();
32619 int
32620 main ()
32621 {
32622 return setsockopt ();
32623   ;
32624   return 0;
32625 }
32626 _ACEOF
32627 for ac_lib in '' nsl; do
32628   if test -z "$ac_lib"; then
32629     ac_res="none required"
32630   else
32631     ac_res=-l$ac_lib
32632     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
32633   fi
32634   if ac_fn_c_try_link "$LINENO"; then :
32635   ac_cv_search_setsockopt=$ac_res
32636 fi
32637 rm -f core conftest.err conftest.$ac_objext \
32638     conftest$ac_exeext
32639   if ${ac_cv_search_setsockopt+:} false; then :
32640   break
32641 fi
32642 done
32643 if ${ac_cv_search_setsockopt+:} false; then :
32644
32645 else
32646   ac_cv_search_setsockopt=no
32647 fi
32648 rm conftest.$ac_ext
32649 LIBS=$ac_func_search_save_LIBS
32650 fi
32651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setsockopt" >&5
32652 $as_echo "$ac_cv_search_setsockopt" >&6; }
32653 ac_res=$ac_cv_search_setsockopt
32654 if test "$ac_res" != no; then :
32655   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
32656
32657 fi
32658
32659
32660   case "$ac_cv_search_setsockopt" in
32661     -l*) LIB_SETSOCKOPT=$ac_cv_search_setsockopt
32662   esac
32663
32664   LIBS=$pu_save_LIBS
32665
32666   enable_rmt() {
32667     if test $ac_cv_header_sys_mtio_h = yes; then
32668       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remote tape header files" >&5
32669 $as_echo_n "checking for remote tape header files... " >&6; }
32670 if ${pu_cv_header_rmt+:} false; then :
32671   $as_echo_n "(cached) " >&6
32672 else
32673   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32674 /* end confdefs.h.  */
32675
32676 #if HAVE_SGTTY_H
32677 # include <sgtty.h>
32678 #endif
32679 #include <sys/socket.h>
32680 _ACEOF
32681 if ac_fn_c_try_cpp "$LINENO"; then :
32682   pu_cv_header_rmt=yes
32683 else
32684   pu_cv_header_rmt=no
32685 fi
32686 rm -f conftest.err conftest.i conftest.$ac_ext
32687 fi
32688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pu_cv_header_rmt" >&5
32689 $as_echo "$pu_cv_header_rmt" >&6; }
32690       test $pu_cv_header_rmt = yes && PU_RMT_PROG='rmt$(EXEEXT)'
32691
32692     fi
32693   }
32694
32695   for ac_header in sys/mtio.h
32696 do :
32697   ac_fn_c_check_header_mongrel "$LINENO" "sys/mtio.h" "ac_cv_header_sys_mtio_h" "$ac_includes_default"
32698 if test "x$ac_cv_header_sys_mtio_h" = xyes; then :
32699   cat >>confdefs.h <<_ACEOF
32700 #define HAVE_SYS_MTIO_H 1
32701 _ACEOF
32702
32703 fi
32704
32705 done
32706
32707   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which ioctl field to test for reversed bytes" >&5
32708 $as_echo_n "checking which ioctl field to test for reversed bytes... " >&6; }
32709 if ${pu_cv_header_mtio_check_field+:} false; then :
32710   $as_echo_n "(cached) " >&6
32711 else
32712   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32713 /* end confdefs.h.  */
32714 #include <sys/mtio.h>
32715
32716 _ACEOF
32717 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
32718   $EGREP "mt_model" >/dev/null 2>&1; then :
32719   pu_cv_header_mtio_check_field=mt_model
32720 else
32721   pu_cv_header_mtio_check_field=mt_type
32722 fi
32723 rm -f conftest*
32724
32725 fi
32726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pu_cv_header_mtio_check_field" >&5
32727 $as_echo "$pu_cv_header_mtio_check_field" >&6; }
32728
32729 cat >>confdefs.h <<_ACEOF
32730 #define MTIO_CHECK_FIELD $pu_cv_header_mtio_check_field
32731 _ACEOF
32732
32733
32734
32735
32736   if test "x$DEFAULT_RMT_DIR" != x; then
32737         DEFAULT_RMT_COMMAND=$DEFAULT_RMT_DIR/rmt
32738   else
32739         DEFAULT_RMT_DIR='$(libexecdir)'
32740   fi
32741
32742   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build rmt" >&5
32743 $as_echo_n "checking whether to build rmt... " >&6; }
32744
32745 # Check whether --with-rmt was given.
32746 if test "${with_rmt+set}" = set; then :
32747   withval=$with_rmt; case $withval in
32748                yes|no) as_fn_error $? "Invalid argument to --with-rmt" "$LINENO" 5;;
32749                /*)     DEFAULT_RMT_COMMAND=$withval
32750                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, use $withval instead" >&5
32751 $as_echo "no, use $withval instead" >&6; };;
32752                *)      as_fn_error $? "Argument to --with-rmt must be an absolute file name" "$LINENO" 5;;
32753                esac
32754 else
32755   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32756 $as_echo "yes" >&6; }
32757                 enable_rmt
32758                 if test "$PU_RMT_PROG" = ""; then
32759                   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: not building rmt, required header files are missing" >&5
32760 $as_echo "$as_me: WARNING: not building rmt, required header files are missing" >&2;}
32761                 fi
32762 fi
32763
32764
32765
32766   if test "x$DEFAULT_RMT_COMMAND" != x; then
32767
32768 cat >>confdefs.h <<_ACEOF
32769 #define DEFAULT_RMT_COMMAND "$DEFAULT_RMT_COMMAND"
32770 _ACEOF
32771
32772   fi
32773
32774
32775
32776
32777
32778
32779
32780
32781
32782   for ac_header in sys/buf.h
32783 do :
32784   ac_fn_c_check_header_compile "$LINENO" "sys/buf.h" "ac_cv_header_sys_buf_h" "#if HAVE_SYS_PARAM_H
32785 #include <sys/param.h>
32786 #endif
32787 "
32788 if test "x$ac_cv_header_sys_buf_h" = xyes; then :
32789   cat >>confdefs.h <<_ACEOF
32790 #define HAVE_SYS_BUF_H 1
32791 _ACEOF
32792
32793 fi
32794
32795 done
32796
32797
32798
32799
32800   ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
32801 if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
32802
32803 cat >>confdefs.h <<_ACEOF
32804 #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
32805 _ACEOF
32806
32807
32808 fi
32809
32810
32811
32812
32813
32814
32815
32816   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
32817 $as_echo_n "checking for library containing gethostbyname... " >&6; }
32818 if ${ac_cv_search_gethostbyname+:} false; then :
32819   $as_echo_n "(cached) " >&6
32820 else
32821   ac_func_search_save_LIBS=$LIBS
32822 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32823 /* end confdefs.h.  */
32824
32825 /* Override any GCC internal prototype to avoid an error.
32826    Use char because int might match the return type of a GCC
32827    builtin and then its argument prototype would still apply.  */
32828 #ifdef __cplusplus
32829 extern "C"
32830 #endif
32831 char gethostbyname ();
32832 int
32833 main ()
32834 {
32835 return gethostbyname ();
32836   ;
32837   return 0;
32838 }
32839 _ACEOF
32840 for ac_lib in '' nsl; do
32841   if test -z "$ac_lib"; then
32842     ac_res="none required"
32843   else
32844     ac_res=-l$ac_lib
32845     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
32846   fi
32847   if ac_fn_c_try_link "$LINENO"; then :
32848   ac_cv_search_gethostbyname=$ac_res
32849 fi
32850 rm -f core conftest.err conftest.$ac_objext \
32851     conftest$ac_exeext
32852   if ${ac_cv_search_gethostbyname+:} false; then :
32853   break
32854 fi
32855 done
32856 if ${ac_cv_search_gethostbyname+:} false; then :
32857
32858 else
32859   ac_cv_search_gethostbyname=no
32860 fi
32861 rm conftest.$ac_ext
32862 LIBS=$ac_func_search_save_LIBS
32863 fi
32864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
32865 $as_echo "$ac_cv_search_gethostbyname" >&6; }
32866 ac_res=$ac_cv_search_gethostbyname
32867 if test "$ac_res" != no; then :
32868   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
32869
32870 fi
32871
32872
32873
32874
32875 # gl_GCC_VERSION_IFELSE([major], [minor], [run-if-found], [run-if-not-found])
32876 # ------------------------------------------------
32877 # If $CPP is gcc-MAJOR.MINOR or newer, then run RUN-IF-FOUND.
32878 # Otherwise, run RUN-IF-NOT-FOUND.
32879
32880
32881 # Check whether --enable-gcc-warnings was given.
32882 if test "${enable_gcc_warnings+set}" = set; then :
32883   enableval=$enable_gcc_warnings; case $enableval in
32884      yes|no) ;;
32885      *)      as_fn_error $? "bad value $enableval for gcc-warnings option" "$LINENO" 5 ;;
32886    esac
32887    gl_gcc_warnings=$enableval
32888 else
32889   gl_gcc_warnings=no
32890    if test -d "$srcdir"/.git; then
32891      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32892 /* end confdefs.h.  */
32893
32894 #if (4) < __GNUC__ || ((4) == __GNUC__ && (6) <= __GNUC_MINOR__)
32895 /* ok */
32896 #else
32897 # error "your version of gcc is older than 4.6"
32898 #endif
32899
32900 int
32901 main ()
32902 {
32903
32904   ;
32905   return 0;
32906 },
32907
32908 _ACEOF
32909 if ac_fn_c_try_cpp "$LINENO"; then :
32910   gl_gcc_warnings=yes
32911 fi
32912 rm -f conftest.err conftest.i conftest.$ac_ext
32913
32914
32915    fi
32916
32917 fi
32918
32919
32920 if test "$gl_gcc_warnings" = yes; then
32921   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror -Wunknown-warning-option" >&5
32922 $as_echo_n "checking whether C compiler handles -Werror -Wunknown-warning-option... " >&6; }
32923 if ${gl_cv_warn_c__Werror__Wunknown_warning_option+:} false; then :
32924   $as_echo_n "(cached) " >&6
32925 else
32926
32927   gl_save_compiler_FLAGS="$CFLAGS"
32928   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror -Wunknown-warning-option"
32929   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32930 /* end confdefs.h.  */
32931
32932 int
32933 main ()
32934 {
32935
32936   ;
32937   return 0;
32938 }
32939 _ACEOF
32940 if ac_fn_c_try_compile "$LINENO"; then :
32941   gl_cv_warn_c__Werror__Wunknown_warning_option=yes
32942 else
32943   gl_cv_warn_c__Werror__Wunknown_warning_option=no
32944 fi
32945 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32946   CFLAGS="$gl_save_compiler_FLAGS"
32947
32948 fi
32949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror__Wunknown_warning_option" >&5
32950 $as_echo "$gl_cv_warn_c__Werror__Wunknown_warning_option" >&6; }
32951 if test "x$gl_cv_warn_c__Werror__Wunknown_warning_option" = xyes; then :
32952   gl_unknown_warnings_are_errors='-Wunknown-warning-option -Werror'
32953 else
32954   gl_unknown_warnings_are_errors=
32955 fi
32956
32957
32958 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror" >&5
32959 $as_echo_n "checking whether C compiler handles -Werror... " >&6; }
32960 if ${gl_cv_warn_c__Werror+:} false; then :
32961   $as_echo_n "(cached) " >&6
32962 else
32963
32964   gl_save_compiler_FLAGS="$CFLAGS"
32965   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror"
32966   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32967 /* end confdefs.h.  */
32968
32969 int
32970 main ()
32971 {
32972
32973   ;
32974   return 0;
32975 }
32976 _ACEOF
32977 if ac_fn_c_try_compile "$LINENO"; then :
32978   gl_cv_warn_c__Werror=yes
32979 else
32980   gl_cv_warn_c__Werror=no
32981 fi
32982 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32983   CFLAGS="$gl_save_compiler_FLAGS"
32984
32985 fi
32986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror" >&5
32987 $as_echo "$gl_cv_warn_c__Werror" >&6; }
32988 if test "x$gl_cv_warn_c__Werror" = xyes; then :
32989   as_fn_append WERROR_CFLAGS " -Werror"
32990 fi
32991
32992
32993
32994
32995   nw=
32996   # This, $nw, is the list of warnings we disable.
32997   nw="$nw -Wformat-nonliteral"      # warnings in Fedora 17 stdio.h
32998   nw="$nw -Wvla"                    # warnings in gettext.h
32999   nw="$nw -Wswitch-default"         # Too many warnings for now
33000   nw="$nw -Wunsafe-loop-optimizations" # It's OK to omit unsafe optimizations.
33001   nw="$nw -Winline"                 # It's OK to not inline.
33002   nw="$nw -Wstrict-overflow"        # It's OK to optimize strictly.
33003   nw="$nw -Wsuggest-attribute=pure" # Too many warnings for now.
33004
33005
33006
33007   if test -n "$GCC"; then
33008
33009             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is supported" >&5
33010 $as_echo_n "checking whether -Wno-missing-field-initializers is supported... " >&6; }
33011     if ${gl_cv_cc_nomfi_supported+:} false; then :
33012   $as_echo_n "(cached) " >&6
33013 else
33014
33015       gl_save_CFLAGS="$CFLAGS"
33016       CFLAGS="$CFLAGS -W -Werror -Wno-missing-field-initializers"
33017       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33018 /* end confdefs.h.  */
33019
33020 int
33021 main ()
33022 {
33023
33024   ;
33025   return 0;
33026 }
33027 _ACEOF
33028 if ac_fn_c_try_compile "$LINENO"; then :
33029   gl_cv_cc_nomfi_supported=yes
33030 else
33031   gl_cv_cc_nomfi_supported=no
33032 fi
33033 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33034       CFLAGS="$gl_save_CFLAGS"
33035 fi
33036
33037     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_supported" >&5
33038 $as_echo "$gl_cv_cc_nomfi_supported" >&6; }
33039
33040     if test "$gl_cv_cc_nomfi_supported" = yes; then
33041                   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is needed" >&5
33042 $as_echo_n "checking whether -Wno-missing-field-initializers is needed... " >&6; }
33043       if ${gl_cv_cc_nomfi_needed+:} false; then :
33044   $as_echo_n "(cached) " >&6
33045 else
33046
33047         gl_save_CFLAGS="$CFLAGS"
33048         CFLAGS="$CFLAGS -W -Werror"
33049         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33050 /* end confdefs.h.  */
33051 void f (void)
33052                {
33053                  typedef struct { int a; int b; } s_t;
33054                  s_t s1 = { 0, };
33055                }
33056
33057 int
33058 main ()
33059 {
33060
33061   ;
33062   return 0;
33063 }
33064 _ACEOF
33065 if ac_fn_c_try_compile "$LINENO"; then :
33066   gl_cv_cc_nomfi_needed=no
33067 else
33068   gl_cv_cc_nomfi_needed=yes
33069 fi
33070 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33071         CFLAGS="$gl_save_CFLAGS"
33072
33073 fi
33074
33075       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_needed" >&5
33076 $as_echo "$gl_cv_cc_nomfi_needed" >&6; }
33077     fi
33078
33079                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wuninitialized is supported" >&5
33080 $as_echo_n "checking whether -Wuninitialized is supported... " >&6; }
33081     if ${gl_cv_cc_uninitialized_supported+:} false; then :
33082   $as_echo_n "(cached) " >&6
33083 else
33084
33085       gl_save_CFLAGS="$CFLAGS"
33086       CFLAGS="$CFLAGS -Werror -Wuninitialized"
33087       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33088 /* end confdefs.h.  */
33089
33090 int
33091 main ()
33092 {
33093
33094   ;
33095   return 0;
33096 }
33097 _ACEOF
33098 if ac_fn_c_try_compile "$LINENO"; then :
33099   gl_cv_cc_uninitialized_supported=yes
33100 else
33101   gl_cv_cc_uninitialized_supported=no
33102 fi
33103 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33104       CFLAGS="$gl_save_CFLAGS"
33105 fi
33106
33107     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_uninitialized_supported" >&5
33108 $as_echo "$gl_cv_cc_uninitialized_supported" >&6; }
33109
33110   fi
33111
33112   # List all gcc warning categories.
33113   gl_manywarn_set=
33114   for gl_manywarn_item in \
33115     -W \
33116     -Wabi \
33117     -Waddress \
33118     -Waggressive-loop-optimizations \
33119     -Wall \
33120     -Warray-bounds \
33121     -Wattributes \
33122     -Wbad-function-cast \
33123     -Wbuiltin-macro-redefined \
33124     -Wcast-align \
33125     -Wchar-subscripts \
33126     -Wclobbered \
33127     -Wcomment \
33128     -Wcomments \
33129     -Wcoverage-mismatch \
33130     -Wcpp \
33131     -Wdeprecated \
33132     -Wdeprecated-declarations \
33133     -Wdisabled-optimization \
33134     -Wdiv-by-zero \
33135     -Wdouble-promotion \
33136     -Wempty-body \
33137     -Wendif-labels \
33138     -Wenum-compare \
33139     -Wextra \
33140     -Wformat-contains-nul \
33141     -Wformat-extra-args \
33142     -Wformat-nonliteral \
33143     -Wformat-security \
33144     -Wformat-y2k \
33145     -Wformat-zero-length \
33146     -Wfree-nonheap-object \
33147     -Wignored-qualifiers \
33148     -Wimplicit \
33149     -Wimplicit-function-declaration \
33150     -Wimplicit-int \
33151     -Winit-self \
33152     -Winline \
33153     -Wint-to-pointer-cast \
33154     -Winvalid-memory-model \
33155     -Winvalid-pch \
33156     -Wjump-misses-init \
33157     -Wlogical-op \
33158     -Wmain \
33159     -Wmaybe-uninitialized \
33160     -Wmissing-braces \
33161     -Wmissing-declarations \
33162     -Wmissing-field-initializers \
33163     -Wmissing-include-dirs \
33164     -Wmissing-parameter-type \
33165     -Wmissing-prototypes \
33166     -Wmudflap \
33167     -Wmultichar \
33168     -Wnarrowing \
33169     -Wnested-externs \
33170     -Wnonnull \
33171     -Wnormalized=nfc \
33172     -Wold-style-declaration \
33173     -Wold-style-definition \
33174     -Woverflow \
33175     -Woverlength-strings \
33176     -Woverride-init \
33177     -Wpacked \
33178     -Wpacked-bitfield-compat \
33179     -Wparentheses \
33180     -Wpointer-arith \
33181     -Wpointer-sign \
33182     -Wpointer-to-int-cast \
33183     -Wpragmas \
33184     -Wreturn-local-addr \
33185     -Wreturn-type \
33186     -Wsequence-point \
33187     -Wshadow \
33188     -Wsizeof-pointer-memaccess \
33189     -Wstack-protector \
33190     -Wstrict-aliasing \
33191     -Wstrict-overflow \
33192     -Wstrict-prototypes \
33193     -Wsuggest-attribute=const \
33194     -Wsuggest-attribute=format \
33195     -Wsuggest-attribute=noreturn \
33196     -Wsuggest-attribute=pure \
33197     -Wswitch \
33198     -Wswitch-default \
33199     -Wsync-nand \
33200     -Wsystem-headers \
33201     -Wtrampolines \
33202     -Wtrigraphs \
33203     -Wtype-limits \
33204     -Wuninitialized \
33205     -Wunknown-pragmas \
33206     -Wunsafe-loop-optimizations \
33207     -Wunused \
33208     -Wunused-but-set-parameter \
33209     -Wunused-but-set-variable \
33210     -Wunused-function \
33211     -Wunused-label \
33212     -Wunused-local-typedefs \
33213     -Wunused-macros \
33214     -Wunused-parameter \
33215     -Wunused-result \
33216     -Wunused-value \
33217     -Wunused-variable \
33218     -Wvarargs \
33219     -Wvariadic-macros \
33220     -Wvector-operation-performance \
33221     -Wvla \
33222     -Wvolatile-register-var \
33223     -Wwrite-strings \
33224     \
33225     ; do
33226     gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
33227   done
33228
33229   # Disable specific options as needed.
33230   if test "$gl_cv_cc_nomfi_needed" = yes; then
33231     gl_manywarn_set="$gl_manywarn_set -Wno-missing-field-initializers"
33232   fi
33233
33234   if test "$gl_cv_cc_uninitialized_supported" = no; then
33235     gl_manywarn_set="$gl_manywarn_set -Wno-uninitialized"
33236   fi
33237
33238   ws=$gl_manywarn_set
33239
33240
33241   gl_warn_set=
33242   set x $ws; shift
33243   for gl_warn_item
33244   do
33245     case " $nw " in
33246       *" $gl_warn_item "*)
33247         ;;
33248       *)
33249         gl_warn_set="$gl_warn_set $gl_warn_item"
33250         ;;
33251     esac
33252   done
33253   ws=$gl_warn_set
33254
33255   for w in $ws; do
33256
33257 as_gl_Warn=`$as_echo "gl_cv_warn_c_$w" | $as_tr_sh`
33258 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles $w" >&5
33259 $as_echo_n "checking whether C compiler handles $w... " >&6; }
33260 if eval \${$as_gl_Warn+:} false; then :
33261   $as_echo_n "(cached) " >&6
33262 else
33263
33264   gl_save_compiler_FLAGS="$CFLAGS"
33265   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors $w"
33266   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33267 /* end confdefs.h.  */
33268
33269 int
33270 main ()
33271 {
33272
33273   ;
33274   return 0;
33275 }
33276 _ACEOF
33277 if ac_fn_c_try_compile "$LINENO"; then :
33278   eval "$as_gl_Warn=yes"
33279 else
33280   eval "$as_gl_Warn=no"
33281 fi
33282 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33283   CFLAGS="$gl_save_compiler_FLAGS"
33284
33285 fi
33286 eval ac_res=\$$as_gl_Warn
33287                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
33288 $as_echo "$ac_res" >&6; }
33289 if eval test \"x\$"$as_gl_Warn"\" = x"yes"; then :
33290   as_fn_append WARN_CFLAGS " $w"
33291 fi
33292
33293
33294   done
33295
33296 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-sign-compare" >&5
33297 $as_echo_n "checking whether C compiler handles -Wno-sign-compare... " >&6; }
33298 if ${gl_cv_warn_c__Wno_sign_compare+:} false; then :
33299   $as_echo_n "(cached) " >&6
33300 else
33301
33302   gl_save_compiler_FLAGS="$CFLAGS"
33303   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-sign-compare"
33304   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33305 /* end confdefs.h.  */
33306
33307 int
33308 main ()
33309 {
33310
33311   ;
33312   return 0;
33313 }
33314 _ACEOF
33315 if ac_fn_c_try_compile "$LINENO"; then :
33316   gl_cv_warn_c__Wno_sign_compare=yes
33317 else
33318   gl_cv_warn_c__Wno_sign_compare=no
33319 fi
33320 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33321   CFLAGS="$gl_save_compiler_FLAGS"
33322
33323 fi
33324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_sign_compare" >&5
33325 $as_echo "$gl_cv_warn_c__Wno_sign_compare" >&6; }
33326 if test "x$gl_cv_warn_c__Wno_sign_compare" = xyes; then :
33327   as_fn_append WARN_CFLAGS " -Wno-sign-compare"
33328 fi
33329
33330      # Too many warnings for now
33331
33332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-type-limits" >&5
33333 $as_echo_n "checking whether C compiler handles -Wno-type-limits... " >&6; }
33334 if ${gl_cv_warn_c__Wno_type_limits+:} false; then :
33335   $as_echo_n "(cached) " >&6
33336 else
33337
33338   gl_save_compiler_FLAGS="$CFLAGS"
33339   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-type-limits"
33340   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33341 /* end confdefs.h.  */
33342
33343 int
33344 main ()
33345 {
33346
33347   ;
33348   return 0;
33349 }
33350 _ACEOF
33351 if ac_fn_c_try_compile "$LINENO"; then :
33352   gl_cv_warn_c__Wno_type_limits=yes
33353 else
33354   gl_cv_warn_c__Wno_type_limits=no
33355 fi
33356 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33357   CFLAGS="$gl_save_compiler_FLAGS"
33358
33359 fi
33360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_type_limits" >&5
33361 $as_echo "$gl_cv_warn_c__Wno_type_limits" >&6; }
33362 if test "x$gl_cv_warn_c__Wno_type_limits" = xyes; then :
33363   as_fn_append WARN_CFLAGS " -Wno-type-limits"
33364 fi
33365
33366       # It's OK to optimize based on types.
33367
33368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-parameter" >&5
33369 $as_echo_n "checking whether C compiler handles -Wno-unused-parameter... " >&6; }
33370 if ${gl_cv_warn_c__Wno_unused_parameter+:} false; then :
33371   $as_echo_n "(cached) " >&6
33372 else
33373
33374   gl_save_compiler_FLAGS="$CFLAGS"
33375   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-unused-parameter"
33376   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33377 /* end confdefs.h.  */
33378
33379 int
33380 main ()
33381 {
33382
33383   ;
33384   return 0;
33385 }
33386 _ACEOF
33387 if ac_fn_c_try_compile "$LINENO"; then :
33388   gl_cv_warn_c__Wno_unused_parameter=yes
33389 else
33390   gl_cv_warn_c__Wno_unused_parameter=no
33391 fi
33392 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33393   CFLAGS="$gl_save_compiler_FLAGS"
33394
33395 fi
33396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_parameter" >&5
33397 $as_echo "$gl_cv_warn_c__Wno_unused_parameter" >&6; }
33398 if test "x$gl_cv_warn_c__Wno_unused_parameter" = xyes; then :
33399   as_fn_append WARN_CFLAGS " -Wno-unused-parameter"
33400 fi
33401
33402  # Too many warnings for now
33403
33404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-format-nonliteral" >&5
33405 $as_echo_n "checking whether C compiler handles -Wno-format-nonliteral... " >&6; }
33406 if ${gl_cv_warn_c__Wno_format_nonliteral+:} false; then :
33407   $as_echo_n "(cached) " >&6
33408 else
33409
33410   gl_save_compiler_FLAGS="$CFLAGS"
33411   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-format-nonliteral"
33412   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33413 /* end confdefs.h.  */
33414
33415 int
33416 main ()
33417 {
33418
33419   ;
33420   return 0;
33421 }
33422 _ACEOF
33423 if ac_fn_c_try_compile "$LINENO"; then :
33424   gl_cv_warn_c__Wno_format_nonliteral=yes
33425 else
33426   gl_cv_warn_c__Wno_format_nonliteral=no
33427 fi
33428 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33429   CFLAGS="$gl_save_compiler_FLAGS"
33430
33431 fi
33432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_format_nonliteral" >&5
33433 $as_echo "$gl_cv_warn_c__Wno_format_nonliteral" >&6; }
33434 if test "x$gl_cv_warn_c__Wno_format_nonliteral" = xyes; then :
33435   as_fn_append WARN_CFLAGS " -Wno-format-nonliteral"
33436 fi
33437
33438
33439
33440
33441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fdiagnostics-show-option" >&5
33442 $as_echo_n "checking whether C compiler handles -fdiagnostics-show-option... " >&6; }
33443 if ${gl_cv_warn_c__fdiagnostics_show_option+:} false; then :
33444   $as_echo_n "(cached) " >&6
33445 else
33446
33447   gl_save_compiler_FLAGS="$CFLAGS"
33448   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fdiagnostics-show-option"
33449   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33450 /* end confdefs.h.  */
33451
33452 int
33453 main ()
33454 {
33455
33456   ;
33457   return 0;
33458 }
33459 _ACEOF
33460 if ac_fn_c_try_compile "$LINENO"; then :
33461   gl_cv_warn_c__fdiagnostics_show_option=yes
33462 else
33463   gl_cv_warn_c__fdiagnostics_show_option=no
33464 fi
33465 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33466   CFLAGS="$gl_save_compiler_FLAGS"
33467
33468 fi
33469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fdiagnostics_show_option" >&5
33470 $as_echo "$gl_cv_warn_c__fdiagnostics_show_option" >&6; }
33471 if test "x$gl_cv_warn_c__fdiagnostics_show_option" = xyes; then :
33472   as_fn_append WARN_CFLAGS " -fdiagnostics-show-option"
33473 fi
33474
33475
33476
33477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -funit-at-a-time" >&5
33478 $as_echo_n "checking whether C compiler handles -funit-at-a-time... " >&6; }
33479 if ${gl_cv_warn_c__funit_at_a_time+:} false; then :
33480   $as_echo_n "(cached) " >&6
33481 else
33482
33483   gl_save_compiler_FLAGS="$CFLAGS"
33484   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -funit-at-a-time"
33485   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33486 /* end confdefs.h.  */
33487
33488 int
33489 main ()
33490 {
33491
33492   ;
33493   return 0;
33494 }
33495 _ACEOF
33496 if ac_fn_c_try_compile "$LINENO"; then :
33497   gl_cv_warn_c__funit_at_a_time=yes
33498 else
33499   gl_cv_warn_c__funit_at_a_time=no
33500 fi
33501 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33502   CFLAGS="$gl_save_compiler_FLAGS"
33503
33504 fi
33505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__funit_at_a_time" >&5
33506 $as_echo "$gl_cv_warn_c__funit_at_a_time" >&6; }
33507 if test "x$gl_cv_warn_c__funit_at_a_time" = xyes; then :
33508   as_fn_append WARN_CFLAGS " -funit-at-a-time"
33509 fi
33510
33511
33512
33513
33514
33515
33516 $as_echo "#define lint 1" >>confdefs.h
33517
33518
33519
33520 $as_echo "#define GNULIB_PORTCHECK 1" >>confdefs.h
33521
33522
33523   # Use a slightly smaller set of warning options for lib/.
33524   # Remove the following and save the result in GNULIB_WARN_CFLAGS.
33525   nw=
33526   nw="$nw -Wmissing-prototypes"
33527   nw="$nw -Wunused-macros"
33528   #
33529   # These are for argp.
33530   nw="$nw -Wmissing-field-initializers"
33531   nw="$nw -Wshadow"
33532   #
33533
33534   gl_warn_set=
33535   set x $WARN_CFLAGS; shift
33536   for gl_warn_item
33537   do
33538     case " $nw " in
33539       *" $gl_warn_item "*)
33540         ;;
33541       *)
33542         gl_warn_set="$gl_warn_set $gl_warn_item"
33543         ;;
33544     esac
33545   done
33546   GNULIB_WARN_CFLAGS=$gl_warn_set
33547
33548
33549   # This is also for argp.
33550
33551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-missing-field-initializers" >&5
33552 $as_echo_n "checking whether C compiler handles -Wno-missing-field-initializers... " >&6; }
33553 if ${gl_cv_warn_c__Wno_missing_field_initializers+:} false; then :
33554   $as_echo_n "(cached) " >&6
33555 else
33556
33557   gl_save_compiler_FLAGS="$CFLAGS"
33558   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-missing-field-initializers"
33559   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33560 /* end confdefs.h.  */
33561
33562 int
33563 main ()
33564 {
33565
33566   ;
33567   return 0;
33568 }
33569 _ACEOF
33570 if ac_fn_c_try_compile "$LINENO"; then :
33571   gl_cv_warn_c__Wno_missing_field_initializers=yes
33572 else
33573   gl_cv_warn_c__Wno_missing_field_initializers=no
33574 fi
33575 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33576   CFLAGS="$gl_save_compiler_FLAGS"
33577
33578 fi
33579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_missing_field_initializers" >&5
33580 $as_echo "$gl_cv_warn_c__Wno_missing_field_initializers" >&6; }
33581 if test "x$gl_cv_warn_c__Wno_missing_field_initializers" = xyes; then :
33582   as_fn_append GNULIB_WARN_CFLAGS " -Wno-missing-field-initializers"
33583 fi
33584
33585
33586
33587
33588
33589   # For gnulib-tests, the set is slightly smaller still.
33590   nw=
33591   # It's not worth being this picky about test programs.
33592   nw="$nw -Wsuggest-attribute=const"
33593
33594   gl_warn_set=
33595   set x $GNULIB_WARN_CFLAGS; shift
33596   for gl_warn_item
33597   do
33598     case " $nw " in
33599       *" $gl_warn_item "*)
33600         ;;
33601       *)
33602         gl_warn_set="$gl_warn_set $gl_warn_item"
33603         ;;
33604     esac
33605   done
33606   GNULIB_TEST_WARN_CFLAGS=$gl_warn_set
33607
33608
33609 fi
33610
33611
33612
33613 # Check whether --with-xattrs was given.
33614 if test "${with_xattrs+set}" = set; then :
33615   withval=$with_xattrs;
33616 else
33617   with_xattrs=maybe
33618
33619 fi
33620
33621
33622   for ac_header in attr/xattr.h
33623 do :
33624   ac_fn_c_check_header_mongrel "$LINENO" "attr/xattr.h" "ac_cv_header_attr_xattr_h" "$ac_includes_default"
33625 if test "x$ac_cv_header_attr_xattr_h" = xyes; then :
33626   cat >>confdefs.h <<_ACEOF
33627 #define HAVE_ATTR_XATTR_H 1
33628 _ACEOF
33629
33630 fi
33631
33632 done
33633
33634    if test "$ac_cv_header_attr_xattr_h" = yes; then
33635   TAR_COND_XATTR_H_TRUE=
33636   TAR_COND_XATTR_H_FALSE='#'
33637 else
33638   TAR_COND_XATTR_H_TRUE='#'
33639   TAR_COND_XATTR_H_FALSE=
33640 fi
33641
33642   if test "$ac_cv_header_attr_xattr_h" = yes; then
33643     for ac_func in getxattr  fgetxattr  lgetxattr \
33644                    setxattr  fsetxattr  lsetxattr \
33645                    listxattr flistxattr llistxattr
33646 do :
33647   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
33648 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
33649 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
33650   cat >>confdefs.h <<_ACEOF
33651 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
33652 _ACEOF
33653  # only when functions are present
33654
33655 $as_echo "#define HAVE_ATTR_XATTR_H 1" >>confdefs.h
33656
33657         if test "$with_xattrs" != no; then
33658
33659 $as_echo "#define HAVE_XATTRS /**/" >>confdefs.h
33660
33661         fi
33662
33663 fi
33664 done
33665
33666   fi
33667
33668
33669
33670
33671
33672
33673
33674
33675 ac_fn_c_check_decl "$LINENO" "getgrgid" "ac_cv_have_decl_getgrgid" "#include <grp.h>
33676 "
33677 if test "x$ac_cv_have_decl_getgrgid" = xyes; then :
33678   ac_have_decl=1
33679 else
33680   ac_have_decl=0
33681 fi
33682
33683 cat >>confdefs.h <<_ACEOF
33684 #define HAVE_DECL_GETGRGID $ac_have_decl
33685 _ACEOF
33686
33687 ac_fn_c_check_decl "$LINENO" "getpwuid" "ac_cv_have_decl_getpwuid" "#include <pwd.h>
33688 "
33689 if test "x$ac_cv_have_decl_getpwuid" = xyes; then :
33690   ac_have_decl=1
33691 else
33692   ac_have_decl=0
33693 fi
33694
33695 cat >>confdefs.h <<_ACEOF
33696 #define HAVE_DECL_GETPWUID $ac_have_decl
33697 _ACEOF
33698
33699 ac_fn_c_check_decl "$LINENO" "time" "ac_cv_have_decl_time" "#include <time.h>
33700 "
33701 if test "x$ac_cv_have_decl_time" = xyes; then :
33702   ac_have_decl=1
33703 else
33704   ac_have_decl=0
33705 fi
33706
33707 cat >>confdefs.h <<_ACEOF
33708 #define HAVE_DECL_TIME $ac_have_decl
33709 _ACEOF
33710
33711
33712 ac_fn_c_check_func "$LINENO" "waitpid" "ac_cv_func_waitpid"
33713 if test "x$ac_cv_func_waitpid" = xyes; then :
33714   $as_echo "#define HAVE_WAITPID 1" >>confdefs.h
33715
33716 else
33717   case " $LIBOBJS " in
33718   *" waitpid.$ac_objext "* ) ;;
33719   *) LIBOBJS="$LIBOBJS waitpid.$ac_objext"
33720  ;;
33721 esac
33722
33723 fi
33724
33725
33726
33727
33728 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remote shell" >&5
33729 $as_echo_n "checking for remote shell... " >&6; }
33730 if ${tar_cv_path_RSH+:} false; then :
33731   $as_echo_n "(cached) " >&6
33732 else
33733   if test -n "$RSH"; then
33734     tar_cv_path_RSH=$RSH
33735   else
33736     tar_cv_path_RSH=no
33737     for ac_file in /usr/ucb/rsh /usr/bin/remsh /usr/bin/rsh /usr/bsd/rsh \
33738         /usr/bin/nsh /usr/bin/rcmd
33739     do
33740       # Prefer a non-symlink rsh to a symlink one, so that binaries built
33741       # on AIX 4.1.4, where /usr/ucb/rsh is a symlink to /usr/bin/rsh
33742       # will run on AIX 4.3.0, which has only /usr/bin/rsh.
33743       if test -f $ac_file; then
33744         if (test -h $ac_file) 2>/dev/null; then
33745           test $tar_cv_path_RSH = no && tar_cv_path_RSH=$ac_file
33746         else
33747           tar_cv_path_RSH=$ac_file
33748           break
33749         fi
33750       fi
33751     done
33752   fi
33753 fi
33754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tar_cv_path_RSH" >&5
33755 $as_echo "$tar_cv_path_RSH" >&6; }
33756 if test $tar_cv_path_RSH = no; then
33757   for ac_header in netdb.h
33758 do :
33759   ac_fn_c_check_header_mongrel "$LINENO" "netdb.h" "ac_cv_header_netdb_h" "$ac_includes_default"
33760 if test "x$ac_cv_header_netdb_h" = xyes; then :
33761   cat >>confdefs.h <<_ACEOF
33762 #define HAVE_NETDB_H 1
33763 _ACEOF
33764
33765 fi
33766
33767 done
33768
33769 else
33770
33771 cat >>confdefs.h <<_ACEOF
33772 #define REMOTE_SHELL "$tar_cv_path_RSH"
33773 _ACEOF
33774
33775 fi
33776
33777
33778
33779
33780
33781 # Check whether --with-compress was given.
33782 if test "${with_compress+set}" = set; then :
33783   withval=$with_compress; tar_cv_compressor_compress=${withval}
33784 else
33785   tar_cv_compressor_compress=compress
33786 fi
33787
33788
33789 cat >>confdefs.h <<_ACEOF
33790 #define COMPRESS_PROGRAM "$tar_cv_compressor_compress"
33791 _ACEOF
33792
33793
33794
33795
33796
33797 # Check whether --with-gzip was given.
33798 if test "${with_gzip+set}" = set; then :
33799   withval=$with_gzip; tar_cv_compressor_gzip=${withval}
33800 else
33801   tar_cv_compressor_gzip=gzip
33802 fi
33803
33804
33805 cat >>confdefs.h <<_ACEOF
33806 #define GZIP_PROGRAM "$tar_cv_compressor_gzip"
33807 _ACEOF
33808
33809
33810
33811
33812
33813 # Check whether --with-bzip2 was given.
33814 if test "${with_bzip2+set}" = set; then :
33815   withval=$with_bzip2; tar_cv_compressor_bzip2=${withval}
33816 else
33817   tar_cv_compressor_bzip2=bzip2
33818 fi
33819
33820
33821 cat >>confdefs.h <<_ACEOF
33822 #define BZIP2_PROGRAM "$tar_cv_compressor_bzip2"
33823 _ACEOF
33824
33825
33826
33827
33828
33829 # Check whether --with-lzip was given.
33830 if test "${with_lzip+set}" = set; then :
33831   withval=$with_lzip; tar_cv_compressor_lzip=${withval}
33832 else
33833   tar_cv_compressor_lzip=lzip
33834 fi
33835
33836
33837 cat >>confdefs.h <<_ACEOF
33838 #define LZIP_PROGRAM "$tar_cv_compressor_lzip"
33839 _ACEOF
33840
33841
33842
33843
33844
33845 # Check whether --with-lzma was given.
33846 if test "${with_lzma+set}" = set; then :
33847   withval=$with_lzma; tar_cv_compressor_lzma=${withval}
33848 else
33849   tar_cv_compressor_lzma=lzma
33850 fi
33851
33852
33853 cat >>confdefs.h <<_ACEOF
33854 #define LZMA_PROGRAM "$tar_cv_compressor_lzma"
33855 _ACEOF
33856
33857
33858
33859
33860
33861 # Check whether --with-lzop was given.
33862 if test "${with_lzop+set}" = set; then :
33863   withval=$with_lzop; tar_cv_compressor_lzop=${withval}
33864 else
33865   tar_cv_compressor_lzop=lzop
33866 fi
33867
33868
33869 cat >>confdefs.h <<_ACEOF
33870 #define LZOP_PROGRAM "$tar_cv_compressor_lzop"
33871 _ACEOF
33872
33873
33874
33875
33876
33877 # Check whether --with-xz was given.
33878 if test "${with_xz+set}" = set; then :
33879   withval=$with_xz; tar_cv_compressor_xz=${withval}
33880 else
33881   tar_cv_compressor_xz=xz
33882 fi
33883
33884
33885 cat >>confdefs.h <<_ACEOF
33886 #define XZ_PROGRAM "$tar_cv_compressor_xz"
33887 _ACEOF
33888
33889
33890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default archive format" >&5
33891 $as_echo_n "checking for default archive format... " >&6; }
33892
33893
33894
33895 if test -z "$DEFAULT_ARCHIVE_FORMAT"; then
33896   DEFAULT_ARCHIVE_FORMAT="GNU"
33897 fi
33898 case $DEFAULT_ARCHIVE_FORMAT in
33899   V7|OLDGNU|USTAR|POSIX|GNU) ;;
33900   *) as_fn_error $? "Invalid format name" "$LINENO" 5;;
33901 esac
33902
33903 cat >>confdefs.h <<_ACEOF
33904 #define DEFAULT_ARCHIVE_FORMAT ${DEFAULT_ARCHIVE_FORMAT}_FORMAT
33905 _ACEOF
33906
33907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEFAULT_ARCHIVE_FORMAT" >&5
33908 $as_echo "$DEFAULT_ARCHIVE_FORMAT" >&6; }
33909
33910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default archive" >&5
33911 $as_echo_n "checking for default archive... " >&6; }
33912
33913
33914 if test -z "$DEFAULT_ARCHIVE"; then
33915   DEFAULT_ARCHIVE=-
33916 else
33917   if test -z "`ls $DEFAULT_ARCHIVE 2>/dev/null`"; then
33918     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: DEFAULT_ARCHIVE '$DEFAULT_ARCHIVE' not found on this system" >&5
33919 $as_echo "$as_me: WARNING: DEFAULT_ARCHIVE '$DEFAULT_ARCHIVE' not found on this system" >&2;}
33920   fi
33921   # FIXME: Look for DEFTAPE in <sys/mtio.h>.
33922   # FIXME: Let DEVICE_PREFIX be configured from the environment.
33923   # FIXME: Rearrange, here.
33924   case $DEFAULT_ARCHIVE in
33925     *[0-7][lmh])
33926
33927 $as_echo "#define DENSITY_LETTER 1" >>confdefs.h
33928
33929       device_prefix=`echo $DEFAULT_ARCHIVE | sed 's/0-7lmh$//'`
33930       ;;
33931     *[0-7])
33932       device_prefix=`echo $DEFAULT_ARCHIVE | sed 's/0-7$//'`
33933       ;;
33934     *)
33935       device_prefix=
33936       ;;
33937   esac
33938   case "$device_prefix" in
33939     ?*)
33940
33941 cat >>confdefs.h <<_ACEOF
33942 #define DEVICE_PREFIX "$device_prefix"
33943 _ACEOF
33944
33945       ;;
33946   esac
33947 fi
33948
33949 cat >>confdefs.h <<_ACEOF
33950 #define DEFAULT_ARCHIVE "$DEFAULT_ARCHIVE"
33951 _ACEOF
33952
33953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEFAULT_ARCHIVE" >&5
33954 $as_echo "$DEFAULT_ARCHIVE" >&6; }
33955
33956
33957 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default blocking" >&5
33958 $as_echo_n "checking for default blocking... " >&6; }
33959 DEFAULT_BLOCKING=${DEFAULT_BLOCKING-20}
33960
33961 cat >>confdefs.h <<_ACEOF
33962 #define DEFAULT_BLOCKING $DEFAULT_BLOCKING
33963 _ACEOF
33964
33965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEFAULT_BLOCKING" >&5
33966 $as_echo "$DEFAULT_BLOCKING" >&6; }
33967
33968 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default quoting style" >&5
33969 $as_echo_n "checking for default quoting style... " >&6; }
33970
33971
33972 DEFAULT_QUOTING_STYLE="escape"
33973
33974
33975 case $DEFAULT_QUOTING_STYLE in
33976           literal|shell|shell-always|c|escape|locale|clocale) ;;
33977 *)  as_fn_error $? "Invalid quoting style" "$LINENO" 5;;
33978 esac
33979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEFAULT_QUOTING_STYLE" >&5
33980 $as_echo "$DEFAULT_QUOTING_STYLE" >&6; }
33981 DEFAULT_QUOTING_STYLE=`echo ${DEFAULT_QUOTING_STYLE}|sed 's/-/_/g'`_quoting_style
33982
33983 cat >>confdefs.h <<_ACEOF
33984 #define DEFAULT_QUOTING_STYLE $DEFAULT_QUOTING_STYLE
33985 _ACEOF
33986
33987
33988 # Iconv
33989
33990       if test "X$prefix" = "XNONE"; then
33991     acl_final_prefix="$ac_default_prefix"
33992   else
33993     acl_final_prefix="$prefix"
33994   fi
33995   if test "X$exec_prefix" = "XNONE"; then
33996     acl_final_exec_prefix='${prefix}'
33997   else
33998     acl_final_exec_prefix="$exec_prefix"
33999   fi
34000   acl_save_prefix="$prefix"
34001   prefix="$acl_final_prefix"
34002   eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
34003   prefix="$acl_save_prefix"
34004
34005
34006
34007 # Check whether --with-gnu-ld was given.
34008 if test "${with_gnu_ld+set}" = set; then :
34009   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
34010 else
34011   with_gnu_ld=no
34012 fi
34013
34014 # Prepare PATH_SEPARATOR.
34015 # The user is always right.
34016 if test "${PATH_SEPARATOR+set}" != set; then
34017   # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
34018   # contains only /bin. Note that ksh looks also at the FPATH variable,
34019   # so we have to set that as well for the test.
34020   PATH_SEPARATOR=:
34021   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
34022     && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
34023            || PATH_SEPARATOR=';'
34024        }
34025 fi
34026
34027 ac_prog=ld
34028 if test "$GCC" = yes; then
34029   # Check if gcc -print-prog-name=ld gives a path.
34030   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
34031 $as_echo_n "checking for ld used by $CC... " >&6; }
34032   case $host in
34033   *-*-mingw*)
34034     # gcc leaves a trailing carriage return which upsets mingw
34035     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
34036   *)
34037     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
34038   esac
34039   case $ac_prog in
34040     # Accept absolute paths.
34041     [\\/]* | ?:[\\/]*)
34042       re_direlt='/[^/][^/]*/\.\./'
34043       # Canonicalize the pathname of ld
34044       ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'`
34045       while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do
34046         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
34047       done
34048       test -z "$LD" && LD="$ac_prog"
34049       ;;
34050   "")
34051     # If it fails, then pretend we aren't using GCC.
34052     ac_prog=ld
34053     ;;
34054   *)
34055     # If it is relative, then search for the first ld in PATH.
34056     with_gnu_ld=unknown
34057     ;;
34058   esac
34059 elif test "$with_gnu_ld" = yes; then
34060   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
34061 $as_echo_n "checking for GNU ld... " >&6; }
34062 else
34063   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
34064 $as_echo_n "checking for non-GNU ld... " >&6; }
34065 fi
34066 if ${acl_cv_path_LD+:} false; then :
34067   $as_echo_n "(cached) " >&6
34068 else
34069   if test -z "$LD"; then
34070   acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
34071   for ac_dir in $PATH; do
34072     IFS="$acl_save_ifs"
34073     test -z "$ac_dir" && ac_dir=.
34074     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
34075       acl_cv_path_LD="$ac_dir/$ac_prog"
34076       # Check to see if the program is GNU ld.  I'd rather use --version,
34077       # but apparently some variants of GNU ld only accept -v.
34078       # Break only if it was the GNU/non-GNU ld that we prefer.
34079       case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
34080       *GNU* | *'with BFD'*)
34081         test "$with_gnu_ld" != no && break
34082         ;;
34083       *)
34084         test "$with_gnu_ld" != yes && break
34085         ;;
34086       esac
34087     fi
34088   done
34089   IFS="$acl_save_ifs"
34090 else
34091   acl_cv_path_LD="$LD" # Let the user override the test with a path.
34092 fi
34093 fi
34094
34095 LD="$acl_cv_path_LD"
34096 if test -n "$LD"; then
34097   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
34098 $as_echo "$LD" >&6; }
34099 else
34100   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34101 $as_echo "no" >&6; }
34102 fi
34103 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
34104 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
34105 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
34106 if ${acl_cv_prog_gnu_ld+:} false; then :
34107   $as_echo_n "(cached) " >&6
34108 else
34109   # I'd rather use --version here, but apparently some GNU lds only accept -v.
34110 case `$LD -v 2>&1 </dev/null` in
34111 *GNU* | *'with BFD'*)
34112   acl_cv_prog_gnu_ld=yes
34113   ;;
34114 *)
34115   acl_cv_prog_gnu_ld=no
34116   ;;
34117 esac
34118 fi
34119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
34120 $as_echo "$acl_cv_prog_gnu_ld" >&6; }
34121 with_gnu_ld=$acl_cv_prog_gnu_ld
34122
34123
34124
34125
34126                                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
34127 $as_echo_n "checking for shared library run path origin... " >&6; }
34128 if ${acl_cv_rpath+:} false; then :
34129   $as_echo_n "(cached) " >&6
34130 else
34131
34132     CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
34133     ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
34134     . ./conftest.sh
34135     rm -f ./conftest.sh
34136     acl_cv_rpath=done
34137
34138 fi
34139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
34140 $as_echo "$acl_cv_rpath" >&6; }
34141   wl="$acl_cv_wl"
34142   acl_libext="$acl_cv_libext"
34143   acl_shlibext="$acl_cv_shlibext"
34144   acl_libname_spec="$acl_cv_libname_spec"
34145   acl_library_names_spec="$acl_cv_library_names_spec"
34146   acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
34147   acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
34148   acl_hardcode_direct="$acl_cv_hardcode_direct"
34149   acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
34150     # Check whether --enable-rpath was given.
34151 if test "${enable_rpath+set}" = set; then :
34152   enableval=$enable_rpath; :
34153 else
34154   enable_rpath=yes
34155 fi
34156
34157
34158
34159
34160   acl_libdirstem=lib
34161   acl_libdirstem2=
34162   case "$host_os" in
34163     solaris*)
34164                                     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5
34165 $as_echo_n "checking for 64-bit host... " >&6; }
34166 if ${gl_cv_solaris_64bit+:} false; then :
34167   $as_echo_n "(cached) " >&6
34168 else
34169   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34170 /* end confdefs.h.  */
34171
34172 #ifdef _LP64
34173 sixtyfour bits
34174 #endif
34175
34176 _ACEOF
34177 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
34178   $EGREP "sixtyfour bits" >/dev/null 2>&1; then :
34179   gl_cv_solaris_64bit=yes
34180 else
34181   gl_cv_solaris_64bit=no
34182 fi
34183 rm -f conftest*
34184
34185
34186 fi
34187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5
34188 $as_echo "$gl_cv_solaris_64bit" >&6; }
34189       if test $gl_cv_solaris_64bit = yes; then
34190         acl_libdirstem=lib/64
34191         case "$host_cpu" in
34192           sparc*)        acl_libdirstem2=lib/sparcv9 ;;
34193           i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
34194         esac
34195       fi
34196       ;;
34197     *)
34198       searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
34199       if test -n "$searchpath"; then
34200         acl_save_IFS="${IFS=    }"; IFS=":"
34201         for searchdir in $searchpath; do
34202           if test -d "$searchdir"; then
34203             case "$searchdir" in
34204               */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
34205               */../ | */.. )
34206                 # Better ignore directories of this form. They are misleading.
34207                 ;;
34208               *) searchdir=`cd "$searchdir" && pwd`
34209                  case "$searchdir" in
34210                    */lib64 ) acl_libdirstem=lib64 ;;
34211                  esac ;;
34212             esac
34213           fi
34214         done
34215         IFS="$acl_save_IFS"
34216       fi
34217       ;;
34218   esac
34219   test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
34220
34221
34222
34223
34224
34225
34226
34227
34228
34229
34230
34231
34232     use_additional=yes
34233
34234   acl_save_prefix="$prefix"
34235   prefix="$acl_final_prefix"
34236   acl_save_exec_prefix="$exec_prefix"
34237   exec_prefix="$acl_final_exec_prefix"
34238
34239     eval additional_includedir=\"$includedir\"
34240     eval additional_libdir=\"$libdir\"
34241
34242   exec_prefix="$acl_save_exec_prefix"
34243   prefix="$acl_save_prefix"
34244
34245
34246 # Check whether --with-libiconv-prefix was given.
34247 if test "${with_libiconv_prefix+set}" = set; then :
34248   withval=$with_libiconv_prefix;
34249     if test "X$withval" = "Xno"; then
34250       use_additional=no
34251     else
34252       if test "X$withval" = "X"; then
34253
34254   acl_save_prefix="$prefix"
34255   prefix="$acl_final_prefix"
34256   acl_save_exec_prefix="$exec_prefix"
34257   exec_prefix="$acl_final_exec_prefix"
34258
34259           eval additional_includedir=\"$includedir\"
34260           eval additional_libdir=\"$libdir\"
34261
34262   exec_prefix="$acl_save_exec_prefix"
34263   prefix="$acl_save_prefix"
34264
34265       else
34266         additional_includedir="$withval/include"
34267         additional_libdir="$withval/$acl_libdirstem"
34268         if test "$acl_libdirstem2" != "$acl_libdirstem" \
34269            && ! test -d "$withval/$acl_libdirstem"; then
34270           additional_libdir="$withval/$acl_libdirstem2"
34271         fi
34272       fi
34273     fi
34274
34275 fi
34276
34277       LIBICONV=
34278   LTLIBICONV=
34279   INCICONV=
34280   LIBICONV_PREFIX=
34281       HAVE_LIBICONV=
34282   rpathdirs=
34283   ltrpathdirs=
34284   names_already_handled=
34285   names_next_round='iconv '
34286   while test -n "$names_next_round"; do
34287     names_this_round="$names_next_round"
34288     names_next_round=
34289     for name in $names_this_round; do
34290       already_handled=
34291       for n in $names_already_handled; do
34292         if test "$n" = "$name"; then
34293           already_handled=yes
34294           break
34295         fi
34296       done
34297       if test -z "$already_handled"; then
34298         names_already_handled="$names_already_handled $name"
34299                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
34300         eval value=\"\$HAVE_LIB$uppername\"
34301         if test -n "$value"; then
34302           if test "$value" = yes; then
34303             eval value=\"\$LIB$uppername\"
34304             test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
34305             eval value=\"\$LTLIB$uppername\"
34306             test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
34307           else
34308                                     :
34309           fi
34310         else
34311                               found_dir=
34312           found_la=
34313           found_so=
34314           found_a=
34315           eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
34316           if test -n "$acl_shlibext"; then
34317             shrext=".$acl_shlibext"             # typically: shrext=.so
34318           else
34319             shrext=
34320           fi
34321           if test $use_additional = yes; then
34322             dir="$additional_libdir"
34323                                     if test -n "$acl_shlibext"; then
34324               if test -f "$dir/$libname$shrext"; then
34325                 found_dir="$dir"
34326                 found_so="$dir/$libname$shrext"
34327               else
34328                 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
34329                   ver=`(cd "$dir" && \
34330                         for f in "$libname$shrext".*; do echo "$f"; done \
34331                         | sed -e "s,^$libname$shrext\\\\.,," \
34332                         | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
34333                         | sed 1q ) 2>/dev/null`
34334                   if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
34335                     found_dir="$dir"
34336                     found_so="$dir/$libname$shrext.$ver"
34337                   fi
34338                 else
34339                   eval library_names=\"$acl_library_names_spec\"
34340                   for f in $library_names; do
34341                     if test -f "$dir/$f"; then
34342                       found_dir="$dir"
34343                       found_so="$dir/$f"
34344                       break
34345                     fi
34346                   done
34347                 fi
34348               fi
34349             fi
34350                         if test "X$found_dir" = "X"; then
34351               if test -f "$dir/$libname.$acl_libext"; then
34352                 found_dir="$dir"
34353                 found_a="$dir/$libname.$acl_libext"
34354               fi
34355             fi
34356             if test "X$found_dir" != "X"; then
34357               if test -f "$dir/$libname.la"; then
34358                 found_la="$dir/$libname.la"
34359               fi
34360             fi
34361           fi
34362           if test "X$found_dir" = "X"; then
34363             for x in $LDFLAGS $LTLIBICONV; do
34364
34365   acl_save_prefix="$prefix"
34366   prefix="$acl_final_prefix"
34367   acl_save_exec_prefix="$exec_prefix"
34368   exec_prefix="$acl_final_exec_prefix"
34369   eval x=\"$x\"
34370   exec_prefix="$acl_save_exec_prefix"
34371   prefix="$acl_save_prefix"
34372
34373               case "$x" in
34374                 -L*)
34375                   dir=`echo "X$x" | sed -e 's/^X-L//'`
34376                                     if test -n "$acl_shlibext"; then
34377                     if test -f "$dir/$libname$shrext"; then
34378                       found_dir="$dir"
34379                       found_so="$dir/$libname$shrext"
34380                     else
34381                       if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
34382                         ver=`(cd "$dir" && \
34383                               for f in "$libname$shrext".*; do echo "$f"; done \
34384                               | sed -e "s,^$libname$shrext\\\\.,," \
34385                               | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
34386                               | sed 1q ) 2>/dev/null`
34387                         if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
34388                           found_dir="$dir"
34389                           found_so="$dir/$libname$shrext.$ver"
34390                         fi
34391                       else
34392                         eval library_names=\"$acl_library_names_spec\"
34393                         for f in $library_names; do
34394                           if test -f "$dir/$f"; then
34395                             found_dir="$dir"
34396                             found_so="$dir/$f"
34397                             break
34398                           fi
34399                         done
34400                       fi
34401                     fi
34402                   fi
34403                                     if test "X$found_dir" = "X"; then
34404                     if test -f "$dir/$libname.$acl_libext"; then
34405                       found_dir="$dir"
34406                       found_a="$dir/$libname.$acl_libext"
34407                     fi
34408                   fi
34409                   if test "X$found_dir" != "X"; then
34410                     if test -f "$dir/$libname.la"; then
34411                       found_la="$dir/$libname.la"
34412                     fi
34413                   fi
34414                   ;;
34415               esac
34416               if test "X$found_dir" != "X"; then
34417                 break
34418               fi
34419             done
34420           fi
34421           if test "X$found_dir" != "X"; then
34422                         LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
34423             if test "X$found_so" != "X"; then
34424                                                         if test "$enable_rpath" = no \
34425                  || test "X$found_dir" = "X/usr/$acl_libdirstem" \
34426                  || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
34427                                 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
34428               else
34429                                                                                 haveit=
34430                 for x in $ltrpathdirs; do
34431                   if test "X$x" = "X$found_dir"; then
34432                     haveit=yes
34433                     break
34434                   fi
34435                 done
34436                 if test -z "$haveit"; then
34437                   ltrpathdirs="$ltrpathdirs $found_dir"
34438                 fi
34439                                 if test "$acl_hardcode_direct" = yes; then
34440                                                       LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
34441                 else
34442                   if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
34443                                                             LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
34444                                                             haveit=
34445                     for x in $rpathdirs; do
34446                       if test "X$x" = "X$found_dir"; then
34447                         haveit=yes
34448                         break
34449                       fi
34450                     done
34451                     if test -z "$haveit"; then
34452                       rpathdirs="$rpathdirs $found_dir"
34453                     fi
34454                   else
34455                                                                                 haveit=
34456                     for x in $LDFLAGS $LIBICONV; do
34457
34458   acl_save_prefix="$prefix"
34459   prefix="$acl_final_prefix"
34460   acl_save_exec_prefix="$exec_prefix"
34461   exec_prefix="$acl_final_exec_prefix"
34462   eval x=\"$x\"
34463   exec_prefix="$acl_save_exec_prefix"
34464   prefix="$acl_save_prefix"
34465
34466                       if test "X$x" = "X-L$found_dir"; then
34467                         haveit=yes
34468                         break
34469                       fi
34470                     done
34471                     if test -z "$haveit"; then
34472                       LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
34473                     fi
34474                     if test "$acl_hardcode_minus_L" != no; then
34475                                                                                         LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
34476                     else
34477                                                                                                                                                                                 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
34478                     fi
34479                   fi
34480                 fi
34481               fi
34482             else
34483               if test "X$found_a" != "X"; then
34484                                 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
34485               else
34486                                                 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
34487               fi
34488             fi
34489                         additional_includedir=
34490             case "$found_dir" in
34491               */$acl_libdirstem | */$acl_libdirstem/)
34492                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
34493                 if test "$name" = 'iconv'; then
34494                   LIBICONV_PREFIX="$basedir"
34495                 fi
34496                 additional_includedir="$basedir/include"
34497                 ;;
34498               */$acl_libdirstem2 | */$acl_libdirstem2/)
34499                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
34500                 if test "$name" = 'iconv'; then
34501                   LIBICONV_PREFIX="$basedir"
34502                 fi
34503                 additional_includedir="$basedir/include"
34504                 ;;
34505             esac
34506             if test "X$additional_includedir" != "X"; then
34507                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
34508                 haveit=
34509                 if test "X$additional_includedir" = "X/usr/local/include"; then
34510                   if test -n "$GCC"; then
34511                     case $host_os in
34512                       linux* | gnu* | k*bsd*-gnu) haveit=yes;;
34513                     esac
34514                   fi
34515                 fi
34516                 if test -z "$haveit"; then
34517                   for x in $CPPFLAGS $INCICONV; do
34518
34519   acl_save_prefix="$prefix"
34520   prefix="$acl_final_prefix"
34521   acl_save_exec_prefix="$exec_prefix"
34522   exec_prefix="$acl_final_exec_prefix"
34523   eval x=\"$x\"
34524   exec_prefix="$acl_save_exec_prefix"
34525   prefix="$acl_save_prefix"
34526
34527                     if test "X$x" = "X-I$additional_includedir"; then
34528                       haveit=yes
34529                       break
34530                     fi
34531                   done
34532                   if test -z "$haveit"; then
34533                     if test -d "$additional_includedir"; then
34534                                             INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
34535                     fi
34536                   fi
34537                 fi
34538               fi
34539             fi
34540                         if test -n "$found_la"; then
34541                                                         save_libdir="$libdir"
34542               case "$found_la" in
34543                 */* | *\\*) . "$found_la" ;;
34544                 *) . "./$found_la" ;;
34545               esac
34546               libdir="$save_libdir"
34547                             for dep in $dependency_libs; do
34548                 case "$dep" in
34549                   -L*)
34550                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
34551                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
34552                        && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
34553                       haveit=
34554                       if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
34555                          || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
34556                         if test -n "$GCC"; then
34557                           case $host_os in
34558                             linux* | gnu* | k*bsd*-gnu) haveit=yes;;
34559                           esac
34560                         fi
34561                       fi
34562                       if test -z "$haveit"; then
34563                         haveit=
34564                         for x in $LDFLAGS $LIBICONV; do
34565
34566   acl_save_prefix="$prefix"
34567   prefix="$acl_final_prefix"
34568   acl_save_exec_prefix="$exec_prefix"
34569   exec_prefix="$acl_final_exec_prefix"
34570   eval x=\"$x\"
34571   exec_prefix="$acl_save_exec_prefix"
34572   prefix="$acl_save_prefix"
34573
34574                           if test "X$x" = "X-L$additional_libdir"; then
34575                             haveit=yes
34576                             break
34577                           fi
34578                         done
34579                         if test -z "$haveit"; then
34580                           if test -d "$additional_libdir"; then
34581                                                         LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
34582                           fi
34583                         fi
34584                         haveit=
34585                         for x in $LDFLAGS $LTLIBICONV; do
34586
34587   acl_save_prefix="$prefix"
34588   prefix="$acl_final_prefix"
34589   acl_save_exec_prefix="$exec_prefix"
34590   exec_prefix="$acl_final_exec_prefix"
34591   eval x=\"$x\"
34592   exec_prefix="$acl_save_exec_prefix"
34593   prefix="$acl_save_prefix"
34594
34595                           if test "X$x" = "X-L$additional_libdir"; then
34596                             haveit=yes
34597                             break
34598                           fi
34599                         done
34600                         if test -z "$haveit"; then
34601                           if test -d "$additional_libdir"; then
34602                                                         LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
34603                           fi
34604                         fi
34605                       fi
34606                     fi
34607                     ;;
34608                   -R*)
34609                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
34610                     if test "$enable_rpath" != no; then
34611                                                                   haveit=
34612                       for x in $rpathdirs; do
34613                         if test "X$x" = "X$dir"; then
34614                           haveit=yes
34615                           break
34616                         fi
34617                       done
34618                       if test -z "$haveit"; then
34619                         rpathdirs="$rpathdirs $dir"
34620                       fi
34621                                                                   haveit=
34622                       for x in $ltrpathdirs; do
34623                         if test "X$x" = "X$dir"; then
34624                           haveit=yes
34625                           break
34626                         fi
34627                       done
34628                       if test -z "$haveit"; then
34629                         ltrpathdirs="$ltrpathdirs $dir"
34630                       fi
34631                     fi
34632                     ;;
34633                   -l*)
34634                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
34635                     ;;
34636                   *.la)
34637                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
34638                     ;;
34639                   *)
34640                                         LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
34641                     LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
34642                     ;;
34643                 esac
34644               done
34645             fi
34646           else
34647                                                             LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
34648             LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
34649           fi
34650         fi
34651       fi
34652     done
34653   done
34654   if test "X$rpathdirs" != "X"; then
34655     if test -n "$acl_hardcode_libdir_separator"; then
34656                         alldirs=
34657       for found_dir in $rpathdirs; do
34658         alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
34659       done
34660             acl_save_libdir="$libdir"
34661       libdir="$alldirs"
34662       eval flag=\"$acl_hardcode_libdir_flag_spec\"
34663       libdir="$acl_save_libdir"
34664       LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
34665     else
34666             for found_dir in $rpathdirs; do
34667         acl_save_libdir="$libdir"
34668         libdir="$found_dir"
34669         eval flag=\"$acl_hardcode_libdir_flag_spec\"
34670         libdir="$acl_save_libdir"
34671         LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
34672       done
34673     fi
34674   fi
34675   if test "X$ltrpathdirs" != "X"; then
34676             for found_dir in $ltrpathdirs; do
34677       LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
34678     done
34679   fi
34680
34681
34682
34683
34684
34685
34686
34687
34688
34689
34690
34691
34692           am_save_CPPFLAGS="$CPPFLAGS"
34693
34694   for element in $INCICONV; do
34695     haveit=
34696     for x in $CPPFLAGS; do
34697
34698   acl_save_prefix="$prefix"
34699   prefix="$acl_final_prefix"
34700   acl_save_exec_prefix="$exec_prefix"
34701   exec_prefix="$acl_final_exec_prefix"
34702   eval x=\"$x\"
34703   exec_prefix="$acl_save_exec_prefix"
34704   prefix="$acl_save_prefix"
34705
34706       if test "X$x" = "X$element"; then
34707         haveit=yes
34708         break
34709       fi
34710     done
34711     if test -z "$haveit"; then
34712       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
34713     fi
34714   done
34715
34716
34717   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
34718 $as_echo_n "checking for iconv... " >&6; }
34719 if ${am_cv_func_iconv+:} false; then :
34720   $as_echo_n "(cached) " >&6
34721 else
34722
34723     am_cv_func_iconv="no, consider installing GNU libiconv"
34724     am_cv_lib_iconv=no
34725     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34726 /* end confdefs.h.  */
34727
34728 #include <stdlib.h>
34729 #include <iconv.h>
34730
34731 int
34732 main ()
34733 {
34734 iconv_t cd = iconv_open("","");
34735            iconv(cd,NULL,NULL,NULL,NULL);
34736            iconv_close(cd);
34737   ;
34738   return 0;
34739 }
34740 _ACEOF
34741 if ac_fn_c_try_link "$LINENO"; then :
34742   am_cv_func_iconv=yes
34743 fi
34744 rm -f core conftest.err conftest.$ac_objext \
34745     conftest$ac_exeext conftest.$ac_ext
34746     if test "$am_cv_func_iconv" != yes; then
34747       am_save_LIBS="$LIBS"
34748       LIBS="$LIBS $LIBICONV"
34749       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34750 /* end confdefs.h.  */
34751
34752 #include <stdlib.h>
34753 #include <iconv.h>
34754
34755 int
34756 main ()
34757 {
34758 iconv_t cd = iconv_open("","");
34759              iconv(cd,NULL,NULL,NULL,NULL);
34760              iconv_close(cd);
34761   ;
34762   return 0;
34763 }
34764 _ACEOF
34765 if ac_fn_c_try_link "$LINENO"; then :
34766   am_cv_lib_iconv=yes
34767         am_cv_func_iconv=yes
34768 fi
34769 rm -f core conftest.err conftest.$ac_objext \
34770     conftest$ac_exeext conftest.$ac_ext
34771       LIBS="$am_save_LIBS"
34772     fi
34773
34774 fi
34775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
34776 $as_echo "$am_cv_func_iconv" >&6; }
34777   if test "$am_cv_func_iconv" = yes; then
34778     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
34779 $as_echo_n "checking for working iconv... " >&6; }
34780 if ${am_cv_func_iconv_works+:} false; then :
34781   $as_echo_n "(cached) " >&6
34782 else
34783
34784                   am_save_LIBS="$LIBS"
34785       if test $am_cv_lib_iconv = yes; then
34786         LIBS="$LIBS $LIBICONV"
34787       fi
34788       if test "$cross_compiling" = yes; then :
34789
34790          case "$host_os" in
34791            aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
34792            *)            am_cv_func_iconv_works="guessing yes" ;;
34793          esac
34794
34795 else
34796   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34797 /* end confdefs.h.  */
34798
34799 #include <iconv.h>
34800 #include <string.h>
34801 int main ()
34802 {
34803   int result = 0;
34804   /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
34805      returns.  */
34806   {
34807     iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
34808     if (cd_utf8_to_88591 != (iconv_t)(-1))
34809       {
34810         static const char input[] = "\342\202\254"; /* EURO SIGN */
34811         char buf[10];
34812         const char *inptr = input;
34813         size_t inbytesleft = strlen (input);
34814         char *outptr = buf;
34815         size_t outbytesleft = sizeof (buf);
34816         size_t res = iconv (cd_utf8_to_88591,
34817                             (char **) &inptr, &inbytesleft,
34818                             &outptr, &outbytesleft);
34819         if (res == 0)
34820           result |= 1;
34821         iconv_close (cd_utf8_to_88591);
34822       }
34823   }
34824   /* Test against Solaris 10 bug: Failures are not distinguishable from
34825      successful returns.  */
34826   {
34827     iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
34828     if (cd_ascii_to_88591 != (iconv_t)(-1))
34829       {
34830         static const char input[] = "\263";
34831         char buf[10];
34832         const char *inptr = input;
34833         size_t inbytesleft = strlen (input);
34834         char *outptr = buf;
34835         size_t outbytesleft = sizeof (buf);
34836         size_t res = iconv (cd_ascii_to_88591,
34837                             (char **) &inptr, &inbytesleft,
34838                             &outptr, &outbytesleft);
34839         if (res == 0)
34840           result |= 2;
34841         iconv_close (cd_ascii_to_88591);
34842       }
34843   }
34844   /* Test against AIX 6.1..7.1 bug: Buffer overrun.  */
34845   {
34846     iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
34847     if (cd_88591_to_utf8 != (iconv_t)(-1))
34848       {
34849         static const char input[] = "\304";
34850         static char buf[2] = { (char)0xDE, (char)0xAD };
34851         const char *inptr = input;
34852         size_t inbytesleft = 1;
34853         char *outptr = buf;
34854         size_t outbytesleft = 1;
34855         size_t res = iconv (cd_88591_to_utf8,
34856                             (char **) &inptr, &inbytesleft,
34857                             &outptr, &outbytesleft);
34858         if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
34859           result |= 4;
34860         iconv_close (cd_88591_to_utf8);
34861       }
34862   }
34863 #if 0 /* This bug could be worked around by the caller.  */
34864   /* Test against HP-UX 11.11 bug: Positive return value instead of 0.  */
34865   {
34866     iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
34867     if (cd_88591_to_utf8 != (iconv_t)(-1))
34868       {
34869         static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
34870         char buf[50];
34871         const char *inptr = input;
34872         size_t inbytesleft = strlen (input);
34873         char *outptr = buf;
34874         size_t outbytesleft = sizeof (buf);
34875         size_t res = iconv (cd_88591_to_utf8,
34876                             (char **) &inptr, &inbytesleft,
34877                             &outptr, &outbytesleft);
34878         if ((int)res > 0)
34879           result |= 8;
34880         iconv_close (cd_88591_to_utf8);
34881       }
34882   }
34883 #endif
34884   /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
34885      provided.  */
34886   if (/* Try standardized names.  */
34887       iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
34888       /* Try IRIX, OSF/1 names.  */
34889       && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
34890       /* Try AIX names.  */
34891       && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
34892       /* Try HP-UX names.  */
34893       && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
34894     result |= 16;
34895   return result;
34896 }
34897 _ACEOF
34898 if ac_fn_c_try_run "$LINENO"; then :
34899   am_cv_func_iconv_works=yes
34900 else
34901   am_cv_func_iconv_works=no
34902 fi
34903 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34904   conftest.$ac_objext conftest.beam conftest.$ac_ext
34905 fi
34906
34907       LIBS="$am_save_LIBS"
34908
34909 fi
34910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
34911 $as_echo "$am_cv_func_iconv_works" >&6; }
34912     case "$am_cv_func_iconv_works" in
34913       *no) am_func_iconv=no am_cv_lib_iconv=no ;;
34914       *)   am_func_iconv=yes ;;
34915     esac
34916   else
34917     am_func_iconv=no am_cv_lib_iconv=no
34918   fi
34919   if test "$am_func_iconv" = yes; then
34920
34921 $as_echo "#define HAVE_ICONV 1" >>confdefs.h
34922
34923   fi
34924   if test "$am_cv_lib_iconv" = yes; then
34925     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
34926 $as_echo_n "checking how to link with libiconv... " >&6; }
34927     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
34928 $as_echo "$LIBICONV" >&6; }
34929   else
34930             CPPFLAGS="$am_save_CPPFLAGS"
34931     LIBICONV=
34932     LTLIBICONV=
34933   fi
34934
34935
34936
34937   if test "$am_cv_func_iconv" = yes; then
34938     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
34939 $as_echo_n "checking for iconv declaration... " >&6; }
34940     if ${am_cv_proto_iconv+:} false; then :
34941   $as_echo_n "(cached) " >&6
34942 else
34943
34944       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34945 /* end confdefs.h.  */
34946
34947 #include <stdlib.h>
34948 #include <iconv.h>
34949 extern
34950 #ifdef __cplusplus
34951 "C"
34952 #endif
34953 #if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus)
34954 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
34955 #else
34956 size_t iconv();
34957 #endif
34958
34959 int
34960 main ()
34961 {
34962
34963   ;
34964   return 0;
34965 }
34966 _ACEOF
34967 if ac_fn_c_try_compile "$LINENO"; then :
34968   am_cv_proto_iconv_arg1=""
34969 else
34970   am_cv_proto_iconv_arg1="const"
34971 fi
34972 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34973       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);"
34974 fi
34975
34976     am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
34977     { $as_echo "$as_me:${as_lineno-$LINENO}: result:
34978          $am_cv_proto_iconv" >&5
34979 $as_echo "
34980          $am_cv_proto_iconv" >&6; }
34981
34982 cat >>confdefs.h <<_ACEOF
34983 #define ICONV_CONST $am_cv_proto_iconv_arg1
34984 _ACEOF
34985
34986
34987   fi
34988
34989 for ac_header in iconv.h
34990 do :
34991   ac_fn_c_check_header_mongrel "$LINENO" "iconv.h" "ac_cv_header_iconv_h" "$ac_includes_default"
34992 if test "x$ac_cv_header_iconv_h" = xyes; then :
34993   cat >>confdefs.h <<_ACEOF
34994 #define HAVE_ICONV_H 1
34995 _ACEOF
34996
34997 fi
34998
34999 done
35000
35001 ac_fn_c_check_type "$LINENO" "iconv_t" "ac_cv_type_iconv_t" "
35002 #ifdef HAVE_ICONV_H
35003 # include <iconv.h>
35004 #endif
35005
35006 "
35007 if test "x$ac_cv_type_iconv_t" = xyes; then :
35008   :
35009 else
35010
35011 $as_echo "#define iconv_t int" >>confdefs.h
35012
35013 fi
35014
35015
35016 # Gettext.
35017
35018   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
35019 $as_echo_n "checking whether NLS is requested... " >&6; }
35020     # Check whether --enable-nls was given.
35021 if test "${enable_nls+set}" = set; then :
35022   enableval=$enable_nls; USE_NLS=$enableval
35023 else
35024   USE_NLS=yes
35025 fi
35026
35027   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
35028 $as_echo "$USE_NLS" >&6; }
35029
35030
35031
35032
35033       GETTEXT_MACRO_VERSION=0.18
35034
35035
35036
35037
35038 # Prepare PATH_SEPARATOR.
35039 # The user is always right.
35040 if test "${PATH_SEPARATOR+set}" != set; then
35041   # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
35042   # contains only /bin. Note that ksh looks also at the FPATH variable,
35043   # so we have to set that as well for the test.
35044   PATH_SEPARATOR=:
35045   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
35046     && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
35047            || PATH_SEPARATOR=';'
35048        }
35049 fi
35050
35051 # Find out how to test for executable files. Don't use a zero-byte file,
35052 # as systems may use methods other than mode bits to determine executability.
35053 cat >conf$$.file <<_ASEOF
35054 #! /bin/sh
35055 exit 0
35056 _ASEOF
35057 chmod +x conf$$.file
35058 if test -x conf$$.file >/dev/null 2>&1; then
35059   ac_executable_p="test -x"
35060 else
35061   ac_executable_p="test -f"
35062 fi
35063 rm -f conf$$.file
35064
35065 # Extract the first word of "msgfmt", so it can be a program name with args.
35066 set dummy msgfmt; ac_word=$2
35067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35068 $as_echo_n "checking for $ac_word... " >&6; }
35069 if ${ac_cv_path_MSGFMT+:} false; then :
35070   $as_echo_n "(cached) " >&6
35071 else
35072   case "$MSGFMT" in
35073   [\\/]* | ?:[\\/]*)
35074     ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
35075     ;;
35076   *)
35077     ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
35078     for ac_dir in $PATH; do
35079       IFS="$ac_save_IFS"
35080       test -z "$ac_dir" && ac_dir=.
35081       for ac_exec_ext in '' $ac_executable_extensions; do
35082         if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
35083           echo "$as_me: trying $ac_dir/$ac_word..." >&5
35084           if $ac_dir/$ac_word --statistics /dev/null >&5 2>&1 &&
35085      (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
35086             ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext"
35087             break 2
35088           fi
35089         fi
35090       done
35091     done
35092     IFS="$ac_save_IFS"
35093   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
35094     ;;
35095 esac
35096 fi
35097 MSGFMT="$ac_cv_path_MSGFMT"
35098 if test "$MSGFMT" != ":"; then
35099   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
35100 $as_echo "$MSGFMT" >&6; }
35101 else
35102   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35103 $as_echo "no" >&6; }
35104 fi
35105
35106   # Extract the first word of "gmsgfmt", so it can be a program name with args.
35107 set dummy gmsgfmt; ac_word=$2
35108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35109 $as_echo_n "checking for $ac_word... " >&6; }
35110 if ${ac_cv_path_GMSGFMT+:} false; then :
35111   $as_echo_n "(cached) " >&6
35112 else
35113   case $GMSGFMT in
35114   [\\/]* | ?:[\\/]*)
35115   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
35116   ;;
35117   *)
35118   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35119 for as_dir in $PATH
35120 do
35121   IFS=$as_save_IFS
35122   test -z "$as_dir" && as_dir=.
35123     for ac_exec_ext in '' $ac_executable_extensions; do
35124   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35125     ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
35126     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35127     break 2
35128   fi
35129 done
35130   done
35131 IFS=$as_save_IFS
35132
35133   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
35134   ;;
35135 esac
35136 fi
35137 GMSGFMT=$ac_cv_path_GMSGFMT
35138 if test -n "$GMSGFMT"; then
35139   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
35140 $as_echo "$GMSGFMT" >&6; }
35141 else
35142   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35143 $as_echo "no" >&6; }
35144 fi
35145
35146
35147
35148     case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
35149     '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
35150     *) MSGFMT_015=$MSGFMT ;;
35151   esac
35152
35153   case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
35154     '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
35155     *) GMSGFMT_015=$GMSGFMT ;;
35156   esac
35157
35158
35159
35160 # Prepare PATH_SEPARATOR.
35161 # The user is always right.
35162 if test "${PATH_SEPARATOR+set}" != set; then
35163   # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
35164   # contains only /bin. Note that ksh looks also at the FPATH variable,
35165   # so we have to set that as well for the test.
35166   PATH_SEPARATOR=:
35167   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
35168     && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
35169            || PATH_SEPARATOR=';'
35170        }
35171 fi
35172
35173 # Find out how to test for executable files. Don't use a zero-byte file,
35174 # as systems may use methods other than mode bits to determine executability.
35175 cat >conf$$.file <<_ASEOF
35176 #! /bin/sh
35177 exit 0
35178 _ASEOF
35179 chmod +x conf$$.file
35180 if test -x conf$$.file >/dev/null 2>&1; then
35181   ac_executable_p="test -x"
35182 else
35183   ac_executable_p="test -f"
35184 fi
35185 rm -f conf$$.file
35186
35187 # Extract the first word of "xgettext", so it can be a program name with args.
35188 set dummy xgettext; ac_word=$2
35189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35190 $as_echo_n "checking for $ac_word... " >&6; }
35191 if ${ac_cv_path_XGETTEXT+:} false; then :
35192   $as_echo_n "(cached) " >&6
35193 else
35194   case "$XGETTEXT" in
35195   [\\/]* | ?:[\\/]*)
35196     ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
35197     ;;
35198   *)
35199     ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
35200     for ac_dir in $PATH; do
35201       IFS="$ac_save_IFS"
35202       test -z "$ac_dir" && ac_dir=.
35203       for ac_exec_ext in '' $ac_executable_extensions; do
35204         if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
35205           echo "$as_me: trying $ac_dir/$ac_word..." >&5
35206           if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&5 2>&1 &&
35207      (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
35208             ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext"
35209             break 2
35210           fi
35211         fi
35212       done
35213     done
35214     IFS="$ac_save_IFS"
35215   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
35216     ;;
35217 esac
35218 fi
35219 XGETTEXT="$ac_cv_path_XGETTEXT"
35220 if test "$XGETTEXT" != ":"; then
35221   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
35222 $as_echo "$XGETTEXT" >&6; }
35223 else
35224   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35225 $as_echo "no" >&6; }
35226 fi
35227
35228     rm -f messages.po
35229
35230     case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
35231     '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
35232     *) XGETTEXT_015=$XGETTEXT ;;
35233   esac
35234
35235
35236
35237 # Prepare PATH_SEPARATOR.
35238 # The user is always right.
35239 if test "${PATH_SEPARATOR+set}" != set; then
35240   # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
35241   # contains only /bin. Note that ksh looks also at the FPATH variable,
35242   # so we have to set that as well for the test.
35243   PATH_SEPARATOR=:
35244   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
35245     && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
35246            || PATH_SEPARATOR=';'
35247        }
35248 fi
35249
35250 # Find out how to test for executable files. Don't use a zero-byte file,
35251 # as systems may use methods other than mode bits to determine executability.
35252 cat >conf$$.file <<_ASEOF
35253 #! /bin/sh
35254 exit 0
35255 _ASEOF
35256 chmod +x conf$$.file
35257 if test -x conf$$.file >/dev/null 2>&1; then
35258   ac_executable_p="test -x"
35259 else
35260   ac_executable_p="test -f"
35261 fi
35262 rm -f conf$$.file
35263
35264 # Extract the first word of "msgmerge", so it can be a program name with args.
35265 set dummy msgmerge; ac_word=$2
35266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35267 $as_echo_n "checking for $ac_word... " >&6; }
35268 if ${ac_cv_path_MSGMERGE+:} false; then :
35269   $as_echo_n "(cached) " >&6
35270 else
35271   case "$MSGMERGE" in
35272   [\\/]* | ?:[\\/]*)
35273     ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
35274     ;;
35275   *)
35276     ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
35277     for ac_dir in $PATH; do
35278       IFS="$ac_save_IFS"
35279       test -z "$ac_dir" && ac_dir=.
35280       for ac_exec_ext in '' $ac_executable_extensions; do
35281         if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
35282           echo "$as_me: trying $ac_dir/$ac_word..." >&5
35283           if $ac_dir/$ac_word --update -q /dev/null /dev/null >&5 2>&1; then
35284             ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext"
35285             break 2
35286           fi
35287         fi
35288       done
35289     done
35290     IFS="$ac_save_IFS"
35291   test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":"
35292     ;;
35293 esac
35294 fi
35295 MSGMERGE="$ac_cv_path_MSGMERGE"
35296 if test "$MSGMERGE" != ":"; then
35297   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
35298 $as_echo "$MSGMERGE" >&6; }
35299 else
35300   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35301 $as_echo "no" >&6; }
35302 fi
35303
35304
35305         test -n "$localedir" || localedir='${datadir}/locale'
35306
35307
35308     test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
35309
35310
35311   ac_config_commands="$ac_config_commands po-directories"
35312
35313
35314
35315
35316
35317
35318
35319
35320
35321
35322
35323
35324
35325
35326
35327
35328
35329
35330
35331
35332
35333
35334
35335
35336
35337
35338     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5
35339 $as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; }
35340 if ${gt_cv_func_CFPreferencesCopyAppValue+:} false; then :
35341   $as_echo_n "(cached) " >&6
35342 else
35343   gt_save_LIBS="$LIBS"
35344      LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
35345      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35346 /* end confdefs.h.  */
35347 #include <CoreFoundation/CFPreferences.h>
35348 int
35349 main ()
35350 {
35351 CFPreferencesCopyAppValue(NULL, NULL)
35352   ;
35353   return 0;
35354 }
35355 _ACEOF
35356 if ac_fn_c_try_link "$LINENO"; then :
35357   gt_cv_func_CFPreferencesCopyAppValue=yes
35358 else
35359   gt_cv_func_CFPreferencesCopyAppValue=no
35360 fi
35361 rm -f core conftest.err conftest.$ac_objext \
35362     conftest$ac_exeext conftest.$ac_ext
35363      LIBS="$gt_save_LIBS"
35364 fi
35365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5
35366 $as_echo "$gt_cv_func_CFPreferencesCopyAppValue" >&6; }
35367   if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
35368
35369 $as_echo "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h
35370
35371   fi
35372     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5
35373 $as_echo_n "checking for CFLocaleCopyCurrent... " >&6; }
35374 if ${gt_cv_func_CFLocaleCopyCurrent+:} false; then :
35375   $as_echo_n "(cached) " >&6
35376 else
35377   gt_save_LIBS="$LIBS"
35378      LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
35379      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35380 /* end confdefs.h.  */
35381 #include <CoreFoundation/CFLocale.h>
35382 int
35383 main ()
35384 {
35385 CFLocaleCopyCurrent();
35386   ;
35387   return 0;
35388 }
35389 _ACEOF
35390 if ac_fn_c_try_link "$LINENO"; then :
35391   gt_cv_func_CFLocaleCopyCurrent=yes
35392 else
35393   gt_cv_func_CFLocaleCopyCurrent=no
35394 fi
35395 rm -f core conftest.err conftest.$ac_objext \
35396     conftest$ac_exeext conftest.$ac_ext
35397      LIBS="$gt_save_LIBS"
35398 fi
35399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5
35400 $as_echo "$gt_cv_func_CFLocaleCopyCurrent" >&6; }
35401   if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
35402
35403 $as_echo "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h
35404
35405   fi
35406   INTL_MACOSX_LIBS=
35407   if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
35408     INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
35409   fi
35410
35411
35412
35413
35414
35415
35416   LIBINTL=
35417   LTLIBINTL=
35418   POSUB=
35419
35420     case " $gt_needs " in
35421     *" need-formatstring-macros "*) gt_api_version=3 ;;
35422     *" need-ngettext "*) gt_api_version=2 ;;
35423     *) gt_api_version=1 ;;
35424   esac
35425   gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
35426   gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
35427
35428     if test "$USE_NLS" = "yes"; then
35429     gt_use_preinstalled_gnugettext=no
35430
35431
35432         if test $gt_api_version -ge 3; then
35433           gt_revision_test_code='
35434 #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
35435 #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
35436 #endif
35437 typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
35438 '
35439         else
35440           gt_revision_test_code=
35441         fi
35442         if test $gt_api_version -ge 2; then
35443           gt_expression_test_code=' + * ngettext ("", "", 0)'
35444         else
35445           gt_expression_test_code=
35446         fi
35447
35448         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5
35449 $as_echo_n "checking for GNU gettext in libc... " >&6; }
35450 if eval \${$gt_func_gnugettext_libc+:} false; then :
35451   $as_echo_n "(cached) " >&6
35452 else
35453   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35454 /* end confdefs.h.  */
35455
35456 #include <libintl.h>
35457 $gt_revision_test_code
35458 extern int _nl_msg_cat_cntr;
35459 extern int *_nl_domain_bindings;
35460
35461 int
35462 main ()
35463 {
35464
35465 bindtextdomain ("", "");
35466 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings
35467
35468   ;
35469   return 0;
35470 }
35471 _ACEOF
35472 if ac_fn_c_try_link "$LINENO"; then :
35473   eval "$gt_func_gnugettext_libc=yes"
35474 else
35475   eval "$gt_func_gnugettext_libc=no"
35476 fi
35477 rm -f core conftest.err conftest.$ac_objext \
35478     conftest$ac_exeext conftest.$ac_ext
35479 fi
35480 eval ac_res=\$$gt_func_gnugettext_libc
35481                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
35482 $as_echo "$ac_res" >&6; }
35483
35484         if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
35485
35486
35487
35488
35489
35490           am_save_CPPFLAGS="$CPPFLAGS"
35491
35492   for element in $INCICONV; do
35493     haveit=
35494     for x in $CPPFLAGS; do
35495
35496   acl_save_prefix="$prefix"
35497   prefix="$acl_final_prefix"
35498   acl_save_exec_prefix="$exec_prefix"
35499   exec_prefix="$acl_final_exec_prefix"
35500   eval x=\"$x\"
35501   exec_prefix="$acl_save_exec_prefix"
35502   prefix="$acl_save_prefix"
35503
35504       if test "X$x" = "X$element"; then
35505         haveit=yes
35506         break
35507       fi
35508     done
35509     if test -z "$haveit"; then
35510       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
35511     fi
35512   done
35513
35514
35515   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
35516 $as_echo_n "checking for iconv... " >&6; }
35517 if ${am_cv_func_iconv+:} false; then :
35518   $as_echo_n "(cached) " >&6
35519 else
35520
35521     am_cv_func_iconv="no, consider installing GNU libiconv"
35522     am_cv_lib_iconv=no
35523     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35524 /* end confdefs.h.  */
35525
35526 #include <stdlib.h>
35527 #include <iconv.h>
35528
35529 int
35530 main ()
35531 {
35532 iconv_t cd = iconv_open("","");
35533            iconv(cd,NULL,NULL,NULL,NULL);
35534            iconv_close(cd);
35535   ;
35536   return 0;
35537 }
35538 _ACEOF
35539 if ac_fn_c_try_link "$LINENO"; then :
35540   am_cv_func_iconv=yes
35541 fi
35542 rm -f core conftest.err conftest.$ac_objext \
35543     conftest$ac_exeext conftest.$ac_ext
35544     if test "$am_cv_func_iconv" != yes; then
35545       am_save_LIBS="$LIBS"
35546       LIBS="$LIBS $LIBICONV"
35547       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35548 /* end confdefs.h.  */
35549
35550 #include <stdlib.h>
35551 #include <iconv.h>
35552
35553 int
35554 main ()
35555 {
35556 iconv_t cd = iconv_open("","");
35557              iconv(cd,NULL,NULL,NULL,NULL);
35558              iconv_close(cd);
35559   ;
35560   return 0;
35561 }
35562 _ACEOF
35563 if ac_fn_c_try_link "$LINENO"; then :
35564   am_cv_lib_iconv=yes
35565         am_cv_func_iconv=yes
35566 fi
35567 rm -f core conftest.err conftest.$ac_objext \
35568     conftest$ac_exeext conftest.$ac_ext
35569       LIBS="$am_save_LIBS"
35570     fi
35571
35572 fi
35573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
35574 $as_echo "$am_cv_func_iconv" >&6; }
35575   if test "$am_cv_func_iconv" = yes; then
35576     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
35577 $as_echo_n "checking for working iconv... " >&6; }
35578 if ${am_cv_func_iconv_works+:} false; then :
35579   $as_echo_n "(cached) " >&6
35580 else
35581
35582                   am_save_LIBS="$LIBS"
35583       if test $am_cv_lib_iconv = yes; then
35584         LIBS="$LIBS $LIBICONV"
35585       fi
35586       if test "$cross_compiling" = yes; then :
35587
35588          case "$host_os" in
35589            aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
35590            *)            am_cv_func_iconv_works="guessing yes" ;;
35591          esac
35592
35593 else
35594   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35595 /* end confdefs.h.  */
35596
35597 #include <iconv.h>
35598 #include <string.h>
35599 int main ()
35600 {
35601   int result = 0;
35602   /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
35603      returns.  */
35604   {
35605     iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
35606     if (cd_utf8_to_88591 != (iconv_t)(-1))
35607       {
35608         static const char input[] = "\342\202\254"; /* EURO SIGN */
35609         char buf[10];
35610         const char *inptr = input;
35611         size_t inbytesleft = strlen (input);
35612         char *outptr = buf;
35613         size_t outbytesleft = sizeof (buf);
35614         size_t res = iconv (cd_utf8_to_88591,
35615                             (char **) &inptr, &inbytesleft,
35616                             &outptr, &outbytesleft);
35617         if (res == 0)
35618           result |= 1;
35619         iconv_close (cd_utf8_to_88591);
35620       }
35621   }
35622   /* Test against Solaris 10 bug: Failures are not distinguishable from
35623      successful returns.  */
35624   {
35625     iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
35626     if (cd_ascii_to_88591 != (iconv_t)(-1))
35627       {
35628         static const char input[] = "\263";
35629         char buf[10];
35630         const char *inptr = input;
35631         size_t inbytesleft = strlen (input);
35632         char *outptr = buf;
35633         size_t outbytesleft = sizeof (buf);
35634         size_t res = iconv (cd_ascii_to_88591,
35635                             (char **) &inptr, &inbytesleft,
35636                             &outptr, &outbytesleft);
35637         if (res == 0)
35638           result |= 2;
35639         iconv_close (cd_ascii_to_88591);
35640       }
35641   }
35642   /* Test against AIX 6.1..7.1 bug: Buffer overrun.  */
35643   {
35644     iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
35645     if (cd_88591_to_utf8 != (iconv_t)(-1))
35646       {
35647         static const char input[] = "\304";
35648         static char buf[2] = { (char)0xDE, (char)0xAD };
35649         const char *inptr = input;
35650         size_t inbytesleft = 1;
35651         char *outptr = buf;
35652         size_t outbytesleft = 1;
35653         size_t res = iconv (cd_88591_to_utf8,
35654                             (char **) &inptr, &inbytesleft,
35655                             &outptr, &outbytesleft);
35656         if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
35657           result |= 4;
35658         iconv_close (cd_88591_to_utf8);
35659       }
35660   }
35661 #if 0 /* This bug could be worked around by the caller.  */
35662   /* Test against HP-UX 11.11 bug: Positive return value instead of 0.  */
35663   {
35664     iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
35665     if (cd_88591_to_utf8 != (iconv_t)(-1))
35666       {
35667         static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
35668         char buf[50];
35669         const char *inptr = input;
35670         size_t inbytesleft = strlen (input);
35671         char *outptr = buf;
35672         size_t outbytesleft = sizeof (buf);
35673         size_t res = iconv (cd_88591_to_utf8,
35674                             (char **) &inptr, &inbytesleft,
35675                             &outptr, &outbytesleft);
35676         if ((int)res > 0)
35677           result |= 8;
35678         iconv_close (cd_88591_to_utf8);
35679       }
35680   }
35681 #endif
35682   /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
35683      provided.  */
35684   if (/* Try standardized names.  */
35685       iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
35686       /* Try IRIX, OSF/1 names.  */
35687       && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
35688       /* Try AIX names.  */
35689       && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
35690       /* Try HP-UX names.  */
35691       && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
35692     result |= 16;
35693   return result;
35694 }
35695 _ACEOF
35696 if ac_fn_c_try_run "$LINENO"; then :
35697   am_cv_func_iconv_works=yes
35698 else
35699   am_cv_func_iconv_works=no
35700 fi
35701 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35702   conftest.$ac_objext conftest.beam conftest.$ac_ext
35703 fi
35704
35705       LIBS="$am_save_LIBS"
35706
35707 fi
35708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
35709 $as_echo "$am_cv_func_iconv_works" >&6; }
35710     case "$am_cv_func_iconv_works" in
35711       *no) am_func_iconv=no am_cv_lib_iconv=no ;;
35712       *)   am_func_iconv=yes ;;
35713     esac
35714   else
35715     am_func_iconv=no am_cv_lib_iconv=no
35716   fi
35717   if test "$am_func_iconv" = yes; then
35718
35719 $as_echo "#define HAVE_ICONV 1" >>confdefs.h
35720
35721   fi
35722   if test "$am_cv_lib_iconv" = yes; then
35723     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
35724 $as_echo_n "checking how to link with libiconv... " >&6; }
35725     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
35726 $as_echo "$LIBICONV" >&6; }
35727   else
35728             CPPFLAGS="$am_save_CPPFLAGS"
35729     LIBICONV=
35730     LTLIBICONV=
35731   fi
35732
35733
35734
35735
35736
35737
35738
35739
35740
35741
35742
35743     use_additional=yes
35744
35745   acl_save_prefix="$prefix"
35746   prefix="$acl_final_prefix"
35747   acl_save_exec_prefix="$exec_prefix"
35748   exec_prefix="$acl_final_exec_prefix"
35749
35750     eval additional_includedir=\"$includedir\"
35751     eval additional_libdir=\"$libdir\"
35752
35753   exec_prefix="$acl_save_exec_prefix"
35754   prefix="$acl_save_prefix"
35755
35756
35757 # Check whether --with-libintl-prefix was given.
35758 if test "${with_libintl_prefix+set}" = set; then :
35759   withval=$with_libintl_prefix;
35760     if test "X$withval" = "Xno"; then
35761       use_additional=no
35762     else
35763       if test "X$withval" = "X"; then
35764
35765   acl_save_prefix="$prefix"
35766   prefix="$acl_final_prefix"
35767   acl_save_exec_prefix="$exec_prefix"
35768   exec_prefix="$acl_final_exec_prefix"
35769
35770           eval additional_includedir=\"$includedir\"
35771           eval additional_libdir=\"$libdir\"
35772
35773   exec_prefix="$acl_save_exec_prefix"
35774   prefix="$acl_save_prefix"
35775
35776       else
35777         additional_includedir="$withval/include"
35778         additional_libdir="$withval/$acl_libdirstem"
35779         if test "$acl_libdirstem2" != "$acl_libdirstem" \
35780            && ! test -d "$withval/$acl_libdirstem"; then
35781           additional_libdir="$withval/$acl_libdirstem2"
35782         fi
35783       fi
35784     fi
35785
35786 fi
35787
35788       LIBINTL=
35789   LTLIBINTL=
35790   INCINTL=
35791   LIBINTL_PREFIX=
35792       HAVE_LIBINTL=
35793   rpathdirs=
35794   ltrpathdirs=
35795   names_already_handled=
35796   names_next_round='intl '
35797   while test -n "$names_next_round"; do
35798     names_this_round="$names_next_round"
35799     names_next_round=
35800     for name in $names_this_round; do
35801       already_handled=
35802       for n in $names_already_handled; do
35803         if test "$n" = "$name"; then
35804           already_handled=yes
35805           break
35806         fi
35807       done
35808       if test -z "$already_handled"; then
35809         names_already_handled="$names_already_handled $name"
35810                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
35811         eval value=\"\$HAVE_LIB$uppername\"
35812         if test -n "$value"; then
35813           if test "$value" = yes; then
35814             eval value=\"\$LIB$uppername\"
35815             test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value"
35816             eval value=\"\$LTLIB$uppername\"
35817             test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value"
35818           else
35819                                     :
35820           fi
35821         else
35822                               found_dir=
35823           found_la=
35824           found_so=
35825           found_a=
35826           eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
35827           if test -n "$acl_shlibext"; then
35828             shrext=".$acl_shlibext"             # typically: shrext=.so
35829           else
35830             shrext=
35831           fi
35832           if test $use_additional = yes; then
35833             dir="$additional_libdir"
35834                                     if test -n "$acl_shlibext"; then
35835               if test -f "$dir/$libname$shrext"; then
35836                 found_dir="$dir"
35837                 found_so="$dir/$libname$shrext"
35838               else
35839                 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
35840                   ver=`(cd "$dir" && \
35841                         for f in "$libname$shrext".*; do echo "$f"; done \
35842                         | sed -e "s,^$libname$shrext\\\\.,," \
35843                         | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
35844                         | sed 1q ) 2>/dev/null`
35845                   if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
35846                     found_dir="$dir"
35847                     found_so="$dir/$libname$shrext.$ver"
35848                   fi
35849                 else
35850                   eval library_names=\"$acl_library_names_spec\"
35851                   for f in $library_names; do
35852                     if test -f "$dir/$f"; then
35853                       found_dir="$dir"
35854                       found_so="$dir/$f"
35855                       break
35856                     fi
35857                   done
35858                 fi
35859               fi
35860             fi
35861                         if test "X$found_dir" = "X"; then
35862               if test -f "$dir/$libname.$acl_libext"; then
35863                 found_dir="$dir"
35864                 found_a="$dir/$libname.$acl_libext"
35865               fi
35866             fi
35867             if test "X$found_dir" != "X"; then
35868               if test -f "$dir/$libname.la"; then
35869                 found_la="$dir/$libname.la"
35870               fi
35871             fi
35872           fi
35873           if test "X$found_dir" = "X"; then
35874             for x in $LDFLAGS $LTLIBINTL; do
35875
35876   acl_save_prefix="$prefix"
35877   prefix="$acl_final_prefix"
35878   acl_save_exec_prefix="$exec_prefix"
35879   exec_prefix="$acl_final_exec_prefix"
35880   eval x=\"$x\"
35881   exec_prefix="$acl_save_exec_prefix"
35882   prefix="$acl_save_prefix"
35883
35884               case "$x" in
35885                 -L*)
35886                   dir=`echo "X$x" | sed -e 's/^X-L//'`
35887                                     if test -n "$acl_shlibext"; then
35888                     if test -f "$dir/$libname$shrext"; then
35889                       found_dir="$dir"
35890                       found_so="$dir/$libname$shrext"
35891                     else
35892                       if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
35893                         ver=`(cd "$dir" && \
35894                               for f in "$libname$shrext".*; do echo "$f"; done \
35895                               | sed -e "s,^$libname$shrext\\\\.,," \
35896                               | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
35897                               | sed 1q ) 2>/dev/null`
35898                         if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
35899                           found_dir="$dir"
35900                           found_so="$dir/$libname$shrext.$ver"
35901                         fi
35902                       else
35903                         eval library_names=\"$acl_library_names_spec\"
35904                         for f in $library_names; do
35905                           if test -f "$dir/$f"; then
35906                             found_dir="$dir"
35907                             found_so="$dir/$f"
35908                             break
35909                           fi
35910                         done
35911                       fi
35912                     fi
35913                   fi
35914                                     if test "X$found_dir" = "X"; then
35915                     if test -f "$dir/$libname.$acl_libext"; then
35916                       found_dir="$dir"
35917                       found_a="$dir/$libname.$acl_libext"
35918                     fi
35919                   fi
35920                   if test "X$found_dir" != "X"; then
35921                     if test -f "$dir/$libname.la"; then
35922                       found_la="$dir/$libname.la"
35923                     fi
35924                   fi
35925                   ;;
35926               esac
35927               if test "X$found_dir" != "X"; then
35928                 break
35929               fi
35930             done
35931           fi
35932           if test "X$found_dir" != "X"; then
35933                         LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name"
35934             if test "X$found_so" != "X"; then
35935                                                         if test "$enable_rpath" = no \
35936                  || test "X$found_dir" = "X/usr/$acl_libdirstem" \
35937                  || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
35938                                 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
35939               else
35940                                                                                 haveit=
35941                 for x in $ltrpathdirs; do
35942                   if test "X$x" = "X$found_dir"; then
35943                     haveit=yes
35944                     break
35945                   fi
35946                 done
35947                 if test -z "$haveit"; then
35948                   ltrpathdirs="$ltrpathdirs $found_dir"
35949                 fi
35950                                 if test "$acl_hardcode_direct" = yes; then
35951                                                       LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
35952                 else
35953                   if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
35954                                                             LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
35955                                                             haveit=
35956                     for x in $rpathdirs; do
35957                       if test "X$x" = "X$found_dir"; then
35958                         haveit=yes
35959                         break
35960                       fi
35961                     done
35962                     if test -z "$haveit"; then
35963                       rpathdirs="$rpathdirs $found_dir"
35964                     fi
35965                   else
35966                                                                                 haveit=
35967                     for x in $LDFLAGS $LIBINTL; do
35968
35969   acl_save_prefix="$prefix"
35970   prefix="$acl_final_prefix"
35971   acl_save_exec_prefix="$exec_prefix"
35972   exec_prefix="$acl_final_exec_prefix"
35973   eval x=\"$x\"
35974   exec_prefix="$acl_save_exec_prefix"
35975   prefix="$acl_save_prefix"
35976
35977                       if test "X$x" = "X-L$found_dir"; then
35978                         haveit=yes
35979                         break
35980                       fi
35981                     done
35982                     if test -z "$haveit"; then
35983                       LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir"
35984                     fi
35985                     if test "$acl_hardcode_minus_L" != no; then
35986                                                                                         LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
35987                     else
35988                                                                                                                                                                                 LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
35989                     fi
35990                   fi
35991                 fi
35992               fi
35993             else
35994               if test "X$found_a" != "X"; then
35995                                 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a"
35996               else
35997                                                 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name"
35998               fi
35999             fi
36000                         additional_includedir=
36001             case "$found_dir" in
36002               */$acl_libdirstem | */$acl_libdirstem/)
36003                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
36004                 if test "$name" = 'intl'; then
36005                   LIBINTL_PREFIX="$basedir"
36006                 fi
36007                 additional_includedir="$basedir/include"
36008                 ;;
36009               */$acl_libdirstem2 | */$acl_libdirstem2/)
36010                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
36011                 if test "$name" = 'intl'; then
36012                   LIBINTL_PREFIX="$basedir"
36013                 fi
36014                 additional_includedir="$basedir/include"
36015                 ;;
36016             esac
36017             if test "X$additional_includedir" != "X"; then
36018                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
36019                 haveit=
36020                 if test "X$additional_includedir" = "X/usr/local/include"; then
36021                   if test -n "$GCC"; then
36022                     case $host_os in
36023                       linux* | gnu* | k*bsd*-gnu) haveit=yes;;
36024                     esac
36025                   fi
36026                 fi
36027                 if test -z "$haveit"; then
36028                   for x in $CPPFLAGS $INCINTL; do
36029
36030   acl_save_prefix="$prefix"
36031   prefix="$acl_final_prefix"
36032   acl_save_exec_prefix="$exec_prefix"
36033   exec_prefix="$acl_final_exec_prefix"
36034   eval x=\"$x\"
36035   exec_prefix="$acl_save_exec_prefix"
36036   prefix="$acl_save_prefix"
36037
36038                     if test "X$x" = "X-I$additional_includedir"; then
36039                       haveit=yes
36040                       break
36041                     fi
36042                   done
36043                   if test -z "$haveit"; then
36044                     if test -d "$additional_includedir"; then
36045                                             INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir"
36046                     fi
36047                   fi
36048                 fi
36049               fi
36050             fi
36051                         if test -n "$found_la"; then
36052                                                         save_libdir="$libdir"
36053               case "$found_la" in
36054                 */* | *\\*) . "$found_la" ;;
36055                 *) . "./$found_la" ;;
36056               esac
36057               libdir="$save_libdir"
36058                             for dep in $dependency_libs; do
36059                 case "$dep" in
36060                   -L*)
36061                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
36062                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
36063                        && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
36064                       haveit=
36065                       if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
36066                          || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
36067                         if test -n "$GCC"; then
36068                           case $host_os in
36069                             linux* | gnu* | k*bsd*-gnu) haveit=yes;;
36070                           esac
36071                         fi
36072                       fi
36073                       if test -z "$haveit"; then
36074                         haveit=
36075                         for x in $LDFLAGS $LIBINTL; do
36076
36077   acl_save_prefix="$prefix"
36078   prefix="$acl_final_prefix"
36079   acl_save_exec_prefix="$exec_prefix"
36080   exec_prefix="$acl_final_exec_prefix"
36081   eval x=\"$x\"
36082   exec_prefix="$acl_save_exec_prefix"
36083   prefix="$acl_save_prefix"
36084
36085                           if test "X$x" = "X-L$additional_libdir"; then
36086                             haveit=yes
36087                             break
36088                           fi
36089                         done
36090                         if test -z "$haveit"; then
36091                           if test -d "$additional_libdir"; then
36092                                                         LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir"
36093                           fi
36094                         fi
36095                         haveit=
36096                         for x in $LDFLAGS $LTLIBINTL; do
36097
36098   acl_save_prefix="$prefix"
36099   prefix="$acl_final_prefix"
36100   acl_save_exec_prefix="$exec_prefix"
36101   exec_prefix="$acl_final_exec_prefix"
36102   eval x=\"$x\"
36103   exec_prefix="$acl_save_exec_prefix"
36104   prefix="$acl_save_prefix"
36105
36106                           if test "X$x" = "X-L$additional_libdir"; then
36107                             haveit=yes
36108                             break
36109                           fi
36110                         done
36111                         if test -z "$haveit"; then
36112                           if test -d "$additional_libdir"; then
36113                                                         LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir"
36114                           fi
36115                         fi
36116                       fi
36117                     fi
36118                     ;;
36119                   -R*)
36120                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
36121                     if test "$enable_rpath" != no; then
36122                                                                   haveit=
36123                       for x in $rpathdirs; do
36124                         if test "X$x" = "X$dir"; then
36125                           haveit=yes
36126                           break
36127                         fi
36128                       done
36129                       if test -z "$haveit"; then
36130                         rpathdirs="$rpathdirs $dir"
36131                       fi
36132                                                                   haveit=
36133                       for x in $ltrpathdirs; do
36134                         if test "X$x" = "X$dir"; then
36135                           haveit=yes
36136                           break
36137                         fi
36138                       done
36139                       if test -z "$haveit"; then
36140                         ltrpathdirs="$ltrpathdirs $dir"
36141                       fi
36142                     fi
36143                     ;;
36144                   -l*)
36145                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
36146                     ;;
36147                   *.la)
36148                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
36149                     ;;
36150                   *)
36151                                         LIBINTL="${LIBINTL}${LIBINTL:+ }$dep"
36152                     LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep"
36153                     ;;
36154                 esac
36155               done
36156             fi
36157           else
36158                                                             LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
36159             LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name"
36160           fi
36161         fi
36162       fi
36163     done
36164   done
36165   if test "X$rpathdirs" != "X"; then
36166     if test -n "$acl_hardcode_libdir_separator"; then
36167                         alldirs=
36168       for found_dir in $rpathdirs; do
36169         alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
36170       done
36171             acl_save_libdir="$libdir"
36172       libdir="$alldirs"
36173       eval flag=\"$acl_hardcode_libdir_flag_spec\"
36174       libdir="$acl_save_libdir"
36175       LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
36176     else
36177             for found_dir in $rpathdirs; do
36178         acl_save_libdir="$libdir"
36179         libdir="$found_dir"
36180         eval flag=\"$acl_hardcode_libdir_flag_spec\"
36181         libdir="$acl_save_libdir"
36182         LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
36183       done
36184     fi
36185   fi
36186   if test "X$ltrpathdirs" != "X"; then
36187             for found_dir in $ltrpathdirs; do
36188       LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir"
36189     done
36190   fi
36191
36192
36193
36194
36195
36196
36197           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5
36198 $as_echo_n "checking for GNU gettext in libintl... " >&6; }
36199 if eval \${$gt_func_gnugettext_libintl+:} false; then :
36200   $as_echo_n "(cached) " >&6
36201 else
36202   gt_save_CPPFLAGS="$CPPFLAGS"
36203             CPPFLAGS="$CPPFLAGS $INCINTL"
36204             gt_save_LIBS="$LIBS"
36205             LIBS="$LIBS $LIBINTL"
36206                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36207 /* end confdefs.h.  */
36208
36209 #include <libintl.h>
36210 $gt_revision_test_code
36211 extern int _nl_msg_cat_cntr;
36212 extern
36213 #ifdef __cplusplus
36214 "C"
36215 #endif
36216 const char *_nl_expand_alias (const char *);
36217
36218 int
36219 main ()
36220 {
36221
36222 bindtextdomain ("", "");
36223 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
36224
36225   ;
36226   return 0;
36227 }
36228 _ACEOF
36229 if ac_fn_c_try_link "$LINENO"; then :
36230   eval "$gt_func_gnugettext_libintl=yes"
36231 else
36232   eval "$gt_func_gnugettext_libintl=no"
36233 fi
36234 rm -f core conftest.err conftest.$ac_objext \
36235     conftest$ac_exeext conftest.$ac_ext
36236                         if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
36237               LIBS="$LIBS $LIBICONV"
36238               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36239 /* end confdefs.h.  */
36240
36241 #include <libintl.h>
36242 $gt_revision_test_code
36243 extern int _nl_msg_cat_cntr;
36244 extern
36245 #ifdef __cplusplus
36246 "C"
36247 #endif
36248 const char *_nl_expand_alias (const char *);
36249
36250 int
36251 main ()
36252 {
36253
36254 bindtextdomain ("", "");
36255 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
36256
36257   ;
36258   return 0;
36259 }
36260 _ACEOF
36261 if ac_fn_c_try_link "$LINENO"; then :
36262   LIBINTL="$LIBINTL $LIBICONV"
36263                  LTLIBINTL="$LTLIBINTL $LTLIBICONV"
36264                  eval "$gt_func_gnugettext_libintl=yes"
36265
36266 fi
36267 rm -f core conftest.err conftest.$ac_objext \
36268     conftest$ac_exeext conftest.$ac_ext
36269             fi
36270             CPPFLAGS="$gt_save_CPPFLAGS"
36271             LIBS="$gt_save_LIBS"
36272 fi
36273 eval ac_res=\$$gt_func_gnugettext_libintl
36274                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
36275 $as_echo "$ac_res" >&6; }
36276         fi
36277
36278                                         if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
36279            || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
36280                 && test "$PACKAGE" != gettext-runtime \
36281                 && test "$PACKAGE" != gettext-tools; }; then
36282           gt_use_preinstalled_gnugettext=yes
36283         else
36284                     LIBINTL=
36285           LTLIBINTL=
36286           INCINTL=
36287         fi
36288
36289
36290
36291     if test -n "$INTL_MACOSX_LIBS"; then
36292       if test "$gt_use_preinstalled_gnugettext" = "yes" \
36293          || test "$nls_cv_use_gnu_gettext" = "yes"; then
36294                 LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
36295         LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
36296       fi
36297     fi
36298
36299     if test "$gt_use_preinstalled_gnugettext" = "yes" \
36300        || test "$nls_cv_use_gnu_gettext" = "yes"; then
36301
36302 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
36303
36304     else
36305       USE_NLS=no
36306     fi
36307   fi
36308
36309   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5
36310 $as_echo_n "checking whether to use NLS... " >&6; }
36311   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
36312 $as_echo "$USE_NLS" >&6; }
36313   if test "$USE_NLS" = "yes"; then
36314     { $as_echo "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5
36315 $as_echo_n "checking where the gettext function comes from... " >&6; }
36316     if test "$gt_use_preinstalled_gnugettext" = "yes"; then
36317       if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
36318         gt_source="external libintl"
36319       else
36320         gt_source="libc"
36321       fi
36322     else
36323       gt_source="included intl directory"
36324     fi
36325     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5
36326 $as_echo "$gt_source" >&6; }
36327   fi
36328
36329   if test "$USE_NLS" = "yes"; then
36330
36331     if test "$gt_use_preinstalled_gnugettext" = "yes"; then
36332       if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
36333         { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5
36334 $as_echo_n "checking how to link with libintl... " >&6; }
36335         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5
36336 $as_echo "$LIBINTL" >&6; }
36337
36338   for element in $INCINTL; do
36339     haveit=
36340     for x in $CPPFLAGS; do
36341
36342   acl_save_prefix="$prefix"
36343   prefix="$acl_final_prefix"
36344   acl_save_exec_prefix="$exec_prefix"
36345   exec_prefix="$acl_final_exec_prefix"
36346   eval x=\"$x\"
36347   exec_prefix="$acl_save_exec_prefix"
36348   prefix="$acl_save_prefix"
36349
36350       if test "X$x" = "X$element"; then
36351         haveit=yes
36352         break
36353       fi
36354     done
36355     if test -z "$haveit"; then
36356       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
36357     fi
36358   done
36359
36360       fi
36361
36362
36363 $as_echo "#define HAVE_GETTEXT 1" >>confdefs.h
36364
36365
36366 $as_echo "#define HAVE_DCGETTEXT 1" >>confdefs.h
36367
36368     fi
36369
36370         POSUB=po
36371   fi
36372
36373
36374
36375     INTLLIBS="$LIBINTL"
36376
36377
36378
36379
36380
36381
36382
36383
36384 # Initialize the test suite.
36385 ac_config_commands="$ac_config_commands tests/atconfig"
36386
36387 ac_config_files="$ac_config_files tests/Makefile tests/atlocal"
36388  # FIXME: tests/preset?
36389
36390 AUTOM4TE=${AUTOM4TE-"${am_missing_run}autom4te"}
36391
36392
36393
36394
36395 # Check whether --enable-backup-scripts was given.
36396 if test "${enable_backup_scripts+set}" = set; then :
36397   enableval=$enable_backup_scripts; case $enableval in
36398                yes) BACKUP_LIBEXEC_SCRIPTS='$(BACKUP_LIBEXEC_SCRIPTS_LIST)'
36399                     BACKUP_SBIN_SCRIPTS='$(BACKUP_SBIN_SCRIPTS_LIST)'
36400                     ;;
36401                esac
36402 fi
36403
36404
36405
36406 if date +%Y-%m-%d 2>/dev/null >&2; then
36407         BACKUP_SED_COND='/^\#ELSE_DATE_FORMAT_OK/,/^\#ENDIF_DATE_FORMAT_OK/d;/^\#IF_DATE_FORMAT_OK/d'
36408 else
36409         BACKUP_SED_COND='/^\#IF_DATE_FORMAT_OK/,/^\#ELSE_DATE_FORMAT_OK/d;/^\#ENDIF_DATE_FORMAT_OK/d'
36410 fi
36411
36412 ac_config_files="$ac_config_files Makefile doc/Makefile gnu/Makefile lib/Makefile po/Makefile.in scripts/Makefile rmt/Makefile src/Makefile"
36413
36414 cat >confcache <<\_ACEOF
36415 # This file is a shell script that caches the results of configure
36416 # tests run on this system so they can be shared between configure
36417 # scripts and configure runs, see configure's option --config-cache.
36418 # It is not useful on other systems.  If it contains results you don't
36419 # want to keep, you may remove or edit it.
36420 #
36421 # config.status only pays attention to the cache file if you give it
36422 # the --recheck option to rerun configure.
36423 #
36424 # `ac_cv_env_foo' variables (set or unset) will be overridden when
36425 # loading this file, other *unset* `ac_cv_foo' will be assigned the
36426 # following values.
36427
36428 _ACEOF
36429
36430 # The following way of writing the cache mishandles newlines in values,
36431 # but we know of no workaround that is simple, portable, and efficient.
36432 # So, we kill variables containing newlines.
36433 # Ultrix sh set writes to stderr and can't be redirected directly,
36434 # and sets the high bit in the cache file unless we assign to the vars.
36435 (
36436   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
36437     eval ac_val=\$$ac_var
36438     case $ac_val in #(
36439     *${as_nl}*)
36440       case $ac_var in #(
36441       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
36442 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
36443       esac
36444       case $ac_var in #(
36445       _ | IFS | as_nl) ;; #(
36446       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
36447       *) { eval $ac_var=; unset $ac_var;} ;;
36448       esac ;;
36449     esac
36450   done
36451
36452   (set) 2>&1 |
36453     case $as_nl`(ac_space=' '; set) 2>&1` in #(
36454     *${as_nl}ac_space=\ *)
36455       # `set' does not quote correctly, so add quotes: double-quote
36456       # substitution turns \\\\ into \\, and sed turns \\ into \.
36457       sed -n \
36458         "s/'/'\\\\''/g;
36459           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
36460       ;; #(
36461     *)
36462       # `set' quotes correctly as required by POSIX, so do not add quotes.
36463       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
36464       ;;
36465     esac |
36466     sort
36467 ) |
36468   sed '
36469      /^ac_cv_env_/b end
36470      t clear
36471      :clear
36472      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
36473      t end
36474      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
36475      :end' >>confcache
36476 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
36477   if test -w "$cache_file"; then
36478     if test "x$cache_file" != "x/dev/null"; then
36479       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
36480 $as_echo "$as_me: updating cache $cache_file" >&6;}
36481       if test ! -f "$cache_file" || test -h "$cache_file"; then
36482         cat confcache >"$cache_file"
36483       else
36484         case $cache_file in #(
36485         */* | ?:*)
36486           mv -f confcache "$cache_file"$$ &&
36487           mv -f "$cache_file"$$ "$cache_file" ;; #(
36488         *)
36489           mv -f confcache "$cache_file" ;;
36490         esac
36491       fi
36492     fi
36493   else
36494     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
36495 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
36496   fi
36497 fi
36498 rm -f confcache
36499
36500 test "x$prefix" = xNONE && prefix=$ac_default_prefix
36501 # Let make expand exec_prefix.
36502 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
36503
36504 DEFS=-DHAVE_CONFIG_H
36505
36506 ac_libobjs=
36507 ac_ltlibobjs=
36508 U=
36509 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
36510   # 1. Remove the extension, and $U if already installed.
36511   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
36512   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
36513   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
36514   #    will be set to the directory where LIBOBJS objects are built.
36515   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
36516   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
36517 done
36518 LIBOBJS=$ac_libobjs
36519
36520 LTLIBOBJS=$ac_ltlibobjs
36521
36522
36523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
36524 $as_echo_n "checking that generated files are newer than configure... " >&6; }
36525    if test -n "$am_sleep_pid"; then
36526      # Hide warnings about reused PIDs.
36527      wait $am_sleep_pid 2>/dev/null
36528    fi
36529    { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
36530 $as_echo "done" >&6; }
36531  if test -n "$EXEEXT"; then
36532   am__EXEEXT_TRUE=
36533   am__EXEEXT_FALSE='#'
36534 else
36535   am__EXEEXT_TRUE='#'
36536   am__EXEEXT_FALSE=
36537 fi
36538
36539 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
36540   as_fn_error $? "conditional \"AMDEP\" was never defined.
36541 Usually this means the macro was only invoked conditionally." "$LINENO" 5
36542 fi
36543 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
36544   as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
36545 Usually this means the macro was only invoked conditionally." "$LINENO" 5
36546 fi
36547 if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
36548   as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined.
36549 Usually this means the macro was only invoked conditionally." "$LINENO" 5
36550 fi
36551 if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
36552   as_fn_error $? "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
36553 Usually this means the macro was only invoked conditionally." "$LINENO" 5
36554 fi
36555 if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
36556   as_fn_error $? "conditional \"GL_GENERATE_ERRNO_H\" was never defined.
36557 Usually this means the macro was only invoked conditionally." "$LINENO" 5
36558 fi
36559 if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then
36560   as_fn_error $? "conditional \"GL_GENERATE_FLOAT_H\" was never defined.
36561 Usually this means the macro was only invoked conditionally." "$LINENO" 5
36562 fi
36563 if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then
36564   as_fn_error $? "conditional \"GL_GENERATE_FNMATCH_H\" was never defined.
36565 Usually this means the macro was only invoked conditionally." "$LINENO" 5
36566 fi
36567 if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
36568   as_fn_error $? "conditional \"GL_GENERATE_STDINT_H\" was never defined.
36569 Usually this means the macro was only invoked conditionally." "$LINENO" 5
36570 fi
36571 if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
36572   as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
36573 Usually this means the macro was only invoked conditionally." "$LINENO" 5
36574 fi
36575 if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
36576   as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
36577 Usually this means the macro was only invoked conditionally." "$LINENO" 5
36578 fi
36579 if test -z "${GL_GENERATE_SELINUX_CONTEXT_H_TRUE}" && test -z "${GL_GENERATE_SELINUX_CONTEXT_H_FALSE}"; then
36580   as_fn_error $? "conditional \"GL_GENERATE_SELINUX_CONTEXT_H\" was never defined.
36581 Usually this means the macro was only invoked conditionally." "$LINENO" 5
36582 fi
36583 if test -z "${GL_GENERATE_STDALIGN_H_TRUE}" && test -z "${GL_GENERATE_STDALIGN_H_FALSE}"; then
36584   as_fn_error $? "conditional \"GL_GENERATE_STDALIGN_H\" was never defined.
36585 Usually this means the macro was only invoked conditionally." "$LINENO" 5
36586 fi
36587 if test -z "${GL_GENERATE_STDARG_H_TRUE}" && test -z "${GL_GENERATE_STDARG_H_FALSE}"; then
36588   as_fn_error $? "conditional \"GL_GENERATE_STDARG_H\" was never defined.
36589 Usually this means the macro was only invoked conditionally." "$LINENO" 5
36590 fi
36591 if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
36592   as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
36593 Usually this means the macro was only invoked conditionally." "$LINENO" 5
36594 fi
36595 if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
36596   as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
36597 Usually this means the macro was only invoked conditionally." "$LINENO" 5
36598 fi
36599 if test -z "${GL_GENERATE_SYSEXITS_H_TRUE}" && test -z "${GL_GENERATE_SYSEXITS_H_FALSE}"; then
36600   as_fn_error $? "conditional \"GL_GENERATE_SYSEXITS_H\" was never defined.
36601 Usually this means the macro was only invoked conditionally." "$LINENO" 5
36602 fi
36603 if test -z "${LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE}"; then
36604   as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH\" was never defined.
36605 Usually this means the macro was only invoked conditionally." "$LINENO" 5
36606 fi
36607
36608
36609     gl_libobjs=
36610     gl_ltlibobjs=
36611     if test -n "$gl_LIBOBJS"; then
36612       # Remove the extension.
36613       sed_drop_objext='s/\.o$//;s/\.obj$//'
36614       for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
36615         gl_libobjs="$gl_libobjs $i.$ac_objext"
36616         gl_ltlibobjs="$gl_ltlibobjs $i.lo"
36617       done
36618     fi
36619     gl_LIBOBJS=$gl_libobjs
36620
36621     gl_LTLIBOBJS=$gl_ltlibobjs
36622
36623
36624
36625     gltests_libobjs=
36626     gltests_ltlibobjs=
36627     if test -n "$gltests_LIBOBJS"; then
36628       # Remove the extension.
36629       sed_drop_objext='s/\.o$//;s/\.obj$//'
36630       for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
36631         gltests_libobjs="$gltests_libobjs $i.$ac_objext"
36632         gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
36633       done
36634     fi
36635     gltests_LIBOBJS=$gltests_libobjs
36636
36637     gltests_LTLIBOBJS=$gltests_ltlibobjs
36638
36639
36640 if test -z "${TAR_COND_XATTR_H_TRUE}" && test -z "${TAR_COND_XATTR_H_FALSE}"; then
36641   as_fn_error $? "conditional \"TAR_COND_XATTR_H\" was never defined.
36642 Usually this means the macro was only invoked conditionally." "$LINENO" 5
36643 fi
36644
36645 : "${CONFIG_STATUS=./config.status}"
36646 ac_write_fail=0
36647 ac_clean_files_save=$ac_clean_files
36648 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
36649 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
36650 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
36651 as_write_fail=0
36652 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
36653 #! $SHELL
36654 # Generated by $as_me.
36655 # Run this file to recreate the current configuration.
36656 # Compiler output produced by configure, useful for debugging
36657 # configure, is in config.log if it exists.
36658
36659 debug=false
36660 ac_cs_recheck=false
36661 ac_cs_silent=false
36662
36663 SHELL=\${CONFIG_SHELL-$SHELL}
36664 export SHELL
36665 _ASEOF
36666 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
36667 ## -------------------- ##
36668 ## M4sh Initialization. ##
36669 ## -------------------- ##
36670
36671 # Be more Bourne compatible
36672 DUALCASE=1; export DUALCASE # for MKS sh
36673 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
36674   emulate sh
36675   NULLCMD=:
36676   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
36677   # is contrary to our usage.  Disable this feature.
36678   alias -g '${1+"$@"}'='"$@"'
36679   setopt NO_GLOB_SUBST
36680 else
36681   case `(set -o) 2>/dev/null` in #(
36682   *posix*) :
36683     set -o posix ;; #(
36684   *) :
36685      ;;
36686 esac
36687 fi
36688
36689
36690 as_nl='
36691 '
36692 export as_nl
36693 # Printing a long string crashes Solaris 7 /usr/bin/printf.
36694 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
36695 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
36696 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
36697 # Prefer a ksh shell builtin over an external printf program on Solaris,
36698 # but without wasting forks for bash or zsh.
36699 if test -z "$BASH_VERSION$ZSH_VERSION" \
36700     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
36701   as_echo='print -r --'
36702   as_echo_n='print -rn --'
36703 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
36704   as_echo='printf %s\n'
36705   as_echo_n='printf %s'
36706 else
36707   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
36708     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
36709     as_echo_n='/usr/ucb/echo -n'
36710   else
36711     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
36712     as_echo_n_body='eval
36713       arg=$1;
36714       case $arg in #(
36715       *"$as_nl"*)
36716         expr "X$arg" : "X\\(.*\\)$as_nl";
36717         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
36718       esac;
36719       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
36720     '
36721     export as_echo_n_body
36722     as_echo_n='sh -c $as_echo_n_body as_echo'
36723   fi
36724   export as_echo_body
36725   as_echo='sh -c $as_echo_body as_echo'
36726 fi
36727
36728 # The user is always right.
36729 if test "${PATH_SEPARATOR+set}" != set; then
36730   PATH_SEPARATOR=:
36731   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
36732     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
36733       PATH_SEPARATOR=';'
36734   }
36735 fi
36736
36737
36738 # IFS
36739 # We need space, tab and new line, in precisely that order.  Quoting is
36740 # there to prevent editors from complaining about space-tab.
36741 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
36742 # splitting by setting IFS to empty value.)
36743 IFS=" ""        $as_nl"
36744
36745 # Find who we are.  Look in the path if we contain no directory separator.
36746 as_myself=
36747 case $0 in #((
36748   *[\\/]* ) as_myself=$0 ;;
36749   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36750 for as_dir in $PATH
36751 do
36752   IFS=$as_save_IFS
36753   test -z "$as_dir" && as_dir=.
36754     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
36755   done
36756 IFS=$as_save_IFS
36757
36758      ;;
36759 esac
36760 # We did not find ourselves, most probably we were run as `sh COMMAND'
36761 # in which case we are not to be found in the path.
36762 if test "x$as_myself" = x; then
36763   as_myself=$0
36764 fi
36765 if test ! -f "$as_myself"; then
36766   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
36767   exit 1
36768 fi
36769
36770 # Unset variables that we do not need and which cause bugs (e.g. in
36771 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
36772 # suppresses any "Segmentation fault" message there.  '((' could
36773 # trigger a bug in pdksh 5.2.14.
36774 for as_var in BASH_ENV ENV MAIL MAILPATH
36775 do eval test x\${$as_var+set} = xset \
36776   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
36777 done
36778 PS1='$ '
36779 PS2='> '
36780 PS4='+ '
36781
36782 # NLS nuisances.
36783 LC_ALL=C
36784 export LC_ALL
36785 LANGUAGE=C
36786 export LANGUAGE
36787
36788 # CDPATH.
36789 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
36790
36791
36792 # as_fn_error STATUS ERROR [LINENO LOG_FD]
36793 # ----------------------------------------
36794 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
36795 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
36796 # script with STATUS, using 1 if that was 0.
36797 as_fn_error ()
36798 {
36799   as_status=$1; test $as_status -eq 0 && as_status=1
36800   if test "$4"; then
36801     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
36802     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
36803   fi
36804   $as_echo "$as_me: error: $2" >&2
36805   as_fn_exit $as_status
36806 } # as_fn_error
36807
36808
36809 # as_fn_set_status STATUS
36810 # -----------------------
36811 # Set $? to STATUS, without forking.
36812 as_fn_set_status ()
36813 {
36814   return $1
36815 } # as_fn_set_status
36816
36817 # as_fn_exit STATUS
36818 # -----------------
36819 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
36820 as_fn_exit ()
36821 {
36822   set +e
36823   as_fn_set_status $1
36824   exit $1
36825 } # as_fn_exit
36826
36827 # as_fn_unset VAR
36828 # ---------------
36829 # Portably unset VAR.
36830 as_fn_unset ()
36831 {
36832   { eval $1=; unset $1;}
36833 }
36834 as_unset=as_fn_unset
36835 # as_fn_append VAR VALUE
36836 # ----------------------
36837 # Append the text in VALUE to the end of the definition contained in VAR. Take
36838 # advantage of any shell optimizations that allow amortized linear growth over
36839 # repeated appends, instead of the typical quadratic growth present in naive
36840 # implementations.
36841 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
36842   eval 'as_fn_append ()
36843   {
36844     eval $1+=\$2
36845   }'
36846 else
36847   as_fn_append ()
36848   {
36849     eval $1=\$$1\$2
36850   }
36851 fi # as_fn_append
36852
36853 # as_fn_arith ARG...
36854 # ------------------
36855 # Perform arithmetic evaluation on the ARGs, and store the result in the
36856 # global $as_val. Take advantage of shells that can avoid forks. The arguments
36857 # must be portable across $(()) and expr.
36858 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
36859   eval 'as_fn_arith ()
36860   {
36861     as_val=$(( $* ))
36862   }'
36863 else
36864   as_fn_arith ()
36865   {
36866     as_val=`expr "$@" || test $? -eq 1`
36867   }
36868 fi # as_fn_arith
36869
36870
36871 if expr a : '\(a\)' >/dev/null 2>&1 &&
36872    test "X`expr 00001 : '.*\(...\)'`" = X001; then
36873   as_expr=expr
36874 else
36875   as_expr=false
36876 fi
36877
36878 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
36879   as_basename=basename
36880 else
36881   as_basename=false
36882 fi
36883
36884 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
36885   as_dirname=dirname
36886 else
36887   as_dirname=false
36888 fi
36889
36890 as_me=`$as_basename -- "$0" ||
36891 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
36892          X"$0" : 'X\(//\)$' \| \
36893          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
36894 $as_echo X/"$0" |
36895     sed '/^.*\/\([^/][^/]*\)\/*$/{
36896             s//\1/
36897             q
36898           }
36899           /^X\/\(\/\/\)$/{
36900             s//\1/
36901             q
36902           }
36903           /^X\/\(\/\).*/{
36904             s//\1/
36905             q
36906           }
36907           s/.*/./; q'`
36908
36909 # Avoid depending upon Character Ranges.
36910 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
36911 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
36912 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
36913 as_cr_digits='0123456789'
36914 as_cr_alnum=$as_cr_Letters$as_cr_digits
36915
36916 ECHO_C= ECHO_N= ECHO_T=
36917 case `echo -n x` in #(((((
36918 -n*)
36919   case `echo 'xy\c'` in
36920   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
36921   xy)  ECHO_C='\c';;
36922   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
36923        ECHO_T=' ';;
36924   esac;;
36925 *)
36926   ECHO_N='-n';;
36927 esac
36928
36929 rm -f conf$$ conf$$.exe conf$$.file
36930 if test -d conf$$.dir; then
36931   rm -f conf$$.dir/conf$$.file
36932 else
36933   rm -f conf$$.dir
36934   mkdir conf$$.dir 2>/dev/null
36935 fi
36936 if (echo >conf$$.file) 2>/dev/null; then
36937   if ln -s conf$$.file conf$$ 2>/dev/null; then
36938     as_ln_s='ln -s'
36939     # ... but there are two gotchas:
36940     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
36941     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
36942     # In both cases, we have to default to `cp -pR'.
36943     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
36944       as_ln_s='cp -pR'
36945   elif ln conf$$.file conf$$ 2>/dev/null; then
36946     as_ln_s=ln
36947   else
36948     as_ln_s='cp -pR'
36949   fi
36950 else
36951   as_ln_s='cp -pR'
36952 fi
36953 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
36954 rmdir conf$$.dir 2>/dev/null
36955
36956
36957 # as_fn_mkdir_p
36958 # -------------
36959 # Create "$as_dir" as a directory, including parents if necessary.
36960 as_fn_mkdir_p ()
36961 {
36962
36963   case $as_dir in #(
36964   -*) as_dir=./$as_dir;;
36965   esac
36966   test -d "$as_dir" || eval $as_mkdir_p || {
36967     as_dirs=
36968     while :; do
36969       case $as_dir in #(
36970       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
36971       *) as_qdir=$as_dir;;
36972       esac
36973       as_dirs="'$as_qdir' $as_dirs"
36974       as_dir=`$as_dirname -- "$as_dir" ||
36975 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
36976          X"$as_dir" : 'X\(//\)[^/]' \| \
36977          X"$as_dir" : 'X\(//\)$' \| \
36978          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
36979 $as_echo X"$as_dir" |
36980     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
36981             s//\1/
36982             q
36983           }
36984           /^X\(\/\/\)[^/].*/{
36985             s//\1/
36986             q
36987           }
36988           /^X\(\/\/\)$/{
36989             s//\1/
36990             q
36991           }
36992           /^X\(\/\).*/{
36993             s//\1/
36994             q
36995           }
36996           s/.*/./; q'`
36997       test -d "$as_dir" && break
36998     done
36999     test -z "$as_dirs" || eval "mkdir $as_dirs"
37000   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
37001
37002
37003 } # as_fn_mkdir_p
37004 if mkdir -p . 2>/dev/null; then
37005   as_mkdir_p='mkdir -p "$as_dir"'
37006 else
37007   test -d ./-p && rmdir ./-p
37008   as_mkdir_p=false
37009 fi
37010
37011
37012 # as_fn_executable_p FILE
37013 # -----------------------
37014 # Test if FILE is an executable regular file.
37015 as_fn_executable_p ()
37016 {
37017   test -f "$1" && test -x "$1"
37018 } # as_fn_executable_p
37019 as_test_x='test -x'
37020 as_executable_p=as_fn_executable_p
37021
37022 # Sed expression to map a string onto a valid CPP name.
37023 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
37024
37025 # Sed expression to map a string onto a valid variable name.
37026 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
37027
37028
37029 exec 6>&1
37030 ## ----------------------------------- ##
37031 ## Main body of $CONFIG_STATUS script. ##
37032 ## ----------------------------------- ##
37033 _ASEOF
37034 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
37035
37036 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37037 # Save the log message, to keep $0 and so on meaningful, and to
37038 # report actual input values of CONFIG_FILES etc. instead of their
37039 # values after options handling.
37040 ac_log="
37041 This file was extended by GNU tar $as_me 1.27.1, which was
37042 generated by GNU Autoconf 2.69.  Invocation command line was
37043
37044   CONFIG_FILES    = $CONFIG_FILES
37045   CONFIG_HEADERS  = $CONFIG_HEADERS
37046   CONFIG_LINKS    = $CONFIG_LINKS
37047   CONFIG_COMMANDS = $CONFIG_COMMANDS
37048   $ $0 $@
37049
37050 on `(hostname || uname -n) 2>/dev/null | sed 1q`
37051 "
37052
37053 _ACEOF
37054
37055 case $ac_config_files in *"
37056 "*) set x $ac_config_files; shift; ac_config_files=$*;;
37057 esac
37058
37059 case $ac_config_headers in *"
37060 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
37061 esac
37062
37063
37064 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37065 # Files that config.status was made for.
37066 config_files="$ac_config_files"
37067 config_headers="$ac_config_headers"
37068 config_commands="$ac_config_commands"
37069
37070 _ACEOF
37071
37072 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37073 ac_cs_usage="\
37074 \`$as_me' instantiates files and other configuration actions
37075 from templates according to the current configuration.  Unless the files
37076 and actions are specified as TAGs, all are instantiated by default.
37077
37078 Usage: $0 [OPTION]... [TAG]...
37079
37080   -h, --help       print this help, then exit
37081   -V, --version    print version number and configuration settings, then exit
37082       --config     print configuration, then exit
37083   -q, --quiet, --silent
37084                    do not print progress messages
37085   -d, --debug      don't remove temporary files
37086       --recheck    update $as_me by reconfiguring in the same conditions
37087       --file=FILE[:TEMPLATE]
37088                    instantiate the configuration file FILE
37089       --header=FILE[:TEMPLATE]
37090                    instantiate the configuration header FILE
37091
37092 Configuration files:
37093 $config_files
37094
37095 Configuration headers:
37096 $config_headers
37097
37098 Configuration commands:
37099 $config_commands
37100
37101 Report bugs to <bug-tar@gnu.org>.
37102 GNU tar home page: <http://www.gnu.org/software/tar/>.
37103 General help using GNU software: <http://www.gnu.org/gethelp/>."
37104
37105 _ACEOF
37106 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37107 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
37108 ac_cs_version="\\
37109 GNU tar config.status 1.27.1
37110 configured by $0, generated by GNU Autoconf 2.69,
37111   with options \\"\$ac_cs_config\\"
37112
37113 Copyright (C) 2012 Free Software Foundation, Inc.
37114 This config.status script is free software; the Free Software Foundation
37115 gives unlimited permission to copy, distribute and modify it."
37116
37117 ac_pwd='$ac_pwd'
37118 srcdir='$srcdir'
37119 INSTALL='$INSTALL'
37120 MKDIR_P='$MKDIR_P'
37121 AWK='$AWK'
37122 test -n "\$AWK" || AWK=awk
37123 _ACEOF
37124
37125 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37126 # The default lists apply if the user does not specify any file.
37127 ac_need_defaults=:
37128 while test $# != 0
37129 do
37130   case $1 in
37131   --*=?*)
37132     ac_option=`expr "X$1" : 'X\([^=]*\)='`
37133     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
37134     ac_shift=:
37135     ;;
37136   --*=)
37137     ac_option=`expr "X$1" : 'X\([^=]*\)='`
37138     ac_optarg=
37139     ac_shift=:
37140     ;;
37141   *)
37142     ac_option=$1
37143     ac_optarg=$2
37144     ac_shift=shift
37145     ;;
37146   esac
37147
37148   case $ac_option in
37149   # Handling of the options.
37150   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
37151     ac_cs_recheck=: ;;
37152   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
37153     $as_echo "$ac_cs_version"; exit ;;
37154   --config | --confi | --conf | --con | --co | --c )
37155     $as_echo "$ac_cs_config"; exit ;;
37156   --debug | --debu | --deb | --de | --d | -d )
37157     debug=: ;;
37158   --file | --fil | --fi | --f )
37159     $ac_shift
37160     case $ac_optarg in
37161     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
37162     '') as_fn_error $? "missing file argument" ;;
37163     esac
37164     as_fn_append CONFIG_FILES " '$ac_optarg'"
37165     ac_need_defaults=false;;
37166   --header | --heade | --head | --hea )
37167     $ac_shift
37168     case $ac_optarg in
37169     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
37170     esac
37171     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
37172     ac_need_defaults=false;;
37173   --he | --h)
37174     # Conflict between --help and --header
37175     as_fn_error $? "ambiguous option: \`$1'
37176 Try \`$0 --help' for more information.";;
37177   --help | --hel | -h )
37178     $as_echo "$ac_cs_usage"; exit ;;
37179   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
37180   | -silent | --silent | --silen | --sile | --sil | --si | --s)
37181     ac_cs_silent=: ;;
37182
37183   # This is an error.
37184   -*) as_fn_error $? "unrecognized option: \`$1'
37185 Try \`$0 --help' for more information." ;;
37186
37187   *) as_fn_append ac_config_targets " $1"
37188      ac_need_defaults=false ;;
37189
37190   esac
37191   shift
37192 done
37193
37194 ac_configure_extra_args=
37195
37196 if $ac_cs_silent; then
37197   exec 6>/dev/null
37198   ac_configure_extra_args="$ac_configure_extra_args --silent"
37199 fi
37200
37201 _ACEOF
37202 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37203 if \$ac_cs_recheck; then
37204   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
37205   shift
37206   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
37207   CONFIG_SHELL='$SHELL'
37208   export CONFIG_SHELL
37209   exec "\$@"
37210 fi
37211
37212 _ACEOF
37213 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37214 exec 5>>config.log
37215 {
37216   echo
37217   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
37218 ## Running $as_me. ##
37219 _ASBOX
37220   $as_echo "$ac_log"
37221 } >&5
37222
37223 _ACEOF
37224 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37225 #
37226 # INIT-COMMANDS
37227 #
37228 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
37229 # Capture the value of obsolete ALL_LINGUAS because we need it to compute
37230     # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
37231     # from automake < 1.5.
37232     eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
37233     # Capture the value of LINGUAS because we need it to compute CATALOGS.
37234     LINGUAS="${LINGUAS-%UNSET%}"
37235
37236
37237
37238 _ACEOF
37239
37240 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37241
37242 # Handling of arguments.
37243 for ac_config_target in $ac_config_targets
37244 do
37245   case $ac_config_target in
37246     "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
37247     "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
37248     "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;;
37249     "tests/atconfig") CONFIG_COMMANDS="$CONFIG_COMMANDS tests/atconfig" ;;
37250     "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
37251     "tests/atlocal") CONFIG_FILES="$CONFIG_FILES tests/atlocal" ;;
37252     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
37253     "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
37254     "gnu/Makefile") CONFIG_FILES="$CONFIG_FILES gnu/Makefile" ;;
37255     "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
37256     "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
37257     "scripts/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/Makefile" ;;
37258     "rmt/Makefile") CONFIG_FILES="$CONFIG_FILES rmt/Makefile" ;;
37259     "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
37260
37261   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
37262   esac
37263 done
37264
37265
37266 # If the user did not use the arguments to specify the items to instantiate,
37267 # then the envvar interface is used.  Set only those that are not.
37268 # We use the long form for the default assignment because of an extremely
37269 # bizarre bug on SunOS 4.1.3.
37270 if $ac_need_defaults; then
37271   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
37272   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
37273   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
37274 fi
37275
37276 # Have a temporary directory for convenience.  Make it in the build tree
37277 # simply because there is no reason against having it here, and in addition,
37278 # creating and moving files from /tmp can sometimes cause problems.
37279 # Hook for its removal unless debugging.
37280 # Note that there is a small window in which the directory will not be cleaned:
37281 # after its creation but before its name has been assigned to `$tmp'.
37282 $debug ||
37283 {
37284   tmp= ac_tmp=
37285   trap 'exit_status=$?
37286   : "${ac_tmp:=$tmp}"
37287   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
37288 ' 0
37289   trap 'as_fn_exit 1' 1 2 13 15
37290 }
37291 # Create a (secure) tmp directory for tmp files.
37292
37293 {
37294   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
37295   test -d "$tmp"
37296 }  ||
37297 {
37298   tmp=./conf$$-$RANDOM
37299   (umask 077 && mkdir "$tmp")
37300 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
37301 ac_tmp=$tmp
37302
37303 # Set up the scripts for CONFIG_FILES section.
37304 # No need to generate them if there are no CONFIG_FILES.
37305 # This happens for instance with `./config.status config.h'.
37306 if test -n "$CONFIG_FILES"; then
37307
37308
37309 ac_cr=`echo X | tr X '\015'`
37310 # On cygwin, bash can eat \r inside `` if the user requested igncr.
37311 # But we know of no other shell where ac_cr would be empty at this
37312 # point, so we can use a bashism as a fallback.
37313 if test "x$ac_cr" = x; then
37314   eval ac_cr=\$\'\\r\'
37315 fi
37316 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
37317 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
37318   ac_cs_awk_cr='\\r'
37319 else
37320   ac_cs_awk_cr=$ac_cr
37321 fi
37322
37323 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
37324 _ACEOF
37325
37326
37327 {
37328   echo "cat >conf$$subs.awk <<_ACEOF" &&
37329   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
37330   echo "_ACEOF"
37331 } >conf$$subs.sh ||
37332   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
37333 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
37334 ac_delim='%!_!# '
37335 for ac_last_try in false false false false false :; do
37336   . ./conf$$subs.sh ||
37337     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
37338
37339   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
37340   if test $ac_delim_n = $ac_delim_num; then
37341     break
37342   elif $ac_last_try; then
37343     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
37344   else
37345     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
37346   fi
37347 done
37348 rm -f conf$$subs.sh
37349
37350 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37351 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
37352 _ACEOF
37353 sed -n '
37354 h
37355 s/^/S["/; s/!.*/"]=/
37356 p
37357 g
37358 s/^[^!]*!//
37359 :repl
37360 t repl
37361 s/'"$ac_delim"'$//
37362 t delim
37363 :nl
37364 h
37365 s/\(.\{148\}\)..*/\1/
37366 t more1
37367 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
37368 p
37369 n
37370 b repl
37371 :more1
37372 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
37373 p
37374 g
37375 s/.\{148\}//
37376 t nl
37377 :delim
37378 h
37379 s/\(.\{148\}\)..*/\1/
37380 t more2
37381 s/["\\]/\\&/g; s/^/"/; s/$/"/
37382 p
37383 b
37384 :more2
37385 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
37386 p
37387 g
37388 s/.\{148\}//
37389 t delim
37390 ' <conf$$subs.awk | sed '
37391 /^[^""]/{
37392   N
37393   s/\n//
37394 }
37395 ' >>$CONFIG_STATUS || ac_write_fail=1
37396 rm -f conf$$subs.awk
37397 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37398 _ACAWK
37399 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
37400   for (key in S) S_is_set[key] = 1
37401   FS = "\a"
37402
37403 }
37404 {
37405   line = $ 0
37406   nfields = split(line, field, "@")
37407   substed = 0
37408   len = length(field[1])
37409   for (i = 2; i < nfields; i++) {
37410     key = field[i]
37411     keylen = length(key)
37412     if (S_is_set[key]) {
37413       value = S[key]
37414       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
37415       len += length(value) + length(field[++i])
37416       substed = 1
37417     } else
37418       len += 1 + keylen
37419   }
37420
37421   print line
37422 }
37423
37424 _ACAWK
37425 _ACEOF
37426 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37427 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
37428   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
37429 else
37430   cat
37431 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
37432   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
37433 _ACEOF
37434
37435 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
37436 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
37437 # trailing colons and then remove the whole line if VPATH becomes empty
37438 # (actually we leave an empty line to preserve line numbers).
37439 if test "x$srcdir" = x.; then
37440   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
37441 h
37442 s///
37443 s/^/:/
37444 s/[      ]*$/:/
37445 s/:\$(srcdir):/:/g
37446 s/:\${srcdir}:/:/g
37447 s/:@srcdir@:/:/g
37448 s/^:*//
37449 s/:*$//
37450 x
37451 s/\(=[   ]*\).*/\1/
37452 G
37453 s/\n//
37454 s/^[^=]*=[       ]*$//
37455 }'
37456 fi
37457
37458 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37459 fi # test -n "$CONFIG_FILES"
37460
37461 # Set up the scripts for CONFIG_HEADERS section.
37462 # No need to generate them if there are no CONFIG_HEADERS.
37463 # This happens for instance with `./config.status Makefile'.
37464 if test -n "$CONFIG_HEADERS"; then
37465 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
37466 BEGIN {
37467 _ACEOF
37468
37469 # Transform confdefs.h into an awk script `defines.awk', embedded as
37470 # here-document in config.status, that substitutes the proper values into
37471 # config.h.in to produce config.h.
37472
37473 # Create a delimiter string that does not exist in confdefs.h, to ease
37474 # handling of long lines.
37475 ac_delim='%!_!# '
37476 for ac_last_try in false false :; do
37477   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
37478   if test -z "$ac_tt"; then
37479     break
37480   elif $ac_last_try; then
37481     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
37482   else
37483     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
37484   fi
37485 done
37486
37487 # For the awk script, D is an array of macro values keyed by name,
37488 # likewise P contains macro parameters if any.  Preserve backslash
37489 # newline sequences.
37490
37491 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
37492 sed -n '
37493 s/.\{148\}/&'"$ac_delim"'/g
37494 t rset
37495 :rset
37496 s/^[     ]*#[    ]*define[       ][      ]*/ /
37497 t def
37498 d
37499 :def
37500 s/\\$//
37501 t bsnl
37502 s/["\\]/\\&/g
37503 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
37504 D["\1"]=" \3"/p
37505 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
37506 d
37507 :bsnl
37508 s/["\\]/\\&/g
37509 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
37510 D["\1"]=" \3\\\\\\n"\\/p
37511 t cont
37512 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
37513 t cont
37514 d
37515 :cont
37516 n
37517 s/.\{148\}/&'"$ac_delim"'/g
37518 t clear
37519 :clear
37520 s/\\$//
37521 t bsnlc
37522 s/["\\]/\\&/g; s/^/"/; s/$/"/p
37523 d
37524 :bsnlc
37525 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
37526 b cont
37527 ' <confdefs.h | sed '
37528 s/'"$ac_delim"'/"\\\
37529 "/g' >>$CONFIG_STATUS || ac_write_fail=1
37530
37531 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37532   for (key in D) D_is_set[key] = 1
37533   FS = "\a"
37534 }
37535 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
37536   line = \$ 0
37537   split(line, arg, " ")
37538   if (arg[1] == "#") {
37539     defundef = arg[2]
37540     mac1 = arg[3]
37541   } else {
37542     defundef = substr(arg[1], 2)
37543     mac1 = arg[2]
37544   }
37545   split(mac1, mac2, "(") #)
37546   macro = mac2[1]
37547   prefix = substr(line, 1, index(line, defundef) - 1)
37548   if (D_is_set[macro]) {
37549     # Preserve the white space surrounding the "#".
37550     print prefix "define", macro P[macro] D[macro]
37551     next
37552   } else {
37553     # Replace #undef with comments.  This is necessary, for example,
37554     # in the case of _POSIX_SOURCE, which is predefined and required
37555     # on some systems where configure will not decide to define it.
37556     if (defundef == "undef") {
37557       print "/*", prefix defundef, macro, "*/"
37558       next
37559     }
37560   }
37561 }
37562 { print }
37563 _ACAWK
37564 _ACEOF
37565 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37566   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
37567 fi # test -n "$CONFIG_HEADERS"
37568
37569
37570 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
37571 shift
37572 for ac_tag
37573 do
37574   case $ac_tag in
37575   :[FHLC]) ac_mode=$ac_tag; continue;;
37576   esac
37577   case $ac_mode$ac_tag in
37578   :[FHL]*:*);;
37579   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
37580   :[FH]-) ac_tag=-:-;;
37581   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
37582   esac
37583   ac_save_IFS=$IFS
37584   IFS=:
37585   set x $ac_tag
37586   IFS=$ac_save_IFS
37587   shift
37588   ac_file=$1
37589   shift
37590
37591   case $ac_mode in
37592   :L) ac_source=$1;;
37593   :[FH])
37594     ac_file_inputs=
37595     for ac_f
37596     do
37597       case $ac_f in
37598       -) ac_f="$ac_tmp/stdin";;
37599       *) # Look for the file first in the build tree, then in the source tree
37600          # (if the path is not absolute).  The absolute path cannot be DOS-style,
37601          # because $ac_f cannot contain `:'.
37602          test -f "$ac_f" ||
37603            case $ac_f in
37604            [\\/$]*) false;;
37605            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
37606            esac ||
37607            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
37608       esac
37609       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
37610       as_fn_append ac_file_inputs " '$ac_f'"
37611     done
37612
37613     # Let's still pretend it is `configure' which instantiates (i.e., don't
37614     # use $as_me), people would be surprised to read:
37615     #    /* config.h.  Generated by config.status.  */
37616     configure_input='Generated from '`
37617           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
37618         `' by configure.'
37619     if test x"$ac_file" != x-; then
37620       configure_input="$ac_file.  $configure_input"
37621       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
37622 $as_echo "$as_me: creating $ac_file" >&6;}
37623     fi
37624     # Neutralize special characters interpreted by sed in replacement strings.
37625     case $configure_input in #(
37626     *\&* | *\|* | *\\* )
37627        ac_sed_conf_input=`$as_echo "$configure_input" |
37628        sed 's/[\\\\&|]/\\\\&/g'`;; #(
37629     *) ac_sed_conf_input=$configure_input;;
37630     esac
37631
37632     case $ac_tag in
37633     *:-:* | *:-) cat >"$ac_tmp/stdin" \
37634       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
37635     esac
37636     ;;
37637   esac
37638
37639   ac_dir=`$as_dirname -- "$ac_file" ||
37640 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
37641          X"$ac_file" : 'X\(//\)[^/]' \| \
37642          X"$ac_file" : 'X\(//\)$' \| \
37643          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
37644 $as_echo X"$ac_file" |
37645     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
37646             s//\1/
37647             q
37648           }
37649           /^X\(\/\/\)[^/].*/{
37650             s//\1/
37651             q
37652           }
37653           /^X\(\/\/\)$/{
37654             s//\1/
37655             q
37656           }
37657           /^X\(\/\).*/{
37658             s//\1/
37659             q
37660           }
37661           s/.*/./; q'`
37662   as_dir="$ac_dir"; as_fn_mkdir_p
37663   ac_builddir=.
37664
37665 case "$ac_dir" in
37666 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
37667 *)
37668   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
37669   # A ".." for each directory in $ac_dir_suffix.
37670   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
37671   case $ac_top_builddir_sub in
37672   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
37673   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
37674   esac ;;
37675 esac
37676 ac_abs_top_builddir=$ac_pwd
37677 ac_abs_builddir=$ac_pwd$ac_dir_suffix
37678 # for backward compatibility:
37679 ac_top_builddir=$ac_top_build_prefix
37680
37681 case $srcdir in
37682   .)  # We are building in place.
37683     ac_srcdir=.
37684     ac_top_srcdir=$ac_top_builddir_sub
37685     ac_abs_top_srcdir=$ac_pwd ;;
37686   [\\/]* | ?:[\\/]* )  # Absolute name.
37687     ac_srcdir=$srcdir$ac_dir_suffix;
37688     ac_top_srcdir=$srcdir
37689     ac_abs_top_srcdir=$srcdir ;;
37690   *) # Relative name.
37691     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
37692     ac_top_srcdir=$ac_top_build_prefix$srcdir
37693     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
37694 esac
37695 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
37696
37697
37698   case $ac_mode in
37699   :F)
37700   #
37701   # CONFIG_FILE
37702   #
37703
37704   case $INSTALL in
37705   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
37706   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
37707   esac
37708   ac_MKDIR_P=$MKDIR_P
37709   case $MKDIR_P in
37710   [\\/$]* | ?:[\\/]* ) ;;
37711   */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
37712   esac
37713 _ACEOF
37714
37715 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37716 # If the template does not know about datarootdir, expand it.
37717 # FIXME: This hack should be removed a few years after 2.60.
37718 ac_datarootdir_hack=; ac_datarootdir_seen=
37719 ac_sed_dataroot='
37720 /datarootdir/ {
37721   p
37722   q
37723 }
37724 /@datadir@/p
37725 /@docdir@/p
37726 /@infodir@/p
37727 /@localedir@/p
37728 /@mandir@/p'
37729 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
37730 *datarootdir*) ac_datarootdir_seen=yes;;
37731 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
37732   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
37733 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
37734 _ACEOF
37735 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37736   ac_datarootdir_hack='
37737   s&@datadir@&$datadir&g
37738   s&@docdir@&$docdir&g
37739   s&@infodir@&$infodir&g
37740   s&@localedir@&$localedir&g
37741   s&@mandir@&$mandir&g
37742   s&\\\${datarootdir}&$datarootdir&g' ;;
37743 esac
37744 _ACEOF
37745
37746 # Neutralize VPATH when `$srcdir' = `.'.
37747 # Shell code in configure.ac might set extrasub.
37748 # FIXME: do we really want to maintain this feature?
37749 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37750 ac_sed_extra="$ac_vpsub
37751 $extrasub
37752 _ACEOF
37753 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37754 :t
37755 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
37756 s|@configure_input@|$ac_sed_conf_input|;t t
37757 s&@top_builddir@&$ac_top_builddir_sub&;t t
37758 s&@top_build_prefix@&$ac_top_build_prefix&;t t
37759 s&@srcdir@&$ac_srcdir&;t t
37760 s&@abs_srcdir@&$ac_abs_srcdir&;t t
37761 s&@top_srcdir@&$ac_top_srcdir&;t t
37762 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
37763 s&@builddir@&$ac_builddir&;t t
37764 s&@abs_builddir@&$ac_abs_builddir&;t t
37765 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
37766 s&@INSTALL@&$ac_INSTALL&;t t
37767 s&@MKDIR_P@&$ac_MKDIR_P&;t t
37768 $ac_datarootdir_hack
37769 "
37770 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
37771   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
37772
37773 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
37774   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
37775   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
37776       "$ac_tmp/out"`; test -z "$ac_out"; } &&
37777   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
37778 which seems to be undefined.  Please make sure it is defined" >&5
37779 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
37780 which seems to be undefined.  Please make sure it is defined" >&2;}
37781
37782   rm -f "$ac_tmp/stdin"
37783   case $ac_file in
37784   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
37785   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
37786   esac \
37787   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
37788  ;;
37789   :H)
37790   #
37791   # CONFIG_HEADER
37792   #
37793   if test x"$ac_file" != x-; then
37794     {
37795       $as_echo "/* $configure_input  */" \
37796       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
37797     } >"$ac_tmp/config.h" \
37798       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
37799     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
37800       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
37801 $as_echo "$as_me: $ac_file is unchanged" >&6;}
37802     else
37803       rm -f "$ac_file"
37804       mv "$ac_tmp/config.h" "$ac_file" \
37805         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
37806     fi
37807   else
37808     $as_echo "/* $configure_input  */" \
37809       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
37810       || as_fn_error $? "could not create -" "$LINENO" 5
37811   fi
37812 # Compute "$ac_file"'s index in $config_headers.
37813 _am_arg="$ac_file"
37814 _am_stamp_count=1
37815 for _am_header in $config_headers :; do
37816   case $_am_header in
37817     $_am_arg | $_am_arg:* )
37818       break ;;
37819     * )
37820       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
37821   esac
37822 done
37823 echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
37824 $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
37825          X"$_am_arg" : 'X\(//\)[^/]' \| \
37826          X"$_am_arg" : 'X\(//\)$' \| \
37827          X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
37828 $as_echo X"$_am_arg" |
37829     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
37830             s//\1/
37831             q
37832           }
37833           /^X\(\/\/\)[^/].*/{
37834             s//\1/
37835             q
37836           }
37837           /^X\(\/\/\)$/{
37838             s//\1/
37839             q
37840           }
37841           /^X\(\/\).*/{
37842             s//\1/
37843             q
37844           }
37845           s/.*/./; q'`/stamp-h$_am_stamp_count
37846  ;;
37847
37848   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
37849 $as_echo "$as_me: executing $ac_file commands" >&6;}
37850  ;;
37851   esac
37852
37853
37854   case $ac_file$ac_mode in
37855     "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
37856   # Older Autoconf quotes --file arguments for eval, but not when files
37857   # are listed without --file.  Let's play safe and only enable the eval
37858   # if we detect the quoting.
37859   case $CONFIG_FILES in
37860   *\'*) eval set x "$CONFIG_FILES" ;;
37861   *)   set x $CONFIG_FILES ;;
37862   esac
37863   shift
37864   for mf
37865   do
37866     # Strip MF so we end up with the name of the file.
37867     mf=`echo "$mf" | sed -e 's/:.*$//'`
37868     # Check whether this is an Automake generated Makefile or not.
37869     # We used to match only the files named 'Makefile.in', but
37870     # some people rename them; so instead we look at the file content.
37871     # Grep'ing the first line is not enough: some people post-process
37872     # each Makefile.in and add a new line on top of each file to say so.
37873     # Grep'ing the whole file is not good either: AIX grep has a line
37874     # limit of 2048, but all sed's we know have understand at least 4000.
37875     if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
37876       dirpart=`$as_dirname -- "$mf" ||
37877 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
37878          X"$mf" : 'X\(//\)[^/]' \| \
37879          X"$mf" : 'X\(//\)$' \| \
37880          X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
37881 $as_echo X"$mf" |
37882     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
37883             s//\1/
37884             q
37885           }
37886           /^X\(\/\/\)[^/].*/{
37887             s//\1/
37888             q
37889           }
37890           /^X\(\/\/\)$/{
37891             s//\1/
37892             q
37893           }
37894           /^X\(\/\).*/{
37895             s//\1/
37896             q
37897           }
37898           s/.*/./; q'`
37899     else
37900       continue
37901     fi
37902     # Extract the definition of DEPDIR, am__include, and am__quote
37903     # from the Makefile without running 'make'.
37904     DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
37905     test -z "$DEPDIR" && continue
37906     am__include=`sed -n 's/^am__include = //p' < "$mf"`
37907     test -z "$am__include" && continue
37908     am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
37909     # Find all dependency output files, they are included files with
37910     # $(DEPDIR) in their names.  We invoke sed twice because it is the
37911     # simplest approach to changing $(DEPDIR) to its actual value in the
37912     # expansion.
37913     for file in `sed -n "
37914       s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
37915          sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
37916       # Make sure the directory exists.
37917       test -f "$dirpart/$file" && continue
37918       fdir=`$as_dirname -- "$file" ||
37919 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
37920          X"$file" : 'X\(//\)[^/]' \| \
37921          X"$file" : 'X\(//\)$' \| \
37922          X"$file" : 'X\(/\)' \| . 2>/dev/null ||
37923 $as_echo X"$file" |
37924     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
37925             s//\1/
37926             q
37927           }
37928           /^X\(\/\/\)[^/].*/{
37929             s//\1/
37930             q
37931           }
37932           /^X\(\/\/\)$/{
37933             s//\1/
37934             q
37935           }
37936           /^X\(\/\).*/{
37937             s//\1/
37938             q
37939           }
37940           s/.*/./; q'`
37941       as_dir=$dirpart/$fdir; as_fn_mkdir_p
37942       # echo "creating $dirpart/$file"
37943       echo '# dummy' > "$dirpart/$file"
37944     done
37945   done
37946 }
37947  ;;
37948     "po-directories":C)
37949     for ac_file in $CONFIG_FILES; do
37950       # Support "outfile[:infile[:infile...]]"
37951       case "$ac_file" in
37952         *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
37953       esac
37954       # PO directories have a Makefile.in generated from Makefile.in.in.
37955       case "$ac_file" in */Makefile.in)
37956         # Adjust a relative srcdir.
37957         ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
37958         ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
37959         ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
37960         # In autoconf-2.13 it is called $ac_given_srcdir.
37961         # In autoconf-2.50 it is called $srcdir.
37962         test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
37963         case "$ac_given_srcdir" in
37964           .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
37965           /*) top_srcdir="$ac_given_srcdir" ;;
37966           *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
37967         esac
37968         # Treat a directory as a PO directory if and only if it has a
37969         # POTFILES.in file. This allows packages to have multiple PO
37970         # directories under different names or in different locations.
37971         if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
37972           rm -f "$ac_dir/POTFILES"
37973           test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
37974           gt_tab=`printf '\t'`
37975           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"
37976           POMAKEFILEDEPS="POTFILES.in"
37977           # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
37978           # on $ac_dir but don't depend on user-specified configuration
37979           # parameters.
37980           if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
37981             # The LINGUAS file contains the set of available languages.
37982             if test -n "$OBSOLETE_ALL_LINGUAS"; then
37983               test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
37984             fi
37985             ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
37986             # Hide the ALL_LINGUAS assignment from automake < 1.5.
37987             eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
37988             POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
37989           else
37990             # The set of available languages was given in configure.in.
37991             # Hide the ALL_LINGUAS assignment from automake < 1.5.
37992             eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
37993           fi
37994           # Compute POFILES
37995           # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
37996           # Compute UPDATEPOFILES
37997           # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
37998           # Compute DUMMYPOFILES
37999           # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
38000           # Compute GMOFILES
38001           # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
38002           case "$ac_given_srcdir" in
38003             .) srcdirpre= ;;
38004             *) srcdirpre='$(srcdir)/' ;;
38005           esac
38006           POFILES=
38007           UPDATEPOFILES=
38008           DUMMYPOFILES=
38009           GMOFILES=
38010           for lang in $ALL_LINGUAS; do
38011             POFILES="$POFILES $srcdirpre$lang.po"
38012             UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
38013             DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
38014             GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
38015           done
38016           # CATALOGS depends on both $ac_dir and the user's LINGUAS
38017           # environment variable.
38018           INST_LINGUAS=
38019           if test -n "$ALL_LINGUAS"; then
38020             for presentlang in $ALL_LINGUAS; do
38021               useit=no
38022               if test "%UNSET%" != "$LINGUAS"; then
38023                 desiredlanguages="$LINGUAS"
38024               else
38025                 desiredlanguages="$ALL_LINGUAS"
38026               fi
38027               for desiredlang in $desiredlanguages; do
38028                 # Use the presentlang catalog if desiredlang is
38029                 #   a. equal to presentlang, or
38030                 #   b. a variant of presentlang (because in this case,
38031                 #      presentlang can be used as a fallback for messages
38032                 #      which are not translated in the desiredlang catalog).
38033                 case "$desiredlang" in
38034                   "$presentlang"*) useit=yes;;
38035                 esac
38036               done
38037               if test $useit = yes; then
38038                 INST_LINGUAS="$INST_LINGUAS $presentlang"
38039               fi
38040             done
38041           fi
38042           CATALOGS=
38043           if test -n "$INST_LINGUAS"; then
38044             for lang in $INST_LINGUAS; do
38045               CATALOGS="$CATALOGS $lang.gmo"
38046             done
38047           fi
38048           test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
38049           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"
38050           for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
38051             if test -f "$f"; then
38052               case "$f" in
38053                 *.orig | *.bak | *~) ;;
38054                 *) cat "$f" >> "$ac_dir/Makefile" ;;
38055               esac
38056             fi
38057           done
38058         fi
38059         ;;
38060       esac
38061     done ;;
38062     "tests/atconfig":C) cat >tests/atconfig <<ATEOF
38063 # Configurable variable values for building test suites.
38064 # Generated by $0.
38065 # Copyright (C) 2012 Free Software Foundation, Inc.
38066
38067 # The test suite will define top_srcdir=$at_top_srcdir/../.. etc.
38068 at_testdir='tests'
38069 abs_builddir='$ac_abs_builddir'
38070 at_srcdir='$ac_srcdir'
38071 abs_srcdir='$ac_abs_srcdir'
38072 at_top_srcdir='$ac_top_srcdir'
38073 abs_top_srcdir='$ac_abs_top_srcdir'
38074 at_top_build_prefix='$ac_top_build_prefix'
38075 abs_top_builddir='$ac_abs_top_builddir'
38076
38077 # Backward compatibility with Autotest <= 2.59b:
38078 at_top_builddir=\$at_top_build_prefix
38079
38080 AUTOTEST_PATH='tests'
38081
38082 SHELL=\${CONFIG_SHELL-'$SHELL'}
38083 ATEOF
38084  ;;
38085
38086   esac
38087 done # for ac_tag
38088
38089
38090 as_fn_exit 0
38091 _ACEOF
38092 ac_clean_files=$ac_clean_files_save
38093
38094 test $ac_write_fail = 0 ||
38095   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
38096
38097
38098 # configure is writing to config.log, and then calls config.status.
38099 # config.status does its own redirection, appending to config.log.
38100 # Unfortunately, on DOS this fails, as config.log is still kept open
38101 # by configure, so config.status won't be able to write to it; its
38102 # output is simply discarded.  So we exec the FD to /dev/null,
38103 # effectively closing config.log, so it can be properly (re)opened and
38104 # appended to by config.status.  When coming back to configure, we
38105 # need to make the FD available again.
38106 if test "$no_create" != yes; then
38107   ac_cs_success=:
38108   ac_config_status_args=
38109   test "$silent" = yes &&
38110     ac_config_status_args="$ac_config_status_args --quiet"
38111   exec 5>/dev/null
38112   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
38113   exec 5>>config.log
38114   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
38115   # would make configure fail if this is the last instruction.
38116   $ac_cs_success || as_fn_exit 1
38117 fi
38118 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
38119   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
38120 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
38121 fi
38122