Elide non-DFSG compliant upstream components
[debian/tar] / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69 for GNU tar 1.27.
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'
584 PACKAGE_STRING='GNU tar 1.27'
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 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:";;
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
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, 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.12'
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 --run true"; then
3733   am_missing_run="$MISSING --run "
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'
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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create a ustar tar archive" >&5
4076 $as_echo_n "checking how to create a ustar tar archive... " >&6; }
4077 # Loop over all known methods to create a tar archive until one works.
4078 _am_tools='gnutar plaintar pax cpio none'
4079 _am_tools=${am_cv_prog_tar_ustar-$_am_tools}
4080 # Do not fold the above two line into one, because Tru64 sh and
4081 # Solaris sh will not grok spaces in the rhs of '-'.
4082 for _am_tool in $_am_tools
4083 do
4084   case $_am_tool in
4085   gnutar)
4086     for _am_tar in tar gnutar gtar;
4087     do
4088       { echo "$as_me:$LINENO: $_am_tar --version" >&5
4089    ($_am_tar --version) >&5 2>&5
4090    ac_status=$?
4091    echo "$as_me:$LINENO: \$? = $ac_status" >&5
4092    (exit $ac_status); } && break
4093     done
4094     am__tar="$_am_tar --format=ustar -chf - "'"$$tardir"'
4095     am__tar_="$_am_tar --format=ustar -chf - "'"$tardir"'
4096     am__untar="$_am_tar -xf -"
4097     ;;
4098   plaintar)
4099     # Must skip GNU tar: if it does not support --format= it doesn't create
4100     # ustar tarball either.
4101     (tar --version) >/dev/null 2>&1 && continue
4102     am__tar='tar chf - "$$tardir"'
4103     am__tar_='tar chf - "$tardir"'
4104     am__untar='tar xf -'
4105     ;;
4106   pax)
4107     am__tar='pax -L -x ustar -w "$$tardir"'
4108     am__tar_='pax -L -x ustar -w "$tardir"'
4109     am__untar='pax -r'
4110     ;;
4111   cpio)
4112     am__tar='find "$$tardir" -print | cpio -o -H ustar -L'
4113     am__tar_='find "$tardir" -print | cpio -o -H ustar -L'
4114     am__untar='cpio -i -H ustar -d'
4115     ;;
4116   none)
4117     am__tar=false
4118     am__tar_=false
4119     am__untar=false
4120     ;;
4121   esac
4122
4123   # If the value was cached, stop now.  We just wanted to have am__tar
4124   # and am__untar set.
4125   test -n "${am_cv_prog_tar_ustar}" && break
4126
4127   # tar/untar a dummy directory, and stop if the command works
4128   rm -rf conftest.dir
4129   mkdir conftest.dir
4130   echo GrepMe > conftest.dir/file
4131   { echo "$as_me:$LINENO: tardir=conftest.dir && eval $am__tar_ >conftest.tar" >&5
4132    (tardir=conftest.dir && eval $am__tar_ >conftest.tar) >&5 2>&5
4133    ac_status=$?
4134    echo "$as_me:$LINENO: \$? = $ac_status" >&5
4135    (exit $ac_status); }
4136   rm -rf conftest.dir
4137   if test -s conftest.tar; then
4138     { echo "$as_me:$LINENO: $am__untar <conftest.tar" >&5
4139    ($am__untar <conftest.tar) >&5 2>&5
4140    ac_status=$?
4141    echo "$as_me:$LINENO: \$? = $ac_status" >&5
4142    (exit $ac_status); }
4143     grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
4144   fi
4145 done
4146 rm -rf conftest.dir
4147
4148 if ${am_cv_prog_tar_ustar+:} false; then :
4149   $as_echo_n "(cached) " >&6
4150 else
4151   am_cv_prog_tar_ustar=$_am_tool
4152 fi
4153
4154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_ustar" >&5
4155 $as_echo "$am_cv_prog_tar_ustar" >&6; }
4156
4157
4158
4159
4160
4161
4162 # Enable silent rules by default:
4163 # Check whether --enable-silent-rules was given.
4164 if test "${enable_silent_rules+set}" = set; then :
4165   enableval=$enable_silent_rules;
4166 fi
4167
4168 case $enable_silent_rules in # (((
4169   yes) AM_DEFAULT_VERBOSITY=0;;
4170    no) AM_DEFAULT_VERBOSITY=1;;
4171     *) AM_DEFAULT_VERBOSITY=0;;
4172 esac
4173 am_make=${MAKE-make}
4174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
4175 $as_echo_n "checking whether $am_make supports nested variables... " >&6; }
4176 if ${am_cv_make_support_nested_variables+:} false; then :
4177   $as_echo_n "(cached) " >&6
4178 else
4179   if $as_echo 'TRUE=$(BAR$(V))
4180 BAR0=false
4181 BAR1=true
4182 V=1
4183 am__doit:
4184         @$(TRUE)
4185 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
4186   am_cv_make_support_nested_variables=yes
4187 else
4188   am_cv_make_support_nested_variables=no
4189 fi
4190 fi
4191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
4192 $as_echo "$am_cv_make_support_nested_variables" >&6; }
4193 if test $am_cv_make_support_nested_variables = yes; then
4194     AM_V='$(V)'
4195   AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
4196 else
4197   AM_V=$AM_DEFAULT_VERBOSITY
4198   AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
4199 fi
4200 AM_BACKSLASH='\'
4201
4202
4203 ac_ext=c
4204 ac_cpp='$CPP $CPPFLAGS'
4205 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4206 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4207 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4208 if test -n "$ac_tool_prefix"; then
4209   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4210 set dummy ${ac_tool_prefix}gcc; ac_word=$2
4211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4212 $as_echo_n "checking for $ac_word... " >&6; }
4213 if ${ac_cv_prog_CC+:} false; then :
4214   $as_echo_n "(cached) " >&6
4215 else
4216   if test -n "$CC"; then
4217   ac_cv_prog_CC="$CC" # Let the user override the test.
4218 else
4219 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4220 for as_dir in $PATH
4221 do
4222   IFS=$as_save_IFS
4223   test -z "$as_dir" && as_dir=.
4224     for ac_exec_ext in '' $ac_executable_extensions; do
4225   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4226     ac_cv_prog_CC="${ac_tool_prefix}gcc"
4227     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4228     break 2
4229   fi
4230 done
4231   done
4232 IFS=$as_save_IFS
4233
4234 fi
4235 fi
4236 CC=$ac_cv_prog_CC
4237 if test -n "$CC"; then
4238   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4239 $as_echo "$CC" >&6; }
4240 else
4241   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4242 $as_echo "no" >&6; }
4243 fi
4244
4245
4246 fi
4247 if test -z "$ac_cv_prog_CC"; then
4248   ac_ct_CC=$CC
4249   # Extract the first word of "gcc", so it can be a program name with args.
4250 set dummy gcc; ac_word=$2
4251 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4252 $as_echo_n "checking for $ac_word... " >&6; }
4253 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4254   $as_echo_n "(cached) " >&6
4255 else
4256   if test -n "$ac_ct_CC"; then
4257   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4258 else
4259 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4260 for as_dir in $PATH
4261 do
4262   IFS=$as_save_IFS
4263   test -z "$as_dir" && as_dir=.
4264     for ac_exec_ext in '' $ac_executable_extensions; do
4265   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4266     ac_cv_prog_ac_ct_CC="gcc"
4267     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4268     break 2
4269   fi
4270 done
4271   done
4272 IFS=$as_save_IFS
4273
4274 fi
4275 fi
4276 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4277 if test -n "$ac_ct_CC"; then
4278   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4279 $as_echo "$ac_ct_CC" >&6; }
4280 else
4281   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4282 $as_echo "no" >&6; }
4283 fi
4284
4285   if test "x$ac_ct_CC" = x; then
4286     CC=""
4287   else
4288     case $cross_compiling:$ac_tool_warned in
4289 yes:)
4290 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4291 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4292 ac_tool_warned=yes ;;
4293 esac
4294     CC=$ac_ct_CC
4295   fi
4296 else
4297   CC="$ac_cv_prog_CC"
4298 fi
4299
4300 if test -z "$CC"; then
4301           if test -n "$ac_tool_prefix"; then
4302     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4303 set dummy ${ac_tool_prefix}cc; ac_word=$2
4304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4305 $as_echo_n "checking for $ac_word... " >&6; }
4306 if ${ac_cv_prog_CC+:} false; then :
4307   $as_echo_n "(cached) " >&6
4308 else
4309   if test -n "$CC"; then
4310   ac_cv_prog_CC="$CC" # Let the user override the test.
4311 else
4312 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4313 for as_dir in $PATH
4314 do
4315   IFS=$as_save_IFS
4316   test -z "$as_dir" && as_dir=.
4317     for ac_exec_ext in '' $ac_executable_extensions; do
4318   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4319     ac_cv_prog_CC="${ac_tool_prefix}cc"
4320     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4321     break 2
4322   fi
4323 done
4324   done
4325 IFS=$as_save_IFS
4326
4327 fi
4328 fi
4329 CC=$ac_cv_prog_CC
4330 if test -n "$CC"; then
4331   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4332 $as_echo "$CC" >&6; }
4333 else
4334   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4335 $as_echo "no" >&6; }
4336 fi
4337
4338
4339   fi
4340 fi
4341 if test -z "$CC"; then
4342   # Extract the first word of "cc", so it can be a program name with args.
4343 set dummy cc; ac_word=$2
4344 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4345 $as_echo_n "checking for $ac_word... " >&6; }
4346 if ${ac_cv_prog_CC+:} false; then :
4347   $as_echo_n "(cached) " >&6
4348 else
4349   if test -n "$CC"; then
4350   ac_cv_prog_CC="$CC" # Let the user override the test.
4351 else
4352   ac_prog_rejected=no
4353 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4354 for as_dir in $PATH
4355 do
4356   IFS=$as_save_IFS
4357   test -z "$as_dir" && as_dir=.
4358     for ac_exec_ext in '' $ac_executable_extensions; do
4359   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4360     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4361        ac_prog_rejected=yes
4362        continue
4363      fi
4364     ac_cv_prog_CC="cc"
4365     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4366     break 2
4367   fi
4368 done
4369   done
4370 IFS=$as_save_IFS
4371
4372 if test $ac_prog_rejected = yes; then
4373   # We found a bogon in the path, so make sure we never use it.
4374   set dummy $ac_cv_prog_CC
4375   shift
4376   if test $# != 0; then
4377     # We chose a different compiler from the bogus one.
4378     # However, it has the same basename, so the bogon will be chosen
4379     # first if we set CC to just the basename; use the full file name.
4380     shift
4381     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
4382   fi
4383 fi
4384 fi
4385 fi
4386 CC=$ac_cv_prog_CC
4387 if test -n "$CC"; then
4388   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4389 $as_echo "$CC" >&6; }
4390 else
4391   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4392 $as_echo "no" >&6; }
4393 fi
4394
4395
4396 fi
4397 if test -z "$CC"; then
4398   if test -n "$ac_tool_prefix"; then
4399   for ac_prog in cl.exe
4400   do
4401     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4402 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4403 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4404 $as_echo_n "checking for $ac_word... " >&6; }
4405 if ${ac_cv_prog_CC+:} false; then :
4406   $as_echo_n "(cached) " >&6
4407 else
4408   if test -n "$CC"; then
4409   ac_cv_prog_CC="$CC" # Let the user override the test.
4410 else
4411 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4412 for as_dir in $PATH
4413 do
4414   IFS=$as_save_IFS
4415   test -z "$as_dir" && as_dir=.
4416     for ac_exec_ext in '' $ac_executable_extensions; do
4417   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4418     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4419     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4420     break 2
4421   fi
4422 done
4423   done
4424 IFS=$as_save_IFS
4425
4426 fi
4427 fi
4428 CC=$ac_cv_prog_CC
4429 if test -n "$CC"; then
4430   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4431 $as_echo "$CC" >&6; }
4432 else
4433   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4434 $as_echo "no" >&6; }
4435 fi
4436
4437
4438     test -n "$CC" && break
4439   done
4440 fi
4441 if test -z "$CC"; then
4442   ac_ct_CC=$CC
4443   for ac_prog in cl.exe
4444 do
4445   # Extract the first word of "$ac_prog", so it can be a program name with args.
4446 set dummy $ac_prog; ac_word=$2
4447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4448 $as_echo_n "checking for $ac_word... " >&6; }
4449 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4450   $as_echo_n "(cached) " >&6
4451 else
4452   if test -n "$ac_ct_CC"; then
4453   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4454 else
4455 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4456 for as_dir in $PATH
4457 do
4458   IFS=$as_save_IFS
4459   test -z "$as_dir" && as_dir=.
4460     for ac_exec_ext in '' $ac_executable_extensions; do
4461   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4462     ac_cv_prog_ac_ct_CC="$ac_prog"
4463     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4464     break 2
4465   fi
4466 done
4467   done
4468 IFS=$as_save_IFS
4469
4470 fi
4471 fi
4472 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4473 if test -n "$ac_ct_CC"; then
4474   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4475 $as_echo "$ac_ct_CC" >&6; }
4476 else
4477   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4478 $as_echo "no" >&6; }
4479 fi
4480
4481
4482   test -n "$ac_ct_CC" && break
4483 done
4484
4485   if test "x$ac_ct_CC" = x; then
4486     CC=""
4487   else
4488     case $cross_compiling:$ac_tool_warned in
4489 yes:)
4490 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4491 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4492 ac_tool_warned=yes ;;
4493 esac
4494     CC=$ac_ct_CC
4495   fi
4496 fi
4497
4498 fi
4499
4500
4501 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4502 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4503 as_fn_error $? "no acceptable C compiler found in \$PATH
4504 See \`config.log' for more details" "$LINENO" 5; }
4505
4506 # Provide some information about the compiler.
4507 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4508 set X $ac_compile
4509 ac_compiler=$2
4510 for ac_option in --version -v -V -qversion; do
4511   { { ac_try="$ac_compiler $ac_option >&5"
4512 case "(($ac_try" in
4513   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4514   *) ac_try_echo=$ac_try;;
4515 esac
4516 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4517 $as_echo "$ac_try_echo"; } >&5
4518   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4519   ac_status=$?
4520   if test -s conftest.err; then
4521     sed '10a\
4522 ... rest of stderr output deleted ...
4523          10q' conftest.err >conftest.er1
4524     cat conftest.er1 >&5
4525   fi
4526   rm -f conftest.er1 conftest.err
4527   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4528   test $ac_status = 0; }
4529 done
4530
4531 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4532 /* end confdefs.h.  */
4533
4534 int
4535 main ()
4536 {
4537
4538   ;
4539   return 0;
4540 }
4541 _ACEOF
4542 ac_clean_files_save=$ac_clean_files
4543 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
4544 # Try to create an executable without -o first, disregard a.out.
4545 # It will help us diagnose broken compilers, and finding out an intuition
4546 # of exeext.
4547 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4548 $as_echo_n "checking whether the C compiler works... " >&6; }
4549 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4550
4551 # The possible output files:
4552 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4553
4554 ac_rmfiles=
4555 for ac_file in $ac_files
4556 do
4557   case $ac_file in
4558     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4559     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4560   esac
4561 done
4562 rm -f $ac_rmfiles
4563
4564 if { { ac_try="$ac_link_default"
4565 case "(($ac_try" in
4566   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4567   *) ac_try_echo=$ac_try;;
4568 esac
4569 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4570 $as_echo "$ac_try_echo"; } >&5
4571   (eval "$ac_link_default") 2>&5
4572   ac_status=$?
4573   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4574   test $ac_status = 0; }; then :
4575   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4576 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4577 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
4578 # so that the user can short-circuit this test for compilers unknown to
4579 # Autoconf.
4580 for ac_file in $ac_files ''
4581 do
4582   test -f "$ac_file" || continue
4583   case $ac_file in
4584     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4585         ;;
4586     [ab].out )
4587         # We found the default executable, but exeext='' is most
4588         # certainly right.
4589         break;;
4590     *.* )
4591         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4592         then :; else
4593            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4594         fi
4595         # We set ac_cv_exeext here because the later test for it is not
4596         # safe: cross compilers may not add the suffix if given an `-o'
4597         # argument, so we may need to know it at that point already.
4598         # Even if this section looks crufty: it has the advantage of
4599         # actually working.
4600         break;;
4601     * )
4602         break;;
4603   esac
4604 done
4605 test "$ac_cv_exeext" = no && ac_cv_exeext=
4606
4607 else
4608   ac_file=''
4609 fi
4610 if test -z "$ac_file"; then :
4611   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4612 $as_echo "no" >&6; }
4613 $as_echo "$as_me: failed program was:" >&5
4614 sed 's/^/| /' conftest.$ac_ext >&5
4615
4616 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4617 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4618 as_fn_error 77 "C compiler cannot create executables
4619 See \`config.log' for more details" "$LINENO" 5; }
4620 else
4621   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4622 $as_echo "yes" >&6; }
4623 fi
4624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4625 $as_echo_n "checking for C compiler default output file name... " >&6; }
4626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4627 $as_echo "$ac_file" >&6; }
4628 ac_exeext=$ac_cv_exeext
4629
4630 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4631 ac_clean_files=$ac_clean_files_save
4632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4633 $as_echo_n "checking for suffix of executables... " >&6; }
4634 if { { ac_try="$ac_link"
4635 case "(($ac_try" in
4636   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4637   *) ac_try_echo=$ac_try;;
4638 esac
4639 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4640 $as_echo "$ac_try_echo"; } >&5
4641   (eval "$ac_link") 2>&5
4642   ac_status=$?
4643   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4644   test $ac_status = 0; }; then :
4645   # If both `conftest.exe' and `conftest' are `present' (well, observable)
4646 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
4647 # work properly (i.e., refer to `conftest.exe'), while it won't with
4648 # `rm'.
4649 for ac_file in conftest.exe conftest conftest.*; do
4650   test -f "$ac_file" || continue
4651   case $ac_file in
4652     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4653     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4654           break;;
4655     * ) break;;
4656   esac
4657 done
4658 else
4659   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4660 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4661 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4662 See \`config.log' for more details" "$LINENO" 5; }
4663 fi
4664 rm -f conftest conftest$ac_cv_exeext
4665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4666 $as_echo "$ac_cv_exeext" >&6; }
4667
4668 rm -f conftest.$ac_ext
4669 EXEEXT=$ac_cv_exeext
4670 ac_exeext=$EXEEXT
4671 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4672 /* end confdefs.h.  */
4673 #include <stdio.h>
4674 int
4675 main ()
4676 {
4677 FILE *f = fopen ("conftest.out", "w");
4678  return ferror (f) || fclose (f) != 0;
4679
4680   ;
4681   return 0;
4682 }
4683 _ACEOF
4684 ac_clean_files="$ac_clean_files conftest.out"
4685 # Check that the compiler produces executables we can run.  If not, either
4686 # the compiler is broken, or we cross compile.
4687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4688 $as_echo_n "checking whether we are cross compiling... " >&6; }
4689 if test "$cross_compiling" != yes; then
4690   { { ac_try="$ac_link"
4691 case "(($ac_try" in
4692   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4693   *) ac_try_echo=$ac_try;;
4694 esac
4695 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4696 $as_echo "$ac_try_echo"; } >&5
4697   (eval "$ac_link") 2>&5
4698   ac_status=$?
4699   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4700   test $ac_status = 0; }
4701   if { ac_try='./conftest$ac_cv_exeext'
4702   { { case "(($ac_try" in
4703   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4704   *) ac_try_echo=$ac_try;;
4705 esac
4706 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4707 $as_echo "$ac_try_echo"; } >&5
4708   (eval "$ac_try") 2>&5
4709   ac_status=$?
4710   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4711   test $ac_status = 0; }; }; then
4712     cross_compiling=no
4713   else
4714     if test "$cross_compiling" = maybe; then
4715         cross_compiling=yes
4716     else
4717         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4718 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4719 as_fn_error $? "cannot run C compiled programs.
4720 If you meant to cross compile, use \`--host'.
4721 See \`config.log' for more details" "$LINENO" 5; }
4722     fi
4723   fi
4724 fi
4725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4726 $as_echo "$cross_compiling" >&6; }
4727
4728 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4729 ac_clean_files=$ac_clean_files_save
4730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4731 $as_echo_n "checking for suffix of object files... " >&6; }
4732 if ${ac_cv_objext+:} false; then :
4733   $as_echo_n "(cached) " >&6
4734 else
4735   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4736 /* end confdefs.h.  */
4737
4738 int
4739 main ()
4740 {
4741
4742   ;
4743   return 0;
4744 }
4745 _ACEOF
4746 rm -f conftest.o conftest.obj
4747 if { { ac_try="$ac_compile"
4748 case "(($ac_try" in
4749   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4750   *) ac_try_echo=$ac_try;;
4751 esac
4752 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4753 $as_echo "$ac_try_echo"; } >&5
4754   (eval "$ac_compile") 2>&5
4755   ac_status=$?
4756   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4757   test $ac_status = 0; }; then :
4758   for ac_file in conftest.o conftest.obj conftest.*; do
4759   test -f "$ac_file" || continue;
4760   case $ac_file in
4761     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4762     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4763        break;;
4764   esac
4765 done
4766 else
4767   $as_echo "$as_me: failed program was:" >&5
4768 sed 's/^/| /' conftest.$ac_ext >&5
4769
4770 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4771 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4772 as_fn_error $? "cannot compute suffix of object files: cannot compile
4773 See \`config.log' for more details" "$LINENO" 5; }
4774 fi
4775 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4776 fi
4777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4778 $as_echo "$ac_cv_objext" >&6; }
4779 OBJEXT=$ac_cv_objext
4780 ac_objext=$OBJEXT
4781 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4782 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4783 if ${ac_cv_c_compiler_gnu+:} false; then :
4784   $as_echo_n "(cached) " >&6
4785 else
4786   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4787 /* end confdefs.h.  */
4788
4789 int
4790 main ()
4791 {
4792 #ifndef __GNUC__
4793        choke me
4794 #endif
4795
4796   ;
4797   return 0;
4798 }
4799 _ACEOF
4800 if ac_fn_c_try_compile "$LINENO"; then :
4801   ac_compiler_gnu=yes
4802 else
4803   ac_compiler_gnu=no
4804 fi
4805 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4806 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4807
4808 fi
4809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4810 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4811 if test $ac_compiler_gnu = yes; then
4812   GCC=yes
4813 else
4814   GCC=
4815 fi
4816 ac_test_CFLAGS=${CFLAGS+set}
4817 ac_save_CFLAGS=$CFLAGS
4818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4819 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4820 if ${ac_cv_prog_cc_g+:} false; then :
4821   $as_echo_n "(cached) " >&6
4822 else
4823   ac_save_c_werror_flag=$ac_c_werror_flag
4824    ac_c_werror_flag=yes
4825    ac_cv_prog_cc_g=no
4826    CFLAGS="-g"
4827    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4828 /* end confdefs.h.  */
4829
4830 int
4831 main ()
4832 {
4833
4834   ;
4835   return 0;
4836 }
4837 _ACEOF
4838 if ac_fn_c_try_compile "$LINENO"; then :
4839   ac_cv_prog_cc_g=yes
4840 else
4841   CFLAGS=""
4842       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4843 /* end confdefs.h.  */
4844
4845 int
4846 main ()
4847 {
4848
4849   ;
4850   return 0;
4851 }
4852 _ACEOF
4853 if ac_fn_c_try_compile "$LINENO"; then :
4854
4855 else
4856   ac_c_werror_flag=$ac_save_c_werror_flag
4857          CFLAGS="-g"
4858          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4859 /* end confdefs.h.  */
4860
4861 int
4862 main ()
4863 {
4864
4865   ;
4866   return 0;
4867 }
4868 _ACEOF
4869 if ac_fn_c_try_compile "$LINENO"; then :
4870   ac_cv_prog_cc_g=yes
4871 fi
4872 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4873 fi
4874 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4875 fi
4876 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4877    ac_c_werror_flag=$ac_save_c_werror_flag
4878 fi
4879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4880 $as_echo "$ac_cv_prog_cc_g" >&6; }
4881 if test "$ac_test_CFLAGS" = set; then
4882   CFLAGS=$ac_save_CFLAGS
4883 elif test $ac_cv_prog_cc_g = yes; then
4884   if test "$GCC" = yes; then
4885     CFLAGS="-g -O2"
4886   else
4887     CFLAGS="-g"
4888   fi
4889 else
4890   if test "$GCC" = yes; then
4891     CFLAGS="-O2"
4892   else
4893     CFLAGS=
4894   fi
4895 fi
4896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4897 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4898 if ${ac_cv_prog_cc_c89+:} false; then :
4899   $as_echo_n "(cached) " >&6
4900 else
4901   ac_cv_prog_cc_c89=no
4902 ac_save_CC=$CC
4903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4904 /* end confdefs.h.  */
4905 #include <stdarg.h>
4906 #include <stdio.h>
4907 struct stat;
4908 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4909 struct buf { int x; };
4910 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4911 static char *e (p, i)
4912      char **p;
4913      int i;
4914 {
4915   return p[i];
4916 }
4917 static char *f (char * (*g) (char **, int), char **p, ...)
4918 {
4919   char *s;
4920   va_list v;
4921   va_start (v,p);
4922   s = g (p, va_arg (v,int));
4923   va_end (v);
4924   return s;
4925 }
4926
4927 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
4928    function prototypes and stuff, but not '\xHH' hex character constants.
4929    These don't provoke an error unfortunately, instead are silently treated
4930    as 'x'.  The following induces an error, until -std is added to get
4931    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
4932    array size at least.  It's necessary to write '\x00'==0 to get something
4933    that's true only with -std.  */
4934 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4935
4936 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4937    inside strings and character constants.  */
4938 #define FOO(x) 'x'
4939 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4940
4941 int test (int i, double x);
4942 struct s1 {int (*f) (int a);};
4943 struct s2 {int (*f) (double a);};
4944 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4945 int argc;
4946 char **argv;
4947 int
4948 main ()
4949 {
4950 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4951   ;
4952   return 0;
4953 }
4954 _ACEOF
4955 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4956         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4957 do
4958   CC="$ac_save_CC $ac_arg"
4959   if ac_fn_c_try_compile "$LINENO"; then :
4960   ac_cv_prog_cc_c89=$ac_arg
4961 fi
4962 rm -f core conftest.err conftest.$ac_objext
4963   test "x$ac_cv_prog_cc_c89" != "xno" && break
4964 done
4965 rm -f conftest.$ac_ext
4966 CC=$ac_save_CC
4967
4968 fi
4969 # AC_CACHE_VAL
4970 case "x$ac_cv_prog_cc_c89" in
4971   x)
4972     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4973 $as_echo "none needed" >&6; } ;;
4974   xno)
4975     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4976 $as_echo "unsupported" >&6; } ;;
4977   *)
4978     CC="$CC $ac_cv_prog_cc_c89"
4979     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4980 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4981 esac
4982 if test "x$ac_cv_prog_cc_c89" != xno; then :
4983
4984 fi
4985
4986 ac_ext=c
4987 ac_cpp='$CPP $CPPFLAGS'
4988 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4989 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4990 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4991 DEPDIR="${am__leading_dot}deps"
4992
4993 ac_config_commands="$ac_config_commands depfiles"
4994
4995
4996 am_make=${MAKE-make}
4997 cat > confinc << 'END'
4998 am__doit:
4999         @echo this is the am__doit target
5000 .PHONY: am__doit
5001 END
5002 # If we don't find an include directive, just comment out the code.
5003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
5004 $as_echo_n "checking for style of include used by $am_make... " >&6; }
5005 am__include="#"
5006 am__quote=
5007 _am_result=none
5008 # First try GNU make style include.
5009 echo "include confinc" > confmf
5010 # Ignore all kinds of additional output from 'make'.
5011 case `$am_make -s -f confmf 2> /dev/null` in #(
5012 *the\ am__doit\ target*)
5013   am__include=include
5014   am__quote=
5015   _am_result=GNU
5016   ;;
5017 esac
5018 # Now try BSD make style include.
5019 if test "$am__include" = "#"; then
5020    echo '.include "confinc"' > confmf
5021    case `$am_make -s -f confmf 2> /dev/null` in #(
5022    *the\ am__doit\ target*)
5023      am__include=.include
5024      am__quote="\""
5025      _am_result=BSD
5026      ;;
5027    esac
5028 fi
5029
5030
5031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
5032 $as_echo "$_am_result" >&6; }
5033 rm -f confinc confmf
5034
5035 # Check whether --enable-dependency-tracking was given.
5036 if test "${enable_dependency_tracking+set}" = set; then :
5037   enableval=$enable_dependency_tracking;
5038 fi
5039
5040 if test "x$enable_dependency_tracking" != xno; then
5041   am_depcomp="$ac_aux_dir/depcomp"
5042   AMDEPBACKSLASH='\'
5043   am__nodep='_no'
5044 fi
5045  if test "x$enable_dependency_tracking" != xno; then
5046   AMDEP_TRUE=
5047   AMDEP_FALSE='#'
5048 else
5049   AMDEP_TRUE='#'
5050   AMDEP_FALSE=
5051 fi
5052
5053
5054
5055 depcc="$CC"   am_compiler_list=
5056
5057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
5058 $as_echo_n "checking dependency style of $depcc... " >&6; }
5059 if ${am_cv_CC_dependencies_compiler_type+:} false; then :
5060   $as_echo_n "(cached) " >&6
5061 else
5062   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
5063   # We make a subdir and do the tests there.  Otherwise we can end up
5064   # making bogus files that we don't know about and never remove.  For
5065   # instance it was reported that on HP-UX the gcc test will end up
5066   # making a dummy file named 'D' -- because '-MD' means "put the output
5067   # in D".
5068   rm -rf conftest.dir
5069   mkdir conftest.dir
5070   # Copy depcomp to subdir because otherwise we won't find it if we're
5071   # using a relative directory.
5072   cp "$am_depcomp" conftest.dir
5073   cd conftest.dir
5074   # We will build objects and dependencies in a subdirectory because
5075   # it helps to detect inapplicable dependency modes.  For instance
5076   # both Tru64's cc and ICC support -MD to output dependencies as a
5077   # side effect of compilation, but ICC will put the dependencies in
5078   # the current directory while Tru64 will put them in the object
5079   # directory.
5080   mkdir sub
5081
5082   am_cv_CC_dependencies_compiler_type=none
5083   if test "$am_compiler_list" = ""; then
5084      am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5085   fi
5086   am__universal=false
5087   case " $depcc " in #(
5088      *\ -arch\ *\ -arch\ *) am__universal=true ;;
5089      esac
5090
5091   for depmode in $am_compiler_list; do
5092     # Setup a source with many dependencies, because some compilers
5093     # like to wrap large dependency lists on column 80 (with \), and
5094     # we should not choose a depcomp mode which is confused by this.
5095     #
5096     # We need to recreate these files for each test, as the compiler may
5097     # overwrite some of them when testing with obscure command lines.
5098     # This happens at least with the AIX C compiler.
5099     : > sub/conftest.c
5100     for i in 1 2 3 4 5 6; do
5101       echo '#include "conftst'$i'.h"' >> sub/conftest.c
5102       # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
5103       # Solaris 10 /bin/sh.
5104       echo '/* dummy */' > sub/conftst$i.h
5105     done
5106     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
5107
5108     # We check with '-c' and '-o' for the sake of the "dashmstdout"
5109     # mode.  It turns out that the SunPro C++ compiler does not properly
5110     # handle '-M -o', and we need to detect this.  Also, some Intel
5111     # versions had trouble with output in subdirs.
5112     am__obj=sub/conftest.${OBJEXT-o}
5113     am__minus_obj="-o $am__obj"
5114     case $depmode in
5115     gcc)
5116       # This depmode causes a compiler race in universal mode.
5117       test "$am__universal" = false || continue
5118       ;;
5119     nosideeffect)
5120       # After this tag, mechanisms are not by side-effect, so they'll
5121       # only be used when explicitly requested.
5122       if test "x$enable_dependency_tracking" = xyes; then
5123         continue
5124       else
5125         break
5126       fi
5127       ;;
5128     msvc7 | msvc7msys | msvisualcpp | msvcmsys)
5129       # This compiler won't grok '-c -o', but also, the minuso test has
5130       # not run yet.  These depmodes are late enough in the game, and
5131       # so weak that their functioning should not be impacted.
5132       am__obj=conftest.${OBJEXT-o}
5133       am__minus_obj=
5134       ;;
5135     none) break ;;
5136     esac
5137     if depmode=$depmode \
5138        source=sub/conftest.c object=$am__obj \
5139        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5140        $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
5141          >/dev/null 2>conftest.err &&
5142        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
5143        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
5144        grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
5145        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
5146       # icc doesn't choke on unknown options, it will just issue warnings
5147       # or remarks (even with -Werror).  So we grep stderr for any message
5148       # that says an option was ignored or not supported.
5149       # When given -MP, icc 7.0 and 7.1 complain thusly:
5150       #   icc: Command line warning: ignoring option '-M'; no argument required
5151       # The diagnosis changed in icc 8.0:
5152       #   icc: Command line remark: option '-MP' not supported
5153       if (grep 'ignoring option' conftest.err ||
5154           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
5155         am_cv_CC_dependencies_compiler_type=$depmode
5156         break
5157       fi
5158     fi
5159   done
5160
5161   cd ..
5162   rm -rf conftest.dir
5163 else
5164   am_cv_CC_dependencies_compiler_type=none
5165 fi
5166
5167 fi
5168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
5169 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
5170 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
5171
5172  if
5173   test "x$enable_dependency_tracking" != xno \
5174   && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
5175   am__fastdepCC_TRUE=
5176   am__fastdepCC_FALSE='#'
5177 else
5178   am__fastdepCC_TRUE='#'
5179   am__fastdepCC_FALSE=
5180 fi
5181
5182
5183
5184 if test -n "$ac_tool_prefix"; then
5185   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5186 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
5187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5188 $as_echo_n "checking for $ac_word... " >&6; }
5189 if ${ac_cv_prog_RANLIB+:} false; then :
5190   $as_echo_n "(cached) " >&6
5191 else
5192   if test -n "$RANLIB"; then
5193   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5194 else
5195 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5196 for as_dir in $PATH
5197 do
5198   IFS=$as_save_IFS
5199   test -z "$as_dir" && as_dir=.
5200     for ac_exec_ext in '' $ac_executable_extensions; do
5201   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5202     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5203     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5204     break 2
5205   fi
5206 done
5207   done
5208 IFS=$as_save_IFS
5209
5210 fi
5211 fi
5212 RANLIB=$ac_cv_prog_RANLIB
5213 if test -n "$RANLIB"; then
5214   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5215 $as_echo "$RANLIB" >&6; }
5216 else
5217   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5218 $as_echo "no" >&6; }
5219 fi
5220
5221
5222 fi
5223 if test -z "$ac_cv_prog_RANLIB"; then
5224   ac_ct_RANLIB=$RANLIB
5225   # Extract the first word of "ranlib", so it can be a program name with args.
5226 set dummy ranlib; ac_word=$2
5227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5228 $as_echo_n "checking for $ac_word... " >&6; }
5229 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
5230   $as_echo_n "(cached) " >&6
5231 else
5232   if test -n "$ac_ct_RANLIB"; then
5233   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5234 else
5235 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5236 for as_dir in $PATH
5237 do
5238   IFS=$as_save_IFS
5239   test -z "$as_dir" && as_dir=.
5240     for ac_exec_ext in '' $ac_executable_extensions; do
5241   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5242     ac_cv_prog_ac_ct_RANLIB="ranlib"
5243     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5244     break 2
5245   fi
5246 done
5247   done
5248 IFS=$as_save_IFS
5249
5250 fi
5251 fi
5252 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5253 if test -n "$ac_ct_RANLIB"; then
5254   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5255 $as_echo "$ac_ct_RANLIB" >&6; }
5256 else
5257   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5258 $as_echo "no" >&6; }
5259 fi
5260
5261   if test "x$ac_ct_RANLIB" = x; then
5262     RANLIB=":"
5263   else
5264     case $cross_compiling:$ac_tool_warned in
5265 yes:)
5266 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5267 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5268 ac_tool_warned=yes ;;
5269 esac
5270     RANLIB=$ac_ct_RANLIB
5271   fi
5272 else
5273   RANLIB="$ac_cv_prog_RANLIB"
5274 fi
5275
5276 for ac_prog in 'bison -y' byacc
5277 do
5278   # Extract the first word of "$ac_prog", so it can be a program name with args.
5279 set dummy $ac_prog; ac_word=$2
5280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5281 $as_echo_n "checking for $ac_word... " >&6; }
5282 if ${ac_cv_prog_YACC+:} false; then :
5283   $as_echo_n "(cached) " >&6
5284 else
5285   if test -n "$YACC"; then
5286   ac_cv_prog_YACC="$YACC" # Let the user override the test.
5287 else
5288 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5289 for as_dir in $PATH
5290 do
5291   IFS=$as_save_IFS
5292   test -z "$as_dir" && as_dir=.
5293     for ac_exec_ext in '' $ac_executable_extensions; do
5294   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5295     ac_cv_prog_YACC="$ac_prog"
5296     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5297     break 2
5298   fi
5299 done
5300   done
5301 IFS=$as_save_IFS
5302
5303 fi
5304 fi
5305 YACC=$ac_cv_prog_YACC
5306 if test -n "$YACC"; then
5307   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
5308 $as_echo "$YACC" >&6; }
5309 else
5310   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5311 $as_echo "no" >&6; }
5312 fi
5313
5314
5315   test -n "$YACC" && break
5316 done
5317 test -n "$YACC" || YACC="yacc"
5318
5319
5320 ac_ext=c
5321 ac_cpp='$CPP $CPPFLAGS'
5322 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5323 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5324 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5325 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5326 $as_echo_n "checking how to run the C preprocessor... " >&6; }
5327 # On Suns, sometimes $CPP names a directory.
5328 if test -n "$CPP" && test -d "$CPP"; then
5329   CPP=
5330 fi
5331 if test -z "$CPP"; then
5332   if ${ac_cv_prog_CPP+:} false; then :
5333   $as_echo_n "(cached) " >&6
5334 else
5335       # Double quotes because CPP needs to be expanded
5336     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5337     do
5338       ac_preproc_ok=false
5339 for ac_c_preproc_warn_flag in '' yes
5340 do
5341   # Use a header file that comes with gcc, so configuring glibc
5342   # with a fresh cross-compiler works.
5343   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5344   # <limits.h> exists even on freestanding compilers.
5345   # On the NeXT, cc -E runs the code through the compiler's parser,
5346   # not just through cpp. "Syntax error" is here to catch this case.
5347   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5348 /* end confdefs.h.  */
5349 #ifdef __STDC__
5350 # include <limits.h>
5351 #else
5352 # include <assert.h>
5353 #endif
5354                      Syntax error
5355 _ACEOF
5356 if ac_fn_c_try_cpp "$LINENO"; then :
5357
5358 else
5359   # Broken: fails on valid input.
5360 continue
5361 fi
5362 rm -f conftest.err conftest.i conftest.$ac_ext
5363
5364   # OK, works on sane cases.  Now check whether nonexistent headers
5365   # can be detected and how.
5366   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5367 /* end confdefs.h.  */
5368 #include <ac_nonexistent.h>
5369 _ACEOF
5370 if ac_fn_c_try_cpp "$LINENO"; then :
5371   # Broken: success on invalid input.
5372 continue
5373 else
5374   # Passes both tests.
5375 ac_preproc_ok=:
5376 break
5377 fi
5378 rm -f conftest.err conftest.i conftest.$ac_ext
5379
5380 done
5381 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5382 rm -f conftest.i conftest.err conftest.$ac_ext
5383 if $ac_preproc_ok; then :
5384   break
5385 fi
5386
5387     done
5388     ac_cv_prog_CPP=$CPP
5389
5390 fi
5391   CPP=$ac_cv_prog_CPP
5392 else
5393   ac_cv_prog_CPP=$CPP
5394 fi
5395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5396 $as_echo "$CPP" >&6; }
5397 ac_preproc_ok=false
5398 for ac_c_preproc_warn_flag in '' yes
5399 do
5400   # Use a header file that comes with gcc, so configuring glibc
5401   # with a fresh cross-compiler works.
5402   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5403   # <limits.h> exists even on freestanding compilers.
5404   # On the NeXT, cc -E runs the code through the compiler's parser,
5405   # not just through cpp. "Syntax error" is here to catch this case.
5406   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5407 /* end confdefs.h.  */
5408 #ifdef __STDC__
5409 # include <limits.h>
5410 #else
5411 # include <assert.h>
5412 #endif
5413                      Syntax error
5414 _ACEOF
5415 if ac_fn_c_try_cpp "$LINENO"; then :
5416
5417 else
5418   # Broken: fails on valid input.
5419 continue
5420 fi
5421 rm -f conftest.err conftest.i conftest.$ac_ext
5422
5423   # OK, works on sane cases.  Now check whether nonexistent headers
5424   # can be detected and how.
5425   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5426 /* end confdefs.h.  */
5427 #include <ac_nonexistent.h>
5428 _ACEOF
5429 if ac_fn_c_try_cpp "$LINENO"; then :
5430   # Broken: success on invalid input.
5431 continue
5432 else
5433   # Passes both tests.
5434 ac_preproc_ok=:
5435 break
5436 fi
5437 rm -f conftest.err conftest.i conftest.$ac_ext
5438
5439 done
5440 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5441 rm -f conftest.i conftest.err conftest.$ac_ext
5442 if $ac_preproc_ok; then :
5443
5444 else
5445   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5446 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5447 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
5448 See \`config.log' for more details" "$LINENO" 5; }
5449 fi
5450
5451 ac_ext=c
5452 ac_cpp='$CPP $CPPFLAGS'
5453 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5454 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5455 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5456
5457
5458 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5459 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5460 if ${ac_cv_path_GREP+:} false; then :
5461   $as_echo_n "(cached) " >&6
5462 else
5463   if test -z "$GREP"; then
5464   ac_path_GREP_found=false
5465   # Loop through the user's path and test for each of PROGNAME-LIST
5466   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5467 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5468 do
5469   IFS=$as_save_IFS
5470   test -z "$as_dir" && as_dir=.
5471     for ac_prog in grep ggrep; do
5472     for ac_exec_ext in '' $ac_executable_extensions; do
5473       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5474       as_fn_executable_p "$ac_path_GREP" || continue
5475 # Check for GNU ac_path_GREP and select it if it is found.
5476   # Check for GNU $ac_path_GREP
5477 case `"$ac_path_GREP" --version 2>&1` in
5478 *GNU*)
5479   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5480 *)
5481   ac_count=0
5482   $as_echo_n 0123456789 >"conftest.in"
5483   while :
5484   do
5485     cat "conftest.in" "conftest.in" >"conftest.tmp"
5486     mv "conftest.tmp" "conftest.in"
5487     cp "conftest.in" "conftest.nl"
5488     $as_echo 'GREP' >> "conftest.nl"
5489     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5490     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5491     as_fn_arith $ac_count + 1 && ac_count=$as_val
5492     if test $ac_count -gt ${ac_path_GREP_max-0}; then
5493       # Best one so far, save it but keep looking for a better one
5494       ac_cv_path_GREP="$ac_path_GREP"
5495       ac_path_GREP_max=$ac_count
5496     fi
5497     # 10*(2^10) chars as input seems more than enough
5498     test $ac_count -gt 10 && break
5499   done
5500   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5501 esac
5502
5503       $ac_path_GREP_found && break 3
5504     done
5505   done
5506   done
5507 IFS=$as_save_IFS
5508   if test -z "$ac_cv_path_GREP"; then
5509     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5510   fi
5511 else
5512   ac_cv_path_GREP=$GREP
5513 fi
5514
5515 fi
5516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5517 $as_echo "$ac_cv_path_GREP" >&6; }
5518  GREP="$ac_cv_path_GREP"
5519
5520
5521 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5522 $as_echo_n "checking for egrep... " >&6; }
5523 if ${ac_cv_path_EGREP+:} false; then :
5524   $as_echo_n "(cached) " >&6
5525 else
5526   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5527    then ac_cv_path_EGREP="$GREP -E"
5528    else
5529      if test -z "$EGREP"; then
5530   ac_path_EGREP_found=false
5531   # Loop through the user's path and test for each of PROGNAME-LIST
5532   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5533 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5534 do
5535   IFS=$as_save_IFS
5536   test -z "$as_dir" && as_dir=.
5537     for ac_prog in egrep; do
5538     for ac_exec_ext in '' $ac_executable_extensions; do
5539       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5540       as_fn_executable_p "$ac_path_EGREP" || continue
5541 # Check for GNU ac_path_EGREP and select it if it is found.
5542   # Check for GNU $ac_path_EGREP
5543 case `"$ac_path_EGREP" --version 2>&1` in
5544 *GNU*)
5545   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5546 *)
5547   ac_count=0
5548   $as_echo_n 0123456789 >"conftest.in"
5549   while :
5550   do
5551     cat "conftest.in" "conftest.in" >"conftest.tmp"
5552     mv "conftest.tmp" "conftest.in"
5553     cp "conftest.in" "conftest.nl"
5554     $as_echo 'EGREP' >> "conftest.nl"
5555     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5556     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5557     as_fn_arith $ac_count + 1 && ac_count=$as_val
5558     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5559       # Best one so far, save it but keep looking for a better one
5560       ac_cv_path_EGREP="$ac_path_EGREP"
5561       ac_path_EGREP_max=$ac_count
5562     fi
5563     # 10*(2^10) chars as input seems more than enough
5564     test $ac_count -gt 10 && break
5565   done
5566   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5567 esac
5568
5569       $ac_path_EGREP_found && break 3
5570     done
5571   done
5572   done
5573 IFS=$as_save_IFS
5574   if test -z "$ac_cv_path_EGREP"; then
5575     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5576   fi
5577 else
5578   ac_cv_path_EGREP=$EGREP
5579 fi
5580
5581    fi
5582 fi
5583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5584 $as_echo "$ac_cv_path_EGREP" >&6; }
5585  EGREP="$ac_cv_path_EGREP"
5586
5587
5588
5589
5590   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
5591 $as_echo_n "checking for Minix Amsterdam compiler... " >&6; }
5592 if ${gl_cv_c_amsterdam_compiler+:} false; then :
5593   $as_echo_n "(cached) " >&6
5594 else
5595
5596       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5597 /* end confdefs.h.  */
5598
5599 #ifdef __ACK__
5600 Amsterdam
5601 #endif
5602
5603 _ACEOF
5604 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5605   $EGREP "Amsterdam" >/dev/null 2>&1; then :
5606   gl_cv_c_amsterdam_compiler=yes
5607 else
5608   gl_cv_c_amsterdam_compiler=no
5609 fi
5610 rm -f conftest*
5611
5612
5613 fi
5614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
5615 $as_echo "$gl_cv_c_amsterdam_compiler" >&6; }
5616   if test -z "$AR"; then
5617     if test $gl_cv_c_amsterdam_compiler = yes; then
5618       AR='cc -c.a'
5619       if test -z "$ARFLAGS"; then
5620         ARFLAGS='-o'
5621       fi
5622     else
5623                   if test -n "$ac_tool_prefix"; then
5624   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
5625 set dummy ${ac_tool_prefix}ar; ac_word=$2
5626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5627 $as_echo_n "checking for $ac_word... " >&6; }
5628 if ${ac_cv_prog_AR+:} false; then :
5629   $as_echo_n "(cached) " >&6
5630 else
5631   if test -n "$AR"; then
5632   ac_cv_prog_AR="$AR" # Let the user override the test.
5633 else
5634 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5635 for as_dir in $PATH
5636 do
5637   IFS=$as_save_IFS
5638   test -z "$as_dir" && as_dir=.
5639     for ac_exec_ext in '' $ac_executable_extensions; do
5640   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5641     ac_cv_prog_AR="${ac_tool_prefix}ar"
5642     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5643     break 2
5644   fi
5645 done
5646   done
5647 IFS=$as_save_IFS
5648
5649 fi
5650 fi
5651 AR=$ac_cv_prog_AR
5652 if test -n "$AR"; then
5653   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5654 $as_echo "$AR" >&6; }
5655 else
5656   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5657 $as_echo "no" >&6; }
5658 fi
5659
5660
5661 fi
5662 if test -z "$ac_cv_prog_AR"; then
5663   ac_ct_AR=$AR
5664   # Extract the first word of "ar", so it can be a program name with args.
5665 set dummy ar; ac_word=$2
5666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5667 $as_echo_n "checking for $ac_word... " >&6; }
5668 if ${ac_cv_prog_ac_ct_AR+:} false; then :
5669   $as_echo_n "(cached) " >&6
5670 else
5671   if test -n "$ac_ct_AR"; then
5672   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5673 else
5674 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5675 for as_dir in $PATH
5676 do
5677   IFS=$as_save_IFS
5678   test -z "$as_dir" && as_dir=.
5679     for ac_exec_ext in '' $ac_executable_extensions; do
5680   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5681     ac_cv_prog_ac_ct_AR="ar"
5682     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5683     break 2
5684   fi
5685 done
5686   done
5687 IFS=$as_save_IFS
5688
5689 fi
5690 fi
5691 ac_ct_AR=$ac_cv_prog_ac_ct_AR
5692 if test -n "$ac_ct_AR"; then
5693   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5694 $as_echo "$ac_ct_AR" >&6; }
5695 else
5696   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5697 $as_echo "no" >&6; }
5698 fi
5699
5700   if test "x$ac_ct_AR" = x; then
5701     AR="ar"
5702   else
5703     case $cross_compiling:$ac_tool_warned in
5704 yes:)
5705 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5706 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5707 ac_tool_warned=yes ;;
5708 esac
5709     AR=$ac_ct_AR
5710   fi
5711 else
5712   AR="$ac_cv_prog_AR"
5713 fi
5714
5715       if test -z "$ARFLAGS"; then
5716         ARFLAGS='cru'
5717       fi
5718     fi
5719   else
5720     if test -z "$ARFLAGS"; then
5721       ARFLAGS='cru'
5722     fi
5723   fi
5724
5725
5726   if test -z "$RANLIB"; then
5727     if test $gl_cv_c_amsterdam_compiler = yes; then
5728       RANLIB=':'
5729     else
5730             if test -n "$ac_tool_prefix"; then
5731   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5732 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
5733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5734 $as_echo_n "checking for $ac_word... " >&6; }
5735 if ${ac_cv_prog_RANLIB+:} false; then :
5736   $as_echo_n "(cached) " >&6
5737 else
5738   if test -n "$RANLIB"; then
5739   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5740 else
5741 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5742 for as_dir in $PATH
5743 do
5744   IFS=$as_save_IFS
5745   test -z "$as_dir" && as_dir=.
5746     for ac_exec_ext in '' $ac_executable_extensions; do
5747   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5748     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5749     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5750     break 2
5751   fi
5752 done
5753   done
5754 IFS=$as_save_IFS
5755
5756 fi
5757 fi
5758 RANLIB=$ac_cv_prog_RANLIB
5759 if test -n "$RANLIB"; then
5760   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5761 $as_echo "$RANLIB" >&6; }
5762 else
5763   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5764 $as_echo "no" >&6; }
5765 fi
5766
5767
5768 fi
5769 if test -z "$ac_cv_prog_RANLIB"; then
5770   ac_ct_RANLIB=$RANLIB
5771   # Extract the first word of "ranlib", so it can be a program name with args.
5772 set dummy ranlib; ac_word=$2
5773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5774 $as_echo_n "checking for $ac_word... " >&6; }
5775 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
5776   $as_echo_n "(cached) " >&6
5777 else
5778   if test -n "$ac_ct_RANLIB"; then
5779   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5780 else
5781 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5782 for as_dir in $PATH
5783 do
5784   IFS=$as_save_IFS
5785   test -z "$as_dir" && as_dir=.
5786     for ac_exec_ext in '' $ac_executable_extensions; do
5787   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5788     ac_cv_prog_ac_ct_RANLIB="ranlib"
5789     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5790     break 2
5791   fi
5792 done
5793   done
5794 IFS=$as_save_IFS
5795
5796 fi
5797 fi
5798 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5799 if test -n "$ac_ct_RANLIB"; then
5800   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5801 $as_echo "$ac_ct_RANLIB" >&6; }
5802 else
5803   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5804 $as_echo "no" >&6; }
5805 fi
5806
5807   if test "x$ac_ct_RANLIB" = x; then
5808     RANLIB=":"
5809   else
5810     case $cross_compiling:$ac_tool_warned in
5811 yes:)
5812 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5813 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5814 ac_tool_warned=yes ;;
5815 esac
5816     RANLIB=$ac_ct_RANLIB
5817   fi
5818 else
5819   RANLIB="$ac_cv_prog_RANLIB"
5820 fi
5821
5822     fi
5823   fi
5824
5825
5826 if test "x$CC" != xcc; then
5827   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5
5828 $as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
5829 else
5830   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5
5831 $as_echo_n "checking whether cc understands -c and -o together... " >&6; }
5832 fi
5833 set dummy $CC; ac_cc=`$as_echo "$2" |
5834                       sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
5835 if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then :
5836   $as_echo_n "(cached) " >&6
5837 else
5838   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5839 /* end confdefs.h.  */
5840
5841 int
5842 main ()
5843 {
5844
5845   ;
5846   return 0;
5847 }
5848 _ACEOF
5849 # Make sure it works both with $CC and with simple cc.
5850 # We do the test twice because some compilers refuse to overwrite an
5851 # existing .o file with -o, though they will create one.
5852 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
5853 rm -f conftest2.*
5854 if { { case "(($ac_try" in
5855   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5856   *) ac_try_echo=$ac_try;;
5857 esac
5858 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5859 $as_echo "$ac_try_echo"; } >&5
5860   (eval "$ac_try") 2>&5
5861   ac_status=$?
5862   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5863   test $ac_status = 0; } &&
5864    test -f conftest2.$ac_objext && { { case "(($ac_try" in
5865   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5866   *) ac_try_echo=$ac_try;;
5867 esac
5868 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5869 $as_echo "$ac_try_echo"; } >&5
5870   (eval "$ac_try") 2>&5
5871   ac_status=$?
5872   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5873   test $ac_status = 0; };
5874 then
5875   eval ac_cv_prog_cc_${ac_cc}_c_o=yes
5876   if test "x$CC" != xcc; then
5877     # Test first that cc exists at all.
5878     if { ac_try='cc -c conftest.$ac_ext >&5'
5879   { { case "(($ac_try" in
5880   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5881   *) ac_try_echo=$ac_try;;
5882 esac
5883 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5884 $as_echo "$ac_try_echo"; } >&5
5885   (eval "$ac_try") 2>&5
5886   ac_status=$?
5887   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5888   test $ac_status = 0; }; }; then
5889       ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
5890       rm -f conftest2.*
5891       if { { case "(($ac_try" in
5892   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5893   *) ac_try_echo=$ac_try;;
5894 esac
5895 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5896 $as_echo "$ac_try_echo"; } >&5
5897   (eval "$ac_try") 2>&5
5898   ac_status=$?
5899   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5900   test $ac_status = 0; } &&
5901          test -f conftest2.$ac_objext && { { case "(($ac_try" in
5902   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5903   *) ac_try_echo=$ac_try;;
5904 esac
5905 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5906 $as_echo "$ac_try_echo"; } >&5
5907   (eval "$ac_try") 2>&5
5908   ac_status=$?
5909   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5910   test $ac_status = 0; };
5911       then
5912         # cc works too.
5913         :
5914       else
5915         # cc exists but doesn't like -o.
5916         eval ac_cv_prog_cc_${ac_cc}_c_o=no
5917       fi
5918     fi
5919   fi
5920 else
5921   eval ac_cv_prog_cc_${ac_cc}_c_o=no
5922 fi
5923 rm -f core conftest*
5924
5925 fi
5926 if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
5927   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5928 $as_echo "yes" >&6; }
5929 else
5930   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5931 $as_echo "no" >&6; }
5932
5933 $as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h
5934
5935 fi
5936
5937 # FIXME: we rely on the cache variable name because
5938 # there is no other way.
5939 set dummy $CC
5940 am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
5941 eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
5942 if test "$am_t" != yes; then
5943    # Losing compiler, so override with the script.
5944    # FIXME: It is wrong to rewrite CC.
5945    # But if we don't then we get into trouble of one sort or another.
5946    # A longer-term fix would be to have automake use am__CC in this case,
5947    # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
5948    CC="$am_aux_dir/compile $CC"
5949 fi
5950
5951
5952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5953 $as_echo_n "checking for ANSI C header files... " >&6; }
5954 if ${ac_cv_header_stdc+:} false; then :
5955   $as_echo_n "(cached) " >&6
5956 else
5957   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5958 /* end confdefs.h.  */
5959 #include <stdlib.h>
5960 #include <stdarg.h>
5961 #include <string.h>
5962 #include <float.h>
5963
5964 int
5965 main ()
5966 {
5967
5968   ;
5969   return 0;
5970 }
5971 _ACEOF
5972 if ac_fn_c_try_compile "$LINENO"; then :
5973   ac_cv_header_stdc=yes
5974 else
5975   ac_cv_header_stdc=no
5976 fi
5977 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5978
5979 if test $ac_cv_header_stdc = yes; then
5980   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5981   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5982 /* end confdefs.h.  */
5983 #include <string.h>
5984
5985 _ACEOF
5986 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5987   $EGREP "memchr" >/dev/null 2>&1; then :
5988
5989 else
5990   ac_cv_header_stdc=no
5991 fi
5992 rm -f conftest*
5993
5994 fi
5995
5996 if test $ac_cv_header_stdc = yes; then
5997   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5998   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5999 /* end confdefs.h.  */
6000 #include <stdlib.h>
6001
6002 _ACEOF
6003 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6004   $EGREP "free" >/dev/null 2>&1; then :
6005
6006 else
6007   ac_cv_header_stdc=no
6008 fi
6009 rm -f conftest*
6010
6011 fi
6012
6013 if test $ac_cv_header_stdc = yes; then
6014   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6015   if test "$cross_compiling" = yes; then :
6016   :
6017 else
6018   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6019 /* end confdefs.h.  */
6020 #include <ctype.h>
6021 #include <stdlib.h>
6022 #if ((' ' & 0x0FF) == 0x020)
6023 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6024 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6025 #else
6026 # define ISLOWER(c) \
6027                    (('a' <= (c) && (c) <= 'i') \
6028                      || ('j' <= (c) && (c) <= 'r') \
6029                      || ('s' <= (c) && (c) <= 'z'))
6030 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6031 #endif
6032
6033 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6034 int
6035 main ()
6036 {
6037   int i;
6038   for (i = 0; i < 256; i++)
6039     if (XOR (islower (i), ISLOWER (i))
6040         || toupper (i) != TOUPPER (i))
6041       return 2;
6042   return 0;
6043 }
6044 _ACEOF
6045 if ac_fn_c_try_run "$LINENO"; then :
6046
6047 else
6048   ac_cv_header_stdc=no
6049 fi
6050 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6051   conftest.$ac_objext conftest.beam conftest.$ac_ext
6052 fi
6053
6054 fi
6055 fi
6056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6057 $as_echo "$ac_cv_header_stdc" >&6; }
6058 if test $ac_cv_header_stdc = yes; then
6059
6060 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
6061
6062 fi
6063
6064 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
6065 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
6066                   inttypes.h stdint.h unistd.h
6067 do :
6068   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6069 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
6070 "
6071 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6072   cat >>confdefs.h <<_ACEOF
6073 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6074 _ACEOF
6075
6076 fi
6077
6078 done
6079
6080
6081
6082   ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
6083 if test "x$ac_cv_header_minix_config_h" = xyes; then :
6084   MINIX=yes
6085 else
6086   MINIX=
6087 fi
6088
6089
6090   if test "$MINIX" = yes; then
6091
6092 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
6093
6094
6095 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
6096
6097
6098 $as_echo "#define _MINIX 1" >>confdefs.h
6099
6100
6101 $as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
6102
6103   fi
6104
6105
6106   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
6107 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
6108 if ${ac_cv_safe_to_define___extensions__+:} false; then :
6109   $as_echo_n "(cached) " >&6
6110 else
6111   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6112 /* end confdefs.h.  */
6113
6114 #         define __EXTENSIONS__ 1
6115           $ac_includes_default
6116 int
6117 main ()
6118 {
6119
6120   ;
6121   return 0;
6122 }
6123 _ACEOF
6124 if ac_fn_c_try_compile "$LINENO"; then :
6125   ac_cv_safe_to_define___extensions__=yes
6126 else
6127   ac_cv_safe_to_define___extensions__=no
6128 fi
6129 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6130 fi
6131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
6132 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
6133   test $ac_cv_safe_to_define___extensions__ = yes &&
6134     $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
6135
6136   $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
6137
6138   $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
6139
6140   $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
6141
6142   $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
6143
6144   $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
6145
6146   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
6147 $as_echo_n "checking whether _XOPEN_SOURCE should be defined... " >&6; }
6148 if ${ac_cv_should_define__xopen_source+:} false; then :
6149   $as_echo_n "(cached) " >&6
6150 else
6151   ac_cv_should_define__xopen_source=no
6152      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6153 /* end confdefs.h.  */
6154
6155           #include <wchar.h>
6156           mbstate_t x;
6157 int
6158 main ()
6159 {
6160
6161   ;
6162   return 0;
6163 }
6164 _ACEOF
6165 if ac_fn_c_try_compile "$LINENO"; then :
6166
6167 else
6168   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6169 /* end confdefs.h.  */
6170
6171              #define _XOPEN_SOURCE 500
6172              #include <wchar.h>
6173              mbstate_t x;
6174 int
6175 main ()
6176 {
6177
6178   ;
6179   return 0;
6180 }
6181 _ACEOF
6182 if ac_fn_c_try_compile "$LINENO"; then :
6183   ac_cv_should_define__xopen_source=yes
6184 fi
6185 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6186 fi
6187 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6188 fi
6189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
6190 $as_echo "$ac_cv_should_define__xopen_source" >&6; }
6191   test $ac_cv_should_define__xopen_source = yes &&
6192     $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
6193
6194
6195
6196
6197
6198
6199
6200
6201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
6202 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
6203 if ${ac_cv_sys_largefile_source+:} false; then :
6204   $as_echo_n "(cached) " >&6
6205 else
6206   while :; do
6207   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6208 /* end confdefs.h.  */
6209 #include <sys/types.h> /* for off_t */
6210      #include <stdio.h>
6211 int
6212 main ()
6213 {
6214 int (*fp) (FILE *, off_t, int) = fseeko;
6215      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
6216   ;
6217   return 0;
6218 }
6219 _ACEOF
6220 if ac_fn_c_try_link "$LINENO"; then :
6221   ac_cv_sys_largefile_source=no; break
6222 fi
6223 rm -f core conftest.err conftest.$ac_objext \
6224     conftest$ac_exeext conftest.$ac_ext
6225   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6226 /* end confdefs.h.  */
6227 #define _LARGEFILE_SOURCE 1
6228 #include <sys/types.h> /* for off_t */
6229      #include <stdio.h>
6230 int
6231 main ()
6232 {
6233 int (*fp) (FILE *, off_t, int) = fseeko;
6234      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
6235   ;
6236   return 0;
6237 }
6238 _ACEOF
6239 if ac_fn_c_try_link "$LINENO"; then :
6240   ac_cv_sys_largefile_source=1; break
6241 fi
6242 rm -f core conftest.err conftest.$ac_objext \
6243     conftest$ac_exeext conftest.$ac_ext
6244   ac_cv_sys_largefile_source=unknown
6245   break
6246 done
6247 fi
6248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
6249 $as_echo "$ac_cv_sys_largefile_source" >&6; }
6250 case $ac_cv_sys_largefile_source in #(
6251   no | unknown) ;;
6252   *)
6253 cat >>confdefs.h <<_ACEOF
6254 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
6255 _ACEOF
6256 ;;
6257 esac
6258 rm -rf conftest*
6259
6260 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
6261 # in glibc 2.1.3, but that breaks too many other things.
6262 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
6263 if test $ac_cv_sys_largefile_source != unknown; then
6264
6265 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
6266
6267 fi
6268
6269 # Check whether --enable-largefile was given.
6270 if test "${enable_largefile+set}" = set; then :
6271   enableval=$enable_largefile;
6272 fi
6273
6274 if test "$enable_largefile" != no; then
6275
6276   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
6277 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
6278 if ${ac_cv_sys_largefile_CC+:} false; then :
6279   $as_echo_n "(cached) " >&6
6280 else
6281   ac_cv_sys_largefile_CC=no
6282      if test "$GCC" != yes; then
6283        ac_save_CC=$CC
6284        while :; do
6285          # IRIX 6.2 and later do not support large files by default,
6286          # so use the C compiler's -n32 option if that helps.
6287          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6288 /* end confdefs.h.  */
6289 #include <sys/types.h>
6290  /* Check that off_t can represent 2**63 - 1 correctly.
6291     We can't simply define LARGE_OFF_T to be 9223372036854775807,
6292     since some C++ compilers masquerading as C compilers
6293     incorrectly reject 9223372036854775807.  */
6294 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6295   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6296                        && LARGE_OFF_T % 2147483647 == 1)
6297                       ? 1 : -1];
6298 int
6299 main ()
6300 {
6301
6302   ;
6303   return 0;
6304 }
6305 _ACEOF
6306          if ac_fn_c_try_compile "$LINENO"; then :
6307   break
6308 fi
6309 rm -f core conftest.err conftest.$ac_objext
6310          CC="$CC -n32"
6311          if ac_fn_c_try_compile "$LINENO"; then :
6312   ac_cv_sys_largefile_CC=' -n32'; break
6313 fi
6314 rm -f core conftest.err conftest.$ac_objext
6315          break
6316        done
6317        CC=$ac_save_CC
6318        rm -f conftest.$ac_ext
6319     fi
6320 fi
6321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
6322 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
6323   if test "$ac_cv_sys_largefile_CC" != no; then
6324     CC=$CC$ac_cv_sys_largefile_CC
6325   fi
6326
6327   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
6328 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
6329 if ${ac_cv_sys_file_offset_bits+:} false; then :
6330   $as_echo_n "(cached) " >&6
6331 else
6332   while :; do
6333   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6334 /* end confdefs.h.  */
6335 #include <sys/types.h>
6336  /* Check that off_t can represent 2**63 - 1 correctly.
6337     We can't simply define LARGE_OFF_T to be 9223372036854775807,
6338     since some C++ compilers masquerading as C compilers
6339     incorrectly reject 9223372036854775807.  */
6340 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6341   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6342                        && LARGE_OFF_T % 2147483647 == 1)
6343                       ? 1 : -1];
6344 int
6345 main ()
6346 {
6347
6348   ;
6349   return 0;
6350 }
6351 _ACEOF
6352 if ac_fn_c_try_compile "$LINENO"; then :
6353   ac_cv_sys_file_offset_bits=no; break
6354 fi
6355 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6356   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6357 /* end confdefs.h.  */
6358 #define _FILE_OFFSET_BITS 64
6359 #include <sys/types.h>
6360  /* Check that off_t can represent 2**63 - 1 correctly.
6361     We can't simply define LARGE_OFF_T to be 9223372036854775807,
6362     since some C++ compilers masquerading as C compilers
6363     incorrectly reject 9223372036854775807.  */
6364 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6365   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6366                        && LARGE_OFF_T % 2147483647 == 1)
6367                       ? 1 : -1];
6368 int
6369 main ()
6370 {
6371
6372   ;
6373   return 0;
6374 }
6375 _ACEOF
6376 if ac_fn_c_try_compile "$LINENO"; then :
6377   ac_cv_sys_file_offset_bits=64; break
6378 fi
6379 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6380   ac_cv_sys_file_offset_bits=unknown
6381   break
6382 done
6383 fi
6384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
6385 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
6386 case $ac_cv_sys_file_offset_bits in #(
6387   no | unknown) ;;
6388   *)
6389 cat >>confdefs.h <<_ACEOF
6390 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
6391 _ACEOF
6392 ;;
6393 esac
6394 rm -rf conftest*
6395   if test $ac_cv_sys_file_offset_bits = unknown; then
6396     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
6397 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
6398 if ${ac_cv_sys_large_files+:} false; then :
6399   $as_echo_n "(cached) " >&6
6400 else
6401   while :; do
6402   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6403 /* end confdefs.h.  */
6404 #include <sys/types.h>
6405  /* Check that off_t can represent 2**63 - 1 correctly.
6406     We can't simply define LARGE_OFF_T to be 9223372036854775807,
6407     since some C++ compilers masquerading as C compilers
6408     incorrectly reject 9223372036854775807.  */
6409 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6410   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6411                        && LARGE_OFF_T % 2147483647 == 1)
6412                       ? 1 : -1];
6413 int
6414 main ()
6415 {
6416
6417   ;
6418   return 0;
6419 }
6420 _ACEOF
6421 if ac_fn_c_try_compile "$LINENO"; then :
6422   ac_cv_sys_large_files=no; break
6423 fi
6424 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6425   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6426 /* end confdefs.h.  */
6427 #define _LARGE_FILES 1
6428 #include <sys/types.h>
6429  /* Check that off_t can represent 2**63 - 1 correctly.
6430     We can't simply define LARGE_OFF_T to be 9223372036854775807,
6431     since some C++ compilers masquerading as C compilers
6432     incorrectly reject 9223372036854775807.  */
6433 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6434   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6435                        && LARGE_OFF_T % 2147483647 == 1)
6436                       ? 1 : -1];
6437 int
6438 main ()
6439 {
6440
6441   ;
6442   return 0;
6443 }
6444 _ACEOF
6445 if ac_fn_c_try_compile "$LINENO"; then :
6446   ac_cv_sys_large_files=1; break
6447 fi
6448 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6449   ac_cv_sys_large_files=unknown
6450   break
6451 done
6452 fi
6453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
6454 $as_echo "$ac_cv_sys_large_files" >&6; }
6455 case $ac_cv_sys_large_files in #(
6456   no | unknown) ;;
6457   *)
6458 cat >>confdefs.h <<_ACEOF
6459 #define _LARGE_FILES $ac_cv_sys_large_files
6460 _ACEOF
6461 ;;
6462 esac
6463 rm -rf conftest*
6464   fi
6465
6466
6467 $as_echo "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h
6468
6469 fi
6470
6471    case $ac_cv_prog_cc_stdc in #(
6472   no) :
6473     ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #(
6474   *) :
6475     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
6476 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
6477 if ${ac_cv_prog_cc_c99+:} false; then :
6478   $as_echo_n "(cached) " >&6
6479 else
6480   ac_cv_prog_cc_c99=no
6481 ac_save_CC=$CC
6482 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6483 /* end confdefs.h.  */
6484 #include <stdarg.h>
6485 #include <stdbool.h>
6486 #include <stdlib.h>
6487 #include <wchar.h>
6488 #include <stdio.h>
6489
6490 // Check varargs macros.  These examples are taken from C99 6.10.3.5.
6491 #define debug(...) fprintf (stderr, __VA_ARGS__)
6492 #define showlist(...) puts (#__VA_ARGS__)
6493 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
6494 static void
6495 test_varargs_macros (void)
6496 {
6497   int x = 1234;
6498   int y = 5678;
6499   debug ("Flag");
6500   debug ("X = %d\n", x);
6501   showlist (The first, second, and third items.);
6502   report (x>y, "x is %d but y is %d", x, y);
6503 }
6504
6505 // Check long long types.
6506 #define BIG64 18446744073709551615ull
6507 #define BIG32 4294967295ul
6508 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
6509 #if !BIG_OK
6510   your preprocessor is broken;
6511 #endif
6512 #if BIG_OK
6513 #else
6514   your preprocessor is broken;
6515 #endif
6516 static long long int bignum = -9223372036854775807LL;
6517 static unsigned long long int ubignum = BIG64;
6518
6519 struct incomplete_array
6520 {
6521   int datasize;
6522   double data[];
6523 };
6524
6525 struct named_init {
6526   int number;
6527   const wchar_t *name;
6528   double average;
6529 };
6530
6531 typedef const char *ccp;
6532
6533 static inline int
6534 test_restrict (ccp restrict text)
6535 {
6536   // See if C++-style comments work.
6537   // Iterate through items via the restricted pointer.
6538   // Also check for declarations in for loops.
6539   for (unsigned int i = 0; *(text+i) != '\0'; ++i)
6540     continue;
6541   return 0;
6542 }
6543
6544 // Check varargs and va_copy.
6545 static void
6546 test_varargs (const char *format, ...)
6547 {
6548   va_list args;
6549   va_start (args, format);
6550   va_list args_copy;
6551   va_copy (args_copy, args);
6552
6553   const char *str;
6554   int number;
6555   float fnumber;
6556
6557   while (*format)
6558     {
6559       switch (*format++)
6560         {
6561         case 's': // string
6562           str = va_arg (args_copy, const char *);
6563           break;
6564         case 'd': // int
6565           number = va_arg (args_copy, int);
6566           break;
6567         case 'f': // float
6568           fnumber = va_arg (args_copy, double);
6569           break;
6570         default:
6571           break;
6572         }
6573     }
6574   va_end (args_copy);
6575   va_end (args);
6576 }
6577
6578 int
6579 main ()
6580 {
6581
6582   // Check bool.
6583   _Bool success = false;
6584
6585   // Check restrict.
6586   if (test_restrict ("String literal") == 0)
6587     success = true;
6588   char *restrict newvar = "Another string";
6589
6590   // Check varargs.
6591   test_varargs ("s, d' f .", "string", 65, 34.234);
6592   test_varargs_macros ();
6593
6594   // Check flexible array members.
6595   struct incomplete_array *ia =
6596     malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
6597   ia->datasize = 10;
6598   for (int i = 0; i < ia->datasize; ++i)
6599     ia->data[i] = i * 1.234;
6600
6601   // Check named initializers.
6602   struct named_init ni = {
6603     .number = 34,
6604     .name = L"Test wide string",
6605     .average = 543.34343,
6606   };
6607
6608   ni.number = 58;
6609
6610   int dynamic_array[ni.number];
6611   dynamic_array[ni.number - 1] = 543;
6612
6613   // work around unused variable warnings
6614   return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
6615           || dynamic_array[ni.number - 1] != 543);
6616
6617   ;
6618   return 0;
6619 }
6620 _ACEOF
6621 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
6622 do
6623   CC="$ac_save_CC $ac_arg"
6624   if ac_fn_c_try_compile "$LINENO"; then :
6625   ac_cv_prog_cc_c99=$ac_arg
6626 fi
6627 rm -f core conftest.err conftest.$ac_objext
6628   test "x$ac_cv_prog_cc_c99" != "xno" && break
6629 done
6630 rm -f conftest.$ac_ext
6631 CC=$ac_save_CC
6632
6633 fi
6634 # AC_CACHE_VAL
6635 case "x$ac_cv_prog_cc_c99" in
6636   x)
6637     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6638 $as_echo "none needed" >&6; } ;;
6639   xno)
6640     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6641 $as_echo "unsupported" >&6; } ;;
6642   *)
6643     CC="$CC $ac_cv_prog_cc_c99"
6644     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
6645 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
6646 esac
6647 if test "x$ac_cv_prog_cc_c99" != xno; then :
6648   ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
6649 else
6650   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
6651 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
6652 if ${ac_cv_prog_cc_c89+:} false; then :
6653   $as_echo_n "(cached) " >&6
6654 else
6655   ac_cv_prog_cc_c89=no
6656 ac_save_CC=$CC
6657 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6658 /* end confdefs.h.  */
6659 #include <stdarg.h>
6660 #include <stdio.h>
6661 struct stat;
6662 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
6663 struct buf { int x; };
6664 FILE * (*rcsopen) (struct buf *, struct stat *, int);
6665 static char *e (p, i)
6666      char **p;
6667      int i;
6668 {
6669   return p[i];
6670 }
6671 static char *f (char * (*g) (char **, int), char **p, ...)
6672 {
6673   char *s;
6674   va_list v;
6675   va_start (v,p);
6676   s = g (p, va_arg (v,int));
6677   va_end (v);
6678   return s;
6679 }
6680
6681 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
6682    function prototypes and stuff, but not '\xHH' hex character constants.
6683    These don't provoke an error unfortunately, instead are silently treated
6684    as 'x'.  The following induces an error, until -std is added to get
6685    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
6686    array size at least.  It's necessary to write '\x00'==0 to get something
6687    that's true only with -std.  */
6688 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
6689
6690 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
6691    inside strings and character constants.  */
6692 #define FOO(x) 'x'
6693 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
6694
6695 int test (int i, double x);
6696 struct s1 {int (*f) (int a);};
6697 struct s2 {int (*f) (double a);};
6698 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
6699 int argc;
6700 char **argv;
6701 int
6702 main ()
6703 {
6704 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
6705   ;
6706   return 0;
6707 }
6708 _ACEOF
6709 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
6710         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
6711 do
6712   CC="$ac_save_CC $ac_arg"
6713   if ac_fn_c_try_compile "$LINENO"; then :
6714   ac_cv_prog_cc_c89=$ac_arg
6715 fi
6716 rm -f core conftest.err conftest.$ac_objext
6717   test "x$ac_cv_prog_cc_c89" != "xno" && break
6718 done
6719 rm -f conftest.$ac_ext
6720 CC=$ac_save_CC
6721
6722 fi
6723 # AC_CACHE_VAL
6724 case "x$ac_cv_prog_cc_c89" in
6725   x)
6726     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6727 $as_echo "none needed" >&6; } ;;
6728   xno)
6729     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6730 $as_echo "unsupported" >&6; } ;;
6731   *)
6732     CC="$CC $ac_cv_prog_cc_c89"
6733     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
6734 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
6735 esac
6736 if test "x$ac_cv_prog_cc_c89" != xno; then :
6737   ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
6738 else
6739   ac_cv_prog_cc_stdc=no
6740 fi
6741
6742 fi
6743  ;;
6744 esac
6745   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5
6746 $as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; }
6747   if ${ac_cv_prog_cc_stdc+:} false; then :
6748   $as_echo_n "(cached) " >&6
6749 fi
6750
6751   case $ac_cv_prog_cc_stdc in #(
6752   no) :
6753     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6754 $as_echo "unsupported" >&6; } ;; #(
6755   '') :
6756     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6757 $as_echo "none needed" >&6; } ;; #(
6758   *) :
6759     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5
6760 $as_echo "$ac_cv_prog_cc_stdc" >&6; } ;;
6761 esac
6762
6763
6764
6765
6766   # Code from module acl:
6767   # Code from module alloca:
6768   # Code from module alloca-opt:
6769   # Code from module allocator:
6770   # Code from module areadlink:
6771   # Code from module areadlinkat:
6772   # Code from module argmatch:
6773   # Code from module argp:
6774   # Code from module argp-version-etc:
6775   # Code from module at-internal:
6776   # Code from module backupfile:
6777   # Code from module bitrotate:
6778   # Code from module btowc:
6779   # Code from module c-ctype:
6780   # Code from module c-strcase:
6781   # Code from module c-strcaseeq:
6782   # Code from module canonicalize-lgpl:
6783   # Code from module careadlinkat:
6784   # Code from module chdir:
6785   # Code from module chdir-long:
6786   # Code from module chown:
6787   # Code from module clock-time:
6788   # Code from module cloexec:
6789   # Code from module close:
6790   # Code from module close-stream:
6791   # Code from module closedir:
6792   # Code from module closeout:
6793   # Code from module configmake:
6794   # Code from module d-ino:
6795   # Code from module dirent:
6796   # Code from module dirent-safer:
6797   # Code from module dirfd:
6798   # Code from module dirname:
6799   # Code from module dirname-lgpl:
6800   # Code from module dosname:
6801   # Code from module double-slash-root:
6802   # Code from module dup:
6803   # Code from module dup2:
6804   # Code from module environ:
6805   # Code from module errno:
6806   # Code from module error:
6807   # Code from module exclude:
6808   # Code from module exitfail:
6809   # Code from module extensions:
6810
6811   # Code from module extern-inline:
6812   # Code from module fchdir:
6813   # Code from module fchmodat:
6814   # Code from module fchownat:
6815   # Code from module fcntl:
6816   # Code from module fcntl-h:
6817   # Code from module fd-hook:
6818   # Code from module fdopendir:
6819   # Code from module fdutimensat:
6820   # Code from module fileblocks:
6821   # Code from module filename:
6822   # Code from module filenamecat-lgpl:
6823   # Code from module float:
6824   # Code from module fnmatch:
6825   # Code from module fnmatch-gnu:
6826   # Code from module fpending:
6827   # Code from module fseek:
6828   # Code from module fseeko:
6829
6830   # Code from module fstat:
6831   # Code from module fstatat:
6832   # Code from module full-write:
6833   # Code from module futimens:
6834   # Code from module getcwd:
6835   # Code from module getcwd-lgpl:
6836   # Code from module getdelim:
6837   # Code from module getdtablesize:
6838   # Code from module getline:
6839   # Code from module getopt-gnu:
6840   # Code from module getopt-posix:
6841   # Code from module getpagesize:
6842   # Code from module gettext:
6843   # Code from module gettext-h:
6844   # Code from module gettime:
6845   # Code from module gettimeofday:
6846   # Code from module gitlog-to-changelog:
6847   # Code from module hash:
6848   # Code from module havelib:
6849   # Code from module human:
6850   # Code from module include_next:
6851   # Code from module intprops:
6852   # Code from module inttostr:
6853   # Code from module inttypes:
6854   # Code from module inttypes-incomplete:
6855   # Code from module iswblank:
6856   # Code from module langinfo:
6857   # Code from module largefile:
6858
6859   # Code from module lchown:
6860   # Code from module link:
6861   # Code from module link-follow:
6862   # Code from module linkat:
6863   # Code from module localcharset:
6864   # Code from module locale:
6865   # Code from module localeconv:
6866   # Code from module lseek:
6867   # Code from module lstat:
6868   # Code from module malloc-gnu:
6869   # Code from module malloc-posix:
6870   # Code from module malloca:
6871   # Code from module manywarnings:
6872   # Code from module mbchar:
6873   # Code from module mbrtowc:
6874   # Code from module mbscasecmp:
6875   # Code from module mbsinit:
6876   # Code from module mbsrtowcs:
6877   # Code from module mbtowc:
6878   # Code from module mbuiter:
6879   # Code from module memchr:
6880   # Code from module mempcpy:
6881   # Code from module memrchr:
6882   # Code from module mkdir:
6883   # Code from module mkdirat:
6884   # Code from module mkdtemp:
6885   # Code from module mkfifo:
6886   # Code from module mkfifoat:
6887   # Code from module mknod:
6888   # Code from module mktime:
6889   # Code from module modechange:
6890   # Code from module msvc-inval:
6891   # Code from module msvc-nothrow:
6892   # Code from module multiarch:
6893   # Code from module nl_langinfo:
6894   # Code from module nocrash:
6895   # Code from module obstack:
6896   # Code from module open:
6897   # Code from module openat:
6898   # Code from module openat-die:
6899   # Code from module openat-h:
6900   # Code from module opendir:
6901   # Code from module parse-datetime:
6902   # Code from module pathmax:
6903   # Code from module priv-set:
6904   # Code from module progname:
6905   # Code from module qacl:
6906   # Code from module quote:
6907   # Code from module quotearg:
6908   # Code from module quotearg-simple:
6909   # Code from module raise:
6910   # Code from module rawmemchr:
6911   # Code from module read:
6912   # Code from module readdir:
6913   # Code from module readlink:
6914   # Code from module readlinkat:
6915   # Code from module realloc-posix:
6916   # Code from module regex:
6917   # Code from module rename:
6918   # Code from module renameat:
6919   # Code from module rewinddir:
6920   # Code from module rmdir:
6921   # Code from module root-uid:
6922   # Code from module rpmatch:
6923   # Code from module safe-read:
6924   # Code from module safe-write:
6925   # Code from module same-inode:
6926   # Code from module save-cwd:
6927   # Code from module savedir:
6928   # Code from module secure_getenv:
6929   # Code from module selinux-at:
6930   # Code from module selinux-h:
6931   # Code from module setenv:
6932   # Code from module signal-h:
6933   # Code from module size_max:
6934   # Code from module sleep:
6935   # Code from module snippet/_Noreturn:
6936   # Code from module snippet/arg-nonnull:
6937   # Code from module snippet/c++defs:
6938   # Code from module snippet/unused-parameter:
6939   # Code from module snippet/warn-on-use:
6940   # Code from module snprintf:
6941   # Code from module ssize_t:
6942   # Code from module stat:
6943   # Code from module stat-macros:
6944   # Code from module stat-time:
6945   # Code from module statat:
6946   # Code from module stdalign:
6947   # Code from module stdarg:
6948
6949
6950
6951   # Code from module stdbool:
6952   # Code from module stddef:
6953   # Code from module stdint:
6954   # Code from module stdio:
6955   # Code from module stdlib:
6956   # Code from module stpcpy:
6957   # Code from module strcase:
6958   # Code from module strchrnul:
6959   # Code from module strdup-posix:
6960   # Code from module streq:
6961   # Code from module strerror:
6962   # Code from module strerror-override:
6963   # Code from module string:
6964   # Code from module strings:
6965   # Code from module strndup:
6966   # Code from module strnlen:
6967   # Code from module strnlen1:
6968   # Code from module strtol:
6969   # Code from module strtoul:
6970   # Code from module strtoull:
6971   # Code from module strtoumax:
6972   # Code from module symlink:
6973   # Code from module symlinkat:
6974   # Code from module sys_stat:
6975   # Code from module sys_time:
6976   # Code from module sys_types:
6977   # Code from module sysexits:
6978   # Code from module tempname:
6979   # Code from module time:
6980   # Code from module time_r:
6981   # Code from module timespec:
6982   # Code from module unistd:
6983   # Code from module unistd-safer:
6984   # Code from module unitypes:
6985   # Code from module uniwidth/base:
6986   # Code from module uniwidth/width:
6987   # Code from module unlink:
6988   # Code from module unlinkat:
6989   # Code from module unlinkdir:
6990   # Code from module unlocked-io:
6991   # Code from module unsetenv:
6992   # Code from module utimens:
6993   # Code from module utimensat:
6994   # Code from module vasnprintf:
6995   # Code from module vasprintf:
6996   # Code from module verify:
6997   # Code from module version-etc:
6998   # Code from module version-etc-fsf:
6999   # Code from module vsnprintf:
7000   # Code from module warnings:
7001   # Code from module wchar:
7002   # Code from module wcrtomb:
7003   # Code from module wctype-h:
7004   # Code from module wcwidth:
7005   # Code from module write:
7006   # Code from module xalloc:
7007   # Code from module xalloc-die:
7008   # Code from module xalloc-oversized:
7009   # Code from module xgetcwd:
7010   # Code from module xsize:
7011   # Code from module xstrndup:
7012   # Code from module xstrtol:
7013   # Code from module xstrtoumax:
7014   # Code from module xvasprintf:
7015
7016
7017 # Check whether --enable-largefile was given.
7018 if test "${enable_largefile+set}" = set; then :
7019   enableval=$enable_largefile;
7020 fi
7021
7022 if test "$enable_largefile" != no; then
7023
7024   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
7025 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
7026 if ${ac_cv_sys_largefile_CC+:} false; then :
7027   $as_echo_n "(cached) " >&6
7028 else
7029   ac_cv_sys_largefile_CC=no
7030      if test "$GCC" != yes; then
7031        ac_save_CC=$CC
7032        while :; do
7033          # IRIX 6.2 and later do not support large files by default,
7034          # so use the C compiler's -n32 option if that helps.
7035          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7036 /* end confdefs.h.  */
7037 #include <sys/types.h>
7038  /* Check that off_t can represent 2**63 - 1 correctly.
7039     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7040     since some C++ compilers masquerading as C compilers
7041     incorrectly reject 9223372036854775807.  */
7042 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7043   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7044                        && LARGE_OFF_T % 2147483647 == 1)
7045                       ? 1 : -1];
7046 int
7047 main ()
7048 {
7049
7050   ;
7051   return 0;
7052 }
7053 _ACEOF
7054          if ac_fn_c_try_compile "$LINENO"; then :
7055   break
7056 fi
7057 rm -f core conftest.err conftest.$ac_objext
7058          CC="$CC -n32"
7059          if ac_fn_c_try_compile "$LINENO"; then :
7060   ac_cv_sys_largefile_CC=' -n32'; break
7061 fi
7062 rm -f core conftest.err conftest.$ac_objext
7063          break
7064        done
7065        CC=$ac_save_CC
7066        rm -f conftest.$ac_ext
7067     fi
7068 fi
7069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
7070 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
7071   if test "$ac_cv_sys_largefile_CC" != no; then
7072     CC=$CC$ac_cv_sys_largefile_CC
7073   fi
7074
7075   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
7076 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
7077 if ${ac_cv_sys_file_offset_bits+:} false; then :
7078   $as_echo_n "(cached) " >&6
7079 else
7080   while :; do
7081   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7082 /* end confdefs.h.  */
7083 #include <sys/types.h>
7084  /* Check that off_t can represent 2**63 - 1 correctly.
7085     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7086     since some C++ compilers masquerading as C compilers
7087     incorrectly reject 9223372036854775807.  */
7088 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7089   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7090                        && LARGE_OFF_T % 2147483647 == 1)
7091                       ? 1 : -1];
7092 int
7093 main ()
7094 {
7095
7096   ;
7097   return 0;
7098 }
7099 _ACEOF
7100 if ac_fn_c_try_compile "$LINENO"; then :
7101   ac_cv_sys_file_offset_bits=no; break
7102 fi
7103 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7104   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7105 /* end confdefs.h.  */
7106 #define _FILE_OFFSET_BITS 64
7107 #include <sys/types.h>
7108  /* Check that off_t can represent 2**63 - 1 correctly.
7109     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7110     since some C++ compilers masquerading as C compilers
7111     incorrectly reject 9223372036854775807.  */
7112 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7113   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7114                        && LARGE_OFF_T % 2147483647 == 1)
7115                       ? 1 : -1];
7116 int
7117 main ()
7118 {
7119
7120   ;
7121   return 0;
7122 }
7123 _ACEOF
7124 if ac_fn_c_try_compile "$LINENO"; then :
7125   ac_cv_sys_file_offset_bits=64; break
7126 fi
7127 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7128   ac_cv_sys_file_offset_bits=unknown
7129   break
7130 done
7131 fi
7132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
7133 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
7134 case $ac_cv_sys_file_offset_bits in #(
7135   no | unknown) ;;
7136   *)
7137 cat >>confdefs.h <<_ACEOF
7138 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
7139 _ACEOF
7140 ;;
7141 esac
7142 rm -rf conftest*
7143   if test $ac_cv_sys_file_offset_bits = unknown; then
7144     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
7145 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
7146 if ${ac_cv_sys_large_files+:} false; then :
7147   $as_echo_n "(cached) " >&6
7148 else
7149   while :; do
7150   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7151 /* end confdefs.h.  */
7152 #include <sys/types.h>
7153  /* Check that off_t can represent 2**63 - 1 correctly.
7154     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7155     since some C++ compilers masquerading as C compilers
7156     incorrectly reject 9223372036854775807.  */
7157 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7158   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7159                        && LARGE_OFF_T % 2147483647 == 1)
7160                       ? 1 : -1];
7161 int
7162 main ()
7163 {
7164
7165   ;
7166   return 0;
7167 }
7168 _ACEOF
7169 if ac_fn_c_try_compile "$LINENO"; then :
7170   ac_cv_sys_large_files=no; break
7171 fi
7172 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7173   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7174 /* end confdefs.h.  */
7175 #define _LARGE_FILES 1
7176 #include <sys/types.h>
7177  /* Check that off_t can represent 2**63 - 1 correctly.
7178     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7179     since some C++ compilers masquerading as C compilers
7180     incorrectly reject 9223372036854775807.  */
7181 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7182   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7183                        && LARGE_OFF_T % 2147483647 == 1)
7184                       ? 1 : -1];
7185 int
7186 main ()
7187 {
7188
7189   ;
7190   return 0;
7191 }
7192 _ACEOF
7193 if ac_fn_c_try_compile "$LINENO"; then :
7194   ac_cv_sys_large_files=1; break
7195 fi
7196 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7197   ac_cv_sys_large_files=unknown
7198   break
7199 done
7200 fi
7201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
7202 $as_echo "$ac_cv_sys_large_files" >&6; }
7203 case $ac_cv_sys_large_files in #(
7204   no | unknown) ;;
7205   *)
7206 cat >>confdefs.h <<_ACEOF
7207 #define _LARGE_FILES $ac_cv_sys_large_files
7208 _ACEOF
7209 ;;
7210 esac
7211 rm -rf conftest*
7212   fi
7213
7214
7215 $as_echo "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h
7216
7217 fi
7218
7219 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5
7220 $as_echo_n "checking for library containing strerror... " >&6; }
7221 if ${ac_cv_search_strerror+:} false; then :
7222   $as_echo_n "(cached) " >&6
7223 else
7224   ac_func_search_save_LIBS=$LIBS
7225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7226 /* end confdefs.h.  */
7227
7228 /* Override any GCC internal prototype to avoid an error.
7229    Use char because int might match the return type of a GCC
7230    builtin and then its argument prototype would still apply.  */
7231 #ifdef __cplusplus
7232 extern "C"
7233 #endif
7234 char strerror ();
7235 int
7236 main ()
7237 {
7238 return strerror ();
7239   ;
7240   return 0;
7241 }
7242 _ACEOF
7243 for ac_lib in '' cposix; do
7244   if test -z "$ac_lib"; then
7245     ac_res="none required"
7246   else
7247     ac_res=-l$ac_lib
7248     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7249   fi
7250   if ac_fn_c_try_link "$LINENO"; then :
7251   ac_cv_search_strerror=$ac_res
7252 fi
7253 rm -f core conftest.err conftest.$ac_objext \
7254     conftest$ac_exeext
7255   if ${ac_cv_search_strerror+:} false; then :
7256   break
7257 fi
7258 done
7259 if ${ac_cv_search_strerror+:} false; then :
7260
7261 else
7262   ac_cv_search_strerror=no
7263 fi
7264 rm conftest.$ac_ext
7265 LIBS=$ac_func_search_save_LIBS
7266 fi
7267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_strerror" >&5
7268 $as_echo "$ac_cv_search_strerror" >&6; }
7269 ac_res=$ac_cv_search_strerror
7270 if test "$ac_res" != no; then :
7271   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7272
7273 fi
7274
7275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
7276 $as_echo_n "checking for inline... " >&6; }
7277 if ${ac_cv_c_inline+:} false; then :
7278   $as_echo_n "(cached) " >&6
7279 else
7280   ac_cv_c_inline=no
7281 for ac_kw in inline __inline__ __inline; do
7282   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7283 /* end confdefs.h.  */
7284 #ifndef __cplusplus
7285 typedef int foo_t;
7286 static $ac_kw foo_t static_foo () {return 0; }
7287 $ac_kw foo_t foo () {return 0; }
7288 #endif
7289
7290 _ACEOF
7291 if ac_fn_c_try_compile "$LINENO"; then :
7292   ac_cv_c_inline=$ac_kw
7293 fi
7294 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7295   test "$ac_cv_c_inline" != no && break
7296 done
7297
7298 fi
7299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
7300 $as_echo "$ac_cv_c_inline" >&6; }
7301
7302 case $ac_cv_c_inline in
7303   inline | yes) ;;
7304   *)
7305     case $ac_cv_c_inline in
7306       no) ac_val=;;
7307       *) ac_val=$ac_cv_c_inline;;
7308     esac
7309     cat >>confdefs.h <<_ACEOF
7310 #ifndef __cplusplus
7311 #define inline $ac_val
7312 #endif
7313 _ACEOF
7314     ;;
7315 esac
7316
7317
7318
7319
7320
7321   for ac_header in $ac_header_list
7322 do :
7323   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7324 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
7325 "
7326 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7327   cat >>confdefs.h <<_ACEOF
7328 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7329 _ACEOF
7330
7331 fi
7332
7333 done
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371 for ac_header in sys/buf.h
7372 do :
7373   ac_fn_c_check_header_compile "$LINENO" "sys/buf.h" "ac_cv_header_sys_buf_h" "#if HAVE_SYS_PARAM_H
7374 #include <sys/param.h>
7375 #endif
7376 "
7377 if test "x$ac_cv_header_sys_buf_h" = xyes; then :
7378   cat >>confdefs.h <<_ACEOF
7379 #define HAVE_SYS_BUF_H 1
7380 _ACEOF
7381
7382 fi
7383
7384 done
7385
7386
7387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
7388 $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
7389 if ${ac_cv_header_sys_wait_h+:} false; then :
7390   $as_echo_n "(cached) " >&6
7391 else
7392   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7393 /* end confdefs.h.  */
7394 #include <sys/types.h>
7395 #include <sys/wait.h>
7396 #ifndef WEXITSTATUS
7397 # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
7398 #endif
7399 #ifndef WIFEXITED
7400 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
7401 #endif
7402
7403 int
7404 main ()
7405 {
7406   int s;
7407   wait (&s);
7408   s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
7409   ;
7410   return 0;
7411 }
7412 _ACEOF
7413 if ac_fn_c_try_compile "$LINENO"; then :
7414   ac_cv_header_sys_wait_h=yes
7415 else
7416   ac_cv_header_sys_wait_h=no
7417 fi
7418 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7419 fi
7420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
7421 $as_echo "$ac_cv_header_sys_wait_h" >&6; }
7422 if test $ac_cv_header_sys_wait_h = yes; then
7423
7424 $as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
7425
7426 fi
7427
7428
7429 ac_header_dirent=no
7430 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
7431   as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7433 $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
7434 if eval \${$as_ac_Header+:} false; then :
7435   $as_echo_n "(cached) " >&6
7436 else
7437   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7438 /* end confdefs.h.  */
7439 #include <sys/types.h>
7440 #include <$ac_hdr>
7441
7442 int
7443 main ()
7444 {
7445 if ((DIR *) 0)
7446 return 0;
7447   ;
7448   return 0;
7449 }
7450 _ACEOF
7451 if ac_fn_c_try_compile "$LINENO"; then :
7452   eval "$as_ac_Header=yes"
7453 else
7454   eval "$as_ac_Header=no"
7455 fi
7456 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7457 fi
7458 eval ac_res=\$$as_ac_Header
7459                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7460 $as_echo "$ac_res" >&6; }
7461 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7462   cat >>confdefs.h <<_ACEOF
7463 #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
7464 _ACEOF
7465
7466 ac_header_dirent=$ac_hdr; break
7467 fi
7468
7469 done
7470 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7471 if test $ac_header_dirent = dirent.h; then
7472   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7473 $as_echo_n "checking for library containing opendir... " >&6; }
7474 if ${ac_cv_search_opendir+:} false; then :
7475   $as_echo_n "(cached) " >&6
7476 else
7477   ac_func_search_save_LIBS=$LIBS
7478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7479 /* end confdefs.h.  */
7480
7481 /* Override any GCC internal prototype to avoid an error.
7482    Use char because int might match the return type of a GCC
7483    builtin and then its argument prototype would still apply.  */
7484 #ifdef __cplusplus
7485 extern "C"
7486 #endif
7487 char opendir ();
7488 int
7489 main ()
7490 {
7491 return opendir ();
7492   ;
7493   return 0;
7494 }
7495 _ACEOF
7496 for ac_lib in '' dir; do
7497   if test -z "$ac_lib"; then
7498     ac_res="none required"
7499   else
7500     ac_res=-l$ac_lib
7501     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7502   fi
7503   if ac_fn_c_try_link "$LINENO"; then :
7504   ac_cv_search_opendir=$ac_res
7505 fi
7506 rm -f core conftest.err conftest.$ac_objext \
7507     conftest$ac_exeext
7508   if ${ac_cv_search_opendir+:} false; then :
7509   break
7510 fi
7511 done
7512 if ${ac_cv_search_opendir+:} false; then :
7513
7514 else
7515   ac_cv_search_opendir=no
7516 fi
7517 rm conftest.$ac_ext
7518 LIBS=$ac_func_search_save_LIBS
7519 fi
7520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7521 $as_echo "$ac_cv_search_opendir" >&6; }
7522 ac_res=$ac_cv_search_opendir
7523 if test "$ac_res" != no; then :
7524   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7525
7526 fi
7527
7528 else
7529   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7530 $as_echo_n "checking for library containing opendir... " >&6; }
7531 if ${ac_cv_search_opendir+:} false; then :
7532   $as_echo_n "(cached) " >&6
7533 else
7534   ac_func_search_save_LIBS=$LIBS
7535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7536 /* end confdefs.h.  */
7537
7538 /* Override any GCC internal prototype to avoid an error.
7539    Use char because int might match the return type of a GCC
7540    builtin and then its argument prototype would still apply.  */
7541 #ifdef __cplusplus
7542 extern "C"
7543 #endif
7544 char opendir ();
7545 int
7546 main ()
7547 {
7548 return opendir ();
7549   ;
7550   return 0;
7551 }
7552 _ACEOF
7553 for ac_lib in '' x; do
7554   if test -z "$ac_lib"; then
7555     ac_res="none required"
7556   else
7557     ac_res=-l$ac_lib
7558     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7559   fi
7560   if ac_fn_c_try_link "$LINENO"; then :
7561   ac_cv_search_opendir=$ac_res
7562 fi
7563 rm -f core conftest.err conftest.$ac_objext \
7564     conftest$ac_exeext
7565   if ${ac_cv_search_opendir+:} false; then :
7566   break
7567 fi
7568 done
7569 if ${ac_cv_search_opendir+:} false; then :
7570
7571 else
7572   ac_cv_search_opendir=no
7573 fi
7574 rm conftest.$ac_ext
7575 LIBS=$ac_func_search_save_LIBS
7576 fi
7577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7578 $as_echo "$ac_cv_search_opendir" >&6; }
7579 ac_res=$ac_cv_search_opendir
7580 if test "$ac_res" != no; then :
7581   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7582
7583 fi
7584
7585 fi
7586
7587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7588 $as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
7589 if ${ac_cv_header_sys_types_h_makedev+:} false; then :
7590   $as_echo_n "(cached) " >&6
7591 else
7592   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7593 /* end confdefs.h.  */
7594 #include <sys/types.h>
7595 int
7596 main ()
7597 {
7598 return makedev(0, 0);
7599   ;
7600   return 0;
7601 }
7602 _ACEOF
7603 if ac_fn_c_try_link "$LINENO"; then :
7604   ac_cv_header_sys_types_h_makedev=yes
7605 else
7606   ac_cv_header_sys_types_h_makedev=no
7607 fi
7608 rm -f core conftest.err conftest.$ac_objext \
7609     conftest$ac_exeext conftest.$ac_ext
7610
7611 fi
7612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7613 $as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
7614
7615 if test $ac_cv_header_sys_types_h_makedev = no; then
7616 ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
7617 if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
7618
7619 $as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
7620
7621 fi
7622
7623
7624
7625   if test $ac_cv_header_sys_mkdev_h = no; then
7626     ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
7627 if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
7628
7629 $as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
7630
7631 fi
7632
7633
7634   fi
7635 fi
7636
7637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
7638 $as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
7639 if ${ac_cv_header_stat_broken+:} false; then :
7640   $as_echo_n "(cached) " >&6
7641 else
7642   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7643 /* end confdefs.h.  */
7644 #include <sys/types.h>
7645 #include <sys/stat.h>
7646
7647 #if defined S_ISBLK && defined S_IFDIR
7648 extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
7649 #endif
7650
7651 #if defined S_ISBLK && defined S_IFCHR
7652 extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
7653 #endif
7654
7655 #if defined S_ISLNK && defined S_IFREG
7656 extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
7657 #endif
7658
7659 #if defined S_ISSOCK && defined S_IFREG
7660 extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
7661 #endif
7662
7663 _ACEOF
7664 if ac_fn_c_try_compile "$LINENO"; then :
7665   ac_cv_header_stat_broken=no
7666 else
7667   ac_cv_header_stat_broken=yes
7668 fi
7669 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7670 fi
7671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
7672 $as_echo "$ac_cv_header_stat_broken" >&6; }
7673 if test $ac_cv_header_stat_broken = yes; then
7674
7675 $as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
7676
7677 fi
7678
7679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7680 $as_echo_n "checking for ANSI C header files... " >&6; }
7681 if ${ac_cv_header_stdc+:} false; then :
7682   $as_echo_n "(cached) " >&6
7683 else
7684   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7685 /* end confdefs.h.  */
7686 #include <stdlib.h>
7687 #include <stdarg.h>
7688 #include <string.h>
7689 #include <float.h>
7690
7691 int
7692 main ()
7693 {
7694
7695   ;
7696   return 0;
7697 }
7698 _ACEOF
7699 if ac_fn_c_try_compile "$LINENO"; then :
7700   ac_cv_header_stdc=yes
7701 else
7702   ac_cv_header_stdc=no
7703 fi
7704 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7705
7706 if test $ac_cv_header_stdc = yes; then
7707   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
7708   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7709 /* end confdefs.h.  */
7710 #include <string.h>
7711
7712 _ACEOF
7713 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7714   $EGREP "memchr" >/dev/null 2>&1; then :
7715
7716 else
7717   ac_cv_header_stdc=no
7718 fi
7719 rm -f conftest*
7720
7721 fi
7722
7723 if test $ac_cv_header_stdc = yes; then
7724   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
7725   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7726 /* end confdefs.h.  */
7727 #include <stdlib.h>
7728
7729 _ACEOF
7730 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7731   $EGREP "free" >/dev/null 2>&1; then :
7732
7733 else
7734   ac_cv_header_stdc=no
7735 fi
7736 rm -f conftest*
7737
7738 fi
7739
7740 if test $ac_cv_header_stdc = yes; then
7741   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
7742   if test "$cross_compiling" = yes; then :
7743   :
7744 else
7745   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7746 /* end confdefs.h.  */
7747 #include <ctype.h>
7748 #include <stdlib.h>
7749 #if ((' ' & 0x0FF) == 0x020)
7750 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7751 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7752 #else
7753 # define ISLOWER(c) \
7754                    (('a' <= (c) && (c) <= 'i') \
7755                      || ('j' <= (c) && (c) <= 'r') \
7756                      || ('s' <= (c) && (c) <= 'z'))
7757 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7758 #endif
7759
7760 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7761 int
7762 main ()
7763 {
7764   int i;
7765   for (i = 0; i < 256; i++)
7766     if (XOR (islower (i), ISLOWER (i))
7767         || toupper (i) != TOUPPER (i))
7768       return 2;
7769   return 0;
7770 }
7771 _ACEOF
7772 if ac_fn_c_try_run "$LINENO"; then :
7773
7774 else
7775   ac_cv_header_stdc=no
7776 fi
7777 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7778   conftest.$ac_objext conftest.beam conftest.$ac_ext
7779 fi
7780
7781 fi
7782 fi
7783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7784 $as_echo "$ac_cv_header_stdc" >&6; }
7785 if test $ac_cv_header_stdc = yes; then
7786
7787 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
7788
7789 fi
7790
7791
7792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for st_fstype string in struct stat" >&5
7793 $as_echo_n "checking for st_fstype string in struct stat... " >&6; }
7794 if ${diff_cv_st_fstype_string+:} false; then :
7795   $as_echo_n "(cached) " >&6
7796 else
7797   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7798 /* end confdefs.h.  */
7799 #include <sys/types.h>
7800 #include <sys/stat.h>
7801 int
7802 main ()
7803 {
7804 struct stat s; s.st_fstype[0] = 'x';
7805   ;
7806   return 0;
7807 }
7808 _ACEOF
7809 if ac_fn_c_try_compile "$LINENO"; then :
7810   diff_cv_st_fstype_string=yes
7811 else
7812   diff_cv_st_fstype_string=no
7813 fi
7814 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7815 fi
7816
7817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $diff_cv_st_fstype_string" >&5
7818 $as_echo "$diff_cv_st_fstype_string" >&6; }
7819 if test $diff_cv_st_fstype_string = yes; then
7820
7821 $as_echo "#define HAVE_ST_FSTYPE_STRING 1" >>confdefs.h
7822
7823 fi
7824
7825 # even if we use gnulib's acl.h with integrated m4 file later on (used because
7826 # of very useful file_has_acl() function) we need following checks that restrict
7827 # tar to use POSIX.1e ACLs only.
7828
7829 # Check whether --with-posix-acls was given.
7830 if test "${with_posix_acls+set}" = set; then :
7831   withval=$with_posix_acls; with_posix_acls=no
7832 fi
7833
7834 if test "x$with_posix_acls" != "xno"; then
7835   for ac_header in sys/acl.h
7836 do :
7837   ac_fn_c_check_header_mongrel "$LINENO" "sys/acl.h" "ac_cv_header_sys_acl_h" "$ac_includes_default"
7838 if test "x$ac_cv_header_sys_acl_h" = xyes; then :
7839   cat >>confdefs.h <<_ACEOF
7840 #define HAVE_SYS_ACL_H 1
7841 _ACEOF
7842
7843 else
7844   with_posix_acls=no
7845 fi
7846
7847 done
7848
7849   for tar_acl_func in acl_get_file acl_get_fd acl_set_file acl_set_fd \
7850                       acl_to_text acl_from_text; do \
7851     test "x$with_posix_acls" = xno && break
7852     as_ac_Search=`$as_echo "ac_cv_search_$tar_acl_func" | $as_tr_sh`
7853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing $tar_acl_func" >&5
7854 $as_echo_n "checking for library containing $tar_acl_func... " >&6; }
7855 if eval \${$as_ac_Search+:} false; then :
7856   $as_echo_n "(cached) " >&6
7857 else
7858   ac_func_search_save_LIBS=$LIBS
7859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7860 /* end confdefs.h.  */
7861
7862 /* Override any GCC internal prototype to avoid an error.
7863    Use char because int might match the return type of a GCC
7864    builtin and then its argument prototype would still apply.  */
7865 #ifdef __cplusplus
7866 extern "C"
7867 #endif
7868 char $tar_acl_func ();
7869 int
7870 main ()
7871 {
7872 return $tar_acl_func ();
7873   ;
7874   return 0;
7875 }
7876 _ACEOF
7877 for ac_lib in '' acl pacl; do
7878   if test -z "$ac_lib"; then
7879     ac_res="none required"
7880   else
7881     ac_res=-l$ac_lib
7882     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7883   fi
7884   if ac_fn_c_try_link "$LINENO"; then :
7885   eval "$as_ac_Search=\$ac_res"
7886 fi
7887 rm -f core conftest.err conftest.$ac_objext \
7888     conftest$ac_exeext
7889   if eval \${$as_ac_Search+:} false; then :
7890   break
7891 fi
7892 done
7893 if eval \${$as_ac_Search+:} false; then :
7894
7895 else
7896   eval "$as_ac_Search=no"
7897 fi
7898 rm conftest.$ac_ext
7899 LIBS=$ac_func_search_save_LIBS
7900 fi
7901 eval ac_res=\$$as_ac_Search
7902                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7903 $as_echo "$ac_res" >&6; }
7904 eval ac_res=\$$as_ac_Search
7905 if test "$ac_res" != no; then :
7906   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7907
7908 else
7909   with_posix_acls=no
7910 fi
7911
7912   done
7913   if test "x$with_posix_acls" != xno; then
7914
7915 $as_echo "#define HAVE_POSIX_ACLS /**/" >>confdefs.h
7916
7917   fi
7918 else
7919   # disable acls in gnulib's checks
7920   export enable_acl=no
7921 fi
7922
7923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
7924 $as_echo_n "checking return type of signal handlers... " >&6; }
7925 if ${ac_cv_type_signal+:} false; then :
7926   $as_echo_n "(cached) " >&6
7927 else
7928   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7929 /* end confdefs.h.  */
7930 #include <sys/types.h>
7931 #include <signal.h>
7932
7933 int
7934 main ()
7935 {
7936 return *(signal (0, 0)) (0) == 1;
7937   ;
7938   return 0;
7939 }
7940 _ACEOF
7941 if ac_fn_c_try_compile "$LINENO"; then :
7942   ac_cv_type_signal=int
7943 else
7944   ac_cv_type_signal=void
7945 fi
7946 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7947 fi
7948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
7949 $as_echo "$ac_cv_type_signal" >&6; }
7950
7951 cat >>confdefs.h <<_ACEOF
7952 #define RETSIGTYPE $ac_cv_type_signal
7953 _ACEOF
7954
7955
7956 ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
7957 if test "x$ac_cv_type_mode_t" = xyes; then :
7958
7959 else
7960
7961 cat >>confdefs.h <<_ACEOF
7962 #define mode_t int
7963 _ACEOF
7964
7965 fi
7966
7967 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
7968 if test "x$ac_cv_type_pid_t" = xyes; then :
7969
7970 else
7971
7972 cat >>confdefs.h <<_ACEOF
7973 #define pid_t int
7974 _ACEOF
7975
7976 fi
7977
7978 ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
7979 if test "x$ac_cv_type_off_t" = xyes; then :
7980
7981 else
7982
7983 cat >>confdefs.h <<_ACEOF
7984 #define off_t long int
7985 _ACEOF
7986
7987 fi
7988
7989 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
7990 if test "x$ac_cv_type_size_t" = xyes; then :
7991
7992 else
7993
7994 cat >>confdefs.h <<_ACEOF
7995 #define size_t unsigned int
7996 _ACEOF
7997
7998 fi
7999
8000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8001 $as_echo_n "checking for uid_t in sys/types.h... " >&6; }
8002 if ${ac_cv_type_uid_t+:} false; then :
8003   $as_echo_n "(cached) " >&6
8004 else
8005   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8006 /* end confdefs.h.  */
8007 #include <sys/types.h>
8008
8009 _ACEOF
8010 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8011   $EGREP "uid_t" >/dev/null 2>&1; then :
8012   ac_cv_type_uid_t=yes
8013 else
8014   ac_cv_type_uid_t=no
8015 fi
8016 rm -f conftest*
8017
8018 fi
8019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8020 $as_echo "$ac_cv_type_uid_t" >&6; }
8021 if test $ac_cv_type_uid_t = no; then
8022
8023 $as_echo "#define uid_t int" >>confdefs.h
8024
8025
8026 $as_echo "#define gid_t int" >>confdefs.h
8027
8028 fi
8029
8030 ac_fn_c_check_type "$LINENO" "major_t" "ac_cv_type_major_t" "$ac_includes_default"
8031 if test "x$ac_cv_type_major_t" = xyes; then :
8032
8033 else
8034
8035 $as_echo "#define major_t int" >>confdefs.h
8036
8037 fi
8038
8039 ac_fn_c_check_type "$LINENO" "minor_t" "ac_cv_type_minor_t" "$ac_includes_default"
8040 if test "x$ac_cv_type_minor_t" = xyes; then :
8041
8042 else
8043
8044 $as_echo "#define minor_t int" >>confdefs.h
8045
8046 fi
8047
8048 ac_fn_c_check_type "$LINENO" "dev_t" "ac_cv_type_dev_t" "$ac_includes_default"
8049 if test "x$ac_cv_type_dev_t" = xyes; then :
8050
8051 else
8052
8053 cat >>confdefs.h <<_ACEOF
8054 #define dev_t unsigned
8055 _ACEOF
8056
8057 fi
8058
8059 ac_fn_c_check_type "$LINENO" "ino_t" "ac_cv_type_ino_t" "$ac_includes_default"
8060 if test "x$ac_cv_type_ino_t" = xyes; then :
8061
8062 else
8063
8064 cat >>confdefs.h <<_ACEOF
8065 #define ino_t unsigned
8066 _ACEOF
8067
8068 fi
8069
8070
8071
8072   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
8073 $as_echo_n "checking for ssize_t... " >&6; }
8074 if ${gt_cv_ssize_t+:} false; then :
8075   $as_echo_n "(cached) " >&6
8076 else
8077   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8078 /* end confdefs.h.  */
8079 #include <sys/types.h>
8080 int
8081 main ()
8082 {
8083 int x = sizeof (ssize_t *) + sizeof (ssize_t);
8084             return !x;
8085   ;
8086   return 0;
8087 }
8088 _ACEOF
8089 if ac_fn_c_try_compile "$LINENO"; then :
8090   gt_cv_ssize_t=yes
8091 else
8092   gt_cv_ssize_t=no
8093 fi
8094 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8095 fi
8096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
8097 $as_echo "$gt_cv_ssize_t" >&6; }
8098   if test $gt_cv_ssize_t = no; then
8099
8100 $as_echo "#define ssize_t int" >>confdefs.h
8101
8102   fi
8103
8104
8105 # gnulib modules
8106
8107
8108
8109
8110
8111           LIBC_FATAL_STDERR_=1
8112   export LIBC_FATAL_STDERR_
8113
8114 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
8115 # for constant arguments.  Useless!
8116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
8117 $as_echo_n "checking for working alloca.h... " >&6; }
8118 if ${ac_cv_working_alloca_h+:} false; then :
8119   $as_echo_n "(cached) " >&6
8120 else
8121   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8122 /* end confdefs.h.  */
8123 #include <alloca.h>
8124 int
8125 main ()
8126 {
8127 char *p = (char *) alloca (2 * sizeof (int));
8128                           if (p) return 0;
8129   ;
8130   return 0;
8131 }
8132 _ACEOF
8133 if ac_fn_c_try_link "$LINENO"; then :
8134   ac_cv_working_alloca_h=yes
8135 else
8136   ac_cv_working_alloca_h=no
8137 fi
8138 rm -f core conftest.err conftest.$ac_objext \
8139     conftest$ac_exeext conftest.$ac_ext
8140 fi
8141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
8142 $as_echo "$ac_cv_working_alloca_h" >&6; }
8143 if test $ac_cv_working_alloca_h = yes; then
8144
8145 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
8146
8147 fi
8148
8149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
8150 $as_echo_n "checking for alloca... " >&6; }
8151 if ${ac_cv_func_alloca_works+:} false; then :
8152   $as_echo_n "(cached) " >&6
8153 else
8154   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8155 /* end confdefs.h.  */
8156 #ifdef __GNUC__
8157 # define alloca __builtin_alloca
8158 #else
8159 # ifdef _MSC_VER
8160 #  include <malloc.h>
8161 #  define alloca _alloca
8162 # else
8163 #  ifdef HAVE_ALLOCA_H
8164 #   include <alloca.h>
8165 #  else
8166 #   ifdef _AIX
8167  #pragma alloca
8168 #   else
8169 #    ifndef alloca /* predefined by HP cc +Olibcalls */
8170 void *alloca (size_t);
8171 #    endif
8172 #   endif
8173 #  endif
8174 # endif
8175 #endif
8176
8177 int
8178 main ()
8179 {
8180 char *p = (char *) alloca (1);
8181                                     if (p) return 0;
8182   ;
8183   return 0;
8184 }
8185 _ACEOF
8186 if ac_fn_c_try_link "$LINENO"; then :
8187   ac_cv_func_alloca_works=yes
8188 else
8189   ac_cv_func_alloca_works=no
8190 fi
8191 rm -f core conftest.err conftest.$ac_objext \
8192     conftest$ac_exeext conftest.$ac_ext
8193 fi
8194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
8195 $as_echo "$ac_cv_func_alloca_works" >&6; }
8196
8197 if test $ac_cv_func_alloca_works = yes; then
8198
8199 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
8200
8201 else
8202   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
8203 # that cause trouble.  Some versions do not even contain alloca or
8204 # contain a buggy version.  If you still want to use their alloca,
8205 # use ar to extract alloca.o from them instead of compiling alloca.c.
8206
8207
8208
8209
8210
8211 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
8212
8213 $as_echo "#define C_ALLOCA 1" >>confdefs.h
8214
8215
8216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
8217 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
8218 if ${ac_cv_os_cray+:} false; then :
8219   $as_echo_n "(cached) " >&6
8220 else
8221   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8222 /* end confdefs.h.  */
8223 #if defined CRAY && ! defined CRAY2
8224 webecray
8225 #else
8226 wenotbecray
8227 #endif
8228
8229 _ACEOF
8230 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8231   $EGREP "webecray" >/dev/null 2>&1; then :
8232   ac_cv_os_cray=yes
8233 else
8234   ac_cv_os_cray=no
8235 fi
8236 rm -f conftest*
8237
8238 fi
8239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
8240 $as_echo "$ac_cv_os_cray" >&6; }
8241 if test $ac_cv_os_cray = yes; then
8242   for ac_func in _getb67 GETB67 getb67; do
8243     as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8244 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8245 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
8246
8247 cat >>confdefs.h <<_ACEOF
8248 #define CRAY_STACKSEG_END $ac_func
8249 _ACEOF
8250
8251     break
8252 fi
8253
8254   done
8255 fi
8256
8257 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
8258 $as_echo_n "checking stack direction for C alloca... " >&6; }
8259 if ${ac_cv_c_stack_direction+:} false; then :
8260   $as_echo_n "(cached) " >&6
8261 else
8262   if test "$cross_compiling" = yes; then :
8263   ac_cv_c_stack_direction=0
8264 else
8265   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8266 /* end confdefs.h.  */
8267 $ac_includes_default
8268 int
8269 find_stack_direction (int *addr, int depth)
8270 {
8271   int dir, dummy = 0;
8272   if (! addr)
8273     addr = &dummy;
8274   *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
8275   dir = depth ? find_stack_direction (addr, depth - 1) : 0;
8276   return dir + dummy;
8277 }
8278
8279 int
8280 main (int argc, char **argv)
8281 {
8282   return find_stack_direction (0, argc + !argv + 20) < 0;
8283 }
8284 _ACEOF
8285 if ac_fn_c_try_run "$LINENO"; then :
8286   ac_cv_c_stack_direction=1
8287 else
8288   ac_cv_c_stack_direction=-1
8289 fi
8290 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8291   conftest.$ac_objext conftest.beam conftest.$ac_ext
8292 fi
8293
8294 fi
8295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
8296 $as_echo "$ac_cv_c_stack_direction" >&6; }
8297 cat >>confdefs.h <<_ACEOF
8298 #define STACK_DIRECTION $ac_cv_c_stack_direction
8299 _ACEOF
8300
8301
8302 fi
8303
8304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
8305 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
8306 if ${ac_cv_c_restrict+:} false; then :
8307   $as_echo_n "(cached) " >&6
8308 else
8309   ac_cv_c_restrict=no
8310    # The order here caters to the fact that C++ does not require restrict.
8311    for ac_kw in __restrict __restrict__ _Restrict restrict; do
8312      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8313 /* end confdefs.h.  */
8314 typedef int * int_ptr;
8315         int foo (int_ptr $ac_kw ip) {
8316         return ip[0];
8317        }
8318 int
8319 main ()
8320 {
8321 int s[1];
8322         int * $ac_kw t = s;
8323         t[0] = 0;
8324         return foo(t)
8325   ;
8326   return 0;
8327 }
8328 _ACEOF
8329 if ac_fn_c_try_compile "$LINENO"; then :
8330   ac_cv_c_restrict=$ac_kw
8331 fi
8332 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8333      test "$ac_cv_c_restrict" != no && break
8334    done
8335
8336 fi
8337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
8338 $as_echo "$ac_cv_c_restrict" >&6; }
8339
8340  case $ac_cv_c_restrict in
8341    restrict) ;;
8342    no) $as_echo "#define restrict /**/" >>confdefs.h
8343  ;;
8344    *)  cat >>confdefs.h <<_ACEOF
8345 #define restrict $ac_cv_c_restrict
8346 _ACEOF
8347  ;;
8348  esac
8349
8350 ac_fn_c_check_decl "$LINENO" "clearerr_unlocked" "ac_cv_have_decl_clearerr_unlocked" "$ac_includes_default"
8351 if test "x$ac_cv_have_decl_clearerr_unlocked" = xyes; then :
8352   ac_have_decl=1
8353 else
8354   ac_have_decl=0
8355 fi
8356
8357 cat >>confdefs.h <<_ACEOF
8358 #define HAVE_DECL_CLEARERR_UNLOCKED $ac_have_decl
8359 _ACEOF
8360
8361 ac_fn_c_check_decl "$LINENO" "feof_unlocked" "ac_cv_have_decl_feof_unlocked" "$ac_includes_default"
8362 if test "x$ac_cv_have_decl_feof_unlocked" = xyes; then :
8363   ac_have_decl=1
8364 else
8365   ac_have_decl=0
8366 fi
8367
8368 cat >>confdefs.h <<_ACEOF
8369 #define HAVE_DECL_FEOF_UNLOCKED $ac_have_decl
8370 _ACEOF
8371
8372 ac_fn_c_check_decl "$LINENO" "ferror_unlocked" "ac_cv_have_decl_ferror_unlocked" "$ac_includes_default"
8373 if test "x$ac_cv_have_decl_ferror_unlocked" = xyes; then :
8374   ac_have_decl=1
8375 else
8376   ac_have_decl=0
8377 fi
8378
8379 cat >>confdefs.h <<_ACEOF
8380 #define HAVE_DECL_FERROR_UNLOCKED $ac_have_decl
8381 _ACEOF
8382
8383 ac_fn_c_check_decl "$LINENO" "fflush_unlocked" "ac_cv_have_decl_fflush_unlocked" "$ac_includes_default"
8384 if test "x$ac_cv_have_decl_fflush_unlocked" = xyes; then :
8385   ac_have_decl=1
8386 else
8387   ac_have_decl=0
8388 fi
8389
8390 cat >>confdefs.h <<_ACEOF
8391 #define HAVE_DECL_FFLUSH_UNLOCKED $ac_have_decl
8392 _ACEOF
8393
8394 ac_fn_c_check_decl "$LINENO" "fgets_unlocked" "ac_cv_have_decl_fgets_unlocked" "$ac_includes_default"
8395 if test "x$ac_cv_have_decl_fgets_unlocked" = xyes; then :
8396   ac_have_decl=1
8397 else
8398   ac_have_decl=0
8399 fi
8400
8401 cat >>confdefs.h <<_ACEOF
8402 #define HAVE_DECL_FGETS_UNLOCKED $ac_have_decl
8403 _ACEOF
8404
8405 ac_fn_c_check_decl "$LINENO" "fputc_unlocked" "ac_cv_have_decl_fputc_unlocked" "$ac_includes_default"
8406 if test "x$ac_cv_have_decl_fputc_unlocked" = xyes; then :
8407   ac_have_decl=1
8408 else
8409   ac_have_decl=0
8410 fi
8411
8412 cat >>confdefs.h <<_ACEOF
8413 #define HAVE_DECL_FPUTC_UNLOCKED $ac_have_decl
8414 _ACEOF
8415
8416 ac_fn_c_check_decl "$LINENO" "fputs_unlocked" "ac_cv_have_decl_fputs_unlocked" "$ac_includes_default"
8417 if test "x$ac_cv_have_decl_fputs_unlocked" = xyes; then :
8418   ac_have_decl=1
8419 else
8420   ac_have_decl=0
8421 fi
8422
8423 cat >>confdefs.h <<_ACEOF
8424 #define HAVE_DECL_FPUTS_UNLOCKED $ac_have_decl
8425 _ACEOF
8426
8427 ac_fn_c_check_decl "$LINENO" "fread_unlocked" "ac_cv_have_decl_fread_unlocked" "$ac_includes_default"
8428 if test "x$ac_cv_have_decl_fread_unlocked" = xyes; then :
8429   ac_have_decl=1
8430 else
8431   ac_have_decl=0
8432 fi
8433
8434 cat >>confdefs.h <<_ACEOF
8435 #define HAVE_DECL_FREAD_UNLOCKED $ac_have_decl
8436 _ACEOF
8437
8438 ac_fn_c_check_decl "$LINENO" "fwrite_unlocked" "ac_cv_have_decl_fwrite_unlocked" "$ac_includes_default"
8439 if test "x$ac_cv_have_decl_fwrite_unlocked" = xyes; then :
8440   ac_have_decl=1
8441 else
8442   ac_have_decl=0
8443 fi
8444
8445 cat >>confdefs.h <<_ACEOF
8446 #define HAVE_DECL_FWRITE_UNLOCKED $ac_have_decl
8447 _ACEOF
8448
8449 ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
8450 if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then :
8451   ac_have_decl=1
8452 else
8453   ac_have_decl=0
8454 fi
8455
8456 cat >>confdefs.h <<_ACEOF
8457 #define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
8458 _ACEOF
8459
8460 ac_fn_c_check_decl "$LINENO" "getchar_unlocked" "ac_cv_have_decl_getchar_unlocked" "$ac_includes_default"
8461 if test "x$ac_cv_have_decl_getchar_unlocked" = xyes; then :
8462   ac_have_decl=1
8463 else
8464   ac_have_decl=0
8465 fi
8466
8467 cat >>confdefs.h <<_ACEOF
8468 #define HAVE_DECL_GETCHAR_UNLOCKED $ac_have_decl
8469 _ACEOF
8470
8471 ac_fn_c_check_decl "$LINENO" "putc_unlocked" "ac_cv_have_decl_putc_unlocked" "$ac_includes_default"
8472 if test "x$ac_cv_have_decl_putc_unlocked" = xyes; then :
8473   ac_have_decl=1
8474 else
8475   ac_have_decl=0
8476 fi
8477
8478 cat >>confdefs.h <<_ACEOF
8479 #define HAVE_DECL_PUTC_UNLOCKED $ac_have_decl
8480 _ACEOF
8481
8482 ac_fn_c_check_decl "$LINENO" "putchar_unlocked" "ac_cv_have_decl_putchar_unlocked" "$ac_includes_default"
8483 if test "x$ac_cv_have_decl_putchar_unlocked" = xyes; then :
8484   ac_have_decl=1
8485 else
8486   ac_have_decl=0
8487 fi
8488
8489 cat >>confdefs.h <<_ACEOF
8490 #define HAVE_DECL_PUTCHAR_UNLOCKED $ac_have_decl
8491 _ACEOF
8492
8493
8494
8495
8496   for ac_func in $ac_func_list
8497 do :
8498   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8499 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8500 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
8501   cat >>confdefs.h <<_ACEOF
8502 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
8503 _ACEOF
8504
8505 fi
8506 done
8507
8508
8509
8510
8511
8512
8513
8514
8515
8516
8517   XGETTEXT_EXTRA_OPTIONS=
8518
8519 # Make sure we can run config.sub.
8520 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
8521   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
8522
8523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
8524 $as_echo_n "checking build system type... " >&6; }
8525 if ${ac_cv_build+:} false; then :
8526   $as_echo_n "(cached) " >&6
8527 else
8528   ac_build_alias=$build_alias
8529 test "x$ac_build_alias" = x &&
8530   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
8531 test "x$ac_build_alias" = x &&
8532   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
8533 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
8534   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
8535
8536 fi
8537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
8538 $as_echo "$ac_cv_build" >&6; }
8539 case $ac_cv_build in
8540 *-*-*) ;;
8541 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
8542 esac
8543 build=$ac_cv_build
8544 ac_save_IFS=$IFS; IFS='-'
8545 set x $ac_cv_build
8546 shift
8547 build_cpu=$1
8548 build_vendor=$2
8549 shift; shift
8550 # Remember, the first character of IFS is used to create $*,
8551 # except with old shells:
8552 build_os=$*
8553 IFS=$ac_save_IFS
8554 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
8555
8556
8557 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
8558 $as_echo_n "checking host system type... " >&6; }
8559 if ${ac_cv_host+:} false; then :
8560   $as_echo_n "(cached) " >&6
8561 else
8562   if test "x$host_alias" = x; then
8563   ac_cv_host=$ac_cv_build
8564 else
8565   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
8566     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
8567 fi
8568
8569 fi
8570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
8571 $as_echo "$ac_cv_host" >&6; }
8572 case $ac_cv_host in
8573 *-*-*) ;;
8574 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
8575 esac
8576 host=$ac_cv_host
8577 ac_save_IFS=$IFS; IFS='-'
8578 set x $ac_cv_host
8579 shift
8580 host_cpu=$1
8581 host_vendor=$2
8582 shift; shift
8583 # Remember, the first character of IFS is used to create $*,
8584 # except with old shells:
8585 host_os=$*
8586 IFS=$ac_save_IFS
8587 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
8588
8589
8590     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_ino member in directory struct" >&5
8591 $as_echo_n "checking for d_ino member in directory struct... " >&6; }
8592 if ${gl_cv_struct_dirent_d_ino+:} false; then :
8593   $as_echo_n "(cached) " >&6
8594 else
8595   if test "$cross_compiling" = yes; then :
8596   case "$host_os" in
8597                            # Guess yes on glibc systems with Linux kernel.
8598               linux*-gnu*) gl_cv_struct_dirent_d_ino="guessing yes" ;;
8599                            # If we don't know, assume the worst.
8600               *)           gl_cv_struct_dirent_d_ino="guessing no" ;;
8601             esac
8602
8603 else
8604   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8605 /* end confdefs.h.  */
8606 #include <sys/types.h>
8607              #include <sys/stat.h>
8608              #include <dirent.h>
8609
8610 int
8611 main ()
8612 {
8613 DIR *dp = opendir (".");
8614              struct dirent *e;
8615              struct stat st;
8616              if (! dp)
8617                return 1;
8618              e = readdir (dp);
8619              if (! e)
8620                return 2;
8621              if (stat (e->d_name, &st) != 0)
8622                return 3;
8623              if (e->d_ino != st.st_ino)
8624                return 4;
8625              return 0;
8626
8627   ;
8628   return 0;
8629 }
8630 _ACEOF
8631 if ac_fn_c_try_run "$LINENO"; then :
8632   gl_cv_struct_dirent_d_ino=yes
8633 else
8634   gl_cv_struct_dirent_d_ino=no
8635 fi
8636 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8637   conftest.$ac_objext conftest.beam conftest.$ac_ext
8638 fi
8639
8640 fi
8641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_ino" >&5
8642 $as_echo "$gl_cv_struct_dirent_d_ino" >&6; }
8643    case "$gl_cv_struct_dirent_d_ino" in
8644      *yes)
8645
8646 $as_echo "#define D_INO_IN_DIRENT 1" >>confdefs.h
8647
8648        ;;
8649    esac
8650
8651
8652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long file names" >&5
8653 $as_echo_n "checking for long file names... " >&6; }
8654 if ${ac_cv_sys_long_file_names+:} false; then :
8655   $as_echo_n "(cached) " >&6
8656 else
8657   ac_cv_sys_long_file_names=yes
8658 # Test for long file names in all the places we know might matter:
8659 #      .                the current directory, where building will happen
8660 #      $prefix/lib      where we will be installing things
8661 #      $exec_prefix/lib likewise
8662 #      $TMPDIR          if set, where it might want to write temporary files
8663 #      /tmp             where it might want to write temporary files
8664 #      /var/tmp         likewise
8665 #      /usr/tmp         likewise
8666 for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do
8667   # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib
8668   # in the usual case where exec_prefix is '${prefix}'.
8669   case $ac_dir in #(
8670     . | /* | ?:[\\/]*) ;; #(
8671     *) continue;;
8672   esac
8673   test -w "$ac_dir/." || continue # It is less confusing to not echo anything here.
8674   ac_xdir=$ac_dir/cf$$
8675   (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
8676   ac_tf1=$ac_xdir/conftest9012345
8677   ac_tf2=$ac_xdir/conftest9012346
8678   touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" ||
8679     ac_cv_sys_long_file_names=no
8680   rm -f -r "$ac_xdir" 2>/dev/null
8681   test $ac_cv_sys_long_file_names = no && break
8682 done
8683 fi
8684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_long_file_names" >&5
8685 $as_echo "$ac_cv_sys_long_file_names" >&6; }
8686 if test $ac_cv_sys_long_file_names = yes; then
8687
8688 $as_echo "#define HAVE_LONG_FILE_NAMES 1" >>confdefs.h
8689
8690 fi
8691
8692
8693
8694
8695   GNULIB_BTOWC=0;
8696   GNULIB_WCTOB=0;
8697   GNULIB_MBSINIT=0;
8698   GNULIB_MBRTOWC=0;
8699   GNULIB_MBRLEN=0;
8700   GNULIB_MBSRTOWCS=0;
8701   GNULIB_MBSNRTOWCS=0;
8702   GNULIB_WCRTOMB=0;
8703   GNULIB_WCSRTOMBS=0;
8704   GNULIB_WCSNRTOMBS=0;
8705   GNULIB_WCWIDTH=0;
8706   GNULIB_WMEMCHR=0;
8707   GNULIB_WMEMCMP=0;
8708   GNULIB_WMEMCPY=0;
8709   GNULIB_WMEMMOVE=0;
8710   GNULIB_WMEMSET=0;
8711   GNULIB_WCSLEN=0;
8712   GNULIB_WCSNLEN=0;
8713   GNULIB_WCSCPY=0;
8714   GNULIB_WCPCPY=0;
8715   GNULIB_WCSNCPY=0;
8716   GNULIB_WCPNCPY=0;
8717   GNULIB_WCSCAT=0;
8718   GNULIB_WCSNCAT=0;
8719   GNULIB_WCSCMP=0;
8720   GNULIB_WCSNCMP=0;
8721   GNULIB_WCSCASECMP=0;
8722   GNULIB_WCSNCASECMP=0;
8723   GNULIB_WCSCOLL=0;
8724   GNULIB_WCSXFRM=0;
8725   GNULIB_WCSDUP=0;
8726   GNULIB_WCSCHR=0;
8727   GNULIB_WCSRCHR=0;
8728   GNULIB_WCSCSPN=0;
8729   GNULIB_WCSSPN=0;
8730   GNULIB_WCSPBRK=0;
8731   GNULIB_WCSSTR=0;
8732   GNULIB_WCSTOK=0;
8733   GNULIB_WCSWIDTH=0;
8734     HAVE_BTOWC=1;
8735   HAVE_MBSINIT=1;
8736   HAVE_MBRTOWC=1;
8737   HAVE_MBRLEN=1;
8738   HAVE_MBSRTOWCS=1;
8739   HAVE_MBSNRTOWCS=1;
8740   HAVE_WCRTOMB=1;
8741   HAVE_WCSRTOMBS=1;
8742   HAVE_WCSNRTOMBS=1;
8743   HAVE_WMEMCHR=1;
8744   HAVE_WMEMCMP=1;
8745   HAVE_WMEMCPY=1;
8746   HAVE_WMEMMOVE=1;
8747   HAVE_WMEMSET=1;
8748   HAVE_WCSLEN=1;
8749   HAVE_WCSNLEN=1;
8750   HAVE_WCSCPY=1;
8751   HAVE_WCPCPY=1;
8752   HAVE_WCSNCPY=1;
8753   HAVE_WCPNCPY=1;
8754   HAVE_WCSCAT=1;
8755   HAVE_WCSNCAT=1;
8756   HAVE_WCSCMP=1;
8757   HAVE_WCSNCMP=1;
8758   HAVE_WCSCASECMP=1;
8759   HAVE_WCSNCASECMP=1;
8760   HAVE_WCSCOLL=1;
8761   HAVE_WCSXFRM=1;
8762   HAVE_WCSDUP=1;
8763   HAVE_WCSCHR=1;
8764   HAVE_WCSRCHR=1;
8765   HAVE_WCSCSPN=1;
8766   HAVE_WCSSPN=1;
8767   HAVE_WCSPBRK=1;
8768   HAVE_WCSSTR=1;
8769   HAVE_WCSTOK=1;
8770   HAVE_WCSWIDTH=1;
8771   HAVE_DECL_WCTOB=1;
8772   HAVE_DECL_WCWIDTH=1;
8773   REPLACE_MBSTATE_T=0;
8774   REPLACE_BTOWC=0;
8775   REPLACE_WCTOB=0;
8776   REPLACE_MBSINIT=0;
8777   REPLACE_MBRTOWC=0;
8778   REPLACE_MBRLEN=0;
8779   REPLACE_MBSRTOWCS=0;
8780   REPLACE_MBSNRTOWCS=0;
8781   REPLACE_WCRTOMB=0;
8782   REPLACE_WCSRTOMBS=0;
8783   REPLACE_WCSNRTOMBS=0;
8784   REPLACE_WCWIDTH=0;
8785   REPLACE_WCSWIDTH=0;
8786
8787
8788             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
8789 $as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
8790 if ${gl_cv_header_wchar_h_correct_inline+:} false; then :
8791   $as_echo_n "(cached) " >&6
8792 else
8793   gl_cv_header_wchar_h_correct_inline=yes
8794      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8795 /* end confdefs.h.  */
8796
8797        #define wcstod renamed_wcstod
8798 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
8799    <wchar.h>.
8800    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
8801    included before <wchar.h>.  */
8802 #include <stddef.h>
8803 #include <stdio.h>
8804 #include <time.h>
8805 #include <wchar.h>
8806 extern int zero (void);
8807 int main () { return zero(); }
8808
8809 _ACEOF
8810      if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
8811   (eval $ac_compile) 2>&5
8812   ac_status=$?
8813   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8814   test $ac_status = 0; }; then
8815        mv conftest.$ac_objext conftest1.$ac_objext
8816        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8817 /* end confdefs.h.  */
8818
8819          #define wcstod renamed_wcstod
8820 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
8821    <wchar.h>.
8822    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
8823    included before <wchar.h>.  */
8824 #include <stddef.h>
8825 #include <stdio.h>
8826 #include <time.h>
8827 #include <wchar.h>
8828 int zero (void) { return 0; }
8829
8830 _ACEOF
8831        if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
8832   (eval $ac_compile) 2>&5
8833   ac_status=$?
8834   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8835   test $ac_status = 0; }; then
8836          mv conftest.$ac_objext conftest2.$ac_objext
8837          if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
8838            :
8839          else
8840            gl_cv_header_wchar_h_correct_inline=no
8841          fi
8842        fi
8843      fi
8844      rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext
8845
8846 fi
8847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
8848 $as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; }
8849   if test $gl_cv_header_wchar_h_correct_inline = no; then
8850     as_fn_error $? "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
8851 This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
8852 C99 mode. You have four options:
8853   - Add the flag -fgnu89-inline to CC and reconfigure, or
8854   - Fix your include files, using parts of
8855     <http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
8856   - Use a gcc version older than 4.3, or
8857   - Don't use the flags -std=c99 or -std=gnu99.
8858 Configuration aborted." "$LINENO" 5
8859   fi
8860
8861
8862
8863
8864   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
8865 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
8866 if ${am_cv_langinfo_codeset+:} false; then :
8867   $as_echo_n "(cached) " >&6
8868 else
8869   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8870 /* end confdefs.h.  */
8871 #include <langinfo.h>
8872 int
8873 main ()
8874 {
8875 char* cs = nl_langinfo(CODESET); return !cs;
8876   ;
8877   return 0;
8878 }
8879 _ACEOF
8880 if ac_fn_c_try_link "$LINENO"; then :
8881   am_cv_langinfo_codeset=yes
8882 else
8883   am_cv_langinfo_codeset=no
8884 fi
8885 rm -f core conftest.err conftest.$ac_objext \
8886     conftest$ac_exeext conftest.$ac_ext
8887
8888 fi
8889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
8890 $as_echo "$am_cv_langinfo_codeset" >&6; }
8891   if test $am_cv_langinfo_codeset = yes; then
8892
8893 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
8894
8895   fi
8896
8897
8898
8899
8900   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
8901 $as_echo_n "checking for a traditional french locale... " >&6; }
8902 if ${gt_cv_locale_fr+:} false; then :
8903   $as_echo_n "(cached) " >&6
8904 else
8905
8906     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8907 /* end confdefs.h.  */
8908
8909 #include <locale.h>
8910 #include <time.h>
8911 #if HAVE_LANGINFO_CODESET
8912 # include <langinfo.h>
8913 #endif
8914 #include <stdlib.h>
8915 #include <string.h>
8916 struct tm t;
8917 char buf[16];
8918 int main () {
8919   /* Check whether the given locale name is recognized by the system.  */
8920 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
8921   /* On native Windows, setlocale(category, "") looks at the system settings,
8922      not at the environment variables.  Also, when an encoding suffix such
8923      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
8924      category of the locale to "C".  */
8925   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
8926       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
8927     return 1;
8928 #else
8929   if (setlocale (LC_ALL, "") == NULL) return 1;
8930 #endif
8931   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
8932      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
8933      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
8934      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
8935      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
8936      some unit tests fail.
8937      On MirBSD 10, when an unsupported locale is specified, setlocale()
8938      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
8939 #if HAVE_LANGINFO_CODESET
8940   {
8941     const char *cs = nl_langinfo (CODESET);
8942     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
8943         || strcmp (cs, "UTF-8") == 0)
8944       return 1;
8945   }
8946 #endif
8947 #ifdef __CYGWIN__
8948   /* On Cygwin, avoid locale names without encoding suffix, because the
8949      locale_charset() function relies on the encoding suffix.  Note that
8950      LC_ALL is set on the command line.  */
8951   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
8952 #endif
8953   /* Check whether in the abbreviation of the second month, the second
8954      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
8955      one byte long. This excludes the UTF-8 encoding.  */
8956   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
8957   if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
8958 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
8959   /* Check whether the decimal separator is a comma.
8960      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
8961      are nl_langinfo(RADIXCHAR) are both ".".  */
8962   if (localeconv () ->decimal_point[0] != ',') return 1;
8963 #endif
8964   return 0;
8965 }
8966
8967 _ACEOF
8968     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
8969   (eval $ac_link) 2>&5
8970   ac_status=$?
8971   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8972   test $ac_status = 0; } && test -s conftest$ac_exeext; then
8973       case "$host_os" in
8974         # Handle native Windows specially, because there setlocale() interprets
8975         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
8976         # "fr" or "fra" as "French" or "French_France.1252",
8977         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
8978         # "ja" as "Japanese" or "Japanese_Japan.932",
8979         # and similar.
8980         mingw*)
8981           # Test for the native Windows locale name.
8982           if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8983             gt_cv_locale_fr=French_France.1252
8984           else
8985             # None found.
8986             gt_cv_locale_fr=none
8987           fi
8988           ;;
8989         *)
8990           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
8991           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
8992           # configure script would override the LC_ALL setting. Likewise for
8993           # LC_CTYPE, which is also set at the beginning of the configure script.
8994           # Test for the usual locale name.
8995           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8996             gt_cv_locale_fr=fr_FR
8997           else
8998             # Test for the locale name with explicit encoding suffix.
8999             if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
9000               gt_cv_locale_fr=fr_FR.ISO-8859-1
9001             else
9002               # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
9003               if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
9004                 gt_cv_locale_fr=fr_FR.ISO8859-1
9005               else
9006                 # Test for the HP-UX locale name.
9007                 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
9008                   gt_cv_locale_fr=fr_FR.iso88591
9009                 else
9010                   # Test for the Solaris 7 locale name.
9011                   if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
9012                     gt_cv_locale_fr=fr
9013                   else
9014                     # None found.
9015                     gt_cv_locale_fr=none
9016                   fi
9017                 fi
9018               fi
9019             fi
9020           fi
9021           ;;
9022       esac
9023     fi
9024     rm -fr conftest*
9025
9026 fi
9027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
9028 $as_echo "$gt_cv_locale_fr" >&6; }
9029   LOCALE_FR=$gt_cv_locale_fr
9030
9031
9032
9033   GNULIB__EXIT=0;
9034   GNULIB_ATOLL=0;
9035   GNULIB_CALLOC_POSIX=0;
9036   GNULIB_CANONICALIZE_FILE_NAME=0;
9037   GNULIB_GETLOADAVG=0;
9038   GNULIB_GETSUBOPT=0;
9039   GNULIB_GRANTPT=0;
9040   GNULIB_MALLOC_POSIX=0;
9041   GNULIB_MBTOWC=0;
9042   GNULIB_MKDTEMP=0;
9043   GNULIB_MKOSTEMP=0;
9044   GNULIB_MKOSTEMPS=0;
9045   GNULIB_MKSTEMP=0;
9046   GNULIB_MKSTEMPS=0;
9047   GNULIB_POSIX_OPENPT=0;
9048   GNULIB_PTSNAME=0;
9049   GNULIB_PTSNAME_R=0;
9050   GNULIB_PUTENV=0;
9051   GNULIB_RANDOM=0;
9052   GNULIB_RANDOM_R=0;
9053   GNULIB_REALLOC_POSIX=0;
9054   GNULIB_REALPATH=0;
9055   GNULIB_RPMATCH=0;
9056   GNULIB_SECURE_GETENV=0;
9057   GNULIB_SETENV=0;
9058   GNULIB_STRTOD=0;
9059   GNULIB_STRTOLL=0;
9060   GNULIB_STRTOULL=0;
9061   GNULIB_SYSTEM_POSIX=0;
9062   GNULIB_UNLOCKPT=0;
9063   GNULIB_UNSETENV=0;
9064   GNULIB_WCTOMB=0;
9065     HAVE__EXIT=1;
9066   HAVE_ATOLL=1;
9067   HAVE_CANONICALIZE_FILE_NAME=1;
9068   HAVE_DECL_GETLOADAVG=1;
9069   HAVE_GETSUBOPT=1;
9070   HAVE_GRANTPT=1;
9071   HAVE_MKDTEMP=1;
9072   HAVE_MKOSTEMP=1;
9073   HAVE_MKOSTEMPS=1;
9074   HAVE_MKSTEMP=1;
9075   HAVE_MKSTEMPS=1;
9076   HAVE_POSIX_OPENPT=1;
9077   HAVE_PTSNAME=1;
9078   HAVE_PTSNAME_R=1;
9079   HAVE_RANDOM=1;
9080   HAVE_RANDOM_H=1;
9081   HAVE_RANDOM_R=1;
9082   HAVE_REALPATH=1;
9083   HAVE_RPMATCH=1;
9084   HAVE_SECURE_GETENV=1;
9085   HAVE_SETENV=1;
9086   HAVE_DECL_SETENV=1;
9087   HAVE_STRTOD=1;
9088   HAVE_STRTOLL=1;
9089   HAVE_STRTOULL=1;
9090   HAVE_STRUCT_RANDOM_DATA=1;
9091   HAVE_SYS_LOADAVG_H=0;
9092   HAVE_UNLOCKPT=1;
9093   HAVE_DECL_UNSETENV=1;
9094   REPLACE_CALLOC=0;
9095   REPLACE_CANONICALIZE_FILE_NAME=0;
9096   REPLACE_MALLOC=0;
9097   REPLACE_MBTOWC=0;
9098   REPLACE_MKSTEMP=0;
9099   REPLACE_PTSNAME=0;
9100   REPLACE_PTSNAME_R=0;
9101   REPLACE_PUTENV=0;
9102   REPLACE_RANDOM_R=0;
9103   REPLACE_REALLOC=0;
9104   REPLACE_REALPATH=0;
9105   REPLACE_SETENV=0;
9106   REPLACE_STRTOD=0;
9107   REPLACE_UNSETENV=0;
9108   REPLACE_WCTOMB=0;
9109
9110
9111
9112
9113
9114
9115
9116
9117
9118   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
9119 $as_echo_n "checking whether // is distinct from /... " >&6; }
9120 if ${gl_cv_double_slash_root+:} false; then :
9121   $as_echo_n "(cached) " >&6
9122 else
9123    if test x"$cross_compiling" = xyes ; then
9124         # When cross-compiling, there is no way to tell whether // is special
9125         # short of a list of hosts.  However, the only known hosts to date
9126         # that have a distinct // are Apollo DomainOS (too old to port to),
9127         # Cygwin, and z/OS.  If anyone knows of another system for which // has
9128         # special semantics and is distinct from /, please report it to
9129         # <bug-gnulib@gnu.org>.
9130         case $host in
9131           *-cygwin | i370-ibm-openedition)
9132             gl_cv_double_slash_root=yes ;;
9133           *)
9134             # Be optimistic and assume that / and // are the same when we
9135             # don't know.
9136             gl_cv_double_slash_root='unknown, assuming no' ;;
9137         esac
9138       else
9139         set x `ls -di / // 2>/dev/null`
9140         if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
9141           gl_cv_double_slash_root=no
9142         else
9143           gl_cv_double_slash_root=yes
9144         fi
9145       fi
9146 fi
9147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
9148 $as_echo "$gl_cv_double_slash_root" >&6; }
9149   if test "$gl_cv_double_slash_root" = yes; then
9150
9151 $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
9152
9153   fi
9154
9155
9156
9157
9158
9159      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether realpath works" >&5
9160 $as_echo_n "checking whether realpath works... " >&6; }
9161 if ${gl_cv_func_realpath_works+:} false; then :
9162   $as_echo_n "(cached) " >&6
9163 else
9164
9165     touch conftest.a
9166     mkdir conftest.d
9167     if test "$cross_compiling" = yes; then :
9168   case "$host_os" in
9169                        # Guess yes on glibc systems.
9170         *-gnu* | gnu*) gl_cv_func_realpath_works="guessing yes" ;;
9171                        # If we don't know, assume the worst.
9172         *)             gl_cv_func_realpath_works="guessing no" ;;
9173       esac
9174
9175 else
9176   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9177 /* end confdefs.h.  */
9178
9179
9180
9181 #include <stdlib.h>
9182 #if defined __MACH__ && defined __APPLE__
9183 /* Avoid a crash on Mac OS X.  */
9184 #include <mach/mach.h>
9185 #include <mach/mach_error.h>
9186 #include <mach/thread_status.h>
9187 #include <mach/exception.h>
9188 #include <mach/task.h>
9189 #include <pthread.h>
9190 /* The exception port on which our thread listens.  */
9191 static mach_port_t our_exception_port;
9192 /* The main function of the thread listening for exceptions of type
9193    EXC_BAD_ACCESS.  */
9194 static void *
9195 mach_exception_thread (void *arg)
9196 {
9197   /* Buffer for a message to be received.  */
9198   struct {
9199     mach_msg_header_t head;
9200     mach_msg_body_t msgh_body;
9201     char data[1024];
9202   } msg;
9203   mach_msg_return_t retval;
9204   /* Wait for a message on the exception port.  */
9205   retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
9206                      our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
9207   if (retval != MACH_MSG_SUCCESS)
9208     abort ();
9209   exit (1);
9210 }
9211 static void
9212 nocrash_init (void)
9213 {
9214   mach_port_t self = mach_task_self ();
9215   /* Allocate a port on which the thread shall listen for exceptions.  */
9216   if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
9217       == KERN_SUCCESS) {
9218     /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html.  */
9219     if (mach_port_insert_right (self, our_exception_port, our_exception_port,
9220                                 MACH_MSG_TYPE_MAKE_SEND)
9221         == KERN_SUCCESS) {
9222       /* The exceptions we want to catch.  Only EXC_BAD_ACCESS is interesting
9223          for us.  */
9224       exception_mask_t mask = EXC_MASK_BAD_ACCESS;
9225       /* Create the thread listening on the exception port.  */
9226       pthread_attr_t attr;
9227       pthread_t thread;
9228       if (pthread_attr_init (&attr) == 0
9229           && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
9230           && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
9231         pthread_attr_destroy (&attr);
9232         /* Replace the exception port info for these exceptions with our own.
9233            Note that we replace the exception port for the entire task, not only
9234            for a particular thread.  This has the effect that when our exception
9235            port gets the message, the thread specific exception port has already
9236            been asked, and we don't need to bother about it.
9237            See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html.  */
9238         task_set_exception_ports (self, mask, our_exception_port,
9239                                   EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
9240       }
9241     }
9242   }
9243 }
9244 #elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
9245 /* Avoid a crash on native Windows.  */
9246 #define WIN32_LEAN_AND_MEAN
9247 #include <windows.h>
9248 #include <winerror.h>
9249 static LONG WINAPI
9250 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
9251 {
9252   switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
9253     {
9254     case EXCEPTION_ACCESS_VIOLATION:
9255     case EXCEPTION_IN_PAGE_ERROR:
9256     case EXCEPTION_STACK_OVERFLOW:
9257     case EXCEPTION_GUARD_PAGE:
9258     case EXCEPTION_PRIV_INSTRUCTION:
9259     case EXCEPTION_ILLEGAL_INSTRUCTION:
9260     case EXCEPTION_DATATYPE_MISALIGNMENT:
9261     case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
9262     case EXCEPTION_NONCONTINUABLE_EXCEPTION:
9263       exit (1);
9264     }
9265   return EXCEPTION_CONTINUE_SEARCH;
9266 }
9267 static void
9268 nocrash_init (void)
9269 {
9270   SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
9271 }
9272 #else
9273 /* Avoid a crash on POSIX systems.  */
9274 #include <signal.h>
9275 /* A POSIX signal handler.  */
9276 static void
9277 exception_handler (int sig)
9278 {
9279   exit (1);
9280 }
9281 static void
9282 nocrash_init (void)
9283 {
9284 #ifdef SIGSEGV
9285   signal (SIGSEGV, exception_handler);
9286 #endif
9287 #ifdef SIGBUS
9288   signal (SIGBUS, exception_handler);
9289 #endif
9290 }
9291 #endif
9292
9293         #include <stdlib.h>
9294         #include <string.h>
9295
9296 int
9297 main ()
9298 {
9299
9300         int result = 0;
9301         {
9302           char *name = realpath ("conftest.a", NULL);
9303           if (!(name && *name == '/'))
9304             result |= 1;
9305         }
9306         {
9307           char *name = realpath ("conftest.b/../conftest.a", NULL);
9308           if (name != NULL)
9309             result |= 2;
9310         }
9311         {
9312           char *name = realpath ("conftest.a/", NULL);
9313           if (name != NULL)
9314             result |= 4;
9315         }
9316         {
9317           char *name1 = realpath (".", NULL);
9318           char *name2 = realpath ("conftest.d//./..", NULL);
9319           if (strcmp (name1, name2) != 0)
9320             result |= 8;
9321         }
9322         return result;
9323
9324   ;
9325   return 0;
9326 }
9327
9328 _ACEOF
9329 if ac_fn_c_try_run "$LINENO"; then :
9330   gl_cv_func_realpath_works=yes
9331 else
9332   gl_cv_func_realpath_works=no
9333 fi
9334 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9335   conftest.$ac_objext conftest.beam conftest.$ac_ext
9336 fi
9337
9338     rm -rf conftest.a conftest.d
9339
9340 fi
9341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_realpath_works" >&5
9342 $as_echo "$gl_cv_func_realpath_works" >&6; }
9343   case "$gl_cv_func_realpath_works" in
9344     *yes)
9345
9346 $as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
9347
9348       ;;
9349   esac
9350
9351
9352
9353
9354
9355
9356
9357
9358
9359
9360
9361   GNULIB_CHDIR=0;
9362   GNULIB_CHOWN=0;
9363   GNULIB_CLOSE=0;
9364   GNULIB_DUP=0;
9365   GNULIB_DUP2=0;
9366   GNULIB_DUP3=0;
9367   GNULIB_ENVIRON=0;
9368   GNULIB_EUIDACCESS=0;
9369   GNULIB_FACCESSAT=0;
9370   GNULIB_FCHDIR=0;
9371   GNULIB_FCHOWNAT=0;
9372   GNULIB_FDATASYNC=0;
9373   GNULIB_FSYNC=0;
9374   GNULIB_FTRUNCATE=0;
9375   GNULIB_GETCWD=0;
9376   GNULIB_GETDOMAINNAME=0;
9377   GNULIB_GETDTABLESIZE=0;
9378   GNULIB_GETGROUPS=0;
9379   GNULIB_GETHOSTNAME=0;
9380   GNULIB_GETLOGIN=0;
9381   GNULIB_GETLOGIN_R=0;
9382   GNULIB_GETPAGESIZE=0;
9383   GNULIB_GETUSERSHELL=0;
9384   GNULIB_GROUP_MEMBER=0;
9385   GNULIB_ISATTY=0;
9386   GNULIB_LCHOWN=0;
9387   GNULIB_LINK=0;
9388   GNULIB_LINKAT=0;
9389   GNULIB_LSEEK=0;
9390   GNULIB_PIPE=0;
9391   GNULIB_PIPE2=0;
9392   GNULIB_PREAD=0;
9393   GNULIB_PWRITE=0;
9394   GNULIB_READ=0;
9395   GNULIB_READLINK=0;
9396   GNULIB_READLINKAT=0;
9397   GNULIB_RMDIR=0;
9398   GNULIB_SETHOSTNAME=0;
9399   GNULIB_SLEEP=0;
9400   GNULIB_SYMLINK=0;
9401   GNULIB_SYMLINKAT=0;
9402   GNULIB_TTYNAME_R=0;
9403   GNULIB_UNISTD_H_NONBLOCKING=0;
9404   GNULIB_UNISTD_H_SIGPIPE=0;
9405   GNULIB_UNLINK=0;
9406   GNULIB_UNLINKAT=0;
9407   GNULIB_USLEEP=0;
9408   GNULIB_WRITE=0;
9409     HAVE_CHOWN=1;
9410   HAVE_DUP2=1;
9411   HAVE_DUP3=1;
9412   HAVE_EUIDACCESS=1;
9413   HAVE_FACCESSAT=1;
9414   HAVE_FCHDIR=1;
9415   HAVE_FCHOWNAT=1;
9416   HAVE_FDATASYNC=1;
9417   HAVE_FSYNC=1;
9418   HAVE_FTRUNCATE=1;
9419   HAVE_GETDTABLESIZE=1;
9420   HAVE_GETGROUPS=1;
9421   HAVE_GETHOSTNAME=1;
9422   HAVE_GETLOGIN=1;
9423   HAVE_GETPAGESIZE=1;
9424   HAVE_GROUP_MEMBER=1;
9425   HAVE_LCHOWN=1;
9426   HAVE_LINK=1;
9427   HAVE_LINKAT=1;
9428   HAVE_PIPE=1;
9429   HAVE_PIPE2=1;
9430   HAVE_PREAD=1;
9431   HAVE_PWRITE=1;
9432   HAVE_READLINK=1;
9433   HAVE_READLINKAT=1;
9434   HAVE_SETHOSTNAME=1;
9435   HAVE_SLEEP=1;
9436   HAVE_SYMLINK=1;
9437   HAVE_SYMLINKAT=1;
9438   HAVE_UNLINKAT=1;
9439   HAVE_USLEEP=1;
9440   HAVE_DECL_ENVIRON=1;
9441   HAVE_DECL_FCHDIR=1;
9442   HAVE_DECL_FDATASYNC=1;
9443   HAVE_DECL_GETDOMAINNAME=1;
9444   HAVE_DECL_GETLOGIN_R=1;
9445   HAVE_DECL_GETPAGESIZE=1;
9446   HAVE_DECL_GETUSERSHELL=1;
9447   HAVE_DECL_SETHOSTNAME=1;
9448   HAVE_DECL_TTYNAME_R=1;
9449   HAVE_OS_H=0;
9450   HAVE_SYS_PARAM_H=0;
9451   REPLACE_CHOWN=0;
9452   REPLACE_CLOSE=0;
9453   REPLACE_DUP=0;
9454   REPLACE_DUP2=0;
9455   REPLACE_FCHOWNAT=0;
9456   REPLACE_FTRUNCATE=0;
9457   REPLACE_GETCWD=0;
9458   REPLACE_GETDOMAINNAME=0;
9459   REPLACE_GETLOGIN_R=0;
9460   REPLACE_GETGROUPS=0;
9461   REPLACE_GETPAGESIZE=0;
9462   REPLACE_ISATTY=0;
9463   REPLACE_LCHOWN=0;
9464   REPLACE_LINK=0;
9465   REPLACE_LINKAT=0;
9466   REPLACE_LSEEK=0;
9467   REPLACE_PREAD=0;
9468   REPLACE_PWRITE=0;
9469   REPLACE_READ=0;
9470   REPLACE_READLINK=0;
9471   REPLACE_RMDIR=0;
9472   REPLACE_SLEEP=0;
9473   REPLACE_SYMLINK=0;
9474   REPLACE_TTYNAME_R=0;
9475   REPLACE_UNLINK=0;
9476   REPLACE_UNLINKAT=0;
9477   REPLACE_USLEEP=0;
9478   REPLACE_WRITE=0;
9479   UNISTD_H_HAVE_WINSOCK2_H=0;
9480   UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
9481
9482
9483
9484
9485
9486
9487       for ac_header in unistd.h
9488 do :
9489   ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
9490 if test "x$ac_cv_header_unistd_h" = xyes; then :
9491   cat >>confdefs.h <<_ACEOF
9492 #define HAVE_UNISTD_H 1
9493 _ACEOF
9494
9495 fi
9496
9497 done
9498
9499   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working chown" >&5
9500 $as_echo_n "checking for working chown... " >&6; }
9501 if ${ac_cv_func_chown_works+:} false; then :
9502   $as_echo_n "(cached) " >&6
9503 else
9504   if test "$cross_compiling" = yes; then :
9505   case "$host_os" in # ((
9506                   # Guess yes on glibc systems.
9507           *-gnu*) ac_cv_func_chown_works=yes ;;
9508                   # If we don't know, assume the worst.
9509           *)      ac_cv_func_chown_works=no ;;
9510         esac
9511
9512 else
9513   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9514 /* end confdefs.h.  */
9515 $ac_includes_default
9516            #include <fcntl.h>
9517
9518 int
9519 main ()
9520 {
9521
9522             char *f = "conftest.chown";
9523             struct stat before, after;
9524
9525             if (creat (f, 0600) < 0)
9526               return 1;
9527             if (stat (f, &before) < 0)
9528               return 1;
9529             if (chown (f, (uid_t) -1, (gid_t) -1) == -1)
9530               return 1;
9531             if (stat (f, &after) < 0)
9532               return 1;
9533             return ! (before.st_uid == after.st_uid && before.st_gid == after.st_gid);
9534
9535   ;
9536   return 0;
9537 }
9538
9539 _ACEOF
9540 if ac_fn_c_try_run "$LINENO"; then :
9541   ac_cv_func_chown_works=yes
9542 else
9543   ac_cv_func_chown_works=no
9544 fi
9545 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9546   conftest.$ac_objext conftest.beam conftest.$ac_ext
9547 fi
9548
9549      rm -f conftest.chown
9550
9551 fi
9552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_chown_works" >&5
9553 $as_echo "$ac_cv_func_chown_works" >&6; }
9554   if test $ac_cv_func_chown_works = yes; then
9555
9556 $as_echo "#define HAVE_CHOWN 1" >>confdefs.h
9557
9558   fi
9559
9560
9561   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether chown dereferences symlinks" >&5
9562 $as_echo_n "checking whether chown dereferences symlinks... " >&6; }
9563 if ${gl_cv_func_chown_follows_symlink+:} false; then :
9564   $as_echo_n "(cached) " >&6
9565 else
9566
9567       if test "$cross_compiling" = yes; then :
9568   gl_cv_func_chown_follows_symlink=yes
9569
9570 else
9571   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9572 /* end confdefs.h.  */
9573
9574 #include <unistd.h>
9575 #include <stdlib.h>
9576 #include <errno.h>
9577
9578         int
9579         main ()
9580         {
9581           int result = 0;
9582           char const *dangling_symlink = "conftest.dangle";
9583
9584           unlink (dangling_symlink);
9585           if (symlink ("conftest.no-such", dangling_symlink))
9586             abort ();
9587
9588           /* Exit successfully on a conforming system,
9589              i.e., where chown must fail with ENOENT.  */
9590           if (chown (dangling_symlink, getuid (), getgid ()) == 0)
9591             result |= 1;
9592           if (errno != ENOENT)
9593             result |= 2;
9594           return result;
9595         }
9596
9597 _ACEOF
9598 if ac_fn_c_try_run "$LINENO"; then :
9599   gl_cv_func_chown_follows_symlink=yes
9600 else
9601   gl_cv_func_chown_follows_symlink=no
9602 fi
9603 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9604   conftest.$ac_objext conftest.beam conftest.$ac_ext
9605 fi
9606
9607
9608
9609 fi
9610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_chown_follows_symlink" >&5
9611 $as_echo "$gl_cv_func_chown_follows_symlink" >&6; }
9612
9613   if test $gl_cv_func_chown_follows_symlink = no; then
9614
9615 $as_echo "#define CHOWN_MODIFIES_SYMLINK 1" >>confdefs.h
9616
9617   fi
9618
9619
9620
9621
9622
9623
9624
9625
9626
9627
9628
9629
9630     if test $ac_cv_func_chown = no; then
9631     HAVE_CHOWN=0
9632   else
9633         if test $gl_cv_func_chown_follows_symlink = no; then
9634       REPLACE_CHOWN=1
9635     fi
9636
9637         if test $ac_cv_func_chown_works = no; then
9638
9639 $as_echo "#define CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE 1" >>confdefs.h
9640
9641       REPLACE_CHOWN=1
9642     fi
9643
9644                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether chown honors trailing slash" >&5
9645 $as_echo_n "checking whether chown honors trailing slash... " >&6; }
9646 if ${gl_cv_func_chown_slash_works+:} false; then :
9647   $as_echo_n "(cached) " >&6
9648 else
9649   touch conftest.file && rm -f conftest.link
9650        if test "$cross_compiling" = yes; then :
9651   case "$host_os" in
9652                    # Guess yes on glibc systems.
9653            *-gnu*) gl_cv_func_chown_slash_works="guessing yes" ;;
9654                    # If we don't know, assume the worst.
9655            *)      gl_cv_func_chown_slash_works="guessing no" ;;
9656          esac
9657
9658 else
9659   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9660 /* end confdefs.h.  */
9661
9662 #include <unistd.h>
9663 #include <stdlib.h>
9664 #include <errno.h>
9665
9666 int
9667 main ()
9668 {
9669     if (symlink ("conftest.file", "conftest.link")) return 1;
9670           if (chown ("conftest.link/", getuid (), getgid ()) == 0) return 2;
9671
9672   ;
9673   return 0;
9674 }
9675 _ACEOF
9676 if ac_fn_c_try_run "$LINENO"; then :
9677   gl_cv_func_chown_slash_works=yes
9678 else
9679   gl_cv_func_chown_slash_works=no
9680 fi
9681 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9682   conftest.$ac_objext conftest.beam conftest.$ac_ext
9683 fi
9684
9685       rm -f conftest.link conftest.file
9686 fi
9687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_chown_slash_works" >&5
9688 $as_echo "$gl_cv_func_chown_slash_works" >&6; }
9689     case "$gl_cv_func_chown_slash_works" in
9690       *yes) ;;
9691       *)
9692
9693 $as_echo "#define CHOWN_TRAILING_SLASH_BUG 1" >>confdefs.h
9694
9695         REPLACE_CHOWN=1
9696         ;;
9697     esac
9698
9699         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether chown always updates ctime" >&5
9700 $as_echo_n "checking whether chown always updates ctime... " >&6; }
9701 if ${gl_cv_func_chown_ctime_works+:} false; then :
9702   $as_echo_n "(cached) " >&6
9703 else
9704   if test "$cross_compiling" = yes; then :
9705   case "$host_os" in
9706                    # Guess yes on glibc systems.
9707            *-gnu*) gl_cv_func_chown_ctime_works="guessing yes" ;;
9708                    # If we don't know, assume the worst.
9709            *)      gl_cv_func_chown_ctime_works="guessing no" ;;
9710          esac
9711
9712 else
9713   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9714 /* end confdefs.h.  */
9715
9716 #include <unistd.h>
9717 #include <stdlib.h>
9718 #include <errno.h>
9719 #include <fcntl.h>
9720 #include <sys/stat.h>
9721
9722 int
9723 main ()
9724 {
9725     struct stat st1, st2;
9726           if (close (creat ("conftest.file", 0600))) return 1;
9727           if (stat ("conftest.file", &st1)) return 2;
9728           sleep (1);
9729           if (chown ("conftest.file", st1.st_uid, st1.st_gid)) return 3;
9730           if (stat ("conftest.file", &st2)) return 4;
9731           if (st2.st_ctime <= st1.st_ctime) return 5;
9732
9733   ;
9734   return 0;
9735 }
9736 _ACEOF
9737 if ac_fn_c_try_run "$LINENO"; then :
9738   gl_cv_func_chown_ctime_works=yes
9739 else
9740   gl_cv_func_chown_ctime_works=no
9741 fi
9742 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9743   conftest.$ac_objext conftest.beam conftest.$ac_ext
9744 fi
9745
9746       rm -f conftest.file
9747 fi
9748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_chown_ctime_works" >&5
9749 $as_echo "$gl_cv_func_chown_ctime_works" >&6; }
9750     case "$gl_cv_func_chown_ctime_works" in
9751       *yes) ;;
9752       *)
9753
9754 $as_echo "#define CHOWN_CHANGE_TIME_BUG 1" >>confdefs.h
9755
9756         REPLACE_CHOWN=1
9757         ;;
9758     esac
9759   fi
9760
9761
9762
9763
9764
9765   if test $ac_cv_func__set_invalid_parameter_handler = yes; then
9766     HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
9767
9768 $as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
9769
9770   else
9771     HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
9772   fi
9773
9774
9775
9776
9777
9778
9779
9780      GNULIB_OPENDIR=0;
9781   GNULIB_READDIR=0;
9782   GNULIB_REWINDDIR=0;
9783   GNULIB_CLOSEDIR=0;
9784   GNULIB_DIRFD=0;
9785   GNULIB_FDOPENDIR=0;
9786   GNULIB_SCANDIR=0;
9787   GNULIB_ALPHASORT=0;
9788     HAVE_OPENDIR=1;
9789   HAVE_READDIR=1;
9790   HAVE_REWINDDIR=1;
9791   HAVE_CLOSEDIR=1;
9792   HAVE_DECL_DIRFD=1;
9793   HAVE_DECL_FDOPENDIR=1;
9794   HAVE_FDOPENDIR=1;
9795   HAVE_SCANDIR=1;
9796   HAVE_ALPHASORT=1;
9797   REPLACE_OPENDIR=0;
9798   REPLACE_CLOSEDIR=0;
9799   REPLACE_DIRFD=0;
9800   REPLACE_FDOPENDIR=0;
9801
9802
9803
9804   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
9805 $as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
9806 if ${gl_cv_have_include_next+:} false; then :
9807   $as_echo_n "(cached) " >&6
9808 else
9809   rm -rf conftestd1a conftestd1b conftestd2
9810      mkdir conftestd1a conftestd1b conftestd2
9811                                                   cat <<EOF > conftestd1a/conftest.h
9812 #define DEFINED_IN_CONFTESTD1
9813 #include_next <conftest.h>
9814 #ifdef DEFINED_IN_CONFTESTD2
9815 int foo;
9816 #else
9817 #error "include_next doesn't work"
9818 #endif
9819 EOF
9820      cat <<EOF > conftestd1b/conftest.h
9821 #define DEFINED_IN_CONFTESTD1
9822 #include <stdio.h>
9823 #include_next <conftest.h>
9824 #ifdef DEFINED_IN_CONFTESTD2
9825 int foo;
9826 #else
9827 #error "include_next doesn't work"
9828 #endif
9829 EOF
9830      cat <<EOF > conftestd2/conftest.h
9831 #ifndef DEFINED_IN_CONFTESTD1
9832 #error "include_next test doesn't work"
9833 #endif
9834 #define DEFINED_IN_CONFTESTD2
9835 EOF
9836      gl_save_CPPFLAGS="$CPPFLAGS"
9837      CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
9838      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9839 /* end confdefs.h.  */
9840 #include <conftest.h>
9841 _ACEOF
9842 if ac_fn_c_try_compile "$LINENO"; then :
9843   gl_cv_have_include_next=yes
9844 else
9845   CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
9846         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9847 /* end confdefs.h.  */
9848 #include <conftest.h>
9849 _ACEOF
9850 if ac_fn_c_try_compile "$LINENO"; then :
9851   gl_cv_have_include_next=buggy
9852 else
9853   gl_cv_have_include_next=no
9854 fi
9855 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9856
9857 fi
9858 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9859      CPPFLAGS="$gl_save_CPPFLAGS"
9860      rm -rf conftestd1a conftestd1b conftestd2
9861
9862 fi
9863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
9864 $as_echo "$gl_cv_have_include_next" >&6; }
9865   PRAGMA_SYSTEM_HEADER=
9866   if test $gl_cv_have_include_next = yes; then
9867     INCLUDE_NEXT=include_next
9868     INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
9869     if test -n "$GCC"; then
9870       PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
9871     fi
9872   else
9873     if test $gl_cv_have_include_next = buggy; then
9874       INCLUDE_NEXT=include
9875       INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
9876     else
9877       INCLUDE_NEXT=include
9878       INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
9879     fi
9880   fi
9881
9882
9883
9884   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5
9885 $as_echo_n "checking whether system header files limit the line length... " >&6; }
9886 if ${gl_cv_pragma_columns+:} false; then :
9887   $as_echo_n "(cached) " >&6
9888 else
9889        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9890 /* end confdefs.h.  */
9891
9892 #ifdef __TANDEM
9893 choke me
9894 #endif
9895
9896 _ACEOF
9897 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9898   $EGREP "choke me" >/dev/null 2>&1; then :
9899   gl_cv_pragma_columns=yes
9900 else
9901   gl_cv_pragma_columns=no
9902 fi
9903 rm -f conftest*
9904
9905
9906 fi
9907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5
9908 $as_echo "$gl_cv_pragma_columns" >&6; }
9909   if test $gl_cv_pragma_columns = yes; then
9910     PRAGMA_COLUMNS="#pragma COLUMNS 10000"
9911   else
9912     PRAGMA_COLUMNS=
9913   fi
9914
9915
9916
9917
9918
9919
9920
9921
9922
9923
9924
9925
9926
9927
9928
9929
9930
9931   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
9932 $as_echo_n "checking if environ is properly declared... " >&6; }
9933   if ${gt_cv_var_environ_declaration+:} false; then :
9934   $as_echo_n "(cached) " >&6
9935 else
9936
9937     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9938 /* end confdefs.h.  */
9939 #if HAVE_UNISTD_H
9940      #include <unistd.h>
9941      #endif
9942      /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>.  */
9943      #include <stdlib.h>
9944
9945            extern struct { int foo; } environ;
9946 int
9947 main ()
9948 {
9949 environ.foo = 1;
9950   ;
9951   return 0;
9952 }
9953 _ACEOF
9954 if ac_fn_c_try_compile "$LINENO"; then :
9955   gt_cv_var_environ_declaration=no
9956 else
9957   gt_cv_var_environ_declaration=yes
9958 fi
9959 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9960 fi
9961
9962   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
9963 $as_echo "$gt_cv_var_environ_declaration" >&6; }
9964   if test $gt_cv_var_environ_declaration = yes; then
9965
9966 $as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
9967
9968   fi
9969
9970
9971   if test $gt_cv_var_environ_declaration != yes; then
9972     HAVE_DECL_ENVIRON=0
9973   fi
9974
9975
9976
9977   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
9978 $as_echo_n "checking for complete errno.h... " >&6; }
9979 if ${gl_cv_header_errno_h_complete+:} false; then :
9980   $as_echo_n "(cached) " >&6
9981 else
9982
9983     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9984 /* end confdefs.h.  */
9985
9986 #include <errno.h>
9987 #if !defined ETXTBSY
9988 booboo
9989 #endif
9990 #if !defined ENOMSG
9991 booboo
9992 #endif
9993 #if !defined EIDRM
9994 booboo
9995 #endif
9996 #if !defined ENOLINK
9997 booboo
9998 #endif
9999 #if !defined EPROTO
10000 booboo
10001 #endif
10002 #if !defined EMULTIHOP
10003 booboo
10004 #endif
10005 #if !defined EBADMSG
10006 booboo
10007 #endif
10008 #if !defined EOVERFLOW
10009 booboo
10010 #endif
10011 #if !defined ENOTSUP
10012 booboo
10013 #endif
10014 #if !defined ENETRESET
10015 booboo
10016 #endif
10017 #if !defined ECONNABORTED
10018 booboo
10019 #endif
10020 #if !defined ESTALE
10021 booboo
10022 #endif
10023 #if !defined EDQUOT
10024 booboo
10025 #endif
10026 #if !defined ECANCELED
10027 booboo
10028 #endif
10029 #if !defined EOWNERDEAD
10030 booboo
10031 #endif
10032 #if !defined ENOTRECOVERABLE
10033 booboo
10034 #endif
10035 #if !defined EILSEQ
10036 booboo
10037 #endif
10038
10039 _ACEOF
10040 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10041   $EGREP "booboo" >/dev/null 2>&1; then :
10042   gl_cv_header_errno_h_complete=no
10043 else
10044   gl_cv_header_errno_h_complete=yes
10045 fi
10046 rm -f conftest*
10047
10048
10049 fi
10050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
10051 $as_echo "$gl_cv_header_errno_h_complete" >&6; }
10052   if test $gl_cv_header_errno_h_complete = yes; then
10053     ERRNO_H=''
10054   else
10055
10056
10057
10058
10059
10060
10061
10062
10063      if test $gl_cv_have_include_next = yes; then
10064        gl_cv_next_errno_h='<'errno.h'>'
10065      else
10066        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
10067 $as_echo_n "checking absolute name of <errno.h>... " >&6; }
10068 if ${gl_cv_next_errno_h+:} false; then :
10069   $as_echo_n "(cached) " >&6
10070 else
10071
10072                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10073 /* end confdefs.h.  */
10074 #include <errno.h>
10075
10076 _ACEOF
10077                                                                                                                         case "$host_os" in
10078                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
10079                  *)    gl_absname_cpp="$ac_cpp" ;;
10080                esac
10081
10082                case "$host_os" in
10083                  mingw*)
10084                                                                                                                                      gl_dirsep_regex='[/\\]'
10085                    ;;
10086                  *)
10087                    gl_dirsep_regex='\/'
10088                    ;;
10089                esac
10090                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
10091
10092                gl_header_literal_regex=`echo 'errno.h' \
10093                                         | sed -e "$gl_make_literal_regex_sed"`
10094                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10095                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10096                    s|^/[^/]|//&|
10097                    p
10098                    q
10099                  }'
10100                                                             gl_cv_next_errno_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10101                       sed -n "$gl_absolute_header_sed"`'"'
10102
10103
10104 fi
10105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
10106 $as_echo "$gl_cv_next_errno_h" >&6; }
10107      fi
10108      NEXT_ERRNO_H=$gl_cv_next_errno_h
10109
10110      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10111        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10112        gl_next_as_first_directive='<'errno.h'>'
10113      else
10114        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10115        gl_next_as_first_directive=$gl_cv_next_errno_h
10116      fi
10117      NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
10118
10119
10120
10121
10122     ERRNO_H='errno.h'
10123   fi
10124
10125    if test -n "$ERRNO_H"; then
10126   GL_GENERATE_ERRNO_H_TRUE=
10127   GL_GENERATE_ERRNO_H_FALSE='#'
10128 else
10129   GL_GENERATE_ERRNO_H_TRUE='#'
10130   GL_GENERATE_ERRNO_H_FALSE=
10131 fi
10132
10133
10134   if test -n "$ERRNO_H"; then
10135     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
10136 $as_echo_n "checking for EMULTIHOP value... " >&6; }
10137 if ${gl_cv_header_errno_h_EMULTIHOP+:} false; then :
10138   $as_echo_n "(cached) " >&6
10139 else
10140
10141       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10142 /* end confdefs.h.  */
10143
10144 #include <errno.h>
10145 #ifdef EMULTIHOP
10146 yes
10147 #endif
10148
10149 _ACEOF
10150 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10151   $EGREP "yes" >/dev/null 2>&1; then :
10152   gl_cv_header_errno_h_EMULTIHOP=yes
10153 else
10154   gl_cv_header_errno_h_EMULTIHOP=no
10155 fi
10156 rm -f conftest*
10157
10158       if test $gl_cv_header_errno_h_EMULTIHOP = no; then
10159         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10160 /* end confdefs.h.  */
10161
10162 #define _XOPEN_SOURCE_EXTENDED 1
10163 #include <errno.h>
10164 #ifdef EMULTIHOP
10165 yes
10166 #endif
10167
10168 _ACEOF
10169 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10170   $EGREP "yes" >/dev/null 2>&1; then :
10171   gl_cv_header_errno_h_EMULTIHOP=hidden
10172 fi
10173 rm -f conftest*
10174
10175         if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
10176                               if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP"        "
10177 #define _XOPEN_SOURCE_EXTENDED 1
10178 #include <errno.h>
10179 /* The following two lines are a workaround against an autoconf-2.52 bug.  */
10180 #include <stdio.h>
10181 #include <stdlib.h>
10182 "; then :
10183
10184 fi
10185
10186         fi
10187       fi
10188
10189 fi
10190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
10191 $as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
10192     case $gl_cv_header_errno_h_EMULTIHOP in
10193       yes | no)
10194         EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
10195         ;;
10196       *)
10197         EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
10198         ;;
10199     esac
10200
10201
10202   fi
10203
10204
10205   if test -n "$ERRNO_H"; then
10206     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
10207 $as_echo_n "checking for ENOLINK value... " >&6; }
10208 if ${gl_cv_header_errno_h_ENOLINK+:} false; then :
10209   $as_echo_n "(cached) " >&6
10210 else
10211
10212       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10213 /* end confdefs.h.  */
10214
10215 #include <errno.h>
10216 #ifdef ENOLINK
10217 yes
10218 #endif
10219
10220 _ACEOF
10221 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10222   $EGREP "yes" >/dev/null 2>&1; then :
10223   gl_cv_header_errno_h_ENOLINK=yes
10224 else
10225   gl_cv_header_errno_h_ENOLINK=no
10226 fi
10227 rm -f conftest*
10228
10229       if test $gl_cv_header_errno_h_ENOLINK = no; then
10230         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10231 /* end confdefs.h.  */
10232
10233 #define _XOPEN_SOURCE_EXTENDED 1
10234 #include <errno.h>
10235 #ifdef ENOLINK
10236 yes
10237 #endif
10238
10239 _ACEOF
10240 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10241   $EGREP "yes" >/dev/null 2>&1; then :
10242   gl_cv_header_errno_h_ENOLINK=hidden
10243 fi
10244 rm -f conftest*
10245
10246         if test $gl_cv_header_errno_h_ENOLINK = hidden; then
10247                               if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK"        "
10248 #define _XOPEN_SOURCE_EXTENDED 1
10249 #include <errno.h>
10250 /* The following two lines are a workaround against an autoconf-2.52 bug.  */
10251 #include <stdio.h>
10252 #include <stdlib.h>
10253 "; then :
10254
10255 fi
10256
10257         fi
10258       fi
10259
10260 fi
10261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
10262 $as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; }
10263     case $gl_cv_header_errno_h_ENOLINK in
10264       yes | no)
10265         ENOLINK_HIDDEN=0; ENOLINK_VALUE=
10266         ;;
10267       *)
10268         ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
10269         ;;
10270     esac
10271
10272
10273   fi
10274
10275
10276   if test -n "$ERRNO_H"; then
10277     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
10278 $as_echo_n "checking for EOVERFLOW value... " >&6; }
10279 if ${gl_cv_header_errno_h_EOVERFLOW+:} false; then :
10280   $as_echo_n "(cached) " >&6
10281 else
10282
10283       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10284 /* end confdefs.h.  */
10285
10286 #include <errno.h>
10287 #ifdef EOVERFLOW
10288 yes
10289 #endif
10290
10291 _ACEOF
10292 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10293   $EGREP "yes" >/dev/null 2>&1; then :
10294   gl_cv_header_errno_h_EOVERFLOW=yes
10295 else
10296   gl_cv_header_errno_h_EOVERFLOW=no
10297 fi
10298 rm -f conftest*
10299
10300       if test $gl_cv_header_errno_h_EOVERFLOW = no; then
10301         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10302 /* end confdefs.h.  */
10303
10304 #define _XOPEN_SOURCE_EXTENDED 1
10305 #include <errno.h>
10306 #ifdef EOVERFLOW
10307 yes
10308 #endif
10309
10310 _ACEOF
10311 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10312   $EGREP "yes" >/dev/null 2>&1; then :
10313   gl_cv_header_errno_h_EOVERFLOW=hidden
10314 fi
10315 rm -f conftest*
10316
10317         if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
10318                               if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW"        "
10319 #define _XOPEN_SOURCE_EXTENDED 1
10320 #include <errno.h>
10321 /* The following two lines are a workaround against an autoconf-2.52 bug.  */
10322 #include <stdio.h>
10323 #include <stdlib.h>
10324 "; then :
10325
10326 fi
10327
10328         fi
10329       fi
10330
10331 fi
10332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
10333 $as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
10334     case $gl_cv_header_errno_h_EOVERFLOW in
10335       yes | no)
10336         EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
10337         ;;
10338       *)
10339         EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
10340         ;;
10341     esac
10342
10343
10344   fi
10345
10346
10347 ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
10348 if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
10349   ac_have_decl=1
10350 else
10351   ac_have_decl=0
10352 fi
10353
10354 cat >>confdefs.h <<_ACEOF
10355 #define HAVE_DECL_STRERROR_R $ac_have_decl
10356 _ACEOF
10357
10358 for ac_func in strerror_r
10359 do :
10360   ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
10361 if test "x$ac_cv_func_strerror_r" = xyes; then :
10362   cat >>confdefs.h <<_ACEOF
10363 #define HAVE_STRERROR_R 1
10364 _ACEOF
10365
10366 fi
10367 done
10368
10369 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
10370 $as_echo_n "checking whether strerror_r returns char *... " >&6; }
10371 if ${ac_cv_func_strerror_r_char_p+:} false; then :
10372   $as_echo_n "(cached) " >&6
10373 else
10374
10375     ac_cv_func_strerror_r_char_p=no
10376     if test $ac_cv_have_decl_strerror_r = yes; then
10377       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10378 /* end confdefs.h.  */
10379 $ac_includes_default
10380 int
10381 main ()
10382 {
10383
10384           char buf[100];
10385           char x = *strerror_r (0, buf, sizeof buf);
10386           char *p = strerror_r (0, buf, sizeof buf);
10387           return !p || x;
10388
10389   ;
10390   return 0;
10391 }
10392 _ACEOF
10393 if ac_fn_c_try_compile "$LINENO"; then :
10394   ac_cv_func_strerror_r_char_p=yes
10395 fi
10396 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10397     else
10398       # strerror_r is not declared.  Choose between
10399       # systems that have relatively inaccessible declarations for the
10400       # function.  BeOS and DEC UNIX 4.0 fall in this category, but the
10401       # former has a strerror_r that returns char*, while the latter
10402       # has a strerror_r that returns `int'.
10403       # This test should segfault on the DEC system.
10404       if test "$cross_compiling" = yes; then :
10405   :
10406 else
10407   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10408 /* end confdefs.h.  */
10409 $ac_includes_default
10410         extern char *strerror_r ();
10411 int
10412 main ()
10413 {
10414 char buf[100];
10415           char x = *strerror_r (0, buf, sizeof buf);
10416           return ! isalpha (x);
10417   ;
10418   return 0;
10419 }
10420 _ACEOF
10421 if ac_fn_c_try_run "$LINENO"; then :
10422   ac_cv_func_strerror_r_char_p=yes
10423 fi
10424 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10425   conftest.$ac_objext conftest.beam conftest.$ac_ext
10426 fi
10427
10428     fi
10429
10430 fi
10431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
10432 $as_echo "$ac_cv_func_strerror_r_char_p" >&6; }
10433 if test $ac_cv_func_strerror_r_char_p = yes; then
10434
10435 $as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h
10436
10437 fi
10438
10439
10440
10441
10442 ac_fn_c_check_decl "$LINENO" "fchdir" "ac_cv_have_decl_fchdir" "$ac_includes_default"
10443 if test "x$ac_cv_have_decl_fchdir" = xyes; then :
10444   ac_have_decl=1
10445 else
10446   ac_have_decl=0
10447 fi
10448
10449 cat >>confdefs.h <<_ACEOF
10450 #define HAVE_DECL_FCHDIR $ac_have_decl
10451 _ACEOF
10452
10453
10454      GNULIB_FCHMODAT=0;
10455   GNULIB_FSTAT=0;
10456   GNULIB_FSTATAT=0;
10457   GNULIB_FUTIMENS=0;
10458   GNULIB_LCHMOD=0;
10459   GNULIB_LSTAT=0;
10460   GNULIB_MKDIRAT=0;
10461   GNULIB_MKFIFO=0;
10462   GNULIB_MKFIFOAT=0;
10463   GNULIB_MKNOD=0;
10464   GNULIB_MKNODAT=0;
10465   GNULIB_STAT=0;
10466   GNULIB_UTIMENSAT=0;
10467     HAVE_FCHMODAT=1;
10468   HAVE_FSTATAT=1;
10469   HAVE_FUTIMENS=1;
10470   HAVE_LCHMOD=1;
10471   HAVE_LSTAT=1;
10472   HAVE_MKDIRAT=1;
10473   HAVE_MKFIFO=1;
10474   HAVE_MKFIFOAT=1;
10475   HAVE_MKNOD=1;
10476   HAVE_MKNODAT=1;
10477   HAVE_UTIMENSAT=1;
10478   REPLACE_FSTAT=0;
10479   REPLACE_FSTATAT=0;
10480   REPLACE_FUTIMENS=0;
10481   REPLACE_LSTAT=0;
10482   REPLACE_MKDIR=0;
10483   REPLACE_MKFIFO=0;
10484   REPLACE_MKNOD=0;
10485   REPLACE_STAT=0;
10486   REPLACE_UTIMENSAT=0;
10487
10488
10489
10490
10491
10492
10493   GNULIB_FCNTL=0;
10494   GNULIB_NONBLOCKING=0;
10495   GNULIB_OPEN=0;
10496   GNULIB_OPENAT=0;
10497     HAVE_FCNTL=1;
10498   HAVE_OPENAT=1;
10499   REPLACE_FCNTL=0;
10500   REPLACE_OPEN=0;
10501   REPLACE_OPENAT=0;
10502
10503
10504
10505
10506
10507
10508
10509
10510
10511
10512   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
10513 $as_echo_n "checking for working fcntl.h... " >&6; }
10514 if ${gl_cv_header_working_fcntl_h+:} false; then :
10515   $as_echo_n "(cached) " >&6
10516 else
10517   if test "$cross_compiling" = yes; then :
10518   gl_cv_header_working_fcntl_h=cross-compiling
10519 else
10520   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10521 /* end confdefs.h.  */
10522 #include <sys/types.h>
10523            #include <sys/stat.h>
10524            #if HAVE_UNISTD_H
10525            # include <unistd.h>
10526            #else /* on Windows with MSVC */
10527            # include <io.h>
10528            # include <stdlib.h>
10529            # defined sleep(n) _sleep ((n) * 1000)
10530            #endif
10531            #include <fcntl.h>
10532            #ifndef O_NOATIME
10533             #define O_NOATIME 0
10534            #endif
10535            #ifndef O_NOFOLLOW
10536             #define O_NOFOLLOW 0
10537            #endif
10538            static int const constants[] =
10539             {
10540               O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
10541               O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
10542             };
10543
10544 int
10545 main ()
10546 {
10547
10548             int result = !constants;
10549             #if HAVE_SYMLINK
10550             {
10551               static char const sym[] = "conftest.sym";
10552               if (symlink ("/dev/null", sym) != 0)
10553                 result |= 2;
10554               else
10555                 {
10556                   int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
10557                   if (fd >= 0)
10558                     {
10559                       close (fd);
10560                       result |= 4;
10561                     }
10562                 }
10563               if (unlink (sym) != 0 || symlink (".", sym) != 0)
10564                 result |= 2;
10565               else
10566                 {
10567                   int fd = open (sym, O_RDONLY | O_NOFOLLOW);
10568                   if (fd >= 0)
10569                     {
10570                       close (fd);
10571                       result |= 4;
10572                     }
10573                 }
10574               unlink (sym);
10575             }
10576             #endif
10577             {
10578               static char const file[] = "confdefs.h";
10579               int fd = open (file, O_RDONLY | O_NOATIME);
10580               if (fd < 0)
10581                 result |= 8;
10582               else
10583                 {
10584                   struct stat st0;
10585                   if (fstat (fd, &st0) != 0)
10586                     result |= 16;
10587                   else
10588                     {
10589                       char c;
10590                       sleep (1);
10591                       if (read (fd, &c, 1) != 1)
10592                         result |= 24;
10593                       else
10594                         {
10595                           if (close (fd) != 0)
10596                             result |= 32;
10597                           else
10598                             {
10599                               struct stat st1;
10600                               if (stat (file, &st1) != 0)
10601                                 result |= 40;
10602                               else
10603                                 if (st0.st_atime != st1.st_atime)
10604                                   result |= 64;
10605                             }
10606                         }
10607                     }
10608                 }
10609             }
10610             return result;
10611   ;
10612   return 0;
10613 }
10614 _ACEOF
10615 if ac_fn_c_try_run "$LINENO"; then :
10616   gl_cv_header_working_fcntl_h=yes
10617 else
10618   case $? in #(
10619         4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
10620         64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
10621         68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
10622          *) gl_cv_header_working_fcntl_h='no';;
10623         esac
10624 fi
10625 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10626   conftest.$ac_objext conftest.beam conftest.$ac_ext
10627 fi
10628
10629 fi
10630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
10631 $as_echo "$gl_cv_header_working_fcntl_h" >&6; }
10632
10633   case $gl_cv_header_working_fcntl_h in #(
10634   *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
10635   *) ac_val=1;;
10636   esac
10637
10638 cat >>confdefs.h <<_ACEOF
10639 #define HAVE_WORKING_O_NOATIME $ac_val
10640 _ACEOF
10641
10642
10643   case $gl_cv_header_working_fcntl_h in #(
10644   *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
10645   *) ac_val=1;;
10646   esac
10647
10648 cat >>confdefs.h <<_ACEOF
10649 #define HAVE_WORKING_O_NOFOLLOW $ac_val
10650 _ACEOF
10651
10652
10653
10654
10655
10656
10657    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
10658 $as_echo_n "checking for mbstate_t... " >&6; }
10659 if ${ac_cv_type_mbstate_t+:} false; then :
10660   $as_echo_n "(cached) " >&6
10661 else
10662   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10663 /* end confdefs.h.  */
10664 $ac_includes_default
10665 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
10666    <wchar.h>.
10667    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
10668    included before <wchar.h>.  */
10669 #include <stddef.h>
10670 #include <stdio.h>
10671 #include <time.h>
10672 #include <wchar.h>
10673 int
10674 main ()
10675 {
10676 mbstate_t x; return sizeof x;
10677   ;
10678   return 0;
10679 }
10680 _ACEOF
10681 if ac_fn_c_try_compile "$LINENO"; then :
10682   ac_cv_type_mbstate_t=yes
10683 else
10684   ac_cv_type_mbstate_t=no
10685 fi
10686 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10687 fi
10688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
10689 $as_echo "$ac_cv_type_mbstate_t" >&6; }
10690    if test $ac_cv_type_mbstate_t = yes; then
10691
10692 $as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
10693
10694    else
10695
10696 $as_echo "#define mbstate_t int" >>confdefs.h
10697
10698    fi
10699
10700
10701
10702
10703
10704
10705
10706
10707
10708
10709
10710
10711
10712
10713
10714
10715
10716
10717
10718
10719   GNULIB_DPRINTF=0;
10720   GNULIB_FCLOSE=0;
10721   GNULIB_FDOPEN=0;
10722   GNULIB_FFLUSH=0;
10723   GNULIB_FGETC=0;
10724   GNULIB_FGETS=0;
10725   GNULIB_FOPEN=0;
10726   GNULIB_FPRINTF=0;
10727   GNULIB_FPRINTF_POSIX=0;
10728   GNULIB_FPURGE=0;
10729   GNULIB_FPUTC=0;
10730   GNULIB_FPUTS=0;
10731   GNULIB_FREAD=0;
10732   GNULIB_FREOPEN=0;
10733   GNULIB_FSCANF=0;
10734   GNULIB_FSEEK=0;
10735   GNULIB_FSEEKO=0;
10736   GNULIB_FTELL=0;
10737   GNULIB_FTELLO=0;
10738   GNULIB_FWRITE=0;
10739   GNULIB_GETC=0;
10740   GNULIB_GETCHAR=0;
10741   GNULIB_GETDELIM=0;
10742   GNULIB_GETLINE=0;
10743   GNULIB_OBSTACK_PRINTF=0;
10744   GNULIB_OBSTACK_PRINTF_POSIX=0;
10745   GNULIB_PCLOSE=0;
10746   GNULIB_PERROR=0;
10747   GNULIB_POPEN=0;
10748   GNULIB_PRINTF=0;
10749   GNULIB_PRINTF_POSIX=0;
10750   GNULIB_PUTC=0;
10751   GNULIB_PUTCHAR=0;
10752   GNULIB_PUTS=0;
10753   GNULIB_REMOVE=0;
10754   GNULIB_RENAME=0;
10755   GNULIB_RENAMEAT=0;
10756   GNULIB_SCANF=0;
10757   GNULIB_SNPRINTF=0;
10758   GNULIB_SPRINTF_POSIX=0;
10759   GNULIB_STDIO_H_NONBLOCKING=0;
10760   GNULIB_STDIO_H_SIGPIPE=0;
10761   GNULIB_TMPFILE=0;
10762   GNULIB_VASPRINTF=0;
10763   GNULIB_VFSCANF=0;
10764   GNULIB_VSCANF=0;
10765   GNULIB_VDPRINTF=0;
10766   GNULIB_VFPRINTF=0;
10767   GNULIB_VFPRINTF_POSIX=0;
10768   GNULIB_VPRINTF=0;
10769   GNULIB_VPRINTF_POSIX=0;
10770   GNULIB_VSNPRINTF=0;
10771   GNULIB_VSPRINTF_POSIX=0;
10772     HAVE_DECL_FPURGE=1;
10773   HAVE_DECL_FSEEKO=1;
10774   HAVE_DECL_FTELLO=1;
10775   HAVE_DECL_GETDELIM=1;
10776   HAVE_DECL_GETLINE=1;
10777   HAVE_DECL_OBSTACK_PRINTF=1;
10778   HAVE_DECL_SNPRINTF=1;
10779   HAVE_DECL_VSNPRINTF=1;
10780   HAVE_DPRINTF=1;
10781   HAVE_FSEEKO=1;
10782   HAVE_FTELLO=1;
10783   HAVE_PCLOSE=1;
10784   HAVE_POPEN=1;
10785   HAVE_RENAMEAT=1;
10786   HAVE_VASPRINTF=1;
10787   HAVE_VDPRINTF=1;
10788   REPLACE_DPRINTF=0;
10789   REPLACE_FCLOSE=0;
10790   REPLACE_FDOPEN=0;
10791   REPLACE_FFLUSH=0;
10792   REPLACE_FOPEN=0;
10793   REPLACE_FPRINTF=0;
10794   REPLACE_FPURGE=0;
10795   REPLACE_FREOPEN=0;
10796   REPLACE_FSEEK=0;
10797   REPLACE_FSEEKO=0;
10798   REPLACE_FTELL=0;
10799   REPLACE_FTELLO=0;
10800   REPLACE_GETDELIM=0;
10801   REPLACE_GETLINE=0;
10802   REPLACE_OBSTACK_PRINTF=0;
10803   REPLACE_PERROR=0;
10804   REPLACE_POPEN=0;
10805   REPLACE_PRINTF=0;
10806   REPLACE_REMOVE=0;
10807   REPLACE_RENAME=0;
10808   REPLACE_RENAMEAT=0;
10809   REPLACE_SNPRINTF=0;
10810   REPLACE_SPRINTF=0;
10811   REPLACE_STDIO_READ_FUNCS=0;
10812   REPLACE_STDIO_WRITE_FUNCS=0;
10813   REPLACE_TMPFILE=0;
10814   REPLACE_VASPRINTF=0;
10815   REPLACE_VDPRINTF=0;
10816   REPLACE_VFPRINTF=0;
10817   REPLACE_VPRINTF=0;
10818   REPLACE_VSNPRINTF=0;
10819   REPLACE_VSPRINTF=0;
10820
10821
10822     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdin defaults to large file offsets" >&5
10823 $as_echo_n "checking whether stdin defaults to large file offsets... " >&6; }
10824 if ${gl_cv_var_stdin_large_offset+:} false; then :
10825   $as_echo_n "(cached) " >&6
10826 else
10827   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10828 /* end confdefs.h.  */
10829 #include <stdio.h>
10830 int
10831 main ()
10832 {
10833 #if defined __SL64 && defined __SCLE /* cygwin */
10834   /* Cygwin 1.5.24 and earlier fail to put stdin in 64-bit mode, making
10835      fseeko/ftello needlessly fail.  This bug was fixed in 1.5.25, and
10836      it is easier to do a version check than building a runtime test.  */
10837 # include <cygwin/version.h>
10838 # if CYGWIN_VERSION_DLL_COMBINED < CYGWIN_VERSION_DLL_MAKE_COMBINED (1005, 25)
10839   choke me
10840 # endif
10841 #endif
10842   ;
10843   return 0;
10844 }
10845 _ACEOF
10846 if ac_fn_c_try_link "$LINENO"; then :
10847   gl_cv_var_stdin_large_offset=yes
10848 else
10849   gl_cv_var_stdin_large_offset=no
10850 fi
10851 rm -f core conftest.err conftest.$ac_objext \
10852     conftest$ac_exeext conftest.$ac_ext
10853 fi
10854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var_stdin_large_offset" >&5
10855 $as_echo "$gl_cv_var_stdin_large_offset" >&6; }
10856
10857
10858
10859
10860
10861   case "$host_os" in
10862     mingw*)
10863                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
10864 $as_echo_n "checking for 64-bit off_t... " >&6; }
10865 if ${gl_cv_type_off_t_64+:} false; then :
10866   $as_echo_n "(cached) " >&6
10867 else
10868   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10869 /* end confdefs.h.  */
10870 #include <sys/types.h>
10871                 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
10872
10873 int
10874 main ()
10875 {
10876
10877   ;
10878   return 0;
10879 }
10880 _ACEOF
10881 if ac_fn_c_try_compile "$LINENO"; then :
10882   gl_cv_type_off_t_64=yes
10883 else
10884   gl_cv_type_off_t_64=no
10885 fi
10886 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10887
10888 fi
10889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
10890 $as_echo "$gl_cv_type_off_t_64" >&6; }
10891       if test $gl_cv_type_off_t_64 = no; then
10892         WINDOWS_64_BIT_OFF_T=1
10893       else
10894         WINDOWS_64_BIT_OFF_T=0
10895       fi
10896                   WINDOWS_64_BIT_ST_SIZE=1
10897       ;;
10898     *)
10899                                                       WINDOWS_64_BIT_OFF_T=0
10900       WINDOWS_64_BIT_ST_SIZE=0
10901       ;;
10902   esac
10903
10904
10905
10906
10907
10908
10909
10910
10911
10912
10913
10914
10915
10916
10917
10918
10919
10920      if test $gl_cv_have_include_next = yes; then
10921        gl_cv_next_sys_types_h='<'sys/types.h'>'
10922      else
10923        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
10924 $as_echo_n "checking absolute name of <sys/types.h>... " >&6; }
10925 if ${gl_cv_next_sys_types_h+:} false; then :
10926   $as_echo_n "(cached) " >&6
10927 else
10928
10929                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10930 /* end confdefs.h.  */
10931 #include <sys/types.h>
10932
10933 _ACEOF
10934                                                                                                                         case "$host_os" in
10935                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
10936                  *)    gl_absname_cpp="$ac_cpp" ;;
10937                esac
10938
10939                case "$host_os" in
10940                  mingw*)
10941                                                                                                                                      gl_dirsep_regex='[/\\]'
10942                    ;;
10943                  *)
10944                    gl_dirsep_regex='\/'
10945                    ;;
10946                esac
10947                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
10948
10949                gl_header_literal_regex=`echo 'sys/types.h' \
10950                                         | sed -e "$gl_make_literal_regex_sed"`
10951                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10952                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10953                    s|^/[^/]|//&|
10954                    p
10955                    q
10956                  }'
10957                                                             gl_cv_next_sys_types_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10958                       sed -n "$gl_absolute_header_sed"`'"'
10959
10960
10961 fi
10962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
10963 $as_echo "$gl_cv_next_sys_types_h" >&6; }
10964      fi
10965      NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h
10966
10967      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10968        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10969        gl_next_as_first_directive='<'sys/types.h'>'
10970      else
10971        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10972        gl_next_as_first_directive=$gl_cv_next_sys_types_h
10973      fi
10974      NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
10975
10976
10977
10978
10979
10980
10981
10982
10983
10984
10985
10986 ac_fn_c_check_decl "$LINENO" "fseeko" "ac_cv_have_decl_fseeko" "$ac_includes_default"
10987 if test "x$ac_cv_have_decl_fseeko" = xyes; then :
10988   ac_have_decl=1
10989 else
10990   ac_have_decl=0
10991 fi
10992
10993 cat >>confdefs.h <<_ACEOF
10994 #define HAVE_DECL_FSEEKO $ac_have_decl
10995 _ACEOF
10996
10997
10998
10999
11000
11001
11002
11003
11004
11005   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fseeko" >&5
11006 $as_echo_n "checking for fseeko... " >&6; }
11007 if ${gl_cv_func_fseeko+:} false; then :
11008   $as_echo_n "(cached) " >&6
11009 else
11010
11011       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11012 /* end confdefs.h.  */
11013 #include <stdio.h>
11014
11015 int
11016 main ()
11017 {
11018 fseeko (stdin, 0, 0);
11019   ;
11020   return 0;
11021 }
11022 _ACEOF
11023 if ac_fn_c_try_link "$LINENO"; then :
11024   gl_cv_func_fseeko=yes
11025 else
11026   gl_cv_func_fseeko=no
11027 fi
11028 rm -f core conftest.err conftest.$ac_objext \
11029     conftest$ac_exeext conftest.$ac_ext
11030
11031 fi
11032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fseeko" >&5
11033 $as_echo "$gl_cv_func_fseeko" >&6; }
11034
11035
11036   if test $ac_cv_have_decl_fseeko = no; then
11037     HAVE_DECL_FSEEKO=0
11038   fi
11039
11040   if test $gl_cv_func_fseeko = no; then
11041     HAVE_FSEEKO=0
11042   else
11043     if test $WINDOWS_64_BIT_OFF_T = 1; then
11044       REPLACE_FSEEKO=1
11045     fi
11046     if test $gl_cv_var_stdin_large_offset = no; then
11047       REPLACE_FSEEKO=1
11048     fi
11049
11050   fi
11051
11052
11053
11054
11055
11056
11057
11058
11059
11060
11061
11062
11063
11064
11065
11066
11067
11068      if test $gl_cv_have_include_next = yes; then
11069        gl_cv_next_sys_stat_h='<'sys/stat.h'>'
11070      else
11071        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
11072 $as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
11073 if ${gl_cv_next_sys_stat_h+:} false; then :
11074   $as_echo_n "(cached) " >&6
11075 else
11076
11077              if test $ac_cv_header_sys_stat_h = yes; then
11078
11079
11080                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11081 /* end confdefs.h.  */
11082 #include <sys/stat.h>
11083
11084 _ACEOF
11085                                                                                                                         case "$host_os" in
11086                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
11087                  *)    gl_absname_cpp="$ac_cpp" ;;
11088                esac
11089
11090                case "$host_os" in
11091                  mingw*)
11092                                                                                                                                      gl_dirsep_regex='[/\\]'
11093                    ;;
11094                  *)
11095                    gl_dirsep_regex='\/'
11096                    ;;
11097                esac
11098                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11099
11100                gl_header_literal_regex=`echo 'sys/stat.h' \
11101                                         | sed -e "$gl_make_literal_regex_sed"`
11102                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11103                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11104                    s|^/[^/]|//&|
11105                    p
11106                    q
11107                  }'
11108                                                             gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11109                       sed -n "$gl_absolute_header_sed"`'"'
11110           else
11111                gl_cv_next_sys_stat_h='<'sys/stat.h'>'
11112              fi
11113
11114
11115 fi
11116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
11117 $as_echo "$gl_cv_next_sys_stat_h" >&6; }
11118      fi
11119      NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
11120
11121      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11122        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11123        gl_next_as_first_directive='<'sys/stat.h'>'
11124      else
11125        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11126        gl_next_as_first_directive=$gl_cv_next_sys_stat_h
11127      fi
11128      NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
11129
11130
11131
11132
11133
11134
11135
11136
11137
11138
11139
11140   if test $WINDOWS_64_BIT_ST_SIZE = 1; then
11141
11142 $as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
11143
11144   fi
11145
11146       ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
11147      #include <sys/stat.h>
11148 "
11149 if test "x$ac_cv_type_nlink_t" = xyes; then :
11150
11151 else
11152
11153 $as_echo "#define nlink_t int" >>confdefs.h
11154
11155 fi
11156
11157
11158
11159     for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat     mknod mknodat stat utimensat; do
11160     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
11161     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
11162 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
11163 if eval \${$as_gl_Symbol+:} false; then :
11164   $as_echo_n "(cached) " >&6
11165 else
11166   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11167 /* end confdefs.h.  */
11168 #include <sys/stat.h>
11169
11170 int
11171 main ()
11172 {
11173 #undef $gl_func
11174   (void) $gl_func;
11175   ;
11176   return 0;
11177 }
11178 _ACEOF
11179 if ac_fn_c_try_compile "$LINENO"; then :
11180   eval "$as_gl_Symbol=yes"
11181 else
11182   eval "$as_gl_Symbol=no"
11183 fi
11184 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11185 fi
11186 eval ac_res=\$$as_gl_Symbol
11187                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11188 $as_echo "$ac_res" >&6; }
11189     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
11190   cat >>confdefs.h <<_ACEOF
11191 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
11192 _ACEOF
11193
11194                      eval ac_cv_have_decl_$gl_func=yes
11195 fi
11196       done
11197
11198
11199
11200       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
11201 $as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
11202 if ${gl_cv_func_lstat_dereferences_slashed_symlink+:} false; then :
11203   $as_echo_n "(cached) " >&6
11204 else
11205   rm -f conftest.sym conftest.file
11206      echo >conftest.file
11207      if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then
11208        if test "$cross_compiling" = yes; then :
11209   case "$host_os" in
11210                     # Guess yes on glibc systems.
11211             *-gnu*) gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
11212                     # If we don't know, assume the worst.
11213             *)      gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
11214           esac
11215
11216 else
11217   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11218 /* end confdefs.h.  */
11219 $ac_includes_default
11220 int
11221 main ()
11222 {
11223 struct stat sbuf;
11224               /* Linux will dereference the symlink and fail, as required by
11225                  POSIX.  That is better in the sense that it means we will not
11226                  have to compile and use the lstat wrapper.  */
11227               return lstat ("conftest.sym/", &sbuf) == 0;
11228
11229   ;
11230   return 0;
11231 }
11232 _ACEOF
11233 if ac_fn_c_try_run "$LINENO"; then :
11234   gl_cv_func_lstat_dereferences_slashed_symlink=yes
11235 else
11236   gl_cv_func_lstat_dereferences_slashed_symlink=no
11237 fi
11238 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11239   conftest.$ac_objext conftest.beam conftest.$ac_ext
11240 fi
11241
11242      else
11243        # If the 'ln -s' command failed, then we probably don't even
11244        # have an lstat function.
11245        gl_cv_func_lstat_dereferences_slashed_symlink="guessing no"
11246      fi
11247      rm -f conftest.sym conftest.file
11248
11249 fi
11250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
11251 $as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
11252   case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
11253     *yes)
11254
11255 cat >>confdefs.h <<_ACEOF
11256 #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
11257 _ACEOF
11258
11259       ;;
11260   esac
11261
11262
11263
11264
11265
11266
11267
11268    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5
11269 $as_echo_n "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; }
11270 if ${gl_cv_func_getcwd_null+:} false; then :
11271   $as_echo_n "(cached) " >&6
11272 else
11273   if test "$cross_compiling" = yes; then :
11274   case "$host_os" in
11275                      # Guess yes on glibc systems.
11276             *-gnu*)  gl_cv_func_getcwd_null="guessing yes";;
11277                      # Guess yes on Cygwin.
11278             cygwin*) gl_cv_func_getcwd_null="guessing yes";;
11279                      # If we don't know, assume the worst.
11280             *)       gl_cv_func_getcwd_null="guessing no";;
11281           esac
11282
11283 else
11284   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11285 /* end confdefs.h.  */
11286
11287 #        if HAVE_UNISTD_H
11288 #         include <unistd.h>
11289 #        else /* on Windows with MSVC */
11290 #         include <direct.h>
11291 #        endif
11292 #        ifndef getcwd
11293          char *getcwd ();
11294 #        endif
11295
11296 int
11297 main ()
11298 {
11299
11300 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
11301 /* mingw cwd does not start with '/', but getcwd does allocate.
11302    However, mingw fails to honor non-zero size.  */
11303 #else
11304            if (chdir ("/") != 0)
11305              return 1;
11306            else
11307              {
11308                char *f = getcwd (NULL, 0);
11309                if (! f)
11310                  return 2;
11311                if (f[0] != '/')
11312                  return 3;
11313                if (f[1] != '\0')
11314                  return 4;
11315                return 0;
11316              }
11317 #endif
11318
11319   ;
11320   return 0;
11321 }
11322 _ACEOF
11323 if ac_fn_c_try_run "$LINENO"; then :
11324   gl_cv_func_getcwd_null=yes
11325 else
11326   gl_cv_func_getcwd_null=no
11327 fi
11328 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11329   conftest.$ac_objext conftest.beam conftest.$ac_ext
11330 fi
11331
11332 fi
11333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_null" >&5
11334 $as_echo "$gl_cv_func_getcwd_null" >&6; }
11335
11336
11337   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getcwd with POSIX signature" >&5
11338 $as_echo_n "checking for getcwd with POSIX signature... " >&6; }
11339 if ${gl_cv_func_getcwd_posix_signature+:} false; then :
11340   $as_echo_n "(cached) " >&6
11341 else
11342   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11343 /* end confdefs.h.  */
11344 #include <unistd.h>
11345 int
11346 main ()
11347 {
11348 extern
11349            #ifdef __cplusplus
11350            "C"
11351            #endif
11352            char *getcwd (char *, size_t);
11353
11354   ;
11355   return 0;
11356 }
11357
11358 _ACEOF
11359 if ac_fn_c_try_compile "$LINENO"; then :
11360   gl_cv_func_getcwd_posix_signature=yes
11361 else
11362   gl_cv_func_getcwd_posix_signature=no
11363 fi
11364 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11365
11366 fi
11367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_posix_signature" >&5
11368 $as_echo "$gl_cv_func_getcwd_posix_signature" >&6; }
11369
11370 ac_fn_c_check_decl "$LINENO" "getcwd" "ac_cv_have_decl_getcwd" "$ac_includes_default"
11371 if test "x$ac_cv_have_decl_getcwd" = xyes; then :
11372   ac_have_decl=1
11373 else
11374   ac_have_decl=0
11375 fi
11376
11377 cat >>confdefs.h <<_ACEOF
11378 #define HAVE_DECL_GETCWD $ac_have_decl
11379 _ACEOF
11380
11381 ac_fn_c_check_decl "$LINENO" "getdelim" "ac_cv_have_decl_getdelim" "$ac_includes_default"
11382 if test "x$ac_cv_have_decl_getdelim" = xyes; then :
11383   ac_have_decl=1
11384 else
11385   ac_have_decl=0
11386 fi
11387
11388 cat >>confdefs.h <<_ACEOF
11389 #define HAVE_DECL_GETDELIM $ac_have_decl
11390 _ACEOF
11391
11392
11393
11394
11395
11396 ac_fn_c_check_decl "$LINENO" "getline" "ac_cv_have_decl_getline" "$ac_includes_default"
11397 if test "x$ac_cv_have_decl_getline" = xyes; then :
11398   ac_have_decl=1
11399 else
11400   ac_have_decl=0
11401 fi
11402
11403 cat >>confdefs.h <<_ACEOF
11404 #define HAVE_DECL_GETLINE $ac_have_decl
11405 _ACEOF
11406
11407
11408
11409
11410
11411
11412
11413
11414
11415
11416
11417
11418
11419
11420
11421
11422      if test $gl_cv_have_include_next = yes; then
11423        gl_cv_next_getopt_h='<'getopt.h'>'
11424      else
11425        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5
11426 $as_echo_n "checking absolute name of <getopt.h>... " >&6; }
11427 if ${gl_cv_next_getopt_h+:} false; then :
11428   $as_echo_n "(cached) " >&6
11429 else
11430
11431              if test $ac_cv_header_getopt_h = yes; then
11432
11433
11434                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11435 /* end confdefs.h.  */
11436 #include <getopt.h>
11437
11438 _ACEOF
11439                                                                                                                         case "$host_os" in
11440                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
11441                  *)    gl_absname_cpp="$ac_cpp" ;;
11442                esac
11443
11444                case "$host_os" in
11445                  mingw*)
11446                                                                                                                                      gl_dirsep_regex='[/\\]'
11447                    ;;
11448                  *)
11449                    gl_dirsep_regex='\/'
11450                    ;;
11451                esac
11452                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11453
11454                gl_header_literal_regex=`echo 'getopt.h' \
11455                                         | sed -e "$gl_make_literal_regex_sed"`
11456                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11457                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11458                    s|^/[^/]|//&|
11459                    p
11460                    q
11461                  }'
11462                                                             gl_cv_next_getopt_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11463                       sed -n "$gl_absolute_header_sed"`'"'
11464           else
11465                gl_cv_next_getopt_h='<'getopt.h'>'
11466              fi
11467
11468
11469 fi
11470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5
11471 $as_echo "$gl_cv_next_getopt_h" >&6; }
11472      fi
11473      NEXT_GETOPT_H=$gl_cv_next_getopt_h
11474
11475      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11476        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11477        gl_next_as_first_directive='<'getopt.h'>'
11478      else
11479        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11480        gl_next_as_first_directive=$gl_cv_next_getopt_h
11481      fi
11482      NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive
11483
11484
11485
11486
11487   if test $ac_cv_header_getopt_h = yes; then
11488     HAVE_GETOPT_H=1
11489   else
11490     HAVE_GETOPT_H=0
11491   fi
11492
11493
11494   gl_replace_getopt=
11495
11496     if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
11497     for ac_header in getopt.h
11498 do :
11499   ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
11500 if test "x$ac_cv_header_getopt_h" = xyes; then :
11501   cat >>confdefs.h <<_ACEOF
11502 #define HAVE_GETOPT_H 1
11503 _ACEOF
11504
11505 else
11506   gl_replace_getopt=yes
11507 fi
11508
11509 done
11510
11511   fi
11512
11513     if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
11514     for ac_func in getopt_long_only
11515 do :
11516   ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
11517 if test "x$ac_cv_func_getopt_long_only" = xyes; then :
11518   cat >>confdefs.h <<_ACEOF
11519 #define HAVE_GETOPT_LONG_ONLY 1
11520 _ACEOF
11521
11522 else
11523   gl_replace_getopt=yes
11524 fi
11525 done
11526
11527   fi
11528
11529           if test -z "$gl_replace_getopt"; then
11530     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5
11531 $as_echo_n "checking whether getopt is POSIX compatible... " >&6; }
11532 if ${gl_cv_func_getopt_posix+:} false; then :
11533   $as_echo_n "(cached) " >&6
11534 else
11535
11536                                                 if test $cross_compiling = no; then
11537                               if test "$cross_compiling" = yes; then :
11538   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11539 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11540 as_fn_error $? "cannot run test program while cross compiling
11541 See \`config.log' for more details" "$LINENO" 5; }
11542 else
11543   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11544 /* end confdefs.h.  */
11545
11546 #include <unistd.h>
11547 #include <stdlib.h>
11548 #include <string.h>
11549
11550 int
11551 main ()
11552 {
11553   static char program[] = "program";
11554   static char a[] = "-a";
11555   static char foo[] = "foo";
11556   static char bar[] = "bar";
11557   char *argv[] = { program, a, foo, bar, NULL };
11558   int c;
11559
11560   c = getopt (4, argv, "ab");
11561   if (!(c == 'a'))
11562     return 1;
11563   c = getopt (4, argv, "ab");
11564   if (!(c == -1))
11565     return 2;
11566   if (!(optind == 2))
11567     return 3;
11568   return 0;
11569 }
11570
11571 _ACEOF
11572 if ac_fn_c_try_run "$LINENO"; then :
11573   gl_cv_func_getopt_posix=maybe
11574 else
11575   gl_cv_func_getopt_posix=no
11576 fi
11577 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11578   conftest.$ac_objext conftest.beam conftest.$ac_ext
11579 fi
11580
11581           if test $gl_cv_func_getopt_posix = maybe; then
11582                                     if test "$cross_compiling" = yes; then :
11583   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11584 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11585 as_fn_error $? "cannot run test program while cross compiling
11586 See \`config.log' for more details" "$LINENO" 5; }
11587 else
11588   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11589 /* end confdefs.h.  */
11590
11591 #include <unistd.h>
11592 #include <stdlib.h>
11593 #include <string.h>
11594
11595 int
11596 main ()
11597 {
11598   static char program[] = "program";
11599   static char donald[] = "donald";
11600   static char p[] = "-p";
11601   static char billy[] = "billy";
11602   static char duck[] = "duck";
11603   static char a[] = "-a";
11604   static char bar[] = "bar";
11605   char *argv[] = { program, donald, p, billy, duck, a, bar, NULL };
11606   int c;
11607
11608   c = getopt (7, argv, "+abp:q:");
11609   if (!(c == -1))
11610     return 4;
11611   if (!(strcmp (argv[0], "program") == 0))
11612     return 5;
11613   if (!(strcmp (argv[1], "donald") == 0))
11614     return 6;
11615   if (!(strcmp (argv[2], "-p") == 0))
11616     return 7;
11617   if (!(strcmp (argv[3], "billy") == 0))
11618     return 8;
11619   if (!(strcmp (argv[4], "duck") == 0))
11620     return 9;
11621   if (!(strcmp (argv[5], "-a") == 0))
11622     return 10;
11623   if (!(strcmp (argv[6], "bar") == 0))
11624     return 11;
11625   if (!(optind == 1))
11626     return 12;
11627   return 0;
11628 }
11629
11630 _ACEOF
11631 if ac_fn_c_try_run "$LINENO"; then :
11632   gl_cv_func_getopt_posix=maybe
11633 else
11634   gl_cv_func_getopt_posix=no
11635 fi
11636 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11637   conftest.$ac_objext conftest.beam conftest.$ac_ext
11638 fi
11639
11640           fi
11641           if test $gl_cv_func_getopt_posix = maybe; then
11642                         if test "$cross_compiling" = yes; then :
11643   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11644 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11645 as_fn_error $? "cannot run test program while cross compiling
11646 See \`config.log' for more details" "$LINENO" 5; }
11647 else
11648   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11649 /* end confdefs.h.  */
11650
11651 #include <unistd.h>
11652 #include <stdlib.h>
11653 #include <string.h>
11654
11655 int
11656 main ()
11657 {
11658   static char program[] = "program";
11659   static char ab[] = "-ab";
11660   char *argv[3] = { program, ab, NULL };
11661   if (getopt (2, argv, "ab:") != 'a')
11662     return 13;
11663   if (getopt (2, argv, "ab:") != '?')
11664     return 14;
11665   if (optopt != 'b')
11666     return 15;
11667   if (optind != 2)
11668     return 16;
11669   return 0;
11670 }
11671
11672 _ACEOF
11673 if ac_fn_c_try_run "$LINENO"; then :
11674   gl_cv_func_getopt_posix=yes
11675 else
11676   gl_cv_func_getopt_posix=no
11677 fi
11678 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11679   conftest.$ac_objext conftest.beam conftest.$ac_ext
11680 fi
11681
11682           fi
11683         else
11684           case "$host_os" in
11685             darwin* | aix* | mingw*) gl_cv_func_getopt_posix="guessing no";;
11686             *)                       gl_cv_func_getopt_posix="guessing yes";;
11687           esac
11688         fi
11689
11690 fi
11691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5
11692 $as_echo "$gl_cv_func_getopt_posix" >&6; }
11693     case "$gl_cv_func_getopt_posix" in
11694       *no) gl_replace_getopt=yes ;;
11695     esac
11696   fi
11697
11698   if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
11699     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
11700 $as_echo_n "checking for working GNU getopt function... " >&6; }
11701 if ${gl_cv_func_getopt_gnu+:} false; then :
11702   $as_echo_n "(cached) " >&6
11703 else
11704   # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the
11705        # optstring is necessary for programs like m4 that have POSIX-mandated
11706        # semantics for supporting options interspersed with files.
11707        # Also, since getopt_long is a GNU extension, we require optind=0.
11708        # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT;
11709        # so take care to revert to the correct (non-)export state.
11710        gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }'
11711        case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in
11712          xx) gl_had_POSIXLY_CORRECT=exported ;;
11713          x)  gl_had_POSIXLY_CORRECT=yes      ;;
11714          *)  gl_had_POSIXLY_CORRECT=         ;;
11715        esac
11716        POSIXLY_CORRECT=1
11717        export POSIXLY_CORRECT
11718        if test "$cross_compiling" = yes; then :
11719            gl_cv_func_getopt_gnu="guessing no"
11720
11721 else
11722   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11723 /* end confdefs.h.  */
11724 #include <getopt.h>
11725                            #include <stddef.h>
11726                            #include <string.h>
11727
11728 #include <stdlib.h>
11729 #if defined __MACH__ && defined __APPLE__
11730 /* Avoid a crash on Mac OS X.  */
11731 #include <mach/mach.h>
11732 #include <mach/mach_error.h>
11733 #include <mach/thread_status.h>
11734 #include <mach/exception.h>
11735 #include <mach/task.h>
11736 #include <pthread.h>
11737 /* The exception port on which our thread listens.  */
11738 static mach_port_t our_exception_port;
11739 /* The main function of the thread listening for exceptions of type
11740    EXC_BAD_ACCESS.  */
11741 static void *
11742 mach_exception_thread (void *arg)
11743 {
11744   /* Buffer for a message to be received.  */
11745   struct {
11746     mach_msg_header_t head;
11747     mach_msg_body_t msgh_body;
11748     char data[1024];
11749   } msg;
11750   mach_msg_return_t retval;
11751   /* Wait for a message on the exception port.  */
11752   retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
11753                      our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
11754   if (retval != MACH_MSG_SUCCESS)
11755     abort ();
11756   exit (1);
11757 }
11758 static void
11759 nocrash_init (void)
11760 {
11761   mach_port_t self = mach_task_self ();
11762   /* Allocate a port on which the thread shall listen for exceptions.  */
11763   if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
11764       == KERN_SUCCESS) {
11765     /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html.  */
11766     if (mach_port_insert_right (self, our_exception_port, our_exception_port,
11767                                 MACH_MSG_TYPE_MAKE_SEND)
11768         == KERN_SUCCESS) {
11769       /* The exceptions we want to catch.  Only EXC_BAD_ACCESS is interesting
11770          for us.  */
11771       exception_mask_t mask = EXC_MASK_BAD_ACCESS;
11772       /* Create the thread listening on the exception port.  */
11773       pthread_attr_t attr;
11774       pthread_t thread;
11775       if (pthread_attr_init (&attr) == 0
11776           && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
11777           && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
11778         pthread_attr_destroy (&attr);
11779         /* Replace the exception port info for these exceptions with our own.
11780            Note that we replace the exception port for the entire task, not only
11781            for a particular thread.  This has the effect that when our exception
11782            port gets the message, the thread specific exception port has already
11783            been asked, and we don't need to bother about it.
11784            See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html.  */
11785         task_set_exception_ports (self, mask, our_exception_port,
11786                                   EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
11787       }
11788     }
11789   }
11790 }
11791 #elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
11792 /* Avoid a crash on native Windows.  */
11793 #define WIN32_LEAN_AND_MEAN
11794 #include <windows.h>
11795 #include <winerror.h>
11796 static LONG WINAPI
11797 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
11798 {
11799   switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
11800     {
11801     case EXCEPTION_ACCESS_VIOLATION:
11802     case EXCEPTION_IN_PAGE_ERROR:
11803     case EXCEPTION_STACK_OVERFLOW:
11804     case EXCEPTION_GUARD_PAGE:
11805     case EXCEPTION_PRIV_INSTRUCTION:
11806     case EXCEPTION_ILLEGAL_INSTRUCTION:
11807     case EXCEPTION_DATATYPE_MISALIGNMENT:
11808     case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
11809     case EXCEPTION_NONCONTINUABLE_EXCEPTION:
11810       exit (1);
11811     }
11812   return EXCEPTION_CONTINUE_SEARCH;
11813 }
11814 static void
11815 nocrash_init (void)
11816 {
11817   SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
11818 }
11819 #else
11820 /* Avoid a crash on POSIX systems.  */
11821 #include <signal.h>
11822 /* A POSIX signal handler.  */
11823 static void
11824 exception_handler (int sig)
11825 {
11826   exit (1);
11827 }
11828 static void
11829 nocrash_init (void)
11830 {
11831 #ifdef SIGSEGV
11832   signal (SIGSEGV, exception_handler);
11833 #endif
11834 #ifdef SIGBUS
11835   signal (SIGBUS, exception_handler);
11836 #endif
11837 }
11838 #endif
11839
11840
11841 int
11842 main ()
11843 {
11844
11845              int result = 0;
11846
11847              nocrash_init();
11848
11849              /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
11850                 and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
11851                 OSF/1 5.1, Solaris 10.  */
11852              {
11853                static char conftest[] = "conftest";
11854                static char plus[] = "-+";
11855                char *argv[3] = { conftest, plus, NULL };
11856                opterr = 0;
11857                if (getopt (2, argv, "+a") != '?')
11858                  result |= 1;
11859              }
11860              /* This code succeeds on glibc 2.8, mingw,
11861                 and fails on Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
11862                 IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x.  */
11863              {
11864                static char program[] = "program";
11865                static char p[] = "-p";
11866                static char foo[] = "foo";
11867                static char bar[] = "bar";
11868                char *argv[] = { program, p, foo, bar, NULL };
11869
11870                optind = 1;
11871                if (getopt (4, argv, "p::") != 'p')
11872                  result |= 2;
11873                else if (optarg != NULL)
11874                  result |= 4;
11875                else if (getopt (4, argv, "p::") != -1)
11876                  result |= 6;
11877                else if (optind != 2)
11878                  result |= 8;
11879              }
11880              /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0.  */
11881              {
11882                static char program[] = "program";
11883                static char foo[] = "foo";
11884                static char p[] = "-p";
11885                char *argv[] = { program, foo, p, NULL };
11886                optind = 0;
11887                if (getopt (3, argv, "-p") != 1)
11888                  result |= 16;
11889                else if (getopt (3, argv, "-p") != 'p')
11890                  result |= 16;
11891              }
11892              /* This code fails on glibc 2.11.  */
11893              {
11894                static char program[] = "program";
11895                static char b[] = "-b";
11896                static char a[] = "-a";
11897                char *argv[] = { program, b, a, NULL };
11898                optind = opterr = 0;
11899                if (getopt (3, argv, "+:a:b") != 'b')
11900                  result |= 32;
11901                else if (getopt (3, argv, "+:a:b") != ':')
11902                  result |= 32;
11903              }
11904              /* This code dumps core on glibc 2.14.  */
11905              {
11906                static char program[] = "program";
11907                static char w[] = "-W";
11908                static char dummy[] = "dummy";
11909                char *argv[] = { program, w, dummy, NULL };
11910                optind = opterr = 1;
11911                if (getopt (3, argv, "W;") != 'W')
11912                  result |= 64;
11913              }
11914              return result;
11915
11916   ;
11917   return 0;
11918 }
11919 _ACEOF
11920 if ac_fn_c_try_run "$LINENO"; then :
11921   gl_cv_func_getopt_gnu=yes
11922 else
11923   gl_cv_func_getopt_gnu=no
11924 fi
11925 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11926   conftest.$ac_objext conftest.beam conftest.$ac_ext
11927 fi
11928
11929        case $gl_had_POSIXLY_CORRECT in
11930          exported) ;;
11931          yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;;
11932          *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;;
11933        esac
11934
11935 fi
11936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5
11937 $as_echo "$gl_cv_func_getopt_gnu" >&6; }
11938     if test "$gl_cv_func_getopt_gnu" != yes; then
11939       gl_replace_getopt=yes
11940     else
11941       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt_long function" >&5
11942 $as_echo_n "checking for working GNU getopt_long function... " >&6; }
11943 if ${gl_cv_func_getopt_long_gnu+:} false; then :
11944   $as_echo_n "(cached) " >&6
11945 else
11946   if test "$cross_compiling" = yes; then :
11947               case "$host_os" in
11948               openbsd*) gl_cv_func_getopt_long_gnu="guessing no";;
11949               *)        gl_cv_func_getopt_long_gnu="guessing yes";;
11950             esac
11951
11952 else
11953   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11954 /* end confdefs.h.  */
11955 #include <getopt.h>
11956                 #include <stddef.h>
11957                 #include <string.h>
11958
11959 int
11960 main ()
11961 {
11962 static const struct option long_options[] =
11963                   {
11964                     { "xtremely-",no_argument,       NULL, 1003 },
11965                     { "xtra",     no_argument,       NULL, 1001 },
11966                     { "xtreme",   no_argument,       NULL, 1002 },
11967                     { "xtremely", no_argument,       NULL, 1003 },
11968                     { NULL,       0,                 NULL, 0 }
11969                   };
11970                 /* This code fails on OpenBSD 5.0.  */
11971                 {
11972                   static char program[] = "program";
11973                   static char xtremel[] = "--xtremel";
11974                   char *argv[] = { program, xtremel, NULL };
11975                   int option_index;
11976                   optind = 1; opterr = 0;
11977                   if (getopt_long (2, argv, "", long_options, &option_index) != 1003)
11978                     return 1;
11979                 }
11980                 return 0;
11981
11982   ;
11983   return 0;
11984 }
11985 _ACEOF
11986 if ac_fn_c_try_run "$LINENO"; then :
11987   gl_cv_func_getopt_long_gnu=yes
11988 else
11989   gl_cv_func_getopt_long_gnu=no
11990 fi
11991 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11992   conftest.$ac_objext conftest.beam conftest.$ac_ext
11993 fi
11994
11995
11996 fi
11997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_long_gnu" >&5
11998 $as_echo "$gl_cv_func_getopt_long_gnu" >&6; }
11999       case "$gl_cv_func_getopt_long_gnu" in
12000         *yes) ;;
12001         *) gl_replace_getopt=yes ;;
12002       esac
12003     fi
12004   fi
12005
12006
12007
12008
12009
12010
12011     REPLACE_GETOPT=1
12012
12013   if test $REPLACE_GETOPT = 1; then
12014
12015   GETOPT_H=getopt.h
12016
12017 $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
12018
12019
12020
12021   fi
12022
12023 ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default"
12024 if test "x$ac_cv_have_decl_getenv" = xyes; then :
12025   ac_have_decl=1
12026 else
12027   ac_have_decl=0
12028 fi
12029
12030 cat >>confdefs.h <<_ACEOF
12031 #define HAVE_DECL_GETENV $ac_have_decl
12032 _ACEOF
12033
12034 :
12035
12036
12037
12038
12039
12040   GNULIB_GETTIMEOFDAY=0;
12041     HAVE_GETTIMEOFDAY=1;
12042   HAVE_STRUCT_TIMEVAL=1;
12043   HAVE_SYS_TIME_H=1;
12044   REPLACE_GETTIMEOFDAY=0;
12045   REPLACE_STRUCT_TIMEVAL=0;
12046
12047
12048
12049
12050
12051
12052
12053
12054
12055
12056
12057
12058
12059
12060      if test $gl_cv_have_include_next = yes; then
12061        gl_cv_next_sys_time_h='<'sys/time.h'>'
12062      else
12063        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
12064 $as_echo_n "checking absolute name of <sys/time.h>... " >&6; }
12065 if ${gl_cv_next_sys_time_h+:} false; then :
12066   $as_echo_n "(cached) " >&6
12067 else
12068
12069              if test $ac_cv_header_sys_time_h = yes; then
12070
12071
12072                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12073 /* end confdefs.h.  */
12074 #include <sys/time.h>
12075
12076 _ACEOF
12077                                                                                                                         case "$host_os" in
12078                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
12079                  *)    gl_absname_cpp="$ac_cpp" ;;
12080                esac
12081
12082                case "$host_os" in
12083                  mingw*)
12084                                                                                                                                      gl_dirsep_regex='[/\\]'
12085                    ;;
12086                  *)
12087                    gl_dirsep_regex='\/'
12088                    ;;
12089                esac
12090                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12091
12092                gl_header_literal_regex=`echo 'sys/time.h' \
12093                                         | sed -e "$gl_make_literal_regex_sed"`
12094                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12095                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12096                    s|^/[^/]|//&|
12097                    p
12098                    q
12099                  }'
12100                                                             gl_cv_next_sys_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12101                       sed -n "$gl_absolute_header_sed"`'"'
12102           else
12103                gl_cv_next_sys_time_h='<'sys/time.h'>'
12104              fi
12105
12106
12107 fi
12108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
12109 $as_echo "$gl_cv_next_sys_time_h" >&6; }
12110      fi
12111      NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
12112
12113      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12114        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12115        gl_next_as_first_directive='<'sys/time.h'>'
12116      else
12117        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12118        gl_next_as_first_directive=$gl_cv_next_sys_time_h
12119      fi
12120      NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
12121
12122
12123
12124
12125
12126   if test $ac_cv_header_sys_time_h != yes; then
12127     HAVE_SYS_TIME_H=0
12128   fi
12129
12130
12131
12132
12133
12134   if test $ac_cv_header_sys_socket_h != yes; then
12135                     for ac_header in winsock2.h
12136 do :
12137   ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
12138 if test "x$ac_cv_header_winsock2_h" = xyes; then :
12139   cat >>confdefs.h <<_ACEOF
12140 #define HAVE_WINSOCK2_H 1
12141 _ACEOF
12142
12143 fi
12144
12145 done
12146
12147   fi
12148   if test "$ac_cv_header_winsock2_h" = yes; then
12149     HAVE_WINSOCK2_H=1
12150     UNISTD_H_HAVE_WINSOCK2_H=1
12151     SYS_IOCTL_H_HAVE_WINSOCK2_H=1
12152   else
12153     HAVE_WINSOCK2_H=0
12154   fi
12155
12156
12157   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
12158 $as_echo_n "checking for struct timeval... " >&6; }
12159 if ${gl_cv_sys_struct_timeval+:} false; then :
12160   $as_echo_n "(cached) " >&6
12161 else
12162   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12163 /* end confdefs.h.  */
12164 #if HAVE_SYS_TIME_H
12165              #include <sys/time.h>
12166             #endif
12167             #include <time.h>
12168             #if HAVE_WINSOCK2_H
12169             # include <winsock2.h>
12170             #endif
12171
12172 int
12173 main ()
12174 {
12175 static struct timeval x; x.tv_sec = x.tv_usec;
12176   ;
12177   return 0;
12178 }
12179 _ACEOF
12180 if ac_fn_c_try_compile "$LINENO"; then :
12181   gl_cv_sys_struct_timeval=yes
12182 else
12183   gl_cv_sys_struct_timeval=no
12184 fi
12185 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12186
12187 fi
12188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
12189 $as_echo "$gl_cv_sys_struct_timeval" >&6; }
12190   if test $gl_cv_sys_struct_timeval != yes; then
12191     HAVE_STRUCT_TIMEVAL=0
12192   else
12193                             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
12194 $as_echo_n "checking for wide-enough struct timeval.tv_sec member... " >&6; }
12195 if ${gl_cv_sys_struct_timeval_tv_sec+:} false; then :
12196   $as_echo_n "(cached) " >&6
12197 else
12198   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12199 /* end confdefs.h.  */
12200 #if HAVE_SYS_TIME_H
12201                #include <sys/time.h>
12202               #endif
12203               #include <time.h>
12204               #if HAVE_WINSOCK2_H
12205               # include <winsock2.h>
12206               #endif
12207
12208 int
12209 main ()
12210 {
12211 static struct timeval x;
12212               typedef int verify_tv_sec_type[
12213                 sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
12214               ];
12215
12216   ;
12217   return 0;
12218 }
12219 _ACEOF
12220 if ac_fn_c_try_compile "$LINENO"; then :
12221   gl_cv_sys_struct_timeval_tv_sec=yes
12222 else
12223   gl_cv_sys_struct_timeval_tv_sec=no
12224 fi
12225 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12226
12227 fi
12228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
12229 $as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
12230     if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
12231       REPLACE_STRUCT_TIMEVAL=1
12232     fi
12233   fi
12234
12235
12236     for gl_func in gettimeofday; do
12237     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
12238     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
12239 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
12240 if eval \${$as_gl_Symbol+:} false; then :
12241   $as_echo_n "(cached) " >&6
12242 else
12243   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12244 /* end confdefs.h.  */
12245
12246 #if HAVE_SYS_TIME_H
12247 # include <sys/time.h>
12248 #endif
12249 #include <time.h>
12250
12251 int
12252 main ()
12253 {
12254 #undef $gl_func
12255   (void) $gl_func;
12256   ;
12257   return 0;
12258 }
12259 _ACEOF
12260 if ac_fn_c_try_compile "$LINENO"; then :
12261   eval "$as_gl_Symbol=yes"
12262 else
12263   eval "$as_gl_Symbol=no"
12264 fi
12265 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12266 fi
12267 eval ac_res=\$$as_gl_Symbol
12268                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12269 $as_echo "$ac_res" >&6; }
12270     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
12271   cat >>confdefs.h <<_ACEOF
12272 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
12273 _ACEOF
12274
12275                      eval ac_cv_have_decl_$gl_func=yes
12276 fi
12277       done
12278
12279
12280
12281
12282
12283
12284   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
12285 $as_echo_n "checking for unsigned long long int... " >&6; }
12286 if ${ac_cv_type_unsigned_long_long_int+:} false; then :
12287   $as_echo_n "(cached) " >&6
12288 else
12289   ac_cv_type_unsigned_long_long_int=yes
12290      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
12291        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12292 /* end confdefs.h.  */
12293
12294   /* For now, do not test the preprocessor; as of 2007 there are too many
12295          implementations with broken preprocessors.  Perhaps this can
12296          be revisited in 2012.  In the meantime, code should not expect
12297          #if to work with literals wider than 32 bits.  */
12298       /* Test literals.  */
12299       long long int ll = 9223372036854775807ll;
12300       long long int nll = -9223372036854775807LL;
12301       unsigned long long int ull = 18446744073709551615ULL;
12302       /* Test constant expressions.   */
12303       typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
12304                      ? 1 : -1)];
12305       typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
12306                      ? 1 : -1)];
12307       int i = 63;
12308 int
12309 main ()
12310 {
12311 /* Test availability of runtime routines for shift and division.  */
12312       long long int llmax = 9223372036854775807ll;
12313       unsigned long long int ullmax = 18446744073709551615ull;
12314       return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
12315               | (llmax / ll) | (llmax % ll)
12316               | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
12317               | (ullmax / ull) | (ullmax % ull));
12318   ;
12319   return 0;
12320 }
12321
12322 _ACEOF
12323 if ac_fn_c_try_link "$LINENO"; then :
12324
12325 else
12326   ac_cv_type_unsigned_long_long_int=no
12327 fi
12328 rm -f core conftest.err conftest.$ac_objext \
12329     conftest$ac_exeext conftest.$ac_ext
12330      fi
12331 fi
12332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
12333 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
12334   if test $ac_cv_type_unsigned_long_long_int = yes; then
12335
12336 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
12337
12338   fi
12339
12340
12341
12342   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
12343 $as_echo_n "checking for long long int... " >&6; }
12344 if ${ac_cv_type_long_long_int+:} false; then :
12345   $as_echo_n "(cached) " >&6
12346 else
12347   ac_cv_type_long_long_int=yes
12348       if test "x${ac_cv_prog_cc_c99-no}" = xno; then
12349         ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
12350         if test $ac_cv_type_long_long_int = yes; then
12351                                         if test "$cross_compiling" = yes; then :
12352   :
12353 else
12354   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12355 /* end confdefs.h.  */
12356 #include <limits.h>
12357                  #ifndef LLONG_MAX
12358                  # define HALF \
12359                           (1LL << (sizeof (long long int) * CHAR_BIT - 2))
12360                  # define LLONG_MAX (HALF - 1 + HALF)
12361                  #endif
12362 int
12363 main ()
12364 {
12365 long long int n = 1;
12366                  int i;
12367                  for (i = 0; ; i++)
12368                    {
12369                      long long int m = n << i;
12370                      if (m >> i != n)
12371                        return 1;
12372                      if (LLONG_MAX / 2 < m)
12373                        break;
12374                    }
12375                  return 0;
12376   ;
12377   return 0;
12378 }
12379 _ACEOF
12380 if ac_fn_c_try_run "$LINENO"; then :
12381
12382 else
12383   ac_cv_type_long_long_int=no
12384 fi
12385 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12386   conftest.$ac_objext conftest.beam conftest.$ac_ext
12387 fi
12388
12389         fi
12390       fi
12391 fi
12392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
12393 $as_echo "$ac_cv_type_long_long_int" >&6; }
12394   if test $ac_cv_type_long_long_int = yes; then
12395
12396 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
12397
12398   fi
12399
12400
12401
12402
12403
12404
12405     gl_cv_c_multiarch=no
12406   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12407 /* end confdefs.h.  */
12408 #ifndef __APPLE_CC__
12409          not a universal capable compiler
12410         #endif
12411         typedef int dummy;
12412
12413 _ACEOF
12414 if ac_fn_c_try_compile "$LINENO"; then :
12415
12416                arch=
12417      prev=
12418      for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
12419        if test -n "$prev"; then
12420          case $word in
12421            i?86 | x86_64 | ppc | ppc64)
12422              if test -z "$arch" || test "$arch" = "$word"; then
12423                arch="$word"
12424              else
12425                gl_cv_c_multiarch=yes
12426              fi
12427              ;;
12428          esac
12429          prev=
12430        else
12431          if test "x$word" = "x-arch"; then
12432            prev=arch
12433          fi
12434        fi
12435      done
12436
12437 fi
12438 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12439   if test $gl_cv_c_multiarch = yes; then
12440     APPLE_UNIVERSAL_BUILD=1
12441   else
12442     APPLE_UNIVERSAL_BUILD=0
12443   fi
12444
12445
12446
12447
12448
12449   if test $ac_cv_type_long_long_int = yes; then
12450     HAVE_LONG_LONG_INT=1
12451   else
12452     HAVE_LONG_LONG_INT=0
12453   fi
12454
12455
12456   if test $ac_cv_type_unsigned_long_long_int = yes; then
12457     HAVE_UNSIGNED_LONG_LONG_INT=1
12458   else
12459     HAVE_UNSIGNED_LONG_LONG_INT=0
12460   fi
12461
12462
12463
12464   if test $ac_cv_header_wchar_h = yes; then
12465     HAVE_WCHAR_H=1
12466   else
12467     HAVE_WCHAR_H=0
12468   fi
12469
12470
12471       if test $ac_cv_header_inttypes_h = yes; then
12472     HAVE_INTTYPES_H=1
12473   else
12474     HAVE_INTTYPES_H=0
12475   fi
12476
12477
12478       if test $ac_cv_header_sys_types_h = yes; then
12479     HAVE_SYS_TYPES_H=1
12480   else
12481     HAVE_SYS_TYPES_H=0
12482   fi
12483
12484
12485
12486
12487
12488
12489
12490
12491
12492
12493
12494      if test $gl_cv_have_include_next = yes; then
12495        gl_cv_next_stdint_h='<'stdint.h'>'
12496      else
12497        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
12498 $as_echo_n "checking absolute name of <stdint.h>... " >&6; }
12499 if ${gl_cv_next_stdint_h+:} false; then :
12500   $as_echo_n "(cached) " >&6
12501 else
12502
12503              if test $ac_cv_header_stdint_h = yes; then
12504
12505
12506                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12507 /* end confdefs.h.  */
12508 #include <stdint.h>
12509
12510 _ACEOF
12511                                                                                                                         case "$host_os" in
12512                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
12513                  *)    gl_absname_cpp="$ac_cpp" ;;
12514                esac
12515
12516                case "$host_os" in
12517                  mingw*)
12518                                                                                                                                      gl_dirsep_regex='[/\\]'
12519                    ;;
12520                  *)
12521                    gl_dirsep_regex='\/'
12522                    ;;
12523                esac
12524                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12525
12526                gl_header_literal_regex=`echo 'stdint.h' \
12527                                         | sed -e "$gl_make_literal_regex_sed"`
12528                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12529                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12530                    s|^/[^/]|//&|
12531                    p
12532                    q
12533                  }'
12534                                                             gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12535                       sed -n "$gl_absolute_header_sed"`'"'
12536           else
12537                gl_cv_next_stdint_h='<'stdint.h'>'
12538              fi
12539
12540
12541 fi
12542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
12543 $as_echo "$gl_cv_next_stdint_h" >&6; }
12544      fi
12545      NEXT_STDINT_H=$gl_cv_next_stdint_h
12546
12547      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12548        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12549        gl_next_as_first_directive='<'stdint.h'>'
12550      else
12551        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12552        gl_next_as_first_directive=$gl_cv_next_stdint_h
12553      fi
12554      NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
12555
12556
12557
12558
12559   if test $ac_cv_header_stdint_h = yes; then
12560     HAVE_STDINT_H=1
12561   else
12562     HAVE_STDINT_H=0
12563   fi
12564
12565
12566     if test $ac_cv_header_stdint_h = yes; then
12567     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
12568 $as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
12569 if ${gl_cv_header_working_stdint_h+:} false; then :
12570   $as_echo_n "(cached) " >&6
12571 else
12572   gl_cv_header_working_stdint_h=no
12573        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12574 /* end confdefs.h.  */
12575
12576
12577 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
12578 #include <stdint.h>
12579 /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>.  */
12580 #if !(defined WCHAR_MIN && defined WCHAR_MAX)
12581 #error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
12582 #endif
12583
12584
12585   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12586      included before <wchar.h>.  */
12587   #include <stddef.h>
12588   #include <signal.h>
12589   #if HAVE_WCHAR_H
12590   # include <stdio.h>
12591   # include <time.h>
12592   # include <wchar.h>
12593   #endif
12594
12595
12596 #ifdef INT8_MAX
12597 int8_t a1 = INT8_MAX;
12598 int8_t a1min = INT8_MIN;
12599 #endif
12600 #ifdef INT16_MAX
12601 int16_t a2 = INT16_MAX;
12602 int16_t a2min = INT16_MIN;
12603 #endif
12604 #ifdef INT32_MAX
12605 int32_t a3 = INT32_MAX;
12606 int32_t a3min = INT32_MIN;
12607 #endif
12608 #ifdef INT64_MAX
12609 int64_t a4 = INT64_MAX;
12610 int64_t a4min = INT64_MIN;
12611 #endif
12612 #ifdef UINT8_MAX
12613 uint8_t b1 = UINT8_MAX;
12614 #else
12615 typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
12616 #endif
12617 #ifdef UINT16_MAX
12618 uint16_t b2 = UINT16_MAX;
12619 #endif
12620 #ifdef UINT32_MAX
12621 uint32_t b3 = UINT32_MAX;
12622 #endif
12623 #ifdef UINT64_MAX
12624 uint64_t b4 = UINT64_MAX;
12625 #endif
12626 int_least8_t c1 = INT8_C (0x7f);
12627 int_least8_t c1max = INT_LEAST8_MAX;
12628 int_least8_t c1min = INT_LEAST8_MIN;
12629 int_least16_t c2 = INT16_C (0x7fff);
12630 int_least16_t c2max = INT_LEAST16_MAX;
12631 int_least16_t c2min = INT_LEAST16_MIN;
12632 int_least32_t c3 = INT32_C (0x7fffffff);
12633 int_least32_t c3max = INT_LEAST32_MAX;
12634 int_least32_t c3min = INT_LEAST32_MIN;
12635 int_least64_t c4 = INT64_C (0x7fffffffffffffff);
12636 int_least64_t c4max = INT_LEAST64_MAX;
12637 int_least64_t c4min = INT_LEAST64_MIN;
12638 uint_least8_t d1 = UINT8_C (0xff);
12639 uint_least8_t d1max = UINT_LEAST8_MAX;
12640 uint_least16_t d2 = UINT16_C (0xffff);
12641 uint_least16_t d2max = UINT_LEAST16_MAX;
12642 uint_least32_t d3 = UINT32_C (0xffffffff);
12643 uint_least32_t d3max = UINT_LEAST32_MAX;
12644 uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
12645 uint_least64_t d4max = UINT_LEAST64_MAX;
12646 int_fast8_t e1 = INT_FAST8_MAX;
12647 int_fast8_t e1min = INT_FAST8_MIN;
12648 int_fast16_t e2 = INT_FAST16_MAX;
12649 int_fast16_t e2min = INT_FAST16_MIN;
12650 int_fast32_t e3 = INT_FAST32_MAX;
12651 int_fast32_t e3min = INT_FAST32_MIN;
12652 int_fast64_t e4 = INT_FAST64_MAX;
12653 int_fast64_t e4min = INT_FAST64_MIN;
12654 uint_fast8_t f1 = UINT_FAST8_MAX;
12655 uint_fast16_t f2 = UINT_FAST16_MAX;
12656 uint_fast32_t f3 = UINT_FAST32_MAX;
12657 uint_fast64_t f4 = UINT_FAST64_MAX;
12658 #ifdef INTPTR_MAX
12659 intptr_t g = INTPTR_MAX;
12660 intptr_t gmin = INTPTR_MIN;
12661 #endif
12662 #ifdef UINTPTR_MAX
12663 uintptr_t h = UINTPTR_MAX;
12664 #endif
12665 intmax_t i = INTMAX_MAX;
12666 uintmax_t j = UINTMAX_MAX;
12667
12668 #include <limits.h> /* for CHAR_BIT */
12669 #define TYPE_MINIMUM(t) \
12670   ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
12671 #define TYPE_MAXIMUM(t) \
12672   ((t) ((t) 0 < (t) -1 \
12673         ? (t) -1 \
12674         : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
12675 struct s {
12676   int check_PTRDIFF:
12677       PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
12678       && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
12679       ? 1 : -1;
12680   /* Detect bug in FreeBSD 6.0 / ia64.  */
12681   int check_SIG_ATOMIC:
12682       SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
12683       && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
12684       ? 1 : -1;
12685   int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
12686   int check_WCHAR:
12687       WCHAR_MIN == TYPE_MINIMUM (wchar_t)
12688       && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
12689       ? 1 : -1;
12690   /* Detect bug in mingw.  */
12691   int check_WINT:
12692       WINT_MIN == TYPE_MINIMUM (wint_t)
12693       && WINT_MAX == TYPE_MAXIMUM (wint_t)
12694       ? 1 : -1;
12695
12696   /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others.  */
12697   int check_UINT8_C:
12698         (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
12699   int check_UINT16_C:
12700         (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
12701
12702   /* Detect bugs in OpenBSD 3.9 stdint.h.  */
12703 #ifdef UINT8_MAX
12704   int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
12705 #endif
12706 #ifdef UINT16_MAX
12707   int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
12708 #endif
12709 #ifdef UINT32_MAX
12710   int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
12711 #endif
12712 #ifdef UINT64_MAX
12713   int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
12714 #endif
12715   int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
12716   int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
12717   int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
12718   int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
12719   int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
12720   int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
12721   int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
12722   int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
12723   int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
12724   int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
12725   int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
12726 };
12727
12728 int
12729 main ()
12730 {
12731
12732   ;
12733   return 0;
12734 }
12735 _ACEOF
12736 if ac_fn_c_try_compile "$LINENO"; then :
12737                                                     if test "$cross_compiling" = yes; then :
12738                  gl_cv_header_working_stdint_h=yes
12739
12740 else
12741   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12742 /* end confdefs.h.  */
12743
12744
12745 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
12746 #include <stdint.h>
12747
12748
12749   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12750      included before <wchar.h>.  */
12751   #include <stddef.h>
12752   #include <signal.h>
12753   #if HAVE_WCHAR_H
12754   # include <stdio.h>
12755   # include <time.h>
12756   # include <wchar.h>
12757   #endif
12758
12759
12760 #include <stdio.h>
12761 #include <string.h>
12762 #define MVAL(macro) MVAL1(macro)
12763 #define MVAL1(expression) #expression
12764 static const char *macro_values[] =
12765   {
12766 #ifdef INT8_MAX
12767     MVAL (INT8_MAX),
12768 #endif
12769 #ifdef INT16_MAX
12770     MVAL (INT16_MAX),
12771 #endif
12772 #ifdef INT32_MAX
12773     MVAL (INT32_MAX),
12774 #endif
12775 #ifdef INT64_MAX
12776     MVAL (INT64_MAX),
12777 #endif
12778 #ifdef UINT8_MAX
12779     MVAL (UINT8_MAX),
12780 #endif
12781 #ifdef UINT16_MAX
12782     MVAL (UINT16_MAX),
12783 #endif
12784 #ifdef UINT32_MAX
12785     MVAL (UINT32_MAX),
12786 #endif
12787 #ifdef UINT64_MAX
12788     MVAL (UINT64_MAX),
12789 #endif
12790     NULL
12791   };
12792
12793 int
12794 main ()
12795 {
12796
12797   const char **mv;
12798   for (mv = macro_values; *mv != NULL; mv++)
12799     {
12800       const char *value = *mv;
12801       /* Test whether it looks like a cast expression.  */
12802       if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
12803           || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
12804           || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
12805           || strncmp (value, "((int)"/*)*/, 6) == 0
12806           || strncmp (value, "((signed short)"/*)*/, 15) == 0
12807           || strncmp (value, "((signed char)"/*)*/, 14) == 0)
12808         return mv - macro_values + 1;
12809     }
12810   return 0;
12811
12812   ;
12813   return 0;
12814 }
12815 _ACEOF
12816 if ac_fn_c_try_run "$LINENO"; then :
12817   gl_cv_header_working_stdint_h=yes
12818 fi
12819 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12820   conftest.$ac_objext conftest.beam conftest.$ac_ext
12821 fi
12822
12823
12824 fi
12825 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12826
12827 fi
12828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
12829 $as_echo "$gl_cv_header_working_stdint_h" >&6; }
12830   fi
12831   if test "$gl_cv_header_working_stdint_h" = yes; then
12832     STDINT_H=
12833   else
12834             for ac_header in sys/inttypes.h sys/bitypes.h
12835 do :
12836   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12837 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12838 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12839   cat >>confdefs.h <<_ACEOF
12840 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12841 _ACEOF
12842
12843 fi
12844
12845 done
12846
12847     if test $ac_cv_header_sys_inttypes_h = yes; then
12848       HAVE_SYS_INTTYPES_H=1
12849     else
12850       HAVE_SYS_INTTYPES_H=0
12851     fi
12852
12853     if test $ac_cv_header_sys_bitypes_h = yes; then
12854       HAVE_SYS_BITYPES_H=1
12855     else
12856       HAVE_SYS_BITYPES_H=0
12857     fi
12858
12859
12860
12861
12862   if test $APPLE_UNIVERSAL_BUILD = 0; then
12863
12864
12865   for gltype in ptrdiff_t size_t ; do
12866     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
12867 $as_echo_n "checking for bit size of $gltype... " >&6; }
12868 if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
12869   $as_echo_n "(cached) " >&6
12870 else
12871   if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result"        "
12872   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12873      included before <wchar.h>.  */
12874   #include <stddef.h>
12875   #include <signal.h>
12876   #if HAVE_WCHAR_H
12877   # include <stdio.h>
12878   # include <time.h>
12879   # include <wchar.h>
12880   #endif
12881
12882 #include <limits.h>"; then :
12883
12884 else
12885   result=unknown
12886 fi
12887
12888        eval gl_cv_bitsizeof_${gltype}=\$result
12889
12890 fi
12891 eval ac_res=\$gl_cv_bitsizeof_${gltype}
12892                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12893 $as_echo "$ac_res" >&6; }
12894     eval result=\$gl_cv_bitsizeof_${gltype}
12895     if test $result = unknown; then
12896                                                 result=0
12897     fi
12898     GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
12899     cat >>confdefs.h <<_ACEOF
12900 #define BITSIZEOF_${GLTYPE} $result
12901 _ACEOF
12902
12903     eval BITSIZEOF_${GLTYPE}=\$result
12904   done
12905
12906
12907   fi
12908
12909
12910   for gltype in sig_atomic_t wchar_t wint_t ; do
12911     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
12912 $as_echo_n "checking for bit size of $gltype... " >&6; }
12913 if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
12914   $as_echo_n "(cached) " >&6
12915 else
12916   if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result"        "
12917   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12918      included before <wchar.h>.  */
12919   #include <stddef.h>
12920   #include <signal.h>
12921   #if HAVE_WCHAR_H
12922   # include <stdio.h>
12923   # include <time.h>
12924   # include <wchar.h>
12925   #endif
12926
12927 #include <limits.h>"; then :
12928
12929 else
12930   result=unknown
12931 fi
12932
12933        eval gl_cv_bitsizeof_${gltype}=\$result
12934
12935 fi
12936 eval ac_res=\$gl_cv_bitsizeof_${gltype}
12937                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12938 $as_echo "$ac_res" >&6; }
12939     eval result=\$gl_cv_bitsizeof_${gltype}
12940     if test $result = unknown; then
12941                                                 result=0
12942     fi
12943     GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
12944     cat >>confdefs.h <<_ACEOF
12945 #define BITSIZEOF_${GLTYPE} $result
12946 _ACEOF
12947
12948     eval BITSIZEOF_${GLTYPE}=\$result
12949   done
12950
12951
12952
12953
12954   for gltype in sig_atomic_t wchar_t wint_t ; do
12955     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
12956 $as_echo_n "checking whether $gltype is signed... " >&6; }
12957 if eval \${gl_cv_type_${gltype}_signed+:} false; then :
12958   $as_echo_n "(cached) " >&6
12959 else
12960   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12961 /* end confdefs.h.  */
12962
12963   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12964      included before <wchar.h>.  */
12965   #include <stddef.h>
12966   #include <signal.h>
12967   #if HAVE_WCHAR_H
12968   # include <stdio.h>
12969   # include <time.h>
12970   # include <wchar.h>
12971   #endif
12972
12973             int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
12974 int
12975 main ()
12976 {
12977
12978   ;
12979   return 0;
12980 }
12981 _ACEOF
12982 if ac_fn_c_try_compile "$LINENO"; then :
12983   result=yes
12984 else
12985   result=no
12986 fi
12987 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12988        eval gl_cv_type_${gltype}_signed=\$result
12989
12990 fi
12991 eval ac_res=\$gl_cv_type_${gltype}_signed
12992                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12993 $as_echo "$ac_res" >&6; }
12994     eval result=\$gl_cv_type_${gltype}_signed
12995     GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
12996     if test "$result" = yes; then
12997       cat >>confdefs.h <<_ACEOF
12998 #define HAVE_SIGNED_${GLTYPE} 1
12999 _ACEOF
13000
13001       eval HAVE_SIGNED_${GLTYPE}=1
13002     else
13003       eval HAVE_SIGNED_${GLTYPE}=0
13004     fi
13005   done
13006
13007
13008   gl_cv_type_ptrdiff_t_signed=yes
13009   gl_cv_type_size_t_signed=no
13010   if test $APPLE_UNIVERSAL_BUILD = 0; then
13011
13012
13013   for gltype in ptrdiff_t size_t ; do
13014     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
13015 $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
13016 if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
13017   $as_echo_n "(cached) " >&6
13018 else
13019   eval gl_cv_type_${gltype}_suffix=no
13020        eval result=\$gl_cv_type_${gltype}_signed
13021        if test "$result" = yes; then
13022          glsufu=
13023        else
13024          glsufu=u
13025        fi
13026        for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
13027          case $glsuf in
13028            '')  gltype1='int';;
13029            l)   gltype1='long int';;
13030            ll)  gltype1='long long int';;
13031            i64) gltype1='__int64';;
13032            u)   gltype1='unsigned int';;
13033            ul)  gltype1='unsigned long int';;
13034            ull) gltype1='unsigned long long int';;
13035            ui64)gltype1='unsigned __int64';;
13036          esac
13037          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13038 /* end confdefs.h.  */
13039
13040   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
13041      included before <wchar.h>.  */
13042   #include <stddef.h>
13043   #include <signal.h>
13044   #if HAVE_WCHAR_H
13045   # include <stdio.h>
13046   # include <time.h>
13047   # include <wchar.h>
13048   #endif
13049
13050               extern $gltype foo;
13051               extern $gltype1 foo;
13052 int
13053 main ()
13054 {
13055
13056   ;
13057   return 0;
13058 }
13059 _ACEOF
13060 if ac_fn_c_try_compile "$LINENO"; then :
13061   eval gl_cv_type_${gltype}_suffix=\$glsuf
13062 fi
13063 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13064          eval result=\$gl_cv_type_${gltype}_suffix
13065          test "$result" != no && break
13066        done
13067 fi
13068 eval ac_res=\$gl_cv_type_${gltype}_suffix
13069                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13070 $as_echo "$ac_res" >&6; }
13071     GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
13072     eval result=\$gl_cv_type_${gltype}_suffix
13073     test "$result" = no && result=
13074     eval ${GLTYPE}_SUFFIX=\$result
13075     cat >>confdefs.h <<_ACEOF
13076 #define ${GLTYPE}_SUFFIX $result
13077 _ACEOF
13078
13079   done
13080
13081
13082   fi
13083
13084
13085   for gltype in sig_atomic_t wchar_t wint_t ; do
13086     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
13087 $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
13088 if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
13089   $as_echo_n "(cached) " >&6
13090 else
13091   eval gl_cv_type_${gltype}_suffix=no
13092        eval result=\$gl_cv_type_${gltype}_signed
13093        if test "$result" = yes; then
13094          glsufu=
13095        else
13096          glsufu=u
13097        fi
13098        for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
13099          case $glsuf in
13100            '')  gltype1='int';;
13101            l)   gltype1='long int';;
13102            ll)  gltype1='long long int';;
13103            i64) gltype1='__int64';;
13104            u)   gltype1='unsigned int';;
13105            ul)  gltype1='unsigned long int';;
13106            ull) gltype1='unsigned long long int';;
13107            ui64)gltype1='unsigned __int64';;
13108          esac
13109          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13110 /* end confdefs.h.  */
13111
13112   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
13113      included before <wchar.h>.  */
13114   #include <stddef.h>
13115   #include <signal.h>
13116   #if HAVE_WCHAR_H
13117   # include <stdio.h>
13118   # include <time.h>
13119   # include <wchar.h>
13120   #endif
13121
13122               extern $gltype foo;
13123               extern $gltype1 foo;
13124 int
13125 main ()
13126 {
13127
13128   ;
13129   return 0;
13130 }
13131 _ACEOF
13132 if ac_fn_c_try_compile "$LINENO"; then :
13133   eval gl_cv_type_${gltype}_suffix=\$glsuf
13134 fi
13135 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13136          eval result=\$gl_cv_type_${gltype}_suffix
13137          test "$result" != no && break
13138        done
13139 fi
13140 eval ac_res=\$gl_cv_type_${gltype}_suffix
13141                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13142 $as_echo "$ac_res" >&6; }
13143     GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
13144     eval result=\$gl_cv_type_${gltype}_suffix
13145     test "$result" = no && result=
13146     eval ${GLTYPE}_SUFFIX=\$result
13147     cat >>confdefs.h <<_ACEOF
13148 #define ${GLTYPE}_SUFFIX $result
13149 _ACEOF
13150
13151   done
13152
13153
13154
13155           if test $BITSIZEOF_WINT_T -lt 32; then
13156     BITSIZEOF_WINT_T=32
13157   fi
13158
13159     STDINT_H=stdint.h
13160   fi
13161
13162    if test -n "$STDINT_H"; then
13163   GL_GENERATE_STDINT_H_TRUE=
13164   GL_GENERATE_STDINT_H_FALSE='#'
13165 else
13166   GL_GENERATE_STDINT_H_TRUE='#'
13167   GL_GENERATE_STDINT_H_FALSE=
13168 fi
13169
13170
13171
13172
13173
13174   GNULIB_IMAXABS=0;
13175   GNULIB_IMAXDIV=0;
13176   GNULIB_STRTOIMAX=0;
13177   GNULIB_STRTOUMAX=0;
13178     HAVE_DECL_IMAXABS=1;
13179   HAVE_DECL_IMAXDIV=1;
13180   HAVE_DECL_STRTOIMAX=1;
13181   HAVE_DECL_STRTOUMAX=1;
13182   REPLACE_STRTOIMAX=0;
13183   INT32_MAX_LT_INTMAX_MAX=1;
13184   INT64_MAX_EQ_LONG_MAX='defined _LP64';
13185   PRI_MACROS_BROKEN=0;
13186   PRIPTR_PREFIX=__PRIPTR_PREFIX;
13187   UINT32_MAX_LT_UINTMAX_MAX=1;
13188   UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
13189
13190
13191
13192
13193
13194
13195
13196
13197
13198
13199
13200
13201
13202
13203
13204      if test $gl_cv_have_include_next = yes; then
13205        gl_cv_next_inttypes_h='<'inttypes.h'>'
13206      else
13207        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
13208 $as_echo_n "checking absolute name of <inttypes.h>... " >&6; }
13209 if ${gl_cv_next_inttypes_h+:} false; then :
13210   $as_echo_n "(cached) " >&6
13211 else
13212
13213              if test $ac_cv_header_inttypes_h = yes; then
13214
13215
13216                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13217 /* end confdefs.h.  */
13218 #include <inttypes.h>
13219
13220 _ACEOF
13221                                                                                                                         case "$host_os" in
13222                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
13223                  *)    gl_absname_cpp="$ac_cpp" ;;
13224                esac
13225
13226                case "$host_os" in
13227                  mingw*)
13228                                                                                                                                      gl_dirsep_regex='[/\\]'
13229                    ;;
13230                  *)
13231                    gl_dirsep_regex='\/'
13232                    ;;
13233                esac
13234                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13235
13236                gl_header_literal_regex=`echo 'inttypes.h' \
13237                                         | sed -e "$gl_make_literal_regex_sed"`
13238                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13239                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13240                    s|^/[^/]|//&|
13241                    p
13242                    q
13243                  }'
13244                                                             gl_cv_next_inttypes_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13245                       sed -n "$gl_absolute_header_sed"`'"'
13246           else
13247                gl_cv_next_inttypes_h='<'inttypes.h'>'
13248              fi
13249
13250
13251 fi
13252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
13253 $as_echo "$gl_cv_next_inttypes_h" >&6; }
13254      fi
13255      NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
13256
13257      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13258        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13259        gl_next_as_first_directive='<'inttypes.h'>'
13260      else
13261        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13262        gl_next_as_first_directive=$gl_cv_next_inttypes_h
13263      fi
13264      NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
13265
13266
13267
13268
13269
13270
13271
13272
13273     for gl_func in imaxabs imaxdiv strtoimax strtoumax; do
13274     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
13275     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
13276 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
13277 if eval \${$as_gl_Symbol+:} false; then :
13278   $as_echo_n "(cached) " >&6
13279 else
13280   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13281 /* end confdefs.h.  */
13282 #include <inttypes.h>
13283
13284 int
13285 main ()
13286 {
13287 #undef $gl_func
13288   (void) $gl_func;
13289   ;
13290   return 0;
13291 }
13292 _ACEOF
13293 if ac_fn_c_try_compile "$LINENO"; then :
13294   eval "$as_gl_Symbol=yes"
13295 else
13296   eval "$as_gl_Symbol=no"
13297 fi
13298 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13299 fi
13300 eval ac_res=\$$as_gl_Symbol
13301                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13302 $as_echo "$ac_res" >&6; }
13303     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
13304   cat >>confdefs.h <<_ACEOF
13305 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
13306 _ACEOF
13307
13308                      eval ac_cv_have_decl_$gl_func=yes
13309 fi
13310       done
13311
13312
13313
13314   for ac_header in inttypes.h
13315 do :
13316   ac_fn_c_check_header_mongrel "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
13317 if test "x$ac_cv_header_inttypes_h" = xyes; then :
13318   cat >>confdefs.h <<_ACEOF
13319 #define HAVE_INTTYPES_H 1
13320 _ACEOF
13321
13322 fi
13323
13324 done
13325
13326   if test $ac_cv_header_inttypes_h = yes; then
13327     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the inttypes.h PRIxNN macros are broken" >&5
13328 $as_echo_n "checking whether the inttypes.h PRIxNN macros are broken... " >&6; }
13329 if ${gt_cv_inttypes_pri_broken+:} false; then :
13330   $as_echo_n "(cached) " >&6
13331 else
13332
13333         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13334 /* end confdefs.h.  */
13335
13336 #include <inttypes.h>
13337 #ifdef PRId32
13338 char *p = PRId32;
13339 #endif
13340
13341 int
13342 main ()
13343 {
13344
13345   ;
13346   return 0;
13347 }
13348 _ACEOF
13349 if ac_fn_c_try_compile "$LINENO"; then :
13350   gt_cv_inttypes_pri_broken=no
13351 else
13352   gt_cv_inttypes_pri_broken=yes
13353 fi
13354 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13355
13356 fi
13357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_inttypes_pri_broken" >&5
13358 $as_echo "$gt_cv_inttypes_pri_broken" >&6; }
13359   fi
13360   if test "$gt_cv_inttypes_pri_broken" = yes; then
13361
13362 cat >>confdefs.h <<_ACEOF
13363 #define PRI_MACROS_BROKEN 1
13364 _ACEOF
13365
13366     PRI_MACROS_BROKEN=1
13367   else
13368     PRI_MACROS_BROKEN=0
13369   fi
13370
13371
13372
13373   GNULIB_ISWBLANK=0;
13374   GNULIB_WCTYPE=0;
13375   GNULIB_ISWCTYPE=0;
13376   GNULIB_WCTRANS=0;
13377   GNULIB_TOWCTRANS=0;
13378     HAVE_ISWBLANK=1;
13379   HAVE_WCTYPE_T=1;
13380   HAVE_WCTRANS_T=1;
13381   REPLACE_ISWBLANK=0;
13382
13383
13384
13385
13386   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
13387 $as_echo_n "checking for wint_t... " >&6; }
13388 if ${gt_cv_c_wint_t+:} false; then :
13389   $as_echo_n "(cached) " >&6
13390 else
13391   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13392 /* end confdefs.h.  */
13393
13394 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
13395    <wchar.h>.
13396    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
13397    before <wchar.h>.  */
13398 #include <stddef.h>
13399 #include <stdio.h>
13400 #include <time.h>
13401 #include <wchar.h>
13402             wint_t foo = (wchar_t)'\0';
13403 int
13404 main ()
13405 {
13406
13407   ;
13408   return 0;
13409 }
13410 _ACEOF
13411 if ac_fn_c_try_compile "$LINENO"; then :
13412   gt_cv_c_wint_t=yes
13413 else
13414   gt_cv_c_wint_t=no
13415 fi
13416 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13417 fi
13418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
13419 $as_echo "$gt_cv_c_wint_t" >&6; }
13420   if test $gt_cv_c_wint_t = yes; then
13421
13422 $as_echo "#define HAVE_WINT_T 1" >>confdefs.h
13423
13424   fi
13425
13426
13427
13428
13429
13430
13431   if test $ac_cv_func_iswcntrl = yes; then
13432     HAVE_ISWCNTRL=1
13433   else
13434     HAVE_ISWCNTRL=0
13435   fi
13436
13437
13438
13439   if test $gt_cv_c_wint_t = yes; then
13440     HAVE_WINT_T=1
13441   else
13442     HAVE_WINT_T=0
13443   fi
13444
13445
13446
13447
13448
13449
13450
13451
13452
13453
13454
13455      if test $gl_cv_have_include_next = yes; then
13456        gl_cv_next_wctype_h='<'wctype.h'>'
13457      else
13458        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
13459 $as_echo_n "checking absolute name of <wctype.h>... " >&6; }
13460 if ${gl_cv_next_wctype_h+:} false; then :
13461   $as_echo_n "(cached) " >&6
13462 else
13463
13464              if test $ac_cv_header_wctype_h = yes; then
13465
13466
13467                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13468 /* end confdefs.h.  */
13469 #include <wctype.h>
13470
13471 _ACEOF
13472                                                                                                                         case "$host_os" in
13473                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
13474                  *)    gl_absname_cpp="$ac_cpp" ;;
13475                esac
13476
13477                case "$host_os" in
13478                  mingw*)
13479                                                                                                                                      gl_dirsep_regex='[/\\]'
13480                    ;;
13481                  *)
13482                    gl_dirsep_regex='\/'
13483                    ;;
13484                esac
13485                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13486
13487                gl_header_literal_regex=`echo 'wctype.h' \
13488                                         | sed -e "$gl_make_literal_regex_sed"`
13489                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13490                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13491                    s|^/[^/]|//&|
13492                    p
13493                    q
13494                  }'
13495                                                             gl_cv_next_wctype_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13496                       sed -n "$gl_absolute_header_sed"`'"'
13497           else
13498                gl_cv_next_wctype_h='<'wctype.h'>'
13499              fi
13500
13501
13502 fi
13503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
13504 $as_echo "$gl_cv_next_wctype_h" >&6; }
13505      fi
13506      NEXT_WCTYPE_H=$gl_cv_next_wctype_h
13507
13508      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13509        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13510        gl_next_as_first_directive='<'wctype.h'>'
13511      else
13512        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13513        gl_next_as_first_directive=$gl_cv_next_wctype_h
13514      fi
13515      NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
13516
13517
13518
13519
13520   if test $ac_cv_header_wctype_h = yes; then
13521     if test $ac_cv_func_iswcntrl = yes; then
13522                   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
13523 $as_echo_n "checking whether iswcntrl works... " >&6; }
13524 if ${gl_cv_func_iswcntrl_works+:} false; then :
13525   $as_echo_n "(cached) " >&6
13526 else
13527
13528           if test "$cross_compiling" = yes; then :
13529   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13530 /* end confdefs.h.  */
13531 #include <stdlib.h>
13532                           #if __GNU_LIBRARY__ == 1
13533                           Linux libc5 i18n is broken.
13534                           #endif
13535 int
13536 main ()
13537 {
13538
13539   ;
13540   return 0;
13541 }
13542 _ACEOF
13543 if ac_fn_c_try_compile "$LINENO"; then :
13544   gl_cv_func_iswcntrl_works="guessing yes"
13545 else
13546   gl_cv_func_iswcntrl_works="guessing no"
13547 fi
13548 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13549
13550 else
13551   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13552 /* end confdefs.h.  */
13553
13554                /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
13555                   included before <wchar.h>.
13556                   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
13557                   must be included before <wchar.h>.  */
13558                #include <stddef.h>
13559                #include <stdio.h>
13560                #include <time.h>
13561                #include <wchar.h>
13562                #include <wctype.h>
13563                int main () { return iswprint ('x') == 0; }
13564
13565 _ACEOF
13566 if ac_fn_c_try_run "$LINENO"; then :
13567   gl_cv_func_iswcntrl_works=yes
13568 else
13569   gl_cv_func_iswcntrl_works=no
13570 fi
13571 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13572   conftest.$ac_objext conftest.beam conftest.$ac_ext
13573 fi
13574
13575
13576 fi
13577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
13578 $as_echo "$gl_cv_func_iswcntrl_works" >&6; }
13579     fi
13580     HAVE_WCTYPE_H=1
13581   else
13582     HAVE_WCTYPE_H=0
13583   fi
13584
13585
13586   case "$gl_cv_func_iswcntrl_works" in
13587     *yes) REPLACE_ISWCNTRL=0 ;;
13588     *)    REPLACE_ISWCNTRL=1 ;;
13589   esac
13590
13591
13592   if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
13593         :
13594   fi
13595
13596   if test $REPLACE_ISWCNTRL = 1; then
13597     REPLACE_TOWLOWER=1
13598   else
13599     for ac_func in towlower
13600 do :
13601   ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
13602 if test "x$ac_cv_func_towlower" = xyes; then :
13603   cat >>confdefs.h <<_ACEOF
13604 #define HAVE_TOWLOWER 1
13605 _ACEOF
13606
13607 fi
13608 done
13609
13610     if test $ac_cv_func_towlower = yes; then
13611       REPLACE_TOWLOWER=0
13612     else
13613       ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
13614              included before <wchar.h>.
13615              BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
13616              must be included before <wchar.h>.  */
13617           #include <stddef.h>
13618           #include <stdio.h>
13619           #include <time.h>
13620           #include <wchar.h>
13621           #if HAVE_WCTYPE_H
13622           # include <wctype.h>
13623           #endif
13624
13625 "
13626 if test "x$ac_cv_have_decl_towlower" = xyes; then :
13627   ac_have_decl=1
13628 else
13629   ac_have_decl=0
13630 fi
13631
13632 cat >>confdefs.h <<_ACEOF
13633 #define HAVE_DECL_TOWLOWER $ac_have_decl
13634 _ACEOF
13635
13636       if test $ac_cv_have_decl_towlower = yes; then
13637                                 REPLACE_TOWLOWER=1
13638       else
13639         REPLACE_TOWLOWER=0
13640       fi
13641     fi
13642   fi
13643
13644
13645   if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
13646         :
13647   fi
13648
13649           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
13650 $as_echo_n "checking for wctype_t... " >&6; }
13651 if ${gl_cv_type_wctype_t+:} false; then :
13652   $as_echo_n "(cached) " >&6
13653 else
13654   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13655 /* end confdefs.h.  */
13656 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
13657                included before <wchar.h>.
13658                BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
13659                must be included before <wchar.h>.  */
13660             #include <stddef.h>
13661             #include <stdio.h>
13662             #include <time.h>
13663             #include <wchar.h>
13664             #if HAVE_WCTYPE_H
13665             # include <wctype.h>
13666             #endif
13667             wctype_t a;
13668
13669 int
13670 main ()
13671 {
13672
13673   ;
13674   return 0;
13675 }
13676 _ACEOF
13677 if ac_fn_c_try_compile "$LINENO"; then :
13678   gl_cv_type_wctype_t=yes
13679 else
13680   gl_cv_type_wctype_t=no
13681 fi
13682 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13683
13684 fi
13685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
13686 $as_echo "$gl_cv_type_wctype_t" >&6; }
13687   if test $gl_cv_type_wctype_t = no; then
13688     HAVE_WCTYPE_T=0
13689   fi
13690
13691       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
13692 $as_echo_n "checking for wctrans_t... " >&6; }
13693 if ${gl_cv_type_wctrans_t+:} false; then :
13694   $as_echo_n "(cached) " >&6
13695 else
13696   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13697 /* end confdefs.h.  */
13698 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
13699                included before <wchar.h>.
13700                BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
13701                must be included before <wchar.h>.  */
13702             #include <stddef.h>
13703             #include <stdio.h>
13704             #include <time.h>
13705             #include <wchar.h>
13706             #include <wctype.h>
13707             wctrans_t a;
13708
13709 int
13710 main ()
13711 {
13712
13713   ;
13714   return 0;
13715 }
13716 _ACEOF
13717 if ac_fn_c_try_compile "$LINENO"; then :
13718   gl_cv_type_wctrans_t=yes
13719 else
13720   gl_cv_type_wctrans_t=no
13721 fi
13722 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13723
13724 fi
13725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
13726 $as_echo "$gl_cv_type_wctrans_t" >&6; }
13727   if test $gl_cv_type_wctrans_t = no; then
13728     HAVE_WCTRANS_T=0
13729   fi
13730
13731
13732     for gl_func in wctype iswctype wctrans towctrans     ; do
13733     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
13734     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
13735 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
13736 if eval \${$as_gl_Symbol+:} false; then :
13737   $as_echo_n "(cached) " >&6
13738 else
13739   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13740 /* end confdefs.h.  */
13741
13742 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
13743    <wchar.h>.
13744    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
13745    included before <wchar.h>.  */
13746 #if !(defined __GLIBC__ && !defined __UCLIBC__)
13747 # include <stddef.h>
13748 # include <stdio.h>
13749 # include <time.h>
13750 # include <wchar.h>
13751 #endif
13752 #include <wctype.h>
13753
13754 int
13755 main ()
13756 {
13757 #undef $gl_func
13758   (void) $gl_func;
13759   ;
13760   return 0;
13761 }
13762 _ACEOF
13763 if ac_fn_c_try_compile "$LINENO"; then :
13764   eval "$as_gl_Symbol=yes"
13765 else
13766   eval "$as_gl_Symbol=no"
13767 fi
13768 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13769 fi
13770 eval ac_res=\$$as_gl_Symbol
13771                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13772 $as_echo "$ac_res" >&6; }
13773     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
13774   cat >>confdefs.h <<_ACEOF
13775 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
13776 _ACEOF
13777
13778                      eval ac_cv_have_decl_$gl_func=yes
13779 fi
13780       done
13781
13782
13783
13784
13785
13786   GNULIB_NL_LANGINFO=0;
13787     HAVE_NL_LANGINFO=1;
13788   REPLACE_NL_LANGINFO=0;
13789
13790
13791
13792
13793
13794
13795
13796
13797
13798
13799
13800
13801   case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink in
13802   yes+*yes)
13803     ;;
13804   yes+*)
13805     # Solaris 9 has *at functions, but uniformly mishandles trailing
13806     # slash in all of them.
13807     REPLACE_OPENAT=1
13808     ;;
13809   *)
13810     HAVE_OPENAT=0
13811     ;;
13812   esac
13813
13814
13815
13816
13817     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library >= 2.1 or uClibc" >&5
13818 $as_echo_n "checking whether we are using the GNU C Library >= 2.1 or uClibc... " >&6; }
13819 if ${ac_cv_gnu_library_2_1+:} false; then :
13820   $as_echo_n "(cached) " >&6
13821 else
13822   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13823 /* end confdefs.h.  */
13824
13825 #include <features.h>
13826 #ifdef __GNU_LIBRARY__
13827  #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
13828   Lucky GNU user
13829  #endif
13830 #endif
13831 #ifdef __UCLIBC__
13832  Lucky user
13833 #endif
13834
13835 _ACEOF
13836 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13837   $EGREP "Lucky" >/dev/null 2>&1; then :
13838   ac_cv_gnu_library_2_1=yes
13839 else
13840   ac_cv_gnu_library_2_1=no
13841 fi
13842 rm -f conftest*
13843
13844
13845
13846 fi
13847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2_1" >&5
13848 $as_echo "$ac_cv_gnu_library_2_1" >&6; }
13849
13850     GLIBC21="$ac_cv_gnu_library_2_1"
13851
13852
13853
13854   GNULIB_LOCALECONV=0;
13855   GNULIB_SETLOCALE=0;
13856   GNULIB_DUPLOCALE=0;
13857     HAVE_DUPLOCALE=1;
13858   REPLACE_LOCALECONV=0;
13859   REPLACE_SETLOCALE=0;
13860   REPLACE_DUPLOCALE=0;
13861   REPLACE_STRUCT_LCONV=0;
13862
13863
13864     REPLACE_NULL=0;
13865   HAVE_WCHAR_T=1;
13866
13867
13868   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
13869 $as_echo_n "checking for wchar_t... " >&6; }
13870 if ${gt_cv_c_wchar_t+:} false; then :
13871   $as_echo_n "(cached) " >&6
13872 else
13873   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13874 /* end confdefs.h.  */
13875 #include <stddef.h>
13876             wchar_t foo = (wchar_t)'\0';
13877 int
13878 main ()
13879 {
13880
13881   ;
13882   return 0;
13883 }
13884 _ACEOF
13885 if ac_fn_c_try_compile "$LINENO"; then :
13886   gt_cv_c_wchar_t=yes
13887 else
13888   gt_cv_c_wchar_t=no
13889 fi
13890 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13891 fi
13892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
13893 $as_echo "$gt_cv_c_wchar_t" >&6; }
13894   if test $gt_cv_c_wchar_t = yes; then
13895
13896 $as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
13897
13898   fi
13899
13900
13901
13902
13903   STDDEF_H=
13904   if test $gt_cv_c_wchar_t = no; then
13905     HAVE_WCHAR_T=0
13906     STDDEF_H=stddef.h
13907   fi
13908   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
13909 $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
13910 if ${gl_cv_decl_null_works+:} false; then :
13911   $as_echo_n "(cached) " >&6
13912 else
13913   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13914 /* end confdefs.h.  */
13915 #include <stddef.h>
13916       int test[2 * (sizeof NULL == sizeof (void *)) -1];
13917
13918 int
13919 main ()
13920 {
13921
13922   ;
13923   return 0;
13924 }
13925 _ACEOF
13926 if ac_fn_c_try_compile "$LINENO"; then :
13927   gl_cv_decl_null_works=yes
13928 else
13929   gl_cv_decl_null_works=no
13930 fi
13931 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13932 fi
13933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
13934 $as_echo "$gl_cv_decl_null_works" >&6; }
13935   if test $gl_cv_decl_null_works = no; then
13936     REPLACE_NULL=1
13937     STDDEF_H=stddef.h
13938   fi
13939
13940    if test -n "$STDDEF_H"; then
13941   GL_GENERATE_STDDEF_H_TRUE=
13942   GL_GENERATE_STDDEF_H_FALSE='#'
13943 else
13944   GL_GENERATE_STDDEF_H_TRUE='#'
13945   GL_GENERATE_STDDEF_H_FALSE=
13946 fi
13947
13948   if test -n "$STDDEF_H"; then
13949
13950
13951
13952
13953
13954
13955
13956
13957      if test $gl_cv_have_include_next = yes; then
13958        gl_cv_next_stddef_h='<'stddef.h'>'
13959      else
13960        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
13961 $as_echo_n "checking absolute name of <stddef.h>... " >&6; }
13962 if ${gl_cv_next_stddef_h+:} false; then :
13963   $as_echo_n "(cached) " >&6
13964 else
13965
13966                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13967 /* end confdefs.h.  */
13968 #include <stddef.h>
13969
13970 _ACEOF
13971                                                                                                                         case "$host_os" in
13972                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
13973                  *)    gl_absname_cpp="$ac_cpp" ;;
13974                esac
13975
13976                case "$host_os" in
13977                  mingw*)
13978                                                                                                                                      gl_dirsep_regex='[/\\]'
13979                    ;;
13980                  *)
13981                    gl_dirsep_regex='\/'
13982                    ;;
13983                esac
13984                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13985
13986                gl_header_literal_regex=`echo 'stddef.h' \
13987                                         | sed -e "$gl_make_literal_regex_sed"`
13988                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13989                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13990                    s|^/[^/]|//&|
13991                    p
13992                    q
13993                  }'
13994                                                             gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13995                       sed -n "$gl_absolute_header_sed"`'"'
13996
13997
13998 fi
13999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
14000 $as_echo "$gl_cv_next_stddef_h" >&6; }
14001      fi
14002      NEXT_STDDEF_H=$gl_cv_next_stddef_h
14003
14004      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
14005        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
14006        gl_next_as_first_directive='<'stddef.h'>'
14007      else
14008        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
14009        gl_next_as_first_directive=$gl_cv_next_stddef_h
14010      fi
14011      NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
14012
14013
14014
14015
14016   fi
14017
14018
14019
14020
14021
14022
14023   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5
14024 $as_echo_n "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; }
14025 if ${gl_cv_func_malloc_posix+:} false; then :
14026   $as_echo_n "(cached) " >&6
14027 else
14028
14029                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14030 /* end confdefs.h.  */
14031
14032 int
14033 main ()
14034 {
14035 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
14036              choke me
14037              #endif
14038
14039   ;
14040   return 0;
14041 }
14042 _ACEOF
14043 if ac_fn_c_try_compile "$LINENO"; then :
14044   gl_cv_func_malloc_posix=yes
14045 else
14046   gl_cv_func_malloc_posix=no
14047 fi
14048 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14049
14050 fi
14051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
14052 $as_echo "$gl_cv_func_malloc_posix" >&6; }
14053
14054
14055
14056       for ac_header in stdlib.h
14057 do :
14058   ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
14059 if test "x$ac_cv_header_stdlib_h" = xyes; then :
14060   cat >>confdefs.h <<_ACEOF
14061 #define HAVE_STDLIB_H 1
14062 _ACEOF
14063
14064 fi
14065
14066 done
14067
14068   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
14069 $as_echo_n "checking for GNU libc compatible malloc... " >&6; }
14070 if ${ac_cv_func_malloc_0_nonnull+:} false; then :
14071   $as_echo_n "(cached) " >&6
14072 else
14073   if test "$cross_compiling" = yes; then :
14074   case "$host_os" in
14075           # Guess yes on platforms where we know the result.
14076           *-gnu* | freebsd* | netbsd* | openbsd* \
14077           | hpux* | solaris* | cygwin* | mingw*)
14078             ac_cv_func_malloc_0_nonnull=yes ;;
14079           # If we don't know, assume the worst.
14080           *) ac_cv_func_malloc_0_nonnull=no ;;
14081         esac
14082
14083 else
14084   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14085 /* end confdefs.h.  */
14086 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
14087             # include <stdlib.h>
14088             #else
14089             char *malloc ();
14090             #endif
14091
14092 int
14093 main ()
14094 {
14095 return ! malloc (0);
14096   ;
14097   return 0;
14098 }
14099
14100 _ACEOF
14101 if ac_fn_c_try_run "$LINENO"; then :
14102   ac_cv_func_malloc_0_nonnull=yes
14103 else
14104   ac_cv_func_malloc_0_nonnull=no
14105 fi
14106 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14107   conftest.$ac_objext conftest.beam conftest.$ac_ext
14108 fi
14109
14110
14111 fi
14112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
14113 $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
14114   if test $ac_cv_func_malloc_0_nonnull = yes; then :
14115   gl_cv_func_malloc_0_nonnull=1
14116 else
14117   gl_cv_func_malloc_0_nonnull=0
14118 fi
14119
14120
14121 cat >>confdefs.h <<_ACEOF
14122 #define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull
14123 _ACEOF
14124
14125
14126
14127
14128
14129
14130
14131
14132
14133   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
14134 $as_echo_n "checking for a traditional japanese locale... " >&6; }
14135 if ${gt_cv_locale_ja+:} false; then :
14136   $as_echo_n "(cached) " >&6
14137 else
14138
14139     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14140 /* end confdefs.h.  */
14141
14142 #include <locale.h>
14143 #include <time.h>
14144 #if HAVE_LANGINFO_CODESET
14145 # include <langinfo.h>
14146 #endif
14147 #include <stdlib.h>
14148 #include <string.h>
14149 struct tm t;
14150 char buf[16];
14151 int main ()
14152 {
14153   const char *p;
14154   /* Check whether the given locale name is recognized by the system.  */
14155 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
14156   /* On native Windows, setlocale(category, "") looks at the system settings,
14157      not at the environment variables.  Also, when an encoding suffix such
14158      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
14159      category of the locale to "C".  */
14160   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
14161       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
14162     return 1;
14163 #else
14164   if (setlocale (LC_ALL, "") == NULL) return 1;
14165 #endif
14166   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
14167      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
14168      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
14169      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
14170      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
14171      some unit tests fail.
14172      On MirBSD 10, when an unsupported locale is specified, setlocale()
14173      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
14174 #if HAVE_LANGINFO_CODESET
14175   {
14176     const char *cs = nl_langinfo (CODESET);
14177     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
14178         || strcmp (cs, "UTF-8") == 0)
14179       return 1;
14180   }
14181 #endif
14182 #ifdef __CYGWIN__
14183   /* On Cygwin, avoid locale names without encoding suffix, because the
14184      locale_charset() function relies on the encoding suffix.  Note that
14185      LC_ALL is set on the command line.  */
14186   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
14187 #endif
14188   /* Check whether MB_CUR_MAX is > 1.  This excludes the dysfunctional locales
14189      on Cygwin 1.5.x.  */
14190   if (MB_CUR_MAX == 1)
14191     return 1;
14192   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
14193      This excludes the UTF-8 encoding (except on MirBSD).  */
14194   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
14195   if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
14196   for (p = buf; *p != '\0'; p++)
14197     if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
14198       return 1;
14199   return 0;
14200 }
14201
14202 _ACEOF
14203     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14204   (eval $ac_link) 2>&5
14205   ac_status=$?
14206   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14207   test $ac_status = 0; } && test -s conftest$ac_exeext; then
14208       case "$host_os" in
14209         # Handle native Windows specially, because there setlocale() interprets
14210         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
14211         # "fr" or "fra" as "French" or "French_France.1252",
14212         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
14213         # "ja" as "Japanese" or "Japanese_Japan.932",
14214         # and similar.
14215         mingw*)
14216           # Note that on native Windows, the Japanese locale is
14217           # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
14218           # cannot use it here.
14219           gt_cv_locale_ja=none
14220           ;;
14221         *)
14222           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
14223           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
14224           # configure script would override the LC_ALL setting. Likewise for
14225           # LC_CTYPE, which is also set at the beginning of the configure script.
14226           # Test for the AIX locale name.
14227           if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14228             gt_cv_locale_ja=ja_JP
14229           else
14230             # Test for the locale name with explicit encoding suffix.
14231             if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14232               gt_cv_locale_ja=ja_JP.EUC-JP
14233             else
14234               # Test for the HP-UX, OSF/1, NetBSD locale name.
14235               if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14236                 gt_cv_locale_ja=ja_JP.eucJP
14237               else
14238                 # Test for the IRIX, FreeBSD locale name.
14239                 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14240                   gt_cv_locale_ja=ja_JP.EUC
14241                 else
14242                   # Test for the Solaris 7 locale name.
14243                   if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14244                     gt_cv_locale_ja=ja
14245                   else
14246                     # Special test for NetBSD 1.6.
14247                     if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
14248                       gt_cv_locale_ja=ja_JP.eucJP
14249                     else
14250                       # None found.
14251                       gt_cv_locale_ja=none
14252                     fi
14253                   fi
14254                 fi
14255               fi
14256             fi
14257           fi
14258           ;;
14259       esac
14260     fi
14261     rm -fr conftest*
14262
14263 fi
14264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
14265 $as_echo "$gt_cv_locale_ja" >&6; }
14266   LOCALE_JA=$gt_cv_locale_ja
14267
14268
14269
14270
14271
14272   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
14273 $as_echo_n "checking for a transitional chinese locale... " >&6; }
14274 if ${gt_cv_locale_zh_CN+:} false; then :
14275   $as_echo_n "(cached) " >&6
14276 else
14277
14278     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14279 /* end confdefs.h.  */
14280
14281 #include <locale.h>
14282 #include <stdlib.h>
14283 #include <time.h>
14284 #if HAVE_LANGINFO_CODESET
14285 # include <langinfo.h>
14286 #endif
14287 #include <stdlib.h>
14288 #include <string.h>
14289 struct tm t;
14290 char buf[16];
14291 int main ()
14292 {
14293   const char *p;
14294   /* Check whether the given locale name is recognized by the system.  */
14295 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
14296   /* On native Windows, setlocale(category, "") looks at the system settings,
14297      not at the environment variables.  Also, when an encoding suffix such
14298      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
14299      category of the locale to "C".  */
14300   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
14301       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
14302     return 1;
14303 #else
14304   if (setlocale (LC_ALL, "") == NULL) return 1;
14305 #endif
14306   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
14307      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
14308      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
14309      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
14310      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
14311      some unit tests fail.
14312      On MirBSD 10, when an unsupported locale is specified, setlocale()
14313      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
14314 #if HAVE_LANGINFO_CODESET
14315   {
14316     const char *cs = nl_langinfo (CODESET);
14317     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
14318         || strcmp (cs, "UTF-8") == 0)
14319       return 1;
14320   }
14321 #endif
14322 #ifdef __CYGWIN__
14323   /* On Cygwin, avoid locale names without encoding suffix, because the
14324      locale_charset() function relies on the encoding suffix.  Note that
14325      LC_ALL is set on the command line.  */
14326   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
14327 #endif
14328   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
14329      This excludes the UTF-8 encoding (except on MirBSD).  */
14330   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
14331   if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
14332   for (p = buf; *p != '\0'; p++)
14333     if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
14334       return 1;
14335   /* Check whether a typical GB18030 multibyte sequence is recognized as a
14336      single wide character.  This excludes the GB2312 and GBK encodings.  */
14337   if (mblen ("\203\062\332\066", 5) != 4)
14338     return 1;
14339   return 0;
14340 }
14341
14342 _ACEOF
14343     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14344   (eval $ac_link) 2>&5
14345   ac_status=$?
14346   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14347   test $ac_status = 0; } && test -s conftest$ac_exeext; then
14348       case "$host_os" in
14349         # Handle native Windows specially, because there setlocale() interprets
14350         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
14351         # "fr" or "fra" as "French" or "French_France.1252",
14352         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
14353         # "ja" as "Japanese" or "Japanese_Japan.932",
14354         # and similar.
14355         mingw*)
14356           # Test for the hypothetical native Windows locale name.
14357           if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14358             gt_cv_locale_zh_CN=Chinese_China.54936
14359           else
14360             # None found.
14361             gt_cv_locale_zh_CN=none
14362           fi
14363           ;;
14364         solaris2.8)
14365           # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
14366           # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
14367           # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
14368           gt_cv_locale_zh_CN=none
14369           ;;
14370         *)
14371           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
14372           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
14373           # configure script would override the LC_ALL setting. Likewise for
14374           # LC_CTYPE, which is also set at the beginning of the configure script.
14375           # Test for the locale name without encoding suffix.
14376           if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14377             gt_cv_locale_zh_CN=zh_CN
14378           else
14379             # Test for the locale name with explicit encoding suffix.
14380             if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14381               gt_cv_locale_zh_CN=zh_CN.GB18030
14382             else
14383               # None found.
14384               gt_cv_locale_zh_CN=none
14385             fi
14386           fi
14387           ;;
14388       esac
14389     else
14390       # If there was a link error, due to mblen(), the system is so old that
14391       # it certainly doesn't have a chinese locale.
14392       gt_cv_locale_zh_CN=none
14393     fi
14394     rm -fr conftest*
14395
14396 fi
14397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
14398 $as_echo "$gt_cv_locale_zh_CN" >&6; }
14399   LOCALE_ZH_CN=$gt_cv_locale_zh_CN
14400
14401
14402
14403
14404   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
14405 $as_echo_n "checking for a french Unicode locale... " >&6; }
14406 if ${gt_cv_locale_fr_utf8+:} false; then :
14407   $as_echo_n "(cached) " >&6
14408 else
14409
14410     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14411 /* end confdefs.h.  */
14412
14413 #include <locale.h>
14414 #include <time.h>
14415 #if HAVE_LANGINFO_CODESET
14416 # include <langinfo.h>
14417 #endif
14418 #include <stdlib.h>
14419 #include <string.h>
14420 struct tm t;
14421 char buf[16];
14422 int main () {
14423   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
14424      imitates locale dependent behaviour by looking at the environment
14425      variables, and all locales use the UTF-8 encoding.  */
14426 #if !(defined __BEOS__ || defined __HAIKU__)
14427   /* Check whether the given locale name is recognized by the system.  */
14428 # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
14429   /* On native Windows, setlocale(category, "") looks at the system settings,
14430      not at the environment variables.  Also, when an encoding suffix such
14431      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
14432      category of the locale to "C".  */
14433   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
14434       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
14435     return 1;
14436 # else
14437   if (setlocale (LC_ALL, "") == NULL) return 1;
14438 # endif
14439   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
14440      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
14441      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
14442      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
14443      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
14444      some unit tests fail.  */
14445 # if HAVE_LANGINFO_CODESET
14446   {
14447     const char *cs = nl_langinfo (CODESET);
14448     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
14449       return 1;
14450   }
14451 # endif
14452 # ifdef __CYGWIN__
14453   /* On Cygwin, avoid locale names without encoding suffix, because the
14454      locale_charset() function relies on the encoding suffix.  Note that
14455      LC_ALL is set on the command line.  */
14456   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
14457 # endif
14458   /* Check whether in the abbreviation of the second month, the second
14459      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
14460      two bytes long, with UTF-8 encoding.  */
14461   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
14462   if (strftime (buf, sizeof (buf), "%b", &t) < 4
14463       || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
14464     return 1;
14465 #endif
14466 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
14467   /* Check whether the decimal separator is a comma.
14468      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
14469      are nl_langinfo(RADIXCHAR) are both ".".  */
14470   if (localeconv () ->decimal_point[0] != ',') return 1;
14471 #endif
14472   return 0;
14473 }
14474
14475 _ACEOF
14476     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14477   (eval $ac_link) 2>&5
14478   ac_status=$?
14479   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14480   test $ac_status = 0; } && test -s conftest$ac_exeext; then
14481       case "$host_os" in
14482         # Handle native Windows specially, because there setlocale() interprets
14483         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
14484         # "fr" or "fra" as "French" or "French_France.1252",
14485         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
14486         # "ja" as "Japanese" or "Japanese_Japan.932",
14487         # and similar.
14488         mingw*)
14489           # Test for the hypothetical native Windows locale name.
14490           if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14491             gt_cv_locale_fr_utf8=French_France.65001
14492           else
14493             # None found.
14494             gt_cv_locale_fr_utf8=none
14495           fi
14496           ;;
14497         *)
14498           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
14499           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
14500           # configure script would override the LC_ALL setting. Likewise for
14501           # LC_CTYPE, which is also set at the beginning of the configure script.
14502           # Test for the usual locale name.
14503           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14504             gt_cv_locale_fr_utf8=fr_FR
14505           else
14506             # Test for the locale name with explicit encoding suffix.
14507             if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14508               gt_cv_locale_fr_utf8=fr_FR.UTF-8
14509             else
14510               # Test for the Solaris 7 locale name.
14511               if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14512                 gt_cv_locale_fr_utf8=fr.UTF-8
14513               else
14514                 # None found.
14515                 gt_cv_locale_fr_utf8=none
14516               fi
14517             fi
14518           fi
14519           ;;
14520       esac
14521     fi
14522     rm -fr conftest*
14523
14524 fi
14525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
14526 $as_echo "$gt_cv_locale_fr_utf8" >&6; }
14527   LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
14528
14529
14530
14531   GNULIB_FFSL=0;
14532   GNULIB_FFSLL=0;
14533   GNULIB_MEMCHR=0;
14534   GNULIB_MEMMEM=0;
14535   GNULIB_MEMPCPY=0;
14536   GNULIB_MEMRCHR=0;
14537   GNULIB_RAWMEMCHR=0;
14538   GNULIB_STPCPY=0;
14539   GNULIB_STPNCPY=0;
14540   GNULIB_STRCHRNUL=0;
14541   GNULIB_STRDUP=0;
14542   GNULIB_STRNCAT=0;
14543   GNULIB_STRNDUP=0;
14544   GNULIB_STRNLEN=0;
14545   GNULIB_STRPBRK=0;
14546   GNULIB_STRSEP=0;
14547   GNULIB_STRSTR=0;
14548   GNULIB_STRCASESTR=0;
14549   GNULIB_STRTOK_R=0;
14550   GNULIB_MBSLEN=0;
14551   GNULIB_MBSNLEN=0;
14552   GNULIB_MBSCHR=0;
14553   GNULIB_MBSRCHR=0;
14554   GNULIB_MBSSTR=0;
14555   GNULIB_MBSCASECMP=0;
14556   GNULIB_MBSNCASECMP=0;
14557   GNULIB_MBSPCASECMP=0;
14558   GNULIB_MBSCASESTR=0;
14559   GNULIB_MBSCSPN=0;
14560   GNULIB_MBSPBRK=0;
14561   GNULIB_MBSSPN=0;
14562   GNULIB_MBSSEP=0;
14563   GNULIB_MBSTOK_R=0;
14564   GNULIB_STRERROR=0;
14565   GNULIB_STRERROR_R=0;
14566   GNULIB_STRSIGNAL=0;
14567   GNULIB_STRVERSCMP=0;
14568   HAVE_MBSLEN=0;
14569     HAVE_FFSL=1;
14570   HAVE_FFSLL=1;
14571   HAVE_MEMCHR=1;
14572   HAVE_DECL_MEMMEM=1;
14573   HAVE_MEMPCPY=1;
14574   HAVE_DECL_MEMRCHR=1;
14575   HAVE_RAWMEMCHR=1;
14576   HAVE_STPCPY=1;
14577   HAVE_STPNCPY=1;
14578   HAVE_STRCHRNUL=1;
14579   HAVE_DECL_STRDUP=1;
14580   HAVE_DECL_STRNDUP=1;
14581   HAVE_DECL_STRNLEN=1;
14582   HAVE_STRPBRK=1;
14583   HAVE_STRSEP=1;
14584   HAVE_STRCASESTR=1;
14585   HAVE_DECL_STRTOK_R=1;
14586   HAVE_DECL_STRERROR_R=1;
14587   HAVE_DECL_STRSIGNAL=1;
14588   HAVE_STRVERSCMP=1;
14589   REPLACE_MEMCHR=0;
14590   REPLACE_MEMMEM=0;
14591   REPLACE_STPNCPY=0;
14592   REPLACE_STRDUP=0;
14593   REPLACE_STRSTR=0;
14594   REPLACE_STRCASESTR=0;
14595   REPLACE_STRCHRNUL=0;
14596   REPLACE_STRERROR=0;
14597   REPLACE_STRERROR_R=0;
14598   REPLACE_STRNCAT=0;
14599   REPLACE_STRNDUP=0;
14600   REPLACE_STRNLEN=0;
14601   REPLACE_STRSIGNAL=0;
14602   REPLACE_STRTOK_R=0;
14603   UNDEFINE_STRTOK_R=0;
14604
14605
14606
14607
14608
14609
14610
14611
14612
14613   # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
14614   # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
14615   # irrelevant for anonymous mappings.
14616   ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
14617 if test "x$ac_cv_func_mmap" = xyes; then :
14618   gl_have_mmap=yes
14619 else
14620   gl_have_mmap=no
14621 fi
14622
14623
14624   # Try to allow MAP_ANONYMOUS.
14625   gl_have_mmap_anonymous=no
14626   if test $gl_have_mmap = yes; then
14627     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
14628 $as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
14629     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14630 /* end confdefs.h.  */
14631
14632 #include <sys/mman.h>
14633 #ifdef MAP_ANONYMOUS
14634     I cannot identify this map
14635 #endif
14636
14637 _ACEOF
14638 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14639   $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
14640   gl_have_mmap_anonymous=yes
14641 fi
14642 rm -f conftest*
14643
14644     if test $gl_have_mmap_anonymous != yes; then
14645       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14646 /* end confdefs.h.  */
14647
14648 #include <sys/mman.h>
14649 #ifdef MAP_ANON
14650     I cannot identify this map
14651 #endif
14652
14653 _ACEOF
14654 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14655   $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
14656
14657 $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
14658
14659          gl_have_mmap_anonymous=yes
14660 fi
14661 rm -f conftest*
14662
14663     fi
14664     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
14665 $as_echo "$gl_have_mmap_anonymous" >&6; }
14666     if test $gl_have_mmap_anonymous = yes; then
14667
14668 $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
14669
14670     fi
14671   fi
14672
14673
14674
14675
14676
14677
14678   if test $HAVE_MEMCHR = 1; then
14679     # Detect platform-specific bugs in some versions of glibc:
14680     # memchr should not dereference anything with length 0
14681     #   http://bugzilla.redhat.com/499689
14682     # memchr should not dereference overestimated length after a match
14683     #   http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
14684     #   http://sourceware.org/bugzilla/show_bug.cgi?id=10162
14685     # Assume that memchr works on platforms that lack mprotect.
14686     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
14687 $as_echo_n "checking whether memchr works... " >&6; }
14688 if ${gl_cv_func_memchr_works+:} false; then :
14689   $as_echo_n "(cached) " >&6
14690 else
14691   if test "$cross_compiling" = yes; then :
14692          gl_cv_func_memchr_works="guessing no"
14693 else
14694   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14695 /* end confdefs.h.  */
14696
14697 #include <string.h>
14698 #if HAVE_SYS_MMAN_H
14699 # include <fcntl.h>
14700 # include <unistd.h>
14701 # include <sys/types.h>
14702 # include <sys/mman.h>
14703 # ifndef MAP_FILE
14704 #  define MAP_FILE 0
14705 # endif
14706 #endif
14707
14708 int
14709 main ()
14710 {
14711
14712   int result = 0;
14713   char *fence = NULL;
14714 #if HAVE_SYS_MMAN_H && HAVE_MPROTECT
14715 # if HAVE_MAP_ANONYMOUS
14716   const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
14717   const int fd = -1;
14718 # else /* !HAVE_MAP_ANONYMOUS */
14719   const int flags = MAP_FILE | MAP_PRIVATE;
14720   int fd = open ("/dev/zero", O_RDONLY, 0666);
14721   if (fd >= 0)
14722 # endif
14723     {
14724       int pagesize = getpagesize ();
14725       char *two_pages =
14726         (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
14727                        flags, fd, 0);
14728       if (two_pages != (char *)(-1)
14729           && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
14730         fence = two_pages + pagesize;
14731     }
14732 #endif
14733   if (fence)
14734     {
14735       if (memchr (fence, 0, 0))
14736         result |= 1;
14737       strcpy (fence - 9, "12345678");
14738       if (memchr (fence - 9, 0, 79) != fence - 1)
14739         result |= 2;
14740       if (memchr (fence - 1, 0, 3) != fence - 1)
14741         result |= 4;
14742     }
14743   return result;
14744
14745   ;
14746   return 0;
14747 }
14748 _ACEOF
14749 if ac_fn_c_try_run "$LINENO"; then :
14750   gl_cv_func_memchr_works=yes
14751 else
14752   gl_cv_func_memchr_works=no
14753 fi
14754 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14755   conftest.$ac_objext conftest.beam conftest.$ac_ext
14756 fi
14757
14758 fi
14759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
14760 $as_echo "$gl_cv_func_memchr_works" >&6; }
14761     if test "$gl_cv_func_memchr_works" != yes; then
14762       REPLACE_MEMCHR=1
14763     fi
14764   fi
14765
14766 ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default"
14767 if test "x$ac_cv_have_decl_memrchr" = xyes; then :
14768   ac_have_decl=1
14769 else
14770   ac_have_decl=0
14771 fi
14772
14773 cat >>confdefs.h <<_ACEOF
14774 #define HAVE_DECL_MEMRCHR $ac_have_decl
14775 _ACEOF
14776
14777
14778
14779
14780
14781
14782
14783
14784
14785
14786
14787
14788   GNULIB_MKTIME=0;
14789   GNULIB_NANOSLEEP=0;
14790   GNULIB_STRPTIME=0;
14791   GNULIB_TIMEGM=0;
14792   GNULIB_TIME_R=0;
14793     HAVE_DECL_LOCALTIME_R=1;
14794   HAVE_NANOSLEEP=1;
14795   HAVE_STRPTIME=1;
14796   HAVE_TIMEGM=1;
14797         REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
14798   REPLACE_MKTIME=GNULIB_PORTCHECK;
14799   REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
14800   REPLACE_TIMEGM=GNULIB_PORTCHECK;
14801
14802 ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
14803 if test "x$ac_cv_have_decl_alarm" = xyes; then :
14804   ac_have_decl=1
14805 else
14806   ac_have_decl=0
14807 fi
14808
14809 cat >>confdefs.h <<_ACEOF
14810 #define HAVE_DECL_ALARM $ac_have_decl
14811 _ACEOF
14812
14813
14814
14815
14816
14817   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
14818 $as_echo_n "checking for promoted mode_t type... " >&6; }
14819 if ${gl_cv_promoted_mode_t+:} false; then :
14820   $as_echo_n "(cached) " >&6
14821 else
14822
14823                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14824 /* end confdefs.h.  */
14825 #include <sys/types.h>
14826 int
14827 main ()
14828 {
14829 typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
14830   ;
14831   return 0;
14832 }
14833 _ACEOF
14834 if ac_fn_c_try_compile "$LINENO"; then :
14835   gl_cv_promoted_mode_t='int'
14836 else
14837   gl_cv_promoted_mode_t='mode_t'
14838 fi
14839 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14840
14841 fi
14842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
14843 $as_echo "$gl_cv_promoted_mode_t" >&6; }
14844
14845 cat >>confdefs.h <<_ACEOF
14846 #define PROMOTED_MODE_T $gl_cv_promoted_mode_t
14847 _ACEOF
14848
14849
14850 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
14851 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
14852 if ${ac_cv_header_stdbool_h+:} false; then :
14853   $as_echo_n "(cached) " >&6
14854 else
14855   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14856 /* end confdefs.h.  */
14857
14858              #include <stdbool.h>
14859              #ifndef bool
14860               "error: bool is not defined"
14861              #endif
14862              #ifndef false
14863               "error: false is not defined"
14864              #endif
14865              #if false
14866               "error: false is not 0"
14867              #endif
14868              #ifndef true
14869               "error: true is not defined"
14870              #endif
14871              #if true != 1
14872               "error: true is not 1"
14873              #endif
14874              #ifndef __bool_true_false_are_defined
14875               "error: __bool_true_false_are_defined is not defined"
14876              #endif
14877
14878              struct s { _Bool s: 1; _Bool t; } s;
14879
14880              char a[true == 1 ? 1 : -1];
14881              char b[false == 0 ? 1 : -1];
14882              char c[__bool_true_false_are_defined == 1 ? 1 : -1];
14883              char d[(bool) 0.5 == true ? 1 : -1];
14884              /* See body of main program for 'e'.  */
14885              char f[(_Bool) 0.0 == false ? 1 : -1];
14886              char g[true];
14887              char h[sizeof (_Bool)];
14888              char i[sizeof s.t];
14889              enum { j = false, k = true, l = false * true, m = true * 256 };
14890              /* The following fails for
14891                 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
14892              _Bool n[m];
14893              char o[sizeof n == m * sizeof n[0] ? 1 : -1];
14894              char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
14895              /* Catch a bug in an HP-UX C compiler.  See
14896                 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
14897                 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
14898               */
14899              _Bool q = true;
14900              _Bool *pq = &q;
14901
14902 int
14903 main ()
14904 {
14905
14906              bool e = &s;
14907              *pq |= q;
14908              *pq |= ! q;
14909              /* Refer to every declared value, to avoid compiler optimizations.  */
14910              return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
14911                      + !m + !n + !o + !p + !q + !pq);
14912
14913   ;
14914   return 0;
14915 }
14916 _ACEOF
14917 if ac_fn_c_try_compile "$LINENO"; then :
14918   ac_cv_header_stdbool_h=yes
14919 else
14920   ac_cv_header_stdbool_h=no
14921 fi
14922 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14923 fi
14924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
14925 $as_echo "$ac_cv_header_stdbool_h" >&6; }
14926    ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
14927 if test "x$ac_cv_type__Bool" = xyes; then :
14928
14929 cat >>confdefs.h <<_ACEOF
14930 #define HAVE__BOOL 1
14931 _ACEOF
14932
14933
14934 fi
14935
14936
14937
14938
14939
14940   # Define two additional variables used in the Makefile substitution.
14941
14942   if test "$ac_cv_header_stdbool_h" = yes; then
14943     STDBOOL_H=''
14944   else
14945     STDBOOL_H='stdbool.h'
14946   fi
14947
14948    if test -n "$STDBOOL_H"; then
14949   GL_GENERATE_STDBOOL_H_TRUE=
14950   GL_GENERATE_STDBOOL_H_FALSE='#'
14951 else
14952   GL_GENERATE_STDBOOL_H_TRUE='#'
14953   GL_GENERATE_STDBOOL_H_FALSE=
14954 fi
14955
14956
14957   if test "$ac_cv_type__Bool" = yes; then
14958     HAVE__BOOL=1
14959   else
14960     HAVE__BOOL=0
14961   fi
14962
14963
14964
14965   # parse-datetime.y works with bison only.
14966   : ${YACC='bison -y'}
14967
14968
14969   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compound literals" >&5
14970 $as_echo_n "checking for compound literals... " >&6; }
14971 if ${gl_cv_compound_literals+:} false; then :
14972   $as_echo_n "(cached) " >&6
14973 else
14974   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14975 /* end confdefs.h.  */
14976 struct s { int i, j; };
14977 int
14978 main ()
14979 {
14980 struct s t = (struct s) { 3, 4 };
14981         if (t.i != 0) return 0;
14982   ;
14983   return 0;
14984 }
14985 _ACEOF
14986 if ac_fn_c_try_compile "$LINENO"; then :
14987   gl_cv_compound_literals=yes
14988 else
14989   gl_cv_compound_literals=no
14990 fi
14991 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14992 fi
14993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compound_literals" >&5
14994 $as_echo "$gl_cv_compound_literals" >&6; }
14995   if test $gl_cv_compound_literals = yes; then
14996
14997 $as_echo "#define HAVE_COMPOUND_LITERALS 1" >>confdefs.h
14998
14999   fi
15000
15001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
15002 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
15003 if ${ac_cv_struct_tm+:} false; then :
15004   $as_echo_n "(cached) " >&6
15005 else
15006   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15007 /* end confdefs.h.  */
15008 #include <sys/types.h>
15009 #include <time.h>
15010
15011 int
15012 main ()
15013 {
15014 struct tm tm;
15015                                      int *p = &tm.tm_sec;
15016                                      return !p;
15017   ;
15018   return 0;
15019 }
15020 _ACEOF
15021 if ac_fn_c_try_compile "$LINENO"; then :
15022   ac_cv_struct_tm=time.h
15023 else
15024   ac_cv_struct_tm=sys/time.h
15025 fi
15026 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15027 fi
15028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
15029 $as_echo "$ac_cv_struct_tm" >&6; }
15030 if test $ac_cv_struct_tm = sys/time.h; then
15031
15032 $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
15033
15034 fi
15035
15036
15037  ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include <time.h>
15038 "
15039 if test "x$ac_cv_member_struct_tm_tm_gmtoff" = xyes; then :
15040
15041 $as_echo "#define HAVE_TM_GMTOFF 1" >>confdefs.h
15042
15043 fi
15044
15045
15046
15047
15048
15049   GNULIB_PTHREAD_SIGMASK=0;
15050   GNULIB_RAISE=0;
15051   GNULIB_SIGNAL_H_SIGPIPE=0;
15052   GNULIB_SIGPROCMASK=0;
15053   GNULIB_SIGACTION=0;
15054     HAVE_POSIX_SIGNALBLOCKING=1;
15055   HAVE_PTHREAD_SIGMASK=1;
15056   HAVE_RAISE=1;
15057   HAVE_SIGSET_T=1;
15058   HAVE_SIGINFO_T=1;
15059   HAVE_SIGACTION=1;
15060   HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
15061
15062   HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
15063
15064   HAVE_SIGHANDLER_T=1;
15065   REPLACE_PTHREAD_SIGMASK=0;
15066   REPLACE_RAISE=0;
15067
15068
15069
15070
15071
15072
15073
15074
15075
15076
15077
15078
15079 # Check whether --with-selinux was given.
15080 if test "${with_selinux+set}" = set; then :
15081   withval=$with_selinux;
15082 else
15083   with_selinux=maybe
15084 fi
15085
15086
15087   LIB_SELINUX=
15088   if test "$with_selinux" != no; then
15089     gl_save_LIBS=$LIBS
15090     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setfilecon" >&5
15091 $as_echo_n "checking for library containing setfilecon... " >&6; }
15092 if ${ac_cv_search_setfilecon+:} false; then :
15093   $as_echo_n "(cached) " >&6
15094 else
15095   ac_func_search_save_LIBS=$LIBS
15096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15097 /* end confdefs.h.  */
15098
15099 /* Override any GCC internal prototype to avoid an error.
15100    Use char because int might match the return type of a GCC
15101    builtin and then its argument prototype would still apply.  */
15102 #ifdef __cplusplus
15103 extern "C"
15104 #endif
15105 char setfilecon ();
15106 int
15107 main ()
15108 {
15109 return setfilecon ();
15110   ;
15111   return 0;
15112 }
15113 _ACEOF
15114 for ac_lib in '' selinux; do
15115   if test -z "$ac_lib"; then
15116     ac_res="none required"
15117   else
15118     ac_res=-l$ac_lib
15119     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
15120   fi
15121   if ac_fn_c_try_link "$LINENO"; then :
15122   ac_cv_search_setfilecon=$ac_res
15123 fi
15124 rm -f core conftest.err conftest.$ac_objext \
15125     conftest$ac_exeext
15126   if ${ac_cv_search_setfilecon+:} false; then :
15127   break
15128 fi
15129 done
15130 if ${ac_cv_search_setfilecon+:} false; then :
15131
15132 else
15133   ac_cv_search_setfilecon=no
15134 fi
15135 rm conftest.$ac_ext
15136 LIBS=$ac_func_search_save_LIBS
15137 fi
15138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setfilecon" >&5
15139 $as_echo "$ac_cv_search_setfilecon" >&6; }
15140 ac_res=$ac_cv_search_setfilecon
15141 if test "$ac_res" != no; then :
15142   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15143   test "$ac_cv_search_setfilecon" = "none required" ||
15144                     LIB_SELINUX=$ac_cv_search_setfilecon
15145 fi
15146
15147     LIBS=$gl_save_LIBS
15148   fi
15149
15150
15151   # Warn if SELinux is found but libselinux is absent;
15152   if test "$ac_cv_search_setfilecon" = no &&
15153      test "$host" = "$build" && test -d /selinux; then
15154     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This system supports SELinux but libselinux is missing." >&5
15155 $as_echo "$as_me: WARNING: This system supports SELinux but libselinux is missing." >&2;}
15156     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GNU tar will be compiled without SELinux support." >&5
15157 $as_echo "$as_me: WARNING: GNU tar will be compiled without SELinux support." >&2;}
15158   fi
15159
15160
15161
15162 ac_fn_c_check_decl "$LINENO" "setenv" "ac_cv_have_decl_setenv" "$ac_includes_default"
15163 if test "x$ac_cv_have_decl_setenv" = xyes; then :
15164   ac_have_decl=1
15165 else
15166   ac_have_decl=0
15167 fi
15168
15169 cat >>confdefs.h <<_ACEOF
15170 #define HAVE_DECL_SETENV $ac_have_decl
15171 _ACEOF
15172
15173
15174
15175
15176
15177
15178   if test $ac_cv_have_decl_setenv = no; then
15179     HAVE_DECL_SETENV=0
15180   fi
15181
15182
15183
15184
15185
15186   for ac_header in search.h
15187 do :
15188   ac_fn_c_check_header_mongrel "$LINENO" "search.h" "ac_cv_header_search_h" "$ac_includes_default"
15189 if test "x$ac_cv_header_search_h" = xyes; then :
15190   cat >>confdefs.h <<_ACEOF
15191 #define HAVE_SEARCH_H 1
15192 _ACEOF
15193
15194 fi
15195
15196 done
15197
15198   for ac_func in tsearch
15199 do :
15200   ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch"
15201 if test "x$ac_cv_func_tsearch" = xyes; then :
15202   cat >>confdefs.h <<_ACEOF
15203 #define HAVE_TSEARCH 1
15204 _ACEOF
15205
15206 fi
15207 done
15208
15209
15210
15211
15212   ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
15213       #include <signal.h>
15214       /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>.  */
15215       #include <sys/types.h>
15216
15217 "
15218 if test "x$ac_cv_type_sigset_t" = xyes; then :
15219
15220 cat >>confdefs.h <<_ACEOF
15221 #define HAVE_SIGSET_T 1
15222 _ACEOF
15223
15224 gl_cv_type_sigset_t=yes
15225 else
15226   gl_cv_type_sigset_t=no
15227 fi
15228
15229   if test $gl_cv_type_sigset_t != yes; then
15230     HAVE_SIGSET_T=0
15231   fi
15232
15233
15234
15235
15236
15237
15238
15239
15240
15241
15242
15243   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf returns a byte count as in C99" >&5
15244 $as_echo_n "checking whether snprintf returns a byte count as in C99... " >&6; }
15245 if ${gl_cv_func_snprintf_retval_c99+:} false; then :
15246   $as_echo_n "(cached) " >&6
15247 else
15248
15249       if test "$cross_compiling" = yes; then :
15250
15251          case "$host_os" in
15252                                  # Guess yes on glibc systems.
15253            *-gnu*)               gl_cv_func_snprintf_retval_c99="guessing yes";;
15254                                  # Guess yes on FreeBSD >= 5.
15255            freebsd[1-4]*)        gl_cv_func_snprintf_retval_c99="guessing no";;
15256            freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
15257                                  # Guess yes on Mac OS X >= 10.3.
15258            darwin[1-6].*)        gl_cv_func_snprintf_retval_c99="guessing no";;
15259            darwin*)              gl_cv_func_snprintf_retval_c99="guessing yes";;
15260                                  # Guess yes on OpenBSD >= 3.9.
15261            openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
15262                                  gl_cv_func_snprintf_retval_c99="guessing no";;
15263            openbsd*)             gl_cv_func_snprintf_retval_c99="guessing yes";;
15264                                  # Guess yes on Solaris >= 2.10.
15265            solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";;
15266            solaris*)             gl_cv_func_printf_sizes_c99="guessing no";;
15267                                  # Guess yes on AIX >= 4.
15268            aix[1-3]*)            gl_cv_func_snprintf_retval_c99="guessing no";;
15269            aix*)                 gl_cv_func_snprintf_retval_c99="guessing yes";;
15270                                  # Guess yes on NetBSD >= 3.
15271            netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
15272                                  gl_cv_func_snprintf_retval_c99="guessing no";;
15273            netbsd*)              gl_cv_func_snprintf_retval_c99="guessing yes";;
15274                                  # Guess yes on BeOS.
15275            beos*)                gl_cv_func_snprintf_retval_c99="guessing yes";;
15276                                  # If we don't know, assume the worst.
15277            *)                    gl_cv_func_snprintf_retval_c99="guessing no";;
15278          esac
15279
15280 else
15281   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15282 /* end confdefs.h.  */
15283
15284 #include <stdio.h>
15285 #include <string.h>
15286 #if HAVE_SNPRINTF
15287 # define my_snprintf snprintf
15288 #else
15289 # include <stdarg.h>
15290 static int my_snprintf (char *buf, int size, const char *format, ...)
15291 {
15292   va_list args;
15293   int ret;
15294   va_start (args, format);
15295   ret = vsnprintf (buf, size, format, args);
15296   va_end (args);
15297   return ret;
15298 }
15299 #endif
15300 static char buf[100];
15301 int main ()
15302 {
15303   strcpy (buf, "ABCDEF");
15304   if (my_snprintf (buf, 3, "%d %d", 4567, 89) != 7)
15305     return 1;
15306   if (my_snprintf (buf, 0, "%d %d", 4567, 89) != 7)
15307     return 2;
15308   if (my_snprintf (NULL, 0, "%d %d", 4567, 89) != 7)
15309     return 3;
15310   return 0;
15311 }
15312 _ACEOF
15313 if ac_fn_c_try_run "$LINENO"; then :
15314   gl_cv_func_snprintf_retval_c99=yes
15315 else
15316   gl_cv_func_snprintf_retval_c99=no
15317 fi
15318 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15319   conftest.$ac_objext conftest.beam conftest.$ac_ext
15320 fi
15321
15322
15323 fi
15324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_retval_c99" >&5
15325 $as_echo "$gl_cv_func_snprintf_retval_c99" >&6; }
15326
15327 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
15328 if test "x$ac_cv_have_decl_snprintf" = xyes; then :
15329   ac_have_decl=1
15330 else
15331   ac_have_decl=0
15332 fi
15333
15334 cat >>confdefs.h <<_ACEOF
15335 #define HAVE_DECL_SNPRINTF $ac_have_decl
15336 _ACEOF
15337
15338
15339   GNULIB_FFS=0;
15340     HAVE_FFS=1;
15341   HAVE_STRCASECMP=1;
15342   HAVE_DECL_STRNCASECMP=1;
15343
15344
15345
15346 ac_fn_c_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default"
15347 if test "x$ac_cv_have_decl_strdup" = xyes; then :
15348   ac_have_decl=1
15349 else
15350   ac_have_decl=0
15351 fi
15352
15353 cat >>confdefs.h <<_ACEOF
15354 #define HAVE_DECL_STRDUP $ac_have_decl
15355 _ACEOF
15356
15357
15358      REPLACE_STRERROR_0=0
15359   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5
15360 $as_echo_n "checking whether strerror(0) succeeds... " >&6; }
15361 if ${gl_cv_func_strerror_0_works+:} false; then :
15362   $as_echo_n "(cached) " >&6
15363 else
15364   if test "$cross_compiling" = yes; then :
15365   case "$host_os" in
15366                  # Guess yes on glibc systems.
15367          *-gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
15368                  # If we don't know, assume the worst.
15369          *)      gl_cv_func_strerror_0_works="guessing no" ;;
15370        esac
15371
15372 else
15373   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15374 /* end confdefs.h.  */
15375 #include <string.h>
15376            #include <errno.h>
15377
15378 int
15379 main ()
15380 {
15381 int result = 0;
15382            char *str;
15383            errno = 0;
15384            str = strerror (0);
15385            if (!*str) result |= 1;
15386            if (errno) result |= 2;
15387            if (strstr (str, "nknown") || strstr (str, "ndefined"))
15388              result |= 4;
15389            return result;
15390   ;
15391   return 0;
15392 }
15393 _ACEOF
15394 if ac_fn_c_try_run "$LINENO"; then :
15395   gl_cv_func_strerror_0_works=yes
15396 else
15397   gl_cv_func_strerror_0_works=no
15398 fi
15399 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15400   conftest.$ac_objext conftest.beam conftest.$ac_ext
15401 fi
15402
15403
15404 fi
15405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5
15406 $as_echo "$gl_cv_func_strerror_0_works" >&6; }
15407   case "$gl_cv_func_strerror_0_works" in
15408     *yes) ;;
15409     *)
15410       REPLACE_STRERROR_0=1
15411
15412 $as_echo "#define REPLACE_STRERROR_0 1" >>confdefs.h
15413
15414       ;;
15415   esac
15416
15417
15418
15419
15420
15421
15422
15423
15424
15425
15426
15427
15428      if test $gl_cv_have_include_next = yes; then
15429        gl_cv_next_string_h='<'string.h'>'
15430      else
15431        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
15432 $as_echo_n "checking absolute name of <string.h>... " >&6; }
15433 if ${gl_cv_next_string_h+:} false; then :
15434   $as_echo_n "(cached) " >&6
15435 else
15436
15437                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15438 /* end confdefs.h.  */
15439 #include <string.h>
15440
15441 _ACEOF
15442                                                                                                                         case "$host_os" in
15443                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
15444                  *)    gl_absname_cpp="$ac_cpp" ;;
15445                esac
15446
15447                case "$host_os" in
15448                  mingw*)
15449                                                                                                                                      gl_dirsep_regex='[/\\]'
15450                    ;;
15451                  *)
15452                    gl_dirsep_regex='\/'
15453                    ;;
15454                esac
15455                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
15456
15457                gl_header_literal_regex=`echo 'string.h' \
15458                                         | sed -e "$gl_make_literal_regex_sed"`
15459                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
15460                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
15461                    s|^/[^/]|//&|
15462                    p
15463                    q
15464                  }'
15465                                                             gl_cv_next_string_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
15466                       sed -n "$gl_absolute_header_sed"`'"'
15467
15468
15469 fi
15470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
15471 $as_echo "$gl_cv_next_string_h" >&6; }
15472      fi
15473      NEXT_STRING_H=$gl_cv_next_string_h
15474
15475      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
15476        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
15477        gl_next_as_first_directive='<'string.h'>'
15478      else
15479        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
15480        gl_next_as_first_directive=$gl_cv_next_string_h
15481      fi
15482      NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
15483
15484
15485
15486
15487
15488
15489     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
15490     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
15491     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
15492 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
15493 if eval \${$as_gl_Symbol+:} false; then :
15494   $as_echo_n "(cached) " >&6
15495 else
15496   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15497 /* end confdefs.h.  */
15498 #include <string.h>
15499
15500 int
15501 main ()
15502 {
15503 #undef $gl_func
15504   (void) $gl_func;
15505   ;
15506   return 0;
15507 }
15508 _ACEOF
15509 if ac_fn_c_try_compile "$LINENO"; then :
15510   eval "$as_gl_Symbol=yes"
15511 else
15512   eval "$as_gl_Symbol=no"
15513 fi
15514 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15515 fi
15516 eval ac_res=\$$as_gl_Symbol
15517                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15518 $as_echo "$ac_res" >&6; }
15519     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
15520   cat >>confdefs.h <<_ACEOF
15521 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
15522 _ACEOF
15523
15524                      eval ac_cv_have_decl_$gl_func=yes
15525 fi
15526       done
15527
15528
15529
15530
15531
15532
15533
15534
15535
15536
15537
15538
15539
15540
15541
15542
15543      if test $gl_cv_have_include_next = yes; then
15544        gl_cv_next_strings_h='<'strings.h'>'
15545      else
15546        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <strings.h>" >&5
15547 $as_echo_n "checking absolute name of <strings.h>... " >&6; }
15548 if ${gl_cv_next_strings_h+:} false; then :
15549   $as_echo_n "(cached) " >&6
15550 else
15551
15552              if test $ac_cv_header_strings_h = yes; then
15553
15554
15555                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15556 /* end confdefs.h.  */
15557 #include <strings.h>
15558
15559 _ACEOF
15560                                                                                                                         case "$host_os" in
15561                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
15562                  *)    gl_absname_cpp="$ac_cpp" ;;
15563                esac
15564
15565                case "$host_os" in
15566                  mingw*)
15567                                                                                                                                      gl_dirsep_regex='[/\\]'
15568                    ;;
15569                  *)
15570                    gl_dirsep_regex='\/'
15571                    ;;
15572                esac
15573                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
15574
15575                gl_header_literal_regex=`echo 'strings.h' \
15576                                         | sed -e "$gl_make_literal_regex_sed"`
15577                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
15578                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
15579                    s|^/[^/]|//&|
15580                    p
15581                    q
15582                  }'
15583                                                             gl_cv_next_strings_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
15584                       sed -n "$gl_absolute_header_sed"`'"'
15585           else
15586                gl_cv_next_strings_h='<'strings.h'>'
15587              fi
15588
15589
15590 fi
15591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_strings_h" >&5
15592 $as_echo "$gl_cv_next_strings_h" >&6; }
15593      fi
15594      NEXT_STRINGS_H=$gl_cv_next_strings_h
15595
15596      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
15597        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
15598        gl_next_as_first_directive='<'strings.h'>'
15599      else
15600        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
15601        gl_next_as_first_directive=$gl_cv_next_strings_h
15602      fi
15603      NEXT_AS_FIRST_DIRECTIVE_STRINGS_H=$gl_next_as_first_directive
15604
15605
15606
15607
15608   if test $ac_cv_header_strings_h = yes; then
15609     HAVE_STRINGS_H=1
15610   else
15611     HAVE_STRINGS_H=0
15612   fi
15613
15614
15615
15616     for gl_func in ffs strcasecmp strncasecmp; do
15617     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
15618     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
15619 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
15620 if eval \${$as_gl_Symbol+:} false; then :
15621   $as_echo_n "(cached) " >&6
15622 else
15623   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15624 /* end confdefs.h.  */
15625
15626     /* Minix 3.1.8 has a bug: <sys/types.h> must be included before
15627        <strings.h>.  */
15628     #include <sys/types.h>
15629     #include <strings.h>
15630
15631 int
15632 main ()
15633 {
15634 #undef $gl_func
15635   (void) $gl_func;
15636   ;
15637   return 0;
15638 }
15639 _ACEOF
15640 if ac_fn_c_try_compile "$LINENO"; then :
15641   eval "$as_gl_Symbol=yes"
15642 else
15643   eval "$as_gl_Symbol=no"
15644 fi
15645 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15646 fi
15647 eval ac_res=\$$as_gl_Symbol
15648                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15649 $as_echo "$ac_res" >&6; }
15650     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
15651   cat >>confdefs.h <<_ACEOF
15652 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
15653 _ACEOF
15654
15655                      eval ac_cv_have_decl_$gl_func=yes
15656 fi
15657       done
15658
15659
15660 ac_fn_c_check_decl "$LINENO" "strndup" "ac_cv_have_decl_strndup" "$ac_includes_default"
15661 if test "x$ac_cv_have_decl_strndup" = xyes; then :
15662   ac_have_decl=1
15663 else
15664   ac_have_decl=0
15665 fi
15666
15667 cat >>confdefs.h <<_ACEOF
15668 #define HAVE_DECL_STRNDUP $ac_have_decl
15669 _ACEOF
15670
15671
15672
15673 ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
15674 if test "x$ac_cv_have_decl_strnlen" = xyes; then :
15675   ac_have_decl=1
15676 else
15677   ac_have_decl=0
15678 fi
15679
15680 cat >>confdefs.h <<_ACEOF
15681 #define HAVE_DECL_STRNLEN $ac_have_decl
15682 _ACEOF
15683
15684
15685
15686 ac_fn_c_check_decl "$LINENO" "strtoumax" "ac_cv_have_decl_strtoumax" "$ac_includes_default"
15687 if test "x$ac_cv_have_decl_strtoumax" = xyes; then :
15688   ac_have_decl=1
15689 else
15690   ac_have_decl=0
15691 fi
15692
15693 cat >>confdefs.h <<_ACEOF
15694 #define HAVE_DECL_STRTOUMAX $ac_have_decl
15695 _ACEOF
15696
15697
15698
15699
15700
15701
15702
15703   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
15704 $as_echo_n "checking for struct timespec in <time.h>... " >&6; }
15705 if ${gl_cv_sys_struct_timespec_in_time_h+:} false; then :
15706   $as_echo_n "(cached) " >&6
15707 else
15708   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15709 /* end confdefs.h.  */
15710 #include <time.h>
15711
15712 int
15713 main ()
15714 {
15715 static struct timespec x; x.tv_sec = x.tv_nsec;
15716   ;
15717   return 0;
15718 }
15719 _ACEOF
15720 if ac_fn_c_try_compile "$LINENO"; then :
15721   gl_cv_sys_struct_timespec_in_time_h=yes
15722 else
15723   gl_cv_sys_struct_timespec_in_time_h=no
15724 fi
15725 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15726 fi
15727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
15728 $as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
15729
15730   TIME_H_DEFINES_STRUCT_TIMESPEC=0
15731   SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
15732   PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
15733   if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
15734     TIME_H_DEFINES_STRUCT_TIMESPEC=1
15735   else
15736     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
15737 $as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
15738 if ${gl_cv_sys_struct_timespec_in_sys_time_h+:} false; then :
15739   $as_echo_n "(cached) " >&6
15740 else
15741   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15742 /* end confdefs.h.  */
15743 #include <sys/time.h>
15744
15745 int
15746 main ()
15747 {
15748 static struct timespec x; x.tv_sec = x.tv_nsec;
15749   ;
15750   return 0;
15751 }
15752 _ACEOF
15753 if ac_fn_c_try_compile "$LINENO"; then :
15754   gl_cv_sys_struct_timespec_in_sys_time_h=yes
15755 else
15756   gl_cv_sys_struct_timespec_in_sys_time_h=no
15757 fi
15758 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15759 fi
15760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
15761 $as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
15762     if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
15763       SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
15764     else
15765       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
15766 $as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
15767 if ${gl_cv_sys_struct_timespec_in_pthread_h+:} false; then :
15768   $as_echo_n "(cached) " >&6
15769 else
15770   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15771 /* end confdefs.h.  */
15772 #include <pthread.h>
15773
15774 int
15775 main ()
15776 {
15777 static struct timespec x; x.tv_sec = x.tv_nsec;
15778   ;
15779   return 0;
15780 }
15781 _ACEOF
15782 if ac_fn_c_try_compile "$LINENO"; then :
15783   gl_cv_sys_struct_timespec_in_pthread_h=yes
15784 else
15785   gl_cv_sys_struct_timespec_in_pthread_h=no
15786 fi
15787 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15788 fi
15789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
15790 $as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
15791       if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
15792         PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
15793       fi
15794     fi
15795   fi
15796
15797
15798
15799
15800
15801
15802
15803
15804
15805
15806
15807
15808
15809
15810
15811      if test $gl_cv_have_include_next = yes; then
15812        gl_cv_next_time_h='<'time.h'>'
15813      else
15814        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
15815 $as_echo_n "checking absolute name of <time.h>... " >&6; }
15816 if ${gl_cv_next_time_h+:} false; then :
15817   $as_echo_n "(cached) " >&6
15818 else
15819
15820                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15821 /* end confdefs.h.  */
15822 #include <time.h>
15823
15824 _ACEOF
15825                                                                                                                         case "$host_os" in
15826                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
15827                  *)    gl_absname_cpp="$ac_cpp" ;;
15828                esac
15829
15830                case "$host_os" in
15831                  mingw*)
15832                                                                                                                                      gl_dirsep_regex='[/\\]'
15833                    ;;
15834                  *)
15835                    gl_dirsep_regex='\/'
15836                    ;;
15837                esac
15838                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
15839
15840                gl_header_literal_regex=`echo 'time.h' \
15841                                         | sed -e "$gl_make_literal_regex_sed"`
15842                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
15843                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
15844                    s|^/[^/]|//&|
15845                    p
15846                    q
15847                  }'
15848                                                             gl_cv_next_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
15849                       sed -n "$gl_absolute_header_sed"`'"'
15850
15851
15852 fi
15853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
15854 $as_echo "$gl_cv_next_time_h" >&6; }
15855      fi
15856      NEXT_TIME_H=$gl_cv_next_time_h
15857
15858      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
15859        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
15860        gl_next_as_first_directive='<'time.h'>'
15861      else
15862        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
15863        gl_next_as_first_directive=$gl_cv_next_time_h
15864      fi
15865      NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
15866
15867
15868
15869
15870
15871
15872
15873
15874
15875
15876
15877
15878
15879
15880
15881
15882 gl_libunistring_sed_extract_major='/^[0-9]/{s/^\([0-9]*\).*/\1/p;q;}
15883 i\
15884 0
15885 q
15886 '
15887 gl_libunistring_sed_extract_minor='/^[0-9][0-9]*[.][0-9]/{s/^[0-9]*[.]\([0-9]*\).*/\1/p;q;}
15888 i\
15889 0
15890 q
15891 '
15892 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;}
15893 i\
15894 0
15895 q
15896 '
15897
15898
15899   if test "$HAVE_LIBUNISTRING" = yes; then
15900     LIBUNISTRING_VERSION_MAJOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_major"`
15901     LIBUNISTRING_VERSION_MINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_minor"`
15902     LIBUNISTRING_VERSION_SUBMINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_subminor"`
15903   fi
15904
15905
15906
15907 ac_fn_c_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default"
15908 if test "x$ac_cv_have_decl_unsetenv" = xyes; then :
15909   ac_have_decl=1
15910 else
15911   ac_have_decl=0
15912 fi
15913
15914 cat >>confdefs.h <<_ACEOF
15915 #define HAVE_DECL_UNSETENV $ac_have_decl
15916 _ACEOF
15917
15918
15919   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the utimes function works" >&5
15920 $as_echo_n "checking whether the utimes function works... " >&6; }
15921 if ${gl_cv_func_working_utimes+:} false; then :
15922   $as_echo_n "(cached) " >&6
15923 else
15924
15925   if test "$cross_compiling" = yes; then :
15926   gl_cv_func_working_utimes=no
15927 else
15928   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15929 /* end confdefs.h.  */
15930
15931 #include <sys/types.h>
15932 #include <sys/stat.h>
15933 #include <fcntl.h>
15934 #include <sys/time.h>
15935 #include <time.h>
15936 #include <unistd.h>
15937 #include <stdlib.h>
15938 #include <stdio.h>
15939 #include <utime.h>
15940
15941 static int
15942 inorder (time_t a, time_t b, time_t c)
15943 {
15944   return a <= b && b <= c;
15945 }
15946
15947 int
15948 main ()
15949 {
15950   int result = 0;
15951   char const *file = "conftest.utimes";
15952   static struct timeval timeval[2] = {{9, 10}, {999999, 999999}};
15953
15954   /* Test whether utimes() essentially works.  */
15955   {
15956     struct stat sbuf;
15957     FILE *f = fopen (file, "w");
15958     if (f == NULL)
15959       result |= 1;
15960     else if (fclose (f) != 0)
15961       result |= 1;
15962     else if (utimes (file, timeval) != 0)
15963       result |= 2;
15964     else if (lstat (file, &sbuf) != 0)
15965       result |= 1;
15966     else if (!(sbuf.st_atime == timeval[0].tv_sec
15967                && sbuf.st_mtime == timeval[1].tv_sec))
15968       result |= 4;
15969     if (unlink (file) != 0)
15970       result |= 1;
15971   }
15972
15973   /* Test whether utimes() with a NULL argument sets the file's timestamp
15974      to the current time.  Use 'fstat' as well as 'time' to
15975      determine the "current" time, to accommodate NFS file systems
15976      if there is a time skew between the host and the NFS server.  */
15977   {
15978     int fd = open (file, O_WRONLY|O_CREAT, 0644);
15979     if (fd < 0)
15980       result |= 1;
15981     else
15982       {
15983         time_t t0, t2;
15984         struct stat st0, st1, st2;
15985         if (time (&t0) == (time_t) -1)
15986           result |= 1;
15987         else if (fstat (fd, &st0) != 0)
15988           result |= 1;
15989         else if (utimes (file, timeval) != 0)
15990           result |= 2;
15991         else if (utimes (file, NULL) != 0)
15992           result |= 8;
15993         else if (fstat (fd, &st1) != 0)
15994           result |= 1;
15995         else if (write (fd, "\n", 1) != 1)
15996           result |= 1;
15997         else if (fstat (fd, &st2) != 0)
15998           result |= 1;
15999         else if (time (&t2) == (time_t) -1)
16000           result |= 1;
16001         else
16002           {
16003             int m_ok_POSIX = inorder (t0, st1.st_mtime, t2);
16004             int m_ok_NFS = inorder (st0.st_mtime, st1.st_mtime, st2.st_mtime);
16005             if (! (st1.st_atime == st1.st_mtime))
16006               result |= 16;
16007             if (! (m_ok_POSIX || m_ok_NFS))
16008               result |= 32;
16009           }
16010         if (close (fd) != 0)
16011           result |= 1;
16012       }
16013     if (unlink (file) != 0)
16014       result |= 1;
16015   }
16016
16017   /* Test whether utimes() with a NULL argument works on read-only files.  */
16018   {
16019     int fd = open (file, O_WRONLY|O_CREAT, 0444);
16020     if (fd < 0)
16021       result |= 1;
16022     else if (close (fd) != 0)
16023       result |= 1;
16024     else if (utimes (file, NULL) != 0)
16025       result |= 64;
16026     if (unlink (file) != 0)
16027       result |= 1;
16028   }
16029
16030   return result;
16031 }
16032
16033 _ACEOF
16034 if ac_fn_c_try_run "$LINENO"; then :
16035   gl_cv_func_working_utimes=yes
16036 else
16037   gl_cv_func_working_utimes=no
16038 fi
16039 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16040   conftest.$ac_objext conftest.beam conftest.$ac_ext
16041 fi
16042
16043 fi
16044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_utimes" >&5
16045 $as_echo "$gl_cv_func_working_utimes" >&6; }
16046
16047   if test $gl_cv_func_working_utimes = yes; then
16048
16049 $as_echo "#define HAVE_WORKING_UTIMES 1" >>confdefs.h
16050
16051   fi
16052
16053
16054
16055
16056
16057   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct utimbuf" >&5
16058 $as_echo_n "checking for struct utimbuf... " >&6; }
16059 if ${gl_cv_sys_struct_utimbuf+:} false; then :
16060   $as_echo_n "(cached) " >&6
16061 else
16062   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16063 /* end confdefs.h.  */
16064 #if HAVE_SYS_TIME_H
16065              #include <sys/time.h>
16066             #endif
16067             #include <time.h>
16068             #ifdef HAVE_UTIME_H
16069              #include <utime.h>
16070             #endif
16071
16072 int
16073 main ()
16074 {
16075 static struct utimbuf x; x.actime = x.modtime;
16076   ;
16077   return 0;
16078 }
16079 _ACEOF
16080 if ac_fn_c_try_compile "$LINENO"; then :
16081   gl_cv_sys_struct_utimbuf=yes
16082 else
16083   gl_cv_sys_struct_utimbuf=no
16084 fi
16085 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16086 fi
16087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_utimbuf" >&5
16088 $as_echo "$gl_cv_sys_struct_utimbuf" >&6; }
16089
16090   if test $gl_cv_sys_struct_utimbuf = yes; then
16091
16092 $as_echo "#define HAVE_STRUCT_UTIMBUF 1" >>confdefs.h
16093
16094   fi
16095
16096
16097
16098
16099
16100
16101
16102
16103
16104
16105
16106
16107
16108   if test $ac_cv_header_features_h = yes; then
16109     HAVE_FEATURES_H=1
16110   else
16111     HAVE_FEATURES_H=0
16112   fi
16113
16114
16115
16116   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5
16117 $as_echo_n "checking for inttypes.h... " >&6; }
16118 if ${gl_cv_header_inttypes_h+:} false; then :
16119   $as_echo_n "(cached) " >&6
16120 else
16121   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16122 /* end confdefs.h.  */
16123
16124 #include <sys/types.h>
16125 #include <inttypes.h>
16126
16127 int
16128 main ()
16129 {
16130 uintmax_t i = (uintmax_t) -1; return !i;
16131   ;
16132   return 0;
16133 }
16134 _ACEOF
16135 if ac_fn_c_try_compile "$LINENO"; then :
16136   gl_cv_header_inttypes_h=yes
16137 else
16138   gl_cv_header_inttypes_h=no
16139 fi
16140 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16141 fi
16142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_inttypes_h" >&5
16143 $as_echo "$gl_cv_header_inttypes_h" >&6; }
16144   if test $gl_cv_header_inttypes_h = yes; then
16145
16146 cat >>confdefs.h <<_ACEOF
16147 #define HAVE_INTTYPES_H_WITH_UINTMAX 1
16148 _ACEOF
16149
16150   fi
16151
16152
16153   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint.h" >&5
16154 $as_echo_n "checking for stdint.h... " >&6; }
16155 if ${gl_cv_header_stdint_h+:} false; then :
16156   $as_echo_n "(cached) " >&6
16157 else
16158   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16159 /* end confdefs.h.  */
16160 #include <sys/types.h>
16161             #include <stdint.h>
16162 int
16163 main ()
16164 {
16165 uintmax_t i = (uintmax_t) -1; return !i;
16166   ;
16167   return 0;
16168 }
16169 _ACEOF
16170 if ac_fn_c_try_compile "$LINENO"; then :
16171   gl_cv_header_stdint_h=yes
16172 else
16173   gl_cv_header_stdint_h=no
16174 fi
16175 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16176 fi
16177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_h" >&5
16178 $as_echo "$gl_cv_header_stdint_h" >&6; }
16179   if test $gl_cv_header_stdint_h = yes; then
16180
16181 cat >>confdefs.h <<_ACEOF
16182 #define HAVE_STDINT_H_WITH_UINTMAX 1
16183 _ACEOF
16184
16185   fi
16186
16187
16188
16189
16190   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intmax_t" >&5
16191 $as_echo_n "checking for intmax_t... " >&6; }
16192 if ${gt_cv_c_intmax_t+:} false; then :
16193   $as_echo_n "(cached) " >&6
16194 else
16195   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16196 /* end confdefs.h.  */
16197
16198 #include <stddef.h>
16199 #include <stdlib.h>
16200 #if HAVE_STDINT_H_WITH_UINTMAX
16201 #include <stdint.h>
16202 #endif
16203 #if HAVE_INTTYPES_H_WITH_UINTMAX
16204 #include <inttypes.h>
16205 #endif
16206
16207 int
16208 main ()
16209 {
16210 intmax_t x = -1; return !x;
16211   ;
16212   return 0;
16213 }
16214 _ACEOF
16215 if ac_fn_c_try_compile "$LINENO"; then :
16216   gt_cv_c_intmax_t=yes
16217 else
16218   gt_cv_c_intmax_t=no
16219 fi
16220 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16221 fi
16222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_intmax_t" >&5
16223 $as_echo "$gt_cv_c_intmax_t" >&6; }
16224   if test $gt_cv_c_intmax_t = yes; then
16225
16226 $as_echo "#define HAVE_INTMAX_T 1" >>confdefs.h
16227
16228   else
16229
16230     test $ac_cv_type_long_long_int = yes \
16231       && ac_type='long long' \
16232       || ac_type='long'
16233
16234 cat >>confdefs.h <<_ACEOF
16235 #define intmax_t $ac_type
16236 _ACEOF
16237
16238   fi
16239
16240
16241   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
16242 $as_echo_n "checking where to find the exponent in a 'double'... " >&6; }
16243 if ${gl_cv_cc_double_expbit0+:} false; then :
16244   $as_echo_n "(cached) " >&6
16245 else
16246
16247       if test "$cross_compiling" = yes; then :
16248
16249                                                                       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16250 /* end confdefs.h.  */
16251
16252 #if defined arm || defined __arm || defined __arm__
16253   mixed_endianness
16254 #endif
16255
16256 _ACEOF
16257 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16258   $EGREP "mixed_endianness" >/dev/null 2>&1; then :
16259   gl_cv_cc_double_expbit0="unknown"
16260 else
16261
16262                                                          :
16263 if ${ac_cv_c_bigendian+:} false; then :
16264   $as_echo_n "(cached) " >&6
16265 else
16266   ac_cv_c_bigendian=unknown
16267     # See if we're dealing with a universal compiler.
16268     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16269 /* end confdefs.h.  */
16270 #ifndef __APPLE_CC__
16271                not a universal capable compiler
16272              #endif
16273              typedef int dummy;
16274
16275 _ACEOF
16276 if ac_fn_c_try_compile "$LINENO"; then :
16277
16278         # Check for potential -arch flags.  It is not universal unless
16279         # there are at least two -arch flags with different values.
16280         ac_arch=
16281         ac_prev=
16282         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
16283          if test -n "$ac_prev"; then
16284            case $ac_word in
16285              i?86 | x86_64 | ppc | ppc64)
16286                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
16287                  ac_arch=$ac_word
16288                else
16289                  ac_cv_c_bigendian=universal
16290                  break
16291                fi
16292                ;;
16293            esac
16294            ac_prev=
16295          elif test "x$ac_word" = "x-arch"; then
16296            ac_prev=arch
16297          fi
16298        done
16299 fi
16300 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16301     if test $ac_cv_c_bigendian = unknown; then
16302       # See if sys/param.h defines the BYTE_ORDER macro.
16303       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16304 /* end confdefs.h.  */
16305 #include <sys/types.h>
16306              #include <sys/param.h>
16307
16308 int
16309 main ()
16310 {
16311 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
16312                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
16313                      && LITTLE_ENDIAN)
16314               bogus endian macros
16315              #endif
16316
16317   ;
16318   return 0;
16319 }
16320 _ACEOF
16321 if ac_fn_c_try_compile "$LINENO"; then :
16322   # It does; now see whether it defined to BIG_ENDIAN or not.
16323          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16324 /* end confdefs.h.  */
16325 #include <sys/types.h>
16326                 #include <sys/param.h>
16327
16328 int
16329 main ()
16330 {
16331 #if BYTE_ORDER != BIG_ENDIAN
16332                  not big endian
16333                 #endif
16334
16335   ;
16336   return 0;
16337 }
16338 _ACEOF
16339 if ac_fn_c_try_compile "$LINENO"; then :
16340   ac_cv_c_bigendian=yes
16341 else
16342   ac_cv_c_bigendian=no
16343 fi
16344 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16345 fi
16346 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16347     fi
16348     if test $ac_cv_c_bigendian = unknown; then
16349       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
16350       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16351 /* end confdefs.h.  */
16352 #include <limits.h>
16353
16354 int
16355 main ()
16356 {
16357 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
16358               bogus endian macros
16359              #endif
16360
16361   ;
16362   return 0;
16363 }
16364 _ACEOF
16365 if ac_fn_c_try_compile "$LINENO"; then :
16366   # It does; now see whether it defined to _BIG_ENDIAN or not.
16367          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16368 /* end confdefs.h.  */
16369 #include <limits.h>
16370
16371 int
16372 main ()
16373 {
16374 #ifndef _BIG_ENDIAN
16375                  not big endian
16376                 #endif
16377
16378   ;
16379   return 0;
16380 }
16381 _ACEOF
16382 if ac_fn_c_try_compile "$LINENO"; then :
16383   ac_cv_c_bigendian=yes
16384 else
16385   ac_cv_c_bigendian=no
16386 fi
16387 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16388 fi
16389 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16390     fi
16391     if test $ac_cv_c_bigendian = unknown; then
16392       # Compile a test program.
16393       if test "$cross_compiling" = yes; then :
16394   # Try to guess by grepping values from an object file.
16395          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16396 /* end confdefs.h.  */
16397 short int ascii_mm[] =
16398                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
16399                 short int ascii_ii[] =
16400                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
16401                 int use_ascii (int i) {
16402                   return ascii_mm[i] + ascii_ii[i];
16403                 }
16404                 short int ebcdic_ii[] =
16405                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
16406                 short int ebcdic_mm[] =
16407                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
16408                 int use_ebcdic (int i) {
16409                   return ebcdic_mm[i] + ebcdic_ii[i];
16410                 }
16411                 extern int foo;
16412
16413 int
16414 main ()
16415 {
16416 return use_ascii (foo) == use_ebcdic (foo);
16417   ;
16418   return 0;
16419 }
16420 _ACEOF
16421 if ac_fn_c_try_compile "$LINENO"; then :
16422   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
16423               ac_cv_c_bigendian=yes
16424             fi
16425             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
16426               if test "$ac_cv_c_bigendian" = unknown; then
16427                 ac_cv_c_bigendian=no
16428               else
16429                 # finding both strings is unlikely to happen, but who knows?
16430                 ac_cv_c_bigendian=unknown
16431               fi
16432             fi
16433 fi
16434 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16435 else
16436   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16437 /* end confdefs.h.  */
16438 $ac_includes_default
16439 int
16440 main ()
16441 {
16442
16443              /* Are we little or big endian?  From Harbison&Steele.  */
16444              union
16445              {
16446                long int l;
16447                char c[sizeof (long int)];
16448              } u;
16449              u.l = 1;
16450              return u.c[sizeof (long int) - 1] == 1;
16451
16452   ;
16453   return 0;
16454 }
16455 _ACEOF
16456 if ac_fn_c_try_run "$LINENO"; then :
16457   ac_cv_c_bigendian=no
16458 else
16459   ac_cv_c_bigendian=yes
16460 fi
16461 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16462   conftest.$ac_objext conftest.beam conftest.$ac_ext
16463 fi
16464
16465     fi
16466 fi
16467 :
16468  case $ac_cv_c_bigendian in #(
16469    yes)
16470      gl_cv_cc_double_expbit0="word 0 bit 20";; #(
16471    no)
16472      gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
16473    universal)
16474
16475 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
16476
16477      ;; #(
16478    *)
16479      gl_cv_cc_double_expbit0="unknown" ;;
16480  esac
16481
16482
16483 fi
16484 rm -f conftest*
16485
16486
16487 else
16488   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16489 /* end confdefs.h.  */
16490
16491 #include <float.h>
16492 #include <stddef.h>
16493 #include <stdio.h>
16494 #include <string.h>
16495 #define NWORDS \
16496   ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
16497 typedef union { double value; unsigned int word[NWORDS]; } memory_double;
16498 static unsigned int ored_words[NWORDS];
16499 static unsigned int anded_words[NWORDS];
16500 static void add_to_ored_words (double x)
16501 {
16502   memory_double m;
16503   size_t i;
16504   /* Clear it first, in case sizeof (double) < sizeof (memory_double).  */
16505   memset (&m, 0, sizeof (memory_double));
16506   m.value = x;
16507   for (i = 0; i < NWORDS; i++)
16508     {
16509       ored_words[i] |= m.word[i];
16510       anded_words[i] &= m.word[i];
16511     }
16512 }
16513 int main ()
16514 {
16515   size_t j;
16516   FILE *fp = fopen ("conftest.out", "w");
16517   if (fp == NULL)
16518     return 1;
16519   for (j = 0; j < NWORDS; j++)
16520     anded_words[j] = ~ (unsigned int) 0;
16521   add_to_ored_words (0.25);
16522   add_to_ored_words (0.5);
16523   add_to_ored_words (1.0);
16524   add_to_ored_words (2.0);
16525   add_to_ored_words (4.0);
16526   /* Remove bits that are common (e.g. if representation of the first mantissa
16527      bit is explicit).  */
16528   for (j = 0; j < NWORDS; j++)
16529     ored_words[j] &= ~anded_words[j];
16530   /* Now find the nonzero word.  */
16531   for (j = 0; j < NWORDS; j++)
16532     if (ored_words[j] != 0)
16533       break;
16534   if (j < NWORDS)
16535     {
16536       size_t i;
16537       for (i = j + 1; i < NWORDS; i++)
16538         if (ored_words[i] != 0)
16539           {
16540             fprintf (fp, "unknown");
16541             return (fclose (fp) != 0);
16542           }
16543       for (i = 0; ; i++)
16544         if ((ored_words[j] >> i) & 1)
16545           {
16546             fprintf (fp, "word %d bit %d", (int) j, (int) i);
16547             return (fclose (fp) != 0);
16548           }
16549     }
16550   fprintf (fp, "unknown");
16551   return (fclose (fp) != 0);
16552 }
16553
16554 _ACEOF
16555 if ac_fn_c_try_run "$LINENO"; then :
16556   gl_cv_cc_double_expbit0=`cat conftest.out`
16557 else
16558   gl_cv_cc_double_expbit0="unknown"
16559 fi
16560 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16561   conftest.$ac_objext conftest.beam conftest.$ac_ext
16562 fi
16563
16564       rm -f conftest.out
16565
16566 fi
16567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
16568 $as_echo "$gl_cv_cc_double_expbit0" >&6; }
16569   case "$gl_cv_cc_double_expbit0" in
16570     word*bit*)
16571       word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
16572       bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
16573
16574 cat >>confdefs.h <<_ACEOF
16575 #define DBL_EXPBIT0_WORD $word
16576 _ACEOF
16577
16578
16579 cat >>confdefs.h <<_ACEOF
16580 #define DBL_EXPBIT0_BIT $bit
16581 _ACEOF
16582
16583       ;;
16584   esac
16585
16586
16587
16588
16589
16590
16591   for ac_func in snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb
16592 do :
16593   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16594 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16595 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16596   cat >>confdefs.h <<_ACEOF
16597 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16598 _ACEOF
16599
16600 fi
16601 done
16602
16603       ac_fn_c_check_decl "$LINENO" "_snprintf" "ac_cv_have_decl__snprintf" "#include <stdio.h>
16604 "
16605 if test "x$ac_cv_have_decl__snprintf" = xyes; then :
16606   ac_have_decl=1
16607 else
16608   ac_have_decl=0
16609 fi
16610
16611 cat >>confdefs.h <<_ACEOF
16612 #define HAVE_DECL__SNPRINTF $ac_have_decl
16613 _ACEOF
16614
16615
16616
16617   case "$gl_cv_func_snprintf_retval_c99" in
16618     *yes)
16619
16620 $as_echo "#define HAVE_SNPRINTF_RETVAL_C99 1" >>confdefs.h
16621
16622       ;;
16623   esac
16624
16625 ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
16626 if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
16627   ac_have_decl=1
16628 else
16629   ac_have_decl=0
16630 fi
16631
16632 cat >>confdefs.h <<_ACEOF
16633 #define HAVE_DECL_VSNPRINTF $ac_have_decl
16634 _ACEOF
16635
16636
16637
16638
16639
16640
16641    if false; then
16642   GL_COND_LIBTOOL_TRUE=
16643   GL_COND_LIBTOOL_FALSE='#'
16644 else
16645   GL_COND_LIBTOOL_TRUE='#'
16646   GL_COND_LIBTOOL_FALSE=
16647 fi
16648
16649   gl_cond_libtool=false
16650   gl_libdeps=
16651   gl_ltlibdeps=
16652   gl_m4_base='m4'
16653
16654
16655
16656
16657
16658
16659
16660
16661
16662   gl_source_base='gnu'
16663
16664
16665   if test $ac_cv_func_alloca_works = no; then
16666     :
16667   fi
16668
16669   # Define an additional variable used in the Makefile substitution.
16670   if test $ac_cv_working_alloca_h = yes; then
16671     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
16672 $as_echo_n "checking for alloca as a compiler built-in... " >&6; }
16673 if ${gl_cv_rpl_alloca+:} false; then :
16674   $as_echo_n "(cached) " >&6
16675 else
16676
16677       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16678 /* end confdefs.h.  */
16679
16680 #if defined __GNUC__ || defined _AIX || defined _MSC_VER
16681         Need own alloca
16682 #endif
16683
16684 _ACEOF
16685 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16686   $EGREP "Need own alloca" >/dev/null 2>&1; then :
16687   gl_cv_rpl_alloca=yes
16688 else
16689   gl_cv_rpl_alloca=no
16690 fi
16691 rm -f conftest*
16692
16693
16694 fi
16695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
16696 $as_echo "$gl_cv_rpl_alloca" >&6; }
16697     if test $gl_cv_rpl_alloca = yes; then
16698
16699 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
16700
16701       ALLOCA_H=alloca.h
16702     else
16703                   ALLOCA_H=
16704     fi
16705   else
16706     ALLOCA_H=alloca.h
16707   fi
16708
16709    if test -n "$ALLOCA_H"; then
16710   GL_GENERATE_ALLOCA_H_TRUE=
16711   GL_GENERATE_ALLOCA_H_FALSE='#'
16712 else
16713   GL_GENERATE_ALLOCA_H_TRUE='#'
16714   GL_GENERATE_ALLOCA_H_FALSE=
16715 fi
16716
16717
16718
16719
16720 cat >>confdefs.h <<_ACEOF
16721 #define GNULIB_AREADLINKAT 1
16722 _ACEOF
16723
16724
16725
16726
16727
16728
16729
16730   ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
16731 "
16732 if test "x$ac_cv_have_decl_program_invocation_name" = xyes; then :
16733   ac_have_decl=1
16734 else
16735   ac_have_decl=0
16736 fi
16737
16738 cat >>confdefs.h <<_ACEOF
16739 #define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl
16740 _ACEOF
16741 if test $ac_have_decl = 1; then :
16742
16743 else
16744
16745 $as_echo "#define GNULIB_PROGRAM_INVOCATION_NAME 1" >>confdefs.h
16746
16747 fi
16748
16749   ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
16750 "
16751 if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes; then :
16752   ac_have_decl=1
16753 else
16754   ac_have_decl=0
16755 fi
16756
16757 cat >>confdefs.h <<_ACEOF
16758 #define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl
16759 _ACEOF
16760 if test $ac_have_decl = 1; then :
16761
16762 else
16763
16764 $as_echo "#define GNULIB_PROGRAM_INVOCATION_SHORT_NAME 1" >>confdefs.h
16765
16766 fi
16767
16768
16769   # Check if program_invocation_name and program_invocation_short_name
16770   # are defined elsewhere. It is improbable that only one of them will
16771   # be defined and other not, I prefer to stay on the safe side and to
16772   # test each one separately.
16773   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether program_invocation_name is defined" >&5
16774 $as_echo_n "checking whether program_invocation_name is defined... " >&6; }
16775   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16776 /* end confdefs.h.  */
16777 #include <argp.h>
16778 int
16779 main ()
16780 {
16781 program_invocation_name = "test";
16782   ;
16783   return 0;
16784 }
16785 _ACEOF
16786 if ac_fn_c_try_link "$LINENO"; then :
16787
16788 $as_echo "#define HAVE_PROGRAM_INVOCATION_NAME 1" >>confdefs.h
16789
16790                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16791 $as_echo "yes" >&6; }
16792 else
16793   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16794 $as_echo "no" >&6; }
16795 fi
16796 rm -f core conftest.err conftest.$ac_objext \
16797     conftest$ac_exeext conftest.$ac_ext
16798
16799   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether program_invocation_short_name is defined" >&5
16800 $as_echo_n "checking whether program_invocation_short_name is defined... " >&6; }
16801   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16802 /* end confdefs.h.  */
16803 #include <argp.h>
16804 int
16805 main ()
16806 {
16807 program_invocation_short_name = "test";
16808   ;
16809   return 0;
16810 }
16811 _ACEOF
16812 if ac_fn_c_try_link "$LINENO"; then :
16813
16814 $as_echo "#define HAVE_PROGRAM_INVOCATION_SHORT_NAME 1" >>confdefs.h
16815
16816                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16817 $as_echo "yes" >&6; }
16818 else
16819   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16820 $as_echo "no" >&6; }
16821 fi
16822 rm -f core conftest.err conftest.$ac_objext \
16823     conftest$ac_exeext conftest.$ac_ext
16824
16825
16826
16827
16828
16829
16830
16831
16832
16833
16834
16835
16836
16837
16838
16839
16840
16841
16842
16843   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=argp_error:2:c-format"
16844
16845
16846
16847   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=argp_failure:4:c-format"
16848
16849
16850
16851
16852
16853
16854
16855
16856
16857   gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext"
16858
16859
16860
16861
16862
16863
16864
16865
16866
16867
16868
16869
16870   if test $ac_cv_func_btowc = no; then
16871     HAVE_BTOWC=0
16872   else
16873
16874
16875
16876
16877         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(0) is correct" >&5
16878 $as_echo_n "checking whether btowc(0) is correct... " >&6; }
16879 if ${gl_cv_func_btowc_nul+:} false; then :
16880   $as_echo_n "(cached) " >&6
16881 else
16882
16883         if test "$cross_compiling" = yes; then :
16884
16885            case "$host_os" in
16886                       # Guess no on Cygwin.
16887              cygwin*) gl_cv_func_btowc_nul="guessing no" ;;
16888                       # Guess yes otherwise.
16889              *)       gl_cv_func_btowc_nul="guessing yes" ;;
16890            esac
16891
16892 else
16893   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16894 /* end confdefs.h.  */
16895
16896 #include <string.h>
16897 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
16898    <wchar.h>.
16899    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
16900    included before <wchar.h>.  */
16901 #include <stddef.h>
16902 #include <stdio.h>
16903 #include <time.h>
16904 #include <wchar.h>
16905 int main ()
16906 {
16907   if (btowc ('\0') != 0)
16908     return 1;
16909   return 0;
16910 }
16911 _ACEOF
16912 if ac_fn_c_try_run "$LINENO"; then :
16913   gl_cv_func_btowc_nul=yes
16914 else
16915   gl_cv_func_btowc_nul=no
16916 fi
16917 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16918   conftest.$ac_objext conftest.beam conftest.$ac_ext
16919 fi
16920
16921
16922 fi
16923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_nul" >&5
16924 $as_echo "$gl_cv_func_btowc_nul" >&6; }
16925
16926         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(EOF) is correct" >&5
16927 $as_echo_n "checking whether btowc(EOF) is correct... " >&6; }
16928 if ${gl_cv_func_btowc_eof+:} false; then :
16929   $as_echo_n "(cached) " >&6
16930 else
16931
16932                         case "$host_os" in
16933                  # Guess no on IRIX.
16934           irix*) gl_cv_func_btowc_eof="guessing no" ;;
16935                  # Guess yes otherwise.
16936           *)     gl_cv_func_btowc_eof="guessing yes" ;;
16937         esac
16938         if test $LOCALE_FR != none; then
16939           if test "$cross_compiling" = yes; then :
16940   :
16941 else
16942   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16943 /* end confdefs.h.  */
16944
16945 #include <locale.h>
16946 #include <string.h>
16947 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
16948    <wchar.h>.
16949    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
16950    included before <wchar.h>.  */
16951 #include <stddef.h>
16952 #include <stdio.h>
16953 #include <time.h>
16954 #include <wchar.h>
16955 int main ()
16956 {
16957   if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
16958     {
16959       if (btowc (EOF) != WEOF)
16960         return 1;
16961     }
16962   return 0;
16963 }
16964 _ACEOF
16965 if ac_fn_c_try_run "$LINENO"; then :
16966   gl_cv_func_btowc_eof=yes
16967 else
16968   gl_cv_func_btowc_eof=no
16969 fi
16970 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16971   conftest.$ac_objext conftest.beam conftest.$ac_ext
16972 fi
16973
16974         fi
16975
16976 fi
16977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_eof" >&5
16978 $as_echo "$gl_cv_func_btowc_eof" >&6; }
16979
16980     case "$gl_cv_func_btowc_nul" in
16981       *yes) ;;
16982       *) REPLACE_BTOWC=1 ;;
16983     esac
16984     case "$gl_cv_func_btowc_eof" in
16985       *yes) ;;
16986       *) REPLACE_BTOWC=1 ;;
16987     esac
16988   fi
16989
16990   if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then
16991
16992
16993
16994
16995
16996
16997
16998
16999   gl_LIBOBJS="$gl_LIBOBJS btowc.$ac_objext"
17000
17001
17002   :
17003
17004   fi
17005
17006
17007
17008
17009
17010           GNULIB_BTOWC=1
17011
17012
17013
17014
17015
17016 $as_echo "#define GNULIB_TEST_BTOWC 1" >>confdefs.h
17017
17018
17019
17020
17021
17022
17023   if test $ac_cv_func_canonicalize_file_name = no; then
17024     HAVE_CANONICALIZE_FILE_NAME=0
17025     if test $ac_cv_func_realpath = no; then
17026       HAVE_REALPATH=0
17027     else
17028       case "$gl_cv_func_realpath_works" in
17029         *yes) ;;
17030         *)    REPLACE_REALPATH=1 ;;
17031       esac
17032     fi
17033   else
17034     case "$gl_cv_func_realpath_works" in
17035       *yes)
17036         ;;
17037       *)
17038         REPLACE_CANONICALIZE_FILE_NAME=1
17039         REPLACE_REALPATH=1
17040         ;;
17041     esac
17042   fi
17043
17044   if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then
17045
17046
17047
17048
17049
17050
17051
17052
17053   gl_LIBOBJS="$gl_LIBOBJS canonicalize-lgpl.$ac_objext"
17054
17055   fi
17056
17057
17058 cat >>confdefs.h <<_ACEOF
17059 #define GNULIB_CANONICALIZE_LGPL 1
17060 _ACEOF
17061
17062
17063
17064
17065
17066
17067
17068           GNULIB_CANONICALIZE_FILE_NAME=1
17069
17070
17071
17072
17073
17074 $as_echo "#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1" >>confdefs.h
17075
17076
17077
17078
17079
17080
17081
17082
17083           GNULIB_REALPATH=1
17084
17085
17086
17087
17088
17089 $as_echo "#define GNULIB_TEST_REALPATH 1" >>confdefs.h
17090
17091
17092
17093
17094
17095
17096
17097
17098
17099           GNULIB_CHDIR=1
17100
17101
17102
17103
17104
17105 $as_echo "#define GNULIB_TEST_CHDIR 1" >>confdefs.h
17106
17107
17108
17109
17110
17111   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether this system has an arbitrary file name length limit" >&5
17112 $as_echo_n "checking whether this system has an arbitrary file name length limit... " >&6; }
17113 if ${gl_cv_have_arbitrary_file_name_length_limit+:} false; then :
17114   $as_echo_n "(cached) " >&6
17115 else
17116   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17117 /* end confdefs.h.  */
17118
17119 /* Arrange to define PATH_MAX, like "pathmax.h" does. */
17120 #if HAVE_UNISTD_H
17121 # include <unistd.h>
17122 #endif
17123 #include <limits.h>
17124 #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
17125 # include <sys/param.h>
17126 #endif
17127 #if !defined PATH_MAX && defined MAXPATHLEN
17128 # define PATH_MAX MAXPATHLEN
17129 #endif
17130 #ifdef __hpux
17131 # undef PATH_MAX
17132 # define PATH_MAX 1024
17133 #endif
17134 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
17135 # undef PATH_MAX
17136 # define PATH_MAX 260
17137 #endif
17138
17139 #ifdef PATH_MAX
17140 have_arbitrary_file_name_length_limit
17141 #endif
17142 _ACEOF
17143 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17144   $EGREP "have_arbitrary_file_name_length_limit" >/dev/null 2>&1; then :
17145   gl_cv_have_arbitrary_file_name_length_limit=yes
17146 else
17147   gl_cv_have_arbitrary_file_name_length_limit=no
17148 fi
17149 rm -f conftest*
17150
17151 fi
17152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_arbitrary_file_name_length_limit" >&5
17153 $as_echo "$gl_cv_have_arbitrary_file_name_length_limit" >&6; }
17154
17155   if test $gl_cv_have_arbitrary_file_name_length_limit = yes; then
17156
17157
17158
17159
17160
17161
17162
17163
17164   gl_LIBOBJS="$gl_LIBOBJS chdir-long.$ac_objext"
17165
17166     :
17167   fi
17168
17169   if test $HAVE_CHOWN = 0 || test $REPLACE_CHOWN = 1; then
17170
17171
17172
17173
17174
17175
17176
17177
17178   gl_LIBOBJS="$gl_LIBOBJS chown.$ac_objext"
17179
17180   fi
17181   if test $REPLACE_CHOWN = 1 && test $ac_cv_func_fchown = no; then
17182
17183
17184
17185
17186
17187
17188
17189
17190   gl_LIBOBJS="$gl_LIBOBJS fchown-stub.$ac_objext"
17191
17192   fi
17193
17194
17195
17196
17197
17198           GNULIB_CHOWN=1
17199
17200
17201
17202
17203
17204 $as_echo "#define GNULIB_TEST_CHOWN 1" >>confdefs.h
17205
17206
17207
17208
17209
17210
17211   # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
17212   # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
17213
17214   # Save and restore LIBS so e.g., -lrt, isn't added to it.  Otherwise, *all*
17215   # programs in the package would end up linked with that potentially-shared
17216   # library, inducing unnecessary run-time overhead.
17217   LIB_CLOCK_GETTIME=
17218
17219   gl_saved_libs=$LIBS
17220     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
17221 $as_echo_n "checking for library containing clock_gettime... " >&6; }
17222 if ${ac_cv_search_clock_gettime+:} false; then :
17223   $as_echo_n "(cached) " >&6
17224 else
17225   ac_func_search_save_LIBS=$LIBS
17226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17227 /* end confdefs.h.  */
17228
17229 /* Override any GCC internal prototype to avoid an error.
17230    Use char because int might match the return type of a GCC
17231    builtin and then its argument prototype would still apply.  */
17232 #ifdef __cplusplus
17233 extern "C"
17234 #endif
17235 char clock_gettime ();
17236 int
17237 main ()
17238 {
17239 return clock_gettime ();
17240   ;
17241   return 0;
17242 }
17243 _ACEOF
17244 for ac_lib in '' rt posix4; do
17245   if test -z "$ac_lib"; then
17246     ac_res="none required"
17247   else
17248     ac_res=-l$ac_lib
17249     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17250   fi
17251   if ac_fn_c_try_link "$LINENO"; then :
17252   ac_cv_search_clock_gettime=$ac_res
17253 fi
17254 rm -f core conftest.err conftest.$ac_objext \
17255     conftest$ac_exeext
17256   if ${ac_cv_search_clock_gettime+:} false; then :
17257   break
17258 fi
17259 done
17260 if ${ac_cv_search_clock_gettime+:} false; then :
17261
17262 else
17263   ac_cv_search_clock_gettime=no
17264 fi
17265 rm conftest.$ac_ext
17266 LIBS=$ac_func_search_save_LIBS
17267 fi
17268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
17269 $as_echo "$ac_cv_search_clock_gettime" >&6; }
17270 ac_res=$ac_cv_search_clock_gettime
17271 if test "$ac_res" != no; then :
17272   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17273   test "$ac_cv_search_clock_gettime" = "none required" ||
17274                     LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime
17275 fi
17276
17277     for ac_func in clock_gettime clock_settime
17278 do :
17279   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17280 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17281 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17282   cat >>confdefs.h <<_ACEOF
17283 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17284 _ACEOF
17285
17286 fi
17287 done
17288
17289   LIBS=$gl_saved_libs
17290
17291
17292
17293 $as_echo "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h
17294
17295
17296
17297
17298
17299   if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
17300     REPLACE_CLOSE=1
17301   fi
17302
17303
17304
17305
17306
17307   if test $ac_cv_header_sys_socket_h != yes; then
17308                     for ac_header in winsock2.h
17309 do :
17310   ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
17311 if test "x$ac_cv_header_winsock2_h" = xyes; then :
17312   cat >>confdefs.h <<_ACEOF
17313 #define HAVE_WINSOCK2_H 1
17314 _ACEOF
17315
17316 fi
17317
17318 done
17319
17320   fi
17321   if test "$ac_cv_header_winsock2_h" = yes; then
17322     HAVE_WINSOCK2_H=1
17323     UNISTD_H_HAVE_WINSOCK2_H=1
17324     SYS_IOCTL_H_HAVE_WINSOCK2_H=1
17325   else
17326     HAVE_WINSOCK2_H=0
17327   fi
17328
17329
17330     if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
17331                         REPLACE_CLOSE=1
17332     fi
17333
17334
17335     if test $REPLACE_CLOSE = 0; then
17336
17337
17338
17339   if test $ac_cv_func_fchdir = no; then
17340     HAVE_FCHDIR=0
17341   fi
17342
17343       if test $HAVE_FCHDIR = 0; then
17344         REPLACE_CLOSE=1
17345       fi
17346     fi
17347
17348
17349   if test $REPLACE_CLOSE = 1; then
17350
17351
17352
17353
17354
17355
17356
17357
17358   gl_LIBOBJS="$gl_LIBOBJS close.$ac_objext"
17359
17360   fi
17361
17362
17363
17364
17365
17366           GNULIB_CLOSE=1
17367
17368
17369
17370
17371
17372 $as_echo "#define GNULIB_TEST_CLOSE 1" >>confdefs.h
17373
17374
17375
17376
17377   :
17378
17379
17380
17381 cat >>confdefs.h <<_ACEOF
17382 #define GNULIB_CLOSE_STREAM 1
17383 _ACEOF
17384
17385
17386
17387
17388
17389   for ac_func in closedir
17390 do :
17391   ac_fn_c_check_func "$LINENO" "closedir" "ac_cv_func_closedir"
17392 if test "x$ac_cv_func_closedir" = xyes; then :
17393   cat >>confdefs.h <<_ACEOF
17394 #define HAVE_CLOSEDIR 1
17395 _ACEOF
17396
17397 fi
17398 done
17399
17400   if test $ac_cv_func_closedir = no; then
17401     HAVE_CLOSEDIR=0
17402   fi
17403
17404
17405
17406
17407   if test $ac_cv_func_fchdir = no; then
17408     HAVE_FCHDIR=0
17409   fi
17410
17411     if test $HAVE_FCHDIR = 0; then
17412       if test $HAVE_CLOSEDIR = 1; then
17413         REPLACE_CLOSEDIR=1
17414       fi
17415     fi
17416
17417
17418   if test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1; then
17419
17420
17421
17422
17423
17424
17425
17426
17427   gl_LIBOBJS="$gl_LIBOBJS closedir.$ac_objext"
17428
17429   fi
17430
17431
17432
17433
17434
17435           GNULIB_CLOSEDIR=1
17436
17437
17438
17439
17440
17441 $as_echo "#define GNULIB_TEST_CLOSEDIR 1" >>confdefs.h
17442
17443
17444
17445
17446   :
17447
17448
17449           if test "x$datarootdir" = x; then
17450     datarootdir='${datadir}'
17451
17452   fi
17453     if test "x$docdir" = x; then
17454     docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
17455
17456   fi
17457     if test "x$htmldir" = x; then
17458     htmldir='${docdir}'
17459
17460   fi
17461   if test "x$dvidir" = x; then
17462     dvidir='${docdir}'
17463
17464   fi
17465   if test "x$pdfdir" = x; then
17466     pdfdir='${docdir}'
17467
17468   fi
17469   if test "x$psdir" = x; then
17470     psdir='${docdir}'
17471
17472   fi
17473   if test "x$lispdir" = x; then
17474     lispdir='${datarootdir}/emacs/site-lisp'
17475
17476   fi
17477   if test "x$localedir" = x; then
17478     localedir='${datarootdir}/locale'
17479
17480   fi
17481
17482       pkglibexecdir='${libexecdir}/${PACKAGE}'
17483
17484
17485       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_ino member in directory struct" >&5
17486 $as_echo_n "checking for d_ino member in directory struct... " >&6; }
17487 if ${gl_cv_struct_dirent_d_ino+:} false; then :
17488   $as_echo_n "(cached) " >&6
17489 else
17490   if test "$cross_compiling" = yes; then :
17491   case "$host_os" in
17492                            # Guess yes on glibc systems with Linux kernel.
17493               linux*-gnu*) gl_cv_struct_dirent_d_ino="guessing yes" ;;
17494                            # If we don't know, assume the worst.
17495               *)           gl_cv_struct_dirent_d_ino="guessing no" ;;
17496             esac
17497
17498 else
17499   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17500 /* end confdefs.h.  */
17501 #include <sys/types.h>
17502              #include <sys/stat.h>
17503              #include <dirent.h>
17504
17505 int
17506 main ()
17507 {
17508 DIR *dp = opendir (".");
17509              struct dirent *e;
17510              struct stat st;
17511              if (! dp)
17512                return 1;
17513              e = readdir (dp);
17514              if (! e)
17515                return 2;
17516              if (stat (e->d_name, &st) != 0)
17517                return 3;
17518              if (e->d_ino != st.st_ino)
17519                return 4;
17520              return 0;
17521
17522   ;
17523   return 0;
17524 }
17525 _ACEOF
17526 if ac_fn_c_try_run "$LINENO"; then :
17527   gl_cv_struct_dirent_d_ino=yes
17528 else
17529   gl_cv_struct_dirent_d_ino=no
17530 fi
17531 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17532   conftest.$ac_objext conftest.beam conftest.$ac_ext
17533 fi
17534
17535 fi
17536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_ino" >&5
17537 $as_echo "$gl_cv_struct_dirent_d_ino" >&6; }
17538    case "$gl_cv_struct_dirent_d_ino" in
17539      *yes)
17540
17541 $as_echo "#define D_INO_IN_DIRENT 1" >>confdefs.h
17542
17543        ;;
17544    esac
17545
17546
17547
17548
17549
17550
17551
17552
17553
17554
17555
17556
17557
17558
17559      if test $gl_cv_have_include_next = yes; then
17560        gl_cv_next_dirent_h='<'dirent.h'>'
17561      else
17562        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
17563 $as_echo_n "checking absolute name of <dirent.h>... " >&6; }
17564 if ${gl_cv_next_dirent_h+:} false; then :
17565   $as_echo_n "(cached) " >&6
17566 else
17567
17568              if test $ac_cv_header_dirent_h = yes; then
17569
17570
17571                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17572 /* end confdefs.h.  */
17573 #include <dirent.h>
17574
17575 _ACEOF
17576                                                                                                                         case "$host_os" in
17577                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
17578                  *)    gl_absname_cpp="$ac_cpp" ;;
17579                esac
17580
17581                case "$host_os" in
17582                  mingw*)
17583                                                                                                                                      gl_dirsep_regex='[/\\]'
17584                    ;;
17585                  *)
17586                    gl_dirsep_regex='\/'
17587                    ;;
17588                esac
17589                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17590
17591                gl_header_literal_regex=`echo 'dirent.h' \
17592                                         | sed -e "$gl_make_literal_regex_sed"`
17593                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17594                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17595                    s|^/[^/]|//&|
17596                    p
17597                    q
17598                  }'
17599                                                             gl_cv_next_dirent_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17600                       sed -n "$gl_absolute_header_sed"`'"'
17601           else
17602                gl_cv_next_dirent_h='<'dirent.h'>'
17603              fi
17604
17605
17606 fi
17607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
17608 $as_echo "$gl_cv_next_dirent_h" >&6; }
17609      fi
17610      NEXT_DIRENT_H=$gl_cv_next_dirent_h
17611
17612      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17613        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17614        gl_next_as_first_directive='<'dirent.h'>'
17615      else
17616        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17617        gl_next_as_first_directive=$gl_cv_next_dirent_h
17618      fi
17619      NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive
17620
17621
17622
17623
17624   if test $ac_cv_header_dirent_h = yes; then
17625     HAVE_DIRENT_H=1
17626   else
17627     HAVE_DIRENT_H=0
17628   fi
17629
17630
17631
17632     for gl_func in alphasort closedir dirfd fdopendir opendir readdir rewinddir scandir; do
17633     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
17634     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
17635 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
17636 if eval \${$as_gl_Symbol+:} false; then :
17637   $as_echo_n "(cached) " >&6
17638 else
17639   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17640 /* end confdefs.h.  */
17641 #include <dirent.h>
17642
17643 int
17644 main ()
17645 {
17646 #undef $gl_func
17647   (void) $gl_func;
17648   ;
17649   return 0;
17650 }
17651 _ACEOF
17652 if ac_fn_c_try_compile "$LINENO"; then :
17653   eval "$as_gl_Symbol=yes"
17654 else
17655   eval "$as_gl_Symbol=no"
17656 fi
17657 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17658 fi
17659 eval ac_res=\$$as_gl_Symbol
17660                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17661 $as_echo "$ac_res" >&6; }
17662     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
17663   cat >>confdefs.h <<_ACEOF
17664 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
17665 _ACEOF
17666
17667                      eval ac_cv_have_decl_$gl_func=yes
17668 fi
17669       done
17670
17671
17672
17673
17674
17675
17676
17677 cat >>confdefs.h <<_ACEOF
17678 #define GNULIB_DIRENT_SAFER 1
17679 _ACEOF
17680
17681
17682
17683
17684
17685
17686
17687   for ac_func in dirfd
17688 do :
17689   ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd"
17690 if test "x$ac_cv_func_dirfd" = xyes; then :
17691   cat >>confdefs.h <<_ACEOF
17692 #define HAVE_DIRFD 1
17693 _ACEOF
17694
17695 fi
17696 done
17697
17698   ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
17699       #include <dirent.h>
17700 "
17701 if test "x$ac_cv_have_decl_dirfd" = xyes; then :
17702   ac_have_decl=1
17703 else
17704   ac_have_decl=0
17705 fi
17706
17707 cat >>confdefs.h <<_ACEOF
17708 #define HAVE_DECL_DIRFD $ac_have_decl
17709 _ACEOF
17710
17711   if test $ac_cv_have_decl_dirfd = no; then
17712     HAVE_DECL_DIRFD=0
17713   fi
17714
17715   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dirfd is a macro" >&5
17716 $as_echo_n "checking whether dirfd is a macro... " >&6; }
17717 if ${gl_cv_func_dirfd_macro+:} false; then :
17718   $as_echo_n "(cached) " >&6
17719 else
17720   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17721 /* end confdefs.h.  */
17722
17723 #include <sys/types.h>
17724 #include <dirent.h>
17725 #ifdef dirfd
17726  dirent_header_defines_dirfd
17727 #endif
17728 _ACEOF
17729 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17730   $EGREP "dirent_header_defines_dirfd" >/dev/null 2>&1; then :
17731   gl_cv_func_dirfd_macro=yes
17732 else
17733   gl_cv_func_dirfd_macro=no
17734 fi
17735 rm -f conftest*
17736
17737 fi
17738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dirfd_macro" >&5
17739 $as_echo "$gl_cv_func_dirfd_macro" >&6; }
17740
17741   # Use the replacement only if we have no function or macro with that name.
17742   if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no; then
17743     if test $ac_cv_have_decl_dirfd = yes; then
17744       # If the system declares dirfd already, let's declare rpl_dirfd instead.
17745       REPLACE_DIRFD=1
17746     fi
17747   fi
17748
17749   if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no; then
17750
17751
17752
17753
17754
17755
17756
17757
17758   gl_LIBOBJS="$gl_LIBOBJS dirfd.$ac_objext"
17759
17760
17761   { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get the file descriptor associated with an open DIR*" >&5
17762 $as_echo_n "checking how to get the file descriptor associated with an open DIR*... " >&6; }
17763 if ${gl_cv_sys_dir_fd_member_name+:} false; then :
17764   $as_echo_n "(cached) " >&6
17765 else
17766
17767       dirfd_save_CFLAGS=$CFLAGS
17768       for ac_expr in d_fd dd_fd; do
17769
17770         CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr"
17771         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17772 /* end confdefs.h.  */
17773
17774            #include <sys/types.h>
17775            #include <dirent.h>
17776 int
17777 main ()
17778 {
17779 DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;
17780   ;
17781   return 0;
17782 }
17783 _ACEOF
17784 if ac_fn_c_try_compile "$LINENO"; then :
17785   dir_fd_found=yes
17786
17787 fi
17788 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17789         CFLAGS=$dirfd_save_CFLAGS
17790         test "$dir_fd_found" = yes && break
17791       done
17792       test "$dir_fd_found" = yes || ac_expr=no_such_member
17793
17794       gl_cv_sys_dir_fd_member_name=$ac_expr
17795
17796
17797 fi
17798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_dir_fd_member_name" >&5
17799 $as_echo "$gl_cv_sys_dir_fd_member_name" >&6; }
17800   if test $gl_cv_sys_dir_fd_member_name != no_such_member; then
17801
17802 cat >>confdefs.h <<_ACEOF
17803 #define DIR_FD_MEMBER_NAME $gl_cv_sys_dir_fd_member_name
17804 _ACEOF
17805
17806   fi
17807
17808
17809   fi
17810
17811
17812
17813
17814
17815           GNULIB_DIRFD=1
17816
17817
17818
17819
17820
17821 $as_echo "#define GNULIB_TEST_DIRFD 1" >>confdefs.h
17822
17823
17824
17825
17826
17827
17828
17829
17830 cat >>confdefs.h <<_ACEOF
17831 #define GNULIB_DIRNAME 1
17832 _ACEOF
17833
17834
17835
17836
17837
17838
17839
17840
17841   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
17842 $as_echo_n "checking whether // is distinct from /... " >&6; }
17843 if ${gl_cv_double_slash_root+:} false; then :
17844   $as_echo_n "(cached) " >&6
17845 else
17846    if test x"$cross_compiling" = xyes ; then
17847         # When cross-compiling, there is no way to tell whether // is special
17848         # short of a list of hosts.  However, the only known hosts to date
17849         # that have a distinct // are Apollo DomainOS (too old to port to),
17850         # Cygwin, and z/OS.  If anyone knows of another system for which // has
17851         # special semantics and is distinct from /, please report it to
17852         # <bug-gnulib@gnu.org>.
17853         case $host in
17854           *-cygwin | i370-ibm-openedition)
17855             gl_cv_double_slash_root=yes ;;
17856           *)
17857             # Be optimistic and assume that / and // are the same when we
17858             # don't know.
17859             gl_cv_double_slash_root='unknown, assuming no' ;;
17860         esac
17861       else
17862         set x `ls -di / // 2>/dev/null`
17863         if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
17864           gl_cv_double_slash_root=no
17865         else
17866           gl_cv_double_slash_root=yes
17867         fi
17868       fi
17869 fi
17870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
17871 $as_echo "$gl_cv_double_slash_root" >&6; }
17872   if test "$gl_cv_double_slash_root" = yes; then
17873
17874 $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
17875
17876   fi
17877
17878
17879
17880
17881   if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
17882     REPLACE_DUP=1
17883   fi
17884
17885
17886
17887
17888   if test $ac_cv_func_fchdir = no; then
17889     HAVE_FCHDIR=0
17890   fi
17891
17892     if test $HAVE_FCHDIR = 0; then
17893       REPLACE_DUP=1
17894     fi
17895
17896
17897   if test $REPLACE_DUP = 1; then
17898
17899
17900
17901
17902
17903
17904
17905
17906   gl_LIBOBJS="$gl_LIBOBJS dup.$ac_objext"
17907
17908     :
17909   fi
17910
17911
17912
17913
17914
17915           GNULIB_DUP=1
17916
17917
17918
17919
17920
17921 $as_echo "#define GNULIB_TEST_DUP 1" >>confdefs.h
17922
17923
17924
17925
17926
17927
17928
17929
17930 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
17931
17932
17933   if test $HAVE_DUP2 = 1; then
17934     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
17935 $as_echo_n "checking whether dup2 works... " >&6; }
17936 if ${gl_cv_func_dup2_works+:} false; then :
17937   $as_echo_n "(cached) " >&6
17938 else
17939   if test "$cross_compiling" = yes; then :
17940   case "$host_os" in
17941            mingw*) # on this platform, dup2 always returns 0 for success
17942              gl_cv_func_dup2_works="guessing no" ;;
17943            cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
17944              gl_cv_func_dup2_works="guessing no" ;;
17945            linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a
17946                    # closed fd may yield -EBADF instead of -1 / errno=EBADF.
17947              gl_cv_func_dup2_works="guessing no" ;;
17948            freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF.
17949              gl_cv_func_dup2_works="guessing no" ;;
17950            haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
17951              gl_cv_func_dup2_works="guessing no" ;;
17952            *) gl_cv_func_dup2_works="guessing yes" ;;
17953          esac
17954 else
17955   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17956 /* end confdefs.h.  */
17957
17958          #include <unistd.h>
17959 #include <fcntl.h>
17960 #include <errno.h>
17961 int
17962 main ()
17963 {
17964 int result = 0;
17965 #ifdef FD_CLOEXEC
17966             if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
17967               result |= 1;
17968 #endif
17969             if (dup2 (1, 1) == 0)
17970               result |= 2;
17971 #ifdef FD_CLOEXEC
17972             if (fcntl (1, F_GETFD) != FD_CLOEXEC)
17973               result |= 4;
17974 #endif
17975             close (0);
17976             if (dup2 (0, 0) != -1)
17977               result |= 8;
17978             /* Many gnulib modules require POSIX conformance of EBADF.  */
17979             if (dup2 (2, 1000000) == -1 && errno != EBADF)
17980               result |= 16;
17981             /* Flush out a cygwin core dump.  */
17982             if (dup2 (2, -1) != -1 || errno != EBADF)
17983               result |= 32;
17984             return result;
17985
17986   ;
17987   return 0;
17988 }
17989
17990 _ACEOF
17991 if ac_fn_c_try_run "$LINENO"; then :
17992   gl_cv_func_dup2_works=yes
17993 else
17994   gl_cv_func_dup2_works=no
17995 fi
17996 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17997   conftest.$ac_objext conftest.beam conftest.$ac_ext
17998 fi
17999
18000
18001 fi
18002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
18003 $as_echo "$gl_cv_func_dup2_works" >&6; }
18004     case "$gl_cv_func_dup2_works" in
18005       *yes) ;;
18006       *)
18007         REPLACE_DUP2=1
18008         ;;
18009     esac
18010   fi
18011
18012
18013
18014
18015   if test $ac_cv_func_fchdir = no; then
18016     HAVE_FCHDIR=0
18017   fi
18018
18019     if test $HAVE_FCHDIR = 0; then
18020       if test $HAVE_DUP2 = 1; then
18021         REPLACE_DUP2=1
18022       fi
18023     fi
18024
18025
18026   if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
18027
18028
18029
18030
18031
18032
18033
18034
18035   gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
18036
18037
18038   fi
18039
18040
18041
18042
18043
18044           GNULIB_DUP2=1
18045
18046
18047
18048
18049
18050 $as_echo "#define GNULIB_TEST_DUP2 1" >>confdefs.h
18051
18052
18053
18054
18055
18056
18057
18058
18059
18060           GNULIB_ENVIRON=1
18061
18062
18063
18064
18065
18066 $as_echo "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h
18067
18068
18069
18070
18071
18072       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
18073 $as_echo_n "checking for error_at_line... " >&6; }
18074 if ${ac_cv_lib_error_at_line+:} false; then :
18075   $as_echo_n "(cached) " >&6
18076 else
18077   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18078 /* end confdefs.h.  */
18079 #include <error.h>
18080 int
18081 main ()
18082 {
18083 error_at_line (0, 0, "", 0, "an error occurred");
18084   ;
18085   return 0;
18086 }
18087 _ACEOF
18088 if ac_fn_c_try_link "$LINENO"; then :
18089   ac_cv_lib_error_at_line=yes
18090 else
18091   ac_cv_lib_error_at_line=no
18092 fi
18093 rm -f core conftest.err conftest.$ac_objext \
18094     conftest$ac_exeext conftest.$ac_ext
18095 fi
18096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
18097 $as_echo "$ac_cv_lib_error_at_line" >&6; }
18098
18099   if test $ac_cv_lib_error_at_line = no; then
18100
18101
18102
18103
18104
18105
18106
18107
18108   gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext"
18109
18110
18111
18112   :
18113
18114   fi
18115
18116
18117   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error:3:c-format"
18118
18119
18120
18121   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error_at_line:5:c-format"
18122
18123
18124
18125
18126
18127
18128
18129   if test $ac_cv_have_decl_fchdir = no; then
18130     HAVE_DECL_FCHDIR=0
18131   fi
18132
18133
18134   if test $HAVE_FCHDIR = 0; then
18135
18136
18137
18138
18139
18140
18141
18142
18143   gl_LIBOBJS="$gl_LIBOBJS fchdir.$ac_objext"
18144
18145     :
18146
18147 $as_echo "#define REPLACE_FCHDIR 1" >>confdefs.h
18148
18149                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open can visit directories" >&5
18150 $as_echo_n "checking whether open can visit directories... " >&6; }
18151 if ${gl_cv_func_open_directory_works+:} false; then :
18152   $as_echo_n "(cached) " >&6
18153 else
18154   if test "$cross_compiling" = yes; then :
18155   case "$host_os" in
18156                    # Guess yes on glibc systems.
18157            *-gnu*) gl_cv_func_open_directory_works="guessing yes" ;;
18158                    # If we don't know, assume the worst.
18159            *)      gl_cv_func_open_directory_works="guessing no" ;;
18160          esac
18161
18162 else
18163   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18164 /* end confdefs.h.  */
18165 #include <fcntl.h>
18166
18167 int
18168 main ()
18169 {
18170 return open(".", O_RDONLY) < 0;
18171   ;
18172   return 0;
18173 }
18174 _ACEOF
18175 if ac_fn_c_try_run "$LINENO"; then :
18176   gl_cv_func_open_directory_works=yes
18177 else
18178   gl_cv_func_open_directory_works=no
18179 fi
18180 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18181   conftest.$ac_objext conftest.beam conftest.$ac_ext
18182 fi
18183
18184 fi
18185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_directory_works" >&5
18186 $as_echo "$gl_cv_func_open_directory_works" >&6; }
18187     case "$gl_cv_func_open_directory_works" in
18188       *yes) ;;
18189       *)
18190
18191 $as_echo "#define REPLACE_OPEN_DIRECTORY 1" >>confdefs.h
18192
18193         ;;
18194     esac
18195   fi
18196
18197
18198
18199
18200
18201
18202           GNULIB_FCHDIR=1
18203
18204
18205
18206
18207
18208 $as_echo "#define GNULIB_TEST_FCHDIR 1" >>confdefs.h
18209
18210
18211
18212
18213
18214
18215
18216   if test $ac_cv_func_fchmodat != yes; then
18217     HAVE_FCHMODAT=0
18218   fi
18219
18220   if test $HAVE_FCHMODAT = 0; then
18221
18222
18223
18224
18225
18226
18227
18228
18229   gl_LIBOBJS="$gl_LIBOBJS fchmodat.$ac_objext"
18230
18231   fi
18232
18233
18234 cat >>confdefs.h <<_ACEOF
18235 #define GNULIB_FCHMODAT 1
18236 _ACEOF
18237
18238
18239
18240
18241
18242
18243           GNULIB_FCHMODAT=1
18244
18245
18246
18247
18248
18249 $as_echo "#define GNULIB_TEST_FCHMODAT 1" >>confdefs.h
18250
18251
18252
18253
18254
18255
18256
18257   ac_fn_c_check_func "$LINENO" "fchownat" "ac_cv_func_fchownat"
18258 if test "x$ac_cv_func_fchownat" = xyes; then :
18259
18260
18261
18262   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fchownat works with AT_SYMLINK_NOFOLLOW" >&5
18263 $as_echo_n "checking whether fchownat works with AT_SYMLINK_NOFOLLOW... " >&6; }
18264 if ${gl_cv_func_fchownat_nofollow_works+:} false; then :
18265   $as_echo_n "(cached) " >&6
18266 else
18267
18268      gl_dangle=conftest.dangle
18269      # Remove any remnants of a previous test.
18270      rm -f $gl_dangle
18271      # Arrange for deletion of the temporary file this test creates.
18272      ac_clean_files="$ac_clean_files $gl_dangle"
18273      ln -s conftest.no-such $gl_dangle
18274      if test "$cross_compiling" = yes; then :
18275   gl_cv_func_fchownat_nofollow_works=no
18276 else
18277   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18278 /* end confdefs.h.  */
18279
18280 #include <fcntl.h>
18281 #include <unistd.h>
18282 #include <stdlib.h>
18283 #include <errno.h>
18284 #include <sys/types.h>
18285 int
18286 main ()
18287 {
18288   return (fchownat (AT_FDCWD, "$gl_dangle", -1, getgid (),
18289                     AT_SYMLINK_NOFOLLOW) != 0
18290           && errno == ENOENT);
18291 }
18292
18293 _ACEOF
18294 if ac_fn_c_try_run "$LINENO"; then :
18295   gl_cv_func_fchownat_nofollow_works=yes
18296 else
18297   gl_cv_func_fchownat_nofollow_works=no
18298 fi
18299 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18300   conftest.$ac_objext conftest.beam conftest.$ac_ext
18301 fi
18302
18303
18304 fi
18305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fchownat_nofollow_works" >&5
18306 $as_echo "$gl_cv_func_fchownat_nofollow_works" >&6; }
18307   if test $gl_cv_func_fchownat_nofollow_works = no; then :
18308   REPLACE_FCHOWNAT=1
18309
18310 $as_echo "#define FCHOWNAT_NOFOLLOW_BUG 1" >>confdefs.h
18311
18312
18313 fi
18314
18315
18316
18317
18318   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fchownat works with an empty file name" >&5
18319 $as_echo_n "checking whether fchownat works with an empty file name... " >&6; }
18320 if ${gl_cv_func_fchownat_empty_filename_works+:} false; then :
18321   $as_echo_n "(cached) " >&6
18322 else
18323   if test "$cross_compiling" = yes; then :
18324   gl_cv_func_fchownat_empty_filename_works="guessing no"
18325 else
18326   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18327 /* end confdefs.h.  */
18328 #include <unistd.h>
18329             #include <fcntl.h>
18330
18331 int
18332 main ()
18333 {
18334 int fd;
18335             int ret;
18336             if (mkdir ("conftestdir", 0700) < 0)
18337               return 2;
18338             fd = open ("conftestdir", O_RDONLY);
18339             if (fd < 0)
18340               return 3;
18341             ret = fchownat (fd, "", -1, -1, 0);
18342             close (fd);
18343             rmdir ("conftestdir");
18344             return ret == 0;
18345
18346   ;
18347   return 0;
18348 }
18349 _ACEOF
18350 if ac_fn_c_try_run "$LINENO"; then :
18351   gl_cv_func_fchownat_empty_filename_works=yes
18352 else
18353   gl_cv_func_fchownat_empty_filename_works=no
18354 fi
18355 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18356   conftest.$ac_objext conftest.beam conftest.$ac_ext
18357 fi
18358
18359
18360 fi
18361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fchownat_empty_filename_works" >&5
18362 $as_echo "$gl_cv_func_fchownat_empty_filename_works" >&6; }
18363   if test "$gl_cv_func_fchownat_empty_filename_works" != yes; then :
18364   REPLACE_FCHOWNAT=1
18365
18366 $as_echo "#define FCHOWNAT_EMPTY_FILENAME_BUG 1" >>confdefs.h
18367
18368
18369 fi
18370
18371      if test $REPLACE_CHOWN = 1; then
18372        REPLACE_FCHOWNAT=1
18373      fi
18374 else
18375   HAVE_FCHOWNAT=0
18376 fi
18377
18378
18379   if test $HAVE_FCHOWNAT = 0 || test $REPLACE_FCHOWNAT = 1; then
18380
18381
18382
18383
18384
18385
18386
18387
18388   gl_LIBOBJS="$gl_LIBOBJS fchownat.$ac_objext"
18389
18390   fi
18391
18392
18393 cat >>confdefs.h <<_ACEOF
18394 #define GNULIB_FCHOWNAT 1
18395 _ACEOF
18396
18397
18398
18399
18400
18401
18402           GNULIB_FCHOWNAT=1
18403
18404
18405
18406
18407
18408 $as_echo "#define GNULIB_TEST_FCHOWNAT 1" >>confdefs.h
18409
18410
18411
18412
18413
18414
18415
18416
18417   if test $ac_cv_func_fcntl = no; then
18418
18419
18420
18421   if test $ac_cv_func_fcntl = no; then
18422     HAVE_FCNTL=0
18423   else
18424     REPLACE_FCNTL=1
18425   fi
18426
18427   else
18428             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
18429 $as_echo_n "checking whether fcntl handles F_DUPFD correctly... " >&6; }
18430 if ${gl_cv_func_fcntl_f_dupfd_works+:} false; then :
18431   $as_echo_n "(cached) " >&6
18432 else
18433   if test "$cross_compiling" = yes; then :
18434   # Guess that it works on glibc systems
18435           case $host_os in #((
18436             *-gnu*) gl_cv_func_fcntl_f_dupfd_works="guessing yes";;
18437             *)      gl_cv_func_fcntl_f_dupfd_works="guessing no";;
18438           esac
18439 else
18440   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18441 /* end confdefs.h.  */
18442
18443 #include <fcntl.h>
18444 #include <errno.h>
18445
18446 int
18447 main ()
18448 {
18449 int result = 0;
18450       if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
18451       if (errno != EINVAL) result |= 2;
18452       return result;
18453
18454   ;
18455   return 0;
18456 }
18457 _ACEOF
18458 if ac_fn_c_try_run "$LINENO"; then :
18459   gl_cv_func_fcntl_f_dupfd_works=yes
18460 else
18461   gl_cv_func_fcntl_f_dupfd_works=no
18462 fi
18463 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18464   conftest.$ac_objext conftest.beam conftest.$ac_ext
18465 fi
18466
18467 fi
18468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
18469 $as_echo "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
18470     case $gl_cv_func_fcntl_f_dupfd_works in
18471       *yes) ;;
18472       *)
18473
18474
18475   if test $ac_cv_func_fcntl = no; then
18476     HAVE_FCNTL=0
18477   else
18478     REPLACE_FCNTL=1
18479   fi
18480
18481
18482 $as_echo "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
18483  ;;
18484     esac
18485
18486         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
18487 $as_echo_n "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
18488 if ${gl_cv_func_fcntl_f_dupfd_cloexec+:} false; then :
18489   $as_echo_n "(cached) " >&6
18490 else
18491   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18492 /* end confdefs.h.  */
18493
18494 #include <fcntl.h>
18495 #ifndef F_DUPFD_CLOEXEC
18496 choke me
18497 #endif
18498
18499 int
18500 main ()
18501 {
18502
18503   ;
18504   return 0;
18505 }
18506 _ACEOF
18507 if ac_fn_c_try_compile "$LINENO"; then :
18508   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18509 /* end confdefs.h.  */
18510
18511 #ifdef __linux__
18512 /* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
18513    it to support the semantics on older kernels that failed with EINVAL.  */
18514 choke me
18515 #endif
18516
18517 int
18518 main ()
18519 {
18520
18521   ;
18522   return 0;
18523 }
18524 _ACEOF
18525 if ac_fn_c_try_compile "$LINENO"; then :
18526   gl_cv_func_fcntl_f_dupfd_cloexec=yes
18527 else
18528   gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
18529 fi
18530 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18531 else
18532   gl_cv_func_fcntl_f_dupfd_cloexec=no
18533 fi
18534 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18535 fi
18536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
18537 $as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
18538     if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then
18539
18540
18541
18542   if test $ac_cv_func_fcntl = no; then
18543     HAVE_FCNTL=0
18544   else
18545     REPLACE_FCNTL=1
18546   fi
18547
18548           fi
18549   fi
18550
18551
18552
18553
18554   if test $ac_cv_func_fchdir = no; then
18555     HAVE_FCHDIR=0
18556   fi
18557
18558     if test $HAVE_FCHDIR = 0; then
18559
18560
18561
18562   if test $ac_cv_func_fcntl = no; then
18563     HAVE_FCNTL=0
18564   else
18565     REPLACE_FCNTL=1
18566   fi
18567
18568     fi
18569
18570
18571   if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
18572
18573
18574
18575
18576
18577
18578
18579
18580   gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
18581
18582   fi
18583
18584
18585
18586
18587
18588           GNULIB_FCNTL=1
18589
18590
18591
18592
18593
18594 $as_echo "#define GNULIB_TEST_FCNTL 1" >>confdefs.h
18595
18596
18597
18598
18599
18600
18601
18602
18603
18604
18605
18606
18607
18608
18609      if test $gl_cv_have_include_next = yes; then
18610        gl_cv_next_fcntl_h='<'fcntl.h'>'
18611      else
18612        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
18613 $as_echo_n "checking absolute name of <fcntl.h>... " >&6; }
18614 if ${gl_cv_next_fcntl_h+:} false; then :
18615   $as_echo_n "(cached) " >&6
18616 else
18617
18618                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18619 /* end confdefs.h.  */
18620 #include <fcntl.h>
18621
18622 _ACEOF
18623                                                                                                                         case "$host_os" in
18624                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
18625                  *)    gl_absname_cpp="$ac_cpp" ;;
18626                esac
18627
18628                case "$host_os" in
18629                  mingw*)
18630                                                                                                                                      gl_dirsep_regex='[/\\]'
18631                    ;;
18632                  *)
18633                    gl_dirsep_regex='\/'
18634                    ;;
18635                esac
18636                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18637
18638                gl_header_literal_regex=`echo 'fcntl.h' \
18639                                         | sed -e "$gl_make_literal_regex_sed"`
18640                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18641                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18642                    s|^/[^/]|//&|
18643                    p
18644                    q
18645                  }'
18646                                                             gl_cv_next_fcntl_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18647                       sed -n "$gl_absolute_header_sed"`'"'
18648
18649
18650 fi
18651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
18652 $as_echo "$gl_cv_next_fcntl_h" >&6; }
18653      fi
18654      NEXT_FCNTL_H=$gl_cv_next_fcntl_h
18655
18656      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18657        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18658        gl_next_as_first_directive='<'fcntl.h'>'
18659      else
18660        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18661        gl_next_as_first_directive=$gl_cv_next_fcntl_h
18662      fi
18663      NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
18664
18665
18666
18667
18668
18669
18670
18671
18672
18673
18674     for gl_func in fcntl openat; do
18675     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
18676     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
18677 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
18678 if eval \${$as_gl_Symbol+:} false; then :
18679   $as_echo_n "(cached) " >&6
18680 else
18681   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18682 /* end confdefs.h.  */
18683 #include <fcntl.h>
18684
18685 int
18686 main ()
18687 {
18688 #undef $gl_func
18689   (void) $gl_func;
18690   ;
18691   return 0;
18692 }
18693 _ACEOF
18694 if ac_fn_c_try_compile "$LINENO"; then :
18695   eval "$as_gl_Symbol=yes"
18696 else
18697   eval "$as_gl_Symbol=no"
18698 fi
18699 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18700 fi
18701 eval ac_res=\$$as_gl_Symbol
18702                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18703 $as_echo "$ac_res" >&6; }
18704     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
18705   cat >>confdefs.h <<_ACEOF
18706 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
18707 _ACEOF
18708
18709                      eval ac_cv_have_decl_$gl_func=yes
18710 fi
18711       done
18712
18713
18714
18715
18716
18717
18718
18719     ac_fn_c_check_decl "$LINENO" "fdopendir" "ac_cv_have_decl_fdopendir" "
18720 #include <dirent.h>
18721
18722 "
18723 if test "x$ac_cv_have_decl_fdopendir" = xyes; then :
18724   ac_have_decl=1
18725 else
18726   ac_have_decl=0
18727 fi
18728
18729 cat >>confdefs.h <<_ACEOF
18730 #define HAVE_DECL_FDOPENDIR $ac_have_decl
18731 _ACEOF
18732 if test $ac_have_decl = 1; then :
18733
18734 else
18735   HAVE_DECL_FDOPENDIR=0
18736 fi
18737
18738
18739   if test $ac_cv_func_fdopendir = no; then
18740     HAVE_FDOPENDIR=0
18741   else
18742     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fdopendir works" >&5
18743 $as_echo_n "checking whether fdopendir works... " >&6; }
18744 if ${gl_cv_func_fdopendir_works+:} false; then :
18745   $as_echo_n "(cached) " >&6
18746 else
18747   if test "$cross_compiling" = yes; then :
18748   case "$host_os" in
18749                     # Guess yes on glibc systems.
18750             *-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;;
18751                     # If we don't know, assume the worst.
18752             *)      gl_cv_func_fdopendir_works="guessing no" ;;
18753           esac
18754
18755 else
18756   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18757 /* end confdefs.h.  */
18758
18759 #include <dirent.h>
18760 #include <fcntl.h>
18761 #include <unistd.h>
18762 #if !HAVE_DECL_FDOPENDIR
18763 extern
18764 # ifdef __cplusplus
18765 "C"
18766 # endif
18767 DIR *fdopendir (int);
18768 #endif
18769
18770 int
18771 main ()
18772 {
18773 int result = 0;
18774      int fd = open ("conftest.c", O_RDONLY);
18775      if (fd < 0) result |= 1;
18776      if (fdopendir (fd)) result |= 2;
18777      if (close (fd)) result |= 4;
18778      return result;
18779   ;
18780   return 0;
18781 }
18782 _ACEOF
18783 if ac_fn_c_try_run "$LINENO"; then :
18784   gl_cv_func_fdopendir_works=yes
18785 else
18786   gl_cv_func_fdopendir_works=no
18787 fi
18788 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18789   conftest.$ac_objext conftest.beam conftest.$ac_ext
18790 fi
18791
18792 fi
18793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopendir_works" >&5
18794 $as_echo "$gl_cv_func_fdopendir_works" >&6; }
18795     case "$gl_cv_func_fdopendir_works" in
18796       *yes) ;;
18797       *)
18798         REPLACE_FDOPENDIR=1
18799         ;;
18800     esac
18801   fi
18802
18803   if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then
18804
18805
18806
18807
18808
18809
18810
18811
18812   gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext"
18813
18814   fi
18815
18816
18817
18818
18819
18820           GNULIB_FDOPENDIR=1
18821
18822
18823
18824
18825
18826 $as_echo "#define GNULIB_TEST_FDOPENDIR 1" >>confdefs.h
18827
18828
18829
18830
18831
18832 cat >>confdefs.h <<_ACEOF
18833 #define GNULIB_FDOPENDIR 1
18834 _ACEOF
18835
18836
18837
18838
18839 cat >>confdefs.h <<_ACEOF
18840 #define GNULIB_FDUTIMENSAT 1
18841 _ACEOF
18842
18843
18844
18845
18846     ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
18847 if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
18848
18849 cat >>confdefs.h <<_ACEOF
18850 #define HAVE_STRUCT_STAT_ST_BLOCKS 1
18851 _ACEOF
18852
18853
18854 $as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
18855
18856 else
18857   :
18858 fi
18859
18860
18861
18862
18863   if test $ac_cv_member_struct_stat_st_blocks = no; then
18864
18865
18866
18867
18868
18869
18870
18871
18872   gl_LIBOBJS="$gl_LIBOBJS fileblocks.$ac_objext"
18873
18874
18875
18876   :
18877
18878   fi
18879
18880
18881
18882
18883
18884
18885   FLOAT_H=
18886   REPLACE_FLOAT_LDBL=0
18887   case "$host_os" in
18888     aix* | beos* | openbsd* | mirbsd* | irix*)
18889       FLOAT_H=float.h
18890       ;;
18891     freebsd*)
18892       case "$host_cpu" in
18893         i[34567]86 )
18894           FLOAT_H=float.h
18895           ;;
18896         x86_64 )
18897           # On x86_64 systems, the C compiler may still be generating
18898           # 32-bit code.
18899           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18900 /* end confdefs.h.  */
18901 #if defined __LP64__ || defined __x86_64__ || defined __amd64__
18902              yes
18903              #endif
18904 _ACEOF
18905 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18906   $EGREP "yes" >/dev/null 2>&1; then :
18907
18908 else
18909   FLOAT_H=float.h
18910 fi
18911 rm -f conftest*
18912
18913           ;;
18914       esac
18915       ;;
18916     linux*)
18917       case "$host_cpu" in
18918         powerpc*)
18919           FLOAT_H=float.h
18920           ;;
18921       esac
18922       ;;
18923   esac
18924   case "$host_os" in
18925     aix* | freebsd* | linux*)
18926       if test -n "$FLOAT_H"; then
18927         REPLACE_FLOAT_LDBL=1
18928       fi
18929       ;;
18930   esac
18931
18932     REPLACE_ITOLD=0
18933   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5
18934 $as_echo_n "checking whether conversion from 'int' to 'long double' works... " >&6; }
18935 if ${gl_cv_func_itold_works+:} false; then :
18936   $as_echo_n "(cached) " >&6
18937 else
18938
18939       if test "$cross_compiling" = yes; then :
18940   case "$host" in
18941            sparc*-*-linux*)
18942              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18943 /* end confdefs.h.  */
18944 #if defined __LP64__ || defined __arch64__
18945                 yes
18946                 #endif
18947 _ACEOF
18948 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18949   $EGREP "yes" >/dev/null 2>&1; then :
18950   gl_cv_func_itold_works="guessing no"
18951 else
18952   gl_cv_func_itold_works="guessing yes"
18953 fi
18954 rm -f conftest*
18955
18956              ;;
18957            *) gl_cv_func_itold_works="guessing yes" ;;
18958          esac
18959
18960 else
18961   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18962 /* end confdefs.h.  */
18963
18964 int i = -1;
18965 volatile long double ld;
18966 int main ()
18967 {
18968   ld += i * 1.0L;
18969   if (ld > 0)
18970     return 1;
18971   return 0;
18972 }
18973 _ACEOF
18974 if ac_fn_c_try_run "$LINENO"; then :
18975   gl_cv_func_itold_works=yes
18976 else
18977   gl_cv_func_itold_works=no
18978 fi
18979 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18980   conftest.$ac_objext conftest.beam conftest.$ac_ext
18981 fi
18982
18983
18984 fi
18985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5
18986 $as_echo "$gl_cv_func_itold_works" >&6; }
18987   case "$gl_cv_func_itold_works" in
18988     *no)
18989       REPLACE_ITOLD=1
18990                   FLOAT_H=float.h
18991       ;;
18992   esac
18993
18994   if test -n "$FLOAT_H"; then
18995
18996
18997
18998
18999
19000
19001
19002
19003      if test $gl_cv_have_include_next = yes; then
19004        gl_cv_next_float_h='<'float.h'>'
19005      else
19006        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
19007 $as_echo_n "checking absolute name of <float.h>... " >&6; }
19008 if ${gl_cv_next_float_h+:} false; then :
19009   $as_echo_n "(cached) " >&6
19010 else
19011
19012                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19013 /* end confdefs.h.  */
19014 #include <float.h>
19015
19016 _ACEOF
19017                                                                                                                         case "$host_os" in
19018                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
19019                  *)    gl_absname_cpp="$ac_cpp" ;;
19020                esac
19021
19022                case "$host_os" in
19023                  mingw*)
19024                                                                                                                                      gl_dirsep_regex='[/\\]'
19025                    ;;
19026                  *)
19027                    gl_dirsep_regex='\/'
19028                    ;;
19029                esac
19030                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19031
19032                gl_header_literal_regex=`echo 'float.h' \
19033                                         | sed -e "$gl_make_literal_regex_sed"`
19034                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19035                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19036                    s|^/[^/]|//&|
19037                    p
19038                    q
19039                  }'
19040                                                             gl_cv_next_float_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19041                       sed -n "$gl_absolute_header_sed"`'"'
19042
19043
19044 fi
19045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
19046 $as_echo "$gl_cv_next_float_h" >&6; }
19047      fi
19048      NEXT_FLOAT_H=$gl_cv_next_float_h
19049
19050      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19051        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19052        gl_next_as_first_directive='<'float.h'>'
19053      else
19054        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19055        gl_next_as_first_directive=$gl_cv_next_float_h
19056      fi
19057      NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive
19058
19059
19060
19061
19062   fi
19063
19064    if test -n "$FLOAT_H"; then
19065   GL_GENERATE_FLOAT_H_TRUE=
19066   GL_GENERATE_FLOAT_H_FALSE='#'
19067 else
19068   GL_GENERATE_FLOAT_H_TRUE='#'
19069   GL_GENERATE_FLOAT_H_FALSE=
19070 fi
19071
19072
19073
19074   if test $REPLACE_FLOAT_LDBL = 1; then
19075
19076
19077
19078
19079
19080
19081
19082
19083   gl_LIBOBJS="$gl_LIBOBJS float.$ac_objext"
19084
19085   fi
19086   if test $REPLACE_ITOLD = 1; then
19087
19088
19089
19090
19091
19092
19093
19094
19095   gl_LIBOBJS="$gl_LIBOBJS itold.$ac_objext"
19096
19097   fi
19098
19099
19100
19101
19102
19103   FNMATCH_H=
19104   gl_fnmatch_required_lowercase=`
19105     echo $gl_fnmatch_required | LC_ALL=C tr '[A-Z]' '[a-z]'
19106   `
19107   gl_fnmatch_cache_var="gl_cv_func_fnmatch_${gl_fnmatch_required_lowercase}"
19108   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working $gl_fnmatch_required fnmatch" >&5
19109 $as_echo_n "checking for working $gl_fnmatch_required fnmatch... " >&6; }
19110 if eval \${$gl_fnmatch_cache_var+:} false; then :
19111   $as_echo_n "(cached) " >&6
19112 else
19113                            if test $gl_fnmatch_required = GNU; then
19114        gl_fnmatch_gnu_start=
19115        gl_fnmatch_gnu_end=
19116      else
19117        gl_fnmatch_gnu_start='#if 0'
19118        gl_fnmatch_gnu_end='#endif'
19119      fi
19120      if test "$cross_compiling" = yes; then :
19121   eval "$gl_fnmatch_cache_var=\"guessing no\""
19122 else
19123   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19124 /* end confdefs.h.  */
19125 #include <fnmatch.h>
19126             static int
19127             y (char const *pattern, char const *string, int flags)
19128             {
19129               return fnmatch (pattern, string, flags) == 0;
19130             }
19131             static int
19132             n (char const *pattern, char const *string, int flags)
19133             {
19134               return fnmatch (pattern, string, flags) == FNM_NOMATCH;
19135             }
19136
19137 int
19138 main ()
19139 {
19140 char const *Apat = 'A' < '\\\\' ? "[A-\\\\\\\\]" : "[\\\\\\\\-A]";
19141             char const *apat = 'a' < '\\\\' ? "[a-\\\\\\\\]" : "[\\\\\\\\-a]";
19142             static char const A_1[] = { 'A' - 1, 0 };
19143             static char const A01[] = { 'A' + 1, 0 };
19144             static char const a_1[] = { 'a' - 1, 0 };
19145             static char const a01[] = { 'a' + 1, 0 };
19146             static char const bs_1[] = { '\\\\' - 1, 0 };
19147             static char const bs01[] = { '\\\\' + 1, 0 };
19148             int result = 0;
19149             if (!n ("a*", "", 0))
19150               return 1;
19151             if (!y ("a*", "abc", 0))
19152               return 1;
19153             if (!y ("[/b", "[/b", 0)) /*"]]"*/ /* glibc Bugzilla bug 12378 */
19154               return 1;
19155             if (!n ("d*/*1", "d/s/1", FNM_PATHNAME))
19156               return 2;
19157             if (!y ("a\\\\bc", "abc", 0))
19158               return 3;
19159             if (!n ("a\\\\bc", "abc", FNM_NOESCAPE))
19160               return 3;
19161             if (!y ("*x", ".x", 0))
19162               return 4;
19163             if (!n ("*x", ".x", FNM_PERIOD))
19164               return 4;
19165             if (!y (Apat, "\\\\", 0))
19166               return 5;
19167             if (!y (Apat, "A", 0))
19168               return 5;
19169             if (!y (apat, "\\\\", 0))
19170               return 5;
19171             if (!y (apat, "a", 0))
19172               return 5;
19173             if (!(n (Apat, A_1, 0) == ('A' < '\\\\')))
19174               return 5;
19175             if (!(n (apat, a_1, 0) == ('a' < '\\\\')))
19176               return 5;
19177             if (!(y (Apat, A01, 0) == ('A' < '\\\\')))
19178               return 5;
19179             if (!(y (apat, a01, 0) == ('a' < '\\\\')))
19180               return 5;
19181             if (!(y (Apat, bs_1, 0) == ('A' < '\\\\')))
19182               return 5;
19183             if (!(y (apat, bs_1, 0) == ('a' < '\\\\')))
19184               return 5;
19185             if (!(n (Apat, bs01, 0) == ('A' < '\\\\')))
19186               return 5;
19187             if (!(n (apat, bs01, 0) == ('a' < '\\\\')))
19188               return 5;
19189             $gl_fnmatch_gnu_start
19190             if (!y ("xxXX", "xXxX", FNM_CASEFOLD))
19191               result |= 8;
19192             if (!y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH))
19193               result |= 16;
19194             if (!n ("d*/*1", "d/s/1", FNM_FILE_NAME))
19195               result |= 32;
19196             if (!y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR))
19197               result |= 64;
19198             if (!y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR))
19199               result |= 64;
19200             if (!y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR))
19201               result |= 64;
19202             $gl_fnmatch_gnu_end
19203             return result;
19204
19205   ;
19206   return 0;
19207 }
19208 _ACEOF
19209 if ac_fn_c_try_run "$LINENO"; then :
19210   eval "$gl_fnmatch_cache_var=yes"
19211 else
19212   eval "$gl_fnmatch_cache_var=no"
19213 fi
19214 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19215   conftest.$ac_objext conftest.beam conftest.$ac_ext
19216 fi
19217
19218
19219 fi
19220 eval ac_res=\$$gl_fnmatch_cache_var
19221                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
19222 $as_echo "$ac_res" >&6; }
19223   eval "gl_fnmatch_result=\"\$$gl_fnmatch_cache_var\""
19224   if test "$gl_fnmatch_result" = yes; then
19225             rm -f "$gl_source_base/fnmatch.h"
19226   else
19227     FNMATCH_H=fnmatch.h
19228   fi
19229
19230    if test -n "$FNMATCH_H"; then
19231   GL_GENERATE_FNMATCH_H_TRUE=
19232   GL_GENERATE_FNMATCH_H_FALSE='#'
19233 else
19234   GL_GENERATE_FNMATCH_H_TRUE='#'
19235   GL_GENERATE_FNMATCH_H_FALSE=
19236 fi
19237
19238
19239   if test -n "$FNMATCH_H"; then
19240
19241
19242
19243
19244
19245
19246
19247
19248   gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
19249
19250
19251
19252 cat >>confdefs.h <<_ACEOF
19253 #define fnmatch ${gl_fnmatch_required_lowercase}_fnmatch
19254 _ACEOF
19255
19256
19257   ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
19258 "
19259 if test "x$ac_cv_have_decl_isblank" = xyes; then :
19260   ac_have_decl=1
19261 else
19262   ac_have_decl=0
19263 fi
19264
19265 cat >>confdefs.h <<_ACEOF
19266 #define HAVE_DECL_ISBLANK $ac_have_decl
19267 _ACEOF
19268
19269
19270
19271
19272   fi
19273
19274
19275
19276
19277
19278   if test -n "$FNMATCH_H"; then
19279
19280
19281
19282
19283
19284
19285
19286
19287   gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
19288
19289
19290
19291 cat >>confdefs.h <<_ACEOF
19292 #define fnmatch ${gl_fnmatch_required_lowercase}_fnmatch
19293 _ACEOF
19294
19295
19296   ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
19297 "
19298 if test "x$ac_cv_have_decl_isblank" = xyes; then :
19299   ac_have_decl=1
19300 else
19301   ac_have_decl=0
19302 fi
19303
19304 cat >>confdefs.h <<_ACEOF
19305 #define HAVE_DECL_ISBLANK $ac_have_decl
19306 _ACEOF
19307
19308
19309
19310
19311   fi
19312
19313
19314
19315   fp_headers='
19316 #     include <stdio.h>
19317 #     if HAVE_STDIO_EXT_H
19318 #      include <stdio_ext.h>
19319 #     endif
19320 '
19321   ac_fn_c_check_decl "$LINENO" "__fpending" "ac_cv_have_decl___fpending" "$fp_headers
19322 "
19323 if test "x$ac_cv_have_decl___fpending" = xyes; then :
19324   ac_have_decl=1
19325 else
19326   ac_have_decl=0
19327 fi
19328
19329 cat >>confdefs.h <<_ACEOF
19330 #define HAVE_DECL___FPENDING $ac_have_decl
19331 _ACEOF
19332
19333
19334   if test $ac_cv_func___fpending = no; then
19335
19336
19337
19338
19339
19340
19341
19342
19343   gl_LIBOBJS="$gl_LIBOBJS fpending.$ac_objext"
19344
19345
19346   { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to determine the number of pending output bytes on a stream" >&5
19347 $as_echo_n "checking how to determine the number of pending output bytes on a stream... " >&6; }
19348 if ${ac_cv_sys_pending_output_n_bytes+:} false; then :
19349   $as_echo_n "(cached) " >&6
19350 else
19351
19352       for ac_expr in                                                    \
19353                                                                         \
19354           '# glibc2'                                                    \
19355           'fp->_IO_write_ptr - fp->_IO_write_base'                      \
19356                                                                         \
19357           '# traditional Unix'                                          \
19358           'fp->_ptr - fp->_base'                                        \
19359                                                                         \
19360           '# BSD'                                                       \
19361           'fp->_p - fp->_bf._base'                                      \
19362                                                                         \
19363           '# SCO, Unixware'                                             \
19364           '(fp->__ptr ? fp->__ptr - fp->__base : 0)'                    \
19365                                                                         \
19366           '# QNX'                                                       \
19367           '(fp->_Mode & 0x2000 /*_MWRITE*/ ? fp->_Next - fp->_Buf : 0)' \
19368                                                                         \
19369           '# old glibc?'                                                \
19370           'fp->__bufp - fp->__buffer'                                   \
19371                                                                         \
19372           '# old glibc iostream?'                                       \
19373           'fp->_pptr - fp->_pbase'                                      \
19374                                                                         \
19375           '# emx+gcc'                                                   \
19376           'fp->_ptr - fp->_buffer'                                      \
19377                                                                         \
19378           '# Minix'                                                     \
19379           'fp->_ptr - fp->_buf'                                         \
19380                                                                         \
19381           '# Plan9'                                                     \
19382           'fp->wp - fp->buf'                                            \
19383                                                                         \
19384           '# VMS'                                                       \
19385           '(*fp)->_ptr - (*fp)->_base'                                  \
19386                                                                         \
19387           '# e.g., DGUX R4.11; the info is not available'               \
19388           1                                                             \
19389           ; do
19390
19391         # Skip each embedded comment.
19392         case "$ac_expr" in '#'*) continue;; esac
19393
19394         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19395 /* end confdefs.h.  */
19396 #include <stdio.h>
19397 int
19398 main ()
19399 {
19400 FILE *fp = stdin; (void) ($ac_expr);
19401   ;
19402   return 0;
19403 }
19404 _ACEOF
19405 if ac_fn_c_try_compile "$LINENO"; then :
19406   fp_done=yes
19407
19408 fi
19409 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19410         test "$fp_done" = yes && break
19411       done
19412
19413       ac_cv_sys_pending_output_n_bytes=$ac_expr
19414
19415
19416 fi
19417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_pending_output_n_bytes" >&5
19418 $as_echo "$ac_cv_sys_pending_output_n_bytes" >&6; }
19419
19420 cat >>confdefs.h <<_ACEOF
19421 #define PENDING_OUTPUT_N_BYTES $ac_cv_sys_pending_output_n_bytes
19422 _ACEOF
19423
19424
19425   fi
19426
19427
19428
19429     if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then
19430     REPLACE_FSEEK=1
19431   fi
19432
19433   if test $REPLACE_FSEEK = 1; then
19434
19435
19436
19437
19438
19439
19440
19441
19442   gl_LIBOBJS="$gl_LIBOBJS fseek.$ac_objext"
19443
19444   fi
19445
19446
19447
19448
19449
19450           GNULIB_FSEEK=1
19451
19452
19453
19454
19455
19456 $as_echo "#define GNULIB_TEST_FSEEK 1" >>confdefs.h
19457
19458
19459
19460
19461
19462
19463
19464
19465
19466
19467
19468   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fseeko" >&5
19469 $as_echo_n "checking for fseeko... " >&6; }
19470 if ${gl_cv_func_fseeko+:} false; then :
19471   $as_echo_n "(cached) " >&6
19472 else
19473
19474       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19475 /* end confdefs.h.  */
19476 #include <stdio.h>
19477
19478 int
19479 main ()
19480 {
19481 fseeko (stdin, 0, 0);
19482   ;
19483   return 0;
19484 }
19485 _ACEOF
19486 if ac_fn_c_try_link "$LINENO"; then :
19487   gl_cv_func_fseeko=yes
19488 else
19489   gl_cv_func_fseeko=no
19490 fi
19491 rm -f core conftest.err conftest.$ac_objext \
19492     conftest$ac_exeext conftest.$ac_ext
19493
19494 fi
19495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fseeko" >&5
19496 $as_echo "$gl_cv_func_fseeko" >&6; }
19497
19498
19499   if test $ac_cv_have_decl_fseeko = no; then
19500     HAVE_DECL_FSEEKO=0
19501   fi
19502
19503   if test $gl_cv_func_fseeko = no; then
19504     HAVE_FSEEKO=0
19505   else
19506     if test $WINDOWS_64_BIT_OFF_T = 1; then
19507       REPLACE_FSEEKO=1
19508     fi
19509     if test $gl_cv_var_stdin_large_offset = no; then
19510       REPLACE_FSEEKO=1
19511     fi
19512
19513   fi
19514
19515   if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then
19516
19517
19518
19519
19520
19521
19522
19523
19524   gl_LIBOBJS="$gl_LIBOBJS fseeko.$ac_objext"
19525
19526
19527       for ac_func in _fseeki64
19528 do :
19529   ac_fn_c_check_func "$LINENO" "_fseeki64" "ac_cv_func__fseeki64"
19530 if test "x$ac_cv_func__fseeki64" = xyes; then :
19531   cat >>confdefs.h <<_ACEOF
19532 #define HAVE__FSEEKI64 1
19533 _ACEOF
19534
19535 fi
19536 done
19537
19538
19539   fi
19540
19541
19542
19543
19544
19545           GNULIB_FSEEKO=1
19546
19547
19548
19549
19550
19551 $as_echo "#define GNULIB_TEST_FSEEKO 1" >>confdefs.h
19552
19553
19554
19555
19556
19557
19558
19559   if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
19560     REPLACE_FSTAT=1
19561   fi
19562
19563
19564   if test $WINDOWS_64_BIT_ST_SIZE = 1; then
19565     REPLACE_FSTAT=1
19566   fi
19567
19568
19569
19570
19571
19572   if test $ac_cv_func_fchdir = no; then
19573     HAVE_FCHDIR=0
19574   fi
19575
19576     if test $HAVE_FCHDIR = 0; then
19577       case "$gl_cv_func_open_directory_works" in
19578         *yes) ;;
19579         *)
19580           REPLACE_FSTAT=1
19581           ;;
19582       esac
19583     fi
19584
19585
19586   if test $REPLACE_FSTAT = 1; then
19587
19588
19589
19590
19591
19592
19593
19594
19595   gl_LIBOBJS="$gl_LIBOBJS fstat.$ac_objext"
19596
19597     :
19598   fi
19599
19600
19601
19602
19603
19604           GNULIB_FSTAT=1
19605
19606
19607
19608
19609
19610 $as_echo "#define GNULIB_TEST_FSTAT 1" >>confdefs.h
19611
19612
19613
19614
19615
19616
19617
19618
19619
19620   if test $ac_cv_func_fstatat = no; then
19621     HAVE_FSTATAT=0
19622   else
19623             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fstatat (..., 0) works" >&5
19624 $as_echo_n "checking whether fstatat (..., 0) works... " >&6; }
19625 if ${gl_cv_func_fstatat_zero_flag+:} false; then :
19626   $as_echo_n "(cached) " >&6
19627 else
19628   if test "$cross_compiling" = yes; then :
19629   case "$host_os" in
19630             aix*) gl_cv_func_fstatat_zero_flag="guessing no";;
19631             *)    gl_cv_func_fstatat_zero_flag="guessing yes";;
19632           esac
19633
19634 else
19635   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19636 /* end confdefs.h.  */
19637
19638               #include <fcntl.h>
19639               #include <sys/stat.h>
19640               int
19641               main (void)
19642               {
19643                 struct stat a;
19644                 return fstatat (AT_FDCWD, ".", &a, 0) != 0;
19645               }
19646
19647 _ACEOF
19648 if ac_fn_c_try_run "$LINENO"; then :
19649   gl_cv_func_fstatat_zero_flag=yes
19650 else
19651   gl_cv_func_fstatat_zero_flag=no
19652 fi
19653 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19654   conftest.$ac_objext conftest.beam conftest.$ac_ext
19655 fi
19656
19657
19658 fi
19659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fstatat_zero_flag" >&5
19660 $as_echo "$gl_cv_func_fstatat_zero_flag" >&6; }
19661
19662     case $gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in
19663     *yes+*yes) ;;
19664     *) REPLACE_FSTATAT=1
19665        case $gl_cv_func_fstatat_zero_flag in
19666        *yes)
19667
19668 $as_echo "#define HAVE_WORKING_FSTATAT_ZERO_FLAG 1" >>confdefs.h
19669
19670          ;;
19671        esac
19672        ;;
19673     esac
19674   fi
19675
19676   if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
19677
19678
19679
19680
19681
19682
19683
19684
19685   gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext"
19686
19687   fi
19688
19689
19690
19691
19692
19693           GNULIB_FSTATAT=1
19694
19695
19696
19697
19698
19699 $as_echo "#define GNULIB_TEST_FSTATAT 1" >>confdefs.h
19700
19701
19702
19703
19704
19705
19706
19707   if test $ac_cv_func_futimens = no; then
19708     HAVE_FUTIMENS=0
19709   else
19710     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether futimens works" >&5
19711 $as_echo_n "checking whether futimens works... " >&6; }
19712 if ${gl_cv_func_futimens_works+:} false; then :
19713   $as_echo_n "(cached) " >&6
19714 else
19715   if test "$cross_compiling" = yes; then :
19716   gl_cv_func_futimens_works="guessing no"
19717 else
19718   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19719 /* end confdefs.h.  */
19720
19721 #include <fcntl.h>
19722 #include <sys/stat.h>
19723 #include <unistd.h>
19724 #include <errno.h>
19725
19726 int
19727 main ()
19728 {
19729 struct timespec ts[2] = { { 1, UTIME_OMIT }, { 1, UTIME_NOW } };
19730       int fd = creat ("conftest.file", 0600);
19731       struct stat st;
19732       if (fd < 0) return 1;
19733       errno = 0;
19734       if (futimens (AT_FDCWD, NULL) == 0) return 2;
19735       if (errno != EBADF) return 3;
19736       if (futimens (fd, ts)) return 4;
19737       sleep (1);
19738       ts[0].tv_nsec = UTIME_NOW;
19739       ts[1].tv_nsec = UTIME_OMIT;
19740       if (futimens (fd, ts)) return 5;
19741       if (fstat (fd, &st)) return 6;
19742       if (st.st_ctime < st.st_atime) return 7;
19743
19744   ;
19745   return 0;
19746 }
19747 _ACEOF
19748 if ac_fn_c_try_run "$LINENO"; then :
19749            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19750 /* end confdefs.h.  */
19751
19752 #ifdef __linux__
19753 /* The Linux kernel added futimens in 2.6.22, but has bugs with UTIME_OMIT
19754    in several file systems as recently as 2.6.32.  Always replace futimens
19755    to support older kernels.  */
19756 choke me
19757 #endif
19758
19759 int
19760 main ()
19761 {
19762
19763   ;
19764   return 0;
19765 }
19766 _ACEOF
19767 if ac_fn_c_try_compile "$LINENO"; then :
19768   gl_cv_func_futimens_works=yes
19769 else
19770   gl_cv_func_futimens_works="needs runtime check"
19771 fi
19772 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19773 else
19774   gl_cv_func_futimens_works=no
19775 fi
19776 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19777   conftest.$ac_objext conftest.beam conftest.$ac_ext
19778 fi
19779
19780       rm -f conftest.file
19781 fi
19782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_futimens_works" >&5
19783 $as_echo "$gl_cv_func_futimens_works" >&6; }
19784     if test "$gl_cv_func_futimens_works" != yes; then
19785       REPLACE_FUTIMENS=1
19786     fi
19787   fi
19788
19789   if test $HAVE_FUTIMENS = 0 || test $REPLACE_FUTIMENS = 1; then
19790
19791
19792
19793
19794
19795
19796
19797
19798   gl_LIBOBJS="$gl_LIBOBJS futimens.$ac_objext"
19799
19800   fi
19801
19802
19803
19804
19805
19806           GNULIB_FUTIMENS=1
19807
19808
19809
19810
19811
19812 $as_echo "#define GNULIB_TEST_FUTIMENS 1" >>confdefs.h
19813
19814
19815
19816
19817
19818
19819
19820
19821   gl_abort_bug=no
19822   case "$host_os" in
19823     mingw*)
19824       gl_cv_func_getcwd_path_max=yes
19825       ;;
19826     *)
19827
19828
19829
19830
19831
19832   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd handles long file names properly" >&5
19833 $as_echo_n "checking whether getcwd handles long file names properly... " >&6; }
19834 if ${gl_cv_func_getcwd_path_max+:} false; then :
19835   $as_echo_n "(cached) " >&6
19836 else
19837   # Arrange for deletion of the temporary directory this test creates.
19838      ac_clean_files="$ac_clean_files confdir3"
19839           if test "$cross_compiling" = yes; then :
19840   case "$host_os" in
19841        aix*) gl_cv_func_getcwd_path_max='no, it has the AIX bug';;
19842        *) gl_cv_func_getcwd_path_max=no;;
19843      esac
19844 else
19845   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19846 /* end confdefs.h.  */
19847
19848 #include <errno.h>
19849 #include <stdlib.h>
19850 #if HAVE_UNISTD_H
19851 # include <unistd.h>
19852 #else
19853 # include <direct.h>
19854 #endif
19855 #include <string.h>
19856 #include <limits.h>
19857 #include <sys/stat.h>
19858 #include <sys/types.h>
19859 #include <fcntl.h>
19860
19861
19862 /* Arrange to define PATH_MAX, like "pathmax.h" does. */
19863 #if HAVE_UNISTD_H
19864 # include <unistd.h>
19865 #endif
19866 #include <limits.h>
19867 #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
19868 # include <sys/param.h>
19869 #endif
19870 #if !defined PATH_MAX && defined MAXPATHLEN
19871 # define PATH_MAX MAXPATHLEN
19872 #endif
19873 #ifdef __hpux
19874 # undef PATH_MAX
19875 # define PATH_MAX 1024
19876 #endif
19877 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
19878 # undef PATH_MAX
19879 # define PATH_MAX 260
19880 #endif
19881
19882
19883 #ifndef AT_FDCWD
19884 # define AT_FDCWD 0
19885 #endif
19886 #ifdef ENAMETOOLONG
19887 # define is_ENAMETOOLONG(x) ((x) == ENAMETOOLONG)
19888 #else
19889 # define is_ENAMETOOLONG(x) 0
19890 #endif
19891
19892 /* Use the getcwd function, not any macro.  */
19893 #undef getcwd
19894
19895 /* Don't get link errors because mkdir is redefined to rpl_mkdir.  */
19896 #undef mkdir
19897
19898 #ifndef S_IRWXU
19899 # define S_IRWXU 0700
19900 #endif
19901
19902 /* The length of this name must be 8.  */
19903 #define DIR_NAME "confdir3"
19904 #define DIR_NAME_LEN 8
19905 #define DIR_NAME_SIZE (DIR_NAME_LEN + 1)
19906
19907 /* The length of "../".  */
19908 #define DOTDOTSLASH_LEN 3
19909
19910 /* Leftover bytes in the buffer, to work around library or OS bugs.  */
19911 #define BUF_SLOP 20
19912
19913 int
19914 main ()
19915 {
19916 #ifndef PATH_MAX
19917   /* The Hurd doesn't define this, so getcwd can't exhibit the bug --
19918      at least not on a local file system.  And if we were to start worrying
19919      about remote file systems, we'd have to enable the wrapper function
19920      all of the time, just to be safe.  That's not worth the cost.  */
19921   exit (0);
19922 #elif ((INT_MAX / (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1) \
19923         - DIR_NAME_SIZE - BUF_SLOP) \
19924        <= PATH_MAX)
19925   /* FIXME: Assuming there's a system for which this is true,
19926      this should be done in a compile test.  */
19927   exit (0);
19928 #else
19929   char buf[PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1)
19930            + DIR_NAME_SIZE + BUF_SLOP];
19931   char *cwd = getcwd (buf, PATH_MAX);
19932   size_t initial_cwd_len;
19933   size_t cwd_len;
19934   int fail = 0;
19935   size_t n_chdirs = 0;
19936
19937   if (cwd == NULL)
19938     exit (10);
19939
19940   cwd_len = initial_cwd_len = strlen (cwd);
19941
19942   while (1)
19943     {
19944       size_t dotdot_max = PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN);
19945       char *c = NULL;
19946
19947       cwd_len += DIR_NAME_SIZE;
19948       /* If mkdir or chdir fails, it could be that this system cannot create
19949          any file with an absolute name longer than PATH_MAX, such as cygwin.
19950          If so, leave fail as 0, because the current working directory can't
19951          be too long for getcwd if it can't even be created.  For other
19952          errors, be pessimistic and consider that as a failure, too.  */
19953       if (mkdir (DIR_NAME, S_IRWXU) < 0 || chdir (DIR_NAME) < 0)
19954         {
19955           if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
19956             fail = 20;
19957           break;
19958         }
19959
19960       if (PATH_MAX <= cwd_len && cwd_len < PATH_MAX + DIR_NAME_SIZE)
19961         {
19962           c = getcwd (buf, PATH_MAX);
19963           if (!c && errno == ENOENT)
19964             {
19965               fail = 11;
19966               break;
19967             }
19968           if (c)
19969             {
19970               fail = 31;
19971               break;
19972             }
19973           if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
19974             {
19975               fail = 21;
19976               break;
19977             }
19978         }
19979
19980       if (dotdot_max <= cwd_len - initial_cwd_len)
19981         {
19982           if (dotdot_max + DIR_NAME_SIZE < cwd_len - initial_cwd_len)
19983             break;
19984           c = getcwd (buf, cwd_len + 1);
19985           if (!c)
19986             {
19987               if (! (errno == ERANGE || errno == ENOENT
19988                      || is_ENAMETOOLONG (errno)))
19989                 {
19990                   fail = 22;
19991                   break;
19992                 }
19993               if (AT_FDCWD || errno == ERANGE || errno == ENOENT)
19994                 {
19995                   fail = 12;
19996                   break;
19997                 }
19998             }
19999         }
20000
20001       if (c && strlen (c) != cwd_len)
20002         {
20003           fail = 23;
20004           break;
20005         }
20006       ++n_chdirs;
20007     }
20008
20009   /* Leaving behind such a deep directory is not polite.
20010      So clean up here, right away, even though the driving
20011      shell script would also clean up.  */
20012   {
20013     size_t i;
20014
20015     /* Try rmdir first, in case the chdir failed.  */
20016     rmdir (DIR_NAME);
20017     for (i = 0; i <= n_chdirs; i++)
20018       {
20019         if (chdir ("..") < 0)
20020           break;
20021         if (rmdir (DIR_NAME) != 0)
20022           break;
20023       }
20024   }
20025
20026   exit (fail);
20027 #endif
20028 }
20029
20030 _ACEOF
20031 if ac_fn_c_try_run "$LINENO"; then :
20032   gl_cv_func_getcwd_path_max=yes
20033 else
20034   case $? in
20035      10|11|12) gl_cv_func_getcwd_path_max='no, but it is partly working';;
20036      31) gl_cv_func_getcwd_path_max='no, it has the AIX bug';;
20037      *) gl_cv_func_getcwd_path_max=no;;
20038      esac
20039 fi
20040 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20041   conftest.$ac_objext conftest.beam conftest.$ac_ext
20042 fi
20043
20044
20045 fi
20046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_path_max" >&5
20047 $as_echo "$gl_cv_func_getcwd_path_max" >&6; }
20048
20049       case "$gl_cv_func_getcwd_null" in
20050         *yes)
20051
20052
20053
20054
20055   for ac_func in getpagesize
20056 do :
20057   ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
20058 if test "x$ac_cv_func_getpagesize" = xyes; then :
20059   cat >>confdefs.h <<_ACEOF
20060 #define HAVE_GETPAGESIZE 1
20061 _ACEOF
20062
20063 fi
20064 done
20065
20066   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd aborts when 4k < cwd_length < 16k" >&5
20067 $as_echo_n "checking whether getcwd aborts when 4k < cwd_length < 16k... " >&6; }
20068 if ${gl_cv_func_getcwd_abort_bug+:} false; then :
20069   $as_echo_n "(cached) " >&6
20070 else
20071   # Remove any remnants of a previous test.
20072      rm -rf confdir-14B---
20073      # Arrange for deletion of the temporary directory this test creates.
20074      ac_clean_files="$ac_clean_files confdir-14B---"
20075           if test "$cross_compiling" = yes; then :
20076   gl_cv_func_getcwd_abort_bug=yes
20077 else
20078   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20079 /* end confdefs.h.  */
20080
20081 #include <stdlib.h>
20082 #if HAVE_UNISTD_H
20083 # include <unistd.h>
20084 #else /* on Windows with MSVC */
20085 # include <direct.h>
20086 #endif
20087 #include <string.h>
20088 #include <sys/stat.h>
20089
20090
20091 /* Arrange to define PATH_MAX, like "pathmax.h" does. */
20092 #if HAVE_UNISTD_H
20093 # include <unistd.h>
20094 #endif
20095 #include <limits.h>
20096 #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
20097 # include <sys/param.h>
20098 #endif
20099 #if !defined PATH_MAX && defined MAXPATHLEN
20100 # define PATH_MAX MAXPATHLEN
20101 #endif
20102 #ifdef __hpux
20103 # undef PATH_MAX
20104 # define PATH_MAX 1024
20105 #endif
20106 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
20107 # undef PATH_MAX
20108 # define PATH_MAX 260
20109 #endif
20110
20111
20112 /* Don't get link errors because mkdir is redefined to rpl_mkdir.  */
20113 #undef mkdir
20114
20115 #ifndef S_IRWXU
20116 # define S_IRWXU 0700
20117 #endif
20118
20119 /* FIXME: skip the run-test altogether on systems without getpagesize.  */
20120 #if ! HAVE_GETPAGESIZE
20121 # define getpagesize() 0
20122 #endif
20123
20124 /* This size is chosen to be larger than PATH_MAX (4k), yet smaller than
20125    the 16kB pagesize on ia64 linux.  Those conditions make the code below
20126    trigger a bug in glibc's getcwd implementation before 2.4.90-10.  */
20127 #define TARGET_LEN (5 * 1024)
20128
20129 int
20130 main ()
20131 {
20132   char *cwd;
20133   size_t initial_cwd_len;
20134   int fail = 0;
20135
20136   /* The bug is triggered when PATH_MAX < getpagesize (), so skip
20137      this relatively expensive and invasive test if that's not true.  */
20138 #ifdef PATH_MAX
20139   int bug_possible = PATH_MAX < getpagesize ();
20140 #else
20141   int bug_possible = 0;
20142 #endif
20143   if (! bug_possible)
20144     return 0;
20145
20146   cwd = getcwd (NULL, 0);
20147   if (cwd == NULL)
20148     return 2;
20149
20150   initial_cwd_len = strlen (cwd);
20151   free (cwd);
20152
20153   if (1)
20154     {
20155       static char const dir_name[] = "confdir-14B---";
20156       size_t desired_depth = ((TARGET_LEN - 1 - initial_cwd_len)
20157                               / sizeof dir_name);
20158       size_t d;
20159       for (d = 0; d < desired_depth; d++)
20160         {
20161           if (mkdir (dir_name, S_IRWXU) < 0 || chdir (dir_name) < 0)
20162             {
20163               if (! (errno == ERANGE || errno == ENAMETOOLONG
20164                      || errno == ENOENT))
20165                 fail = 3; /* Unable to construct deep hierarchy.  */
20166               break;
20167             }
20168         }
20169
20170       /* If libc has the bug in question, this invocation of getcwd
20171          results in a failed assertion.  */
20172       cwd = getcwd (NULL, 0);
20173       if (cwd == NULL)
20174         fail = 4; /* getcwd didn't assert, but it failed for a long name
20175                      where the answer could have been learned.  */
20176       free (cwd);
20177
20178       /* Call rmdir first, in case the above chdir failed.  */
20179       rmdir (dir_name);
20180       while (0 < d--)
20181         {
20182           if (chdir ("..") < 0)
20183             {
20184               fail = 5;
20185               break;
20186             }
20187           rmdir (dir_name);
20188         }
20189     }
20190
20191   return fail;
20192 }
20193
20194 _ACEOF
20195 if ac_fn_c_try_run "$LINENO"; then :
20196   gl_cv_func_getcwd_abort_bug=no
20197 else
20198                                 ret=$?
20199      if test $ret -ge 128 || test $ret = 4; then
20200        gl_cv_func_getcwd_abort_bug=yes
20201      else
20202        gl_cv_func_getcwd_abort_bug=no
20203      fi
20204 fi
20205 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20206   conftest.$ac_objext conftest.beam conftest.$ac_ext
20207 fi
20208
20209
20210 fi
20211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_abort_bug" >&5
20212 $as_echo "$gl_cv_func_getcwd_abort_bug" >&6; }
20213   if test $gl_cv_func_getcwd_abort_bug = yes; then :
20214   gl_abort_bug=yes
20215 fi
20216
20217           ;;
20218       esac
20219       ;;
20220   esac
20221       case "$gl_cv_func_getcwd_path_max" in
20222     "no"|"no, it has the AIX bug") ;;
20223     *)
20224
20225 $as_echo "#define HAVE_MINIMALLY_WORKING_GETCWD 1" >>confdefs.h
20226
20227       ;;
20228   esac
20229   case "$gl_cv_func_getcwd_path_max" in
20230     "no, but it is partly working")
20231
20232 $as_echo "#define HAVE_PARTLY_WORKING_GETCWD 1" >>confdefs.h
20233
20234       ;;
20235   esac
20236
20237   if { case "$gl_cv_func_getcwd_null" in *yes) false;; *) true;; esac; } \
20238      || test $gl_cv_func_getcwd_posix_signature != yes \
20239      || test "$gl_cv_func_getcwd_path_max" != yes \
20240      || test $gl_abort_bug = yes; then
20241     REPLACE_GETCWD=1
20242   fi
20243
20244   if test $REPLACE_GETCWD = 1; then
20245
20246
20247
20248
20249
20250
20251
20252
20253   gl_LIBOBJS="$gl_LIBOBJS getcwd.$ac_objext"
20254
20255
20256
20257
20258   :
20259
20260   fi
20261
20262
20263 cat >>confdefs.h <<_ACEOF
20264 #define GNULIB_GETCWD 1
20265 _ACEOF
20266
20267
20268
20269
20270
20271
20272
20273           GNULIB_GETCWD=1
20274
20275
20276
20277
20278
20279 $as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
20280
20281
20282
20283
20284
20285
20286
20287
20288   case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_posix_signature in
20289   *yes,yes) ;;
20290   *)
20291         REPLACE_GETCWD=1
20292     ;;
20293   esac
20294
20295   if test $REPLACE_GETCWD = 1; then
20296
20297
20298
20299
20300
20301
20302
20303
20304   gl_LIBOBJS="$gl_LIBOBJS getcwd-lgpl.$ac_objext"
20305
20306   fi
20307
20308
20309
20310
20311
20312           GNULIB_GETCWD=1
20313
20314
20315
20316
20317
20318 $as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
20319
20320
20321
20322
20323
20324
20325
20326
20327
20328
20329
20330   if test $ac_cv_func_getdelim = yes; then
20331     HAVE_GETDELIM=1
20332         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getdelim function" >&5
20333 $as_echo_n "checking for working getdelim function... " >&6; }
20334 if ${gl_cv_func_working_getdelim+:} false; then :
20335   $as_echo_n "(cached) " >&6
20336 else
20337   echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data
20338     if test "$cross_compiling" = yes; then :
20339         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20340 /* end confdefs.h.  */
20341
20342 #include <features.h>
20343 #ifdef __GNU_LIBRARY__
20344  #if (__GLIBC__ >= 2) && !defined __UCLIBC__
20345   Lucky GNU user
20346  #endif
20347 #endif
20348
20349 _ACEOF
20350 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20351   $EGREP "Lucky GNU user" >/dev/null 2>&1; then :
20352   gl_cv_func_working_getdelim="guessing yes"
20353 else
20354   gl_cv_func_working_getdelim="guessing no"
20355 fi
20356 rm -f conftest*
20357
20358
20359 else
20360   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20361 /* end confdefs.h.  */
20362
20363 #    include <stdio.h>
20364 #    include <stdlib.h>
20365 #    include <string.h>
20366     int main ()
20367     {
20368       FILE *in = fopen ("./conftest.data", "r");
20369       if (!in)
20370         return 1;
20371       {
20372         /* Test result for a NULL buffer and a zero size.
20373            Based on a test program from Karl Heuer.  */
20374         char *line = NULL;
20375         size_t siz = 0;
20376         int len = getdelim (&line, &siz, '\n', in);
20377         if (!(len == 4 && line && strcmp (line, "foo\n") == 0))
20378           return 2;
20379       }
20380       {
20381         /* Test result for a NULL buffer and a non-zero size.
20382            This crashes on FreeBSD 8.0.  */
20383         char *line = NULL;
20384         size_t siz = (size_t)(~0) / 4;
20385         if (getdelim (&line, &siz, '\n', in) == -1)
20386           return 3;
20387       }
20388       return 0;
20389     }
20390
20391 _ACEOF
20392 if ac_fn_c_try_run "$LINENO"; then :
20393   gl_cv_func_working_getdelim=yes
20394 else
20395   gl_cv_func_working_getdelim=no
20396 fi
20397 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20398   conftest.$ac_objext conftest.beam conftest.$ac_ext
20399 fi
20400
20401 fi
20402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_getdelim" >&5
20403 $as_echo "$gl_cv_func_working_getdelim" >&6; }
20404     case "$gl_cv_func_working_getdelim" in
20405       *no)
20406         REPLACE_GETDELIM=1
20407         ;;
20408     esac
20409   else
20410     HAVE_GETDELIM=0
20411   fi
20412
20413   if test $ac_cv_have_decl_getdelim = no; then
20414     HAVE_DECL_GETDELIM=0
20415   fi
20416
20417   if test $HAVE_GETDELIM = 0 || test $REPLACE_GETDELIM = 1; then
20418
20419
20420
20421
20422
20423
20424
20425
20426   gl_LIBOBJS="$gl_LIBOBJS getdelim.$ac_objext"
20427
20428
20429   for ac_func in flockfile funlockfile
20430 do :
20431   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
20432 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
20433 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
20434   cat >>confdefs.h <<_ACEOF
20435 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
20436 _ACEOF
20437
20438 fi
20439 done
20440
20441   ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
20442 if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then :
20443   ac_have_decl=1
20444 else
20445   ac_have_decl=0
20446 fi
20447
20448 cat >>confdefs.h <<_ACEOF
20449 #define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
20450 _ACEOF
20451
20452
20453   fi
20454
20455
20456
20457
20458
20459           GNULIB_GETDELIM=1
20460
20461
20462
20463
20464
20465 $as_echo "#define GNULIB_TEST_GETDELIM 1" >>confdefs.h
20466
20467
20468
20469
20470
20471
20472   if test $ac_cv_func_getdtablesize != yes; then
20473     HAVE_GETDTABLESIZE=0
20474   fi
20475
20476   if test $HAVE_GETDTABLESIZE = 0; then
20477
20478
20479
20480
20481
20482
20483
20484
20485   gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext"
20486
20487     :
20488   fi
20489
20490
20491
20492
20493
20494           GNULIB_GETDTABLESIZE=1
20495
20496
20497
20498
20499
20500 $as_echo "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h
20501
20502
20503
20504
20505
20506
20507
20508
20509
20510
20511   gl_getline_needs_run_time_check=no
20512   ac_fn_c_check_func "$LINENO" "getline" "ac_cv_func_getline"
20513 if test "x$ac_cv_func_getline" = xyes; then :
20514                    gl_getline_needs_run_time_check=yes
20515 else
20516   am_cv_func_working_getline=no
20517 fi
20518
20519   if test $gl_getline_needs_run_time_check = yes; then
20520     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getline function" >&5
20521 $as_echo_n "checking for working getline function... " >&6; }
20522 if ${am_cv_func_working_getline+:} false; then :
20523   $as_echo_n "(cached) " >&6
20524 else
20525   echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data
20526     if test "$cross_compiling" = yes; then :
20527         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20528 /* end confdefs.h.  */
20529
20530 #include <features.h>
20531 #ifdef __GNU_LIBRARY__
20532  #if (__GLIBC__ >= 2) && !defined __UCLIBC__
20533   Lucky GNU user
20534  #endif
20535 #endif
20536
20537 _ACEOF
20538 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20539   $EGREP "Lucky GNU user" >/dev/null 2>&1; then :
20540   am_cv_func_working_getline="guessing yes"
20541 else
20542   am_cv_func_working_getline="guessing no"
20543 fi
20544 rm -f conftest*
20545
20546
20547 else
20548   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20549 /* end confdefs.h.  */
20550
20551 #    include <stdio.h>
20552 #    include <stdlib.h>
20553 #    include <string.h>
20554     int main ()
20555     {
20556       FILE *in = fopen ("./conftest.data", "r");
20557       if (!in)
20558         return 1;
20559       {
20560         /* Test result for a NULL buffer and a zero size.
20561            Based on a test program from Karl Heuer.  */
20562         char *line = NULL;
20563         size_t siz = 0;
20564         int len = getline (&line, &siz, in);
20565         if (!(len == 4 && line && strcmp (line, "foo\n") == 0))
20566           return 2;
20567       }
20568       {
20569         /* Test result for a NULL buffer and a non-zero size.
20570            This crashes on FreeBSD 8.0.  */
20571         char *line = NULL;
20572         size_t siz = (size_t)(~0) / 4;
20573         if (getline (&line, &siz, in) == -1)
20574           return 3;
20575       }
20576       return 0;
20577     }
20578
20579 _ACEOF
20580 if ac_fn_c_try_run "$LINENO"; then :
20581   am_cv_func_working_getline=yes
20582 else
20583   am_cv_func_working_getline=no
20584 fi
20585 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20586   conftest.$ac_objext conftest.beam conftest.$ac_ext
20587 fi
20588
20589 fi
20590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_working_getline" >&5
20591 $as_echo "$am_cv_func_working_getline" >&6; }
20592   fi
20593
20594   if test $ac_cv_have_decl_getline = no; then
20595     HAVE_DECL_GETLINE=0
20596   fi
20597
20598   case "$am_cv_func_working_getline" in
20599     *no)
20600                         REPLACE_GETLINE=1
20601       ;;
20602   esac
20603
20604   if test $REPLACE_GETLINE = 1; then
20605
20606
20607
20608
20609
20610
20611
20612
20613   gl_LIBOBJS="$gl_LIBOBJS getline.$ac_objext"
20614
20615
20616   :
20617
20618   fi
20619
20620
20621
20622
20623
20624           GNULIB_GETLINE=1
20625
20626
20627
20628
20629
20630 $as_echo "#define GNULIB_TEST_GETLINE 1" >>confdefs.h
20631
20632
20633
20634
20635
20636
20637
20638
20639   if test $REPLACE_GETOPT = 1; then
20640
20641
20642
20643
20644
20645
20646
20647
20648   gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
20649
20650
20651
20652
20653
20654
20655
20656
20657
20658   gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
20659
20660
20661
20662
20663         GNULIB_GL_UNISTD_H_GETOPT=1
20664   fi
20665
20666
20667
20668 $as_echo "#define GNULIB_TEST_GETOPT_GNU 1" >>confdefs.h
20669
20670
20671
20672
20673
20674
20675
20676     REPLACE_GETOPT=1
20677
20678   if test $REPLACE_GETOPT = 1; then
20679
20680   GETOPT_H=getopt.h
20681
20682 $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
20683
20684
20685
20686   fi
20687
20688   if test $REPLACE_GETOPT = 1; then
20689
20690
20691
20692
20693
20694
20695
20696
20697   gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
20698
20699
20700
20701
20702
20703
20704
20705
20706
20707   gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
20708
20709
20710
20711
20712         GNULIB_GL_UNISTD_H_GETOPT=1
20713   fi
20714
20715
20716
20717
20718   for ac_func in getpagesize
20719 do :
20720   ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
20721 if test "x$ac_cv_func_getpagesize" = xyes; then :
20722   cat >>confdefs.h <<_ACEOF
20723 #define HAVE_GETPAGESIZE 1
20724 _ACEOF
20725
20726 fi
20727 done
20728
20729   if test $ac_cv_func_getpagesize = no; then
20730     HAVE_GETPAGESIZE=0
20731     for ac_header in OS.h
20732 do :
20733   ac_fn_c_check_header_mongrel "$LINENO" "OS.h" "ac_cv_header_OS_h" "$ac_includes_default"
20734 if test "x$ac_cv_header_OS_h" = xyes; then :
20735   cat >>confdefs.h <<_ACEOF
20736 #define HAVE_OS_H 1
20737 _ACEOF
20738
20739 fi
20740
20741 done
20742
20743     if test $ac_cv_header_OS_h = yes; then
20744       HAVE_OS_H=1
20745     fi
20746     for ac_header in sys/param.h
20747 do :
20748   ac_fn_c_check_header_mongrel "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default"
20749 if test "x$ac_cv_header_sys_param_h" = xyes; then :
20750   cat >>confdefs.h <<_ACEOF
20751 #define HAVE_SYS_PARAM_H 1
20752 _ACEOF
20753
20754 fi
20755
20756 done
20757
20758     if test $ac_cv_header_sys_param_h = yes; then
20759       HAVE_SYS_PARAM_H=1
20760     fi
20761   fi
20762   case "$host_os" in
20763     mingw*)
20764       REPLACE_GETPAGESIZE=1
20765       ;;
20766   esac
20767       ac_fn_c_check_decl "$LINENO" "getpagesize" "ac_cv_have_decl_getpagesize" "$ac_includes_default"
20768 if test "x$ac_cv_have_decl_getpagesize" = xyes; then :
20769
20770 else
20771   HAVE_DECL_GETPAGESIZE=0
20772 fi
20773
20774
20775   if test $REPLACE_GETPAGESIZE = 1; then
20776
20777
20778
20779
20780
20781
20782
20783
20784   gl_LIBOBJS="$gl_LIBOBJS getpagesize.$ac_objext"
20785
20786   fi
20787
20788
20789
20790
20791
20792           GNULIB_GETPAGESIZE=1
20793
20794
20795
20796
20797
20798 $as_echo "#define GNULIB_TEST_GETPAGESIZE 1" >>confdefs.h
20799
20800
20801
20802
20803
20804
20805
20806
20807
20808
20809
20810
20811
20812
20813
20814
20815
20816   gl_gettimeofday_timezone=void
20817   if test $ac_cv_func_gettimeofday != yes; then
20818     HAVE_GETTIMEOFDAY=0
20819   else
20820
20821
20822
20823  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5
20824 $as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; }
20825 if ${gl_cv_func_gettimeofday_clobber+:} false; then :
20826   $as_echo_n "(cached) " >&6
20827 else
20828   if test "$cross_compiling" = yes; then :
20829   # When cross-compiling:
20830       case "$host_os" in
20831                 # Guess all is fine on glibc systems.
20832         *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
20833                 # If we don't know, assume the worst.
20834         *)      gl_cv_func_gettimeofday_clobber="guessing yes" ;;
20835       esac
20836
20837 else
20838   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20839 /* end confdefs.h.  */
20840 #include <string.h>
20841           #include <sys/time.h>
20842           #include <time.h>
20843           #include <stdlib.h>
20844
20845 int
20846 main ()
20847 {
20848
20849           time_t t = 0;
20850           struct tm *lt;
20851           struct tm saved_lt;
20852           struct timeval tv;
20853           lt = localtime (&t);
20854           saved_lt = *lt;
20855           gettimeofday (&tv, NULL);
20856           return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
20857
20858   ;
20859   return 0;
20860 }
20861 _ACEOF
20862 if ac_fn_c_try_run "$LINENO"; then :
20863   gl_cv_func_gettimeofday_clobber=no
20864 else
20865   gl_cv_func_gettimeofday_clobber=yes
20866 fi
20867 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20868   conftest.$ac_objext conftest.beam conftest.$ac_ext
20869 fi
20870
20871 fi
20872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5
20873 $as_echo "$gl_cv_func_gettimeofday_clobber" >&6; }
20874
20875  case "$gl_cv_func_gettimeofday_clobber" in
20876    *yes)
20877      REPLACE_GETTIMEOFDAY=1
20878
20879
20880 $as_echo "#define gmtime rpl_gmtime" >>confdefs.h
20881
20882
20883 $as_echo "#define localtime rpl_localtime" >>confdefs.h
20884
20885
20886
20887 $as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
20888
20889      ;;
20890  esac
20891
20892     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
20893 $as_echo_n "checking for gettimeofday with POSIX signature... " >&6; }
20894 if ${gl_cv_func_gettimeofday_posix_signature+:} false; then :
20895   $as_echo_n "(cached) " >&6
20896 else
20897   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20898 /* end confdefs.h.  */
20899 #include <sys/time.h>
20900               struct timeval c;
20901               int gettimeofday (struct timeval *restrict, void *restrict);
20902
20903 int
20904 main ()
20905 {
20906 /* glibc uses struct timezone * rather than the POSIX void *
20907                  if _GNU_SOURCE is defined.  However, since the only portable
20908                  use of gettimeofday uses NULL as the second parameter, and
20909                  since the glibc definition is actually more typesafe, it is
20910                  not worth wrapping this to get a compliant signature.  */
20911               int (*f) (struct timeval *restrict, void *restrict)
20912                 = gettimeofday;
20913               int x = f (&c, 0);
20914               return !(x | c.tv_sec | c.tv_usec);
20915
20916   ;
20917   return 0;
20918 }
20919 _ACEOF
20920 if ac_fn_c_try_compile "$LINENO"; then :
20921   gl_cv_func_gettimeofday_posix_signature=yes
20922 else
20923   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20924 /* end confdefs.h.  */
20925 #include <sys/time.h>
20926 int gettimeofday (struct timeval *restrict, struct timezone *restrict);
20927
20928 int
20929 main ()
20930 {
20931
20932   ;
20933   return 0;
20934 }
20935 _ACEOF
20936 if ac_fn_c_try_compile "$LINENO"; then :
20937   gl_cv_func_gettimeofday_posix_signature=almost
20938 else
20939   gl_cv_func_gettimeofday_posix_signature=no
20940 fi
20941 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20942 fi
20943 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20944 fi
20945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
20946 $as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; }
20947     if test $gl_cv_func_gettimeofday_posix_signature = almost; then
20948       gl_gettimeofday_timezone='struct timezone'
20949     elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
20950       REPLACE_GETTIMEOFDAY=1
20951     fi
20952         if test $REPLACE_STRUCT_TIMEVAL = 1; then
20953       REPLACE_GETTIMEOFDAY=1
20954     fi
20955
20956   fi
20957
20958 cat >>confdefs.h <<_ACEOF
20959 #define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone
20960 _ACEOF
20961
20962
20963   if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
20964
20965
20966
20967
20968
20969
20970
20971
20972   gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
20973
20974
20975   for ac_header in sys/timeb.h
20976 do :
20977   ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
20978 if test "x$ac_cv_header_sys_timeb_h" = xyes; then :
20979   cat >>confdefs.h <<_ACEOF
20980 #define HAVE_SYS_TIMEB_H 1
20981 _ACEOF
20982
20983 fi
20984
20985 done
20986
20987   for ac_func in _ftime
20988 do :
20989   ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
20990 if test "x$ac_cv_func__ftime" = xyes; then :
20991   cat >>confdefs.h <<_ACEOF
20992 #define HAVE__FTIME 1
20993 _ACEOF
20994
20995 fi
20996 done
20997
20998
20999   fi
21000
21001
21002
21003
21004
21005           GNULIB_GETTIMEOFDAY=1
21006
21007
21008
21009
21010
21011 $as_echo "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h
21012
21013
21014
21015
21016   :
21017
21018
21019
21020
21021   :
21022
21023   :
21024   :
21025   :
21026   :
21027
21028
21029
21030
21031
21032
21033   PRIPTR_PREFIX=
21034   if test -n "$STDINT_H"; then
21035         PRIPTR_PREFIX='"l"'
21036   else
21037         for glpfx in '' l ll I64; do
21038       case $glpfx in
21039         '')  gltype1='int';;
21040         l)   gltype1='long int';;
21041         ll)  gltype1='long long int';;
21042         I64) gltype1='__int64';;
21043       esac
21044       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21045 /* end confdefs.h.  */
21046 #include <stdint.h>
21047            extern intptr_t foo;
21048            extern $gltype1 foo;
21049 int
21050 main ()
21051 {
21052
21053   ;
21054   return 0;
21055 }
21056 _ACEOF
21057 if ac_fn_c_try_compile "$LINENO"; then :
21058   PRIPTR_PREFIX='"'$glpfx'"'
21059 fi
21060 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21061       test -n "$PRIPTR_PREFIX" && break
21062     done
21063   fi
21064
21065
21066
21067   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT32_MAX < INTMAX_MAX" >&5
21068 $as_echo_n "checking whether INT32_MAX < INTMAX_MAX... " >&6; }
21069 if ${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+:} false; then :
21070   $as_echo_n "(cached) " >&6
21071 else
21072   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21073 /* end confdefs.h.  */
21074 /* Work also in C++ mode.  */
21075             #define __STDC_LIMIT_MACROS 1
21076
21077             /* Work if build is not clean.  */
21078             #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
21079
21080             #include <limits.h>
21081             #if HAVE_STDINT_H
21082              #include <stdint.h>
21083             #endif
21084
21085             #if defined INT32_MAX && defined INTMAX_MAX
21086              #define CONDITION (INT32_MAX < INTMAX_MAX)
21087             #elif HAVE_LONG_LONG_INT
21088              #define CONDITION (sizeof (int) < sizeof (long long int))
21089             #else
21090              #define CONDITION 0
21091             #endif
21092             int test[CONDITION ? 1 : -1];
21093 int
21094 main ()
21095 {
21096
21097   ;
21098   return 0;
21099 }
21100 _ACEOF
21101 if ac_fn_c_try_compile "$LINENO"; then :
21102   gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes
21103 else
21104   gl_cv_test_INT32_MAX_LT_INTMAX_MAX=no
21105 fi
21106 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21107 fi
21108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&5
21109 $as_echo "$gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&6; }
21110   if test $gl_cv_test_INT32_MAX_LT_INTMAX_MAX = yes; then
21111     INT32_MAX_LT_INTMAX_MAX=1;
21112   else
21113     INT32_MAX_LT_INTMAX_MAX=0;
21114   fi
21115
21116
21117   if test $APPLE_UNIVERSAL_BUILD = 0; then
21118
21119   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT64_MAX == LONG_MAX" >&5
21120 $as_echo_n "checking whether INT64_MAX == LONG_MAX... " >&6; }
21121 if ${gl_cv_test_INT64_MAX_EQ_LONG_MAX+:} false; then :
21122   $as_echo_n "(cached) " >&6
21123 else
21124   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21125 /* end confdefs.h.  */
21126 /* Work also in C++ mode.  */
21127             #define __STDC_LIMIT_MACROS 1
21128
21129             /* Work if build is not clean.  */
21130             #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
21131
21132             #include <limits.h>
21133             #if HAVE_STDINT_H
21134              #include <stdint.h>
21135             #endif
21136
21137             #if defined INT64_MAX
21138              #define CONDITION (INT64_MAX == LONG_MAX)
21139             #elif HAVE_LONG_LONG_INT
21140              #define CONDITION (sizeof (long long int) == sizeof (long int))
21141             #else
21142              #define CONDITION 0
21143             #endif
21144             int test[CONDITION ? 1 : -1];
21145 int
21146 main ()
21147 {
21148
21149   ;
21150   return 0;
21151 }
21152 _ACEOF
21153 if ac_fn_c_try_compile "$LINENO"; then :
21154   gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes
21155 else
21156   gl_cv_test_INT64_MAX_EQ_LONG_MAX=no
21157 fi
21158 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21159 fi
21160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&5
21161 $as_echo "$gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&6; }
21162   if test $gl_cv_test_INT64_MAX_EQ_LONG_MAX = yes; then
21163     INT64_MAX_EQ_LONG_MAX=1;
21164   else
21165     INT64_MAX_EQ_LONG_MAX=0;
21166   fi
21167
21168
21169   else
21170     INT64_MAX_EQ_LONG_MAX=-1
21171   fi
21172
21173   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT32_MAX < UINTMAX_MAX" >&5
21174 $as_echo_n "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; }
21175 if ${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+:} false; then :
21176   $as_echo_n "(cached) " >&6
21177 else
21178   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21179 /* end confdefs.h.  */
21180 /* Work also in C++ mode.  */
21181             #define __STDC_LIMIT_MACROS 1
21182
21183             /* Work if build is not clean.  */
21184             #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
21185
21186             #include <limits.h>
21187             #if HAVE_STDINT_H
21188              #include <stdint.h>
21189             #endif
21190
21191             #if defined UINT32_MAX && defined UINTMAX_MAX
21192              #define CONDITION (UINT32_MAX < UINTMAX_MAX)
21193             #elif HAVE_LONG_LONG_INT
21194              #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int))
21195             #else
21196              #define CONDITION 0
21197             #endif
21198             int test[CONDITION ? 1 : -1];
21199 int
21200 main ()
21201 {
21202
21203   ;
21204   return 0;
21205 }
21206 _ACEOF
21207 if ac_fn_c_try_compile "$LINENO"; then :
21208   gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes
21209 else
21210   gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=no
21211 fi
21212 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21213 fi
21214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&5
21215 $as_echo "$gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&6; }
21216   if test $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX = yes; then
21217     UINT32_MAX_LT_UINTMAX_MAX=1;
21218   else
21219     UINT32_MAX_LT_UINTMAX_MAX=0;
21220   fi
21221
21222
21223   if test $APPLE_UNIVERSAL_BUILD = 0; then
21224
21225   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT64_MAX == ULONG_MAX" >&5
21226 $as_echo_n "checking whether UINT64_MAX == ULONG_MAX... " >&6; }
21227 if ${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+:} false; then :
21228   $as_echo_n "(cached) " >&6
21229 else
21230   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21231 /* end confdefs.h.  */
21232 /* Work also in C++ mode.  */
21233             #define __STDC_LIMIT_MACROS 1
21234
21235             /* Work if build is not clean.  */
21236             #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
21237
21238             #include <limits.h>
21239             #if HAVE_STDINT_H
21240              #include <stdint.h>
21241             #endif
21242
21243             #if defined UINT64_MAX
21244              #define CONDITION (UINT64_MAX == ULONG_MAX)
21245             #elif HAVE_LONG_LONG_INT
21246              #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int))
21247             #else
21248              #define CONDITION 0
21249             #endif
21250             int test[CONDITION ? 1 : -1];
21251 int
21252 main ()
21253 {
21254
21255   ;
21256   return 0;
21257 }
21258 _ACEOF
21259 if ac_fn_c_try_compile "$LINENO"; then :
21260   gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes
21261 else
21262   gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=no
21263 fi
21264 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21265 fi
21266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&5
21267 $as_echo "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; }
21268   if test $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX = yes; then
21269     UINT64_MAX_EQ_ULONG_MAX=1;
21270   else
21271     UINT64_MAX_EQ_ULONG_MAX=0;
21272   fi
21273
21274
21275   else
21276     UINT64_MAX_EQ_ULONG_MAX=-1
21277   fi
21278
21279
21280
21281
21282
21283
21284
21285
21286   ac_fn_c_check_decl "$LINENO" "iswblank" "ac_cv_have_decl_iswblank" "
21287 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
21288    <wchar.h>.
21289    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
21290    before <wchar.h>.  */
21291 #include <stddef.h>
21292 #include <stdio.h>
21293 #include <time.h>
21294 #include <wchar.h>
21295 #include <wctype.h>
21296
21297 "
21298 if test "x$ac_cv_have_decl_iswblank" = xyes; then :
21299   ac_have_decl=1
21300 else
21301   ac_have_decl=0
21302 fi
21303
21304 cat >>confdefs.h <<_ACEOF
21305 #define HAVE_DECL_ISWBLANK $ac_have_decl
21306 _ACEOF
21307
21308   if test $ac_cv_func_iswblank = no; then
21309     HAVE_ISWBLANK=0
21310     if test $ac_cv_have_decl_iswblank = yes; then
21311       REPLACE_ISWBLANK=1
21312     fi
21313   fi
21314   if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
21315         :
21316   else
21317     if test $HAVE_ISWBLANK = 0 || test $REPLACE_ISWBLANK = 1; then
21318             :
21319     fi
21320   fi
21321
21322
21323   if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
21324     :
21325   else
21326     if test $HAVE_ISWBLANK = 0 || test $REPLACE_ISWBLANK = 1; then
21327
21328
21329
21330
21331
21332
21333
21334
21335   gl_LIBOBJS="$gl_LIBOBJS iswblank.$ac_objext"
21336
21337     fi
21338   fi
21339
21340
21341
21342
21343
21344           GNULIB_ISWBLANK=1
21345
21346
21347
21348
21349
21350 $as_echo "#define GNULIB_TEST_ISWBLANK 1" >>confdefs.h
21351
21352
21353
21354
21355
21356
21357
21358
21359
21360
21361
21362
21363
21364
21365
21366
21367
21368      if test $gl_cv_have_include_next = yes; then
21369        gl_cv_next_langinfo_h='<'langinfo.h'>'
21370      else
21371        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <langinfo.h>" >&5
21372 $as_echo_n "checking absolute name of <langinfo.h>... " >&6; }
21373 if ${gl_cv_next_langinfo_h+:} false; then :
21374   $as_echo_n "(cached) " >&6
21375 else
21376
21377              if test $ac_cv_header_langinfo_h = yes; then
21378
21379
21380                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21381 /* end confdefs.h.  */
21382 #include <langinfo.h>
21383
21384 _ACEOF
21385                                                                                                                         case "$host_os" in
21386                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
21387                  *)    gl_absname_cpp="$ac_cpp" ;;
21388                esac
21389
21390                case "$host_os" in
21391                  mingw*)
21392                                                                                                                                      gl_dirsep_regex='[/\\]'
21393                    ;;
21394                  *)
21395                    gl_dirsep_regex='\/'
21396                    ;;
21397                esac
21398                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21399
21400                gl_header_literal_regex=`echo 'langinfo.h' \
21401                                         | sed -e "$gl_make_literal_regex_sed"`
21402                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21403                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21404                    s|^/[^/]|//&|
21405                    p
21406                    q
21407                  }'
21408                                                             gl_cv_next_langinfo_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21409                       sed -n "$gl_absolute_header_sed"`'"'
21410           else
21411                gl_cv_next_langinfo_h='<'langinfo.h'>'
21412              fi
21413
21414
21415 fi
21416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_langinfo_h" >&5
21417 $as_echo "$gl_cv_next_langinfo_h" >&6; }
21418      fi
21419      NEXT_LANGINFO_H=$gl_cv_next_langinfo_h
21420
21421      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21422        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21423        gl_next_as_first_directive='<'langinfo.h'>'
21424      else
21425        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21426        gl_next_as_first_directive=$gl_cv_next_langinfo_h
21427      fi
21428      NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H=$gl_next_as_first_directive
21429
21430
21431
21432
21433
21434     HAVE_LANGINFO_CODESET=0
21435   HAVE_LANGINFO_T_FMT_AMPM=0
21436   HAVE_LANGINFO_ERA=0
21437   HAVE_LANGINFO_YESEXPR=0
21438
21439   if test $ac_cv_header_langinfo_h = yes; then
21440     HAVE_LANGINFO_H=1
21441             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines CODESET" >&5
21442 $as_echo_n "checking whether langinfo.h defines CODESET... " >&6; }
21443 if ${gl_cv_header_langinfo_codeset+:} false; then :
21444   $as_echo_n "(cached) " >&6
21445 else
21446   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21447 /* end confdefs.h.  */
21448 #include <langinfo.h>
21449 int a = CODESET;
21450
21451 int
21452 main ()
21453 {
21454
21455   ;
21456   return 0;
21457 }
21458 _ACEOF
21459 if ac_fn_c_try_compile "$LINENO"; then :
21460   gl_cv_header_langinfo_codeset=yes
21461 else
21462   gl_cv_header_langinfo_codeset=no
21463 fi
21464 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21465
21466 fi
21467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_codeset" >&5
21468 $as_echo "$gl_cv_header_langinfo_codeset" >&6; }
21469     if test $gl_cv_header_langinfo_codeset = yes; then
21470       HAVE_LANGINFO_CODESET=1
21471     fi
21472     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines T_FMT_AMPM" >&5
21473 $as_echo_n "checking whether langinfo.h defines T_FMT_AMPM... " >&6; }
21474 if ${gl_cv_header_langinfo_t_fmt_ampm+:} false; then :
21475   $as_echo_n "(cached) " >&6
21476 else
21477   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21478 /* end confdefs.h.  */
21479 #include <langinfo.h>
21480 int a = T_FMT_AMPM;
21481
21482 int
21483 main ()
21484 {
21485
21486   ;
21487   return 0;
21488 }
21489 _ACEOF
21490 if ac_fn_c_try_compile "$LINENO"; then :
21491   gl_cv_header_langinfo_t_fmt_ampm=yes
21492 else
21493   gl_cv_header_langinfo_t_fmt_ampm=no
21494 fi
21495 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21496
21497 fi
21498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_t_fmt_ampm" >&5
21499 $as_echo "$gl_cv_header_langinfo_t_fmt_ampm" >&6; }
21500     if test $gl_cv_header_langinfo_t_fmt_ampm = yes; then
21501       HAVE_LANGINFO_T_FMT_AMPM=1
21502     fi
21503     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines ERA" >&5
21504 $as_echo_n "checking whether langinfo.h defines ERA... " >&6; }
21505 if ${gl_cv_header_langinfo_era+:} false; then :
21506   $as_echo_n "(cached) " >&6
21507 else
21508   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21509 /* end confdefs.h.  */
21510 #include <langinfo.h>
21511 int a = ERA;
21512
21513 int
21514 main ()
21515 {
21516
21517   ;
21518   return 0;
21519 }
21520 _ACEOF
21521 if ac_fn_c_try_compile "$LINENO"; then :
21522   gl_cv_header_langinfo_era=yes
21523 else
21524   gl_cv_header_langinfo_era=no
21525 fi
21526 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21527
21528 fi
21529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_era" >&5
21530 $as_echo "$gl_cv_header_langinfo_era" >&6; }
21531     if test $gl_cv_header_langinfo_era = yes; then
21532       HAVE_LANGINFO_ERA=1
21533     fi
21534     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines YESEXPR" >&5
21535 $as_echo_n "checking whether langinfo.h defines YESEXPR... " >&6; }
21536 if ${gl_cv_header_langinfo_yesexpr+:} false; then :
21537   $as_echo_n "(cached) " >&6
21538 else
21539   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21540 /* end confdefs.h.  */
21541 #include <langinfo.h>
21542 int a = YESEXPR;
21543
21544 int
21545 main ()
21546 {
21547
21548   ;
21549   return 0;
21550 }
21551 _ACEOF
21552 if ac_fn_c_try_compile "$LINENO"; then :
21553   gl_cv_header_langinfo_yesexpr=yes
21554 else
21555   gl_cv_header_langinfo_yesexpr=no
21556 fi
21557 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21558
21559 fi
21560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_yesexpr" >&5
21561 $as_echo "$gl_cv_header_langinfo_yesexpr" >&6; }
21562     if test $gl_cv_header_langinfo_yesexpr = yes; then
21563       HAVE_LANGINFO_YESEXPR=1
21564     fi
21565   else
21566     HAVE_LANGINFO_H=0
21567   fi
21568
21569
21570
21571
21572
21573
21574
21575     for gl_func in nl_langinfo; do
21576     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
21577     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
21578 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
21579 if eval \${$as_gl_Symbol+:} false; then :
21580   $as_echo_n "(cached) " >&6
21581 else
21582   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21583 /* end confdefs.h.  */
21584 #include <langinfo.h>
21585
21586 int
21587 main ()
21588 {
21589 #undef $gl_func
21590   (void) $gl_func;
21591   ;
21592   return 0;
21593 }
21594 _ACEOF
21595 if ac_fn_c_try_compile "$LINENO"; then :
21596   eval "$as_gl_Symbol=yes"
21597 else
21598   eval "$as_gl_Symbol=no"
21599 fi
21600 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21601 fi
21602 eval ac_res=\$$as_gl_Symbol
21603                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
21604 $as_echo "$ac_res" >&6; }
21605     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
21606   cat >>confdefs.h <<_ACEOF
21607 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
21608 _ACEOF
21609
21610                      eval ac_cv_have_decl_$gl_func=yes
21611 fi
21612       done
21613
21614
21615
21616
21617
21618
21619
21620   for ac_func in lchown
21621 do :
21622   ac_fn_c_check_func "$LINENO" "lchown" "ac_cv_func_lchown"
21623 if test "x$ac_cv_func_lchown" = xyes; then :
21624   cat >>confdefs.h <<_ACEOF
21625 #define HAVE_LCHOWN 1
21626 _ACEOF
21627
21628 fi
21629 done
21630
21631   if test $ac_cv_func_lchown = no; then
21632     HAVE_LCHOWN=0
21633   else
21634         case "$gl_cv_func_chown_slash_works" in
21635       *yes) ;;
21636       *)
21637         REPLACE_LCHOWN=1
21638         ;;
21639     esac
21640     case "$gl_cv_func_chown_ctime_works" in
21641       *yes) ;;
21642       *)
21643         REPLACE_LCHOWN=1
21644         ;;
21645     esac
21646   fi
21647
21648   if test $HAVE_LCHOWN = 0 || test $REPLACE_LCHOWN = 1; then
21649
21650
21651
21652
21653
21654
21655
21656
21657   gl_LIBOBJS="$gl_LIBOBJS lchown.$ac_objext"
21658
21659   fi
21660
21661
21662
21663
21664
21665           GNULIB_LCHOWN=1
21666
21667
21668
21669
21670
21671 $as_echo "#define GNULIB_TEST_LCHOWN 1" >>confdefs.h
21672
21673
21674
21675
21676
21677
21678   if test $ac_cv_func_link = no; then
21679     HAVE_LINK=0
21680   else
21681     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether link obeys POSIX" >&5
21682 $as_echo_n "checking whether link obeys POSIX... " >&6; }
21683 if ${gl_cv_func_link_works+:} false; then :
21684   $as_echo_n "(cached) " >&6
21685 else
21686   touch conftest.a
21687        # Assume that if we have lstat, we can also check symlinks.
21688        if test $ac_cv_func_lstat = yes; then
21689          ln -s conftest.a conftest.lnk
21690        fi
21691        if test "$cross_compiling" = yes; then :
21692   case "$host_os" in
21693                     # Guess yes on glibc systems.
21694             *-gnu*) gl_cv_func_link_works="guessing yes" ;;
21695                     # If we don't know, assume the worst.
21696             *)      gl_cv_func_link_works="guessing no" ;;
21697           esac
21698
21699 else
21700   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21701 /* end confdefs.h.  */
21702 #include <unistd.h>
21703
21704 int
21705 main ()
21706 {
21707 int result = 0;
21708              if (!link ("conftest.a", "conftest.b/"))
21709                result |= 1;
21710 #if HAVE_LSTAT
21711              if (!link ("conftest.lnk/", "conftest.b"))
21712                result |= 2;
21713              if (rename ("conftest.a", "conftest.b"))
21714                result |= 4;
21715              if (!link ("conftest.b", "conftest.lnk"))
21716                result |= 8;
21717 #endif
21718              return result;
21719
21720   ;
21721   return 0;
21722 }
21723 _ACEOF
21724 if ac_fn_c_try_run "$LINENO"; then :
21725   gl_cv_func_link_works=yes
21726 else
21727   gl_cv_func_link_works=no
21728 fi
21729 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21730   conftest.$ac_objext conftest.beam conftest.$ac_ext
21731 fi
21732
21733        rm -f conftest.a conftest.b conftest.lnk
21734 fi
21735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_link_works" >&5
21736 $as_echo "$gl_cv_func_link_works" >&6; }
21737     case "$gl_cv_func_link_works" in
21738       *yes) ;;
21739       *)
21740         REPLACE_LINK=1
21741         ;;
21742     esac
21743   fi
21744
21745   if test $HAVE_LINK = 0 || test $REPLACE_LINK = 1; then
21746
21747
21748
21749
21750
21751
21752
21753
21754   gl_LIBOBJS="$gl_LIBOBJS link.$ac_objext"
21755
21756   fi
21757
21758
21759
21760
21761
21762           GNULIB_LINK=1
21763
21764
21765
21766
21767
21768 $as_echo "#define GNULIB_TEST_LINK 1" >>confdefs.h
21769
21770
21771
21772
21773           gl_link_follows_symlinks=0 # assume GNU behavior
21774   if test $ac_cv_func_readlink = yes; then
21775                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __xpg4" >&5
21776 $as_echo_n "checking for __xpg4... " >&6; }
21777 if ${gl_cv_have___xpg4+:} false; then :
21778   $as_echo_n "(cached) " >&6
21779 else
21780   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21781 /* end confdefs.h.  */
21782 extern int __xpg4;
21783 int
21784 main ()
21785 {
21786 return __xpg4;
21787   ;
21788   return 0;
21789 }
21790 _ACEOF
21791 if ac_fn_c_try_link "$LINENO"; then :
21792   gl_cv_have___xpg4=yes
21793 else
21794   gl_cv_have___xpg4=no
21795 fi
21796 rm -f core conftest.err conftest.$ac_objext \
21797     conftest$ac_exeext conftest.$ac_ext
21798
21799 fi
21800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have___xpg4" >&5
21801 $as_echo "$gl_cv_have___xpg4" >&6; }
21802     if test $gl_cv_have___xpg4 = yes; then
21803       gl_link_follows_symlinks=-1
21804     else
21805       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether link(2) dereferences a symlink" >&5
21806 $as_echo_n "checking whether link(2) dereferences a symlink... " >&6; }
21807 if ${gl_cv_func_link_follows_symlink+:} false; then :
21808   $as_echo_n "(cached) " >&6
21809 else
21810
21811          # Create a regular file.
21812          echo > conftest.file
21813          if test "$cross_compiling" = yes; then :
21814                                                  case "$host_os" in
21815                            # On glibc/Linux we know the result.
21816               linux*-gnu*) gl_cv_func_link_follows_symlink="guessing no" ;;
21817                            # Otherwise, we don't know.
21818               *)           gl_cv_func_link_follows_symlink=unknown ;;
21819             esac
21820
21821 else
21822   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21823 /* end confdefs.h.  */
21824
21825 #       include <sys/types.h>
21826 #       include <sys/stat.h>
21827 #       include <unistd.h>
21828 #       include <stdlib.h>
21829
21830 #       define SAME_INODE(Stat_buf_1, Stat_buf_2) \
21831           ((Stat_buf_1).st_ino == (Stat_buf_2).st_ino \
21832            && (Stat_buf_1).st_dev == (Stat_buf_2).st_dev)
21833
21834         int
21835         main ()
21836         {
21837           const char *file = "conftest.file";
21838           const char *sym = "conftest.sym";
21839           const char *hard = "conftest.hard";
21840           struct stat sb_file, sb_hard;
21841
21842           /* Create a symlink to the regular file. */
21843           if (symlink (file, sym))
21844             return 2;
21845
21846           /* Create a hard link to that symlink.  */
21847           if (link (sym, hard))
21848             return 3;
21849
21850           if (lstat (hard, &sb_hard))
21851             return 4;
21852           if (lstat (file, &sb_file))
21853             return 5;
21854
21855           /* If the dev/inode of hard and file are the same, then
21856              the link call followed the symlink.  */
21857           return SAME_INODE (sb_hard, sb_file) ? 1 : 0;
21858         }
21859
21860 _ACEOF
21861 if ac_fn_c_try_run "$LINENO"; then :
21862   gl_cv_func_link_follows_symlink=no
21863 else
21864              gl_cv_func_link_follows_symlink=yes
21865 fi
21866 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21867   conftest.$ac_objext conftest.beam conftest.$ac_ext
21868 fi
21869
21870          rm -f conftest.file conftest.sym conftest.hard
21871
21872 fi
21873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_link_follows_symlink" >&5
21874 $as_echo "$gl_cv_func_link_follows_symlink" >&6; }
21875       case "$gl_cv_func_link_follows_symlink" in
21876         *yes) gl_link_follows_symlinks=1 ;;
21877         *no) ;; # already defaulted to 0
21878         *) gl_link_follows_symlinks=-2 ;;
21879       esac
21880     fi
21881   fi
21882
21883 cat >>confdefs.h <<_ACEOF
21884 #define LINK_FOLLOWS_SYMLINKS $gl_link_follows_symlinks
21885 _ACEOF
21886
21887
21888
21889
21890
21891
21892
21893
21894
21895   if test $ac_cv_func_linkat = no; then
21896     HAVE_LINKAT=0
21897   else
21898     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether linkat(,AT_SYMLINK_FOLLOW) works" >&5
21899 $as_echo_n "checking whether linkat(,AT_SYMLINK_FOLLOW) works... " >&6; }
21900 if ${gl_cv_func_linkat_follow+:} false; then :
21901   $as_echo_n "(cached) " >&6
21902 else
21903   rm -rf conftest.f1 conftest.f2
21904        touch conftest.f1
21905        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21906 /* end confdefs.h.  */
21907
21908 #include <fcntl.h>
21909 #include <unistd.h>
21910 #ifdef __linux__
21911 /* Linux added linkat in 2.6.16, but did not add AT_SYMLINK_FOLLOW
21912    until 2.6.18.  Always replace linkat to support older kernels.  */
21913 choke me
21914 #endif
21915
21916 int
21917 main ()
21918 {
21919 return linkat (AT_FDCWD, "conftest.f1", AT_FDCWD, "conftest.f2",
21920                     AT_SYMLINK_FOLLOW);
21921   ;
21922   return 0;
21923 }
21924 _ACEOF
21925 if ac_fn_c_try_compile "$LINENO"; then :
21926   gl_cv_func_linkat_follow=yes
21927 else
21928   gl_cv_func_linkat_follow="need runtime check"
21929 fi
21930 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21931        rm -rf conftest.f1 conftest.f2
21932 fi
21933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_linkat_follow" >&5
21934 $as_echo "$gl_cv_func_linkat_follow" >&6; }
21935     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether linkat handles trailing slash correctly" >&5
21936 $as_echo_n "checking whether linkat handles trailing slash correctly... " >&6; }
21937 if ${gl_cv_func_linkat_slash+:} false; then :
21938   $as_echo_n "(cached) " >&6
21939 else
21940   rm -rf conftest.a conftest.b conftest.c conftest.d
21941        if test "$cross_compiling" = yes; then :
21942   # Guess yes on glibc systems, no otherwise.
21943           case "$host_os" in
21944             *-gnu*) gl_cv_func_linkat_slash="guessing yes";;
21945             *)      gl_cv_func_linkat_slash="guessing no";;
21946           esac
21947
21948 else
21949   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21950 /* end confdefs.h.  */
21951 #include <unistd.h>
21952               #include <fcntl.h>
21953               #include <errno.h>
21954               #include <stdio.h>
21955
21956 int
21957 main ()
21958 {
21959 int result;
21960               int fd;
21961               /* Create a regular file.  */
21962               fd = open ("conftest.a", O_CREAT | O_EXCL | O_WRONLY, 0600);
21963               if (fd < 0)
21964                 return 1;
21965               if (write (fd, "hello", 5) < 5)
21966                 return 2;
21967               if (close (fd) < 0)
21968                 return 3;
21969               /* Test whether hard links are supported on the current
21970                  device.  */
21971               if (linkat (AT_FDCWD, "conftest.a", AT_FDCWD, "conftest.b",
21972                           AT_SYMLINK_FOLLOW) < 0)
21973                 return 0;
21974               result = 0;
21975               /* Test whether a trailing "/" is treated like "/.".  */
21976               if (linkat (AT_FDCWD, "conftest.a/", AT_FDCWD, "conftest.c",
21977                           AT_SYMLINK_FOLLOW) == 0)
21978                 result |= 4;
21979               if (linkat (AT_FDCWD, "conftest.a", AT_FDCWD, "conftest.d/",
21980                           AT_SYMLINK_FOLLOW) == 0)
21981                 result |= 8;
21982               return result;
21983
21984   ;
21985   return 0;
21986 }
21987 _ACEOF
21988 if ac_fn_c_try_run "$LINENO"; then :
21989   gl_cv_func_linkat_slash=yes
21990 else
21991   gl_cv_func_linkat_slash=no
21992 fi
21993 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21994   conftest.$ac_objext conftest.beam conftest.$ac_ext
21995 fi
21996
21997        rm -rf conftest.a conftest.b conftest.c conftest.d
21998 fi
21999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_linkat_slash" >&5
22000 $as_echo "$gl_cv_func_linkat_slash" >&6; }
22001     case "$gl_cv_func_linkat_slash" in
22002       *yes) gl_linkat_slash_bug=0 ;;
22003       *)    gl_linkat_slash_bug=1 ;;
22004     esac
22005     if test "$gl_cv_func_linkat_follow" != yes \
22006        || test $gl_linkat_slash_bug = 1; then
22007       REPLACE_LINKAT=1
22008
22009 cat >>confdefs.h <<_ACEOF
22010 #define LINKAT_TRAILING_SLASH_BUG $gl_linkat_slash_bug
22011 _ACEOF
22012
22013     fi
22014   fi
22015
22016   if test $HAVE_LINKAT = 0 || test $REPLACE_LINKAT = 1; then
22017
22018
22019
22020
22021
22022
22023
22024
22025   gl_LIBOBJS="$gl_LIBOBJS linkat.$ac_objext"
22026
22027   fi
22028   if test $HAVE_LINKAT = 0; then
22029
22030
22031
22032
22033
22034
22035
22036
22037   gl_LIBOBJS="$gl_LIBOBJS at-func2.$ac_objext"
22038
22039   fi
22040
22041
22042
22043
22044
22045           GNULIB_LINKAT=1
22046
22047
22048
22049
22050
22051 $as_echo "#define GNULIB_TEST_LINKAT 1" >>confdefs.h
22052
22053
22054
22055
22056
22057
22058
22059
22060
22061
22062
22063   LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(abs_top_builddir)/$gl_source_base\""
22064
22065
22066
22067
22068
22069
22070
22071
22072
22073   case "$host_os" in
22074     solaris*)
22075
22076 $as_echo "#define _LCONV_C99 1" >>confdefs.h
22077
22078       ;;
22079   esac
22080
22081   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h conforms to POSIX:2001" >&5
22082 $as_echo_n "checking whether locale.h conforms to POSIX:2001... " >&6; }
22083 if ${gl_cv_header_locale_h_posix2001+:} false; then :
22084   $as_echo_n "(cached) " >&6
22085 else
22086   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22087 /* end confdefs.h.  */
22088 #include <locale.h>
22089             int x = LC_MESSAGES;
22090             int y = sizeof (((struct lconv *) 0)->decimal_point);
22091 int
22092 main ()
22093 {
22094
22095   ;
22096   return 0;
22097 }
22098 _ACEOF
22099 if ac_fn_c_try_compile "$LINENO"; then :
22100   gl_cv_header_locale_h_posix2001=yes
22101 else
22102   gl_cv_header_locale_h_posix2001=no
22103 fi
22104 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22105 fi
22106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_h_posix2001" >&5
22107 $as_echo "$gl_cv_header_locale_h_posix2001" >&6; }
22108
22109
22110   if test $ac_cv_header_xlocale_h = yes; then
22111     HAVE_XLOCALE_H=1
22112                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h defines locale_t" >&5
22113 $as_echo_n "checking whether locale.h defines locale_t... " >&6; }
22114 if ${gl_cv_header_locale_has_locale_t+:} false; then :
22115   $as_echo_n "(cached) " >&6
22116 else
22117   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22118 /* end confdefs.h.  */
22119 #include <locale.h>
22120               locale_t x;
22121 int
22122 main ()
22123 {
22124
22125   ;
22126   return 0;
22127 }
22128 _ACEOF
22129 if ac_fn_c_try_compile "$LINENO"; then :
22130   gl_cv_header_locale_has_locale_t=yes
22131 else
22132   gl_cv_header_locale_has_locale_t=no
22133 fi
22134 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22135
22136 fi
22137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_has_locale_t" >&5
22138 $as_echo "$gl_cv_header_locale_has_locale_t" >&6; }
22139     if test $gl_cv_header_locale_has_locale_t = yes; then
22140       gl_cv_header_locale_h_needs_xlocale_h=no
22141     else
22142       gl_cv_header_locale_h_needs_xlocale_h=yes
22143     fi
22144   else
22145     HAVE_XLOCALE_H=0
22146     gl_cv_header_locale_h_needs_xlocale_h=no
22147   fi
22148
22149
22150           { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct lconv is properly defined" >&5
22151 $as_echo_n "checking whether struct lconv is properly defined... " >&6; }
22152 if ${gl_cv_sys_struct_lconv_ok+:} false; then :
22153   $as_echo_n "(cached) " >&6
22154 else
22155   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22156 /* end confdefs.h.  */
22157 #include <locale.h>
22158             struct lconv l;
22159             int x = sizeof (l.decimal_point);
22160             int y = sizeof (l.int_p_cs_precedes);
22161 int
22162 main ()
22163 {
22164
22165   ;
22166   return 0;
22167 }
22168 _ACEOF
22169 if ac_fn_c_try_compile "$LINENO"; then :
22170   gl_cv_sys_struct_lconv_ok=yes
22171 else
22172   gl_cv_sys_struct_lconv_ok=no
22173 fi
22174 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22175
22176 fi
22177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_lconv_ok" >&5
22178 $as_echo "$gl_cv_sys_struct_lconv_ok" >&6; }
22179   if test $gl_cv_sys_struct_lconv_ok = no; then
22180     REPLACE_STRUCT_LCONV=1
22181   fi
22182
22183
22184
22185
22186
22187
22188
22189
22190
22191      if test $gl_cv_have_include_next = yes; then
22192        gl_cv_next_locale_h='<'locale.h'>'
22193      else
22194        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <locale.h>" >&5
22195 $as_echo_n "checking absolute name of <locale.h>... " >&6; }
22196 if ${gl_cv_next_locale_h+:} false; then :
22197   $as_echo_n "(cached) " >&6
22198 else
22199
22200                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22201 /* end confdefs.h.  */
22202 #include <locale.h>
22203
22204 _ACEOF
22205                                                                                                                         case "$host_os" in
22206                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
22207                  *)    gl_absname_cpp="$ac_cpp" ;;
22208                esac
22209
22210                case "$host_os" in
22211                  mingw*)
22212                                                                                                                                      gl_dirsep_regex='[/\\]'
22213                    ;;
22214                  *)
22215                    gl_dirsep_regex='\/'
22216                    ;;
22217                esac
22218                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22219
22220                gl_header_literal_regex=`echo 'locale.h' \
22221                                         | sed -e "$gl_make_literal_regex_sed"`
22222                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22223                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22224                    s|^/[^/]|//&|
22225                    p
22226                    q
22227                  }'
22228                                                             gl_cv_next_locale_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22229                       sed -n "$gl_absolute_header_sed"`'"'
22230
22231
22232 fi
22233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_locale_h" >&5
22234 $as_echo "$gl_cv_next_locale_h" >&6; }
22235      fi
22236      NEXT_LOCALE_H=$gl_cv_next_locale_h
22237
22238      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22239        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22240        gl_next_as_first_directive='<'locale.h'>'
22241      else
22242        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22243        gl_next_as_first_directive=$gl_cv_next_locale_h
22244      fi
22245      NEXT_AS_FIRST_DIRECTIVE_LOCALE_H=$gl_next_as_first_directive
22246
22247
22248
22249
22250
22251
22252     for gl_func in setlocale duplocale; do
22253     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
22254     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
22255 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
22256 if eval \${$as_gl_Symbol+:} false; then :
22257   $as_echo_n "(cached) " >&6
22258 else
22259   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22260 /* end confdefs.h.  */
22261 #include <locale.h>
22262 /* Some systems provide declarations in a non-standard header.  */
22263 #if HAVE_XLOCALE_H
22264 # include <xlocale.h>
22265 #endif
22266
22267 int
22268 main ()
22269 {
22270 #undef $gl_func
22271   (void) $gl_func;
22272   ;
22273   return 0;
22274 }
22275 _ACEOF
22276 if ac_fn_c_try_compile "$LINENO"; then :
22277   eval "$as_gl_Symbol=yes"
22278 else
22279   eval "$as_gl_Symbol=no"
22280 fi
22281 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22282 fi
22283 eval ac_res=\$$as_gl_Symbol
22284                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
22285 $as_echo "$ac_res" >&6; }
22286     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
22287   cat >>confdefs.h <<_ACEOF
22288 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
22289 _ACEOF
22290
22291                      eval ac_cv_have_decl_$gl_func=yes
22292 fi
22293       done
22294
22295
22296
22297
22298
22299
22300   if test $REPLACE_STRUCT_LCONV = 1; then
22301     REPLACE_LOCALECONV=1
22302   fi
22303
22304   if test $REPLACE_LOCALECONV = 1; then
22305
22306
22307
22308
22309
22310
22311
22312
22313   gl_LIBOBJS="$gl_LIBOBJS localeconv.$ac_objext"
22314
22315
22316   ac_fn_c_check_member "$LINENO" "struct lconv" "decimal_point" "ac_cv_member_struct_lconv_decimal_point" "#include <locale.h>
22317 "
22318 if test "x$ac_cv_member_struct_lconv_decimal_point" = xyes; then :
22319
22320 cat >>confdefs.h <<_ACEOF
22321 #define HAVE_STRUCT_LCONV_DECIMAL_POINT 1
22322 _ACEOF
22323
22324
22325 fi
22326
22327
22328   fi
22329
22330
22331
22332
22333
22334           GNULIB_LOCALECONV=1
22335
22336
22337
22338
22339
22340 $as_echo "#define GNULIB_TEST_LOCALECONV 1" >>confdefs.h
22341
22342
22343
22344
22345
22346
22347
22348
22349
22350   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lseek detects pipes" >&5
22351 $as_echo_n "checking whether lseek detects pipes... " >&6; }
22352 if ${gl_cv_func_lseek_pipe+:} false; then :
22353   $as_echo_n "(cached) " >&6
22354 else
22355   case "$host_os" in
22356        mingw*)
22357                                                                gl_cv_func_lseek_pipe=no
22358          ;;
22359        *)
22360          if test $cross_compiling = no; then
22361            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22362 /* end confdefs.h.  */
22363
22364 #include <sys/types.h> /* for off_t */
22365 #include <stdio.h> /* for SEEK_CUR */
22366 #if HAVE_UNISTD_H
22367 # include <unistd.h>
22368 #else /* on Windows with MSVC */
22369 # include <io.h>
22370 #endif
22371
22372 int
22373 main ()
22374 {
22375
22376   /* Exit with success only if stdin is seekable.  */
22377   return lseek (0, (off_t)0, SEEK_CUR) < 0;
22378
22379   ;
22380   return 0;
22381 }
22382 _ACEOF
22383 if ac_fn_c_try_link "$LINENO"; then :
22384   if test -s conftest$ac_exeext \
22385                  && ./conftest$ac_exeext < conftest.$ac_ext \
22386                  && test 1 = "`echo hi \
22387                    | { ./conftest$ac_exeext; echo $?; cat >/dev/null; }`"; then
22388                 gl_cv_func_lseek_pipe=yes
22389               else
22390                 gl_cv_func_lseek_pipe=no
22391               fi
22392
22393 else
22394   gl_cv_func_lseek_pipe=no
22395 fi
22396 rm -f core conftest.err conftest.$ac_objext \
22397     conftest$ac_exeext conftest.$ac_ext
22398          else
22399            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22400 /* end confdefs.h.  */
22401
22402 #if defined __BEOS__
22403 /* BeOS mistakenly return 0 when trying to seek on pipes.  */
22404   Choke me.
22405 #endif
22406 _ACEOF
22407 if ac_fn_c_try_compile "$LINENO"; then :
22408   gl_cv_func_lseek_pipe=yes
22409 else
22410   gl_cv_func_lseek_pipe=no
22411 fi
22412 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22413          fi
22414          ;;
22415      esac
22416
22417 fi
22418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lseek_pipe" >&5
22419 $as_echo "$gl_cv_func_lseek_pipe" >&6; }
22420   if test $gl_cv_func_lseek_pipe = no; then
22421     REPLACE_LSEEK=1
22422
22423 $as_echo "#define LSEEK_PIPE_BROKEN 1" >>confdefs.h
22424
22425   fi
22426
22427
22428   if test $WINDOWS_64_BIT_OFF_T = 1; then
22429     REPLACE_LSEEK=1
22430   fi
22431
22432   if test $REPLACE_LSEEK = 1; then
22433
22434
22435
22436
22437
22438
22439
22440
22441   gl_LIBOBJS="$gl_LIBOBJS lseek.$ac_objext"
22442
22443   fi
22444
22445
22446
22447
22448
22449           GNULIB_LSEEK=1
22450
22451
22452
22453
22454
22455 $as_echo "#define GNULIB_TEST_LSEEK 1" >>confdefs.h
22456
22457
22458
22459
22460
22461
22462   if test $ac_cv_func_lstat = yes; then
22463
22464     case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
22465       *no)
22466         REPLACE_LSTAT=1
22467         ;;
22468     esac
22469   else
22470     HAVE_LSTAT=0
22471   fi
22472
22473   if test $REPLACE_LSTAT = 1; then
22474
22475
22476
22477
22478
22479
22480
22481
22482   gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
22483
22484     :
22485   fi
22486
22487
22488
22489
22490
22491           GNULIB_LSTAT=1
22492
22493
22494
22495
22496
22497 $as_echo "#define GNULIB_TEST_LSTAT 1" >>confdefs.h
22498
22499
22500
22501
22502
22503
22504       for ac_header in stdlib.h
22505 do :
22506   ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
22507 if test "x$ac_cv_header_stdlib_h" = xyes; then :
22508   cat >>confdefs.h <<_ACEOF
22509 #define HAVE_STDLIB_H 1
22510 _ACEOF
22511
22512 fi
22513
22514 done
22515
22516   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
22517 $as_echo_n "checking for GNU libc compatible malloc... " >&6; }
22518 if ${ac_cv_func_malloc_0_nonnull+:} false; then :
22519   $as_echo_n "(cached) " >&6
22520 else
22521   if test "$cross_compiling" = yes; then :
22522   case "$host_os" in
22523           # Guess yes on platforms where we know the result.
22524           *-gnu* | freebsd* | netbsd* | openbsd* \
22525           | hpux* | solaris* | cygwin* | mingw*)
22526             ac_cv_func_malloc_0_nonnull=yes ;;
22527           # If we don't know, assume the worst.
22528           *) ac_cv_func_malloc_0_nonnull=no ;;
22529         esac
22530
22531 else
22532   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22533 /* end confdefs.h.  */
22534 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
22535             # include <stdlib.h>
22536             #else
22537             char *malloc ();
22538             #endif
22539
22540 int
22541 main ()
22542 {
22543 return ! malloc (0);
22544   ;
22545   return 0;
22546 }
22547
22548 _ACEOF
22549 if ac_fn_c_try_run "$LINENO"; then :
22550   ac_cv_func_malloc_0_nonnull=yes
22551 else
22552   ac_cv_func_malloc_0_nonnull=no
22553 fi
22554 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22555   conftest.$ac_objext conftest.beam conftest.$ac_ext
22556 fi
22557
22558
22559 fi
22560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
22561 $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
22562   if test $ac_cv_func_malloc_0_nonnull = yes; then :
22563
22564 $as_echo "#define HAVE_MALLOC_GNU 1" >>confdefs.h
22565
22566 else
22567   $as_echo "#define HAVE_MALLOC_GNU 0" >>confdefs.h
22568
22569      REPLACE_MALLOC=1
22570
22571 fi
22572
22573
22574   if test $REPLACE_MALLOC = 1; then
22575
22576
22577
22578
22579
22580
22581
22582
22583   gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
22584
22585   fi
22586
22587
22588 cat >>confdefs.h <<_ACEOF
22589 #define GNULIB_MALLOC_GNU 1
22590 _ACEOF
22591
22592
22593
22594
22595
22596   if test $gl_cv_func_malloc_posix = yes; then
22597
22598 $as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
22599
22600   else
22601     REPLACE_MALLOC=1
22602   fi
22603
22604   if test $REPLACE_MALLOC = 1; then
22605
22606
22607
22608
22609
22610
22611
22612
22613   gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
22614
22615   fi
22616
22617
22618
22619
22620
22621           GNULIB_MALLOC_POSIX=1
22622
22623
22624
22625
22626
22627 $as_echo "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
22628
22629
22630
22631
22632
22633
22634
22635
22636
22637
22638
22639
22640
22641
22642
22643
22644
22645
22646
22647
22648   if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
22649
22650
22651
22652      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
22653 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
22654 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
22655   $as_echo_n "(cached) " >&6
22656 else
22657
22658                   case "$host_os" in
22659                      # Guess no on AIX and OSF/1.
22660         aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
22661                      # Guess yes otherwise.
22662         *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
22663       esac
22664       if test $LOCALE_JA != none; then
22665         if test "$cross_compiling" = yes; then :
22666   :
22667 else
22668   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22669 /* end confdefs.h.  */
22670
22671 #include <locale.h>
22672 #include <string.h>
22673 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22674    <wchar.h>.
22675    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22676    included before <wchar.h>.  */
22677 #include <stddef.h>
22678 #include <stdio.h>
22679 #include <time.h>
22680 #include <wchar.h>
22681 int main ()
22682 {
22683   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
22684     {
22685       const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
22686       mbstate_t state;
22687       wchar_t wc;
22688
22689       memset (&state, '\0', sizeof (mbstate_t));
22690       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
22691         if (mbsinit (&state))
22692           return 1;
22693     }
22694   return 0;
22695 }
22696 _ACEOF
22697 if ac_fn_c_try_run "$LINENO"; then :
22698   gl_cv_func_mbrtowc_incomplete_state=yes
22699 else
22700   gl_cv_func_mbrtowc_incomplete_state=no
22701 fi
22702 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22703   conftest.$ac_objext conftest.beam conftest.$ac_ext
22704 fi
22705
22706       fi
22707
22708 fi
22709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
22710 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
22711
22712
22713
22714
22715      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
22716 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
22717 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
22718   $as_echo_n "(cached) " >&6
22719 else
22720
22721                   case "$host_os" in
22722                     # Guess no on Solaris 8.
22723         solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
22724                     # Guess yes otherwise.
22725         *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
22726       esac
22727       if test $LOCALE_ZH_CN != none; then
22728         if test "$cross_compiling" = yes; then :
22729   :
22730 else
22731   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22732 /* end confdefs.h.  */
22733
22734 #include <locale.h>
22735 #include <stdlib.h>
22736 #include <string.h>
22737 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22738    <wchar.h>.
22739    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22740    included before <wchar.h>.  */
22741 #include <stddef.h>
22742 #include <stdio.h>
22743 #include <time.h>
22744 #include <wchar.h>
22745 int main ()
22746 {
22747   /* This fails on Solaris 8:
22748      mbrtowc returns 2, and sets wc to 0x00F0.
22749      mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
22750   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
22751     {
22752       char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
22753       mbstate_t state;
22754       wchar_t wc;
22755
22756       memset (&state, '\0', sizeof (mbstate_t));
22757       if (mbrtowc (&wc, input + 3, 6, &state) != 4
22758           && mbtowc (&wc, input + 3, 6) == 4)
22759         return 1;
22760     }
22761   return 0;
22762 }
22763 _ACEOF
22764 if ac_fn_c_try_run "$LINENO"; then :
22765   gl_cv_func_mbrtowc_sanitycheck=yes
22766 else
22767   gl_cv_func_mbrtowc_sanitycheck=no
22768 fi
22769 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22770   conftest.$ac_objext conftest.beam conftest.$ac_ext
22771 fi
22772
22773       fi
22774
22775 fi
22776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
22777 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
22778
22779     REPLACE_MBSTATE_T=0
22780     case "$gl_cv_func_mbrtowc_incomplete_state" in
22781       *yes) ;;
22782       *) REPLACE_MBSTATE_T=1 ;;
22783     esac
22784     case "$gl_cv_func_mbrtowc_sanitycheck" in
22785       *yes) ;;
22786       *) REPLACE_MBSTATE_T=1 ;;
22787     esac
22788   else
22789     REPLACE_MBSTATE_T=1
22790   fi
22791
22792
22793
22794   if test $ac_cv_func_mbrtowc = no; then
22795     HAVE_MBRTOWC=0
22796     ac_fn_c_check_decl "$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" "
22797 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22798    <wchar.h>.
22799    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22800    included before <wchar.h>.  */
22801 #include <stddef.h>
22802 #include <stdio.h>
22803 #include <time.h>
22804 #include <wchar.h>
22805
22806 "
22807 if test "x$ac_cv_have_decl_mbrtowc" = xyes; then :
22808   ac_have_decl=1
22809 else
22810   ac_have_decl=0
22811 fi
22812
22813 cat >>confdefs.h <<_ACEOF
22814 #define HAVE_DECL_MBRTOWC $ac_have_decl
22815 _ACEOF
22816
22817     if test $ac_cv_have_decl_mbrtowc = yes; then
22818                         REPLACE_MBRTOWC=1
22819     fi
22820   else
22821     if test $REPLACE_MBSTATE_T = 1; then
22822       REPLACE_MBRTOWC=1
22823     else
22824
22825
22826
22827      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5
22828 $as_echo_n "checking whether mbrtowc handles a NULL pwc argument... " >&6; }
22829 if ${gl_cv_func_mbrtowc_null_arg1+:} false; then :
22830   $as_echo_n "(cached) " >&6
22831 else
22832
22833                   case "$host_os" in
22834                   # Guess no on Solaris.
22835         solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;;
22836                   # Guess yes otherwise.
22837         *)        gl_cv_func_mbrtowc_null_arg1="guessing yes" ;;
22838       esac
22839       if test $LOCALE_FR_UTF8 != none; then
22840         if test "$cross_compiling" = yes; then :
22841   :
22842 else
22843   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22844 /* end confdefs.h.  */
22845
22846 #include <locale.h>
22847 #include <stdlib.h>
22848 #include <string.h>
22849 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22850    <wchar.h>.
22851    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22852    included before <wchar.h>.  */
22853 #include <stddef.h>
22854 #include <stdio.h>
22855 #include <time.h>
22856 #include <wchar.h>
22857 int main ()
22858 {
22859   int result = 0;
22860
22861   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
22862     {
22863       char input[] = "\303\237er";
22864       mbstate_t state;
22865       wchar_t wc;
22866       size_t ret;
22867
22868       memset (&state, '\0', sizeof (mbstate_t));
22869       wc = (wchar_t) 0xBADFACE;
22870       ret = mbrtowc (&wc, input, 5, &state);
22871       if (ret != 2)
22872         result |= 1;
22873       if (!mbsinit (&state))
22874         result |= 2;
22875
22876       memset (&state, '\0', sizeof (mbstate_t));
22877       ret = mbrtowc (NULL, input, 5, &state);
22878       if (ret != 2) /* Solaris 7 fails here: ret is -1.  */
22879         result |= 4;
22880       if (!mbsinit (&state))
22881         result |= 8;
22882     }
22883   return result;
22884 }
22885 _ACEOF
22886 if ac_fn_c_try_run "$LINENO"; then :
22887   gl_cv_func_mbrtowc_null_arg1=yes
22888 else
22889   gl_cv_func_mbrtowc_null_arg1=no
22890 fi
22891 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22892   conftest.$ac_objext conftest.beam conftest.$ac_ext
22893 fi
22894
22895       fi
22896
22897 fi
22898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5
22899 $as_echo "$gl_cv_func_mbrtowc_null_arg1" >&6; }
22900
22901
22902
22903
22904      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
22905 $as_echo_n "checking whether mbrtowc handles a NULL string argument... " >&6; }
22906 if ${gl_cv_func_mbrtowc_null_arg2+:} false; then :
22907   $as_echo_n "(cached) " >&6
22908 else
22909
22910                   case "$host_os" in
22911               # Guess no on OSF/1.
22912         osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;;
22913               # Guess yes otherwise.
22914         *)    gl_cv_func_mbrtowc_null_arg2="guessing yes" ;;
22915       esac
22916       if test $LOCALE_FR_UTF8 != none; then
22917         if test "$cross_compiling" = yes; then :
22918   :
22919 else
22920   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22921 /* end confdefs.h.  */
22922
22923 #include <locale.h>
22924 #include <string.h>
22925 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22926    <wchar.h>.
22927    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22928    included before <wchar.h>.  */
22929 #include <stddef.h>
22930 #include <stdio.h>
22931 #include <time.h>
22932 #include <wchar.h>
22933 int main ()
22934 {
22935   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
22936     {
22937       mbstate_t state;
22938       wchar_t wc;
22939       int ret;
22940
22941       memset (&state, '\0', sizeof (mbstate_t));
22942       wc = (wchar_t) 0xBADFACE;
22943       mbrtowc (&wc, NULL, 5, &state);
22944       /* Check that wc was not modified.  */
22945       if (wc != (wchar_t) 0xBADFACE)
22946         return 1;
22947     }
22948   return 0;
22949 }
22950 _ACEOF
22951 if ac_fn_c_try_run "$LINENO"; then :
22952   gl_cv_func_mbrtowc_null_arg2=yes
22953 else
22954   gl_cv_func_mbrtowc_null_arg2=no
22955 fi
22956 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22957   conftest.$ac_objext conftest.beam conftest.$ac_ext
22958 fi
22959
22960       fi
22961
22962 fi
22963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5
22964 $as_echo "$gl_cv_func_mbrtowc_null_arg2" >&6; }
22965
22966
22967
22968
22969
22970
22971   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
22972 $as_echo_n "checking whether mbrtowc has a correct return value... " >&6; }
22973 if ${gl_cv_func_mbrtowc_retval+:} false; then :
22974   $as_echo_n "(cached) " >&6
22975 else
22976
22977                   case "$host_os" in
22978                                    # Guess no on HP-UX, Solaris, native Windows.
22979         hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;;
22980                                    # Guess yes otherwise.
22981         *)                         gl_cv_func_mbrtowc_retval="guessing yes" ;;
22982       esac
22983       if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \
22984          || { case "$host_os" in mingw*) true;; *) false;; esac; }; then
22985         if test "$cross_compiling" = yes; then :
22986   :
22987 else
22988   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22989 /* end confdefs.h.  */
22990
22991 #include <locale.h>
22992 #include <string.h>
22993 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22994    <wchar.h>.
22995    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22996    included before <wchar.h>.  */
22997 #include <stddef.h>
22998 #include <stdio.h>
22999 #include <time.h>
23000 #include <wchar.h>
23001 int main ()
23002 {
23003   int result = 0;
23004   int found_some_locale = 0;
23005   /* This fails on Solaris.  */
23006   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
23007     {
23008       char input[] = "B\303\274\303\237er"; /* "Büßer" */
23009       mbstate_t state;
23010       wchar_t wc;
23011
23012       memset (&state, '\0', sizeof (mbstate_t));
23013       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
23014         {
23015           input[1] = '\0';
23016           if (mbrtowc (&wc, input + 2, 5, &state) != 1)
23017             result |= 1;
23018         }
23019       found_some_locale = 1;
23020     }
23021   /* This fails on HP-UX 11.11.  */
23022   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
23023     {
23024       char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
23025       mbstate_t state;
23026       wchar_t wc;
23027
23028       memset (&state, '\0', sizeof (mbstate_t));
23029       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
23030         {
23031           input[1] = '\0';
23032           if (mbrtowc (&wc, input + 2, 5, &state) != 2)
23033             result |= 2;
23034         }
23035       found_some_locale = 1;
23036     }
23037   /* This fails on native Windows.  */
23038   if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
23039     {
23040       char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */
23041       mbstate_t state;
23042       wchar_t wc;
23043
23044       memset (&state, '\0', sizeof (mbstate_t));
23045       if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
23046         {
23047           input[3] = '\0';
23048           if (mbrtowc (&wc, input + 4, 4, &state) != 1)
23049             result |= 4;
23050         }
23051       found_some_locale = 1;
23052     }
23053   if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
23054     {
23055       char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */
23056       mbstate_t state;
23057       wchar_t wc;
23058
23059       memset (&state, '\0', sizeof (mbstate_t));
23060       if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
23061         {
23062           input[3] = '\0';
23063           if (mbrtowc (&wc, input + 4, 4, &state) != 1)
23064             result |= 8;
23065         }
23066       found_some_locale = 1;
23067     }
23068   if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
23069     {
23070       char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */
23071       mbstate_t state;
23072       wchar_t wc;
23073
23074       memset (&state, '\0', sizeof (mbstate_t));
23075       if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
23076         {
23077           input[3] = '\0';
23078           if (mbrtowc (&wc, input + 4, 4, &state) != 1)
23079             result |= 16;
23080         }
23081       found_some_locale = 1;
23082     }
23083   return (found_some_locale ? result : 77);
23084 }
23085 _ACEOF
23086 if ac_fn_c_try_run "$LINENO"; then :
23087   gl_cv_func_mbrtowc_retval=yes
23088 else
23089   if test $? != 77; then
23090              gl_cv_func_mbrtowc_retval=no
23091            fi
23092
23093 fi
23094 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23095   conftest.$ac_objext conftest.beam conftest.$ac_ext
23096 fi
23097
23098       fi
23099
23100 fi
23101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
23102 $as_echo "$gl_cv_func_mbrtowc_retval" >&6; }
23103
23104
23105
23106
23107      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
23108 $as_echo_n "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
23109 if ${gl_cv_func_mbrtowc_nul_retval+:} false; then :
23110   $as_echo_n "(cached) " >&6
23111 else
23112
23113                   case "$host_os" in
23114                        # Guess no on Solaris 8 and 9.
23115         solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
23116                        # Guess yes otherwise.
23117         *)             gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
23118       esac
23119       if test $LOCALE_ZH_CN != none; then
23120         if test "$cross_compiling" = yes; then :
23121   :
23122 else
23123   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23124 /* end confdefs.h.  */
23125
23126 #include <locale.h>
23127 #include <string.h>
23128 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
23129    <wchar.h>.
23130    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
23131    included before <wchar.h>.  */
23132 #include <stddef.h>
23133 #include <stdio.h>
23134 #include <time.h>
23135 #include <wchar.h>
23136 int main ()
23137 {
23138   /* This fails on Solaris 8 and 9.  */
23139   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
23140     {
23141       mbstate_t state;
23142       wchar_t wc;
23143
23144       memset (&state, '\0', sizeof (mbstate_t));
23145       if (mbrtowc (&wc, "", 1, &state) != 0)
23146         return 1;
23147     }
23148   return 0;
23149 }
23150 _ACEOF
23151 if ac_fn_c_try_run "$LINENO"; then :
23152   gl_cv_func_mbrtowc_nul_retval=yes
23153 else
23154   gl_cv_func_mbrtowc_nul_retval=no
23155 fi
23156 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23157   conftest.$ac_objext conftest.beam conftest.$ac_ext
23158 fi
23159
23160       fi
23161
23162 fi
23163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
23164 $as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; }
23165
23166       case "$gl_cv_func_mbrtowc_null_arg1" in
23167         *yes) ;;
23168         *)
23169 $as_echo "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h
23170
23171            REPLACE_MBRTOWC=1
23172            ;;
23173       esac
23174       case "$gl_cv_func_mbrtowc_null_arg2" in
23175         *yes) ;;
23176         *)
23177 $as_echo "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h
23178
23179            REPLACE_MBRTOWC=1
23180            ;;
23181       esac
23182       case "$gl_cv_func_mbrtowc_retval" in
23183         *yes) ;;
23184         *)
23185 $as_echo "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
23186
23187            REPLACE_MBRTOWC=1
23188            ;;
23189       esac
23190       case "$gl_cv_func_mbrtowc_nul_retval" in
23191         *yes) ;;
23192         *)
23193 $as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
23194
23195            REPLACE_MBRTOWC=1
23196            ;;
23197       esac
23198     fi
23199   fi
23200
23201   if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
23202
23203
23204
23205
23206
23207
23208
23209
23210   gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext"
23211
23212
23213   :
23214
23215   fi
23216
23217
23218
23219
23220
23221           GNULIB_MBRTOWC=1
23222
23223
23224
23225
23226
23227 $as_echo "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h
23228
23229
23230
23231
23232
23233
23234
23235
23236           GNULIB_MBSCASECMP=1
23237
23238
23239
23240
23241
23242 $as_echo "#define GNULIB_TEST_MBSCASECMP 1" >>confdefs.h
23243
23244
23245
23246
23247
23248
23249
23250
23251
23252
23253
23254
23255
23256
23257   if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
23258
23259
23260
23261      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
23262 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
23263 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
23264   $as_echo_n "(cached) " >&6
23265 else
23266
23267                   case "$host_os" in
23268                      # Guess no on AIX and OSF/1.
23269         aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
23270                      # Guess yes otherwise.
23271         *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
23272       esac
23273       if test $LOCALE_JA != none; then
23274         if test "$cross_compiling" = yes; then :
23275   :
23276 else
23277   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23278 /* end confdefs.h.  */
23279
23280 #include <locale.h>
23281 #include <string.h>
23282 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
23283    <wchar.h>.
23284    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
23285    included before <wchar.h>.  */
23286 #include <stddef.h>
23287 #include <stdio.h>
23288 #include <time.h>
23289 #include <wchar.h>
23290 int main ()
23291 {
23292   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
23293     {
23294       const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
23295       mbstate_t state;
23296       wchar_t wc;
23297
23298       memset (&state, '\0', sizeof (mbstate_t));
23299       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
23300         if (mbsinit (&state))
23301           return 1;
23302     }
23303   return 0;
23304 }
23305 _ACEOF
23306 if ac_fn_c_try_run "$LINENO"; then :
23307   gl_cv_func_mbrtowc_incomplete_state=yes
23308 else
23309   gl_cv_func_mbrtowc_incomplete_state=no
23310 fi
23311 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23312   conftest.$ac_objext conftest.beam conftest.$ac_ext
23313 fi
23314
23315       fi
23316
23317 fi
23318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
23319 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
23320
23321
23322
23323
23324      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
23325 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
23326 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
23327   $as_echo_n "(cached) " >&6
23328 else
23329
23330                   case "$host_os" in
23331                     # Guess no on Solaris 8.
23332         solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
23333                     # Guess yes otherwise.
23334         *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
23335       esac
23336       if test $LOCALE_ZH_CN != none; then
23337         if test "$cross_compiling" = yes; then :
23338   :
23339 else
23340   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23341 /* end confdefs.h.  */
23342
23343 #include <locale.h>
23344 #include <stdlib.h>
23345 #include <string.h>
23346 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
23347    <wchar.h>.
23348    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
23349    included before <wchar.h>.  */
23350 #include <stddef.h>
23351 #include <stdio.h>
23352 #include <time.h>
23353 #include <wchar.h>
23354 int main ()
23355 {
23356   /* This fails on Solaris 8:
23357      mbrtowc returns 2, and sets wc to 0x00F0.
23358      mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
23359   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
23360     {
23361       char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
23362       mbstate_t state;
23363       wchar_t wc;
23364
23365       memset (&state, '\0', sizeof (mbstate_t));
23366       if (mbrtowc (&wc, input + 3, 6, &state) != 4
23367           && mbtowc (&wc, input + 3, 6) == 4)
23368         return 1;
23369     }
23370   return 0;
23371 }
23372 _ACEOF
23373 if ac_fn_c_try_run "$LINENO"; then :
23374   gl_cv_func_mbrtowc_sanitycheck=yes
23375 else
23376   gl_cv_func_mbrtowc_sanitycheck=no
23377 fi
23378 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23379   conftest.$ac_objext conftest.beam conftest.$ac_ext
23380 fi
23381
23382       fi
23383
23384 fi
23385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
23386 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
23387
23388     REPLACE_MBSTATE_T=0
23389     case "$gl_cv_func_mbrtowc_incomplete_state" in
23390       *yes) ;;
23391       *) REPLACE_MBSTATE_T=1 ;;
23392     esac
23393     case "$gl_cv_func_mbrtowc_sanitycheck" in
23394       *yes) ;;
23395       *) REPLACE_MBSTATE_T=1 ;;
23396     esac
23397   else
23398     REPLACE_MBSTATE_T=1
23399   fi
23400
23401
23402
23403   if test $ac_cv_func_mbsinit = no; then
23404     HAVE_MBSINIT=0
23405     ac_fn_c_check_decl "$LINENO" "mbsinit" "ac_cv_have_decl_mbsinit" "
23406 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
23407    <wchar.h>.
23408    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
23409    included before <wchar.h>.  */
23410 #include <stddef.h>
23411 #include <stdio.h>
23412 #include <time.h>
23413 #include <wchar.h>
23414
23415 "
23416 if test "x$ac_cv_have_decl_mbsinit" = xyes; then :
23417   ac_have_decl=1
23418 else
23419   ac_have_decl=0
23420 fi
23421
23422 cat >>confdefs.h <<_ACEOF
23423 #define HAVE_DECL_MBSINIT $ac_have_decl
23424 _ACEOF
23425
23426     if test $ac_cv_have_decl_mbsinit = yes; then
23427                         REPLACE_MBSINIT=1
23428     fi
23429   else
23430     if test $REPLACE_MBSTATE_T = 1; then
23431       REPLACE_MBSINIT=1
23432     else
23433                         case "$host_os" in
23434         mingw*) REPLACE_MBSINIT=1 ;;
23435       esac
23436     fi
23437   fi
23438
23439   if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
23440
23441
23442
23443
23444
23445
23446
23447
23448   gl_LIBOBJS="$gl_LIBOBJS mbsinit.$ac_objext"
23449
23450
23451   :
23452
23453   fi
23454
23455
23456
23457
23458
23459           GNULIB_MBSINIT=1
23460
23461
23462
23463
23464
23465 $as_echo "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h
23466
23467
23468
23469
23470
23471
23472
23473
23474
23475
23476
23477
23478
23479   if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
23480
23481
23482
23483      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
23484 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
23485 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
23486   $as_echo_n "(cached) " >&6
23487 else
23488
23489                   case "$host_os" in
23490                      # Guess no on AIX and OSF/1.
23491         aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
23492                      # Guess yes otherwise.
23493         *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
23494       esac
23495       if test $LOCALE_JA != none; then
23496         if test "$cross_compiling" = yes; then :
23497   :
23498 else
23499   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23500 /* end confdefs.h.  */
23501
23502 #include <locale.h>
23503 #include <string.h>
23504 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
23505    <wchar.h>.
23506    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
23507    included before <wchar.h>.  */
23508 #include <stddef.h>
23509 #include <stdio.h>
23510 #include <time.h>
23511 #include <wchar.h>
23512 int main ()
23513 {
23514   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
23515     {
23516       const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
23517       mbstate_t state;
23518       wchar_t wc;
23519
23520       memset (&state, '\0', sizeof (mbstate_t));
23521       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
23522         if (mbsinit (&state))
23523           return 1;
23524     }
23525   return 0;
23526 }
23527 _ACEOF
23528 if ac_fn_c_try_run "$LINENO"; then :
23529   gl_cv_func_mbrtowc_incomplete_state=yes
23530 else
23531   gl_cv_func_mbrtowc_incomplete_state=no
23532 fi
23533 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23534   conftest.$ac_objext conftest.beam conftest.$ac_ext
23535 fi
23536
23537       fi
23538
23539 fi
23540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
23541 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
23542
23543
23544
23545
23546      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
23547 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
23548 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
23549   $as_echo_n "(cached) " >&6
23550 else
23551
23552                   case "$host_os" in
23553                     # Guess no on Solaris 8.
23554         solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
23555                     # Guess yes otherwise.
23556         *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
23557       esac
23558       if test $LOCALE_ZH_CN != none; then
23559         if test "$cross_compiling" = yes; then :
23560   :
23561 else
23562   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23563 /* end confdefs.h.  */
23564
23565 #include <locale.h>
23566 #include <stdlib.h>
23567 #include <string.h>
23568 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
23569    <wchar.h>.
23570    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
23571    included before <wchar.h>.  */
23572 #include <stddef.h>
23573 #include <stdio.h>
23574 #include <time.h>
23575 #include <wchar.h>
23576 int main ()
23577 {
23578   /* This fails on Solaris 8:
23579      mbrtowc returns 2, and sets wc to 0x00F0.
23580      mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
23581   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
23582     {
23583       char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
23584       mbstate_t state;
23585       wchar_t wc;
23586
23587       memset (&state, '\0', sizeof (mbstate_t));
23588       if (mbrtowc (&wc, input + 3, 6, &state) != 4
23589           && mbtowc (&wc, input + 3, 6) == 4)
23590         return 1;
23591     }
23592   return 0;
23593 }
23594 _ACEOF
23595 if ac_fn_c_try_run "$LINENO"; then :
23596   gl_cv_func_mbrtowc_sanitycheck=yes
23597 else
23598   gl_cv_func_mbrtowc_sanitycheck=no
23599 fi
23600 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23601   conftest.$ac_objext conftest.beam conftest.$ac_ext
23602 fi
23603
23604       fi
23605
23606 fi
23607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
23608 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
23609
23610     REPLACE_MBSTATE_T=0
23611     case "$gl_cv_func_mbrtowc_incomplete_state" in
23612       *yes) ;;
23613       *) REPLACE_MBSTATE_T=1 ;;
23614     esac
23615     case "$gl_cv_func_mbrtowc_sanitycheck" in
23616       *yes) ;;
23617       *) REPLACE_MBSTATE_T=1 ;;
23618     esac
23619   else
23620     REPLACE_MBSTATE_T=1
23621   fi
23622
23623
23624
23625   if test $ac_cv_func_mbsrtowcs = no; then
23626     HAVE_MBSRTOWCS=0
23627     ac_fn_c_check_decl "$LINENO" "mbsrtowcs" "ac_cv_have_decl_mbsrtowcs" "
23628 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
23629    <wchar.h>.
23630    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
23631    included before <wchar.h>.  */
23632 #include <stddef.h>
23633 #include <stdio.h>
23634 #include <time.h>
23635 #include <wchar.h>
23636
23637 "
23638 if test "x$ac_cv_have_decl_mbsrtowcs" = xyes; then :
23639   ac_have_decl=1
23640 else
23641   ac_have_decl=0
23642 fi
23643
23644 cat >>confdefs.h <<_ACEOF
23645 #define HAVE_DECL_MBSRTOWCS $ac_have_decl
23646 _ACEOF
23647
23648     if test $ac_cv_have_decl_mbsrtowcs = yes; then
23649                         REPLACE_MBSRTOWCS=1
23650     fi
23651   else
23652     if test $REPLACE_MBSTATE_T = 1; then
23653       REPLACE_MBSRTOWCS=1
23654     else
23655
23656
23657
23658
23659
23660
23661      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbsrtowcs works" >&5
23662 $as_echo_n "checking whether mbsrtowcs works... " >&6; }
23663 if ${gl_cv_func_mbsrtowcs_works+:} false; then :
23664   $as_echo_n "(cached) " >&6
23665 else
23666
23667                   case "$host_os" in
23668                                    # Guess no on HP-UX, Solaris, mingw.
23669         hpux* | solaris* | mingw*) gl_cv_func_mbsrtowcs_works="guessing no" ;;
23670                                    # Guess yes otherwise.
23671         *)                         gl_cv_func_mbsrtowcs_works="guessing yes" ;;
23672       esac
23673       if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
23674         if test "$cross_compiling" = yes; then :
23675   :
23676 else
23677   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23678 /* end confdefs.h.  */
23679
23680 #include <locale.h>
23681 #include <string.h>
23682 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
23683    <wchar.h>.
23684    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
23685    included before <wchar.h>.  */
23686 #include <stddef.h>
23687 #include <stdio.h>
23688 #include <time.h>
23689 #include <wchar.h>
23690 int main ()
23691 {
23692   int result = 0;
23693   /* Test whether the function supports a NULL destination argument.
23694      This fails on native Windows.  */
23695   if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
23696     {
23697       const char input[] = "\337er";
23698       const char *src = input;
23699       mbstate_t state;
23700
23701       memset (&state, '\0', sizeof (mbstate_t));
23702       if (mbsrtowcs (NULL, &src, 1, &state) != 3
23703           || src != input)
23704         result |= 1;
23705     }
23706   /* Test whether the function works when started with a conversion state
23707      in non-initial state.  This fails on HP-UX 11.11 and Solaris 10.  */
23708   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
23709     {
23710       const char input[] = "B\303\274\303\237er";
23711       mbstate_t state;
23712
23713       memset (&state, '\0', sizeof (mbstate_t));
23714       if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
23715         if (!mbsinit (&state))
23716           {
23717             const char *src = input + 2;
23718             if (mbsrtowcs (NULL, &src, 10, &state) != 4)
23719               result |= 2;
23720           }
23721     }
23722   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
23723     {
23724       const char input[] = "<\306\374\313\334\270\354>";
23725       mbstate_t state;
23726
23727       memset (&state, '\0', sizeof (mbstate_t));
23728       if (mbrtowc (NULL, input + 3, 1, &state) == (size_t)(-2))
23729         if (!mbsinit (&state))
23730           {
23731             const char *src = input + 4;
23732             if (mbsrtowcs (NULL, &src, 10, &state) != 3)
23733               result |= 4;
23734           }
23735     }
23736   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
23737     {
23738       const char input[] = "B\250\271\201\060\211\070er";
23739       mbstate_t state;
23740
23741       memset (&state, '\0', sizeof (mbstate_t));
23742       if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
23743         if (!mbsinit (&state))
23744           {
23745             const char *src = input + 2;
23746             if (mbsrtowcs (NULL, &src, 10, &state) != 4)
23747               result |= 8;
23748           }
23749     }
23750   return result;
23751 }
23752 _ACEOF
23753 if ac_fn_c_try_run "$LINENO"; then :
23754   gl_cv_func_mbsrtowcs_works=yes
23755 else
23756   gl_cv_func_mbsrtowcs_works=no
23757 fi
23758 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23759   conftest.$ac_objext conftest.beam conftest.$ac_ext
23760 fi
23761
23762       fi
23763
23764 fi
23765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbsrtowcs_works" >&5
23766 $as_echo "$gl_cv_func_mbsrtowcs_works" >&6; }
23767
23768       case "$gl_cv_func_mbsrtowcs_works" in
23769         *yes) ;;
23770         *) REPLACE_MBSRTOWCS=1 ;;
23771       esac
23772     fi
23773   fi
23774
23775   if test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1; then
23776
23777
23778
23779
23780
23781
23782
23783
23784   gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs.$ac_objext"
23785
23786
23787
23788
23789
23790
23791
23792
23793
23794   gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs-state.$ac_objext"
23795
23796
23797   :
23798
23799   fi
23800
23801
23802
23803
23804
23805           GNULIB_MBSRTOWCS=1
23806
23807
23808
23809
23810
23811 $as_echo "#define GNULIB_TEST_MBSRTOWCS 1" >>confdefs.h
23812
23813
23814
23815
23816
23817
23818   if false; then
23819     REPLACE_MBTOWC=1
23820   fi
23821
23822   if test $REPLACE_MBTOWC = 1; then
23823
23824
23825
23826
23827
23828
23829
23830
23831   gl_LIBOBJS="$gl_LIBOBJS mbtowc.$ac_objext"
23832
23833
23834   :
23835
23836   fi
23837
23838
23839
23840
23841
23842           GNULIB_MBTOWC=1
23843
23844
23845
23846
23847
23848 $as_echo "#define GNULIB_TEST_MBTOWC 1" >>confdefs.h
23849
23850
23851
23852
23853
23854   :
23855
23856
23857   if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
23858
23859
23860
23861
23862
23863
23864
23865
23866   gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext"
23867
23868
23869   for ac_header in bp-sym.h
23870 do :
23871   ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
23872 if test "x$ac_cv_header_bp_sym_h" = xyes; then :
23873   cat >>confdefs.h <<_ACEOF
23874 #define HAVE_BP_SYM_H 1
23875 _ACEOF
23876
23877 fi
23878
23879 done
23880
23881
23882   fi
23883
23884
23885
23886
23887
23888           GNULIB_MEMCHR=1
23889
23890
23891
23892
23893
23894 $as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
23895
23896
23897
23898
23899
23900
23901
23902
23903
23904   for ac_func in mempcpy
23905 do :
23906   ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
23907 if test "x$ac_cv_func_mempcpy" = xyes; then :
23908   cat >>confdefs.h <<_ACEOF
23909 #define HAVE_MEMPCPY 1
23910 _ACEOF
23911
23912 fi
23913 done
23914
23915   if test $ac_cv_func_mempcpy = no; then
23916     HAVE_MEMPCPY=0
23917   fi
23918
23919   if test $HAVE_MEMPCPY = 0; then
23920
23921
23922
23923
23924
23925
23926
23927
23928   gl_LIBOBJS="$gl_LIBOBJS mempcpy.$ac_objext"
23929
23930
23931   :
23932
23933   fi
23934
23935
23936
23937
23938
23939           GNULIB_MEMPCPY=1
23940
23941
23942
23943
23944
23945 $as_echo "#define GNULIB_TEST_MEMPCPY 1" >>confdefs.h
23946
23947
23948
23949
23950
23951
23952
23953
23954   if test $ac_cv_have_decl_memrchr = no; then
23955     HAVE_DECL_MEMRCHR=0
23956   fi
23957
23958   for ac_func in memrchr
23959 do :
23960   ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr"
23961 if test "x$ac_cv_func_memrchr" = xyes; then :
23962   cat >>confdefs.h <<_ACEOF
23963 #define HAVE_MEMRCHR 1
23964 _ACEOF
23965
23966 fi
23967 done
23968
23969
23970   if test $ac_cv_func_memrchr = no; then
23971
23972
23973
23974
23975
23976
23977
23978
23979   gl_LIBOBJS="$gl_LIBOBJS memrchr.$ac_objext"
23980
23981     :
23982   fi
23983
23984
23985
23986
23987
23988           GNULIB_MEMRCHR=1
23989
23990
23991
23992
23993
23994 $as_echo "#define GNULIB_TEST_MEMRCHR 1" >>confdefs.h
23995
23996
23997
23998
23999
24000   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing slash" >&5
24001 $as_echo_n "checking whether mkdir handles trailing slash... " >&6; }
24002 if ${gl_cv_func_mkdir_trailing_slash_works+:} false; then :
24003   $as_echo_n "(cached) " >&6
24004 else
24005   rm -rf conftest.dir
24006       if test "$cross_compiling" = yes; then :
24007   case "$host_os" in
24008                  # Guess yes on glibc systems.
24009          *-gnu*) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
24010                  # If we don't know, assume the worst.
24011          *)      gl_cv_func_mkdir_trailing_slash_works="guessing no" ;;
24012        esac
24013
24014 else
24015   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24016 /* end confdefs.h.  */
24017
24018 #       include <sys/types.h>
24019 #       include <sys/stat.h>
24020
24021 int
24022 main ()
24023 {
24024 return mkdir ("conftest.dir/", 0700);
24025   ;
24026   return 0;
24027 }
24028 _ACEOF
24029 if ac_fn_c_try_run "$LINENO"; then :
24030   gl_cv_func_mkdir_trailing_slash_works=yes
24031 else
24032   gl_cv_func_mkdir_trailing_slash_works=no
24033 fi
24034 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24035   conftest.$ac_objext conftest.beam conftest.$ac_ext
24036 fi
24037
24038     rm -rf conftest.dir
24039
24040
24041 fi
24042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_slash_works" >&5
24043 $as_echo "$gl_cv_func_mkdir_trailing_slash_works" >&6; }
24044   case "$gl_cv_func_mkdir_trailing_slash_works" in
24045     *yes) ;;
24046     *)
24047       REPLACE_MKDIR=1
24048       ;;
24049   esac
24050
24051   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing dot" >&5
24052 $as_echo_n "checking whether mkdir handles trailing dot... " >&6; }
24053 if ${gl_cv_func_mkdir_trailing_dot_works+:} false; then :
24054   $as_echo_n "(cached) " >&6
24055 else
24056   rm -rf conftest.dir
24057       if test "$cross_compiling" = yes; then :
24058   case "$host_os" in
24059                  # Guess yes on glibc systems.
24060          *-gnu*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
24061                  # If we don't know, assume the worst.
24062          *)      gl_cv_func_mkdir_trailing_dot_works="guessing no" ;;
24063        esac
24064
24065 else
24066   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24067 /* end confdefs.h.  */
24068
24069 #       include <sys/types.h>
24070 #       include <sys/stat.h>
24071
24072 int
24073 main ()
24074 {
24075 return !mkdir ("conftest.dir/./", 0700);
24076   ;
24077   return 0;
24078 }
24079 _ACEOF
24080 if ac_fn_c_try_run "$LINENO"; then :
24081   gl_cv_func_mkdir_trailing_dot_works=yes
24082 else
24083   gl_cv_func_mkdir_trailing_dot_works=no
24084 fi
24085 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24086   conftest.$ac_objext conftest.beam conftest.$ac_ext
24087 fi
24088
24089     rm -rf conftest.dir
24090
24091
24092 fi
24093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_dot_works" >&5
24094 $as_echo "$gl_cv_func_mkdir_trailing_dot_works" >&6; }
24095   case "$gl_cv_func_mkdir_trailing_dot_works" in
24096     *yes) ;;
24097     *)
24098       REPLACE_MKDIR=1
24099
24100 $as_echo "#define FUNC_MKDIR_DOT_BUG 1" >>confdefs.h
24101
24102       ;;
24103   esac
24104
24105   if test $REPLACE_MKDIR = 1; then
24106
24107
24108
24109
24110
24111
24112
24113
24114   gl_LIBOBJS="$gl_LIBOBJS mkdir.$ac_objext"
24115
24116   fi
24117
24118
24119
24120
24121   if test $ac_cv_func_mkdirat != yes; then
24122     HAVE_MKDIRAT=0
24123   fi
24124
24125   if test $HAVE_MKDIRAT = 0; then
24126
24127
24128
24129
24130
24131
24132
24133
24134   gl_LIBOBJS="$gl_LIBOBJS mkdirat.$ac_objext"
24135
24136
24137
24138
24139   fi
24140
24141
24142
24143
24144
24145           GNULIB_MKDIRAT=1
24146
24147
24148
24149
24150
24151 $as_echo "#define GNULIB_TEST_MKDIRAT 1" >>confdefs.h
24152
24153
24154
24155
24156
24157   for ac_func in mkdtemp
24158 do :
24159   ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
24160 if test "x$ac_cv_func_mkdtemp" = xyes; then :
24161   cat >>confdefs.h <<_ACEOF
24162 #define HAVE_MKDTEMP 1
24163 _ACEOF
24164
24165 fi
24166 done
24167
24168   if test $ac_cv_func_mkdtemp = no; then
24169     HAVE_MKDTEMP=0
24170   fi
24171
24172   if test $HAVE_MKDTEMP = 0; then
24173
24174
24175
24176
24177
24178
24179
24180
24181   gl_LIBOBJS="$gl_LIBOBJS mkdtemp.$ac_objext"
24182
24183     :
24184
24185   fi
24186
24187
24188
24189
24190
24191           GNULIB_MKDTEMP=1
24192
24193
24194
24195
24196
24197 $as_echo "#define GNULIB_TEST_MKDTEMP 1" >>confdefs.h
24198
24199
24200
24201
24202
24203
24204   if test $ac_cv_func_mkfifo = no; then
24205     HAVE_MKFIFO=0
24206   else
24207
24208     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkfifo rejects trailing slashes" >&5
24209 $as_echo_n "checking whether mkfifo rejects trailing slashes... " >&6; }
24210 if ${gl_cv_func_mkfifo_works+:} false; then :
24211   $as_echo_n "(cached) " >&6
24212 else
24213   # Assume that if we have lstat, we can also check symlinks.
24214        if test $ac_cv_func_lstat = yes; then
24215          ln -s conftest.tmp conftest.lnk
24216        fi
24217        if test "$cross_compiling" = yes; then :
24218   case "$host_os" in
24219                     # Guess yes on glibc systems.
24220             *-gnu*) gl_cv_func_mkfifo_works="guessing yes" ;;
24221                     # If we don't know, assume the worst.
24222             *)      gl_cv_func_mkfifo_works="guessing no" ;;
24223           esac
24224
24225 else
24226   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24227 /* end confdefs.h.  */
24228 #include <sys/stat.h>
24229
24230 int
24231 main ()
24232 {
24233 int result = 0;
24234              if (!mkfifo ("conftest.tmp/", 0600))
24235                result |= 1;
24236 #if HAVE_LSTAT
24237              if (!mkfifo ("conftest.lnk/", 0600))
24238                result |= 2;
24239 #endif
24240              return result;
24241
24242   ;
24243   return 0;
24244 }
24245 _ACEOF
24246 if ac_fn_c_try_run "$LINENO"; then :
24247   gl_cv_func_mkfifo_works=yes
24248 else
24249   gl_cv_func_mkfifo_works=no
24250 fi
24251 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24252   conftest.$ac_objext conftest.beam conftest.$ac_ext
24253 fi
24254
24255        rm -f conftest.tmp conftest.lnk
24256 fi
24257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkfifo_works" >&5
24258 $as_echo "$gl_cv_func_mkfifo_works" >&6; }
24259     case "$gl_cv_func_mkfifo_works" in
24260       *yes) ;;
24261       *)
24262
24263 $as_echo "#define MKFIFO_TRAILING_SLASH_BUG 1" >>confdefs.h
24264
24265         REPLACE_MKFIFO=1
24266         ;;
24267     esac
24268   fi
24269
24270   if test $HAVE_MKFIFO = 0 || test $REPLACE_MKFIFO = 1; then
24271
24272
24273
24274
24275
24276
24277
24278
24279   gl_LIBOBJS="$gl_LIBOBJS mkfifo.$ac_objext"
24280
24281   fi
24282
24283
24284
24285
24286
24287           GNULIB_MKFIFO=1
24288
24289
24290
24291
24292
24293 $as_echo "#define GNULIB_TEST_MKFIFO 1" >>confdefs.h
24294
24295
24296
24297
24298
24299
24300
24301
24302   if test $ac_cv_func_mkfifoat = no; then
24303     # No known system has mkfifoat but not mknodat
24304     HAVE_MKFIFOAT=0
24305     HAVE_MKNODAT=0
24306   fi
24307
24308   if test $HAVE_MKFIFOAT = 0; then
24309
24310
24311
24312
24313
24314
24315
24316
24317   gl_LIBOBJS="$gl_LIBOBJS mkfifoat.$ac_objext"
24318
24319   fi
24320   if test $HAVE_MKNODAT = 0; then
24321
24322
24323
24324
24325
24326
24327
24328
24329   gl_LIBOBJS="$gl_LIBOBJS mknodat.$ac_objext"
24330
24331   fi
24332
24333
24334
24335
24336
24337           GNULIB_MKFIFOAT=1
24338
24339
24340
24341
24342
24343 $as_echo "#define GNULIB_TEST_MKFIFOAT 1" >>confdefs.h
24344
24345
24346
24347
24348
24349
24350
24351
24352           GNULIB_MKNODAT=1
24353
24354
24355
24356
24357
24358 $as_echo "#define GNULIB_TEST_MKNODAT 1" >>confdefs.h
24359
24360
24361
24362
24363
24364
24365
24366
24367   if test $ac_cv_func_mknod = no; then
24368     HAVE_MKNOD=0
24369   else
24370         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mknod can create fifo without root privileges" >&5
24371 $as_echo_n "checking whether mknod can create fifo without root privileges... " >&6; }
24372 if ${gl_cv_func_mknod_works+:} false; then :
24373   $as_echo_n "(cached) " >&6
24374 else
24375   if test "$cross_compiling" = yes; then :
24376   case "$host_os" in
24377                     # Guess yes on glibc systems.
24378             *-gnu*) gl_cv_func_mknod_works="guessing yes" ;;
24379                     # If we don't know, assume the worst.
24380             *)      gl_cv_func_mknod_works="guessing no" ;;
24381           esac
24382
24383 else
24384   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24385 /* end confdefs.h.  */
24386 #include <sys/stat.h>
24387              #include <unistd.h>
24388
24389              /* Copied from root-uid.h.  FIXME: Just use root-uid.h.  */
24390              #ifdef __TANDEM
24391              # define ROOT_UID 65535
24392              #else
24393              # define ROOT_UID 0
24394              #endif
24395
24396 int
24397 main ()
24398 {
24399 /* Indeterminate for super-user, assume no.  Why are you running
24400          configure as root, anyway?  */
24401       if (geteuid () == ROOT_UID) return 99;
24402       if (mknod ("conftest.fifo", S_IFIFO | 0600, 0)) return 2;
24403   ;
24404   return 0;
24405 }
24406 _ACEOF
24407 if ac_fn_c_try_run "$LINENO"; then :
24408   gl_cv_func_mknod_works=yes
24409 else
24410   if test $? = 99 && test x"$FORCE_UNSAFE_CONFIGURE" = x; then
24411             { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24412 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24413 as_fn_error $? "you should not run configure as root (set FORCE_UNSAFE_CONFIGURE=1 in environment to bypass this check)
24414 See \`config.log' for more details" "$LINENO" 5; }
24415           fi
24416           gl_cv_func_mknod_works=no
24417 fi
24418 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24419   conftest.$ac_objext conftest.beam conftest.$ac_ext
24420 fi
24421
24422        rm -f conftest.fifo
24423 fi
24424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mknod_works" >&5
24425 $as_echo "$gl_cv_func_mknod_works" >&6; }
24426     case "$gl_cv_func_mknod_works" in
24427       *yes) ;;
24428       *)
24429         REPLACE_MKNOD=1
24430
24431 $as_echo "#define MKNOD_FIFO_BUG 1" >>confdefs.h
24432
24433         ;;
24434     esac
24435         if test $REPLACE_MKFIFO = 1; then
24436       REPLACE_MKNOD=1
24437     fi
24438   fi
24439
24440   if test $HAVE_MKNOD = 0 || test $REPLACE_MKNOD = 1; then
24441
24442
24443
24444
24445
24446
24447
24448
24449   gl_LIBOBJS="$gl_LIBOBJS mknod.$ac_objext"
24450
24451   fi
24452
24453
24454
24455
24456
24457           GNULIB_MKNOD=1
24458
24459
24460
24461
24462
24463 $as_echo "#define GNULIB_TEST_MKNOD 1" >>confdefs.h
24464
24465
24466
24467
24468
24469
24470
24471
24472
24473   if test $APPLE_UNIVERSAL_BUILD = 1; then
24474     # A universal build on Apple Mac OS X platforms.
24475     # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode.
24476     # But we need a configuration result that is valid in both modes.
24477     gl_cv_func_working_mktime=no
24478   fi
24479   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5
24480 $as_echo_n "checking for working mktime... " >&6; }
24481 if ${gl_cv_func_working_mktime+:} false; then :
24482   $as_echo_n "(cached) " >&6
24483 else
24484   if test "$cross_compiling" = yes; then :
24485   gl_cv_func_working_mktime=no
24486 else
24487   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24488 /* end confdefs.h.  */
24489 /* Test program from Paul Eggert and Tony Leneis.  */
24490 #include <limits.h>
24491 #include <stdlib.h>
24492 #include <time.h>
24493
24494 #ifdef HAVE_UNISTD_H
24495 # include <unistd.h>
24496 #endif
24497
24498 #if HAVE_DECL_ALARM
24499 # include <signal.h>
24500 #endif
24501
24502 /* Work around redefinition to rpl_putenv by other config tests.  */
24503 #undef putenv
24504
24505 static time_t time_t_max;
24506 static time_t time_t_min;
24507
24508 /* Values we'll use to set the TZ environment variable.  */
24509 static char *tz_strings[] = {
24510   (char *) 0, "TZ=GMT0", "TZ=JST-9",
24511   "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
24512 };
24513 #define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
24514
24515 /* Return 0 if mktime fails to convert a date in the spring-forward gap.
24516    Based on a problem report from Andreas Jaeger.  */
24517 static int
24518 spring_forward_gap ()
24519 {
24520   /* glibc (up to about 1998-10-07) failed this test. */
24521   struct tm tm;
24522
24523   /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
24524      instead of "TZ=America/Vancouver" in order to detect the bug even
24525      on systems that don't support the Olson extension, or don't have the
24526      full zoneinfo tables installed.  */
24527   putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
24528
24529   tm.tm_year = 98;
24530   tm.tm_mon = 3;
24531   tm.tm_mday = 5;
24532   tm.tm_hour = 2;
24533   tm.tm_min = 0;
24534   tm.tm_sec = 0;
24535   tm.tm_isdst = -1;
24536   return mktime (&tm) != (time_t) -1;
24537 }
24538
24539 static int
24540 mktime_test1 (time_t now)
24541 {
24542   struct tm *lt;
24543   return ! (lt = localtime (&now)) || mktime (lt) == now;
24544 }
24545
24546 static int
24547 mktime_test (time_t now)
24548 {
24549   return (mktime_test1 (now)
24550           && mktime_test1 ((time_t) (time_t_max - now))
24551           && mktime_test1 ((time_t) (time_t_min + now)));
24552 }
24553
24554 static int
24555 irix_6_4_bug ()
24556 {
24557   /* Based on code from Ariel Faigon.  */
24558   struct tm tm;
24559   tm.tm_year = 96;
24560   tm.tm_mon = 3;
24561   tm.tm_mday = 0;
24562   tm.tm_hour = 0;
24563   tm.tm_min = 0;
24564   tm.tm_sec = 0;
24565   tm.tm_isdst = -1;
24566   mktime (&tm);
24567   return tm.tm_mon == 2 && tm.tm_mday == 31;
24568 }
24569
24570 static int
24571 bigtime_test (int j)
24572 {
24573   struct tm tm;
24574   time_t now;
24575   tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
24576   now = mktime (&tm);
24577   if (now != (time_t) -1)
24578     {
24579       struct tm *lt = localtime (&now);
24580       if (! (lt
24581              && lt->tm_year == tm.tm_year
24582              && lt->tm_mon == tm.tm_mon
24583              && lt->tm_mday == tm.tm_mday
24584              && lt->tm_hour == tm.tm_hour
24585              && lt->tm_min == tm.tm_min
24586              && lt->tm_sec == tm.tm_sec
24587              && lt->tm_yday == tm.tm_yday
24588              && lt->tm_wday == tm.tm_wday
24589              && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
24590                   == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
24591         return 0;
24592     }
24593   return 1;
24594 }
24595
24596 static int
24597 year_2050_test ()
24598 {
24599   /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
24600      ignoring leap seconds.  */
24601   unsigned long int answer = 2527315200UL;
24602
24603   struct tm tm;
24604   time_t t;
24605   tm.tm_year = 2050 - 1900;
24606   tm.tm_mon = 2 - 1;
24607   tm.tm_mday = 1;
24608   tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
24609   tm.tm_isdst = -1;
24610
24611   /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
24612      instead of "TZ=America/Vancouver" in order to detect the bug even
24613      on systems that don't support the Olson extension, or don't have the
24614      full zoneinfo tables installed.  */
24615   putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
24616
24617   t = mktime (&tm);
24618
24619   /* Check that the result is either a failure, or close enough
24620      to the correct answer that we can assume the discrepancy is
24621      due to leap seconds.  */
24622   return (t == (time_t) -1
24623           || (0 < t && answer - 120 <= t && t <= answer + 120));
24624 }
24625
24626 int
24627 main ()
24628 {
24629   int result = 0;
24630   time_t t, delta;
24631   int i, j;
24632   int time_t_signed_magnitude = (time_t) ~ (time_t) 0 < (time_t) -1;
24633   int time_t_signed = ! ((time_t) 0 < (time_t) -1);
24634
24635 #if HAVE_DECL_ALARM
24636   /* This test makes some buggy mktime implementations loop.
24637      Give up after 60 seconds; a mktime slower than that
24638      isn't worth using anyway.  */
24639   signal (SIGALRM, SIG_DFL);
24640   alarm (60);
24641 #endif
24642
24643   time_t_max = (! time_t_signed
24644                 ? (time_t) -1
24645                 : ((((time_t) 1 << (sizeof (time_t) * CHAR_BIT - 2)) - 1)
24646                    * 2 + 1));
24647   time_t_min = (! time_t_signed
24648                 ? (time_t) 0
24649                 : time_t_signed_magnitude
24650                 ? ~ (time_t) 0
24651                 : ~ time_t_max);
24652
24653   delta = time_t_max / 997; /* a suitable prime number */
24654   for (i = 0; i < N_STRINGS; i++)
24655     {
24656       if (tz_strings[i])
24657         putenv (tz_strings[i]);
24658
24659       for (t = 0; t <= time_t_max - delta && (result & 1) == 0; t += delta)
24660         if (! mktime_test (t))
24661           result |= 1;
24662       if ((result & 2) == 0
24663           && ! (mktime_test ((time_t) 1)
24664                 && mktime_test ((time_t) (60 * 60))
24665                 && mktime_test ((time_t) (60 * 60 * 24))))
24666         result |= 2;
24667
24668       for (j = 1; (result & 4) == 0; j <<= 1)
24669         {
24670           if (! bigtime_test (j))
24671             result |= 4;
24672           if (INT_MAX / 2 < j)
24673             break;
24674         }
24675       if ((result & 8) == 0 && ! bigtime_test (INT_MAX))
24676         result |= 8;
24677     }
24678   if (! irix_6_4_bug ())
24679     result |= 16;
24680   if (! spring_forward_gap ())
24681     result |= 32;
24682   if (! year_2050_test ())
24683     result |= 64;
24684   return result;
24685 }
24686 _ACEOF
24687 if ac_fn_c_try_run "$LINENO"; then :
24688   gl_cv_func_working_mktime=yes
24689 else
24690   gl_cv_func_working_mktime=no
24691 fi
24692 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24693   conftest.$ac_objext conftest.beam conftest.$ac_ext
24694 fi
24695
24696
24697 fi
24698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mktime" >&5
24699 $as_echo "$gl_cv_func_working_mktime" >&6; }
24700
24701   if test $gl_cv_func_working_mktime = no; then
24702     REPLACE_MKTIME=1
24703   else
24704     REPLACE_MKTIME=0
24705   fi
24706
24707   if test $REPLACE_MKTIME = 1; then
24708
24709
24710
24711
24712
24713
24714
24715
24716   gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext"
24717
24718     :
24719   fi
24720
24721
24722
24723
24724
24725           GNULIB_MKTIME=1
24726
24727
24728
24729
24730
24731 $as_echo "#define GNULIB_TEST_MKTIME 1" >>confdefs.h
24732
24733
24734
24735
24736   :
24737
24738
24739
24740   if test $ac_cv_func__set_invalid_parameter_handler = yes; then
24741     HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
24742
24743 $as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
24744
24745   else
24746     HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
24747   fi
24748
24749
24750   if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
24751
24752
24753
24754
24755
24756
24757
24758
24759   gl_LIBOBJS="$gl_LIBOBJS msvc-inval.$ac_objext"
24760
24761   fi
24762
24763
24764
24765   if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
24766
24767
24768
24769
24770
24771
24772
24773
24774   gl_LIBOBJS="$gl_LIBOBJS msvc-nothrow.$ac_objext"
24775
24776   fi
24777
24778
24779
24780
24781
24782      if test $ac_cv_func_nl_langinfo = yes; then
24783     # On Irix 6.5, YESEXPR is defined, but nl_langinfo(YESEXPR) is broken.
24784     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether YESEXPR works" >&5
24785 $as_echo_n "checking whether YESEXPR works... " >&6; }
24786 if ${gl_cv_func_nl_langinfo_yesexpr_works+:} false; then :
24787   $as_echo_n "(cached) " >&6
24788 else
24789   if test "$cross_compiling" = yes; then :
24790
24791          case "$host_os" in
24792                    # Guess no on irix systems.
24793            irix*)  gl_cv_func_nl_langinfo_yesexpr_works="guessing no";;
24794                    # Guess yes elsewhere.
24795            *)      gl_cv_func_nl_langinfo_yesexpr_works="guessing yes";;
24796          esac
24797
24798 else
24799   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24800 /* end confdefs.h.  */
24801 #include <langinfo.h>
24802
24803 int
24804 main ()
24805 {
24806 return !*nl_langinfo(YESEXPR);
24807
24808   ;
24809   return 0;
24810 }
24811 _ACEOF
24812 if ac_fn_c_try_run "$LINENO"; then :
24813   gl_cv_func_nl_langinfo_yesexpr_works=yes
24814 else
24815   gl_cv_func_nl_langinfo_yesexpr_works=no
24816 fi
24817 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24818   conftest.$ac_objext conftest.beam conftest.$ac_ext
24819 fi
24820
24821
24822 fi
24823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_nl_langinfo_yesexpr_works" >&5
24824 $as_echo "$gl_cv_func_nl_langinfo_yesexpr_works" >&6; }
24825     case $gl_cv_func_nl_langinfo_yesexpr_works in
24826       *yes) FUNC_NL_LANGINFO_YESEXPR_WORKS=1 ;;
24827       *)    FUNC_NL_LANGINFO_YESEXPR_WORKS=0 ;;
24828     esac
24829
24830 cat >>confdefs.h <<_ACEOF
24831 #define FUNC_NL_LANGINFO_YESEXPR_WORKS $FUNC_NL_LANGINFO_YESEXPR_WORKS
24832 _ACEOF
24833
24834     if test $HAVE_LANGINFO_CODESET = 1 && test $HAVE_LANGINFO_ERA = 1 \
24835         && test $FUNC_NL_LANGINFO_YESEXPR_WORKS = 1; then
24836       :
24837     else
24838       REPLACE_NL_LANGINFO=1
24839
24840 $as_echo "#define REPLACE_NL_LANGINFO 1" >>confdefs.h
24841
24842     fi
24843   else
24844     HAVE_NL_LANGINFO=0
24845   fi
24846
24847   if test $HAVE_NL_LANGINFO = 0 || test $REPLACE_NL_LANGINFO = 1; then
24848
24849
24850
24851
24852
24853
24854
24855
24856   gl_LIBOBJS="$gl_LIBOBJS nl_langinfo.$ac_objext"
24857
24858   fi
24859
24860
24861
24862
24863
24864           GNULIB_NL_LANGINFO=1
24865
24866
24867
24868
24869
24870 $as_echo "#define GNULIB_TEST_NL_LANGINFO 1" >>confdefs.h
24871
24872
24873
24874
24875
24876
24877
24878
24879
24880
24881
24882
24883
24884
24885
24886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for obstacks" >&5
24887 $as_echo_n "checking for obstacks... " >&6; }
24888 if ${ac_cv_func_obstack+:} false; then :
24889   $as_echo_n "(cached) " >&6
24890 else
24891   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24892 /* end confdefs.h.  */
24893 $ac_includes_default
24894                       #include "obstack.h"
24895 int
24896 main ()
24897 {
24898 struct obstack mem;
24899                        #define obstack_chunk_alloc malloc
24900                        #define obstack_chunk_free free
24901                        obstack_init (&mem);
24902                        obstack_free (&mem, 0);
24903   ;
24904   return 0;
24905 }
24906 _ACEOF
24907 if ac_fn_c_try_link "$LINENO"; then :
24908   ac_cv_func_obstack=yes
24909 else
24910   ac_cv_func_obstack=no
24911 fi
24912 rm -f core conftest.err conftest.$ac_objext \
24913     conftest$ac_exeext conftest.$ac_ext
24914 fi
24915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_obstack" >&5
24916 $as_echo "$ac_cv_func_obstack" >&6; }
24917 if test $ac_cv_func_obstack = yes; then
24918
24919 $as_echo "#define HAVE_OBSTACK 1" >>confdefs.h
24920
24921 else
24922
24923
24924
24925
24926
24927
24928
24929
24930   gl_LIBOBJS="$gl_LIBOBJS obstack.$ac_objext"
24931
24932 fi
24933
24934
24935
24936   case "$host_os" in
24937     mingw* | pw*)
24938       REPLACE_OPEN=1
24939       ;;
24940     *)
24941
24942       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
24943 $as_echo_n "checking whether open recognizes a trailing slash... " >&6; }
24944 if ${gl_cv_func_open_slash+:} false; then :
24945   $as_echo_n "(cached) " >&6
24946 else
24947   # Assume that if we have lstat, we can also check symlinks.
24948           if test $ac_cv_func_lstat = yes; then
24949             touch conftest.tmp
24950             ln -s conftest.tmp conftest.lnk
24951           fi
24952           if test "$cross_compiling" = yes; then :
24953
24954              case "$host_os" in
24955                freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
24956                  gl_cv_func_open_slash="guessing no" ;;
24957                *)
24958                  gl_cv_func_open_slash="guessing yes" ;;
24959              esac
24960
24961 else
24962   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24963 /* end confdefs.h.  */
24964
24965 #include <fcntl.h>
24966 #if HAVE_UNISTD_H
24967 # include <unistd.h>
24968 #endif
24969 int main ()
24970 {
24971   int result = 0;
24972 #if HAVE_LSTAT
24973   if (open ("conftest.lnk/", O_RDONLY) != -1)
24974     result |= 1;
24975 #endif
24976   if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
24977     result |= 2;
24978   return result;
24979 }
24980 _ACEOF
24981 if ac_fn_c_try_run "$LINENO"; then :
24982   gl_cv_func_open_slash=yes
24983 else
24984   gl_cv_func_open_slash=no
24985 fi
24986 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24987   conftest.$ac_objext conftest.beam conftest.$ac_ext
24988 fi
24989
24990           rm -f conftest.sl conftest.tmp conftest.lnk
24991
24992 fi
24993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5
24994 $as_echo "$gl_cv_func_open_slash" >&6; }
24995       case "$gl_cv_func_open_slash" in
24996         *no)
24997
24998 $as_echo "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
24999
25000           REPLACE_OPEN=1
25001           ;;
25002       esac
25003       ;;
25004   esac
25005
25006     if test $REPLACE_OPEN = 0; then
25007
25008
25009
25010   if test $ac_cv_func_fchdir = no; then
25011     HAVE_FCHDIR=0
25012   fi
25013
25014       if test $HAVE_FCHDIR = 0; then
25015         REPLACE_OPEN=1
25016       fi
25017     fi
25018
25019
25020
25021   if test $REPLACE_OPEN = 1; then
25022
25023
25024
25025
25026
25027
25028
25029
25030   gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext"
25031
25032
25033
25034   :
25035
25036   fi
25037
25038
25039
25040
25041
25042           GNULIB_OPEN=1
25043
25044
25045
25046
25047
25048 $as_echo "#define GNULIB_TEST_OPEN 1" >>confdefs.h
25049
25050
25051
25052
25053
25054
25055
25056
25057   case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink in
25058   yes+*yes)
25059     ;;
25060   yes+*)
25061     # Solaris 9 has *at functions, but uniformly mishandles trailing
25062     # slash in all of them.
25063     REPLACE_OPENAT=1
25064     ;;
25065   *)
25066     HAVE_OPENAT=0
25067     ;;
25068   esac
25069
25070   if test $HAVE_OPENAT = 0 || test $REPLACE_OPENAT = 1; then
25071
25072
25073
25074
25075
25076
25077
25078
25079   gl_LIBOBJS="$gl_LIBOBJS openat.$ac_objext"
25080
25081
25082
25083   :
25084
25085   fi
25086
25087
25088 cat >>confdefs.h <<_ACEOF
25089 #define GNULIB_OPENAT 1
25090 _ACEOF
25091
25092
25093
25094
25095
25096
25097           GNULIB_OPENAT=1
25098
25099
25100
25101
25102
25103 $as_echo "#define GNULIB_TEST_OPENAT 1" >>confdefs.h
25104
25105
25106
25107
25108
25109
25110   for ac_func in opendir
25111 do :
25112   ac_fn_c_check_func "$LINENO" "opendir" "ac_cv_func_opendir"
25113 if test "x$ac_cv_func_opendir" = xyes; then :
25114   cat >>confdefs.h <<_ACEOF
25115 #define HAVE_OPENDIR 1
25116 _ACEOF
25117
25118 fi
25119 done
25120
25121   if test $ac_cv_func_opendir = no; then
25122     HAVE_OPENDIR=0
25123   fi
25124
25125
25126
25127
25128   if test $ac_cv_func_fchdir = no; then
25129     HAVE_FCHDIR=0
25130   fi
25131
25132     if test $HAVE_FCHDIR = 0; then
25133       if test $HAVE_OPENDIR = 1; then
25134         REPLACE_OPENDIR=1
25135       fi
25136     fi
25137
25138
25139   if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then
25140
25141
25142
25143
25144
25145
25146
25147
25148   gl_LIBOBJS="$gl_LIBOBJS opendir.$ac_objext"
25149
25150   fi
25151
25152
25153
25154
25155
25156           GNULIB_OPENDIR=1
25157
25158
25159
25160
25161
25162 $as_echo "#define GNULIB_TEST_OPENDIR 1" >>confdefs.h
25163
25164
25165
25166
25167
25168
25169
25170
25171
25172   ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
25173 #include <$ac_cv_struct_tm>
25174
25175 "
25176 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
25177
25178 cat >>confdefs.h <<_ACEOF
25179 #define HAVE_STRUCT_TM_TM_ZONE 1
25180 _ACEOF
25181
25182
25183 fi
25184
25185 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
25186
25187 $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
25188
25189 else
25190   ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
25191 "
25192 if test "x$ac_cv_have_decl_tzname" = xyes; then :
25193   ac_have_decl=1
25194 else
25195   ac_have_decl=0
25196 fi
25197
25198 cat >>confdefs.h <<_ACEOF
25199 #define HAVE_DECL_TZNAME $ac_have_decl
25200 _ACEOF
25201
25202   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
25203 $as_echo_n "checking for tzname... " >&6; }
25204 if ${ac_cv_var_tzname+:} false; then :
25205   $as_echo_n "(cached) " >&6
25206 else
25207   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25208 /* end confdefs.h.  */
25209 #include <time.h>
25210 #if !HAVE_DECL_TZNAME
25211 extern char *tzname[];
25212 #endif
25213
25214 int
25215 main ()
25216 {
25217 return tzname[0][0];
25218   ;
25219   return 0;
25220 }
25221 _ACEOF
25222 if ac_fn_c_try_link "$LINENO"; then :
25223   ac_cv_var_tzname=yes
25224 else
25225   ac_cv_var_tzname=no
25226 fi
25227 rm -f core conftest.err conftest.$ac_objext \
25228     conftest$ac_exeext conftest.$ac_ext
25229 fi
25230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
25231 $as_echo "$ac_cv_var_tzname" >&6; }
25232   if test $ac_cv_var_tzname = yes; then
25233
25234 $as_echo "#define HAVE_TZNAME 1" >>confdefs.h
25235
25236   fi
25237 fi
25238
25239
25240
25241   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25242 /* end confdefs.h.  */
25243
25244 #include <time.h> /* for time_t */
25245 #include <limits.h> /* for CHAR_BIT, LONG_MIN, LONG_MAX */
25246 #define TYPE_MINIMUM(t) \
25247   ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
25248 #define TYPE_MAXIMUM(t) \
25249   ((t) ((t) 0 < (t) -1 \
25250         ? (t) -1 \
25251         : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
25252 typedef int verify_min[2 * (LONG_MIN <= TYPE_MINIMUM (time_t)) - 1];
25253 typedef int verify_max[2 * (TYPE_MAXIMUM (time_t) <= LONG_MAX) - 1];
25254
25255 _ACEOF
25256 if ac_fn_c_try_compile "$LINENO"; then :
25257
25258 $as_echo "#define TIME_T_FITS_IN_LONG_INT 1" >>confdefs.h
25259
25260
25261 fi
25262 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25263
25264
25265
25266
25267
25268   for ac_func in getppriv
25269 do :
25270   ac_fn_c_check_func "$LINENO" "getppriv" "ac_cv_func_getppriv"
25271 if test "x$ac_cv_func_getppriv" = xyes; then :
25272   cat >>confdefs.h <<_ACEOF
25273 #define HAVE_GETPPRIV 1
25274 _ACEOF
25275
25276 fi
25277 done
25278
25279
25280
25281   ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
25282 "
25283 if test "x$ac_cv_have_decl_program_invocation_name" = xyes; then :
25284   ac_have_decl=1
25285 else
25286   ac_have_decl=0
25287 fi
25288
25289 cat >>confdefs.h <<_ACEOF
25290 #define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl
25291 _ACEOF
25292
25293   ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
25294 "
25295 if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes; then :
25296   ac_have_decl=1
25297 else
25298   ac_have_decl=0
25299 fi
25300
25301 cat >>confdefs.h <<_ACEOF
25302 #define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl
25303 _ACEOF
25304
25305
25306   # Check whether --enable-acl was given.
25307 if test "${enable_acl+set}" = set; then :
25308   enableval=$enable_acl;
25309 else
25310   enable_acl=auto
25311 fi
25312
25313
25314   LIB_ACL=
25315   use_acl=0
25316   if test "x$enable_acl" != "xno"; then
25317         for ac_header in sys/acl.h
25318 do :
25319   ac_fn_c_check_header_mongrel "$LINENO" "sys/acl.h" "ac_cv_header_sys_acl_h" "$ac_includes_default"
25320 if test "x$ac_cv_header_sys_acl_h" = xyes; then :
25321   cat >>confdefs.h <<_ACEOF
25322 #define HAVE_SYS_ACL_H 1
25323 _ACEOF
25324
25325 fi
25326
25327 done
25328
25329     if test $ac_cv_header_sys_acl_h = yes; then
25330       ac_save_LIBS=$LIBS
25331
25332                   if test $use_acl = 0; then
25333         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing acl_get_file" >&5
25334 $as_echo_n "checking for library containing acl_get_file... " >&6; }
25335 if ${ac_cv_search_acl_get_file+:} false; then :
25336   $as_echo_n "(cached) " >&6
25337 else
25338   ac_func_search_save_LIBS=$LIBS
25339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25340 /* end confdefs.h.  */
25341
25342 /* Override any GCC internal prototype to avoid an error.
25343    Use char because int might match the return type of a GCC
25344    builtin and then its argument prototype would still apply.  */
25345 #ifdef __cplusplus
25346 extern "C"
25347 #endif
25348 char acl_get_file ();
25349 int
25350 main ()
25351 {
25352 return acl_get_file ();
25353   ;
25354   return 0;
25355 }
25356 _ACEOF
25357 for ac_lib in '' acl pacl; do
25358   if test -z "$ac_lib"; then
25359     ac_res="none required"
25360   else
25361     ac_res=-l$ac_lib
25362     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
25363   fi
25364   if ac_fn_c_try_link "$LINENO"; then :
25365   ac_cv_search_acl_get_file=$ac_res
25366 fi
25367 rm -f core conftest.err conftest.$ac_objext \
25368     conftest$ac_exeext
25369   if ${ac_cv_search_acl_get_file+:} false; then :
25370   break
25371 fi
25372 done
25373 if ${ac_cv_search_acl_get_file+:} false; then :
25374
25375 else
25376   ac_cv_search_acl_get_file=no
25377 fi
25378 rm conftest.$ac_ext
25379 LIBS=$ac_func_search_save_LIBS
25380 fi
25381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_acl_get_file" >&5
25382 $as_echo "$ac_cv_search_acl_get_file" >&6; }
25383 ac_res=$ac_cv_search_acl_get_file
25384 if test "$ac_res" != no; then :
25385   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
25386   if test "$ac_cv_search_acl_get_file" != "none required"; then
25387              LIB_ACL=$ac_cv_search_acl_get_file
25388            fi
25389            for ac_func in acl_get_file acl_get_fd acl_set_file acl_set_fd \
25390               acl_free acl_from_mode acl_from_text \
25391               acl_delete_def_file acl_extended_file \
25392               acl_delete_fd_np acl_delete_file_np \
25393               acl_copy_ext_native acl_create_entry_np \
25394               acl_to_short_text acl_free_text
25395 do :
25396   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
25397 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
25398 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
25399   cat >>confdefs.h <<_ACEOF
25400 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
25401 _ACEOF
25402
25403 fi
25404 done
25405
25406            # If the acl_get_file bug is detected, don't enable the ACL support.
25407
25408   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working acl_get_file" >&5
25409 $as_echo_n "checking for working acl_get_file... " >&6; }
25410 if ${gl_cv_func_working_acl_get_file+:} false; then :
25411   $as_echo_n "(cached) " >&6
25412 else
25413   if test "$cross_compiling" = yes; then :
25414   gl_cv_func_working_acl_get_file=cross-compiling
25415 else
25416   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25417 /* end confdefs.h.  */
25418 #include <sys/types.h>
25419            #include <sys/acl.h>
25420            #include <errno.h>
25421
25422 int
25423 main ()
25424 {
25425 if (!acl_get_file (".", ACL_TYPE_ACCESS) && errno == ENOENT)
25426               return 1;
25427             return 0;
25428
25429   ;
25430   return 0;
25431 }
25432 _ACEOF
25433 if ac_fn_c_try_run "$LINENO"; then :
25434   gl_cv_func_working_acl_get_file=yes
25435 else
25436   gl_cv_func_working_acl_get_file=no
25437 fi
25438 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25439   conftest.$ac_objext conftest.beam conftest.$ac_ext
25440 fi
25441
25442 fi
25443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_acl_get_file" >&5
25444 $as_echo "$gl_cv_func_working_acl_get_file" >&6; }
25445
25446   if test $gl_cv_func_working_acl_get_file = yes; then :
25447   use_acl=1
25448 fi
25449
25450            if test $use_acl = 1; then
25451                           for ac_header in acl/libacl.h
25452 do :
25453   ac_fn_c_check_header_mongrel "$LINENO" "acl/libacl.h" "ac_cv_header_acl_libacl_h" "$ac_includes_default"
25454 if test "x$ac_cv_header_acl_libacl_h" = xyes; then :
25455   cat >>confdefs.h <<_ACEOF
25456 #define HAVE_ACL_LIBACL_H 1
25457 _ACEOF
25458
25459 fi
25460
25461 done
25462
25463
25464
25465
25466
25467
25468
25469
25470
25471   for ac_func in acl_entries
25472 do :
25473   ac_fn_c_check_func "$LINENO" "acl_entries" "ac_cv_func_acl_entries"
25474 if test "x$ac_cv_func_acl_entries" = xyes; then :
25475   cat >>confdefs.h <<_ACEOF
25476 #define HAVE_ACL_ENTRIES 1
25477 _ACEOF
25478
25479 else
25480
25481     gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
25482
25483 fi
25484 done
25485
25486
25487              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ACL_FIRST_ENTRY" >&5
25488 $as_echo_n "checking for ACL_FIRST_ENTRY... " >&6; }
25489 if ${gl_cv_acl_ACL_FIRST_ENTRY+:} false; then :
25490   $as_echo_n "(cached) " >&6
25491 else
25492   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25493 /* end confdefs.h.  */
25494 #include <sys/types.h>
25495 #include <sys/acl.h>
25496 int type = ACL_FIRST_ENTRY;
25497 int
25498 main ()
25499 {
25500
25501   ;
25502   return 0;
25503 }
25504 _ACEOF
25505 if ac_fn_c_try_compile "$LINENO"; then :
25506   gl_cv_acl_ACL_FIRST_ENTRY=yes
25507 else
25508   gl_cv_acl_ACL_FIRST_ENTRY=no
25509 fi
25510 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25511 fi
25512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_acl_ACL_FIRST_ENTRY" >&5
25513 $as_echo "$gl_cv_acl_ACL_FIRST_ENTRY" >&6; }
25514              if test $gl_cv_acl_ACL_FIRST_ENTRY = yes; then
25515
25516 $as_echo "#define HAVE_ACL_FIRST_ENTRY 1" >>confdefs.h
25517
25518              fi
25519                           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ACL_TYPE_EXTENDED" >&5
25520 $as_echo_n "checking for ACL_TYPE_EXTENDED... " >&6; }
25521 if ${gl_cv_acl_ACL_TYPE_EXTENDED+:} false; then :
25522   $as_echo_n "(cached) " >&6
25523 else
25524   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25525 /* end confdefs.h.  */
25526 #include <sys/types.h>
25527 #include <sys/acl.h>
25528 int type = ACL_TYPE_EXTENDED;
25529 int
25530 main ()
25531 {
25532
25533   ;
25534   return 0;
25535 }
25536 _ACEOF
25537 if ac_fn_c_try_compile "$LINENO"; then :
25538   gl_cv_acl_ACL_TYPE_EXTENDED=yes
25539 else
25540   gl_cv_acl_ACL_TYPE_EXTENDED=no
25541 fi
25542 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25543 fi
25544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_acl_ACL_TYPE_EXTENDED" >&5
25545 $as_echo "$gl_cv_acl_ACL_TYPE_EXTENDED" >&6; }
25546              if test $gl_cv_acl_ACL_TYPE_EXTENDED = yes; then
25547
25548 $as_echo "#define HAVE_ACL_TYPE_EXTENDED 1" >>confdefs.h
25549
25550              fi
25551            else
25552              LIB_ACL=
25553            fi
25554
25555 fi
25556
25557       fi
25558
25559             if test $use_acl = 0; then
25560         for ac_func in facl
25561 do :
25562   ac_fn_c_check_func "$LINENO" "facl" "ac_cv_func_facl"
25563 if test "x$ac_cv_func_facl" = xyes; then :
25564   cat >>confdefs.h <<_ACEOF
25565 #define HAVE_FACL 1
25566 _ACEOF
25567
25568 fi
25569 done
25570
25571         if test $ac_cv_func_facl = yes; then
25572           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing acl_trivial" >&5
25573 $as_echo_n "checking for library containing acl_trivial... " >&6; }
25574 if ${ac_cv_search_acl_trivial+:} false; then :
25575   $as_echo_n "(cached) " >&6
25576 else
25577   ac_func_search_save_LIBS=$LIBS
25578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25579 /* end confdefs.h.  */
25580
25581 /* Override any GCC internal prototype to avoid an error.
25582    Use char because int might match the return type of a GCC
25583    builtin and then its argument prototype would still apply.  */
25584 #ifdef __cplusplus
25585 extern "C"
25586 #endif
25587 char acl_trivial ();
25588 int
25589 main ()
25590 {
25591 return acl_trivial ();
25592   ;
25593   return 0;
25594 }
25595 _ACEOF
25596 for ac_lib in '' sec; do
25597   if test -z "$ac_lib"; then
25598     ac_res="none required"
25599   else
25600     ac_res=-l$ac_lib
25601     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
25602   fi
25603   if ac_fn_c_try_link "$LINENO"; then :
25604   ac_cv_search_acl_trivial=$ac_res
25605 fi
25606 rm -f core conftest.err conftest.$ac_objext \
25607     conftest$ac_exeext
25608   if ${ac_cv_search_acl_trivial+:} false; then :
25609   break
25610 fi
25611 done
25612 if ${ac_cv_search_acl_trivial+:} false; then :
25613
25614 else
25615   ac_cv_search_acl_trivial=no
25616 fi
25617 rm conftest.$ac_ext
25618 LIBS=$ac_func_search_save_LIBS
25619 fi
25620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_acl_trivial" >&5
25621 $as_echo "$ac_cv_search_acl_trivial" >&6; }
25622 ac_res=$ac_cv_search_acl_trivial
25623 if test "$ac_res" != no; then :
25624   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
25625   if test "$ac_cv_search_acl_trivial" != "none required"; then
25626                LIB_ACL=$ac_cv_search_acl_trivial
25627              fi
25628
25629 fi
25630
25631           for ac_func in acl_trivial
25632 do :
25633   ac_fn_c_check_func "$LINENO" "acl_trivial" "ac_cv_func_acl_trivial"
25634 if test "x$ac_cv_func_acl_trivial" = xyes; then :
25635   cat >>confdefs.h <<_ACEOF
25636 #define HAVE_ACL_TRIVIAL 1
25637 _ACEOF
25638
25639 fi
25640 done
25641
25642           use_acl=1
25643         fi
25644       fi
25645
25646             if test $use_acl = 0; then
25647         for ac_func in getacl
25648 do :
25649   ac_fn_c_check_func "$LINENO" "getacl" "ac_cv_func_getacl"
25650 if test "x$ac_cv_func_getacl" = xyes; then :
25651   cat >>confdefs.h <<_ACEOF
25652 #define HAVE_GETACL 1
25653 _ACEOF
25654
25655 fi
25656 done
25657
25658         if test $ac_cv_func_getacl = yes; then
25659           use_acl=1
25660         fi
25661                 for ac_header in aclv.h
25662 do :
25663   ac_fn_c_check_header_compile "$LINENO" "aclv.h" "ac_cv_header_aclv_h" "#include <sys/types.h>
25664 "
25665 if test "x$ac_cv_header_aclv_h" = xyes; then :
25666   cat >>confdefs.h <<_ACEOF
25667 #define HAVE_ACLV_H 1
25668 _ACEOF
25669
25670 fi
25671
25672 done
25673
25674       fi
25675
25676             if test $use_acl = 0; then
25677         for ac_func in aclx_get
25678 do :
25679   ac_fn_c_check_func "$LINENO" "aclx_get" "ac_cv_func_aclx_get"
25680 if test "x$ac_cv_func_aclx_get" = xyes; then :
25681   cat >>confdefs.h <<_ACEOF
25682 #define HAVE_ACLX_GET 1
25683 _ACEOF
25684
25685 fi
25686 done
25687
25688         if test $ac_cv_func_aclx_get = yes; then
25689           use_acl=1
25690         fi
25691       fi
25692
25693             if test $use_acl = 0 || test "$ac_cv_func_aclx_get" = yes; then
25694         for ac_func in statacl
25695 do :
25696   ac_fn_c_check_func "$LINENO" "statacl" "ac_cv_func_statacl"
25697 if test "x$ac_cv_func_statacl" = xyes; then :
25698   cat >>confdefs.h <<_ACEOF
25699 #define HAVE_STATACL 1
25700 _ACEOF
25701
25702 fi
25703 done
25704
25705         if test $ac_cv_func_statacl = yes; then
25706           use_acl=1
25707         fi
25708       fi
25709
25710             if test $use_acl = 0; then
25711         for ac_func in aclsort
25712 do :
25713   ac_fn_c_check_func "$LINENO" "aclsort" "ac_cv_func_aclsort"
25714 if test "x$ac_cv_func_aclsort" = xyes; then :
25715   cat >>confdefs.h <<_ACEOF
25716 #define HAVE_ACLSORT 1
25717 _ACEOF
25718
25719 fi
25720 done
25721
25722         if test $ac_cv_func_aclsort = yes; then
25723           use_acl=1
25724         fi
25725       fi
25726
25727       LIBS=$ac_save_LIBS
25728     fi
25729     if test "x$enable_acl$use_acl" = "xyes0"; then
25730       as_fn_error $? "ACLs enabled but support not detected" "$LINENO" 5
25731     elif test "x$enable_acl$use_acl" = "xauto0"; then
25732       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libacl development library was not found or not usable." >&5
25733 $as_echo "$as_me: WARNING: libacl development library was not found or not usable." >&2;}
25734       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GNU tar will be built without ACL support." >&5
25735 $as_echo "$as_me: WARNING: GNU tar will be built without ACL support." >&2;}
25736     fi
25737   fi
25738
25739
25740 cat >>confdefs.h <<_ACEOF
25741 #define USE_ACL $use_acl
25742 _ACEOF
25743
25744   USE_ACL=$use_acl
25745
25746
25747
25748       :
25749
25750
25751   :
25752
25753
25754
25755
25756
25757   for ac_func in raise
25758 do :
25759   ac_fn_c_check_func "$LINENO" "raise" "ac_cv_func_raise"
25760 if test "x$ac_cv_func_raise" = xyes; then :
25761   cat >>confdefs.h <<_ACEOF
25762 #define HAVE_RAISE 1
25763 _ACEOF
25764
25765 fi
25766 done
25767
25768   if test $ac_cv_func_raise = no; then
25769     HAVE_RAISE=0
25770   else
25771     if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
25772       REPLACE_RAISE=1
25773     fi
25774
25775   fi
25776
25777   if test $HAVE_RAISE = 0 || test $REPLACE_RAISE = 1; then
25778
25779
25780
25781
25782
25783
25784
25785
25786   gl_LIBOBJS="$gl_LIBOBJS raise.$ac_objext"
25787
25788     :
25789   fi
25790
25791
25792
25793
25794
25795           GNULIB_RAISE=1
25796
25797
25798
25799
25800
25801 $as_echo "#define GNULIB_TEST_RAISE 1" >>confdefs.h
25802
25803
25804
25805
25806
25807
25808
25809   for ac_func in rawmemchr
25810 do :
25811   ac_fn_c_check_func "$LINENO" "rawmemchr" "ac_cv_func_rawmemchr"
25812 if test "x$ac_cv_func_rawmemchr" = xyes; then :
25813   cat >>confdefs.h <<_ACEOF
25814 #define HAVE_RAWMEMCHR 1
25815 _ACEOF
25816
25817 fi
25818 done
25819
25820   if test $ac_cv_func_rawmemchr = no; then
25821     HAVE_RAWMEMCHR=0
25822   fi
25823
25824   if test $HAVE_RAWMEMCHR = 0; then
25825
25826
25827
25828
25829
25830
25831
25832
25833   gl_LIBOBJS="$gl_LIBOBJS rawmemchr.$ac_objext"
25834
25835     :
25836   fi
25837
25838
25839
25840
25841
25842           GNULIB_RAWMEMCHR=1
25843
25844
25845
25846
25847
25848 $as_echo "#define GNULIB_TEST_RAWMEMCHR 1" >>confdefs.h
25849
25850
25851
25852
25853
25854
25855   if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
25856     REPLACE_READ=1
25857   fi
25858
25859
25860   if test $REPLACE_READ = 1; then
25861
25862
25863
25864
25865
25866
25867
25868
25869   gl_LIBOBJS="$gl_LIBOBJS read.$ac_objext"
25870
25871     :
25872   fi
25873
25874
25875
25876
25877
25878           GNULIB_READ=1
25879
25880
25881
25882
25883
25884 $as_echo "#define GNULIB_TEST_READ 1" >>confdefs.h
25885
25886
25887
25888
25889
25890
25891   for ac_func in readdir
25892 do :
25893   ac_fn_c_check_func "$LINENO" "readdir" "ac_cv_func_readdir"
25894 if test "x$ac_cv_func_readdir" = xyes; then :
25895   cat >>confdefs.h <<_ACEOF
25896 #define HAVE_READDIR 1
25897 _ACEOF
25898
25899 fi
25900 done
25901
25902   if test $ac_cv_func_readdir = no; then
25903     HAVE_READDIR=0
25904   fi
25905
25906   if test $HAVE_READDIR = 0; then
25907
25908
25909
25910
25911
25912
25913
25914
25915   gl_LIBOBJS="$gl_LIBOBJS readdir.$ac_objext"
25916
25917   fi
25918
25919
25920
25921
25922
25923           GNULIB_READDIR=1
25924
25925
25926
25927
25928
25929 $as_echo "#define GNULIB_TEST_READDIR 1" >>confdefs.h
25930
25931
25932
25933
25934
25935
25936   if test $ac_cv_func_readlink = no; then
25937     HAVE_READLINK=0
25938   else
25939     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
25940 $as_echo_n "checking whether readlink signature is correct... " >&6; }
25941 if ${gl_cv_decl_readlink_works+:} false; then :
25942   $as_echo_n "(cached) " >&6
25943 else
25944   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25945 /* end confdefs.h.  */
25946 #include <unistd.h>
25947       /* Cause compilation failure if original declaration has wrong type.  */
25948       ssize_t readlink (const char *, char *, size_t);
25949 int
25950 main ()
25951 {
25952
25953   ;
25954   return 0;
25955 }
25956 _ACEOF
25957 if ac_fn_c_try_compile "$LINENO"; then :
25958   gl_cv_decl_readlink_works=yes
25959 else
25960   gl_cv_decl_readlink_works=no
25961 fi
25962 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25963 fi
25964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
25965 $as_echo "$gl_cv_decl_readlink_works" >&6; }
25966             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
25967 $as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; }
25968 if ${gl_cv_func_readlink_works+:} false; then :
25969   $as_echo_n "(cached) " >&6
25970 else
25971   # We have readlink, so assume ln -s works.
25972        ln -s conftest.no-such conftest.link
25973        ln -s conftest.link conftest.lnk2
25974        if test "$cross_compiling" = yes; then :
25975   case "$host_os" in
25976                     # Guess yes on glibc systems.
25977             *-gnu*) gl_cv_func_readlink_works="guessing yes" ;;
25978                     # If we don't know, assume the worst.
25979             *)      gl_cv_func_readlink_works="guessing no" ;;
25980           esac
25981
25982 else
25983   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25984 /* end confdefs.h.  */
25985 #include <unistd.h>
25986
25987 int
25988 main ()
25989 {
25990 char buf[20];
25991       return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
25992   ;
25993   return 0;
25994 }
25995 _ACEOF
25996 if ac_fn_c_try_run "$LINENO"; then :
25997   gl_cv_func_readlink_works=yes
25998 else
25999   gl_cv_func_readlink_works=no
26000 fi
26001 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26002   conftest.$ac_objext conftest.beam conftest.$ac_ext
26003 fi
26004
26005       rm -f conftest.link conftest.lnk2
26006 fi
26007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5
26008 $as_echo "$gl_cv_func_readlink_works" >&6; }
26009     case "$gl_cv_func_readlink_works" in
26010       *yes)
26011         if test "$gl_cv_decl_readlink_works" != yes; then
26012           REPLACE_READLINK=1
26013         fi
26014         ;;
26015       *)
26016
26017 $as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
26018
26019         REPLACE_READLINK=1
26020         ;;
26021     esac
26022   fi
26023
26024   if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
26025
26026
26027
26028
26029
26030
26031
26032
26033   gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext"
26034
26035
26036   :
26037
26038   fi
26039
26040
26041
26042
26043
26044           GNULIB_READLINK=1
26045
26046
26047
26048
26049
26050 $as_echo "#define GNULIB_TEST_READLINK 1" >>confdefs.h
26051
26052
26053
26054
26055
26056
26057
26058   if test $ac_cv_func_readlinkat = no; then
26059     HAVE_READLINKAT=0
26060   fi
26061
26062   if test $HAVE_READLINKAT = 0; then
26063
26064
26065
26066
26067
26068
26069
26070
26071   gl_LIBOBJS="$gl_LIBOBJS readlinkat.$ac_objext"
26072
26073   fi
26074
26075
26076
26077
26078
26079           GNULIB_READLINKAT=1
26080
26081
26082
26083
26084
26085 $as_echo "#define GNULIB_TEST_READLINKAT 1" >>confdefs.h
26086
26087
26088
26089
26090
26091
26092   if test $gl_cv_func_malloc_posix = yes; then
26093
26094 $as_echo "#define HAVE_REALLOC_POSIX 1" >>confdefs.h
26095
26096   else
26097     REPLACE_REALLOC=1
26098   fi
26099
26100   if test $REPLACE_REALLOC = 1; then
26101
26102
26103
26104
26105
26106
26107
26108
26109   gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
26110
26111   fi
26112
26113
26114
26115
26116
26117           GNULIB_REALLOC_POSIX=1
26118
26119
26120
26121
26122
26123 $as_echo "#define GNULIB_TEST_REALLOC_POSIX 1" >>confdefs.h
26124
26125
26126
26127
26128
26129 # Check whether --with-included-regex was given.
26130 if test "${with_included_regex+set}" = set; then :
26131   withval=$with_included_regex;
26132 fi
26133
26134
26135   case $with_included_regex in #(
26136   yes|no) ac_use_included_regex=$with_included_regex
26137         ;;
26138   '')
26139     # If the system regex support is good enough that it passes the
26140     # following run test, then default to *not* using the included regex.c.
26141     # If cross compiling, assume the test would fail and use the included
26142     # regex.c.
26143
26144     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working re_compile_pattern" >&5
26145 $as_echo_n "checking for working re_compile_pattern... " >&6; }
26146 if ${gl_cv_func_re_compile_pattern_working+:} false; then :
26147   $as_echo_n "(cached) " >&6
26148 else
26149   if test "$cross_compiling" = yes; then :
26150          gl_cv_func_re_compile_pattern_working=no
26151 else
26152   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26153 /* end confdefs.h.  */
26154 #include <regex.h>
26155
26156             #include <locale.h>
26157             #include <limits.h>
26158             #include <string.h>
26159             #if HAVE_DECL_ALARM
26160             # include <unistd.h>
26161             # include <signal.h>
26162             #endif
26163
26164 int
26165 main ()
26166 {
26167 int result = 0;
26168             static struct re_pattern_buffer regex;
26169             unsigned char folded_chars[UCHAR_MAX + 1];
26170             int i;
26171             const char *s;
26172             struct re_registers regs;
26173
26174 #if HAVE_DECL_ALARM
26175             /* Some builds of glibc go into an infinite loop on this test.  */
26176             signal (SIGALRM, SIG_DFL);
26177             alarm (2);
26178 #endif
26179             if (setlocale (LC_ALL, "en_US.UTF-8"))
26180               {
26181                 {
26182                   /* http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html
26183                      This test needs valgrind to catch the bug on Debian
26184                      GNU/Linux 3.1 x86, but it might catch the bug better
26185                      on other platforms and it shouldn't hurt to try the
26186                      test here.  */
26187                   static char const pat[] = "insert into";
26188                   static char const data[] =
26189                     "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK";
26190                   re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE
26191                                  | RE_ICASE);
26192                   memset (&regex, 0, sizeof regex);
26193                   s = re_compile_pattern (pat, sizeof pat - 1, &regex);
26194                   if (s)
26195                     result |= 1;
26196                   else if (re_search (&regex, data, sizeof data - 1,
26197                                       0, sizeof data - 1, &regs)
26198                            != -1)
26199                     result |= 1;
26200                 }
26201
26202                 {
26203                   /* This test is from glibc bug 15078.
26204                      The test case is from Andreas Schwab in
26205                      <http://www.sourceware.org/ml/libc-alpha/2013-01/msg00967.html>.
26206                      */
26207                   static char const pat[] = "[^x]x";
26208                   static char const data[] =
26209                     /* <U1000><U103B><U103D><U1014><U103A><U102F><U1015><U103A> */
26210                     "\xe1\x80\x80"
26211                     "\xe1\x80\xbb"
26212                     "\xe1\x80\xbd"
26213                     "\xe1\x80\x94"
26214                     "\xe1\x80\xba"
26215                     "\xe1\x80\xaf"
26216                     "\xe1\x80\x95"
26217                     "\xe1\x80\xba"
26218                     "x";
26219                   re_set_syntax (0);
26220                   memset (&regex, 0, sizeof regex);
26221                   s = re_compile_pattern (pat, sizeof pat - 1, &regex);
26222                   if (s)
26223                     result |= 1;
26224                   else
26225                     {
26226                       i = re_search (&regex, data, sizeof data - 1,
26227                                      0, sizeof data - 1, 0);
26228                       if (i != 0 && i != 21)
26229                         result |= 1;
26230                     }
26231                 }
26232
26233                 if (! setlocale (LC_ALL, "C"))
26234                   return 1;
26235               }
26236
26237             /* This test is from glibc bug 3957, reported by Andrew Mackey.  */
26238             re_set_syntax (RE_SYNTAX_EGREP | RE_HAT_LISTS_NOT_NEWLINE);
26239             memset (&regex, 0, sizeof regex);
26240             s = re_compile_pattern ("a[^x]b", 6, &regex);
26241             if (s)
26242               result |= 2;
26243             /* This should fail, but succeeds for glibc-2.5.  */
26244             else if (re_search (&regex, "a\nb", 3, 0, 3, &regs) != -1)
26245               result |= 2;
26246
26247             /* This regular expression is from Spencer ere test number 75
26248                in grep-2.3.  */
26249             re_set_syntax (RE_SYNTAX_POSIX_EGREP);
26250             memset (&regex, 0, sizeof regex);
26251             for (i = 0; i <= UCHAR_MAX; i++)
26252               folded_chars[i] = i;
26253             regex.translate = folded_chars;
26254             s = re_compile_pattern ("a[[:]:]]b\n", 11, &regex);
26255             /* This should fail with _Invalid character class name_ error.  */
26256             if (!s)
26257               result |= 4;
26258
26259             /* Ensure that [b-a] is diagnosed as invalid, when
26260                using RE_NO_EMPTY_RANGES. */
26261             re_set_syntax (RE_SYNTAX_POSIX_EGREP | RE_NO_EMPTY_RANGES);
26262             memset (&regex, 0, sizeof regex);
26263             s = re_compile_pattern ("a[b-a]", 6, &regex);
26264             if (s == 0)
26265               result |= 8;
26266
26267             /* This should succeed, but does not for glibc-2.1.3.  */
26268             memset (&regex, 0, sizeof regex);
26269             s = re_compile_pattern ("{1", 2, &regex);
26270             if (s)
26271               result |= 8;
26272
26273             /* The following example is derived from a problem report
26274                against gawk from Jorge Stolfi <stolfi@ic.unicamp.br>.  */
26275             memset (&regex, 0, sizeof regex);
26276             s = re_compile_pattern ("[an\371]*n", 7, &regex);
26277             if (s)
26278               result |= 8;
26279             /* This should match, but does not for glibc-2.2.1.  */
26280             else if (re_match (&regex, "an", 2, 0, &regs) != 2)
26281               result |= 8;
26282
26283             memset (&regex, 0, sizeof regex);
26284             s = re_compile_pattern ("x", 1, &regex);
26285             if (s)
26286               result |= 8;
26287             /* glibc-2.2.93 does not work with a negative RANGE argument.  */
26288             else if (re_search (&regex, "wxy", 3, 2, -2, &regs) != 1)
26289               result |= 8;
26290
26291             /* The version of regex.c in older versions of gnulib
26292                ignored RE_ICASE.  Detect that problem too.  */
26293             re_set_syntax (RE_SYNTAX_EMACS | RE_ICASE);
26294             memset (&regex, 0, sizeof regex);
26295             s = re_compile_pattern ("x", 1, &regex);
26296             if (s)
26297               result |= 16;
26298             else if (re_search (&regex, "WXY", 3, 0, 3, &regs) < 0)
26299               result |= 16;
26300
26301             /* Catch a bug reported by Vin Shelton in
26302                http://lists.gnu.org/archive/html/bug-coreutils/2007-06/msg00089.html
26303                */
26304             re_set_syntax (RE_SYNTAX_POSIX_BASIC
26305                            & ~RE_CONTEXT_INVALID_DUP
26306                            & ~RE_NO_EMPTY_RANGES);
26307             memset (&regex, 0, sizeof regex);
26308             s = re_compile_pattern ("[[:alnum:]_-]\\\\+$", 16, &regex);
26309             if (s)
26310               result |= 32;
26311
26312             /* REG_STARTEND was added to glibc on 2004-01-15.
26313                Reject older versions.  */
26314             if (! REG_STARTEND)
26315               result |= 64;
26316
26317 #if 0
26318             /* It would be nice to reject hosts whose regoff_t values are too
26319                narrow (including glibc on hosts with 64-bit ptrdiff_t and
26320                32-bit int), but we should wait until glibc implements this
26321                feature.  Otherwise, support for equivalence classes and
26322                multibyte collation symbols would always be broken except
26323                when compiling --without-included-regex.   */
26324             if (sizeof (regoff_t) < sizeof (ptrdiff_t)
26325                 || sizeof (regoff_t) < sizeof (ssize_t))
26326               result |= 64;
26327 #endif
26328
26329             return result;
26330
26331   ;
26332   return 0;
26333 }
26334 _ACEOF
26335 if ac_fn_c_try_run "$LINENO"; then :
26336   gl_cv_func_re_compile_pattern_working=yes
26337 else
26338   gl_cv_func_re_compile_pattern_working=no
26339 fi
26340 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26341   conftest.$ac_objext conftest.beam conftest.$ac_ext
26342 fi
26343
26344 fi
26345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_re_compile_pattern_working" >&5
26346 $as_echo "$gl_cv_func_re_compile_pattern_working" >&6; }
26347     case $gl_cv_func_re_compile_pattern_working in #(
26348     yes) ac_use_included_regex=no;; #(
26349     no) ac_use_included_regex=yes;;
26350     esac
26351     ;;
26352   *) as_fn_error $? "Invalid value for --with-included-regex: $with_included_regex" "$LINENO" 5
26353     ;;
26354   esac
26355
26356   if test $ac_use_included_regex = yes; then
26357
26358 $as_echo "#define _REGEX_INCLUDE_LIMITS_H 1" >>confdefs.h
26359
26360
26361 $as_echo "#define _REGEX_LARGE_OFFSETS 1" >>confdefs.h
26362
26363
26364 $as_echo "#define re_syntax_options rpl_re_syntax_options" >>confdefs.h
26365
26366
26367 $as_echo "#define re_set_syntax rpl_re_set_syntax" >>confdefs.h
26368
26369
26370 $as_echo "#define re_compile_pattern rpl_re_compile_pattern" >>confdefs.h
26371
26372
26373 $as_echo "#define re_compile_fastmap rpl_re_compile_fastmap" >>confdefs.h
26374
26375
26376 $as_echo "#define re_search rpl_re_search" >>confdefs.h
26377
26378
26379 $as_echo "#define re_search_2 rpl_re_search_2" >>confdefs.h
26380
26381
26382 $as_echo "#define re_match rpl_re_match" >>confdefs.h
26383
26384
26385 $as_echo "#define re_match_2 rpl_re_match_2" >>confdefs.h
26386
26387
26388 $as_echo "#define re_set_registers rpl_re_set_registers" >>confdefs.h
26389
26390
26391 $as_echo "#define re_comp rpl_re_comp" >>confdefs.h
26392
26393
26394 $as_echo "#define re_exec rpl_re_exec" >>confdefs.h
26395
26396
26397 $as_echo "#define regcomp rpl_regcomp" >>confdefs.h
26398
26399
26400 $as_echo "#define regexec rpl_regexec" >>confdefs.h
26401
26402
26403 $as_echo "#define regerror rpl_regerror" >>confdefs.h
26404
26405
26406 $as_echo "#define regfree rpl_regfree" >>confdefs.h
26407
26408   fi
26409
26410   if test $ac_use_included_regex = yes; then
26411
26412
26413
26414
26415
26416
26417
26418
26419   gl_LIBOBJS="$gl_LIBOBJS regex.$ac_objext"
26420
26421
26422
26423
26424
26425
26426
26427   for ac_header in libintl.h
26428 do :
26429   ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
26430 if test "x$ac_cv_header_libintl_h" = xyes; then :
26431   cat >>confdefs.h <<_ACEOF
26432 #define HAVE_LIBINTL_H 1
26433 _ACEOF
26434
26435 fi
26436
26437 done
26438
26439
26440   ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
26441 "
26442 if test "x$ac_cv_have_decl_isblank" = xyes; then :
26443   ac_have_decl=1
26444 else
26445   ac_have_decl=0
26446 fi
26447
26448 cat >>confdefs.h <<_ACEOF
26449 #define HAVE_DECL_ISBLANK $ac_have_decl
26450 _ACEOF
26451
26452
26453   fi
26454
26455
26456
26457
26458
26459                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on destination" >&5
26460 $as_echo_n "checking whether rename honors trailing slash on destination... " >&6; }
26461 if ${gl_cv_func_rename_slash_dst_works+:} false; then :
26462   $as_echo_n "(cached) " >&6
26463 else
26464   rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
26465     touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
26466       as_fn_error $? "cannot create temporary files" "$LINENO" 5
26467     # Assume that if we have lstat, we can also check symlinks.
26468     if test $ac_cv_func_lstat = yes; then
26469       ln -s conftest.f conftest.lnk
26470     fi
26471     if test "$cross_compiling" = yes; then :
26472         case "$host_os" in
26473                  # Guess yes on glibc systems.
26474          *-gnu*) gl_cv_func_rename_slash_dst_works="guessing yes" ;;
26475                  # If we don't know, assume the worst.
26476          *)      gl_cv_func_rename_slash_dst_works="guessing no" ;;
26477        esac
26478
26479 else
26480   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26481 /* end confdefs.h.  */
26482
26483 #        include <stdio.h>
26484 #        include <stdlib.h>
26485
26486 int
26487 main ()
26488 {
26489 int result = 0;
26490            if (rename ("conftest.f1", "conftest.f2/") == 0)
26491              result |= 1;
26492            if (rename ("conftest.d1", "conftest.d2/") != 0)
26493              result |= 2;
26494 #if HAVE_LSTAT
26495            if (rename ("conftest.f", "conftest.lnk/") == 0)
26496              result |= 4;
26497 #endif
26498            return result;
26499
26500   ;
26501   return 0;
26502 }
26503 _ACEOF
26504 if ac_fn_c_try_run "$LINENO"; then :
26505   gl_cv_func_rename_slash_dst_works=yes
26506 else
26507   gl_cv_func_rename_slash_dst_works=no
26508 fi
26509 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26510   conftest.$ac_objext conftest.beam conftest.$ac_ext
26511 fi
26512
26513     rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
26514
26515 fi
26516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_dst_works" >&5
26517 $as_echo "$gl_cv_func_rename_slash_dst_works" >&6; }
26518   case "$gl_cv_func_rename_slash_dst_works" in
26519     *yes) ;;
26520     *)
26521       REPLACE_RENAME=1
26522
26523 $as_echo "#define RENAME_TRAILING_SLASH_DEST_BUG 1" >>confdefs.h
26524
26525       ;;
26526   esac
26527
26528             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on source" >&5
26529 $as_echo_n "checking whether rename honors trailing slash on source... " >&6; }
26530 if ${gl_cv_func_rename_slash_src_works+:} false; then :
26531   $as_echo_n "(cached) " >&6
26532 else
26533   rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
26534     touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
26535       as_fn_error $? "cannot create temporary files" "$LINENO" 5
26536     # Assume that if we have lstat, we can also check symlinks.
26537     if test $ac_cv_func_lstat = yes; then
26538       ln -s conftest.f conftest.lnk
26539     fi
26540     if test "$cross_compiling" = yes; then :
26541         case "$host_os" in
26542                  # Guess yes on glibc systems.
26543          *-gnu*) gl_cv_func_rename_slash_src_works="guessing yes" ;;
26544                  # If we don't know, assume the worst.
26545          *)      gl_cv_func_rename_slash_src_works="guessing no" ;;
26546        esac
26547
26548 else
26549   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26550 /* end confdefs.h.  */
26551
26552 #        include <stdio.h>
26553 #        include <stdlib.h>
26554
26555 int
26556 main ()
26557 {
26558 int result = 0;
26559            if (rename ("conftest.f1/", "conftest.d3") == 0)
26560              result |= 1;
26561            if (rename ("conftest.d1/", "conftest.d2") != 0)
26562              result |= 2;
26563 #if HAVE_LSTAT
26564            if (rename ("conftest.lnk/", "conftest.f") == 0)
26565              result |= 4;
26566 #endif
26567            return result;
26568
26569   ;
26570   return 0;
26571 }
26572 _ACEOF
26573 if ac_fn_c_try_run "$LINENO"; then :
26574   gl_cv_func_rename_slash_src_works=yes
26575 else
26576   gl_cv_func_rename_slash_src_works=no
26577 fi
26578 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26579   conftest.$ac_objext conftest.beam conftest.$ac_ext
26580 fi
26581
26582     rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
26583
26584 fi
26585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_src_works" >&5
26586 $as_echo "$gl_cv_func_rename_slash_src_works" >&6; }
26587   case "$gl_cv_func_rename_slash_src_works" in
26588     *yes) ;;
26589     *)
26590       REPLACE_RENAME=1
26591
26592 $as_echo "#define RENAME_TRAILING_SLASH_SOURCE_BUG 1" >>confdefs.h
26593
26594       ;;
26595   esac
26596
26597
26598   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages hard links correctly" >&5
26599 $as_echo_n "checking whether rename manages hard links correctly... " >&6; }
26600 if ${gl_cv_func_rename_link_works+:} false; then :
26601   $as_echo_n "(cached) " >&6
26602 else
26603   if test $ac_cv_func_link = yes; then
26604        rm -rf conftest.f conftest.f1
26605        if touch conftest.f && ln conftest.f conftest.f1 &&
26606            set x `ls -i conftest.f conftest.f1` && test "" = ""; then
26607          if test "$cross_compiling" = yes; then :
26608              case "$host_os" in
26609                       # Guess yes on glibc systems.
26610               *-gnu*) gl_cv_func_rename_link_works="guessing yes" ;;
26611                       # If we don't know, assume the worst.
26612               *)      gl_cv_func_rename_link_works="guessing no" ;;
26613             esac
26614
26615 else
26616   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26617 /* end confdefs.h.  */
26618
26619 #             include <stdio.h>
26620 #             include <stdlib.h>
26621 #             include <unistd.h>
26622
26623 int
26624 main ()
26625 {
26626 int result = 0;
26627                 if (rename ("conftest.f", "conftest.f1"))
26628                   result |= 1;
26629                 if (unlink ("conftest.f1"))
26630                   result |= 2;
26631                 if (rename ("conftest.f", "conftest.f"))
26632                   result |= 4;
26633                 if (rename ("conftest.f1", "conftest.f1") == 0)
26634                   result |= 8;
26635                 return result;
26636
26637   ;
26638   return 0;
26639 }
26640 _ACEOF
26641 if ac_fn_c_try_run "$LINENO"; then :
26642   gl_cv_func_rename_link_works=yes
26643 else
26644   gl_cv_func_rename_link_works=no
26645 fi
26646 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26647   conftest.$ac_objext conftest.beam conftest.$ac_ext
26648 fi
26649
26650        else
26651          gl_cv_func_rename_link_works="guessing no"
26652        fi
26653        rm -rf conftest.f conftest.f1
26654      else
26655        gl_cv_func_rename_link_works=yes
26656      fi
26657
26658 fi
26659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_link_works" >&5
26660 $as_echo "$gl_cv_func_rename_link_works" >&6; }
26661   case "$gl_cv_func_rename_link_works" in
26662     *yes) ;;
26663     *)
26664       REPLACE_RENAME=1
26665
26666 $as_echo "#define RENAME_HARD_LINK_BUG 1" >>confdefs.h
26667
26668       ;;
26669   esac
26670
26671           { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages existing destinations correctly" >&5
26672 $as_echo_n "checking whether rename manages existing destinations correctly... " >&6; }
26673 if ${gl_cv_func_rename_dest_works+:} false; then :
26674   $as_echo_n "(cached) " >&6
26675 else
26676   rm -rf conftest.f conftest.d1 conftest.d2
26677     touch conftest.f && mkdir conftest.d1 conftest.d2 ||
26678       as_fn_error $? "cannot create temporary files" "$LINENO" 5
26679     if test "$cross_compiling" = yes; then :
26680         case "$host_os" in
26681                  # Guess yes on glibc systems.
26682          *-gnu*) gl_cv_func_rename_dest_works="guessing yes" ;;
26683                  # If we don't know, assume the worst.
26684          *)      gl_cv_func_rename_dest_works="guessing no" ;;
26685        esac
26686
26687 else
26688   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26689 /* end confdefs.h.  */
26690
26691 #        include <stdio.h>
26692 #        include <stdlib.h>
26693
26694 int
26695 main ()
26696 {
26697 int result = 0;
26698            if (rename ("conftest.d1", "conftest.d2") != 0)
26699              result |= 1;
26700            if (rename ("conftest.d2", "conftest.f") == 0)
26701              result |= 2;
26702            return result;
26703
26704   ;
26705   return 0;
26706 }
26707 _ACEOF
26708 if ac_fn_c_try_run "$LINENO"; then :
26709   gl_cv_func_rename_dest_works=yes
26710 else
26711   gl_cv_func_rename_dest_works=no
26712 fi
26713 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26714   conftest.$ac_objext conftest.beam conftest.$ac_ext
26715 fi
26716
26717     rm -rf conftest.f conftest.d1 conftest.d2
26718
26719 fi
26720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_dest_works" >&5
26721 $as_echo "$gl_cv_func_rename_dest_works" >&6; }
26722   case "$gl_cv_func_rename_dest_works" in
26723     *yes) ;;
26724     *)
26725       REPLACE_RENAME=1
26726
26727 $as_echo "#define RENAME_DEST_EXISTS_BUG 1" >>confdefs.h
26728
26729       ;;
26730   esac
26731
26732   if test $REPLACE_RENAME = 1; then
26733
26734
26735
26736
26737
26738
26739
26740
26741   gl_LIBOBJS="$gl_LIBOBJS rename.$ac_objext"
26742
26743   fi
26744
26745
26746
26747
26748
26749           GNULIB_RENAME=1
26750
26751
26752
26753
26754
26755 $as_echo "#define GNULIB_TEST_RENAME 1" >>confdefs.h
26756
26757
26758
26759
26760
26761
26762
26763
26764
26765   if test $ac_cv_func_renameat = no; then
26766     HAVE_RENAMEAT=0
26767   elif test $REPLACE_RENAME = 1; then
26768         REPLACE_RENAMEAT=1
26769   fi
26770
26771   if test $HAVE_RENAMEAT = 0 || test $REPLACE_RENAMEAT = 1; then
26772
26773
26774
26775
26776
26777
26778
26779
26780   gl_LIBOBJS="$gl_LIBOBJS renameat.$ac_objext"
26781
26782   fi
26783   if test $HAVE_RENAMEAT = 0; then
26784
26785
26786
26787
26788
26789
26790
26791
26792   gl_LIBOBJS="$gl_LIBOBJS at-func2.$ac_objext"
26793
26794   fi
26795
26796
26797
26798
26799
26800           GNULIB_RENAMEAT=1
26801
26802
26803
26804
26805
26806 $as_echo "#define GNULIB_TEST_RENAMEAT 1" >>confdefs.h
26807
26808
26809
26810
26811
26812
26813   for ac_func in rewinddir
26814 do :
26815   ac_fn_c_check_func "$LINENO" "rewinddir" "ac_cv_func_rewinddir"
26816 if test "x$ac_cv_func_rewinddir" = xyes; then :
26817   cat >>confdefs.h <<_ACEOF
26818 #define HAVE_REWINDDIR 1
26819 _ACEOF
26820
26821 fi
26822 done
26823
26824   if test $ac_cv_func_rewinddir = no; then
26825     HAVE_REWINDDIR=0
26826   fi
26827
26828   if test $HAVE_REWINDDIR = 0; then
26829
26830
26831
26832
26833
26834
26835
26836
26837   gl_LIBOBJS="$gl_LIBOBJS rewinddir.$ac_objext"
26838
26839   fi
26840
26841
26842
26843
26844
26845           GNULIB_REWINDDIR=1
26846
26847
26848
26849
26850
26851 $as_echo "#define GNULIB_TEST_REWINDDIR 1" >>confdefs.h
26852
26853
26854
26855
26856
26857
26858   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rmdir works" >&5
26859 $as_echo_n "checking whether rmdir works... " >&6; }
26860 if ${gl_cv_func_rmdir_works+:} false; then :
26861   $as_echo_n "(cached) " >&6
26862 else
26863   mkdir conftest.dir
26864      touch conftest.file
26865      if test "$cross_compiling" = yes; then :
26866   case "$host_os" in
26867                   # Guess yes on glibc systems.
26868           *-gnu*) gl_cv_func_rmdir_works="guessing yes" ;;
26869                   # If we don't know, assume the worst.
26870           *)      gl_cv_func_rmdir_works="guessing no" ;;
26871         esac
26872
26873 else
26874   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26875 /* end confdefs.h.  */
26876 #include <stdio.h>
26877            #include <errno.h>
26878            #if HAVE_UNISTD_H
26879            # include <unistd.h>
26880            #else /* on Windows with MSVC */
26881            # include <direct.h>
26882            #endif
26883
26884 int
26885 main ()
26886 {
26887 int result = 0;
26888       if (!rmdir ("conftest.file/"))
26889         result |= 1;
26890       else if (errno != ENOTDIR)
26891         result |= 2;
26892       if (!rmdir ("conftest.dir/./"))
26893         result |= 4;
26894       return result;
26895
26896   ;
26897   return 0;
26898 }
26899 _ACEOF
26900 if ac_fn_c_try_run "$LINENO"; then :
26901   gl_cv_func_rmdir_works=yes
26902 else
26903   gl_cv_func_rmdir_works=no
26904 fi
26905 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26906   conftest.$ac_objext conftest.beam conftest.$ac_ext
26907 fi
26908
26909      rm -rf conftest.dir conftest.file
26910 fi
26911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rmdir_works" >&5
26912 $as_echo "$gl_cv_func_rmdir_works" >&6; }
26913   case "$gl_cv_func_rmdir_works" in
26914     *yes) ;;
26915     *)
26916       REPLACE_RMDIR=1
26917       ;;
26918   esac
26919
26920   if test $REPLACE_RMDIR = 1; then
26921
26922
26923
26924
26925
26926
26927
26928
26929   gl_LIBOBJS="$gl_LIBOBJS rmdir.$ac_objext"
26930
26931   fi
26932
26933
26934
26935
26936
26937           GNULIB_RMDIR=1
26938
26939
26940
26941
26942
26943 $as_echo "#define GNULIB_TEST_RMDIR 1" >>confdefs.h
26944
26945
26946
26947
26948
26949
26950
26951   for ac_func in rpmatch
26952 do :
26953   ac_fn_c_check_func "$LINENO" "rpmatch" "ac_cv_func_rpmatch"
26954 if test "x$ac_cv_func_rpmatch" = xyes; then :
26955   cat >>confdefs.h <<_ACEOF
26956 #define HAVE_RPMATCH 1
26957 _ACEOF
26958
26959 fi
26960 done
26961
26962   if test $ac_cv_func_rpmatch = no; then
26963     HAVE_RPMATCH=0
26964   fi
26965
26966   if test $HAVE_RPMATCH = 0; then
26967
26968
26969
26970
26971
26972
26973
26974
26975   gl_LIBOBJS="$gl_LIBOBJS rpmatch.$ac_objext"
26976
26977
26978   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and YESEXPR" >&5
26979 $as_echo_n "checking for nl_langinfo and YESEXPR... " >&6; }
26980 if ${gl_cv_langinfo_yesexpr+:} false; then :
26981   $as_echo_n "(cached) " >&6
26982 else
26983   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26984 /* end confdefs.h.  */
26985 #include <langinfo.h>
26986 int
26987 main ()
26988 {
26989 char* cs = nl_langinfo(YESEXPR); return !cs;
26990   ;
26991   return 0;
26992 }
26993 _ACEOF
26994 if ac_fn_c_try_link "$LINENO"; then :
26995   gl_cv_langinfo_yesexpr=yes
26996 else
26997   gl_cv_langinfo_yesexpr=no
26998 fi
26999 rm -f core conftest.err conftest.$ac_objext \
27000     conftest$ac_exeext conftest.$ac_ext
27001
27002 fi
27003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_langinfo_yesexpr" >&5
27004 $as_echo "$gl_cv_langinfo_yesexpr" >&6; }
27005   if test $gl_cv_langinfo_yesexpr = yes; then
27006
27007 $as_echo "#define HAVE_LANGINFO_YESEXPR 1" >>confdefs.h
27008
27009   fi
27010
27011   fi
27012
27013
27014
27015
27016
27017           GNULIB_RPMATCH=1
27018
27019
27020
27021
27022
27023 $as_echo "#define GNULIB_TEST_RPMATCH 1" >>confdefs.h
27024
27025
27026
27027
27028
27029
27030
27031
27032
27033
27034
27035
27036
27037
27038
27039   :
27040
27041
27042
27043
27044
27045
27046   if test $ac_cv_func_secure_getenv = no; then
27047     HAVE_SECURE_GETENV=0
27048   fi
27049
27050   if test $HAVE_SECURE_GETENV = 0; then
27051
27052
27053
27054
27055
27056
27057
27058
27059   gl_LIBOBJS="$gl_LIBOBJS secure_getenv.$ac_objext"
27060
27061
27062   for ac_func in __secure_getenv
27063 do :
27064   ac_fn_c_check_func "$LINENO" "__secure_getenv" "ac_cv_func___secure_getenv"
27065 if test "x$ac_cv_func___secure_getenv" = xyes; then :
27066   cat >>confdefs.h <<_ACEOF
27067 #define HAVE___SECURE_GETENV 1
27068 _ACEOF
27069
27070 fi
27071 done
27072
27073   if test $ac_cv_func___secure_getenv = no; then
27074     for ac_func in issetugid
27075 do :
27076   ac_fn_c_check_func "$LINENO" "issetugid" "ac_cv_func_issetugid"
27077 if test "x$ac_cv_func_issetugid" = xyes; then :
27078   cat >>confdefs.h <<_ACEOF
27079 #define HAVE_ISSETUGID 1
27080 _ACEOF
27081
27082 fi
27083 done
27084
27085   fi
27086
27087   fi
27088
27089
27090
27091
27092
27093           GNULIB_SECURE_GETENV=1
27094
27095
27096
27097
27098
27099 $as_echo "#define GNULIB_TEST_SECURE_GETENV 1" >>confdefs.h
27100
27101
27102
27103   for ac_header in selinux/flask.h
27104 do :
27105   ac_fn_c_check_header_mongrel "$LINENO" "selinux/flask.h" "ac_cv_header_selinux_flask_h" "$ac_includes_default"
27106 if test "x$ac_cv_header_selinux_flask_h" = xyes; then :
27107   cat >>confdefs.h <<_ACEOF
27108 #define HAVE_SELINUX_FLASK_H 1
27109 _ACEOF
27110
27111 fi
27112
27113 done
27114
27115
27116
27117
27118
27119
27120
27121
27122
27123   gl_LIBOBJS="$gl_LIBOBJS selinux-at.$ac_objext"
27124
27125
27126
27127   if test "$with_selinux" != no; then
27128     for ac_header in selinux/selinux.h
27129 do :
27130   ac_fn_c_check_header_mongrel "$LINENO" "selinux/selinux.h" "ac_cv_header_selinux_selinux_h" "$ac_includes_default"
27131 if test "x$ac_cv_header_selinux_selinux_h" = xyes; then :
27132   cat >>confdefs.h <<_ACEOF
27133 #define HAVE_SELINUX_SELINUX_H 1
27134 _ACEOF
27135
27136 fi
27137
27138 done
27139
27140
27141     if test "$ac_cv_header_selinux_selinux_h" = yes; then
27142       # We do have <selinux/selinux.h>, so do compile getfilecon.c
27143       # and arrange to use its wrappers.
27144
27145
27146
27147
27148
27149
27150
27151
27152
27153      if test $gl_cv_have_include_next = yes; then
27154        gl_cv_next_selinux_selinux_h='<'selinux/selinux.h'>'
27155      else
27156        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <selinux/selinux.h>" >&5
27157 $as_echo_n "checking absolute name of <selinux/selinux.h>... " >&6; }
27158 if ${gl_cv_next_selinux_selinux_h+:} false; then :
27159   $as_echo_n "(cached) " >&6
27160 else
27161
27162              if test $ac_cv_header_selinux_selinux_h = yes; then
27163
27164
27165                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27166 /* end confdefs.h.  */
27167 #include <selinux/selinux.h>
27168
27169 _ACEOF
27170                                                                                                                         case "$host_os" in
27171                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
27172                  *)    gl_absname_cpp="$ac_cpp" ;;
27173                esac
27174
27175                case "$host_os" in
27176                  mingw*)
27177                                                                                                                                      gl_dirsep_regex='[/\\]'
27178                    ;;
27179                  *)
27180                    gl_dirsep_regex='\/'
27181                    ;;
27182                esac
27183                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
27184
27185                gl_header_literal_regex=`echo 'selinux/selinux.h' \
27186                                         | sed -e "$gl_make_literal_regex_sed"`
27187                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27188                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27189                    s|^/[^/]|//&|
27190                    p
27191                    q
27192                  }'
27193                                                             gl_cv_next_selinux_selinux_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27194                       sed -n "$gl_absolute_header_sed"`'"'
27195           else
27196                gl_cv_next_selinux_selinux_h='<'selinux/selinux.h'>'
27197              fi
27198
27199
27200 fi
27201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_selinux_selinux_h" >&5
27202 $as_echo "$gl_cv_next_selinux_selinux_h" >&6; }
27203      fi
27204      NEXT_SELINUX_SELINUX_H=$gl_cv_next_selinux_selinux_h
27205
27206      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27207        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27208        gl_next_as_first_directive='<'selinux/selinux.h'>'
27209      else
27210        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27211        gl_next_as_first_directive=$gl_cv_next_selinux_selinux_h
27212      fi
27213      NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H=$gl_next_as_first_directive
27214
27215
27216
27217
27218
27219 $as_echo "#define getfilecon rpl_getfilecon" >>confdefs.h
27220
27221
27222 $as_echo "#define lgetfilecon rpl_lgetfilecon" >>confdefs.h
27223
27224
27225 $as_echo "#define fgetfilecon rpl_fgetfilecon" >>confdefs.h
27226
27227     fi
27228
27229     case "$ac_cv_search_setfilecon:$ac_cv_header_selinux_selinux_h" in
27230       no:*) # already warned
27231         ;;
27232       *:no)
27233         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libselinux was found but selinux/selinux.h is missing." >&5
27234 $as_echo "$as_me: WARNING: libselinux was found but selinux/selinux.h is missing." >&2;}
27235         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GNU tar will be compiled without SELinux support." >&5
27236 $as_echo "$as_me: WARNING: GNU tar will be compiled without SELinux support." >&2;}
27237     esac
27238   else
27239     # Do as if <selinux/selinux.h> does not exist, even if
27240     # AC_CHECK_HEADERS_ONCE has already determined that it exists.
27241     $as_echo "#define HAVE_SELINUX_SELINUX_H 0" >>confdefs.h
27242
27243   fi
27244
27245
27246
27247   if test "$with_selinux" != no; then
27248     for ac_header in selinux/context.h
27249 do :
27250   ac_fn_c_check_header_mongrel "$LINENO" "selinux/context.h" "ac_cv_header_selinux_context_h" "$ac_includes_default"
27251 if test "x$ac_cv_header_selinux_context_h" = xyes; then :
27252   cat >>confdefs.h <<_ACEOF
27253 #define HAVE_SELINUX_CONTEXT_H 1
27254 _ACEOF
27255  SELINUX_CONTEXT_H=
27256 else
27257   SELINUX_CONTEXT_H=selinux/context.h
27258 fi
27259
27260 done
27261
27262   else
27263     SELINUX_CONTEXT_H=selinux/context.h
27264   fi
27265
27266    if test -n "$SELINUX_CONTEXT_H"; then
27267   GL_GENERATE_SELINUX_CONTEXT_H_TRUE=
27268   GL_GENERATE_SELINUX_CONTEXT_H_FALSE='#'
27269 else
27270   GL_GENERATE_SELINUX_CONTEXT_H_TRUE='#'
27271   GL_GENERATE_SELINUX_CONTEXT_H_FALSE=
27272 fi
27273
27274
27275   if test "$with_selinux" != no && test "$ac_cv_header_selinux_selinux_h" = yes; then
27276
27277
27278
27279
27280
27281
27282
27283
27284   gl_LIBOBJS="$gl_LIBOBJS getfilecon.$ac_objext"
27285
27286   fi
27287
27288
27289      if test $ac_cv_func_setenv = no; then
27290     HAVE_SETENV=0
27291   else
27292     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setenv validates arguments" >&5
27293 $as_echo_n "checking whether setenv validates arguments... " >&6; }
27294 if ${gl_cv_func_setenv_works+:} false; then :
27295   $as_echo_n "(cached) " >&6
27296 else
27297   if test "$cross_compiling" = yes; then :
27298   case "$host_os" in
27299                  # Guess yes on glibc systems.
27300          *-gnu*) gl_cv_func_setenv_works="guessing yes" ;;
27301                  # If we don't know, assume the worst.
27302          *)      gl_cv_func_setenv_works="guessing no" ;;
27303        esac
27304
27305 else
27306   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27307 /* end confdefs.h.  */
27308
27309        #include <stdlib.h>
27310        #include <errno.h>
27311        #include <string.h>
27312
27313 int
27314 main ()
27315 {
27316
27317        int result = 0;
27318        {
27319          if (setenv ("", "", 0) != -1)
27320            result |= 1;
27321          else if (errno != EINVAL)
27322            result |= 2;
27323        }
27324        {
27325          if (setenv ("a", "=", 1) != 0)
27326            result |= 4;
27327          else if (strcmp (getenv ("a"), "=") != 0)
27328            result |= 8;
27329        }
27330        return result;
27331
27332   ;
27333   return 0;
27334 }
27335 _ACEOF
27336 if ac_fn_c_try_run "$LINENO"; then :
27337   gl_cv_func_setenv_works=yes
27338 else
27339   gl_cv_func_setenv_works=no
27340 fi
27341 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27342   conftest.$ac_objext conftest.beam conftest.$ac_ext
27343 fi
27344
27345 fi
27346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setenv_works" >&5
27347 $as_echo "$gl_cv_func_setenv_works" >&6; }
27348     case "$gl_cv_func_setenv_works" in
27349       *yes) ;;
27350       *)
27351         REPLACE_SETENV=1
27352         ;;
27353     esac
27354   fi
27355
27356   if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then
27357
27358
27359
27360
27361
27362
27363
27364
27365   gl_LIBOBJS="$gl_LIBOBJS setenv.$ac_objext"
27366
27367   fi
27368
27369
27370
27371
27372
27373           GNULIB_SETENV=1
27374
27375
27376
27377
27378
27379 $as_echo "#define GNULIB_TEST_SETENV 1" >>confdefs.h
27380
27381
27382
27383
27384
27385
27386
27387
27388
27389
27390
27391
27392
27393
27394      if test $gl_cv_have_include_next = yes; then
27395        gl_cv_next_signal_h='<'signal.h'>'
27396      else
27397        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
27398 $as_echo_n "checking absolute name of <signal.h>... " >&6; }
27399 if ${gl_cv_next_signal_h+:} false; then :
27400   $as_echo_n "(cached) " >&6
27401 else
27402
27403                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27404 /* end confdefs.h.  */
27405 #include <signal.h>
27406
27407 _ACEOF
27408                                                                                                                         case "$host_os" in
27409                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
27410                  *)    gl_absname_cpp="$ac_cpp" ;;
27411                esac
27412
27413                case "$host_os" in
27414                  mingw*)
27415                                                                                                                                      gl_dirsep_regex='[/\\]'
27416                    ;;
27417                  *)
27418                    gl_dirsep_regex='\/'
27419                    ;;
27420                esac
27421                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
27422
27423                gl_header_literal_regex=`echo 'signal.h' \
27424                                         | sed -e "$gl_make_literal_regex_sed"`
27425                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27426                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27427                    s|^/[^/]|//&|
27428                    p
27429                    q
27430                  }'
27431                                                             gl_cv_next_signal_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27432                       sed -n "$gl_absolute_header_sed"`'"'
27433
27434
27435 fi
27436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
27437 $as_echo "$gl_cv_next_signal_h" >&6; }
27438      fi
27439      NEXT_SIGNAL_H=$gl_cv_next_signal_h
27440
27441      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27442        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27443        gl_next_as_first_directive='<'signal.h'>'
27444      else
27445        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27446        gl_next_as_first_directive=$gl_cv_next_signal_h
27447      fi
27448      NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
27449
27450
27451
27452
27453
27454 # AIX declares sig_atomic_t to already include volatile, and C89 compilers
27455 # then choke on 'volatile sig_atomic_t'.  C99 requires that it compile.
27456   ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
27457 #include <signal.h>
27458
27459 "
27460 if test "x$ac_cv_type_volatile_sig_atomic_t" = xyes; then :
27461
27462 else
27463   HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
27464 fi
27465
27466
27467
27468
27469
27470
27471
27472   ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
27473 #include <signal.h>
27474
27475 "
27476 if test "x$ac_cv_type_sighandler_t" = xyes; then :
27477
27478 else
27479   HAVE_SIGHANDLER_T=0
27480 fi
27481
27482
27483
27484     for gl_func in pthread_sigmask sigaction     sigaddset sigdelset sigemptyset sigfillset sigismember     sigpending sigprocmask; do
27485     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
27486     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
27487 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
27488 if eval \${$as_gl_Symbol+:} false; then :
27489   $as_echo_n "(cached) " >&6
27490 else
27491   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27492 /* end confdefs.h.  */
27493 #include <signal.h>
27494
27495 int
27496 main ()
27497 {
27498 #undef $gl_func
27499   (void) $gl_func;
27500   ;
27501   return 0;
27502 }
27503 _ACEOF
27504 if ac_fn_c_try_compile "$LINENO"; then :
27505   eval "$as_gl_Symbol=yes"
27506 else
27507   eval "$as_gl_Symbol=no"
27508 fi
27509 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27510 fi
27511 eval ac_res=\$$as_gl_Symbol
27512                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
27513 $as_echo "$ac_res" >&6; }
27514     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
27515   cat >>confdefs.h <<_ACEOF
27516 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
27517 _ACEOF
27518
27519                      eval ac_cv_have_decl_$gl_func=yes
27520 fi
27521       done
27522
27523
27524
27525   for ac_header in stdint.h
27526 do :
27527   ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
27528 if test "x$ac_cv_header_stdint_h" = xyes; then :
27529   cat >>confdefs.h <<_ACEOF
27530 #define HAVE_STDINT_H 1
27531 _ACEOF
27532
27533 fi
27534
27535 done
27536
27537     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIZE_MAX" >&5
27538 $as_echo_n "checking for SIZE_MAX... " >&6; }
27539 if ${gl_cv_size_max+:} false; then :
27540   $as_echo_n "(cached) " >&6
27541 else
27542
27543     gl_cv_size_max=
27544     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27545 /* end confdefs.h.  */
27546
27547 #include <limits.h>
27548 #if HAVE_STDINT_H
27549 #include <stdint.h>
27550 #endif
27551 #ifdef SIZE_MAX
27552 Found it
27553 #endif
27554
27555 _ACEOF
27556 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27557   $EGREP "Found it" >/dev/null 2>&1; then :
27558   gl_cv_size_max=yes
27559 fi
27560 rm -f conftest*
27561
27562     if test -z "$gl_cv_size_max"; then
27563                         if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) * CHAR_BIT - 1" "size_t_bits_minus_1"        "#include <stddef.h>
27564 #include <limits.h>"; then :
27565
27566 else
27567   size_t_bits_minus_1=
27568 fi
27569
27570       if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) <= sizeof (unsigned int)" "fits_in_uint"        "#include <stddef.h>"; then :
27571
27572 else
27573   fits_in_uint=
27574 fi
27575
27576       if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then
27577         if test $fits_in_uint = 1; then
27578                               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27579 /* end confdefs.h.  */
27580 #include <stddef.h>
27581                  extern size_t foo;
27582                  extern unsigned long foo;
27583
27584 int
27585 main ()
27586 {
27587
27588   ;
27589   return 0;
27590 }
27591 _ACEOF
27592 if ac_fn_c_try_compile "$LINENO"; then :
27593   fits_in_uint=0
27594 fi
27595 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27596         fi
27597                                 if test $fits_in_uint = 1; then
27598           gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)"
27599         else
27600           gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)"
27601         fi
27602       else
27603                 gl_cv_size_max='((size_t)~(size_t)0)'
27604       fi
27605     fi
27606
27607 fi
27608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_size_max" >&5
27609 $as_echo "$gl_cv_size_max" >&6; }
27610   if test "$gl_cv_size_max" != yes; then
27611
27612 cat >>confdefs.h <<_ACEOF
27613 #define SIZE_MAX $gl_cv_size_max
27614 _ACEOF
27615
27616   fi
27617
27618
27619
27620
27621                ac_fn_c_check_decl "$LINENO" "sleep" "ac_cv_have_decl_sleep" "#include <unistd.h>
27622 "
27623 if test "x$ac_cv_have_decl_sleep" = xyes; then :
27624   ac_have_decl=1
27625 else
27626   ac_have_decl=0
27627 fi
27628
27629 cat >>confdefs.h <<_ACEOF
27630 #define HAVE_DECL_SLEEP $ac_have_decl
27631 _ACEOF
27632
27633
27634   if test $ac_cv_have_decl_sleep != yes; then
27635     HAVE_SLEEP=0
27636   else
27637         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working sleep" >&5
27638 $as_echo_n "checking for working sleep... " >&6; }
27639 if ${gl_cv_func_sleep_works+:} false; then :
27640   $as_echo_n "(cached) " >&6
27641 else
27642   if test "$cross_compiling" = yes; then :
27643   case "$host_os" in
27644                  # Guess yes on glibc systems.
27645          *-gnu*) gl_cv_func_sleep_works="guessing yes" ;;
27646                  # If we don't know, assume the worst.
27647          *)      gl_cv_func_sleep_works="guessing no" ;;
27648        esac
27649
27650 else
27651   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27652 /* end confdefs.h.  */
27653
27654 #include <errno.h>
27655 #include <unistd.h>
27656 #include <signal.h>
27657 static void
27658 handle_alarm (int sig)
27659 {
27660   if (sig != SIGALRM)
27661     _exit (2);
27662 }
27663
27664 int
27665 main ()
27666 {
27667
27668     /* Failure to compile this test due to missing alarm is okay,
27669        since all such platforms (mingw) also lack sleep.  */
27670     unsigned int pentecost = 50 * 24 * 60 * 60; /* 50 days.  */
27671     unsigned int remaining;
27672     signal (SIGALRM, handle_alarm);
27673     alarm (1);
27674     remaining = sleep (pentecost);
27675     if (remaining > pentecost)
27676       return 3;
27677     if (remaining <= pentecost - 10)
27678       return 4;
27679     return 0;
27680
27681   ;
27682   return 0;
27683 }
27684 _ACEOF
27685 if ac_fn_c_try_run "$LINENO"; then :
27686   gl_cv_func_sleep_works=yes
27687 else
27688   gl_cv_func_sleep_works=no
27689 fi
27690 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27691   conftest.$ac_objext conftest.beam conftest.$ac_ext
27692 fi
27693
27694 fi
27695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_sleep_works" >&5
27696 $as_echo "$gl_cv_func_sleep_works" >&6; }
27697     case "$gl_cv_func_sleep_works" in
27698       *yes) ;;
27699       *)
27700         REPLACE_SLEEP=1
27701         ;;
27702     esac
27703   fi
27704
27705   if test $HAVE_SLEEP = 0 || test $REPLACE_SLEEP = 1; then
27706
27707
27708
27709
27710
27711
27712
27713
27714   gl_LIBOBJS="$gl_LIBOBJS sleep.$ac_objext"
27715
27716   fi
27717
27718
27719
27720
27721
27722           GNULIB_SLEEP=1
27723
27724
27725
27726
27727
27728 $as_echo "#define GNULIB_TEST_SLEEP 1" >>confdefs.h
27729
27730
27731
27732
27733
27734   gl_cv_func_snprintf_usable=no
27735   for ac_func in snprintf
27736 do :
27737   ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
27738 if test "x$ac_cv_func_snprintf" = xyes; then :
27739   cat >>confdefs.h <<_ACEOF
27740 #define HAVE_SNPRINTF 1
27741 _ACEOF
27742
27743 fi
27744 done
27745
27746   if test $ac_cv_func_snprintf = yes; then
27747
27748
27749
27750   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf respects a size of 1" >&5
27751 $as_echo_n "checking whether snprintf respects a size of 1... " >&6; }
27752 if ${gl_cv_func_snprintf_size1+:} false; then :
27753   $as_echo_n "(cached) " >&6
27754 else
27755
27756       if test "$cross_compiling" = yes; then :
27757   gl_cv_func_snprintf_size1="guessing yes"
27758 else
27759   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27760 /* end confdefs.h.  */
27761
27762 #include <stdio.h>
27763 #if HAVE_SNPRINTF
27764 # define my_snprintf snprintf
27765 #else
27766 # include <stdarg.h>
27767 static int my_snprintf (char *buf, int size, const char *format, ...)
27768 {
27769   va_list args;
27770   int ret;
27771   va_start (args, format);
27772   ret = vsnprintf (buf, size, format, args);
27773   va_end (args);
27774   return ret;
27775 }
27776 #endif
27777 int main()
27778 {
27779   static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
27780   my_snprintf (buf, 1, "%d", 12345);
27781   return buf[1] != 'E';
27782 }
27783 _ACEOF
27784 if ac_fn_c_try_run "$LINENO"; then :
27785   gl_cv_func_snprintf_size1=yes
27786 else
27787   gl_cv_func_snprintf_size1=no
27788 fi
27789 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27790   conftest.$ac_objext conftest.beam conftest.$ac_ext
27791 fi
27792
27793
27794 fi
27795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_size1" >&5
27796 $as_echo "$gl_cv_func_snprintf_size1" >&6; }
27797
27798     case "$gl_cv_func_snprintf_size1" in
27799       *yes)
27800
27801         case "$gl_cv_func_snprintf_retval_c99" in
27802           *yes)
27803
27804
27805      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports POSIX/XSI format strings with positions" >&5
27806 $as_echo_n "checking whether printf supports POSIX/XSI format strings with positions... " >&6; }
27807 if ${gl_cv_func_printf_positions+:} false; then :
27808   $as_echo_n "(cached) " >&6
27809 else
27810
27811       if test "$cross_compiling" = yes; then :
27812
27813          case "$host_os" in
27814            netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*)
27815                          gl_cv_func_printf_positions="guessing no";;
27816            beos*)        gl_cv_func_printf_positions="guessing no";;
27817            mingw* | pw*) gl_cv_func_printf_positions="guessing no";;
27818            *)            gl_cv_func_printf_positions="guessing yes";;
27819          esac
27820
27821 else
27822   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27823 /* end confdefs.h.  */
27824
27825 #include <stdio.h>
27826 #include <string.h>
27827 /* The string "%2$d %1$d", with dollar characters protected from the shell's
27828    dollar expansion (possibly an autoconf bug).  */
27829 static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
27830 static char buf[100];
27831 int main ()
27832 {
27833   sprintf (buf, format, 33, 55);
27834   return (strcmp (buf, "55 33") != 0);
27835 }
27836 _ACEOF
27837 if ac_fn_c_try_run "$LINENO"; then :
27838   gl_cv_func_printf_positions=yes
27839 else
27840   gl_cv_func_printf_positions=no
27841 fi
27842 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27843   conftest.$ac_objext conftest.beam conftest.$ac_ext
27844 fi
27845
27846
27847 fi
27848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_positions" >&5
27849 $as_echo "$gl_cv_func_printf_positions" >&6; }
27850
27851             case "$gl_cv_func_printf_positions" in
27852               *yes)
27853                 gl_cv_func_snprintf_usable=yes
27854                 ;;
27855             esac
27856             ;;
27857         esac
27858         ;;
27859     esac
27860   fi
27861   if test $gl_cv_func_snprintf_usable = no; then
27862
27863
27864
27865
27866
27867
27868
27869
27870
27871
27872   gl_LIBOBJS="$gl_LIBOBJS snprintf.$ac_objext"
27873
27874   if test $ac_cv_func_snprintf = yes; then
27875     REPLACE_SNPRINTF=1
27876   fi
27877   :
27878
27879   fi
27880
27881   if test $ac_cv_have_decl_snprintf = no; then
27882     HAVE_DECL_SNPRINTF=0
27883   fi
27884
27885
27886
27887
27888
27889
27890           GNULIB_SNPRINTF=1
27891
27892
27893
27894
27895
27896 $as_echo "#define GNULIB_TEST_SNPRINTF 1" >>confdefs.h
27897
27898
27899
27900
27901
27902 cat >>confdefs.h <<_ACEOF
27903 #define GNULIB_SNPRINTF 1
27904 _ACEOF
27905
27906
27907
27908   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
27909 $as_echo_n "checking for ssize_t... " >&6; }
27910 if ${gt_cv_ssize_t+:} false; then :
27911   $as_echo_n "(cached) " >&6
27912 else
27913   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27914 /* end confdefs.h.  */
27915 #include <sys/types.h>
27916 int
27917 main ()
27918 {
27919 int x = sizeof (ssize_t *) + sizeof (ssize_t);
27920             return !x;
27921   ;
27922   return 0;
27923 }
27924 _ACEOF
27925 if ac_fn_c_try_compile "$LINENO"; then :
27926   gt_cv_ssize_t=yes
27927 else
27928   gt_cv_ssize_t=no
27929 fi
27930 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27931 fi
27932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
27933 $as_echo "$gt_cv_ssize_t" >&6; }
27934   if test $gt_cv_ssize_t = no; then
27935
27936 $as_echo "#define ssize_t int" >>confdefs.h
27937
27938   fi
27939
27940
27941
27942
27943     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5
27944 $as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; }
27945 if ${gl_cv_func_stat_dir_slash+:} false; then :
27946   $as_echo_n "(cached) " >&6
27947 else
27948   if test "$cross_compiling" = yes; then :
27949   case $host_os in
27950             mingw*) gl_cv_func_stat_dir_slash="guessing no";;
27951             *) gl_cv_func_stat_dir_slash="guessing yes";;
27952           esac
27953 else
27954   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27955 /* end confdefs.h.  */
27956 #include <sys/stat.h>
27957
27958 int
27959 main ()
27960 {
27961 struct stat st; return stat (".", &st) != stat ("./", &st);
27962   ;
27963   return 0;
27964 }
27965 _ACEOF
27966 if ac_fn_c_try_run "$LINENO"; then :
27967   gl_cv_func_stat_dir_slash=yes
27968 else
27969   gl_cv_func_stat_dir_slash=no
27970 fi
27971 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27972   conftest.$ac_objext conftest.beam conftest.$ac_ext
27973 fi
27974
27975 fi
27976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5
27977 $as_echo "$gl_cv_func_stat_dir_slash" >&6; }
27978         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
27979 $as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
27980 if ${gl_cv_func_stat_file_slash+:} false; then :
27981   $as_echo_n "(cached) " >&6
27982 else
27983   touch conftest.tmp
27984        # Assume that if we have lstat, we can also check symlinks.
27985        if test $ac_cv_func_lstat = yes; then
27986          ln -s conftest.tmp conftest.lnk
27987        fi
27988        if test "$cross_compiling" = yes; then :
27989   case "$host_os" in
27990                     # Guess yes on glibc systems.
27991             *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
27992                     # If we don't know, assume the worst.
27993             *)      gl_cv_func_stat_file_slash="guessing no" ;;
27994           esac
27995
27996 else
27997   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27998 /* end confdefs.h.  */
27999 #include <sys/stat.h>
28000
28001 int
28002 main ()
28003 {
28004 int result = 0;
28005       struct stat st;
28006       if (!stat ("conftest.tmp/", &st))
28007         result |= 1;
28008 #if HAVE_LSTAT
28009       if (!stat ("conftest.lnk/", &st))
28010         result |= 2;
28011 #endif
28012       return result;
28013
28014   ;
28015   return 0;
28016 }
28017 _ACEOF
28018 if ac_fn_c_try_run "$LINENO"; then :
28019   gl_cv_func_stat_file_slash=yes
28020 else
28021   gl_cv_func_stat_file_slash=no
28022 fi
28023 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28024   conftest.$ac_objext conftest.beam conftest.$ac_ext
28025 fi
28026
28027        rm -f conftest.tmp conftest.lnk
28028 fi
28029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
28030 $as_echo "$gl_cv_func_stat_file_slash" >&6; }
28031   case $gl_cv_func_stat_dir_slash in
28032     *no) REPLACE_STAT=1
28033
28034 $as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h
28035 ;;
28036   esac
28037   case $gl_cv_func_stat_file_slash in
28038     *no) REPLACE_STAT=1
28039
28040 $as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
28041 ;;
28042   esac
28043
28044   if test $REPLACE_STAT = 1; then
28045
28046
28047
28048
28049
28050
28051
28052
28053   gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
28054
28055     :
28056   fi
28057
28058
28059
28060
28061
28062           GNULIB_STAT=1
28063
28064
28065
28066
28067
28068 $as_echo "#define GNULIB_TEST_STAT 1" >>confdefs.h
28069
28070
28071
28072
28073
28074
28075
28076   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>
28077      #include <sys/stat.h>
28078 "
28079 if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes; then :
28080
28081 cat >>confdefs.h <<_ACEOF
28082 #define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1
28083 _ACEOF
28084
28085 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
28086 $as_echo_n "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
28087 if ${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+:} false; then :
28088   $as_echo_n "(cached) " >&6
28089 else
28090   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28091 /* end confdefs.h.  */
28092
28093             #include <sys/types.h>
28094             #include <sys/stat.h>
28095             #if HAVE_SYS_TIME_H
28096             # include <sys/time.h>
28097             #endif
28098             #include <time.h>
28099             struct timespec ts;
28100             struct stat st;
28101
28102 int
28103 main ()
28104 {
28105
28106             st.st_atim = ts;
28107
28108   ;
28109   return 0;
28110 }
28111 _ACEOF
28112 if ac_fn_c_try_compile "$LINENO"; then :
28113   ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
28114 else
28115   ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no
28116 fi
28117 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28118 fi
28119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
28120 $as_echo "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
28121      if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
28122
28123 $as_echo "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
28124
28125      fi
28126 else
28127   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>
28128         #include <sys/stat.h>
28129 "
28130 if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = xyes; then :
28131
28132 cat >>confdefs.h <<_ACEOF
28133 #define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1
28134 _ACEOF
28135
28136
28137 else
28138   ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
28139            #include <sys/stat.h>
28140 "
28141 if test "x$ac_cv_member_struct_stat_st_atimensec" = xyes; then :
28142
28143 cat >>confdefs.h <<_ACEOF
28144 #define HAVE_STRUCT_STAT_ST_ATIMENSEC 1
28145 _ACEOF
28146
28147
28148 else
28149   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>
28150               #include <sys/stat.h>
28151 "
28152 if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = xyes; then :
28153
28154 cat >>confdefs.h <<_ACEOF
28155 #define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1
28156 _ACEOF
28157
28158
28159 fi
28160
28161 fi
28162
28163 fi
28164
28165 fi
28166
28167
28168
28169
28170
28171   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>
28172      #include <sys/stat.h>
28173 "
28174 if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = xyes; then :
28175
28176 cat >>confdefs.h <<_ACEOF
28177 #define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1
28178 _ACEOF
28179
28180
28181 else
28182   ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h>
28183         #include <sys/stat.h>
28184 "
28185 if test "x$ac_cv_member_struct_stat_st_birthtimensec" = xyes; then :
28186
28187 cat >>confdefs.h <<_ACEOF
28188 #define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1
28189 _ACEOF
28190
28191
28192 else
28193   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>
28194           #include <sys/stat.h>
28195 "
28196 if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = xyes; then :
28197
28198 cat >>confdefs.h <<_ACEOF
28199 #define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1
28200 _ACEOF
28201
28202
28203 fi
28204
28205 fi
28206
28207 fi
28208
28209
28210
28211
28212 cat >>confdefs.h <<_ACEOF
28213 #define GNULIB_STATAT 1
28214 _ACEOF
28215
28216
28217   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stdalign.h" >&5
28218 $as_echo_n "checking for working stdalign.h... " >&6; }
28219 if ${gl_cv_header_working_stdalign_h+:} false; then :
28220   $as_echo_n "(cached) " >&6
28221 else
28222   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28223 /* end confdefs.h.  */
28224 #include <stdalign.h>
28225             #include <stddef.h>
28226
28227             /* Test that alignof yields a result consistent with offsetof.
28228                This catches GCC bug 52023
28229                <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>.  */
28230             #ifdef __cplusplus
28231                template <class t> struct alignof_helper { char a; t b; };
28232             # define ao(type) offsetof (alignof_helper<type>, b)
28233             #else
28234             # define ao(type) offsetof (struct { char a; type b; }, b)
28235             #endif
28236             char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1];
28237             char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1];
28238             char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1];
28239
28240             /* Test _Alignas only on platforms where gnulib can help.  */
28241             #if \
28242                 (__GNUC__ || __IBMC__ || __IBMCPP__ \
28243                  || 0x5110 <= __SUNPRO_C || 1300 <= _MSC_VER)
28244               struct alignas_test { char c; char alignas (8) alignas_8; };
28245               char test_alignas[offsetof (struct alignas_test, alignas_8) == 8
28246                                 ? 1 : -1];
28247             #endif
28248
28249 int
28250 main ()
28251 {
28252
28253   ;
28254   return 0;
28255 }
28256 _ACEOF
28257 if ac_fn_c_try_compile "$LINENO"; then :
28258   gl_cv_header_working_stdalign_h=yes
28259 else
28260   gl_cv_header_working_stdalign_h=no
28261 fi
28262 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28263 fi
28264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdalign_h" >&5
28265 $as_echo "$gl_cv_header_working_stdalign_h" >&6; }
28266
28267   if test $gl_cv_header_working_stdalign_h = yes; then
28268     STDALIGN_H=''
28269   else
28270     STDALIGN_H='stdalign.h'
28271   fi
28272
28273
28274    if test -n "$STDALIGN_H"; then
28275   GL_GENERATE_STDALIGN_H_TRUE=
28276   GL_GENERATE_STDALIGN_H_FALSE='#'
28277 else
28278   GL_GENERATE_STDALIGN_H_TRUE='#'
28279   GL_GENERATE_STDALIGN_H_FALSE=
28280 fi
28281
28282
28283
28284   STDARG_H=''
28285   NEXT_STDARG_H='<stdarg.h>'
28286   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5
28287 $as_echo_n "checking for va_copy... " >&6; }
28288   if ${gl_cv_func_va_copy+:} false; then :
28289   $as_echo_n "(cached) " >&6
28290 else
28291
28292     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28293 /* end confdefs.h.  */
28294 #include <stdarg.h>
28295 int
28296 main ()
28297 {
28298
28299 #ifndef va_copy
28300 void (*func) (va_list, va_list) = va_copy;
28301 #endif
28302
28303   ;
28304   return 0;
28305 }
28306 _ACEOF
28307 if ac_fn_c_try_compile "$LINENO"; then :
28308   gl_cv_func_va_copy=yes
28309 else
28310   gl_cv_func_va_copy=no
28311 fi
28312 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28313 fi
28314
28315   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_va_copy" >&5
28316 $as_echo "$gl_cv_func_va_copy" >&6; }
28317   if test $gl_cv_func_va_copy = no; then
28318                                     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28319 /* end confdefs.h.  */
28320 #if defined _AIX && !defined __GNUC__
28321         AIX vaccine
28322        #endif
28323
28324 _ACEOF
28325 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28326   $EGREP "vaccine" >/dev/null 2>&1; then :
28327   gl_aixcc=yes
28328 else
28329   gl_aixcc=no
28330 fi
28331 rm -f conftest*
28332
28333     if test $gl_aixcc = yes; then
28334             STDARG_H=stdarg.h
28335
28336
28337
28338
28339
28340
28341
28342
28343      if test $gl_cv_have_include_next = yes; then
28344        gl_cv_next_stdarg_h='<'stdarg.h'>'
28345      else
28346        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdarg.h>" >&5
28347 $as_echo_n "checking absolute name of <stdarg.h>... " >&6; }
28348 if ${gl_cv_next_stdarg_h+:} false; then :
28349   $as_echo_n "(cached) " >&6
28350 else
28351
28352                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28353 /* end confdefs.h.  */
28354 #include <stdarg.h>
28355
28356 _ACEOF
28357                                                                                                                         case "$host_os" in
28358                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
28359                  *)    gl_absname_cpp="$ac_cpp" ;;
28360                esac
28361
28362                case "$host_os" in
28363                  mingw*)
28364                                                                                                                                      gl_dirsep_regex='[/\\]'
28365                    ;;
28366                  *)
28367                    gl_dirsep_regex='\/'
28368                    ;;
28369                esac
28370                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
28371
28372                gl_header_literal_regex=`echo 'stdarg.h' \
28373                                         | sed -e "$gl_make_literal_regex_sed"`
28374                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
28375                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
28376                    s|^/[^/]|//&|
28377                    p
28378                    q
28379                  }'
28380                                                             gl_cv_next_stdarg_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
28381                       sed -n "$gl_absolute_header_sed"`'"'
28382
28383
28384 fi
28385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdarg_h" >&5
28386 $as_echo "$gl_cv_next_stdarg_h" >&6; }
28387      fi
28388      NEXT_STDARG_H=$gl_cv_next_stdarg_h
28389
28390      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
28391        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
28392        gl_next_as_first_directive='<'stdarg.h'>'
28393      else
28394        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
28395        gl_next_as_first_directive=$gl_cv_next_stdarg_h
28396      fi
28397      NEXT_AS_FIRST_DIRECTIVE_STDARG_H=$gl_next_as_first_directive
28398
28399
28400
28401
28402             if test "$gl_cv_next_stdarg_h" = '""'; then
28403         gl_cv_next_stdarg_h='"///usr/include/stdarg.h"'
28404         NEXT_STDARG_H="$gl_cv_next_stdarg_h"
28405       fi
28406     else
28407
28408   saved_as_echo_n="$as_echo_n"
28409   as_echo_n=':'
28410   if ${gl_cv_func___va_copy+:} false; then :
28411   $as_echo_n "(cached) " >&6
28412 else
28413
28414         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28415 /* end confdefs.h.  */
28416 #include <stdarg.h>
28417 int
28418 main ()
28419 {
28420
28421 #ifndef __va_copy
28422 error, bail out
28423 #endif
28424
28425   ;
28426   return 0;
28427 }
28428 _ACEOF
28429 if ac_fn_c_try_compile "$LINENO"; then :
28430   gl_cv_func___va_copy=yes
28431 else
28432   gl_cv_func___va_copy=no
28433 fi
28434 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28435 fi
28436
28437   as_echo_n="$saved_as_echo_n"
28438
28439       if test $gl_cv_func___va_copy = yes; then
28440
28441 $as_echo "#define va_copy __va_copy" >>confdefs.h
28442
28443       else
28444
28445
28446 $as_echo "#define va_copy gl_va_copy" >>confdefs.h
28447
28448       fi
28449     fi
28450   fi
28451
28452    if test -n "$STDARG_H"; then
28453   GL_GENERATE_STDARG_H_TRUE=
28454   GL_GENERATE_STDARG_H_FALSE='#'
28455 else
28456   GL_GENERATE_STDARG_H_TRUE='#'
28457   GL_GENERATE_STDARG_H_FALSE=
28458 fi
28459
28460
28461
28462
28463
28464
28465   # Define two additional variables used in the Makefile substitution.
28466
28467   if test "$ac_cv_header_stdbool_h" = yes; then
28468     STDBOOL_H=''
28469   else
28470     STDBOOL_H='stdbool.h'
28471   fi
28472
28473    if test -n "$STDBOOL_H"; then
28474   GL_GENERATE_STDBOOL_H_TRUE=
28475   GL_GENERATE_STDBOOL_H_FALSE='#'
28476 else
28477   GL_GENERATE_STDBOOL_H_TRUE='#'
28478   GL_GENERATE_STDBOOL_H_FALSE=
28479 fi
28480
28481
28482   if test "$ac_cv_type__Bool" = yes; then
28483     HAVE__BOOL=1
28484   else
28485     HAVE__BOOL=0
28486   fi
28487
28488
28489
28490
28491
28492   STDDEF_H=
28493   if test $gt_cv_c_wchar_t = no; then
28494     HAVE_WCHAR_T=0
28495     STDDEF_H=stddef.h
28496   fi
28497   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
28498 $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
28499 if ${gl_cv_decl_null_works+:} false; then :
28500   $as_echo_n "(cached) " >&6
28501 else
28502   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28503 /* end confdefs.h.  */
28504 #include <stddef.h>
28505       int test[2 * (sizeof NULL == sizeof (void *)) -1];
28506
28507 int
28508 main ()
28509 {
28510
28511   ;
28512   return 0;
28513 }
28514 _ACEOF
28515 if ac_fn_c_try_compile "$LINENO"; then :
28516   gl_cv_decl_null_works=yes
28517 else
28518   gl_cv_decl_null_works=no
28519 fi
28520 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28521 fi
28522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
28523 $as_echo "$gl_cv_decl_null_works" >&6; }
28524   if test $gl_cv_decl_null_works = no; then
28525     REPLACE_NULL=1
28526     STDDEF_H=stddef.h
28527   fi
28528
28529    if test -n "$STDDEF_H"; then
28530   GL_GENERATE_STDDEF_H_TRUE=
28531   GL_GENERATE_STDDEF_H_FALSE='#'
28532 else
28533   GL_GENERATE_STDDEF_H_TRUE='#'
28534   GL_GENERATE_STDDEF_H_FALSE=
28535 fi
28536
28537   if test -n "$STDDEF_H"; then
28538
28539
28540
28541
28542
28543
28544
28545
28546      if test $gl_cv_have_include_next = yes; then
28547        gl_cv_next_stddef_h='<'stddef.h'>'
28548      else
28549        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
28550 $as_echo_n "checking absolute name of <stddef.h>... " >&6; }
28551 if ${gl_cv_next_stddef_h+:} false; then :
28552   $as_echo_n "(cached) " >&6
28553 else
28554
28555                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28556 /* end confdefs.h.  */
28557 #include <stddef.h>
28558
28559 _ACEOF
28560                                                                                                                         case "$host_os" in
28561                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
28562                  *)    gl_absname_cpp="$ac_cpp" ;;
28563                esac
28564
28565                case "$host_os" in
28566                  mingw*)
28567                                                                                                                                      gl_dirsep_regex='[/\\]'
28568                    ;;
28569                  *)
28570                    gl_dirsep_regex='\/'
28571                    ;;
28572                esac
28573                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
28574
28575                gl_header_literal_regex=`echo 'stddef.h' \
28576                                         | sed -e "$gl_make_literal_regex_sed"`
28577                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
28578                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
28579                    s|^/[^/]|//&|
28580                    p
28581                    q
28582                  }'
28583                                                             gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
28584                       sed -n "$gl_absolute_header_sed"`'"'
28585
28586
28587 fi
28588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
28589 $as_echo "$gl_cv_next_stddef_h" >&6; }
28590      fi
28591      NEXT_STDDEF_H=$gl_cv_next_stddef_h
28592
28593      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
28594        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
28595        gl_next_as_first_directive='<'stddef.h'>'
28596      else
28597        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
28598        gl_next_as_first_directive=$gl_cv_next_stddef_h
28599      fi
28600      NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
28601
28602
28603
28604
28605   fi
28606
28607
28608
28609
28610
28611
28612
28613
28614
28615
28616
28617
28618      if test $gl_cv_have_include_next = yes; then
28619        gl_cv_next_stdio_h='<'stdio.h'>'
28620      else
28621        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
28622 $as_echo_n "checking absolute name of <stdio.h>... " >&6; }
28623 if ${gl_cv_next_stdio_h+:} false; then :
28624   $as_echo_n "(cached) " >&6
28625 else
28626
28627                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28628 /* end confdefs.h.  */
28629 #include <stdio.h>
28630
28631 _ACEOF
28632                                                                                                                         case "$host_os" in
28633                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
28634                  *)    gl_absname_cpp="$ac_cpp" ;;
28635                esac
28636
28637                case "$host_os" in
28638                  mingw*)
28639                                                                                                                                      gl_dirsep_regex='[/\\]'
28640                    ;;
28641                  *)
28642                    gl_dirsep_regex='\/'
28643                    ;;
28644                esac
28645                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
28646
28647                gl_header_literal_regex=`echo 'stdio.h' \
28648                                         | sed -e "$gl_make_literal_regex_sed"`
28649                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
28650                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
28651                    s|^/[^/]|//&|
28652                    p
28653                    q
28654                  }'
28655                                                             gl_cv_next_stdio_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
28656                       sed -n "$gl_absolute_header_sed"`'"'
28657
28658
28659 fi
28660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
28661 $as_echo "$gl_cv_next_stdio_h" >&6; }
28662      fi
28663      NEXT_STDIO_H=$gl_cv_next_stdio_h
28664
28665      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
28666        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
28667        gl_next_as_first_directive='<'stdio.h'>'
28668      else
28669        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
28670        gl_next_as_first_directive=$gl_cv_next_stdio_h
28671      fi
28672      NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
28673
28674
28675
28676
28677
28678       GNULIB_FSCANF=1
28679
28680
28681 cat >>confdefs.h <<_ACEOF
28682 #define GNULIB_FSCANF 1
28683 _ACEOF
28684
28685
28686   GNULIB_SCANF=1
28687
28688
28689 cat >>confdefs.h <<_ACEOF
28690 #define GNULIB_SCANF 1
28691 _ACEOF
28692
28693
28694   GNULIB_FGETC=1
28695   GNULIB_GETC=1
28696   GNULIB_GETCHAR=1
28697   GNULIB_FGETS=1
28698   GNULIB_FREAD=1
28699
28700
28701       GNULIB_FPRINTF=1
28702   GNULIB_PRINTF=1
28703   GNULIB_VFPRINTF=1
28704   GNULIB_VPRINTF=1
28705   GNULIB_FPUTC=1
28706   GNULIB_PUTC=1
28707   GNULIB_PUTCHAR=1
28708   GNULIB_FPUTS=1
28709   GNULIB_PUTS=1
28710   GNULIB_FWRITE=1
28711
28712
28713
28714
28715     for gl_func in dprintf fpurge fseeko ftello getdelim getline gets pclose popen     renameat snprintf tmpfile vdprintf vsnprintf; do
28716     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
28717     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
28718 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
28719 if eval \${$as_gl_Symbol+:} false; then :
28720   $as_echo_n "(cached) " >&6
28721 else
28722   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28723 /* end confdefs.h.  */
28724 #include <stdio.h>
28725
28726 int
28727 main ()
28728 {
28729 #undef $gl_func
28730   (void) $gl_func;
28731   ;
28732   return 0;
28733 }
28734 _ACEOF
28735 if ac_fn_c_try_compile "$LINENO"; then :
28736   eval "$as_gl_Symbol=yes"
28737 else
28738   eval "$as_gl_Symbol=no"
28739 fi
28740 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28741 fi
28742 eval ac_res=\$$as_gl_Symbol
28743                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
28744 $as_echo "$ac_res" >&6; }
28745     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
28746   cat >>confdefs.h <<_ACEOF
28747 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
28748 _ACEOF
28749
28750                      eval ac_cv_have_decl_$gl_func=yes
28751 fi
28752       done
28753
28754
28755
28756
28757
28758
28759
28760
28761
28762
28763
28764
28765      if test $gl_cv_have_include_next = yes; then
28766        gl_cv_next_stdlib_h='<'stdlib.h'>'
28767      else
28768        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
28769 $as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
28770 if ${gl_cv_next_stdlib_h+:} false; then :
28771   $as_echo_n "(cached) " >&6
28772 else
28773
28774                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28775 /* end confdefs.h.  */
28776 #include <stdlib.h>
28777
28778 _ACEOF
28779                                                                                                                         case "$host_os" in
28780                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
28781                  *)    gl_absname_cpp="$ac_cpp" ;;
28782                esac
28783
28784                case "$host_os" in
28785                  mingw*)
28786                                                                                                                                      gl_dirsep_regex='[/\\]'
28787                    ;;
28788                  *)
28789                    gl_dirsep_regex='\/'
28790                    ;;
28791                esac
28792                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
28793
28794                gl_header_literal_regex=`echo 'stdlib.h' \
28795                                         | sed -e "$gl_make_literal_regex_sed"`
28796                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
28797                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
28798                    s|^/[^/]|//&|
28799                    p
28800                    q
28801                  }'
28802                                                             gl_cv_next_stdlib_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
28803                       sed -n "$gl_absolute_header_sed"`'"'
28804
28805
28806 fi
28807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
28808 $as_echo "$gl_cv_next_stdlib_h" >&6; }
28809      fi
28810      NEXT_STDLIB_H=$gl_cv_next_stdlib_h
28811
28812      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
28813        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
28814        gl_next_as_first_directive='<'stdlib.h'>'
28815      else
28816        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
28817        gl_next_as_first_directive=$gl_cv_next_stdlib_h
28818      fi
28819      NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
28820
28821
28822
28823
28824
28825
28826     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
28827     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
28828     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
28829 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
28830 if eval \${$as_gl_Symbol+:} false; then :
28831   $as_echo_n "(cached) " >&6
28832 else
28833   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28834 /* end confdefs.h.  */
28835 #include <stdlib.h>
28836 #if HAVE_SYS_LOADAVG_H
28837 # include <sys/loadavg.h>
28838 #endif
28839 #if HAVE_RANDOM_H
28840 # include <random.h>
28841 #endif
28842
28843 int
28844 main ()
28845 {
28846 #undef $gl_func
28847   (void) $gl_func;
28848   ;
28849   return 0;
28850 }
28851 _ACEOF
28852 if ac_fn_c_try_compile "$LINENO"; then :
28853   eval "$as_gl_Symbol=yes"
28854 else
28855   eval "$as_gl_Symbol=no"
28856 fi
28857 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28858 fi
28859 eval ac_res=\$$as_gl_Symbol
28860                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
28861 $as_echo "$ac_res" >&6; }
28862     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
28863   cat >>confdefs.h <<_ACEOF
28864 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
28865 _ACEOF
28866
28867                      eval ac_cv_have_decl_$gl_func=yes
28868 fi
28869       done
28870
28871
28872
28873
28874
28875
28876
28877
28878   for ac_func in stpcpy
28879 do :
28880   ac_fn_c_check_func "$LINENO" "stpcpy" "ac_cv_func_stpcpy"
28881 if test "x$ac_cv_func_stpcpy" = xyes; then :
28882   cat >>confdefs.h <<_ACEOF
28883 #define HAVE_STPCPY 1
28884 _ACEOF
28885
28886 fi
28887 done
28888
28889   if test $ac_cv_func_stpcpy = no; then
28890     HAVE_STPCPY=0
28891   fi
28892
28893   if test $HAVE_STPCPY = 0; then
28894
28895
28896
28897
28898
28899
28900
28901
28902   gl_LIBOBJS="$gl_LIBOBJS stpcpy.$ac_objext"
28903
28904
28905   :
28906
28907   fi
28908
28909
28910
28911
28912
28913           GNULIB_STPCPY=1
28914
28915
28916
28917
28918
28919 $as_echo "#define GNULIB_TEST_STPCPY 1" >>confdefs.h
28920
28921
28922
28923
28924
28925
28926   for ac_func in strcasecmp
28927 do :
28928   ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp"
28929 if test "x$ac_cv_func_strcasecmp" = xyes; then :
28930   cat >>confdefs.h <<_ACEOF
28931 #define HAVE_STRCASECMP 1
28932 _ACEOF
28933
28934 fi
28935 done
28936
28937   if test $ac_cv_func_strcasecmp = no; then
28938     HAVE_STRCASECMP=0
28939   fi
28940
28941
28942
28943   for ac_func in strncasecmp
28944 do :
28945   ac_fn_c_check_func "$LINENO" "strncasecmp" "ac_cv_func_strncasecmp"
28946 if test "x$ac_cv_func_strncasecmp" = xyes; then :
28947   cat >>confdefs.h <<_ACEOF
28948 #define HAVE_STRNCASECMP 1
28949 _ACEOF
28950
28951 fi
28952 done
28953
28954   if test $ac_cv_func_strncasecmp = yes; then
28955     HAVE_STRNCASECMP=1
28956   else
28957     HAVE_STRNCASECMP=0
28958   fi
28959   ac_fn_c_check_decl "$LINENO" "strncasecmp" "ac_cv_have_decl_strncasecmp" "$ac_includes_default"
28960 if test "x$ac_cv_have_decl_strncasecmp" = xyes; then :
28961   ac_have_decl=1
28962 else
28963   ac_have_decl=0
28964 fi
28965
28966 cat >>confdefs.h <<_ACEOF
28967 #define HAVE_DECL_STRNCASECMP $ac_have_decl
28968 _ACEOF
28969
28970   if test $ac_cv_have_decl_strncasecmp = no; then
28971     HAVE_DECL_STRNCASECMP=0
28972   fi
28973
28974
28975   if test $HAVE_STRCASECMP = 0; then
28976
28977
28978
28979
28980
28981
28982
28983
28984   gl_LIBOBJS="$gl_LIBOBJS strcasecmp.$ac_objext"
28985
28986
28987   :
28988
28989   fi
28990   if test $HAVE_STRNCASECMP = 0; then
28991
28992
28993
28994
28995
28996
28997
28998
28999   gl_LIBOBJS="$gl_LIBOBJS strncasecmp.$ac_objext"
29000
29001
29002   :
29003
29004   fi
29005
29006
29007
29008
29009   for ac_func in strchrnul
29010 do :
29011   ac_fn_c_check_func "$LINENO" "strchrnul" "ac_cv_func_strchrnul"
29012 if test "x$ac_cv_func_strchrnul" = xyes; then :
29013   cat >>confdefs.h <<_ACEOF
29014 #define HAVE_STRCHRNUL 1
29015 _ACEOF
29016
29017 fi
29018 done
29019
29020   if test $ac_cv_func_strchrnul = no; then
29021     HAVE_STRCHRNUL=0
29022   else
29023     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strchrnul works" >&5
29024 $as_echo_n "checking whether strchrnul works... " >&6; }
29025 if ${gl_cv_func_strchrnul_works+:} false; then :
29026   $as_echo_n "(cached) " >&6
29027 else
29028   if test "$cross_compiling" = yes; then :
29029            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29030 /* end confdefs.h.  */
29031
29032 #if defined __CYGWIN__
29033  #include <cygwin/version.h>
29034  #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 9)
29035   Lucky user
29036  #endif
29037 #else
29038   Lucky user
29039 #endif
29040
29041 _ACEOF
29042 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
29043   $EGREP "Lucky user" >/dev/null 2>&1; then :
29044   gl_cv_func_strchrnul_works="guessing yes"
29045 else
29046   gl_cv_func_strchrnul_works="guessing no"
29047 fi
29048 rm -f conftest*
29049
29050
29051 else
29052   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29053 /* end confdefs.h.  */
29054
29055 #include <string.h> /* for strchrnul */
29056
29057 int
29058 main ()
29059 {
29060 const char *buf = "a";
29061       return strchrnul (buf, 'b') != buf + 1;
29062
29063   ;
29064   return 0;
29065 }
29066 _ACEOF
29067 if ac_fn_c_try_run "$LINENO"; then :
29068   gl_cv_func_strchrnul_works=yes
29069 else
29070   gl_cv_func_strchrnul_works=no
29071 fi
29072 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29073   conftest.$ac_objext conftest.beam conftest.$ac_ext
29074 fi
29075
29076
29077 fi
29078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strchrnul_works" >&5
29079 $as_echo "$gl_cv_func_strchrnul_works" >&6; }
29080     case "$gl_cv_func_strchrnul_works" in
29081       *yes) ;;
29082       *) REPLACE_STRCHRNUL=1 ;;
29083     esac
29084   fi
29085
29086   if test $HAVE_STRCHRNUL = 0 || test $REPLACE_STRCHRNUL = 1; then
29087
29088
29089
29090
29091
29092
29093
29094
29095   gl_LIBOBJS="$gl_LIBOBJS strchrnul.$ac_objext"
29096
29097     :
29098   fi
29099
29100
29101
29102
29103
29104           GNULIB_STRCHRNUL=1
29105
29106
29107
29108
29109
29110 $as_echo "#define GNULIB_TEST_STRCHRNUL 1" >>confdefs.h
29111
29112
29113
29114
29115
29116
29117
29118   if test $ac_cv_func_strdup = yes; then
29119     if test $gl_cv_func_malloc_posix != yes; then
29120       REPLACE_STRDUP=1
29121     fi
29122   fi
29123
29124   if test $ac_cv_have_decl_strdup = no; then
29125     HAVE_DECL_STRDUP=0
29126   fi
29127
29128   if test $ac_cv_func_strdup = no || test $REPLACE_STRDUP = 1; then
29129
29130
29131
29132
29133
29134
29135
29136
29137   gl_LIBOBJS="$gl_LIBOBJS strdup.$ac_objext"
29138
29139     :
29140   fi
29141
29142
29143
29144
29145
29146           GNULIB_STRDUP=1
29147
29148
29149
29150
29151
29152 $as_echo "#define GNULIB_TEST_STRDUP 1" >>confdefs.h
29153
29154
29155
29156
29157
29158
29159
29160
29161   if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
29162     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
29163 $as_echo_n "checking for working strerror function... " >&6; }
29164 if ${gl_cv_func_working_strerror+:} false; then :
29165   $as_echo_n "(cached) " >&6
29166 else
29167   if test "$cross_compiling" = yes; then :
29168   case "$host_os" in
29169                    # Guess yes on glibc systems.
29170            *-gnu*) gl_cv_func_working_strerror="guessing yes" ;;
29171                    # If we don't know, assume the worst.
29172            *)      gl_cv_func_working_strerror="guessing no" ;;
29173          esac
29174
29175 else
29176   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29177 /* end confdefs.h.  */
29178 #include <string.h>
29179
29180 int
29181 main ()
29182 {
29183 if (!*strerror (-2)) return 1;
29184   ;
29185   return 0;
29186 }
29187 _ACEOF
29188 if ac_fn_c_try_run "$LINENO"; then :
29189   gl_cv_func_working_strerror=yes
29190 else
29191   gl_cv_func_working_strerror=no
29192 fi
29193 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29194   conftest.$ac_objext conftest.beam conftest.$ac_ext
29195 fi
29196
29197
29198 fi
29199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
29200 $as_echo "$gl_cv_func_working_strerror" >&6; }
29201     case "$gl_cv_func_working_strerror" in
29202       *yes) ;;
29203       *)
29204                         REPLACE_STRERROR=1
29205         ;;
29206     esac
29207
29208   else
29209             REPLACE_STRERROR=1
29210   fi
29211
29212   if test $REPLACE_STRERROR = 1; then
29213
29214
29215
29216
29217
29218
29219
29220
29221   gl_LIBOBJS="$gl_LIBOBJS strerror.$ac_objext"
29222
29223   fi
29224
29225
29226 cat >>confdefs.h <<_ACEOF
29227 #define GNULIB_STRERROR 1
29228 _ACEOF
29229
29230
29231
29232
29233
29234
29235
29236           GNULIB_STRERROR=1
29237
29238
29239
29240
29241
29242 $as_echo "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
29243
29244
29245
29246
29247
29248   if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
29249
29250
29251
29252
29253
29254
29255
29256
29257   gl_LIBOBJS="$gl_LIBOBJS strerror-override.$ac_objext"
29258
29259
29260
29261
29262
29263   if test $ac_cv_header_sys_socket_h != yes; then
29264                     for ac_header in winsock2.h
29265 do :
29266   ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
29267 if test "x$ac_cv_header_winsock2_h" = xyes; then :
29268   cat >>confdefs.h <<_ACEOF
29269 #define HAVE_WINSOCK2_H 1
29270 _ACEOF
29271
29272 fi
29273
29274 done
29275
29276   fi
29277   if test "$ac_cv_header_winsock2_h" = yes; then
29278     HAVE_WINSOCK2_H=1
29279     UNISTD_H_HAVE_WINSOCK2_H=1
29280     SYS_IOCTL_H_HAVE_WINSOCK2_H=1
29281   else
29282     HAVE_WINSOCK2_H=0
29283   fi
29284
29285
29286   fi
29287
29288
29289
29290
29291
29292
29293
29294
29295
29296
29297
29298
29299   if test $ac_cv_have_decl_strndup = no; then
29300     HAVE_DECL_STRNDUP=0
29301   fi
29302
29303   if test $ac_cv_func_strndup = yes; then
29304     HAVE_STRNDUP=1
29305     # AIX 4.3.3, AIX 5.1 have a function that fails to add the terminating '\0'.
29306     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strndup" >&5
29307 $as_echo_n "checking for working strndup... " >&6; }
29308 if ${gl_cv_func_strndup_works+:} false; then :
29309   $as_echo_n "(cached) " >&6
29310 else
29311   if test "$cross_compiling" = yes; then :
29312
29313           case $host_os in
29314             aix | aix[3-6]*) gl_cv_func_strndup_works="guessing no";;
29315             *)               gl_cv_func_strndup_works="guessing yes";;
29316           esac
29317
29318 else
29319   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29320 /* end confdefs.h.  */
29321
29322          #include <string.h>
29323                            #include <stdlib.h>
29324 int
29325 main ()
29326 {
29327
29328 #if !HAVE_DECL_STRNDUP
29329   extern
29330   #ifdef __cplusplus
29331   "C"
29332   #endif
29333   char *strndup (const char *, size_t);
29334 #endif
29335   char *s;
29336   s = strndup ("some longer string", 15);
29337   free (s);
29338   s = strndup ("shorter string", 13);
29339   return s[13] != '\0';
29340   ;
29341   return 0;
29342 }
29343 _ACEOF
29344 if ac_fn_c_try_run "$LINENO"; then :
29345   gl_cv_func_strndup_works=yes
29346 else
29347   gl_cv_func_strndup_works=no
29348 fi
29349 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29350   conftest.$ac_objext conftest.beam conftest.$ac_ext
29351 fi
29352
29353 fi
29354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strndup_works" >&5
29355 $as_echo "$gl_cv_func_strndup_works" >&6; }
29356     case $gl_cv_func_strndup_works in
29357       *no) REPLACE_STRNDUP=1 ;;
29358     esac
29359   else
29360     HAVE_STRNDUP=0
29361   fi
29362
29363   if test $HAVE_STRNDUP = 0 || test $REPLACE_STRNDUP = 1; then
29364
29365
29366
29367
29368
29369
29370
29371
29372   gl_LIBOBJS="$gl_LIBOBJS strndup.$ac_objext"
29373
29374   fi
29375
29376
29377
29378
29379
29380           GNULIB_STRNDUP=1
29381
29382
29383
29384
29385
29386 $as_echo "#define GNULIB_TEST_STRNDUP 1" >>confdefs.h
29387
29388
29389
29390
29391
29392
29393
29394
29395
29396   if test $ac_cv_have_decl_strnlen = no; then
29397     HAVE_DECL_STRNLEN=0
29398   else
29399
29400          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strnlen" >&5
29401 $as_echo_n "checking for working strnlen... " >&6; }
29402 if ${ac_cv_func_strnlen_working+:} false; then :
29403   $as_echo_n "(cached) " >&6
29404 else
29405   if test "$cross_compiling" = yes; then :
29406   # Guess no on AIX systems, yes otherwise.
29407                 case "$host_os" in
29408                   aix*) ac_cv_func_strnlen_working=no;;
29409                   *)    ac_cv_func_strnlen_working=yes;;
29410                 esac
29411 else
29412   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29413 /* end confdefs.h.  */
29414 $ac_includes_default
29415 int
29416 main ()
29417 {
29418
29419 #define S "foobar"
29420 #define S_LEN (sizeof S - 1)
29421
29422   /* At least one implementation is buggy: that of AIX 4.3 would
29423      give strnlen (S, 1) == 3.  */
29424
29425   int i;
29426   for (i = 0; i < S_LEN + 1; ++i)
29427     {
29428       int expected = i <= S_LEN ? i : S_LEN;
29429       if (strnlen (S, i) != expected)
29430         return 1;
29431     }
29432   return 0;
29433
29434   ;
29435   return 0;
29436 }
29437 _ACEOF
29438 if ac_fn_c_try_run "$LINENO"; then :
29439   ac_cv_func_strnlen_working=yes
29440 else
29441   ac_cv_func_strnlen_working=no
29442 fi
29443 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29444   conftest.$ac_objext conftest.beam conftest.$ac_ext
29445 fi
29446
29447 fi
29448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strnlen_working" >&5
29449 $as_echo "$ac_cv_func_strnlen_working" >&6; }
29450 test $ac_cv_func_strnlen_working = no && :
29451
29452
29453     if test $ac_cv_func_strnlen_working = no; then
29454       REPLACE_STRNLEN=1
29455     fi
29456   fi
29457
29458   if test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1; then
29459
29460
29461
29462
29463
29464
29465
29466
29467   gl_LIBOBJS="$gl_LIBOBJS strnlen.$ac_objext"
29468
29469     :
29470   fi
29471
29472
29473
29474
29475
29476           GNULIB_STRNLEN=1
29477
29478
29479
29480
29481
29482 $as_echo "#define GNULIB_TEST_STRNLEN 1" >>confdefs.h
29483
29484
29485
29486
29487   for ac_func in strtol
29488 do :
29489   ac_fn_c_check_func "$LINENO" "strtol" "ac_cv_func_strtol"
29490 if test "x$ac_cv_func_strtol" = xyes; then :
29491   cat >>confdefs.h <<_ACEOF
29492 #define HAVE_STRTOL 1
29493 _ACEOF
29494
29495 fi
29496 done
29497
29498
29499   if test $ac_cv_func_strtol = no; then
29500
29501
29502
29503
29504
29505
29506
29507
29508   gl_LIBOBJS="$gl_LIBOBJS strtol.$ac_objext"
29509
29510   fi
29511
29512   for ac_func in strtoul
29513 do :
29514   ac_fn_c_check_func "$LINENO" "strtoul" "ac_cv_func_strtoul"
29515 if test "x$ac_cv_func_strtoul" = xyes; then :
29516   cat >>confdefs.h <<_ACEOF
29517 #define HAVE_STRTOUL 1
29518 _ACEOF
29519
29520 fi
29521 done
29522
29523
29524   if test $ac_cv_func_strtoul = no; then
29525
29526
29527
29528
29529
29530
29531
29532
29533   gl_LIBOBJS="$gl_LIBOBJS strtoul.$ac_objext"
29534
29535   fi
29536
29537
29538
29539   if test "$ac_cv_type_unsigned_long_long_int" = yes; then
29540     for ac_func in strtoull
29541 do :
29542   ac_fn_c_check_func "$LINENO" "strtoull" "ac_cv_func_strtoull"
29543 if test "x$ac_cv_func_strtoull" = xyes; then :
29544   cat >>confdefs.h <<_ACEOF
29545 #define HAVE_STRTOULL 1
29546 _ACEOF
29547
29548 fi
29549 done
29550
29551     if test $ac_cv_func_strtoull = no; then
29552       HAVE_STRTOULL=0
29553     fi
29554   fi
29555
29556   if test $HAVE_STRTOULL = 0; then
29557
29558
29559
29560
29561
29562
29563
29564
29565   gl_LIBOBJS="$gl_LIBOBJS strtoull.$ac_objext"
29566
29567
29568   :
29569
29570   fi
29571
29572
29573
29574
29575
29576           GNULIB_STRTOULL=1
29577
29578
29579
29580
29581
29582 $as_echo "#define GNULIB_TEST_STRTOULL 1" >>confdefs.h
29583
29584
29585
29586
29587
29588
29589
29590
29591   if test "$ac_cv_have_decl_strtoumax" != yes; then
29592     HAVE_DECL_STRTOUMAX=0
29593   fi
29594
29595   if test $ac_cv_func_strtoumax = no; then
29596
29597
29598
29599
29600
29601
29602
29603
29604   gl_LIBOBJS="$gl_LIBOBJS strtoumax.$ac_objext"
29605
29606
29607   ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
29608 if test "x$ac_cv_have_decl_strtoull" = xyes; then :
29609   ac_have_decl=1
29610 else
29611   ac_have_decl=0
29612 fi
29613
29614 cat >>confdefs.h <<_ACEOF
29615 #define HAVE_DECL_STRTOULL $ac_have_decl
29616 _ACEOF
29617
29618
29619
29620   fi
29621
29622
29623
29624
29625
29626           GNULIB_STRTOUMAX=1
29627
29628
29629
29630
29631
29632
29633
29634         if test $ac_cv_func_symlink = no; then
29635     HAVE_SYMLINK=0
29636   else
29637     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether symlink handles trailing slash correctly" >&5
29638 $as_echo_n "checking whether symlink handles trailing slash correctly... " >&6; }
29639 if ${gl_cv_func_symlink_works+:} false; then :
29640   $as_echo_n "(cached) " >&6
29641 else
29642   if test "$cross_compiling" = yes; then :
29643   case "$host_os" in
29644                     # Guess yes on glibc systems.
29645             *-gnu*) gl_cv_func_symlink_works="guessing yes" ;;
29646                     # If we don't know, assume the worst.
29647             *)      gl_cv_func_symlink_works="guessing no" ;;
29648           esac
29649
29650 else
29651   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29652 /* end confdefs.h.  */
29653 #include <unistd.h>
29654
29655 int
29656 main ()
29657 {
29658 int result = 0;
29659              if (!symlink ("a", "conftest.link/"))
29660                result |= 1;
29661              if (symlink ("conftest.f", "conftest.lnk2"))
29662                result |= 2;
29663              else if (!symlink ("a", "conftest.lnk2/"))
29664                result |= 4;
29665              return result;
29666
29667   ;
29668   return 0;
29669 }
29670 _ACEOF
29671 if ac_fn_c_try_run "$LINENO"; then :
29672   gl_cv_func_symlink_works=yes
29673 else
29674   gl_cv_func_symlink_works=no
29675 fi
29676 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29677   conftest.$ac_objext conftest.beam conftest.$ac_ext
29678 fi
29679
29680       rm -f conftest.f conftest.link conftest.lnk2
29681 fi
29682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_symlink_works" >&5
29683 $as_echo "$gl_cv_func_symlink_works" >&6; }
29684     case "$gl_cv_func_symlink_works" in
29685       *yes) ;;
29686       *)
29687         REPLACE_SYMLINK=1
29688         ;;
29689     esac
29690   fi
29691
29692   if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then
29693
29694
29695
29696
29697
29698
29699
29700
29701   gl_LIBOBJS="$gl_LIBOBJS symlink.$ac_objext"
29702
29703   fi
29704
29705
29706
29707
29708
29709           GNULIB_SYMLINK=1
29710
29711
29712
29713
29714
29715 $as_echo "#define GNULIB_TEST_SYMLINK 1" >>confdefs.h
29716
29717
29718
29719
29720
29721
29722
29723
29724   if test $ac_cv_func_symlinkat = no; then
29725     HAVE_SYMLINKAT=0
29726   fi
29727
29728   if test $HAVE_SYMLINKAT = 0; then
29729
29730
29731
29732
29733
29734
29735
29736
29737   gl_LIBOBJS="$gl_LIBOBJS symlinkat.$ac_objext"
29738
29739   fi
29740
29741
29742
29743
29744
29745           GNULIB_SYMLINKAT=1
29746
29747
29748
29749
29750
29751 $as_echo "#define GNULIB_TEST_SYMLINKAT 1" >>confdefs.h
29752
29753
29754
29755
29756
29757
29758
29759
29760
29761
29762
29763
29764
29765
29766
29767
29768
29769      if test $gl_cv_have_include_next = yes; then
29770        gl_cv_next_sys_stat_h='<'sys/stat.h'>'
29771      else
29772        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
29773 $as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
29774 if ${gl_cv_next_sys_stat_h+:} false; then :
29775   $as_echo_n "(cached) " >&6
29776 else
29777
29778              if test $ac_cv_header_sys_stat_h = yes; then
29779
29780
29781                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29782 /* end confdefs.h.  */
29783 #include <sys/stat.h>
29784
29785 _ACEOF
29786                                                                                                                         case "$host_os" in
29787                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
29788                  *)    gl_absname_cpp="$ac_cpp" ;;
29789                esac
29790
29791                case "$host_os" in
29792                  mingw*)
29793                                                                                                                                      gl_dirsep_regex='[/\\]'
29794                    ;;
29795                  *)
29796                    gl_dirsep_regex='\/'
29797                    ;;
29798                esac
29799                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
29800
29801                gl_header_literal_regex=`echo 'sys/stat.h' \
29802                                         | sed -e "$gl_make_literal_regex_sed"`
29803                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
29804                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
29805                    s|^/[^/]|//&|
29806                    p
29807                    q
29808                  }'
29809                                                             gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
29810                       sed -n "$gl_absolute_header_sed"`'"'
29811           else
29812                gl_cv_next_sys_stat_h='<'sys/stat.h'>'
29813              fi
29814
29815
29816 fi
29817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
29818 $as_echo "$gl_cv_next_sys_stat_h" >&6; }
29819      fi
29820      NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
29821
29822      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
29823        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
29824        gl_next_as_first_directive='<'sys/stat.h'>'
29825      else
29826        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
29827        gl_next_as_first_directive=$gl_cv_next_sys_stat_h
29828      fi
29829      NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
29830
29831
29832
29833
29834
29835
29836
29837
29838
29839
29840
29841   if test $WINDOWS_64_BIT_ST_SIZE = 1; then
29842
29843 $as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
29844
29845   fi
29846
29847       ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
29848      #include <sys/stat.h>
29849 "
29850 if test "x$ac_cv_type_nlink_t" = xyes; then :
29851
29852 else
29853
29854 $as_echo "#define nlink_t int" >>confdefs.h
29855
29856 fi
29857
29858
29859
29860     for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat     mknod mknodat stat utimensat; do
29861     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
29862     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
29863 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
29864 if eval \${$as_gl_Symbol+:} false; then :
29865   $as_echo_n "(cached) " >&6
29866 else
29867   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29868 /* end confdefs.h.  */
29869 #include <sys/stat.h>
29870
29871 int
29872 main ()
29873 {
29874 #undef $gl_func
29875   (void) $gl_func;
29876   ;
29877   return 0;
29878 }
29879 _ACEOF
29880 if ac_fn_c_try_compile "$LINENO"; then :
29881   eval "$as_gl_Symbol=yes"
29882 else
29883   eval "$as_gl_Symbol=no"
29884 fi
29885 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29886 fi
29887 eval ac_res=\$$as_gl_Symbol
29888                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
29889 $as_echo "$ac_res" >&6; }
29890     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
29891   cat >>confdefs.h <<_ACEOF
29892 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
29893 _ACEOF
29894
29895                      eval ac_cv_have_decl_$gl_func=yes
29896 fi
29897       done
29898
29899
29900
29901
29902
29903
29904
29905
29906
29907
29908
29909   if test $ac_cv_header_sysexits_h = yes; then
29910     HAVE_SYSEXITS_H=1
29911
29912
29913
29914
29915
29916
29917
29918
29919
29920      if test $gl_cv_have_include_next = yes; then
29921        gl_cv_next_sysexits_h='<'sysexits.h'>'
29922      else
29923        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sysexits.h>" >&5
29924 $as_echo_n "checking absolute name of <sysexits.h>... " >&6; }
29925 if ${gl_cv_next_sysexits_h+:} false; then :
29926   $as_echo_n "(cached) " >&6
29927 else
29928
29929              if test $ac_cv_header_sysexits_h = yes; then
29930
29931
29932                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29933 /* end confdefs.h.  */
29934 #include <sysexits.h>
29935
29936 _ACEOF
29937                                                                                                                         case "$host_os" in
29938                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
29939                  *)    gl_absname_cpp="$ac_cpp" ;;
29940                esac
29941
29942                case "$host_os" in
29943                  mingw*)
29944                                                                                                                                      gl_dirsep_regex='[/\\]'
29945                    ;;
29946                  *)
29947                    gl_dirsep_regex='\/'
29948                    ;;
29949                esac
29950                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
29951
29952                gl_header_literal_regex=`echo 'sysexits.h' \
29953                                         | sed -e "$gl_make_literal_regex_sed"`
29954                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
29955                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
29956                    s|^/[^/]|//&|
29957                    p
29958                    q
29959                  }'
29960                                                             gl_cv_next_sysexits_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
29961                       sed -n "$gl_absolute_header_sed"`'"'
29962           else
29963                gl_cv_next_sysexits_h='<'sysexits.h'>'
29964              fi
29965
29966
29967 fi
29968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sysexits_h" >&5
29969 $as_echo "$gl_cv_next_sysexits_h" >&6; }
29970      fi
29971      NEXT_SYSEXITS_H=$gl_cv_next_sysexits_h
29972
29973      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
29974        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
29975        gl_next_as_first_directive='<'sysexits.h'>'
29976      else
29977        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
29978        gl_next_as_first_directive=$gl_cv_next_sysexits_h
29979      fi
29980      NEXT_AS_FIRST_DIRECTIVE_SYSEXITS_H=$gl_next_as_first_directive
29981
29982
29983
29984
29985     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29986 /* end confdefs.h.  */
29987 #include <sysexits.h>
29988 int
29989 main ()
29990 {
29991 switch (0)
29992           {
29993           case EX_OK:
29994           case EX_USAGE:
29995           case EX_DATAERR:
29996           case EX_NOINPUT:
29997           case EX_NOUSER:
29998           case EX_NOHOST:
29999           case EX_UNAVAILABLE:
30000           case EX_SOFTWARE:
30001           case EX_OSERR:
30002           case EX_OSFILE:
30003           case EX_CANTCREAT:
30004           case EX_IOERR:
30005           case EX_TEMPFAIL:
30006           case EX_PROTOCOL:
30007           case EX_NOPERM:
30008           case EX_CONFIG:
30009             break;
30010           }
30011
30012   ;
30013   return 0;
30014 }
30015 _ACEOF
30016 if ac_fn_c_try_compile "$LINENO"; then :
30017   SYSEXITS_H=
30018 else
30019   SYSEXITS_H=sysexits.h
30020 fi
30021 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30022   else
30023     HAVE_SYSEXITS_H=0
30024     SYSEXITS_H=sysexits.h
30025   fi
30026
30027
30028    if test -n "$SYSEXITS_H"; then
30029   GL_GENERATE_SYSEXITS_H_TRUE=
30030   GL_GENERATE_SYSEXITS_H_FALSE='#'
30031 else
30032   GL_GENERATE_SYSEXITS_H_TRUE='#'
30033   GL_GENERATE_SYSEXITS_H_FALSE=
30034 fi
30035
30036
30037
30038
30039   :
30040
30041
30042
30043
30044
30045
30046
30047
30048
30049
30050
30051       ac_fn_c_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "#include <time.h>
30052 "
30053 if test "x$ac_cv_have_decl_localtime_r" = xyes; then :
30054   ac_have_decl=1
30055 else
30056   ac_have_decl=0
30057 fi
30058
30059 cat >>confdefs.h <<_ACEOF
30060 #define HAVE_DECL_LOCALTIME_R $ac_have_decl
30061 _ACEOF
30062
30063   if test $ac_cv_have_decl_localtime_r = no; then
30064     HAVE_DECL_LOCALTIME_R=0
30065   fi
30066
30067
30068   if test $ac_cv_func_localtime_r = yes; then
30069     HAVE_LOCALTIME_R=1
30070     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5
30071 $as_echo_n "checking whether localtime_r is compatible with its POSIX signature... " >&6; }
30072 if ${gl_cv_time_r_posix+:} false; then :
30073   $as_echo_n "(cached) " >&6
30074 else
30075   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30076 /* end confdefs.h.  */
30077 #include <time.h>
30078 int
30079 main ()
30080 {
30081 /* We don't need to append 'restrict's to the argument types,
30082                  even though the POSIX signature has the 'restrict's,
30083                  since C99 says they can't affect type compatibility.  */
30084               struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r;
30085               if (ptr) return 0;
30086               /* Check the return type is a pointer.
30087                  On HP-UX 10 it is 'int'.  */
30088               *localtime_r (0, 0);
30089   ;
30090   return 0;
30091 }
30092
30093 _ACEOF
30094 if ac_fn_c_try_compile "$LINENO"; then :
30095   gl_cv_time_r_posix=yes
30096 else
30097   gl_cv_time_r_posix=no
30098 fi
30099 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30100
30101 fi
30102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_r_posix" >&5
30103 $as_echo "$gl_cv_time_r_posix" >&6; }
30104     if test $gl_cv_time_r_posix = yes; then
30105       REPLACE_LOCALTIME_R=0
30106     else
30107       REPLACE_LOCALTIME_R=1
30108     fi
30109   else
30110     HAVE_LOCALTIME_R=0
30111   fi
30112
30113   if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
30114
30115
30116
30117
30118
30119
30120
30121
30122   gl_LIBOBJS="$gl_LIBOBJS time_r.$ac_objext"
30123
30124
30125   :
30126
30127   fi
30128
30129
30130
30131
30132
30133           GNULIB_TIME_R=1
30134
30135
30136
30137
30138
30139 $as_echo "#define GNULIB_TEST_TIME_R 1" >>confdefs.h
30140
30141
30142
30143   :
30144
30145
30146
30147
30148
30149
30150
30151
30152
30153
30154
30155
30156      if test $gl_cv_have_include_next = yes; then
30157        gl_cv_next_unistd_h='<'unistd.h'>'
30158      else
30159        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
30160 $as_echo_n "checking absolute name of <unistd.h>... " >&6; }
30161 if ${gl_cv_next_unistd_h+:} false; then :
30162   $as_echo_n "(cached) " >&6
30163 else
30164
30165              if test $ac_cv_header_unistd_h = yes; then
30166
30167
30168                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30169 /* end confdefs.h.  */
30170 #include <unistd.h>
30171
30172 _ACEOF
30173                                                                                                                         case "$host_os" in
30174                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
30175                  *)    gl_absname_cpp="$ac_cpp" ;;
30176                esac
30177
30178                case "$host_os" in
30179                  mingw*)
30180                                                                                                                                      gl_dirsep_regex='[/\\]'
30181                    ;;
30182                  *)
30183                    gl_dirsep_regex='\/'
30184                    ;;
30185                esac
30186                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
30187
30188                gl_header_literal_regex=`echo 'unistd.h' \
30189                                         | sed -e "$gl_make_literal_regex_sed"`
30190                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
30191                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
30192                    s|^/[^/]|//&|
30193                    p
30194                    q
30195                  }'
30196                                                             gl_cv_next_unistd_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
30197                       sed -n "$gl_absolute_header_sed"`'"'
30198           else
30199                gl_cv_next_unistd_h='<'unistd.h'>'
30200              fi
30201
30202
30203 fi
30204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
30205 $as_echo "$gl_cv_next_unistd_h" >&6; }
30206      fi
30207      NEXT_UNISTD_H=$gl_cv_next_unistd_h
30208
30209      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
30210        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
30211        gl_next_as_first_directive='<'unistd.h'>'
30212      else
30213        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
30214        gl_next_as_first_directive=$gl_cv_next_unistd_h
30215      fi
30216      NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
30217
30218
30219
30220
30221   if test $ac_cv_header_unistd_h = yes; then
30222     HAVE_UNISTD_H=1
30223   else
30224     HAVE_UNISTD_H=0
30225   fi
30226
30227
30228
30229
30230
30231
30232
30233     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
30234     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
30235     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
30236 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
30237 if eval \${$as_gl_Symbol+:} false; then :
30238   $as_echo_n "(cached) " >&6
30239 else
30240   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30241 /* end confdefs.h.  */
30242
30243 #if HAVE_UNISTD_H
30244 # include <unistd.h>
30245 #endif
30246 /* Some systems declare various items in the wrong headers.  */
30247 #if !(defined __GLIBC__ && !defined __UCLIBC__)
30248 # include <fcntl.h>
30249 # include <stdio.h>
30250 # include <stdlib.h>
30251 # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
30252 #  include <io.h>
30253 # endif
30254 #endif
30255
30256 int
30257 main ()
30258 {
30259 #undef $gl_func
30260   (void) $gl_func;
30261   ;
30262   return 0;
30263 }
30264 _ACEOF
30265 if ac_fn_c_try_compile "$LINENO"; then :
30266   eval "$as_gl_Symbol=yes"
30267 else
30268   eval "$as_gl_Symbol=no"
30269 fi
30270 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30271 fi
30272 eval ac_res=\$$as_gl_Symbol
30273                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
30274 $as_echo "$ac_res" >&6; }
30275     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
30276   cat >>confdefs.h <<_ACEOF
30277 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
30278 _ACEOF
30279
30280                      eval ac_cv_have_decl_$gl_func=yes
30281 fi
30282       done
30283
30284
30285
30286
30287
30288
30289
30290       if  { test "$HAVE_LIBUNISTRING" != yes \
30291     || {
30292
30293
30294
30295             test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
30296             || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
30297                  && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
30298                       || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
30299                            && test $LIBUNISTRING_VERSION_SUBMINOR -lt 0
30300                          }
30301                     }
30302                }
30303
30304
30305
30306
30307        }
30308   }; then
30309     LIBUNISTRING_UNITYPES_H='unitypes.h'
30310   else
30311     LIBUNISTRING_UNITYPES_H=
30312   fi
30313
30314
30315
30316
30317       if  { test "$HAVE_LIBUNISTRING" != yes \
30318     || {
30319
30320
30321
30322             test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
30323             || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
30324                  && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
30325                       || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
30326                            && test $LIBUNISTRING_VERSION_SUBMINOR -lt 0
30327                          }
30328                     }
30329                }
30330
30331
30332
30333
30334        }
30335   }; then
30336     LIBUNISTRING_UNIWIDTH_H='uniwidth.h'
30337   else
30338     LIBUNISTRING_UNIWIDTH_H=
30339   fi
30340
30341
30342
30343
30344        if  { test "$HAVE_LIBUNISTRING" != yes \
30345     || {
30346
30347
30348
30349             test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
30350             || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
30351                  && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
30352                       || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
30353                            && test $LIBUNISTRING_VERSION_SUBMINOR -lt 4
30354                          }
30355                     }
30356                }
30357
30358
30359
30360
30361        }
30362   }; then
30363   LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE=
30364   LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE='#'
30365 else
30366   LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE='#'
30367   LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE=
30368 fi
30369
30370
30371
30372
30373
30374
30375
30376     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unlink honors trailing slashes" >&5
30377 $as_echo_n "checking whether unlink honors trailing slashes... " >&6; }
30378 if ${gl_cv_func_unlink_honors_slashes+:} false; then :
30379   $as_echo_n "(cached) " >&6
30380 else
30381   touch conftest.file
30382      # Assume that if we have lstat, we can also check symlinks.
30383      if test $ac_cv_func_lstat = yes; then
30384        ln -s conftest.file conftest.lnk
30385      fi
30386      if test "$cross_compiling" = yes; then :
30387   case "$host_os" in
30388                  # Guess yes on glibc systems.
30389          *-gnu*) gl_cv_func_unlink_honors_slashes="guessing yes" ;;
30390                  # If we don't know, assume the worst.
30391          *)      gl_cv_func_unlink_honors_slashes="guessing no" ;;
30392        esac
30393
30394 else
30395   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30396 /* end confdefs.h.  */
30397 #if HAVE_UNISTD_H
30398            # include <unistd.h>
30399            #else /* on Windows with MSVC */
30400            # include <io.h>
30401            #endif
30402            #include <errno.h>
30403
30404 int
30405 main ()
30406 {
30407 int result = 0;
30408            if (!unlink ("conftest.file/"))
30409              result |= 1;
30410            else if (errno != ENOTDIR)
30411              result |= 2;
30412 #if HAVE_LSTAT
30413            if (!unlink ("conftest.lnk/"))
30414              result |= 4;
30415            else if (errno != ENOTDIR)
30416              result |= 8;
30417 #endif
30418            return result;
30419
30420   ;
30421   return 0;
30422 }
30423 _ACEOF
30424 if ac_fn_c_try_run "$LINENO"; then :
30425   gl_cv_func_unlink_honors_slashes=yes
30426 else
30427   gl_cv_func_unlink_honors_slashes=no
30428 fi
30429 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30430   conftest.$ac_objext conftest.beam conftest.$ac_ext
30431 fi
30432
30433      rm -f conftest.file conftest.lnk
30434 fi
30435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unlink_honors_slashes" >&5
30436 $as_echo "$gl_cv_func_unlink_honors_slashes" >&6; }
30437   case "$gl_cv_func_unlink_honors_slashes" in
30438     *no)
30439       REPLACE_UNLINK=1
30440       ;;
30441   esac
30442
30443       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unlink of a parent directory fails as it should" >&5
30444 $as_echo_n "checking whether unlink of a parent directory fails as it should... " >&6; }
30445 if ${gl_cv_func_unlink_parent_fails+:} false; then :
30446   $as_echo_n "(cached) " >&6
30447 else
30448   case "$host_os" in
30449        darwin*)
30450                                                       if {
30451               # Use the mktemp program if available. If not available, hide the error
30452               # message.
30453               tmp=`(umask 077 && mktemp -d /tmp/gtXXXXXX) 2>/dev/null` &&
30454               test -n "$tmp" && test -d "$tmp"
30455             } ||
30456             {
30457               # Use a simple mkdir command. It is guaranteed to fail if the directory
30458               # already exists.  $RANDOM is bash specific and expands to empty in shells
30459               # other than bash, ksh and zsh.  Its use does not increase security;
30460               # rather, it minimizes the probability of failure in a very cluttered /tmp
30461               # directory.
30462               tmp=/tmp/gt$$-$RANDOM
30463               (umask 077 && mkdir "$tmp")
30464             }; then
30465            mkdir "$tmp/subdir"
30466            GL_SUBDIR_FOR_UNLINK="$tmp/subdir"
30467            export GL_SUBDIR_FOR_UNLINK
30468            if test "$cross_compiling" = yes; then :
30469   # If we don't know, assume the worst.
30470               gl_cv_func_unlink_parent_fails="guessing no"
30471
30472 else
30473   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30474 /* end confdefs.h.  */
30475
30476                 #include <stdlib.h>
30477                 #if HAVE_UNISTD_H
30478                 # include <unistd.h>
30479                 #else /* on Windows with MSVC */
30480                 # include <direct.h>
30481                 # include <io.h>
30482                 #endif
30483                 int main ()
30484                 {
30485                   int result = 0;
30486                   if (chdir (getenv ("GL_SUBDIR_FOR_UNLINK")) != 0)
30487                     result |= 1;
30488                   else if (unlink ("..") == 0)
30489                     result |= 2;
30490                   return result;
30491                 }
30492
30493 _ACEOF
30494 if ac_fn_c_try_run "$LINENO"; then :
30495   gl_cv_func_unlink_parent_fails=yes
30496 else
30497   gl_cv_func_unlink_parent_fails=no
30498 fi
30499 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30500   conftest.$ac_objext conftest.beam conftest.$ac_ext
30501 fi
30502
30503            unset GL_SUBDIR_FOR_UNLINK
30504            rm -rf "$tmp"
30505          else
30506            gl_cv_func_unlink_parent_fails="guessing no"
30507          fi
30508          ;;
30509        *)
30510          gl_cv_func_unlink_parent_fails="guessing yes"
30511          ;;
30512      esac
30513
30514 fi
30515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unlink_parent_fails" >&5
30516 $as_echo "$gl_cv_func_unlink_parent_fails" >&6; }
30517   case "$gl_cv_func_unlink_parent_fails" in
30518     *no)
30519       REPLACE_UNLINK=1
30520
30521 $as_echo "#define UNLINK_PARENT_BUG 1" >>confdefs.h
30522
30523       ;;
30524   esac
30525
30526   if test $REPLACE_UNLINK = 1; then
30527
30528
30529
30530
30531
30532
30533
30534
30535   gl_LIBOBJS="$gl_LIBOBJS unlink.$ac_objext"
30536
30537   fi
30538
30539
30540
30541
30542
30543           GNULIB_UNLINK=1
30544
30545
30546
30547
30548
30549 $as_echo "#define GNULIB_TEST_UNLINK 1" >>confdefs.h
30550
30551
30552
30553
30554
30555
30556
30557
30558
30559   if test $ac_cv_func_unlinkat = no; then
30560     HAVE_UNLINKAT=0
30561   else
30562     case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
30563       *no)
30564         # Solaris 9 has *at functions, but uniformly mishandles trailing
30565         # slash in all of them.
30566         REPLACE_UNLINKAT=1
30567         ;;
30568       *)
30569         # GNU/Hurd has unlinkat, but it has the same bug as unlink.
30570         if test $REPLACE_UNLINK = 1; then
30571           REPLACE_UNLINKAT=1
30572         fi
30573         ;;
30574     esac
30575   fi
30576
30577   if test $HAVE_UNLINKAT = 0 || test $REPLACE_UNLINKAT = 1; then
30578
30579
30580
30581
30582
30583
30584
30585
30586   gl_LIBOBJS="$gl_LIBOBJS unlinkat.$ac_objext"
30587
30588   fi
30589
30590
30591
30592
30593
30594           GNULIB_UNLINKAT=1
30595
30596
30597
30598
30599
30600 $as_echo "#define GNULIB_TEST_UNLINKAT 1" >>confdefs.h
30601
30602
30603
30604
30605
30606
30607
30608   # The Hurd, the Linux kernel, the FreeBSD kernel version 2.2 and later,
30609   # Cygwin, and mingw never let anyone (even root) unlink directories.
30610   # If anyone knows of another system for which unlink can never
30611   # remove a directory, please report it to <bug-coreutils@gnu.org>.
30612   # Unfortunately this is difficult to test for, since it requires root access
30613   # and might create garbage in the file system,
30614   # so the code below simply relies on the kernel name and version number.
30615   case $host_os in
30616   gnu[0-9]* | \
30617   linux-* | linux | \
30618   freebsd2.2* | freebsd[3-9]* | freebsd[1-9][0-9]* | \
30619   cygwin | \
30620   mingw*)
30621
30622 $as_echo "#define UNLINK_CANNOT_UNLINK_DIR 1" >>confdefs.h
30623 ;;
30624   esac
30625
30626
30627
30628 $as_echo "#define USE_UNLOCKED_IO 1" >>confdefs.h
30629
30630
30631
30632
30633
30634
30635
30636
30637
30638
30639
30640
30641
30642
30643
30644
30645
30646
30647
30648
30649
30650   if test $ac_cv_have_decl_unsetenv = no; then
30651     HAVE_DECL_UNSETENV=0
30652   fi
30653   for ac_func in unsetenv
30654 do :
30655   ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
30656 if test "x$ac_cv_func_unsetenv" = xyes; then :
30657   cat >>confdefs.h <<_ACEOF
30658 #define HAVE_UNSETENV 1
30659 _ACEOF
30660
30661 fi
30662 done
30663
30664   if test $ac_cv_func_unsetenv = no; then
30665     HAVE_UNSETENV=0
30666   else
30667     HAVE_UNSETENV=1
30668         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5
30669 $as_echo_n "checking for unsetenv() return type... " >&6; }
30670 if ${gt_cv_func_unsetenv_ret+:} false; then :
30671   $as_echo_n "(cached) " >&6
30672 else
30673   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30674 /* end confdefs.h.  */
30675
30676 #undef _BSD
30677 #define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */
30678 #include <stdlib.h>
30679 extern
30680 #ifdef __cplusplus
30681 "C"
30682 #endif
30683 int unsetenv (const char *name);
30684
30685 int
30686 main ()
30687 {
30688
30689   ;
30690   return 0;
30691 }
30692 _ACEOF
30693 if ac_fn_c_try_compile "$LINENO"; then :
30694   gt_cv_func_unsetenv_ret='int'
30695 else
30696   gt_cv_func_unsetenv_ret='void'
30697 fi
30698 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30699 fi
30700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5
30701 $as_echo "$gt_cv_func_unsetenv_ret" >&6; }
30702     if test $gt_cv_func_unsetenv_ret = 'void'; then
30703
30704 $as_echo "#define VOID_UNSETENV 1" >>confdefs.h
30705
30706       REPLACE_UNSETENV=1
30707     fi
30708
30709                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5
30710 $as_echo_n "checking whether unsetenv obeys POSIX... " >&6; }
30711 if ${gl_cv_func_unsetenv_works+:} false; then :
30712   $as_echo_n "(cached) " >&6
30713 else
30714   if test "$cross_compiling" = yes; then :
30715   case "$host_os" in
30716                  # Guess yes on glibc systems.
30717          *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
30718                  # If we don't know, assume the worst.
30719          *)      gl_cv_func_unsetenv_works="guessing no" ;;
30720        esac
30721
30722 else
30723   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30724 /* end confdefs.h.  */
30725
30726        #include <stdlib.h>
30727        #include <errno.h>
30728        extern char **environ;
30729
30730 int
30731 main ()
30732 {
30733
30734        char entry1[] = "a=1";
30735        char entry2[] = "b=2";
30736        char *env[] = { entry1, entry2, NULL };
30737        if (putenv ((char *) "a=1")) return 1;
30738        if (putenv (entry2)) return 2;
30739        entry2[0] = 'a';
30740        unsetenv ("a");
30741        if (getenv ("a")) return 3;
30742        if (!unsetenv ("") || errno != EINVAL) return 4;
30743        entry2[0] = 'b';
30744        environ = env;
30745        if (!getenv ("a")) return 5;
30746        entry2[0] = 'a';
30747        unsetenv ("a");
30748        if (getenv ("a")) return 6;
30749
30750   ;
30751   return 0;
30752 }
30753 _ACEOF
30754 if ac_fn_c_try_run "$LINENO"; then :
30755   gl_cv_func_unsetenv_works=yes
30756 else
30757   gl_cv_func_unsetenv_works=no
30758 fi
30759 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30760   conftest.$ac_objext conftest.beam conftest.$ac_ext
30761 fi
30762
30763 fi
30764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
30765 $as_echo "$gl_cv_func_unsetenv_works" >&6; }
30766     case "$gl_cv_func_unsetenv_works" in
30767       *yes) ;;
30768       *)
30769         REPLACE_UNSETENV=1
30770         ;;
30771     esac
30772   fi
30773
30774   if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
30775
30776
30777
30778
30779
30780
30781
30782
30783   gl_LIBOBJS="$gl_LIBOBJS unsetenv.$ac_objext"
30784
30785
30786
30787
30788
30789   fi
30790
30791
30792
30793
30794
30795           GNULIB_UNSETENV=1
30796
30797
30798
30799
30800
30801 $as_echo "#define GNULIB_TEST_UNSETENV 1" >>confdefs.h
30802
30803
30804
30805
30806
30807
30808
30809
30810
30811   if test $ac_cv_func_futimens = no && test $ac_cv_func_futimesat = yes; then
30812                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether futimesat handles NULL file" >&5
30813 $as_echo_n "checking whether futimesat handles NULL file... " >&6; }
30814 if ${gl_cv_func_futimesat_works+:} false; then :
30815   $as_echo_n "(cached) " >&6
30816 else
30817   touch conftest.file
30818        if test "$cross_compiling" = yes; then :
30819   case "$host_os" in
30820                    # Guess yes on glibc systems.
30821            *-gnu*) gl_cv_func_futimesat_works="guessing yes" ;;
30822                    # If we don't know, assume the worst.
30823            *)      gl_cv_func_futimesat_works="guessing no" ;;
30824          esac
30825
30826 else
30827   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30828 /* end confdefs.h.  */
30829
30830 #include <stddef.h>
30831 #include <sys/times.h>
30832 #include <fcntl.h>
30833
30834 int
30835 main ()
30836 {
30837     int fd = open ("conftest.file", O_RDWR);
30838           if (fd < 0) return 1;
30839           if (futimesat (fd, NULL, NULL)) return 2;
30840
30841   ;
30842   return 0;
30843 }
30844 _ACEOF
30845 if ac_fn_c_try_run "$LINENO"; then :
30846   gl_cv_func_futimesat_works=yes
30847 else
30848   gl_cv_func_futimesat_works=no
30849 fi
30850 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30851   conftest.$ac_objext conftest.beam conftest.$ac_ext
30852 fi
30853
30854       rm -f conftest.file
30855 fi
30856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_futimesat_works" >&5
30857 $as_echo "$gl_cv_func_futimesat_works" >&6; }
30858     case "$gl_cv_func_futimesat_works" in
30859       *yes) ;;
30860       *)
30861
30862 $as_echo "#define FUTIMESAT_NULL_BUG 1" >>confdefs.h
30863
30864         ;;
30865     esac
30866   fi
30867
30868
30869
30870
30871
30872   if test $ac_cv_func_utimensat = no; then
30873     HAVE_UTIMENSAT=0
30874   else
30875     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether utimensat works" >&5
30876 $as_echo_n "checking whether utimensat works... " >&6; }
30877 if ${gl_cv_func_utimensat_works+:} false; then :
30878   $as_echo_n "(cached) " >&6
30879 else
30880   if test "$cross_compiling" = yes; then :
30881   gl_cv_func_utimensat_works="guessing no"
30882 else
30883   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30884 /* end confdefs.h.  */
30885
30886 #include <fcntl.h>
30887 #include <sys/stat.h>
30888 #include <unistd.h>
30889
30890 int
30891 main ()
30892 {
30893 int result = 0;
30894               const char *f = "conftest.file";
30895               if (close (creat (f, 0600)))
30896                 return 1;
30897               /* Test whether the AT_SYMLINK_NOFOLLOW flag is supported.  */
30898               {
30899                 if (utimensat (AT_FDCWD, f, NULL, AT_SYMLINK_NOFOLLOW))
30900                   result |= 2;
30901               }
30902               /* Test whether UTIME_NOW and UTIME_OMIT work.  */
30903               {
30904                 struct timespec ts[2] = { { 1, UTIME_OMIT }, { 1, UTIME_NOW } };
30905                 if (utimensat (AT_FDCWD, f, ts, 0))
30906                   result |= 4;
30907               }
30908               sleep (1);
30909               {
30910                 struct timespec ts[2] = { { 1, UTIME_NOW }, { 1, UTIME_OMIT } };
30911                 struct stat st;
30912                 if (utimensat (AT_FDCWD, f, ts, 0))
30913                   result |= 8;
30914                 if (stat (f, &st))
30915                   result |= 16;
30916                 else if (st.st_ctime < st.st_atime)
30917                   result |= 32;
30918               }
30919               return result;
30920
30921   ;
30922   return 0;
30923 }
30924 _ACEOF
30925 if ac_fn_c_try_run "$LINENO"; then :
30926            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30927 /* end confdefs.h.  */
30928
30929 #ifdef __linux__
30930 /* The Linux kernel added utimensat in 2.6.22, but has bugs with UTIME_OMIT
30931    in several file systems as recently as 2.6.32.  Always replace utimensat
30932    to support older kernels.  */
30933 choke me
30934 #endif
30935
30936 int
30937 main ()
30938 {
30939
30940   ;
30941   return 0;
30942 }
30943 _ACEOF
30944 if ac_fn_c_try_compile "$LINENO"; then :
30945   gl_cv_func_utimensat_works=yes
30946 else
30947   gl_cv_func_utimensat_works="needs runtime check"
30948 fi
30949 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30950 else
30951   gl_cv_func_utimensat_works=no
30952 fi
30953 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30954   conftest.$ac_objext conftest.beam conftest.$ac_ext
30955 fi
30956
30957 fi
30958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_utimensat_works" >&5
30959 $as_echo "$gl_cv_func_utimensat_works" >&6; }
30960     if test "$gl_cv_func_utimensat_works" != yes; then
30961       REPLACE_UTIMENSAT=1
30962     fi
30963   fi
30964
30965   if test $HAVE_UTIMENSAT = 0 || test $REPLACE_UTIMENSAT = 1; then
30966
30967
30968
30969
30970
30971
30972
30973
30974   gl_LIBOBJS="$gl_LIBOBJS utimensat.$ac_objext"
30975
30976   fi
30977
30978
30979
30980
30981
30982           GNULIB_UTIMENSAT=1
30983
30984
30985
30986
30987
30988 $as_echo "#define GNULIB_TEST_UTIMENSAT 1" >>confdefs.h
30989
30990
30991
30992
30993
30994   if test $ac_cv_func_vasnprintf = no; then
30995
30996
30997
30998
30999
31000
31001
31002
31003
31004
31005   gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
31006
31007
31008
31009
31010
31011
31012
31013
31014
31015   gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
31016
31017
31018
31019
31020
31021
31022
31023
31024
31025   gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
31026
31027
31028
31029
31030
31031
31032
31033
31034
31035   gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
31036
31037   if test $ac_cv_func_vasnprintf = yes; then
31038
31039 $as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h
31040
31041   fi
31042
31043
31044
31045
31046
31047
31048
31049
31050
31051
31052
31053   ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
31054 if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
31055
31056 else
31057
31058 $as_echo "#define ptrdiff_t long" >>confdefs.h
31059
31060
31061 fi
31062
31063
31064
31065
31066
31067
31068
31069   fi
31070
31071
31072   for ac_func in vasprintf
31073 do :
31074   ac_fn_c_check_func "$LINENO" "vasprintf" "ac_cv_func_vasprintf"
31075 if test "x$ac_cv_func_vasprintf" = xyes; then :
31076   cat >>confdefs.h <<_ACEOF
31077 #define HAVE_VASPRINTF 1
31078 _ACEOF
31079
31080 fi
31081 done
31082
31083   if test $ac_cv_func_vasprintf = no; then
31084
31085
31086
31087
31088
31089
31090
31091
31092
31093   gl_LIBOBJS="$gl_LIBOBJS vasprintf.$ac_objext"
31094
31095
31096
31097
31098
31099
31100
31101
31102
31103   gl_LIBOBJS="$gl_LIBOBJS asprintf.$ac_objext"
31104
31105
31106   if test $ac_cv_func_vasprintf = yes; then
31107     REPLACE_VASPRINTF=1
31108   else
31109     HAVE_VASPRINTF=0
31110   fi
31111
31112
31113
31114
31115
31116
31117
31118
31119   fi
31120
31121
31122
31123
31124
31125
31126           GNULIB_VASPRINTF=1
31127
31128
31129
31130
31131
31132 $as_echo "#define GNULIB_TEST_VASPRINTF 1" >>confdefs.h
31133
31134
31135
31136
31137
31138   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=asprintf:2:c-format"
31139
31140
31141
31142   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=vasprintf:2:c-format"
31143
31144
31145 # Check whether --with-packager was given.
31146 if test "${with_packager+set}" = set; then :
31147   withval=$with_packager;       case $withval in
31148         yes|no) ;;
31149         *)
31150 cat >>confdefs.h <<_ACEOF
31151 #define PACKAGE_PACKAGER "$withval"
31152 _ACEOF
31153  ;;
31154       esac
31155
31156 fi
31157
31158
31159
31160 # Check whether --with-packager-version was given.
31161 if test "${with_packager_version+set}" = set; then :
31162   withval=$with_packager_version;       case $withval in
31163         yes|no) ;;
31164         *)
31165 cat >>confdefs.h <<_ACEOF
31166 #define PACKAGE_PACKAGER_VERSION "$withval"
31167 _ACEOF
31168  ;;
31169       esac
31170
31171 fi
31172
31173
31174
31175 # Check whether --with-packager-bug-reports was given.
31176 if test "${with_packager_bug_reports+set}" = set; then :
31177   withval=$with_packager_bug_reports;       case $withval in
31178         yes|no) ;;
31179         *)
31180 cat >>confdefs.h <<_ACEOF
31181 #define PACKAGE_PACKAGER_BUG_REPORTS "$withval"
31182 _ACEOF
31183  ;;
31184       esac
31185
31186 fi
31187
31188
31189   if test "X$with_packager" = "X" && \
31190      test "X$with_packager_version$with_packager_bug_reports" != "X"
31191   then
31192     as_fn_error $? "The --with-packager-{bug-reports,version} options require --with-packager" "$LINENO" 5
31193   fi
31194
31195
31196
31197   gl_cv_func_vsnprintf_usable=no
31198   for ac_func in vsnprintf
31199 do :
31200   ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
31201 if test "x$ac_cv_func_vsnprintf" = xyes; then :
31202   cat >>confdefs.h <<_ACEOF
31203 #define HAVE_VSNPRINTF 1
31204 _ACEOF
31205
31206 fi
31207 done
31208
31209   if test $ac_cv_func_vsnprintf = yes; then
31210
31211
31212
31213   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf respects a size of 1" >&5
31214 $as_echo_n "checking whether snprintf respects a size of 1... " >&6; }
31215 if ${gl_cv_func_snprintf_size1+:} false; then :
31216   $as_echo_n "(cached) " >&6
31217 else
31218
31219       if test "$cross_compiling" = yes; then :
31220   gl_cv_func_snprintf_size1="guessing yes"
31221 else
31222   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31223 /* end confdefs.h.  */
31224
31225 #include <stdio.h>
31226 #if HAVE_SNPRINTF
31227 # define my_snprintf snprintf
31228 #else
31229 # include <stdarg.h>
31230 static int my_snprintf (char *buf, int size, const char *format, ...)
31231 {
31232   va_list args;
31233   int ret;
31234   va_start (args, format);
31235   ret = vsnprintf (buf, size, format, args);
31236   va_end (args);
31237   return ret;
31238 }
31239 #endif
31240 int main()
31241 {
31242   static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
31243   my_snprintf (buf, 1, "%d", 12345);
31244   return buf[1] != 'E';
31245 }
31246 _ACEOF
31247 if ac_fn_c_try_run "$LINENO"; then :
31248   gl_cv_func_snprintf_size1=yes
31249 else
31250   gl_cv_func_snprintf_size1=no
31251 fi
31252 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31253   conftest.$ac_objext conftest.beam conftest.$ac_ext
31254 fi
31255
31256
31257 fi
31258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_size1" >&5
31259 $as_echo "$gl_cv_func_snprintf_size1" >&6; }
31260
31261     case "$gl_cv_func_snprintf_size1" in
31262       *yes)
31263
31264         case "$gl_cv_func_snprintf_retval_c99" in
31265           *yes)
31266
31267
31268      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports POSIX/XSI format strings with positions" >&5
31269 $as_echo_n "checking whether printf supports POSIX/XSI format strings with positions... " >&6; }
31270 if ${gl_cv_func_printf_positions+:} false; then :
31271   $as_echo_n "(cached) " >&6
31272 else
31273
31274       if test "$cross_compiling" = yes; then :
31275
31276          case "$host_os" in
31277            netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*)
31278                          gl_cv_func_printf_positions="guessing no";;
31279            beos*)        gl_cv_func_printf_positions="guessing no";;
31280            mingw* | pw*) gl_cv_func_printf_positions="guessing no";;
31281            *)            gl_cv_func_printf_positions="guessing yes";;
31282          esac
31283
31284 else
31285   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31286 /* end confdefs.h.  */
31287
31288 #include <stdio.h>
31289 #include <string.h>
31290 /* The string "%2$d %1$d", with dollar characters protected from the shell's
31291    dollar expansion (possibly an autoconf bug).  */
31292 static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
31293 static char buf[100];
31294 int main ()
31295 {
31296   sprintf (buf, format, 33, 55);
31297   return (strcmp (buf, "55 33") != 0);
31298 }
31299 _ACEOF
31300 if ac_fn_c_try_run "$LINENO"; then :
31301   gl_cv_func_printf_positions=yes
31302 else
31303   gl_cv_func_printf_positions=no
31304 fi
31305 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31306   conftest.$ac_objext conftest.beam conftest.$ac_ext
31307 fi
31308
31309
31310 fi
31311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_positions" >&5
31312 $as_echo "$gl_cv_func_printf_positions" >&6; }
31313
31314             case "$gl_cv_func_printf_positions" in
31315               *yes)
31316                 gl_cv_func_vsnprintf_usable=yes
31317                 ;;
31318             esac
31319             ;;
31320         esac
31321         ;;
31322     esac
31323   fi
31324   if test $gl_cv_func_vsnprintf_usable = no; then
31325
31326
31327
31328
31329
31330
31331
31332
31333
31334
31335   gl_LIBOBJS="$gl_LIBOBJS vsnprintf.$ac_objext"
31336
31337   if test $ac_cv_func_vsnprintf = yes; then
31338     REPLACE_VSNPRINTF=1
31339   fi
31340   :
31341
31342   fi
31343
31344   if test $ac_cv_have_decl_vsnprintf = no; then
31345     HAVE_DECL_VSNPRINTF=0
31346   fi
31347
31348
31349
31350
31351
31352
31353           GNULIB_VSNPRINTF=1
31354
31355
31356
31357
31358
31359 $as_echo "#define GNULIB_TEST_VSNPRINTF 1" >>confdefs.h
31360
31361
31362
31363
31364
31365
31366
31367
31368
31369
31370
31371
31372
31373
31374
31375      if test $gl_cv_have_include_next = yes; then
31376        gl_cv_next_wchar_h='<'wchar.h'>'
31377      else
31378        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
31379 $as_echo_n "checking absolute name of <wchar.h>... " >&6; }
31380 if ${gl_cv_next_wchar_h+:} false; then :
31381   $as_echo_n "(cached) " >&6
31382 else
31383
31384              if test $ac_cv_header_wchar_h = yes; then
31385
31386
31387                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31388 /* end confdefs.h.  */
31389 #include <wchar.h>
31390
31391 _ACEOF
31392                                                                                                                         case "$host_os" in
31393                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
31394                  *)    gl_absname_cpp="$ac_cpp" ;;
31395                esac
31396
31397                case "$host_os" in
31398                  mingw*)
31399                                                                                                                                      gl_dirsep_regex='[/\\]'
31400                    ;;
31401                  *)
31402                    gl_dirsep_regex='\/'
31403                    ;;
31404                esac
31405                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
31406
31407                gl_header_literal_regex=`echo 'wchar.h' \
31408                                         | sed -e "$gl_make_literal_regex_sed"`
31409                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
31410                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
31411                    s|^/[^/]|//&|
31412                    p
31413                    q
31414                  }'
31415                                                             gl_cv_next_wchar_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
31416                       sed -n "$gl_absolute_header_sed"`'"'
31417           else
31418                gl_cv_next_wchar_h='<'wchar.h'>'
31419              fi
31420
31421
31422 fi
31423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
31424 $as_echo "$gl_cv_next_wchar_h" >&6; }
31425      fi
31426      NEXT_WCHAR_H=$gl_cv_next_wchar_h
31427
31428      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
31429        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
31430        gl_next_as_first_directive='<'wchar.h'>'
31431      else
31432        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
31433        gl_next_as_first_directive=$gl_cv_next_wchar_h
31434      fi
31435      NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
31436
31437
31438
31439
31440   if test $ac_cv_header_wchar_h = yes; then
31441     HAVE_WCHAR_H=1
31442   else
31443     HAVE_WCHAR_H=0
31444   fi
31445
31446
31447
31448
31449
31450   if test $gt_cv_c_wint_t = yes; then
31451     HAVE_WINT_T=1
31452   else
31453     HAVE_WINT_T=0
31454   fi
31455
31456
31457
31458     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
31459     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
31460     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
31461 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
31462 if eval \${$as_gl_Symbol+:} false; then :
31463   $as_echo_n "(cached) " >&6
31464 else
31465   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31466 /* end confdefs.h.  */
31467
31468 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
31469    <wchar.h>.
31470    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
31471    included before <wchar.h>.  */
31472 #if !(defined __GLIBC__ && !defined __UCLIBC__)
31473 # include <stddef.h>
31474 # include <stdio.h>
31475 # include <time.h>
31476 #endif
31477 #include <wchar.h>
31478
31479 int
31480 main ()
31481 {
31482 #undef $gl_func
31483   (void) $gl_func;
31484   ;
31485   return 0;
31486 }
31487 _ACEOF
31488 if ac_fn_c_try_compile "$LINENO"; then :
31489   eval "$as_gl_Symbol=yes"
31490 else
31491   eval "$as_gl_Symbol=no"
31492 fi
31493 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31494 fi
31495 eval ac_res=\$$as_gl_Symbol
31496                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
31497 $as_echo "$ac_res" >&6; }
31498     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
31499   cat >>confdefs.h <<_ACEOF
31500 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
31501 _ACEOF
31502
31503                      eval ac_cv_have_decl_$gl_func=yes
31504 fi
31505       done
31506
31507
31508
31509
31510
31511
31512
31513
31514
31515
31516
31517
31518   if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
31519
31520
31521
31522      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
31523 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
31524 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
31525   $as_echo_n "(cached) " >&6
31526 else
31527
31528                   case "$host_os" in
31529                      # Guess no on AIX and OSF/1.
31530         aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
31531                      # Guess yes otherwise.
31532         *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
31533       esac
31534       if test $LOCALE_JA != none; then
31535         if test "$cross_compiling" = yes; then :
31536   :
31537 else
31538   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31539 /* end confdefs.h.  */
31540
31541 #include <locale.h>
31542 #include <string.h>
31543 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
31544    <wchar.h>.
31545    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
31546    included before <wchar.h>.  */
31547 #include <stddef.h>
31548 #include <stdio.h>
31549 #include <time.h>
31550 #include <wchar.h>
31551 int main ()
31552 {
31553   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
31554     {
31555       const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
31556       mbstate_t state;
31557       wchar_t wc;
31558
31559       memset (&state, '\0', sizeof (mbstate_t));
31560       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
31561         if (mbsinit (&state))
31562           return 1;
31563     }
31564   return 0;
31565 }
31566 _ACEOF
31567 if ac_fn_c_try_run "$LINENO"; then :
31568   gl_cv_func_mbrtowc_incomplete_state=yes
31569 else
31570   gl_cv_func_mbrtowc_incomplete_state=no
31571 fi
31572 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31573   conftest.$ac_objext conftest.beam conftest.$ac_ext
31574 fi
31575
31576       fi
31577
31578 fi
31579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
31580 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
31581
31582
31583
31584
31585      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
31586 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
31587 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
31588   $as_echo_n "(cached) " >&6
31589 else
31590
31591                   case "$host_os" in
31592                     # Guess no on Solaris 8.
31593         solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
31594                     # Guess yes otherwise.
31595         *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
31596       esac
31597       if test $LOCALE_ZH_CN != none; then
31598         if test "$cross_compiling" = yes; then :
31599   :
31600 else
31601   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31602 /* end confdefs.h.  */
31603
31604 #include <locale.h>
31605 #include <stdlib.h>
31606 #include <string.h>
31607 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
31608    <wchar.h>.
31609    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
31610    included before <wchar.h>.  */
31611 #include <stddef.h>
31612 #include <stdio.h>
31613 #include <time.h>
31614 #include <wchar.h>
31615 int main ()
31616 {
31617   /* This fails on Solaris 8:
31618      mbrtowc returns 2, and sets wc to 0x00F0.
31619      mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
31620   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
31621     {
31622       char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
31623       mbstate_t state;
31624       wchar_t wc;
31625
31626       memset (&state, '\0', sizeof (mbstate_t));
31627       if (mbrtowc (&wc, input + 3, 6, &state) != 4
31628           && mbtowc (&wc, input + 3, 6) == 4)
31629         return 1;
31630     }
31631   return 0;
31632 }
31633 _ACEOF
31634 if ac_fn_c_try_run "$LINENO"; then :
31635   gl_cv_func_mbrtowc_sanitycheck=yes
31636 else
31637   gl_cv_func_mbrtowc_sanitycheck=no
31638 fi
31639 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31640   conftest.$ac_objext conftest.beam conftest.$ac_ext
31641 fi
31642
31643       fi
31644
31645 fi
31646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
31647 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
31648
31649     REPLACE_MBSTATE_T=0
31650     case "$gl_cv_func_mbrtowc_incomplete_state" in
31651       *yes) ;;
31652       *) REPLACE_MBSTATE_T=1 ;;
31653     esac
31654     case "$gl_cv_func_mbrtowc_sanitycheck" in
31655       *yes) ;;
31656       *) REPLACE_MBSTATE_T=1 ;;
31657     esac
31658   else
31659     REPLACE_MBSTATE_T=1
31660   fi
31661
31662
31663
31664   if test $ac_cv_func_wcrtomb = no; then
31665     HAVE_WCRTOMB=0
31666     ac_fn_c_check_decl "$LINENO" "wcrtomb" "ac_cv_have_decl_wcrtomb" "
31667 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
31668    <wchar.h>.
31669    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
31670    included before <wchar.h>.  */
31671 #include <stddef.h>
31672 #include <stdio.h>
31673 #include <time.h>
31674 #include <wchar.h>
31675
31676 "
31677 if test "x$ac_cv_have_decl_wcrtomb" = xyes; then :
31678   ac_have_decl=1
31679 else
31680   ac_have_decl=0
31681 fi
31682
31683 cat >>confdefs.h <<_ACEOF
31684 #define HAVE_DECL_WCRTOMB $ac_have_decl
31685 _ACEOF
31686
31687     if test $ac_cv_have_decl_wcrtomb = yes; then
31688                         REPLACE_WCRTOMB=1
31689     fi
31690   else
31691     if test $REPLACE_MBSTATE_T = 1; then
31692       REPLACE_WCRTOMB=1
31693     else
31694
31695
31696
31697
31698
31699              { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wcrtomb return value is correct" >&5
31700 $as_echo_n "checking whether wcrtomb return value is correct... " >&6; }
31701 if ${gl_cv_func_wcrtomb_retval+:} false; then :
31702   $as_echo_n "(cached) " >&6
31703 else
31704
31705                               case "$host_os" in
31706                                      # Guess no on AIX 4, OSF/1 and Solaris.
31707             aix4* | osf* | solaris*) gl_cv_func_wcrtomb_retval="guessing no" ;;
31708                                      # Guess yes otherwise.
31709             *)                       gl_cv_func_wcrtomb_retval="guessing yes" ;;
31710           esac
31711           if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
31712             if test "$cross_compiling" = yes; then :
31713   :
31714 else
31715   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31716 /* end confdefs.h.  */
31717
31718 #include <locale.h>
31719 #include <string.h>
31720 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
31721    <wchar.h>.
31722    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
31723    included before <wchar.h>.  */
31724 #include <stddef.h>
31725 #include <stdio.h>
31726 #include <time.h>
31727 #include <wchar.h>
31728 int main ()
31729 {
31730   int result = 0;
31731   if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
31732     {
31733       if (wcrtomb (NULL, 0, NULL) != 1)
31734         result |= 1;
31735     }
31736   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
31737     {
31738       if (wcrtomb (NULL, 0, NULL) != 1)
31739         result |= 2;
31740     }
31741   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
31742     {
31743       if (wcrtomb (NULL, 0, NULL) != 1)
31744         result |= 4;
31745     }
31746   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
31747     {
31748       if (wcrtomb (NULL, 0, NULL) != 1)
31749         result |= 8;
31750     }
31751   return result;
31752 }
31753 _ACEOF
31754 if ac_fn_c_try_run "$LINENO"; then :
31755   gl_cv_func_wcrtomb_retval=yes
31756 else
31757   gl_cv_func_wcrtomb_retval=no
31758 fi
31759 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31760   conftest.$ac_objext conftest.beam conftest.$ac_ext
31761 fi
31762
31763           fi
31764
31765 fi
31766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcrtomb_retval" >&5
31767 $as_echo "$gl_cv_func_wcrtomb_retval" >&6; }
31768       case "$gl_cv_func_wcrtomb_retval" in
31769         *yes) ;;
31770         *) REPLACE_WCRTOMB=1 ;;
31771       esac
31772     fi
31773   fi
31774
31775   if test $HAVE_WCRTOMB = 0 || test $REPLACE_WCRTOMB = 1; then
31776
31777
31778
31779
31780
31781
31782
31783
31784   gl_LIBOBJS="$gl_LIBOBJS wcrtomb.$ac_objext"
31785
31786
31787   :
31788
31789   fi
31790
31791
31792
31793
31794
31795           GNULIB_WCRTOMB=1
31796
31797
31798
31799
31800
31801 $as_echo "#define GNULIB_TEST_WCRTOMB 1" >>confdefs.h
31802
31803
31804
31805
31806
31807
31808
31809
31810   if test $ac_cv_func_iswcntrl = yes; then
31811     HAVE_ISWCNTRL=1
31812   else
31813     HAVE_ISWCNTRL=0
31814   fi
31815
31816
31817
31818   if test $gt_cv_c_wint_t = yes; then
31819     HAVE_WINT_T=1
31820   else
31821     HAVE_WINT_T=0
31822   fi
31823
31824
31825
31826
31827
31828
31829
31830
31831
31832
31833
31834      if test $gl_cv_have_include_next = yes; then
31835        gl_cv_next_wctype_h='<'wctype.h'>'
31836      else
31837        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
31838 $as_echo_n "checking absolute name of <wctype.h>... " >&6; }
31839 if ${gl_cv_next_wctype_h+:} false; then :
31840   $as_echo_n "(cached) " >&6
31841 else
31842
31843              if test $ac_cv_header_wctype_h = yes; then
31844
31845
31846                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31847 /* end confdefs.h.  */
31848 #include <wctype.h>
31849
31850 _ACEOF
31851                                                                                                                         case "$host_os" in
31852                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
31853                  *)    gl_absname_cpp="$ac_cpp" ;;
31854                esac
31855
31856                case "$host_os" in
31857                  mingw*)
31858                                                                                                                                      gl_dirsep_regex='[/\\]'
31859                    ;;
31860                  *)
31861                    gl_dirsep_regex='\/'
31862                    ;;
31863                esac
31864                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
31865
31866                gl_header_literal_regex=`echo 'wctype.h' \
31867                                         | sed -e "$gl_make_literal_regex_sed"`
31868                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
31869                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
31870                    s|^/[^/]|//&|
31871                    p
31872                    q
31873                  }'
31874                                                             gl_cv_next_wctype_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
31875                       sed -n "$gl_absolute_header_sed"`'"'
31876           else
31877                gl_cv_next_wctype_h='<'wctype.h'>'
31878              fi
31879
31880
31881 fi
31882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
31883 $as_echo "$gl_cv_next_wctype_h" >&6; }
31884      fi
31885      NEXT_WCTYPE_H=$gl_cv_next_wctype_h
31886
31887      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
31888        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
31889        gl_next_as_first_directive='<'wctype.h'>'
31890      else
31891        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
31892        gl_next_as_first_directive=$gl_cv_next_wctype_h
31893      fi
31894      NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
31895
31896
31897
31898
31899   if test $ac_cv_header_wctype_h = yes; then
31900     if test $ac_cv_func_iswcntrl = yes; then
31901                   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
31902 $as_echo_n "checking whether iswcntrl works... " >&6; }
31903 if ${gl_cv_func_iswcntrl_works+:} false; then :
31904   $as_echo_n "(cached) " >&6
31905 else
31906
31907           if test "$cross_compiling" = yes; then :
31908   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31909 /* end confdefs.h.  */
31910 #include <stdlib.h>
31911                           #if __GNU_LIBRARY__ == 1
31912                           Linux libc5 i18n is broken.
31913                           #endif
31914 int
31915 main ()
31916 {
31917
31918   ;
31919   return 0;
31920 }
31921 _ACEOF
31922 if ac_fn_c_try_compile "$LINENO"; then :
31923   gl_cv_func_iswcntrl_works="guessing yes"
31924 else
31925   gl_cv_func_iswcntrl_works="guessing no"
31926 fi
31927 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31928
31929 else
31930   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31931 /* end confdefs.h.  */
31932
31933                /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
31934                   included before <wchar.h>.
31935                   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
31936                   must be included before <wchar.h>.  */
31937                #include <stddef.h>
31938                #include <stdio.h>
31939                #include <time.h>
31940                #include <wchar.h>
31941                #include <wctype.h>
31942                int main () { return iswprint ('x') == 0; }
31943
31944 _ACEOF
31945 if ac_fn_c_try_run "$LINENO"; then :
31946   gl_cv_func_iswcntrl_works=yes
31947 else
31948   gl_cv_func_iswcntrl_works=no
31949 fi
31950 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31951   conftest.$ac_objext conftest.beam conftest.$ac_ext
31952 fi
31953
31954
31955 fi
31956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
31957 $as_echo "$gl_cv_func_iswcntrl_works" >&6; }
31958     fi
31959     HAVE_WCTYPE_H=1
31960   else
31961     HAVE_WCTYPE_H=0
31962   fi
31963
31964
31965   case "$gl_cv_func_iswcntrl_works" in
31966     *yes) REPLACE_ISWCNTRL=0 ;;
31967     *)    REPLACE_ISWCNTRL=1 ;;
31968   esac
31969
31970
31971   if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
31972         :
31973   fi
31974
31975   if test $REPLACE_ISWCNTRL = 1; then
31976     REPLACE_TOWLOWER=1
31977   else
31978     for ac_func in towlower
31979 do :
31980   ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
31981 if test "x$ac_cv_func_towlower" = xyes; then :
31982   cat >>confdefs.h <<_ACEOF
31983 #define HAVE_TOWLOWER 1
31984 _ACEOF
31985
31986 fi
31987 done
31988
31989     if test $ac_cv_func_towlower = yes; then
31990       REPLACE_TOWLOWER=0
31991     else
31992       ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
31993              included before <wchar.h>.
31994              BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
31995              must be included before <wchar.h>.  */
31996           #include <stddef.h>
31997           #include <stdio.h>
31998           #include <time.h>
31999           #include <wchar.h>
32000           #if HAVE_WCTYPE_H
32001           # include <wctype.h>
32002           #endif
32003
32004 "
32005 if test "x$ac_cv_have_decl_towlower" = xyes; then :
32006   ac_have_decl=1
32007 else
32008   ac_have_decl=0
32009 fi
32010
32011 cat >>confdefs.h <<_ACEOF
32012 #define HAVE_DECL_TOWLOWER $ac_have_decl
32013 _ACEOF
32014
32015       if test $ac_cv_have_decl_towlower = yes; then
32016                                 REPLACE_TOWLOWER=1
32017       else
32018         REPLACE_TOWLOWER=0
32019       fi
32020     fi
32021   fi
32022
32023
32024   if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
32025         :
32026   fi
32027
32028           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
32029 $as_echo_n "checking for wctype_t... " >&6; }
32030 if ${gl_cv_type_wctype_t+:} false; then :
32031   $as_echo_n "(cached) " >&6
32032 else
32033   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32034 /* end confdefs.h.  */
32035 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
32036                included before <wchar.h>.
32037                BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
32038                must be included before <wchar.h>.  */
32039             #include <stddef.h>
32040             #include <stdio.h>
32041             #include <time.h>
32042             #include <wchar.h>
32043             #if HAVE_WCTYPE_H
32044             # include <wctype.h>
32045             #endif
32046             wctype_t a;
32047
32048 int
32049 main ()
32050 {
32051
32052   ;
32053   return 0;
32054 }
32055 _ACEOF
32056 if ac_fn_c_try_compile "$LINENO"; then :
32057   gl_cv_type_wctype_t=yes
32058 else
32059   gl_cv_type_wctype_t=no
32060 fi
32061 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32062
32063 fi
32064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
32065 $as_echo "$gl_cv_type_wctype_t" >&6; }
32066   if test $gl_cv_type_wctype_t = no; then
32067     HAVE_WCTYPE_T=0
32068   fi
32069
32070       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
32071 $as_echo_n "checking for wctrans_t... " >&6; }
32072 if ${gl_cv_type_wctrans_t+:} false; then :
32073   $as_echo_n "(cached) " >&6
32074 else
32075   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32076 /* end confdefs.h.  */
32077 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
32078                included before <wchar.h>.
32079                BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
32080                must be included before <wchar.h>.  */
32081             #include <stddef.h>
32082             #include <stdio.h>
32083             #include <time.h>
32084             #include <wchar.h>
32085             #include <wctype.h>
32086             wctrans_t a;
32087
32088 int
32089 main ()
32090 {
32091
32092   ;
32093   return 0;
32094 }
32095 _ACEOF
32096 if ac_fn_c_try_compile "$LINENO"; then :
32097   gl_cv_type_wctrans_t=yes
32098 else
32099   gl_cv_type_wctrans_t=no
32100 fi
32101 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32102
32103 fi
32104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
32105 $as_echo "$gl_cv_type_wctrans_t" >&6; }
32106   if test $gl_cv_type_wctrans_t = no; then
32107     HAVE_WCTRANS_T=0
32108   fi
32109
32110
32111     for gl_func in wctype iswctype wctrans towctrans     ; do
32112     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
32113     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
32114 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
32115 if eval \${$as_gl_Symbol+:} false; then :
32116   $as_echo_n "(cached) " >&6
32117 else
32118   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32119 /* end confdefs.h.  */
32120
32121 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
32122    <wchar.h>.
32123    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
32124    included before <wchar.h>.  */
32125 #if !(defined __GLIBC__ && !defined __UCLIBC__)
32126 # include <stddef.h>
32127 # include <stdio.h>
32128 # include <time.h>
32129 # include <wchar.h>
32130 #endif
32131 #include <wctype.h>
32132
32133 int
32134 main ()
32135 {
32136 #undef $gl_func
32137   (void) $gl_func;
32138   ;
32139   return 0;
32140 }
32141 _ACEOF
32142 if ac_fn_c_try_compile "$LINENO"; then :
32143   eval "$as_gl_Symbol=yes"
32144 else
32145   eval "$as_gl_Symbol=no"
32146 fi
32147 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32148 fi
32149 eval ac_res=\$$as_gl_Symbol
32150                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
32151 $as_echo "$ac_res" >&6; }
32152     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
32153   cat >>confdefs.h <<_ACEOF
32154 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
32155 _ACEOF
32156
32157                      eval ac_cv_have_decl_$gl_func=yes
32158 fi
32159       done
32160
32161
32162
32163
32164
32165
32166
32167
32168
32169
32170
32171
32172
32173   ac_fn_c_check_decl "$LINENO" "wcwidth" "ac_cv_have_decl_wcwidth" "
32174 /* AIX 3.2.5 declares wcwidth in <string.h>. */
32175 #include <string.h>
32176 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
32177    <wchar.h>.
32178    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
32179    before <wchar.h>.  */
32180 #include <stddef.h>
32181 #include <stdio.h>
32182 #include <time.h>
32183 #include <wchar.h>
32184
32185 "
32186 if test "x$ac_cv_have_decl_wcwidth" = xyes; then :
32187   ac_have_decl=1
32188 else
32189   ac_have_decl=0
32190 fi
32191
32192 cat >>confdefs.h <<_ACEOF
32193 #define HAVE_DECL_WCWIDTH $ac_have_decl
32194 _ACEOF
32195
32196   if test $ac_cv_have_decl_wcwidth != yes; then
32197     HAVE_DECL_WCWIDTH=0
32198   fi
32199
32200   if test $ac_cv_func_wcwidth = yes; then
32201     HAVE_WCWIDTH=1
32202                     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wcwidth works reasonably in UTF-8 locales" >&5
32203 $as_echo_n "checking whether wcwidth works reasonably in UTF-8 locales... " >&6; }
32204 if ${gl_cv_func_wcwidth_works+:} false; then :
32205   $as_echo_n "(cached) " >&6
32206 else
32207
32208         if test "$cross_compiling" = yes; then :
32209
32210            case "$host_os" in
32211                      # Guess yes on glibc and AIX 7 systems.
32212              *-gnu* | aix[7-9]*) gl_cv_func_wcwidth_works="guessing yes";;
32213              *)                  gl_cv_func_wcwidth_works="guessing no";;
32214            esac
32215
32216 else
32217   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32218 /* end confdefs.h.  */
32219
32220 #include <locale.h>
32221 /* AIX 3.2.5 declares wcwidth in <string.h>. */
32222 #include <string.h>
32223 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
32224    <wchar.h>.
32225    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
32226    before <wchar.h>.  */
32227 #include <stddef.h>
32228 #include <stdio.h>
32229 #include <time.h>
32230 #include <wchar.h>
32231 #if !HAVE_DECL_WCWIDTH
32232 extern
32233 # ifdef __cplusplus
32234 "C"
32235 # endif
32236 int wcwidth (int);
32237 #endif
32238 int main ()
32239 {
32240   int result = 0;
32241   if (setlocale (LC_ALL, "fr_FR.UTF-8") != NULL)
32242     {
32243       if (wcwidth (0x0301) > 0)
32244         result |= 1;
32245       if (wcwidth (0x05B0) > 0)
32246         result |= 2;
32247       if (wcwidth (0x200B) > 0)
32248         result |= 4;
32249     }
32250   return result;
32251 }
32252 _ACEOF
32253 if ac_fn_c_try_run "$LINENO"; then :
32254   gl_cv_func_wcwidth_works=yes
32255 else
32256   gl_cv_func_wcwidth_works=no
32257 fi
32258 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32259   conftest.$ac_objext conftest.beam conftest.$ac_ext
32260 fi
32261
32262
32263 fi
32264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcwidth_works" >&5
32265 $as_echo "$gl_cv_func_wcwidth_works" >&6; }
32266     case "$gl_cv_func_wcwidth_works" in
32267       *yes) ;;
32268       *no) REPLACE_WCWIDTH=1 ;;
32269     esac
32270   else
32271     HAVE_WCWIDTH=0
32272   fi
32273
32274   if test $HAVE_WCWIDTH = 0 || test $REPLACE_WCWIDTH = 1; then
32275
32276
32277
32278
32279
32280
32281
32282
32283   gl_LIBOBJS="$gl_LIBOBJS wcwidth.$ac_objext"
32284
32285   fi
32286
32287
32288
32289
32290
32291           GNULIB_WCWIDTH=1
32292
32293
32294
32295
32296
32297 $as_echo "#define GNULIB_TEST_WCWIDTH 1" >>confdefs.h
32298
32299
32300
32301
32302
32303
32304   if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
32305     REPLACE_WRITE=1
32306   fi
32307
32308
32309
32310   if test $REPLACE_WRITE = 1; then
32311
32312
32313
32314
32315
32316
32317
32318
32319   gl_LIBOBJS="$gl_LIBOBJS write.$ac_objext"
32320
32321     :
32322   fi
32323
32324
32325
32326
32327
32328           GNULIB_WRITE=1
32329
32330
32331
32332
32333
32334 $as_echo "#define GNULIB_TEST_WRITE 1" >>confdefs.h
32335
32336
32337
32338   :
32339
32340   :
32341
32342
32343
32344   for ac_header in stdint.h
32345 do :
32346   ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
32347 if test "x$ac_cv_header_stdint_h" = xyes; then :
32348   cat >>confdefs.h <<_ACEOF
32349 #define HAVE_STDINT_H 1
32350 _ACEOF
32351
32352 fi
32353
32354 done
32355
32356
32357
32358
32359   :
32360
32361
32362
32363   :
32364
32365   :
32366
32367
32368   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=xasprintf:1:c-format"
32369
32370   # End of code from modules
32371
32372
32373
32374
32375
32376
32377
32378
32379
32380   gltests_libdeps=
32381   gltests_ltlibdeps=
32382
32383
32384
32385
32386
32387
32388
32389
32390
32391   gl_source_base='tests'
32392   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
32393
32394   gl_module_indicator_condition=$gltests_WITNESS
32395
32396
32397
32398
32399
32400
32401
32402
32403
32404   LIBGNU_LIBDEPS="$gl_libdeps"
32405
32406   LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
32407
32408
32409 # paxutils modules
32410
32411
32412
32413
32414
32415
32416
32417
32418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
32419 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
32420 if ${ac_cv_header_time+:} false; then :
32421   $as_echo_n "(cached) " >&6
32422 else
32423   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32424 /* end confdefs.h.  */
32425 #include <sys/types.h>
32426 #include <sys/time.h>
32427 #include <time.h>
32428
32429 int
32430 main ()
32431 {
32432 if ((struct tm *) 0)
32433 return 0;
32434   ;
32435   return 0;
32436 }
32437 _ACEOF
32438 if ac_fn_c_try_compile "$LINENO"; then :
32439   ac_cv_header_time=yes
32440 else
32441   ac_cv_header_time=no
32442 fi
32443 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32444 fi
32445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
32446 $as_echo "$ac_cv_header_time" >&6; }
32447 if test $ac_cv_header_time = yes; then
32448
32449 $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
32450
32451 fi
32452
32453 ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
32454 if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
32455
32456 cat >>confdefs.h <<_ACEOF
32457 #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
32458 _ACEOF
32459
32460
32461 $as_echo "#define HAVE_ST_BLKSIZE 1" >>confdefs.h
32462
32463 fi
32464
32465
32466
32467
32468
32469
32470   # Set LIB_SETSOCKOPT to -lnsl -lsocket if necessary.
32471   pu_save_LIBS=$LIBS
32472   LIB_SETSOCKOPT=
32473   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5
32474 $as_echo_n "checking for library containing setsockopt... " >&6; }
32475 if ${ac_cv_search_setsockopt+:} false; then :
32476   $as_echo_n "(cached) " >&6
32477 else
32478   ac_func_search_save_LIBS=$LIBS
32479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32480 /* end confdefs.h.  */
32481
32482 /* Override any GCC internal prototype to avoid an error.
32483    Use char because int might match the return type of a GCC
32484    builtin and then its argument prototype would still apply.  */
32485 #ifdef __cplusplus
32486 extern "C"
32487 #endif
32488 char setsockopt ();
32489 int
32490 main ()
32491 {
32492 return setsockopt ();
32493   ;
32494   return 0;
32495 }
32496 _ACEOF
32497 for ac_lib in '' socket; do
32498   if test -z "$ac_lib"; then
32499     ac_res="none required"
32500   else
32501     ac_res=-l$ac_lib
32502     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
32503   fi
32504   if ac_fn_c_try_link "$LINENO"; then :
32505   ac_cv_search_setsockopt=$ac_res
32506 fi
32507 rm -f core conftest.err conftest.$ac_objext \
32508     conftest$ac_exeext
32509   if ${ac_cv_search_setsockopt+:} false; then :
32510   break
32511 fi
32512 done
32513 if ${ac_cv_search_setsockopt+:} false; then :
32514
32515 else
32516   ac_cv_search_setsockopt=no
32517 fi
32518 rm conftest.$ac_ext
32519 LIBS=$ac_func_search_save_LIBS
32520 fi
32521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setsockopt" >&5
32522 $as_echo "$ac_cv_search_setsockopt" >&6; }
32523 ac_res=$ac_cv_search_setsockopt
32524 if test "$ac_res" != no; then :
32525   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
32526
32527 else
32528   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5
32529 $as_echo_n "checking for library containing setsockopt... " >&6; }
32530 if ${ac_cv_search_setsockopt+:} false; then :
32531   $as_echo_n "(cached) " >&6
32532 else
32533   ac_func_search_save_LIBS=$LIBS
32534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32535 /* end confdefs.h.  */
32536
32537 /* Override any GCC internal prototype to avoid an error.
32538    Use char because int might match the return type of a GCC
32539    builtin and then its argument prototype would still apply.  */
32540 #ifdef __cplusplus
32541 extern "C"
32542 #endif
32543 char setsockopt ();
32544 int
32545 main ()
32546 {
32547 return setsockopt ();
32548   ;
32549   return 0;
32550 }
32551 _ACEOF
32552 for ac_lib in '' socket; do
32553   if test -z "$ac_lib"; then
32554     ac_res="none required"
32555   else
32556     ac_res=-l$ac_lib
32557     LIBS="-l$ac_lib -lnsl $ac_func_search_save_LIBS"
32558   fi
32559   if ac_fn_c_try_link "$LINENO"; then :
32560   ac_cv_search_setsockopt=$ac_res
32561 fi
32562 rm -f core conftest.err conftest.$ac_objext \
32563     conftest$ac_exeext
32564   if ${ac_cv_search_setsockopt+:} false; then :
32565   break
32566 fi
32567 done
32568 if ${ac_cv_search_setsockopt+:} false; then :
32569
32570 else
32571   ac_cv_search_setsockopt=no
32572 fi
32573 rm conftest.$ac_ext
32574 LIBS=$ac_func_search_save_LIBS
32575 fi
32576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setsockopt" >&5
32577 $as_echo "$ac_cv_search_setsockopt" >&6; }
32578 ac_res=$ac_cv_search_setsockopt
32579 if test "$ac_res" != no; then :
32580   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
32581
32582 fi
32583
32584 fi
32585
32586   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5
32587 $as_echo_n "checking for library containing setsockopt... " >&6; }
32588 if ${ac_cv_search_setsockopt+:} false; then :
32589   $as_echo_n "(cached) " >&6
32590 else
32591   ac_func_search_save_LIBS=$LIBS
32592 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32593 /* end confdefs.h.  */
32594
32595 /* Override any GCC internal prototype to avoid an error.
32596    Use char because int might match the return type of a GCC
32597    builtin and then its argument prototype would still apply.  */
32598 #ifdef __cplusplus
32599 extern "C"
32600 #endif
32601 char setsockopt ();
32602 int
32603 main ()
32604 {
32605 return setsockopt ();
32606   ;
32607   return 0;
32608 }
32609 _ACEOF
32610 for ac_lib in '' nsl; do
32611   if test -z "$ac_lib"; then
32612     ac_res="none required"
32613   else
32614     ac_res=-l$ac_lib
32615     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
32616   fi
32617   if ac_fn_c_try_link "$LINENO"; then :
32618   ac_cv_search_setsockopt=$ac_res
32619 fi
32620 rm -f core conftest.err conftest.$ac_objext \
32621     conftest$ac_exeext
32622   if ${ac_cv_search_setsockopt+:} false; then :
32623   break
32624 fi
32625 done
32626 if ${ac_cv_search_setsockopt+:} false; then :
32627
32628 else
32629   ac_cv_search_setsockopt=no
32630 fi
32631 rm conftest.$ac_ext
32632 LIBS=$ac_func_search_save_LIBS
32633 fi
32634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setsockopt" >&5
32635 $as_echo "$ac_cv_search_setsockopt" >&6; }
32636 ac_res=$ac_cv_search_setsockopt
32637 if test "$ac_res" != no; then :
32638   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
32639
32640 fi
32641
32642
32643   case "$ac_cv_search_setsockopt" in
32644     -l*) LIB_SETSOCKOPT=$ac_cv_search_setsockopt
32645   esac
32646
32647   LIBS=$pu_save_LIBS
32648
32649   enable_rmt() {
32650     if test $ac_cv_header_sys_mtio_h = yes; then
32651       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remote tape header files" >&5
32652 $as_echo_n "checking for remote tape header files... " >&6; }
32653 if ${pu_cv_header_rmt+:} false; then :
32654   $as_echo_n "(cached) " >&6
32655 else
32656   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32657 /* end confdefs.h.  */
32658
32659 #if HAVE_SGTTY_H
32660 # include <sgtty.h>
32661 #endif
32662 #include <sys/socket.h>
32663 _ACEOF
32664 if ac_fn_c_try_cpp "$LINENO"; then :
32665   pu_cv_header_rmt=yes
32666 else
32667   pu_cv_header_rmt=no
32668 fi
32669 rm -f conftest.err conftest.i conftest.$ac_ext
32670 fi
32671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pu_cv_header_rmt" >&5
32672 $as_echo "$pu_cv_header_rmt" >&6; }
32673       test $pu_cv_header_rmt = yes && PU_RMT_PROG='rmt$(EXEEXT)'
32674
32675     fi
32676   }
32677
32678   for ac_header in sys/mtio.h
32679 do :
32680   ac_fn_c_check_header_mongrel "$LINENO" "sys/mtio.h" "ac_cv_header_sys_mtio_h" "$ac_includes_default"
32681 if test "x$ac_cv_header_sys_mtio_h" = xyes; then :
32682   cat >>confdefs.h <<_ACEOF
32683 #define HAVE_SYS_MTIO_H 1
32684 _ACEOF
32685
32686 fi
32687
32688 done
32689
32690   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which ioctl field to test for reversed bytes" >&5
32691 $as_echo_n "checking which ioctl field to test for reversed bytes... " >&6; }
32692 if ${pu_cv_header_mtio_check_field+:} false; then :
32693   $as_echo_n "(cached) " >&6
32694 else
32695   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32696 /* end confdefs.h.  */
32697 #include <sys/mtio.h>
32698
32699 _ACEOF
32700 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
32701   $EGREP "mt_model" >/dev/null 2>&1; then :
32702   pu_cv_header_mtio_check_field=mt_model
32703 else
32704   pu_cv_header_mtio_check_field=mt_type
32705 fi
32706 rm -f conftest*
32707
32708 fi
32709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pu_cv_header_mtio_check_field" >&5
32710 $as_echo "$pu_cv_header_mtio_check_field" >&6; }
32711
32712 cat >>confdefs.h <<_ACEOF
32713 #define MTIO_CHECK_FIELD $pu_cv_header_mtio_check_field
32714 _ACEOF
32715
32716
32717
32718
32719   if test "x$DEFAULT_RMT_DIR" != x; then
32720         DEFAULT_RMT_COMMAND=$DEFAULT_RMT_DIR/rmt
32721   else
32722         DEFAULT_RMT_DIR='$(libexecdir)'
32723   fi
32724
32725   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build rmt" >&5
32726 $as_echo_n "checking whether to build rmt... " >&6; }
32727
32728 # Check whether --with-rmt was given.
32729 if test "${with_rmt+set}" = set; then :
32730   withval=$with_rmt; case $withval in
32731                yes|no) as_fn_error $? "Invalid argument to --with-rmt" "$LINENO" 5;;
32732                /*)     DEFAULT_RMT_COMMAND=$withval
32733                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, use $withval instead" >&5
32734 $as_echo "no, use $withval instead" >&6; };;
32735                *)      as_fn_error $? "Argument to --with-rmt must be an absolute file name" "$LINENO" 5;;
32736                esac
32737 else
32738   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32739 $as_echo "yes" >&6; }
32740                 enable_rmt
32741                 if test "$PU_RMT_PROG" = ""; then
32742                   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: not building rmt, required header files are missing" >&5
32743 $as_echo "$as_me: WARNING: not building rmt, required header files are missing" >&2;}
32744                 fi
32745 fi
32746
32747
32748
32749   if test "x$DEFAULT_RMT_COMMAND" != x; then
32750
32751 cat >>confdefs.h <<_ACEOF
32752 #define DEFAULT_RMT_COMMAND "$DEFAULT_RMT_COMMAND"
32753 _ACEOF
32754
32755   fi
32756
32757
32758
32759
32760
32761
32762
32763
32764
32765   for ac_header in sys/buf.h
32766 do :
32767   ac_fn_c_check_header_compile "$LINENO" "sys/buf.h" "ac_cv_header_sys_buf_h" "#if HAVE_SYS_PARAM_H
32768 #include <sys/param.h>
32769 #endif
32770 "
32771 if test "x$ac_cv_header_sys_buf_h" = xyes; then :
32772   cat >>confdefs.h <<_ACEOF
32773 #define HAVE_SYS_BUF_H 1
32774 _ACEOF
32775
32776 fi
32777
32778 done
32779
32780
32781
32782
32783   ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
32784 if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
32785
32786 cat >>confdefs.h <<_ACEOF
32787 #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
32788 _ACEOF
32789
32790
32791 fi
32792
32793
32794
32795
32796
32797
32798
32799   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
32800 $as_echo_n "checking for library containing gethostbyname... " >&6; }
32801 if ${ac_cv_search_gethostbyname+:} false; then :
32802   $as_echo_n "(cached) " >&6
32803 else
32804   ac_func_search_save_LIBS=$LIBS
32805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32806 /* end confdefs.h.  */
32807
32808 /* Override any GCC internal prototype to avoid an error.
32809    Use char because int might match the return type of a GCC
32810    builtin and then its argument prototype would still apply.  */
32811 #ifdef __cplusplus
32812 extern "C"
32813 #endif
32814 char gethostbyname ();
32815 int
32816 main ()
32817 {
32818 return gethostbyname ();
32819   ;
32820   return 0;
32821 }
32822 _ACEOF
32823 for ac_lib in '' nsl; do
32824   if test -z "$ac_lib"; then
32825     ac_res="none required"
32826   else
32827     ac_res=-l$ac_lib
32828     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
32829   fi
32830   if ac_fn_c_try_link "$LINENO"; then :
32831   ac_cv_search_gethostbyname=$ac_res
32832 fi
32833 rm -f core conftest.err conftest.$ac_objext \
32834     conftest$ac_exeext
32835   if ${ac_cv_search_gethostbyname+:} false; then :
32836   break
32837 fi
32838 done
32839 if ${ac_cv_search_gethostbyname+:} false; then :
32840
32841 else
32842   ac_cv_search_gethostbyname=no
32843 fi
32844 rm conftest.$ac_ext
32845 LIBS=$ac_func_search_save_LIBS
32846 fi
32847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
32848 $as_echo "$ac_cv_search_gethostbyname" >&6; }
32849 ac_res=$ac_cv_search_gethostbyname
32850 if test "$ac_res" != no; then :
32851   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
32852
32853 fi
32854
32855
32856
32857
32858 # gl_GCC_VERSION_IFELSE([major], [minor], [run-if-found], [run-if-not-found])
32859 # ------------------------------------------------
32860 # If $CPP is gcc-MAJOR.MINOR or newer, then run RUN-IF-FOUND.
32861 # Otherwise, run RUN-IF-NOT-FOUND.
32862
32863
32864 # Check whether --enable-gcc-warnings was given.
32865 if test "${enable_gcc_warnings+set}" = set; then :
32866   enableval=$enable_gcc_warnings; case $enableval in
32867      yes|no) ;;
32868      *)      as_fn_error $? "bad value $enableval for gcc-warnings option" "$LINENO" 5 ;;
32869    esac
32870    gl_gcc_warnings=$enableval
32871 else
32872   gl_gcc_warnings=no
32873    if test -d "$srcdir"/.git; then
32874      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32875 /* end confdefs.h.  */
32876
32877 #if (4) < __GNUC__ || ((4) == __GNUC__ && (6) <= __GNUC_MINOR__)
32878 /* ok */
32879 #else
32880 # error "your version of gcc is older than 4.6"
32881 #endif
32882
32883 int
32884 main ()
32885 {
32886
32887   ;
32888   return 0;
32889 },
32890
32891 _ACEOF
32892 if ac_fn_c_try_cpp "$LINENO"; then :
32893   gl_gcc_warnings=yes
32894 fi
32895 rm -f conftest.err conftest.i conftest.$ac_ext
32896
32897
32898    fi
32899
32900 fi
32901
32902
32903 if test "$gl_gcc_warnings" = yes; then
32904   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror -Wunknown-warning-option" >&5
32905 $as_echo_n "checking whether C compiler handles -Werror -Wunknown-warning-option... " >&6; }
32906 if ${gl_cv_warn_c__Werror__Wunknown_warning_option+:} false; then :
32907   $as_echo_n "(cached) " >&6
32908 else
32909
32910   gl_save_compiler_FLAGS="$CFLAGS"
32911   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror -Wunknown-warning-option"
32912   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32913 /* end confdefs.h.  */
32914
32915 int
32916 main ()
32917 {
32918
32919   ;
32920   return 0;
32921 }
32922 _ACEOF
32923 if ac_fn_c_try_compile "$LINENO"; then :
32924   gl_cv_warn_c__Werror__Wunknown_warning_option=yes
32925 else
32926   gl_cv_warn_c__Werror__Wunknown_warning_option=no
32927 fi
32928 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32929   CFLAGS="$gl_save_compiler_FLAGS"
32930
32931 fi
32932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror__Wunknown_warning_option" >&5
32933 $as_echo "$gl_cv_warn_c__Werror__Wunknown_warning_option" >&6; }
32934 if test "x$gl_cv_warn_c__Werror__Wunknown_warning_option" = xyes; then :
32935   gl_unknown_warnings_are_errors='-Wunknown-warning-option -Werror'
32936 else
32937   gl_unknown_warnings_are_errors=
32938 fi
32939
32940
32941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror" >&5
32942 $as_echo_n "checking whether C compiler handles -Werror... " >&6; }
32943 if ${gl_cv_warn_c__Werror+:} false; then :
32944   $as_echo_n "(cached) " >&6
32945 else
32946
32947   gl_save_compiler_FLAGS="$CFLAGS"
32948   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror"
32949   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32950 /* end confdefs.h.  */
32951
32952 int
32953 main ()
32954 {
32955
32956   ;
32957   return 0;
32958 }
32959 _ACEOF
32960 if ac_fn_c_try_compile "$LINENO"; then :
32961   gl_cv_warn_c__Werror=yes
32962 else
32963   gl_cv_warn_c__Werror=no
32964 fi
32965 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32966   CFLAGS="$gl_save_compiler_FLAGS"
32967
32968 fi
32969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror" >&5
32970 $as_echo "$gl_cv_warn_c__Werror" >&6; }
32971 if test "x$gl_cv_warn_c__Werror" = xyes; then :
32972   as_fn_append WERROR_CFLAGS " -Werror"
32973 fi
32974
32975
32976
32977
32978   nw=
32979   # This, $nw, is the list of warnings we disable.
32980   nw="$nw -Wformat-nonliteral"      # warnings in Fedora 17 stdio.h
32981   nw="$nw -Wvla"                    # warnings in gettext.h
32982   nw="$nw -Wswitch-default"         # Too many warnings for now
32983   nw="$nw -Wunsafe-loop-optimizations" # It's OK to omit unsafe optimizations.
32984   nw="$nw -Winline"                 # It's OK to not inline.
32985   nw="$nw -Wstrict-overflow"        # It's OK to optimize strictly.
32986   nw="$nw -Wsuggest-attribute=pure" # Too many warnings for now.
32987
32988
32989
32990   if test -n "$GCC"; then
32991
32992             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is supported" >&5
32993 $as_echo_n "checking whether -Wno-missing-field-initializers is supported... " >&6; }
32994     if ${gl_cv_cc_nomfi_supported+:} false; then :
32995   $as_echo_n "(cached) " >&6
32996 else
32997
32998       gl_save_CFLAGS="$CFLAGS"
32999       CFLAGS="$CFLAGS -W -Werror -Wno-missing-field-initializers"
33000       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33001 /* end confdefs.h.  */
33002
33003 int
33004 main ()
33005 {
33006
33007   ;
33008   return 0;
33009 }
33010 _ACEOF
33011 if ac_fn_c_try_compile "$LINENO"; then :
33012   gl_cv_cc_nomfi_supported=yes
33013 else
33014   gl_cv_cc_nomfi_supported=no
33015 fi
33016 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33017       CFLAGS="$gl_save_CFLAGS"
33018 fi
33019
33020     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_supported" >&5
33021 $as_echo "$gl_cv_cc_nomfi_supported" >&6; }
33022
33023     if test "$gl_cv_cc_nomfi_supported" = yes; then
33024                   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is needed" >&5
33025 $as_echo_n "checking whether -Wno-missing-field-initializers is needed... " >&6; }
33026       if ${gl_cv_cc_nomfi_needed+:} false; then :
33027   $as_echo_n "(cached) " >&6
33028 else
33029
33030         gl_save_CFLAGS="$CFLAGS"
33031         CFLAGS="$CFLAGS -W -Werror"
33032         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33033 /* end confdefs.h.  */
33034 void f (void)
33035                {
33036                  typedef struct { int a; int b; } s_t;
33037                  s_t s1 = { 0, };
33038                }
33039
33040 int
33041 main ()
33042 {
33043
33044   ;
33045   return 0;
33046 }
33047 _ACEOF
33048 if ac_fn_c_try_compile "$LINENO"; then :
33049   gl_cv_cc_nomfi_needed=no
33050 else
33051   gl_cv_cc_nomfi_needed=yes
33052 fi
33053 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33054         CFLAGS="$gl_save_CFLAGS"
33055
33056 fi
33057
33058       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_needed" >&5
33059 $as_echo "$gl_cv_cc_nomfi_needed" >&6; }
33060     fi
33061
33062                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wuninitialized is supported" >&5
33063 $as_echo_n "checking whether -Wuninitialized is supported... " >&6; }
33064     if ${gl_cv_cc_uninitialized_supported+:} false; then :
33065   $as_echo_n "(cached) " >&6
33066 else
33067
33068       gl_save_CFLAGS="$CFLAGS"
33069       CFLAGS="$CFLAGS -Werror -Wuninitialized"
33070       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33071 /* end confdefs.h.  */
33072
33073 int
33074 main ()
33075 {
33076
33077   ;
33078   return 0;
33079 }
33080 _ACEOF
33081 if ac_fn_c_try_compile "$LINENO"; then :
33082   gl_cv_cc_uninitialized_supported=yes
33083 else
33084   gl_cv_cc_uninitialized_supported=no
33085 fi
33086 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33087       CFLAGS="$gl_save_CFLAGS"
33088 fi
33089
33090     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_uninitialized_supported" >&5
33091 $as_echo "$gl_cv_cc_uninitialized_supported" >&6; }
33092
33093   fi
33094
33095   # List all gcc warning categories.
33096   gl_manywarn_set=
33097   for gl_manywarn_item in \
33098     -W \
33099     -Wabi \
33100     -Waddress \
33101     -Waggressive-loop-optimizations \
33102     -Wall \
33103     -Warray-bounds \
33104     -Wattributes \
33105     -Wbad-function-cast \
33106     -Wbuiltin-macro-redefined \
33107     -Wcast-align \
33108     -Wchar-subscripts \
33109     -Wclobbered \
33110     -Wcomment \
33111     -Wcomments \
33112     -Wcoverage-mismatch \
33113     -Wcpp \
33114     -Wdeprecated \
33115     -Wdeprecated-declarations \
33116     -Wdisabled-optimization \
33117     -Wdiv-by-zero \
33118     -Wdouble-promotion \
33119     -Wempty-body \
33120     -Wendif-labels \
33121     -Wenum-compare \
33122     -Wextra \
33123     -Wformat-contains-nul \
33124     -Wformat-extra-args \
33125     -Wformat-nonliteral \
33126     -Wformat-security \
33127     -Wformat-y2k \
33128     -Wformat-zero-length \
33129     -Wfree-nonheap-object \
33130     -Wignored-qualifiers \
33131     -Wimplicit \
33132     -Wimplicit-function-declaration \
33133     -Wimplicit-int \
33134     -Winit-self \
33135     -Winline \
33136     -Wint-to-pointer-cast \
33137     -Winvalid-memory-model \
33138     -Winvalid-pch \
33139     -Wjump-misses-init \
33140     -Wlogical-op \
33141     -Wmain \
33142     -Wmaybe-uninitialized \
33143     -Wmissing-braces \
33144     -Wmissing-declarations \
33145     -Wmissing-field-initializers \
33146     -Wmissing-include-dirs \
33147     -Wmissing-parameter-type \
33148     -Wmissing-prototypes \
33149     -Wmudflap \
33150     -Wmultichar \
33151     -Wnarrowing \
33152     -Wnested-externs \
33153     -Wnonnull \
33154     -Wnormalized=nfc \
33155     -Wold-style-declaration \
33156     -Wold-style-definition \
33157     -Woverflow \
33158     -Woverlength-strings \
33159     -Woverride-init \
33160     -Wpacked \
33161     -Wpacked-bitfield-compat \
33162     -Wparentheses \
33163     -Wpointer-arith \
33164     -Wpointer-sign \
33165     -Wpointer-to-int-cast \
33166     -Wpragmas \
33167     -Wreturn-local-addr \
33168     -Wreturn-type \
33169     -Wsequence-point \
33170     -Wshadow \
33171     -Wsizeof-pointer-memaccess \
33172     -Wstack-protector \
33173     -Wstrict-aliasing \
33174     -Wstrict-overflow \
33175     -Wstrict-prototypes \
33176     -Wsuggest-attribute=const \
33177     -Wsuggest-attribute=format \
33178     -Wsuggest-attribute=noreturn \
33179     -Wsuggest-attribute=pure \
33180     -Wswitch \
33181     -Wswitch-default \
33182     -Wsync-nand \
33183     -Wsystem-headers \
33184     -Wtrampolines \
33185     -Wtrigraphs \
33186     -Wtype-limits \
33187     -Wuninitialized \
33188     -Wunknown-pragmas \
33189     -Wunsafe-loop-optimizations \
33190     -Wunused \
33191     -Wunused-but-set-parameter \
33192     -Wunused-but-set-variable \
33193     -Wunused-function \
33194     -Wunused-label \
33195     -Wunused-local-typedefs \
33196     -Wunused-macros \
33197     -Wunused-parameter \
33198     -Wunused-result \
33199     -Wunused-value \
33200     -Wunused-variable \
33201     -Wvarargs \
33202     -Wvariadic-macros \
33203     -Wvector-operation-performance \
33204     -Wvla \
33205     -Wvolatile-register-var \
33206     -Wwrite-strings \
33207     \
33208     ; do
33209     gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
33210   done
33211
33212   # Disable specific options as needed.
33213   if test "$gl_cv_cc_nomfi_needed" = yes; then
33214     gl_manywarn_set="$gl_manywarn_set -Wno-missing-field-initializers"
33215   fi
33216
33217   if test "$gl_cv_cc_uninitialized_supported" = no; then
33218     gl_manywarn_set="$gl_manywarn_set -Wno-uninitialized"
33219   fi
33220
33221   ws=$gl_manywarn_set
33222
33223
33224   gl_warn_set=
33225   set x $ws; shift
33226   for gl_warn_item
33227   do
33228     case " $nw " in
33229       *" $gl_warn_item "*)
33230         ;;
33231       *)
33232         gl_warn_set="$gl_warn_set $gl_warn_item"
33233         ;;
33234     esac
33235   done
33236   ws=$gl_warn_set
33237
33238   for w in $ws; do
33239
33240 as_gl_Warn=`$as_echo "gl_cv_warn_c_$w" | $as_tr_sh`
33241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles $w" >&5
33242 $as_echo_n "checking whether C compiler handles $w... " >&6; }
33243 if eval \${$as_gl_Warn+:} false; then :
33244   $as_echo_n "(cached) " >&6
33245 else
33246
33247   gl_save_compiler_FLAGS="$CFLAGS"
33248   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors $w"
33249   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33250 /* end confdefs.h.  */
33251
33252 int
33253 main ()
33254 {
33255
33256   ;
33257   return 0;
33258 }
33259 _ACEOF
33260 if ac_fn_c_try_compile "$LINENO"; then :
33261   eval "$as_gl_Warn=yes"
33262 else
33263   eval "$as_gl_Warn=no"
33264 fi
33265 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33266   CFLAGS="$gl_save_compiler_FLAGS"
33267
33268 fi
33269 eval ac_res=\$$as_gl_Warn
33270                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
33271 $as_echo "$ac_res" >&6; }
33272 if eval test \"x\$"$as_gl_Warn"\" = x"yes"; then :
33273   as_fn_append WARN_CFLAGS " $w"
33274 fi
33275
33276
33277   done
33278
33279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-sign-compare" >&5
33280 $as_echo_n "checking whether C compiler handles -Wno-sign-compare... " >&6; }
33281 if ${gl_cv_warn_c__Wno_sign_compare+:} false; then :
33282   $as_echo_n "(cached) " >&6
33283 else
33284
33285   gl_save_compiler_FLAGS="$CFLAGS"
33286   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-sign-compare"
33287   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33288 /* end confdefs.h.  */
33289
33290 int
33291 main ()
33292 {
33293
33294   ;
33295   return 0;
33296 }
33297 _ACEOF
33298 if ac_fn_c_try_compile "$LINENO"; then :
33299   gl_cv_warn_c__Wno_sign_compare=yes
33300 else
33301   gl_cv_warn_c__Wno_sign_compare=no
33302 fi
33303 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33304   CFLAGS="$gl_save_compiler_FLAGS"
33305
33306 fi
33307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_sign_compare" >&5
33308 $as_echo "$gl_cv_warn_c__Wno_sign_compare" >&6; }
33309 if test "x$gl_cv_warn_c__Wno_sign_compare" = xyes; then :
33310   as_fn_append WARN_CFLAGS " -Wno-sign-compare"
33311 fi
33312
33313      # Too many warnings for now
33314
33315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-type-limits" >&5
33316 $as_echo_n "checking whether C compiler handles -Wno-type-limits... " >&6; }
33317 if ${gl_cv_warn_c__Wno_type_limits+:} false; then :
33318   $as_echo_n "(cached) " >&6
33319 else
33320
33321   gl_save_compiler_FLAGS="$CFLAGS"
33322   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-type-limits"
33323   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33324 /* end confdefs.h.  */
33325
33326 int
33327 main ()
33328 {
33329
33330   ;
33331   return 0;
33332 }
33333 _ACEOF
33334 if ac_fn_c_try_compile "$LINENO"; then :
33335   gl_cv_warn_c__Wno_type_limits=yes
33336 else
33337   gl_cv_warn_c__Wno_type_limits=no
33338 fi
33339 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33340   CFLAGS="$gl_save_compiler_FLAGS"
33341
33342 fi
33343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_type_limits" >&5
33344 $as_echo "$gl_cv_warn_c__Wno_type_limits" >&6; }
33345 if test "x$gl_cv_warn_c__Wno_type_limits" = xyes; then :
33346   as_fn_append WARN_CFLAGS " -Wno-type-limits"
33347 fi
33348
33349       # It's OK to optimize based on types.
33350
33351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-parameter" >&5
33352 $as_echo_n "checking whether C compiler handles -Wno-unused-parameter... " >&6; }
33353 if ${gl_cv_warn_c__Wno_unused_parameter+:} false; then :
33354   $as_echo_n "(cached) " >&6
33355 else
33356
33357   gl_save_compiler_FLAGS="$CFLAGS"
33358   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-unused-parameter"
33359   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33360 /* end confdefs.h.  */
33361
33362 int
33363 main ()
33364 {
33365
33366   ;
33367   return 0;
33368 }
33369 _ACEOF
33370 if ac_fn_c_try_compile "$LINENO"; then :
33371   gl_cv_warn_c__Wno_unused_parameter=yes
33372 else
33373   gl_cv_warn_c__Wno_unused_parameter=no
33374 fi
33375 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33376   CFLAGS="$gl_save_compiler_FLAGS"
33377
33378 fi
33379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_parameter" >&5
33380 $as_echo "$gl_cv_warn_c__Wno_unused_parameter" >&6; }
33381 if test "x$gl_cv_warn_c__Wno_unused_parameter" = xyes; then :
33382   as_fn_append WARN_CFLAGS " -Wno-unused-parameter"
33383 fi
33384
33385  # Too many warnings for now
33386
33387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-format-nonliteral" >&5
33388 $as_echo_n "checking whether C compiler handles -Wno-format-nonliteral... " >&6; }
33389 if ${gl_cv_warn_c__Wno_format_nonliteral+:} false; then :
33390   $as_echo_n "(cached) " >&6
33391 else
33392
33393   gl_save_compiler_FLAGS="$CFLAGS"
33394   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-format-nonliteral"
33395   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33396 /* end confdefs.h.  */
33397
33398 int
33399 main ()
33400 {
33401
33402   ;
33403   return 0;
33404 }
33405 _ACEOF
33406 if ac_fn_c_try_compile "$LINENO"; then :
33407   gl_cv_warn_c__Wno_format_nonliteral=yes
33408 else
33409   gl_cv_warn_c__Wno_format_nonliteral=no
33410 fi
33411 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33412   CFLAGS="$gl_save_compiler_FLAGS"
33413
33414 fi
33415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_format_nonliteral" >&5
33416 $as_echo "$gl_cv_warn_c__Wno_format_nonliteral" >&6; }
33417 if test "x$gl_cv_warn_c__Wno_format_nonliteral" = xyes; then :
33418   as_fn_append WARN_CFLAGS " -Wno-format-nonliteral"
33419 fi
33420
33421
33422
33423
33424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fdiagnostics-show-option" >&5
33425 $as_echo_n "checking whether C compiler handles -fdiagnostics-show-option... " >&6; }
33426 if ${gl_cv_warn_c__fdiagnostics_show_option+:} false; then :
33427   $as_echo_n "(cached) " >&6
33428 else
33429
33430   gl_save_compiler_FLAGS="$CFLAGS"
33431   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fdiagnostics-show-option"
33432   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33433 /* end confdefs.h.  */
33434
33435 int
33436 main ()
33437 {
33438
33439   ;
33440   return 0;
33441 }
33442 _ACEOF
33443 if ac_fn_c_try_compile "$LINENO"; then :
33444   gl_cv_warn_c__fdiagnostics_show_option=yes
33445 else
33446   gl_cv_warn_c__fdiagnostics_show_option=no
33447 fi
33448 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33449   CFLAGS="$gl_save_compiler_FLAGS"
33450
33451 fi
33452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fdiagnostics_show_option" >&5
33453 $as_echo "$gl_cv_warn_c__fdiagnostics_show_option" >&6; }
33454 if test "x$gl_cv_warn_c__fdiagnostics_show_option" = xyes; then :
33455   as_fn_append WARN_CFLAGS " -fdiagnostics-show-option"
33456 fi
33457
33458
33459
33460 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -funit-at-a-time" >&5
33461 $as_echo_n "checking whether C compiler handles -funit-at-a-time... " >&6; }
33462 if ${gl_cv_warn_c__funit_at_a_time+:} false; then :
33463   $as_echo_n "(cached) " >&6
33464 else
33465
33466   gl_save_compiler_FLAGS="$CFLAGS"
33467   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -funit-at-a-time"
33468   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33469 /* end confdefs.h.  */
33470
33471 int
33472 main ()
33473 {
33474
33475   ;
33476   return 0;
33477 }
33478 _ACEOF
33479 if ac_fn_c_try_compile "$LINENO"; then :
33480   gl_cv_warn_c__funit_at_a_time=yes
33481 else
33482   gl_cv_warn_c__funit_at_a_time=no
33483 fi
33484 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33485   CFLAGS="$gl_save_compiler_FLAGS"
33486
33487 fi
33488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__funit_at_a_time" >&5
33489 $as_echo "$gl_cv_warn_c__funit_at_a_time" >&6; }
33490 if test "x$gl_cv_warn_c__funit_at_a_time" = xyes; then :
33491   as_fn_append WARN_CFLAGS " -funit-at-a-time"
33492 fi
33493
33494
33495
33496
33497
33498
33499 $as_echo "#define lint 1" >>confdefs.h
33500
33501
33502
33503 $as_echo "#define GNULIB_PORTCHECK 1" >>confdefs.h
33504
33505
33506   # Use a slightly smaller set of warning options for lib/.
33507   # Remove the following and save the result in GNULIB_WARN_CFLAGS.
33508   nw=
33509   nw="$nw -Wmissing-prototypes"
33510   nw="$nw -Wunused-macros"
33511   #
33512   # These are for argp.
33513   nw="$nw -Wmissing-field-initializers"
33514   nw="$nw -Wshadow"
33515   #
33516
33517   gl_warn_set=
33518   set x $WARN_CFLAGS; shift
33519   for gl_warn_item
33520   do
33521     case " $nw " in
33522       *" $gl_warn_item "*)
33523         ;;
33524       *)
33525         gl_warn_set="$gl_warn_set $gl_warn_item"
33526         ;;
33527     esac
33528   done
33529   GNULIB_WARN_CFLAGS=$gl_warn_set
33530
33531
33532   # This is also for argp.
33533
33534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-missing-field-initializers" >&5
33535 $as_echo_n "checking whether C compiler handles -Wno-missing-field-initializers... " >&6; }
33536 if ${gl_cv_warn_c__Wno_missing_field_initializers+:} false; then :
33537   $as_echo_n "(cached) " >&6
33538 else
33539
33540   gl_save_compiler_FLAGS="$CFLAGS"
33541   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-missing-field-initializers"
33542   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33543 /* end confdefs.h.  */
33544
33545 int
33546 main ()
33547 {
33548
33549   ;
33550   return 0;
33551 }
33552 _ACEOF
33553 if ac_fn_c_try_compile "$LINENO"; then :
33554   gl_cv_warn_c__Wno_missing_field_initializers=yes
33555 else
33556   gl_cv_warn_c__Wno_missing_field_initializers=no
33557 fi
33558 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33559   CFLAGS="$gl_save_compiler_FLAGS"
33560
33561 fi
33562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_missing_field_initializers" >&5
33563 $as_echo "$gl_cv_warn_c__Wno_missing_field_initializers" >&6; }
33564 if test "x$gl_cv_warn_c__Wno_missing_field_initializers" = xyes; then :
33565   as_fn_append GNULIB_WARN_CFLAGS " -Wno-missing-field-initializers"
33566 fi
33567
33568
33569
33570
33571
33572   # For gnulib-tests, the set is slightly smaller still.
33573   nw=
33574   # It's not worth being this picky about test programs.
33575   nw="$nw -Wsuggest-attribute=const"
33576
33577   gl_warn_set=
33578   set x $GNULIB_WARN_CFLAGS; shift
33579   for gl_warn_item
33580   do
33581     case " $nw " in
33582       *" $gl_warn_item "*)
33583         ;;
33584       *)
33585         gl_warn_set="$gl_warn_set $gl_warn_item"
33586         ;;
33587     esac
33588   done
33589   GNULIB_TEST_WARN_CFLAGS=$gl_warn_set
33590
33591
33592 fi
33593
33594
33595
33596 # Check whether --with-xattrs was given.
33597 if test "${with_xattrs+set}" = set; then :
33598   withval=$with_xattrs;
33599 else
33600   with_xattrs=maybe
33601
33602 fi
33603
33604
33605   for ac_header in attr/xattr.h
33606 do :
33607   ac_fn_c_check_header_mongrel "$LINENO" "attr/xattr.h" "ac_cv_header_attr_xattr_h" "$ac_includes_default"
33608 if test "x$ac_cv_header_attr_xattr_h" = xyes; then :
33609   cat >>confdefs.h <<_ACEOF
33610 #define HAVE_ATTR_XATTR_H 1
33611 _ACEOF
33612
33613 fi
33614
33615 done
33616
33617    if test "$ac_cv_header_attr_xattr_h" = yes; then
33618   TAR_COND_XATTR_H_TRUE=
33619   TAR_COND_XATTR_H_FALSE='#'
33620 else
33621   TAR_COND_XATTR_H_TRUE='#'
33622   TAR_COND_XATTR_H_FALSE=
33623 fi
33624
33625   if test "$ac_cv_header_attr_xattr_h" = yes; then
33626     for ac_func in getxattr  fgetxattr  lgetxattr \
33627                    setxattr  fsetxattr  lsetxattr \
33628                    listxattr flistxattr llistxattr
33629 do :
33630   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
33631 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
33632 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
33633   cat >>confdefs.h <<_ACEOF
33634 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
33635 _ACEOF
33636  # only when functions are present
33637
33638 $as_echo "#define HAVE_ATTR_XATTR_H 1" >>confdefs.h
33639
33640         if test "$with_xattrs" != no; then
33641
33642 $as_echo "#define HAVE_XATTRS /**/" >>confdefs.h
33643
33644         fi
33645
33646 fi
33647 done
33648
33649   fi
33650
33651
33652
33653
33654
33655
33656
33657
33658 ac_fn_c_check_decl "$LINENO" "getgrgid" "ac_cv_have_decl_getgrgid" "#include <grp.h>
33659 "
33660 if test "x$ac_cv_have_decl_getgrgid" = xyes; then :
33661   ac_have_decl=1
33662 else
33663   ac_have_decl=0
33664 fi
33665
33666 cat >>confdefs.h <<_ACEOF
33667 #define HAVE_DECL_GETGRGID $ac_have_decl
33668 _ACEOF
33669
33670 ac_fn_c_check_decl "$LINENO" "getpwuid" "ac_cv_have_decl_getpwuid" "#include <pwd.h>
33671 "
33672 if test "x$ac_cv_have_decl_getpwuid" = xyes; then :
33673   ac_have_decl=1
33674 else
33675   ac_have_decl=0
33676 fi
33677
33678 cat >>confdefs.h <<_ACEOF
33679 #define HAVE_DECL_GETPWUID $ac_have_decl
33680 _ACEOF
33681
33682 ac_fn_c_check_decl "$LINENO" "time" "ac_cv_have_decl_time" "#include <time.h>
33683 "
33684 if test "x$ac_cv_have_decl_time" = xyes; then :
33685   ac_have_decl=1
33686 else
33687   ac_have_decl=0
33688 fi
33689
33690 cat >>confdefs.h <<_ACEOF
33691 #define HAVE_DECL_TIME $ac_have_decl
33692 _ACEOF
33693
33694
33695 ac_fn_c_check_func "$LINENO" "waitpid" "ac_cv_func_waitpid"
33696 if test "x$ac_cv_func_waitpid" = xyes; then :
33697   $as_echo "#define HAVE_WAITPID 1" >>confdefs.h
33698
33699 else
33700   case " $LIBOBJS " in
33701   *" waitpid.$ac_objext "* ) ;;
33702   *) LIBOBJS="$LIBOBJS waitpid.$ac_objext"
33703  ;;
33704 esac
33705
33706 fi
33707
33708
33709
33710
33711 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remote shell" >&5
33712 $as_echo_n "checking for remote shell... " >&6; }
33713 if ${tar_cv_path_RSH+:} false; then :
33714   $as_echo_n "(cached) " >&6
33715 else
33716   if test -n "$RSH"; then
33717     tar_cv_path_RSH=$RSH
33718   else
33719     tar_cv_path_RSH=no
33720     for ac_file in /usr/ucb/rsh /usr/bin/remsh /usr/bin/rsh /usr/bsd/rsh \
33721         /usr/bin/nsh /usr/bin/rcmd
33722     do
33723       # Prefer a non-symlink rsh to a symlink one, so that binaries built
33724       # on AIX 4.1.4, where /usr/ucb/rsh is a symlink to /usr/bin/rsh
33725       # will run on AIX 4.3.0, which has only /usr/bin/rsh.
33726       if test -f $ac_file; then
33727         if (test -h $ac_file) 2>/dev/null; then
33728           test $tar_cv_path_RSH = no && tar_cv_path_RSH=$ac_file
33729         else
33730           tar_cv_path_RSH=$ac_file
33731           break
33732         fi
33733       fi
33734     done
33735   fi
33736 fi
33737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tar_cv_path_RSH" >&5
33738 $as_echo "$tar_cv_path_RSH" >&6; }
33739 if test $tar_cv_path_RSH = no; then
33740   for ac_header in netdb.h
33741 do :
33742   ac_fn_c_check_header_mongrel "$LINENO" "netdb.h" "ac_cv_header_netdb_h" "$ac_includes_default"
33743 if test "x$ac_cv_header_netdb_h" = xyes; then :
33744   cat >>confdefs.h <<_ACEOF
33745 #define HAVE_NETDB_H 1
33746 _ACEOF
33747
33748 fi
33749
33750 done
33751
33752 else
33753
33754 cat >>confdefs.h <<_ACEOF
33755 #define REMOTE_SHELL "$tar_cv_path_RSH"
33756 _ACEOF
33757
33758 fi
33759
33760
33761
33762
33763
33764 # Check whether --with-compress was given.
33765 if test "${with_compress+set}" = set; then :
33766   withval=$with_compress; tar_cv_compressor_compress=${withval}
33767 else
33768   tar_cv_compressor_compress=compress
33769 fi
33770
33771
33772 cat >>confdefs.h <<_ACEOF
33773 #define COMPRESS_PROGRAM "$tar_cv_compressor_compress"
33774 _ACEOF
33775
33776
33777
33778
33779
33780 # Check whether --with-gzip was given.
33781 if test "${with_gzip+set}" = set; then :
33782   withval=$with_gzip; tar_cv_compressor_gzip=${withval}
33783 else
33784   tar_cv_compressor_gzip=gzip
33785 fi
33786
33787
33788 cat >>confdefs.h <<_ACEOF
33789 #define GZIP_PROGRAM "$tar_cv_compressor_gzip"
33790 _ACEOF
33791
33792
33793
33794
33795
33796 # Check whether --with-bzip2 was given.
33797 if test "${with_bzip2+set}" = set; then :
33798   withval=$with_bzip2; tar_cv_compressor_bzip2=${withval}
33799 else
33800   tar_cv_compressor_bzip2=bzip2
33801 fi
33802
33803
33804 cat >>confdefs.h <<_ACEOF
33805 #define BZIP2_PROGRAM "$tar_cv_compressor_bzip2"
33806 _ACEOF
33807
33808
33809
33810
33811
33812 # Check whether --with-lzip was given.
33813 if test "${with_lzip+set}" = set; then :
33814   withval=$with_lzip; tar_cv_compressor_lzip=${withval}
33815 else
33816   tar_cv_compressor_lzip=lzip
33817 fi
33818
33819
33820 cat >>confdefs.h <<_ACEOF
33821 #define LZIP_PROGRAM "$tar_cv_compressor_lzip"
33822 _ACEOF
33823
33824
33825
33826
33827
33828 # Check whether --with-lzma was given.
33829 if test "${with_lzma+set}" = set; then :
33830   withval=$with_lzma; tar_cv_compressor_lzma=${withval}
33831 else
33832   tar_cv_compressor_lzma=lzma
33833 fi
33834
33835
33836 cat >>confdefs.h <<_ACEOF
33837 #define LZMA_PROGRAM "$tar_cv_compressor_lzma"
33838 _ACEOF
33839
33840
33841
33842
33843
33844 # Check whether --with-lzop was given.
33845 if test "${with_lzop+set}" = set; then :
33846   withval=$with_lzop; tar_cv_compressor_lzop=${withval}
33847 else
33848   tar_cv_compressor_lzop=lzop
33849 fi
33850
33851
33852 cat >>confdefs.h <<_ACEOF
33853 #define LZOP_PROGRAM "$tar_cv_compressor_lzop"
33854 _ACEOF
33855
33856
33857
33858
33859
33860 # Check whether --with-xz was given.
33861 if test "${with_xz+set}" = set; then :
33862   withval=$with_xz; tar_cv_compressor_xz=${withval}
33863 else
33864   tar_cv_compressor_xz=xz
33865 fi
33866
33867
33868 cat >>confdefs.h <<_ACEOF
33869 #define XZ_PROGRAM "$tar_cv_compressor_xz"
33870 _ACEOF
33871
33872
33873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default archive format" >&5
33874 $as_echo_n "checking for default archive format... " >&6; }
33875
33876
33877
33878 if test -z "$DEFAULT_ARCHIVE_FORMAT"; then
33879   DEFAULT_ARCHIVE_FORMAT="GNU"
33880 fi
33881 case $DEFAULT_ARCHIVE_FORMAT in
33882   V7|OLDGNU|USTAR|POSIX|GNU) ;;
33883   *) as_fn_error $? "Invalid format name" "$LINENO" 5;;
33884 esac
33885
33886 cat >>confdefs.h <<_ACEOF
33887 #define DEFAULT_ARCHIVE_FORMAT ${DEFAULT_ARCHIVE_FORMAT}_FORMAT
33888 _ACEOF
33889
33890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEFAULT_ARCHIVE_FORMAT" >&5
33891 $as_echo "$DEFAULT_ARCHIVE_FORMAT" >&6; }
33892
33893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default archive" >&5
33894 $as_echo_n "checking for default archive... " >&6; }
33895
33896
33897 if test -z "$DEFAULT_ARCHIVE"; then
33898   DEFAULT_ARCHIVE=-
33899 else
33900   if test -z "`ls $DEFAULT_ARCHIVE 2>/dev/null`"; then
33901     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: DEFAULT_ARCHIVE '$DEFAULT_ARCHIVE' not found on this system" >&5
33902 $as_echo "$as_me: WARNING: DEFAULT_ARCHIVE '$DEFAULT_ARCHIVE' not found on this system" >&2;}
33903   fi
33904   # FIXME: Look for DEFTAPE in <sys/mtio.h>.
33905   # FIXME: Let DEVICE_PREFIX be configured from the environment.
33906   # FIXME: Rearrange, here.
33907   case $DEFAULT_ARCHIVE in
33908     *[0-7][lmh])
33909
33910 $as_echo "#define DENSITY_LETTER 1" >>confdefs.h
33911
33912       device_prefix=`echo $DEFAULT_ARCHIVE | sed 's/0-7lmh$//'`
33913       ;;
33914     *[0-7])
33915       device_prefix=`echo $DEFAULT_ARCHIVE | sed 's/0-7$//'`
33916       ;;
33917     *)
33918       device_prefix=
33919       ;;
33920   esac
33921   case "$device_prefix" in
33922     ?*)
33923
33924 cat >>confdefs.h <<_ACEOF
33925 #define DEVICE_PREFIX "$device_prefix"
33926 _ACEOF
33927
33928       ;;
33929   esac
33930 fi
33931
33932 cat >>confdefs.h <<_ACEOF
33933 #define DEFAULT_ARCHIVE "$DEFAULT_ARCHIVE"
33934 _ACEOF
33935
33936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEFAULT_ARCHIVE" >&5
33937 $as_echo "$DEFAULT_ARCHIVE" >&6; }
33938
33939
33940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default blocking" >&5
33941 $as_echo_n "checking for default blocking... " >&6; }
33942 DEFAULT_BLOCKING=${DEFAULT_BLOCKING-20}
33943
33944 cat >>confdefs.h <<_ACEOF
33945 #define DEFAULT_BLOCKING $DEFAULT_BLOCKING
33946 _ACEOF
33947
33948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEFAULT_BLOCKING" >&5
33949 $as_echo "$DEFAULT_BLOCKING" >&6; }
33950
33951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default quoting style" >&5
33952 $as_echo_n "checking for default quoting style... " >&6; }
33953
33954
33955 DEFAULT_QUOTING_STYLE="escape"
33956
33957
33958 case $DEFAULT_QUOTING_STYLE in
33959           literal|shell|shell-always|c|escape|locale|clocale) ;;
33960 *)  as_fn_error $? "Invalid quoting style" "$LINENO" 5;;
33961 esac
33962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEFAULT_QUOTING_STYLE" >&5
33963 $as_echo "$DEFAULT_QUOTING_STYLE" >&6; }
33964 DEFAULT_QUOTING_STYLE=`echo ${DEFAULT_QUOTING_STYLE}|sed 's/-/_/g'`_quoting_style
33965
33966 cat >>confdefs.h <<_ACEOF
33967 #define DEFAULT_QUOTING_STYLE $DEFAULT_QUOTING_STYLE
33968 _ACEOF
33969
33970
33971 # Iconv
33972
33973       if test "X$prefix" = "XNONE"; then
33974     acl_final_prefix="$ac_default_prefix"
33975   else
33976     acl_final_prefix="$prefix"
33977   fi
33978   if test "X$exec_prefix" = "XNONE"; then
33979     acl_final_exec_prefix='${prefix}'
33980   else
33981     acl_final_exec_prefix="$exec_prefix"
33982   fi
33983   acl_save_prefix="$prefix"
33984   prefix="$acl_final_prefix"
33985   eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
33986   prefix="$acl_save_prefix"
33987
33988
33989
33990 # Check whether --with-gnu-ld was given.
33991 if test "${with_gnu_ld+set}" = set; then :
33992   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
33993 else
33994   with_gnu_ld=no
33995 fi
33996
33997 # Prepare PATH_SEPARATOR.
33998 # The user is always right.
33999 if test "${PATH_SEPARATOR+set}" != set; then
34000   # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
34001   # contains only /bin. Note that ksh looks also at the FPATH variable,
34002   # so we have to set that as well for the test.
34003   PATH_SEPARATOR=:
34004   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
34005     && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
34006            || PATH_SEPARATOR=';'
34007        }
34008 fi
34009
34010 ac_prog=ld
34011 if test "$GCC" = yes; then
34012   # Check if gcc -print-prog-name=ld gives a path.
34013   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
34014 $as_echo_n "checking for ld used by $CC... " >&6; }
34015   case $host in
34016   *-*-mingw*)
34017     # gcc leaves a trailing carriage return which upsets mingw
34018     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
34019   *)
34020     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
34021   esac
34022   case $ac_prog in
34023     # Accept absolute paths.
34024     [\\/]* | ?:[\\/]*)
34025       re_direlt='/[^/][^/]*/\.\./'
34026       # Canonicalize the pathname of ld
34027       ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'`
34028       while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do
34029         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
34030       done
34031       test -z "$LD" && LD="$ac_prog"
34032       ;;
34033   "")
34034     # If it fails, then pretend we aren't using GCC.
34035     ac_prog=ld
34036     ;;
34037   *)
34038     # If it is relative, then search for the first ld in PATH.
34039     with_gnu_ld=unknown
34040     ;;
34041   esac
34042 elif test "$with_gnu_ld" = yes; then
34043   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
34044 $as_echo_n "checking for GNU ld... " >&6; }
34045 else
34046   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
34047 $as_echo_n "checking for non-GNU ld... " >&6; }
34048 fi
34049 if ${acl_cv_path_LD+:} false; then :
34050   $as_echo_n "(cached) " >&6
34051 else
34052   if test -z "$LD"; then
34053   acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
34054   for ac_dir in $PATH; do
34055     IFS="$acl_save_ifs"
34056     test -z "$ac_dir" && ac_dir=.
34057     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
34058       acl_cv_path_LD="$ac_dir/$ac_prog"
34059       # Check to see if the program is GNU ld.  I'd rather use --version,
34060       # but apparently some variants of GNU ld only accept -v.
34061       # Break only if it was the GNU/non-GNU ld that we prefer.
34062       case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
34063       *GNU* | *'with BFD'*)
34064         test "$with_gnu_ld" != no && break
34065         ;;
34066       *)
34067         test "$with_gnu_ld" != yes && break
34068         ;;
34069       esac
34070     fi
34071   done
34072   IFS="$acl_save_ifs"
34073 else
34074   acl_cv_path_LD="$LD" # Let the user override the test with a path.
34075 fi
34076 fi
34077
34078 LD="$acl_cv_path_LD"
34079 if test -n "$LD"; then
34080   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
34081 $as_echo "$LD" >&6; }
34082 else
34083   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34084 $as_echo "no" >&6; }
34085 fi
34086 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
34087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
34088 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
34089 if ${acl_cv_prog_gnu_ld+:} false; then :
34090   $as_echo_n "(cached) " >&6
34091 else
34092   # I'd rather use --version here, but apparently some GNU lds only accept -v.
34093 case `$LD -v 2>&1 </dev/null` in
34094 *GNU* | *'with BFD'*)
34095   acl_cv_prog_gnu_ld=yes
34096   ;;
34097 *)
34098   acl_cv_prog_gnu_ld=no
34099   ;;
34100 esac
34101 fi
34102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
34103 $as_echo "$acl_cv_prog_gnu_ld" >&6; }
34104 with_gnu_ld=$acl_cv_prog_gnu_ld
34105
34106
34107
34108
34109                                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
34110 $as_echo_n "checking for shared library run path origin... " >&6; }
34111 if ${acl_cv_rpath+:} false; then :
34112   $as_echo_n "(cached) " >&6
34113 else
34114
34115     CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
34116     ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
34117     . ./conftest.sh
34118     rm -f ./conftest.sh
34119     acl_cv_rpath=done
34120
34121 fi
34122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
34123 $as_echo "$acl_cv_rpath" >&6; }
34124   wl="$acl_cv_wl"
34125   acl_libext="$acl_cv_libext"
34126   acl_shlibext="$acl_cv_shlibext"
34127   acl_libname_spec="$acl_cv_libname_spec"
34128   acl_library_names_spec="$acl_cv_library_names_spec"
34129   acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
34130   acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
34131   acl_hardcode_direct="$acl_cv_hardcode_direct"
34132   acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
34133     # Check whether --enable-rpath was given.
34134 if test "${enable_rpath+set}" = set; then :
34135   enableval=$enable_rpath; :
34136 else
34137   enable_rpath=yes
34138 fi
34139
34140
34141
34142
34143   acl_libdirstem=lib
34144   acl_libdirstem2=
34145   case "$host_os" in
34146     solaris*)
34147                                     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5
34148 $as_echo_n "checking for 64-bit host... " >&6; }
34149 if ${gl_cv_solaris_64bit+:} false; then :
34150   $as_echo_n "(cached) " >&6
34151 else
34152   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34153 /* end confdefs.h.  */
34154
34155 #ifdef _LP64
34156 sixtyfour bits
34157 #endif
34158
34159 _ACEOF
34160 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
34161   $EGREP "sixtyfour bits" >/dev/null 2>&1; then :
34162   gl_cv_solaris_64bit=yes
34163 else
34164   gl_cv_solaris_64bit=no
34165 fi
34166 rm -f conftest*
34167
34168
34169 fi
34170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5
34171 $as_echo "$gl_cv_solaris_64bit" >&6; }
34172       if test $gl_cv_solaris_64bit = yes; then
34173         acl_libdirstem=lib/64
34174         case "$host_cpu" in
34175           sparc*)        acl_libdirstem2=lib/sparcv9 ;;
34176           i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
34177         esac
34178       fi
34179       ;;
34180     *)
34181       searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
34182       if test -n "$searchpath"; then
34183         acl_save_IFS="${IFS=    }"; IFS=":"
34184         for searchdir in $searchpath; do
34185           if test -d "$searchdir"; then
34186             case "$searchdir" in
34187               */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
34188               */../ | */.. )
34189                 # Better ignore directories of this form. They are misleading.
34190                 ;;
34191               *) searchdir=`cd "$searchdir" && pwd`
34192                  case "$searchdir" in
34193                    */lib64 ) acl_libdirstem=lib64 ;;
34194                  esac ;;
34195             esac
34196           fi
34197         done
34198         IFS="$acl_save_IFS"
34199       fi
34200       ;;
34201   esac
34202   test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
34203
34204
34205
34206
34207
34208
34209
34210
34211
34212
34213
34214
34215     use_additional=yes
34216
34217   acl_save_prefix="$prefix"
34218   prefix="$acl_final_prefix"
34219   acl_save_exec_prefix="$exec_prefix"
34220   exec_prefix="$acl_final_exec_prefix"
34221
34222     eval additional_includedir=\"$includedir\"
34223     eval additional_libdir=\"$libdir\"
34224
34225   exec_prefix="$acl_save_exec_prefix"
34226   prefix="$acl_save_prefix"
34227
34228
34229 # Check whether --with-libiconv-prefix was given.
34230 if test "${with_libiconv_prefix+set}" = set; then :
34231   withval=$with_libiconv_prefix;
34232     if test "X$withval" = "Xno"; then
34233       use_additional=no
34234     else
34235       if test "X$withval" = "X"; then
34236
34237   acl_save_prefix="$prefix"
34238   prefix="$acl_final_prefix"
34239   acl_save_exec_prefix="$exec_prefix"
34240   exec_prefix="$acl_final_exec_prefix"
34241
34242           eval additional_includedir=\"$includedir\"
34243           eval additional_libdir=\"$libdir\"
34244
34245   exec_prefix="$acl_save_exec_prefix"
34246   prefix="$acl_save_prefix"
34247
34248       else
34249         additional_includedir="$withval/include"
34250         additional_libdir="$withval/$acl_libdirstem"
34251         if test "$acl_libdirstem2" != "$acl_libdirstem" \
34252            && ! test -d "$withval/$acl_libdirstem"; then
34253           additional_libdir="$withval/$acl_libdirstem2"
34254         fi
34255       fi
34256     fi
34257
34258 fi
34259
34260       LIBICONV=
34261   LTLIBICONV=
34262   INCICONV=
34263   LIBICONV_PREFIX=
34264       HAVE_LIBICONV=
34265   rpathdirs=
34266   ltrpathdirs=
34267   names_already_handled=
34268   names_next_round='iconv '
34269   while test -n "$names_next_round"; do
34270     names_this_round="$names_next_round"
34271     names_next_round=
34272     for name in $names_this_round; do
34273       already_handled=
34274       for n in $names_already_handled; do
34275         if test "$n" = "$name"; then
34276           already_handled=yes
34277           break
34278         fi
34279       done
34280       if test -z "$already_handled"; then
34281         names_already_handled="$names_already_handled $name"
34282                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
34283         eval value=\"\$HAVE_LIB$uppername\"
34284         if test -n "$value"; then
34285           if test "$value" = yes; then
34286             eval value=\"\$LIB$uppername\"
34287             test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
34288             eval value=\"\$LTLIB$uppername\"
34289             test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
34290           else
34291                                     :
34292           fi
34293         else
34294                               found_dir=
34295           found_la=
34296           found_so=
34297           found_a=
34298           eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
34299           if test -n "$acl_shlibext"; then
34300             shrext=".$acl_shlibext"             # typically: shrext=.so
34301           else
34302             shrext=
34303           fi
34304           if test $use_additional = yes; then
34305             dir="$additional_libdir"
34306                                     if test -n "$acl_shlibext"; then
34307               if test -f "$dir/$libname$shrext"; then
34308                 found_dir="$dir"
34309                 found_so="$dir/$libname$shrext"
34310               else
34311                 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
34312                   ver=`(cd "$dir" && \
34313                         for f in "$libname$shrext".*; do echo "$f"; done \
34314                         | sed -e "s,^$libname$shrext\\\\.,," \
34315                         | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
34316                         | sed 1q ) 2>/dev/null`
34317                   if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
34318                     found_dir="$dir"
34319                     found_so="$dir/$libname$shrext.$ver"
34320                   fi
34321                 else
34322                   eval library_names=\"$acl_library_names_spec\"
34323                   for f in $library_names; do
34324                     if test -f "$dir/$f"; then
34325                       found_dir="$dir"
34326                       found_so="$dir/$f"
34327                       break
34328                     fi
34329                   done
34330                 fi
34331               fi
34332             fi
34333                         if test "X$found_dir" = "X"; then
34334               if test -f "$dir/$libname.$acl_libext"; then
34335                 found_dir="$dir"
34336                 found_a="$dir/$libname.$acl_libext"
34337               fi
34338             fi
34339             if test "X$found_dir" != "X"; then
34340               if test -f "$dir/$libname.la"; then
34341                 found_la="$dir/$libname.la"
34342               fi
34343             fi
34344           fi
34345           if test "X$found_dir" = "X"; then
34346             for x in $LDFLAGS $LTLIBICONV; do
34347
34348   acl_save_prefix="$prefix"
34349   prefix="$acl_final_prefix"
34350   acl_save_exec_prefix="$exec_prefix"
34351   exec_prefix="$acl_final_exec_prefix"
34352   eval x=\"$x\"
34353   exec_prefix="$acl_save_exec_prefix"
34354   prefix="$acl_save_prefix"
34355
34356               case "$x" in
34357                 -L*)
34358                   dir=`echo "X$x" | sed -e 's/^X-L//'`
34359                                     if test -n "$acl_shlibext"; then
34360                     if test -f "$dir/$libname$shrext"; then
34361                       found_dir="$dir"
34362                       found_so="$dir/$libname$shrext"
34363                     else
34364                       if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
34365                         ver=`(cd "$dir" && \
34366                               for f in "$libname$shrext".*; do echo "$f"; done \
34367                               | sed -e "s,^$libname$shrext\\\\.,," \
34368                               | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
34369                               | sed 1q ) 2>/dev/null`
34370                         if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
34371                           found_dir="$dir"
34372                           found_so="$dir/$libname$shrext.$ver"
34373                         fi
34374                       else
34375                         eval library_names=\"$acl_library_names_spec\"
34376                         for f in $library_names; do
34377                           if test -f "$dir/$f"; then
34378                             found_dir="$dir"
34379                             found_so="$dir/$f"
34380                             break
34381                           fi
34382                         done
34383                       fi
34384                     fi
34385                   fi
34386                                     if test "X$found_dir" = "X"; then
34387                     if test -f "$dir/$libname.$acl_libext"; then
34388                       found_dir="$dir"
34389                       found_a="$dir/$libname.$acl_libext"
34390                     fi
34391                   fi
34392                   if test "X$found_dir" != "X"; then
34393                     if test -f "$dir/$libname.la"; then
34394                       found_la="$dir/$libname.la"
34395                     fi
34396                   fi
34397                   ;;
34398               esac
34399               if test "X$found_dir" != "X"; then
34400                 break
34401               fi
34402             done
34403           fi
34404           if test "X$found_dir" != "X"; then
34405                         LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
34406             if test "X$found_so" != "X"; then
34407                                                         if test "$enable_rpath" = no \
34408                  || test "X$found_dir" = "X/usr/$acl_libdirstem" \
34409                  || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
34410                                 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
34411               else
34412                                                                                 haveit=
34413                 for x in $ltrpathdirs; do
34414                   if test "X$x" = "X$found_dir"; then
34415                     haveit=yes
34416                     break
34417                   fi
34418                 done
34419                 if test -z "$haveit"; then
34420                   ltrpathdirs="$ltrpathdirs $found_dir"
34421                 fi
34422                                 if test "$acl_hardcode_direct" = yes; then
34423                                                       LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
34424                 else
34425                   if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
34426                                                             LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
34427                                                             haveit=
34428                     for x in $rpathdirs; do
34429                       if test "X$x" = "X$found_dir"; then
34430                         haveit=yes
34431                         break
34432                       fi
34433                     done
34434                     if test -z "$haveit"; then
34435                       rpathdirs="$rpathdirs $found_dir"
34436                     fi
34437                   else
34438                                                                                 haveit=
34439                     for x in $LDFLAGS $LIBICONV; do
34440
34441   acl_save_prefix="$prefix"
34442   prefix="$acl_final_prefix"
34443   acl_save_exec_prefix="$exec_prefix"
34444   exec_prefix="$acl_final_exec_prefix"
34445   eval x=\"$x\"
34446   exec_prefix="$acl_save_exec_prefix"
34447   prefix="$acl_save_prefix"
34448
34449                       if test "X$x" = "X-L$found_dir"; then
34450                         haveit=yes
34451                         break
34452                       fi
34453                     done
34454                     if test -z "$haveit"; then
34455                       LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
34456                     fi
34457                     if test "$acl_hardcode_minus_L" != no; then
34458                                                                                         LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
34459                     else
34460                                                                                                                                                                                 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
34461                     fi
34462                   fi
34463                 fi
34464               fi
34465             else
34466               if test "X$found_a" != "X"; then
34467                                 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
34468               else
34469                                                 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
34470               fi
34471             fi
34472                         additional_includedir=
34473             case "$found_dir" in
34474               */$acl_libdirstem | */$acl_libdirstem/)
34475                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
34476                 if test "$name" = 'iconv'; then
34477                   LIBICONV_PREFIX="$basedir"
34478                 fi
34479                 additional_includedir="$basedir/include"
34480                 ;;
34481               */$acl_libdirstem2 | */$acl_libdirstem2/)
34482                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
34483                 if test "$name" = 'iconv'; then
34484                   LIBICONV_PREFIX="$basedir"
34485                 fi
34486                 additional_includedir="$basedir/include"
34487                 ;;
34488             esac
34489             if test "X$additional_includedir" != "X"; then
34490                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
34491                 haveit=
34492                 if test "X$additional_includedir" = "X/usr/local/include"; then
34493                   if test -n "$GCC"; then
34494                     case $host_os in
34495                       linux* | gnu* | k*bsd*-gnu) haveit=yes;;
34496                     esac
34497                   fi
34498                 fi
34499                 if test -z "$haveit"; then
34500                   for x in $CPPFLAGS $INCICONV; do
34501
34502   acl_save_prefix="$prefix"
34503   prefix="$acl_final_prefix"
34504   acl_save_exec_prefix="$exec_prefix"
34505   exec_prefix="$acl_final_exec_prefix"
34506   eval x=\"$x\"
34507   exec_prefix="$acl_save_exec_prefix"
34508   prefix="$acl_save_prefix"
34509
34510                     if test "X$x" = "X-I$additional_includedir"; then
34511                       haveit=yes
34512                       break
34513                     fi
34514                   done
34515                   if test -z "$haveit"; then
34516                     if test -d "$additional_includedir"; then
34517                                             INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
34518                     fi
34519                   fi
34520                 fi
34521               fi
34522             fi
34523                         if test -n "$found_la"; then
34524                                                         save_libdir="$libdir"
34525               case "$found_la" in
34526                 */* | *\\*) . "$found_la" ;;
34527                 *) . "./$found_la" ;;
34528               esac
34529               libdir="$save_libdir"
34530                             for dep in $dependency_libs; do
34531                 case "$dep" in
34532                   -L*)
34533                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
34534                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
34535                        && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
34536                       haveit=
34537                       if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
34538                          || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
34539                         if test -n "$GCC"; then
34540                           case $host_os in
34541                             linux* | gnu* | k*bsd*-gnu) haveit=yes;;
34542                           esac
34543                         fi
34544                       fi
34545                       if test -z "$haveit"; then
34546                         haveit=
34547                         for x in $LDFLAGS $LIBICONV; do
34548
34549   acl_save_prefix="$prefix"
34550   prefix="$acl_final_prefix"
34551   acl_save_exec_prefix="$exec_prefix"
34552   exec_prefix="$acl_final_exec_prefix"
34553   eval x=\"$x\"
34554   exec_prefix="$acl_save_exec_prefix"
34555   prefix="$acl_save_prefix"
34556
34557                           if test "X$x" = "X-L$additional_libdir"; then
34558                             haveit=yes
34559                             break
34560                           fi
34561                         done
34562                         if test -z "$haveit"; then
34563                           if test -d "$additional_libdir"; then
34564                                                         LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
34565                           fi
34566                         fi
34567                         haveit=
34568                         for x in $LDFLAGS $LTLIBICONV; do
34569
34570   acl_save_prefix="$prefix"
34571   prefix="$acl_final_prefix"
34572   acl_save_exec_prefix="$exec_prefix"
34573   exec_prefix="$acl_final_exec_prefix"
34574   eval x=\"$x\"
34575   exec_prefix="$acl_save_exec_prefix"
34576   prefix="$acl_save_prefix"
34577
34578                           if test "X$x" = "X-L$additional_libdir"; then
34579                             haveit=yes
34580                             break
34581                           fi
34582                         done
34583                         if test -z "$haveit"; then
34584                           if test -d "$additional_libdir"; then
34585                                                         LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
34586                           fi
34587                         fi
34588                       fi
34589                     fi
34590                     ;;
34591                   -R*)
34592                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
34593                     if test "$enable_rpath" != no; then
34594                                                                   haveit=
34595                       for x in $rpathdirs; do
34596                         if test "X$x" = "X$dir"; then
34597                           haveit=yes
34598                           break
34599                         fi
34600                       done
34601                       if test -z "$haveit"; then
34602                         rpathdirs="$rpathdirs $dir"
34603                       fi
34604                                                                   haveit=
34605                       for x in $ltrpathdirs; do
34606                         if test "X$x" = "X$dir"; then
34607                           haveit=yes
34608                           break
34609                         fi
34610                       done
34611                       if test -z "$haveit"; then
34612                         ltrpathdirs="$ltrpathdirs $dir"
34613                       fi
34614                     fi
34615                     ;;
34616                   -l*)
34617                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
34618                     ;;
34619                   *.la)
34620                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
34621                     ;;
34622                   *)
34623                                         LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
34624                     LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
34625                     ;;
34626                 esac
34627               done
34628             fi
34629           else
34630                                                             LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
34631             LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
34632           fi
34633         fi
34634       fi
34635     done
34636   done
34637   if test "X$rpathdirs" != "X"; then
34638     if test -n "$acl_hardcode_libdir_separator"; then
34639                         alldirs=
34640       for found_dir in $rpathdirs; do
34641         alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
34642       done
34643             acl_save_libdir="$libdir"
34644       libdir="$alldirs"
34645       eval flag=\"$acl_hardcode_libdir_flag_spec\"
34646       libdir="$acl_save_libdir"
34647       LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
34648     else
34649             for found_dir in $rpathdirs; do
34650         acl_save_libdir="$libdir"
34651         libdir="$found_dir"
34652         eval flag=\"$acl_hardcode_libdir_flag_spec\"
34653         libdir="$acl_save_libdir"
34654         LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
34655       done
34656     fi
34657   fi
34658   if test "X$ltrpathdirs" != "X"; then
34659             for found_dir in $ltrpathdirs; do
34660       LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
34661     done
34662   fi
34663
34664
34665
34666
34667
34668
34669
34670
34671
34672
34673
34674
34675           am_save_CPPFLAGS="$CPPFLAGS"
34676
34677   for element in $INCICONV; do
34678     haveit=
34679     for x in $CPPFLAGS; do
34680
34681   acl_save_prefix="$prefix"
34682   prefix="$acl_final_prefix"
34683   acl_save_exec_prefix="$exec_prefix"
34684   exec_prefix="$acl_final_exec_prefix"
34685   eval x=\"$x\"
34686   exec_prefix="$acl_save_exec_prefix"
34687   prefix="$acl_save_prefix"
34688
34689       if test "X$x" = "X$element"; then
34690         haveit=yes
34691         break
34692       fi
34693     done
34694     if test -z "$haveit"; then
34695       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
34696     fi
34697   done
34698
34699
34700   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
34701 $as_echo_n "checking for iconv... " >&6; }
34702 if ${am_cv_func_iconv+:} false; then :
34703   $as_echo_n "(cached) " >&6
34704 else
34705
34706     am_cv_func_iconv="no, consider installing GNU libiconv"
34707     am_cv_lib_iconv=no
34708     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34709 /* end confdefs.h.  */
34710
34711 #include <stdlib.h>
34712 #include <iconv.h>
34713
34714 int
34715 main ()
34716 {
34717 iconv_t cd = iconv_open("","");
34718            iconv(cd,NULL,NULL,NULL,NULL);
34719            iconv_close(cd);
34720   ;
34721   return 0;
34722 }
34723 _ACEOF
34724 if ac_fn_c_try_link "$LINENO"; then :
34725   am_cv_func_iconv=yes
34726 fi
34727 rm -f core conftest.err conftest.$ac_objext \
34728     conftest$ac_exeext conftest.$ac_ext
34729     if test "$am_cv_func_iconv" != yes; then
34730       am_save_LIBS="$LIBS"
34731       LIBS="$LIBS $LIBICONV"
34732       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34733 /* end confdefs.h.  */
34734
34735 #include <stdlib.h>
34736 #include <iconv.h>
34737
34738 int
34739 main ()
34740 {
34741 iconv_t cd = iconv_open("","");
34742              iconv(cd,NULL,NULL,NULL,NULL);
34743              iconv_close(cd);
34744   ;
34745   return 0;
34746 }
34747 _ACEOF
34748 if ac_fn_c_try_link "$LINENO"; then :
34749   am_cv_lib_iconv=yes
34750         am_cv_func_iconv=yes
34751 fi
34752 rm -f core conftest.err conftest.$ac_objext \
34753     conftest$ac_exeext conftest.$ac_ext
34754       LIBS="$am_save_LIBS"
34755     fi
34756
34757 fi
34758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
34759 $as_echo "$am_cv_func_iconv" >&6; }
34760   if test "$am_cv_func_iconv" = yes; then
34761     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
34762 $as_echo_n "checking for working iconv... " >&6; }
34763 if ${am_cv_func_iconv_works+:} false; then :
34764   $as_echo_n "(cached) " >&6
34765 else
34766
34767                   am_save_LIBS="$LIBS"
34768       if test $am_cv_lib_iconv = yes; then
34769         LIBS="$LIBS $LIBICONV"
34770       fi
34771       if test "$cross_compiling" = yes; then :
34772
34773          case "$host_os" in
34774            aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
34775            *)            am_cv_func_iconv_works="guessing yes" ;;
34776          esac
34777
34778 else
34779   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34780 /* end confdefs.h.  */
34781
34782 #include <iconv.h>
34783 #include <string.h>
34784 int main ()
34785 {
34786   int result = 0;
34787   /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
34788      returns.  */
34789   {
34790     iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
34791     if (cd_utf8_to_88591 != (iconv_t)(-1))
34792       {
34793         static const char input[] = "\342\202\254"; /* EURO SIGN */
34794         char buf[10];
34795         const char *inptr = input;
34796         size_t inbytesleft = strlen (input);
34797         char *outptr = buf;
34798         size_t outbytesleft = sizeof (buf);
34799         size_t res = iconv (cd_utf8_to_88591,
34800                             (char **) &inptr, &inbytesleft,
34801                             &outptr, &outbytesleft);
34802         if (res == 0)
34803           result |= 1;
34804         iconv_close (cd_utf8_to_88591);
34805       }
34806   }
34807   /* Test against Solaris 10 bug: Failures are not distinguishable from
34808      successful returns.  */
34809   {
34810     iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
34811     if (cd_ascii_to_88591 != (iconv_t)(-1))
34812       {
34813         static const char input[] = "\263";
34814         char buf[10];
34815         const char *inptr = input;
34816         size_t inbytesleft = strlen (input);
34817         char *outptr = buf;
34818         size_t outbytesleft = sizeof (buf);
34819         size_t res = iconv (cd_ascii_to_88591,
34820                             (char **) &inptr, &inbytesleft,
34821                             &outptr, &outbytesleft);
34822         if (res == 0)
34823           result |= 2;
34824         iconv_close (cd_ascii_to_88591);
34825       }
34826   }
34827   /* Test against AIX 6.1..7.1 bug: Buffer overrun.  */
34828   {
34829     iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
34830     if (cd_88591_to_utf8 != (iconv_t)(-1))
34831       {
34832         static const char input[] = "\304";
34833         static char buf[2] = { (char)0xDE, (char)0xAD };
34834         const char *inptr = input;
34835         size_t inbytesleft = 1;
34836         char *outptr = buf;
34837         size_t outbytesleft = 1;
34838         size_t res = iconv (cd_88591_to_utf8,
34839                             (char **) &inptr, &inbytesleft,
34840                             &outptr, &outbytesleft);
34841         if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
34842           result |= 4;
34843         iconv_close (cd_88591_to_utf8);
34844       }
34845   }
34846 #if 0 /* This bug could be worked around by the caller.  */
34847   /* Test against HP-UX 11.11 bug: Positive return value instead of 0.  */
34848   {
34849     iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
34850     if (cd_88591_to_utf8 != (iconv_t)(-1))
34851       {
34852         static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
34853         char buf[50];
34854         const char *inptr = input;
34855         size_t inbytesleft = strlen (input);
34856         char *outptr = buf;
34857         size_t outbytesleft = sizeof (buf);
34858         size_t res = iconv (cd_88591_to_utf8,
34859                             (char **) &inptr, &inbytesleft,
34860                             &outptr, &outbytesleft);
34861         if ((int)res > 0)
34862           result |= 8;
34863         iconv_close (cd_88591_to_utf8);
34864       }
34865   }
34866 #endif
34867   /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
34868      provided.  */
34869   if (/* Try standardized names.  */
34870       iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
34871       /* Try IRIX, OSF/1 names.  */
34872       && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
34873       /* Try AIX names.  */
34874       && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
34875       /* Try HP-UX names.  */
34876       && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
34877     result |= 16;
34878   return result;
34879 }
34880 _ACEOF
34881 if ac_fn_c_try_run "$LINENO"; then :
34882   am_cv_func_iconv_works=yes
34883 else
34884   am_cv_func_iconv_works=no
34885 fi
34886 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34887   conftest.$ac_objext conftest.beam conftest.$ac_ext
34888 fi
34889
34890       LIBS="$am_save_LIBS"
34891
34892 fi
34893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
34894 $as_echo "$am_cv_func_iconv_works" >&6; }
34895     case "$am_cv_func_iconv_works" in
34896       *no) am_func_iconv=no am_cv_lib_iconv=no ;;
34897       *)   am_func_iconv=yes ;;
34898     esac
34899   else
34900     am_func_iconv=no am_cv_lib_iconv=no
34901   fi
34902   if test "$am_func_iconv" = yes; then
34903
34904 $as_echo "#define HAVE_ICONV 1" >>confdefs.h
34905
34906   fi
34907   if test "$am_cv_lib_iconv" = yes; then
34908     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
34909 $as_echo_n "checking how to link with libiconv... " >&6; }
34910     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
34911 $as_echo "$LIBICONV" >&6; }
34912   else
34913             CPPFLAGS="$am_save_CPPFLAGS"
34914     LIBICONV=
34915     LTLIBICONV=
34916   fi
34917
34918
34919
34920   if test "$am_cv_func_iconv" = yes; then
34921     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
34922 $as_echo_n "checking for iconv declaration... " >&6; }
34923     if ${am_cv_proto_iconv+:} false; then :
34924   $as_echo_n "(cached) " >&6
34925 else
34926
34927       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34928 /* end confdefs.h.  */
34929
34930 #include <stdlib.h>
34931 #include <iconv.h>
34932 extern
34933 #ifdef __cplusplus
34934 "C"
34935 #endif
34936 #if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus)
34937 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
34938 #else
34939 size_t iconv();
34940 #endif
34941
34942 int
34943 main ()
34944 {
34945
34946   ;
34947   return 0;
34948 }
34949 _ACEOF
34950 if ac_fn_c_try_compile "$LINENO"; then :
34951   am_cv_proto_iconv_arg1=""
34952 else
34953   am_cv_proto_iconv_arg1="const"
34954 fi
34955 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34956       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);"
34957 fi
34958
34959     am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
34960     { $as_echo "$as_me:${as_lineno-$LINENO}: result:
34961          $am_cv_proto_iconv" >&5
34962 $as_echo "
34963          $am_cv_proto_iconv" >&6; }
34964
34965 cat >>confdefs.h <<_ACEOF
34966 #define ICONV_CONST $am_cv_proto_iconv_arg1
34967 _ACEOF
34968
34969
34970   fi
34971
34972 for ac_header in iconv.h
34973 do :
34974   ac_fn_c_check_header_mongrel "$LINENO" "iconv.h" "ac_cv_header_iconv_h" "$ac_includes_default"
34975 if test "x$ac_cv_header_iconv_h" = xyes; then :
34976   cat >>confdefs.h <<_ACEOF
34977 #define HAVE_ICONV_H 1
34978 _ACEOF
34979
34980 fi
34981
34982 done
34983
34984 ac_fn_c_check_type "$LINENO" "iconv_t" "ac_cv_type_iconv_t" "
34985 #ifdef HAVE_ICONV_H
34986 # include <iconv.h>
34987 #endif
34988
34989 "
34990 if test "x$ac_cv_type_iconv_t" = xyes; then :
34991   :
34992 else
34993
34994 $as_echo "#define iconv_t int" >>confdefs.h
34995
34996 fi
34997
34998
34999 # Gettext.
35000
35001   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
35002 $as_echo_n "checking whether NLS is requested... " >&6; }
35003     # Check whether --enable-nls was given.
35004 if test "${enable_nls+set}" = set; then :
35005   enableval=$enable_nls; USE_NLS=$enableval
35006 else
35007   USE_NLS=yes
35008 fi
35009
35010   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
35011 $as_echo "$USE_NLS" >&6; }
35012
35013
35014
35015
35016       GETTEXT_MACRO_VERSION=0.18
35017
35018
35019
35020
35021 # Prepare PATH_SEPARATOR.
35022 # The user is always right.
35023 if test "${PATH_SEPARATOR+set}" != set; then
35024   # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
35025   # contains only /bin. Note that ksh looks also at the FPATH variable,
35026   # so we have to set that as well for the test.
35027   PATH_SEPARATOR=:
35028   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
35029     && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
35030            || PATH_SEPARATOR=';'
35031        }
35032 fi
35033
35034 # Find out how to test for executable files. Don't use a zero-byte file,
35035 # as systems may use methods other than mode bits to determine executability.
35036 cat >conf$$.file <<_ASEOF
35037 #! /bin/sh
35038 exit 0
35039 _ASEOF
35040 chmod +x conf$$.file
35041 if test -x conf$$.file >/dev/null 2>&1; then
35042   ac_executable_p="test -x"
35043 else
35044   ac_executable_p="test -f"
35045 fi
35046 rm -f conf$$.file
35047
35048 # Extract the first word of "msgfmt", so it can be a program name with args.
35049 set dummy msgfmt; ac_word=$2
35050 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35051 $as_echo_n "checking for $ac_word... " >&6; }
35052 if ${ac_cv_path_MSGFMT+:} false; then :
35053   $as_echo_n "(cached) " >&6
35054 else
35055   case "$MSGFMT" in
35056   [\\/]* | ?:[\\/]*)
35057     ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
35058     ;;
35059   *)
35060     ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
35061     for ac_dir in $PATH; do
35062       IFS="$ac_save_IFS"
35063       test -z "$ac_dir" && ac_dir=.
35064       for ac_exec_ext in '' $ac_executable_extensions; do
35065         if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
35066           echo "$as_me: trying $ac_dir/$ac_word..." >&5
35067           if $ac_dir/$ac_word --statistics /dev/null >&5 2>&1 &&
35068      (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
35069             ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext"
35070             break 2
35071           fi
35072         fi
35073       done
35074     done
35075     IFS="$ac_save_IFS"
35076   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
35077     ;;
35078 esac
35079 fi
35080 MSGFMT="$ac_cv_path_MSGFMT"
35081 if test "$MSGFMT" != ":"; then
35082   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
35083 $as_echo "$MSGFMT" >&6; }
35084 else
35085   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35086 $as_echo "no" >&6; }
35087 fi
35088
35089   # Extract the first word of "gmsgfmt", so it can be a program name with args.
35090 set dummy gmsgfmt; ac_word=$2
35091 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35092 $as_echo_n "checking for $ac_word... " >&6; }
35093 if ${ac_cv_path_GMSGFMT+:} false; then :
35094   $as_echo_n "(cached) " >&6
35095 else
35096   case $GMSGFMT in
35097   [\\/]* | ?:[\\/]*)
35098   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
35099   ;;
35100   *)
35101   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35102 for as_dir in $PATH
35103 do
35104   IFS=$as_save_IFS
35105   test -z "$as_dir" && as_dir=.
35106     for ac_exec_ext in '' $ac_executable_extensions; do
35107   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35108     ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
35109     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35110     break 2
35111   fi
35112 done
35113   done
35114 IFS=$as_save_IFS
35115
35116   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
35117   ;;
35118 esac
35119 fi
35120 GMSGFMT=$ac_cv_path_GMSGFMT
35121 if test -n "$GMSGFMT"; then
35122   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
35123 $as_echo "$GMSGFMT" >&6; }
35124 else
35125   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35126 $as_echo "no" >&6; }
35127 fi
35128
35129
35130
35131     case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
35132     '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
35133     *) MSGFMT_015=$MSGFMT ;;
35134   esac
35135
35136   case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
35137     '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
35138     *) GMSGFMT_015=$GMSGFMT ;;
35139   esac
35140
35141
35142
35143 # Prepare PATH_SEPARATOR.
35144 # The user is always right.
35145 if test "${PATH_SEPARATOR+set}" != set; then
35146   # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
35147   # contains only /bin. Note that ksh looks also at the FPATH variable,
35148   # so we have to set that as well for the test.
35149   PATH_SEPARATOR=:
35150   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
35151     && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
35152            || PATH_SEPARATOR=';'
35153        }
35154 fi
35155
35156 # Find out how to test for executable files. Don't use a zero-byte file,
35157 # as systems may use methods other than mode bits to determine executability.
35158 cat >conf$$.file <<_ASEOF
35159 #! /bin/sh
35160 exit 0
35161 _ASEOF
35162 chmod +x conf$$.file
35163 if test -x conf$$.file >/dev/null 2>&1; then
35164   ac_executable_p="test -x"
35165 else
35166   ac_executable_p="test -f"
35167 fi
35168 rm -f conf$$.file
35169
35170 # Extract the first word of "xgettext", so it can be a program name with args.
35171 set dummy xgettext; ac_word=$2
35172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35173 $as_echo_n "checking for $ac_word... " >&6; }
35174 if ${ac_cv_path_XGETTEXT+:} false; then :
35175   $as_echo_n "(cached) " >&6
35176 else
35177   case "$XGETTEXT" in
35178   [\\/]* | ?:[\\/]*)
35179     ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
35180     ;;
35181   *)
35182     ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
35183     for ac_dir in $PATH; do
35184       IFS="$ac_save_IFS"
35185       test -z "$ac_dir" && ac_dir=.
35186       for ac_exec_ext in '' $ac_executable_extensions; do
35187         if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
35188           echo "$as_me: trying $ac_dir/$ac_word..." >&5
35189           if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&5 2>&1 &&
35190      (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
35191             ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext"
35192             break 2
35193           fi
35194         fi
35195       done
35196     done
35197     IFS="$ac_save_IFS"
35198   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
35199     ;;
35200 esac
35201 fi
35202 XGETTEXT="$ac_cv_path_XGETTEXT"
35203 if test "$XGETTEXT" != ":"; then
35204   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
35205 $as_echo "$XGETTEXT" >&6; }
35206 else
35207   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35208 $as_echo "no" >&6; }
35209 fi
35210
35211     rm -f messages.po
35212
35213     case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
35214     '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
35215     *) XGETTEXT_015=$XGETTEXT ;;
35216   esac
35217
35218
35219
35220 # Prepare PATH_SEPARATOR.
35221 # The user is always right.
35222 if test "${PATH_SEPARATOR+set}" != set; then
35223   # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
35224   # contains only /bin. Note that ksh looks also at the FPATH variable,
35225   # so we have to set that as well for the test.
35226   PATH_SEPARATOR=:
35227   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
35228     && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
35229            || PATH_SEPARATOR=';'
35230        }
35231 fi
35232
35233 # Find out how to test for executable files. Don't use a zero-byte file,
35234 # as systems may use methods other than mode bits to determine executability.
35235 cat >conf$$.file <<_ASEOF
35236 #! /bin/sh
35237 exit 0
35238 _ASEOF
35239 chmod +x conf$$.file
35240 if test -x conf$$.file >/dev/null 2>&1; then
35241   ac_executable_p="test -x"
35242 else
35243   ac_executable_p="test -f"
35244 fi
35245 rm -f conf$$.file
35246
35247 # Extract the first word of "msgmerge", so it can be a program name with args.
35248 set dummy msgmerge; ac_word=$2
35249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35250 $as_echo_n "checking for $ac_word... " >&6; }
35251 if ${ac_cv_path_MSGMERGE+:} false; then :
35252   $as_echo_n "(cached) " >&6
35253 else
35254   case "$MSGMERGE" in
35255   [\\/]* | ?:[\\/]*)
35256     ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
35257     ;;
35258   *)
35259     ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
35260     for ac_dir in $PATH; do
35261       IFS="$ac_save_IFS"
35262       test -z "$ac_dir" && ac_dir=.
35263       for ac_exec_ext in '' $ac_executable_extensions; do
35264         if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
35265           echo "$as_me: trying $ac_dir/$ac_word..." >&5
35266           if $ac_dir/$ac_word --update -q /dev/null /dev/null >&5 2>&1; then
35267             ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext"
35268             break 2
35269           fi
35270         fi
35271       done
35272     done
35273     IFS="$ac_save_IFS"
35274   test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":"
35275     ;;
35276 esac
35277 fi
35278 MSGMERGE="$ac_cv_path_MSGMERGE"
35279 if test "$MSGMERGE" != ":"; then
35280   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
35281 $as_echo "$MSGMERGE" >&6; }
35282 else
35283   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35284 $as_echo "no" >&6; }
35285 fi
35286
35287
35288         test -n "$localedir" || localedir='${datadir}/locale'
35289
35290
35291     test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
35292
35293
35294   ac_config_commands="$ac_config_commands po-directories"
35295
35296
35297
35298
35299
35300
35301
35302
35303
35304
35305
35306
35307
35308
35309
35310
35311
35312
35313
35314
35315
35316
35317
35318
35319
35320
35321     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5
35322 $as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; }
35323 if ${gt_cv_func_CFPreferencesCopyAppValue+:} false; then :
35324   $as_echo_n "(cached) " >&6
35325 else
35326   gt_save_LIBS="$LIBS"
35327      LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
35328      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35329 /* end confdefs.h.  */
35330 #include <CoreFoundation/CFPreferences.h>
35331 int
35332 main ()
35333 {
35334 CFPreferencesCopyAppValue(NULL, NULL)
35335   ;
35336   return 0;
35337 }
35338 _ACEOF
35339 if ac_fn_c_try_link "$LINENO"; then :
35340   gt_cv_func_CFPreferencesCopyAppValue=yes
35341 else
35342   gt_cv_func_CFPreferencesCopyAppValue=no
35343 fi
35344 rm -f core conftest.err conftest.$ac_objext \
35345     conftest$ac_exeext conftest.$ac_ext
35346      LIBS="$gt_save_LIBS"
35347 fi
35348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5
35349 $as_echo "$gt_cv_func_CFPreferencesCopyAppValue" >&6; }
35350   if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
35351
35352 $as_echo "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h
35353
35354   fi
35355     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5
35356 $as_echo_n "checking for CFLocaleCopyCurrent... " >&6; }
35357 if ${gt_cv_func_CFLocaleCopyCurrent+:} false; then :
35358   $as_echo_n "(cached) " >&6
35359 else
35360   gt_save_LIBS="$LIBS"
35361      LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
35362      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35363 /* end confdefs.h.  */
35364 #include <CoreFoundation/CFLocale.h>
35365 int
35366 main ()
35367 {
35368 CFLocaleCopyCurrent();
35369   ;
35370   return 0;
35371 }
35372 _ACEOF
35373 if ac_fn_c_try_link "$LINENO"; then :
35374   gt_cv_func_CFLocaleCopyCurrent=yes
35375 else
35376   gt_cv_func_CFLocaleCopyCurrent=no
35377 fi
35378 rm -f core conftest.err conftest.$ac_objext \
35379     conftest$ac_exeext conftest.$ac_ext
35380      LIBS="$gt_save_LIBS"
35381 fi
35382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5
35383 $as_echo "$gt_cv_func_CFLocaleCopyCurrent" >&6; }
35384   if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
35385
35386 $as_echo "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h
35387
35388   fi
35389   INTL_MACOSX_LIBS=
35390   if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
35391     INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
35392   fi
35393
35394
35395
35396
35397
35398
35399   LIBINTL=
35400   LTLIBINTL=
35401   POSUB=
35402
35403     case " $gt_needs " in
35404     *" need-formatstring-macros "*) gt_api_version=3 ;;
35405     *" need-ngettext "*) gt_api_version=2 ;;
35406     *) gt_api_version=1 ;;
35407   esac
35408   gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
35409   gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
35410
35411     if test "$USE_NLS" = "yes"; then
35412     gt_use_preinstalled_gnugettext=no
35413
35414
35415         if test $gt_api_version -ge 3; then
35416           gt_revision_test_code='
35417 #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
35418 #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
35419 #endif
35420 typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
35421 '
35422         else
35423           gt_revision_test_code=
35424         fi
35425         if test $gt_api_version -ge 2; then
35426           gt_expression_test_code=' + * ngettext ("", "", 0)'
35427         else
35428           gt_expression_test_code=
35429         fi
35430
35431         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5
35432 $as_echo_n "checking for GNU gettext in libc... " >&6; }
35433 if eval \${$gt_func_gnugettext_libc+:} false; then :
35434   $as_echo_n "(cached) " >&6
35435 else
35436   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35437 /* end confdefs.h.  */
35438
35439 #include <libintl.h>
35440 $gt_revision_test_code
35441 extern int _nl_msg_cat_cntr;
35442 extern int *_nl_domain_bindings;
35443
35444 int
35445 main ()
35446 {
35447
35448 bindtextdomain ("", "");
35449 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings
35450
35451   ;
35452   return 0;
35453 }
35454 _ACEOF
35455 if ac_fn_c_try_link "$LINENO"; then :
35456   eval "$gt_func_gnugettext_libc=yes"
35457 else
35458   eval "$gt_func_gnugettext_libc=no"
35459 fi
35460 rm -f core conftest.err conftest.$ac_objext \
35461     conftest$ac_exeext conftest.$ac_ext
35462 fi
35463 eval ac_res=\$$gt_func_gnugettext_libc
35464                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
35465 $as_echo "$ac_res" >&6; }
35466
35467         if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
35468
35469
35470
35471
35472
35473           am_save_CPPFLAGS="$CPPFLAGS"
35474
35475   for element in $INCICONV; do
35476     haveit=
35477     for x in $CPPFLAGS; do
35478
35479   acl_save_prefix="$prefix"
35480   prefix="$acl_final_prefix"
35481   acl_save_exec_prefix="$exec_prefix"
35482   exec_prefix="$acl_final_exec_prefix"
35483   eval x=\"$x\"
35484   exec_prefix="$acl_save_exec_prefix"
35485   prefix="$acl_save_prefix"
35486
35487       if test "X$x" = "X$element"; then
35488         haveit=yes
35489         break
35490       fi
35491     done
35492     if test -z "$haveit"; then
35493       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
35494     fi
35495   done
35496
35497
35498   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
35499 $as_echo_n "checking for iconv... " >&6; }
35500 if ${am_cv_func_iconv+:} false; then :
35501   $as_echo_n "(cached) " >&6
35502 else
35503
35504     am_cv_func_iconv="no, consider installing GNU libiconv"
35505     am_cv_lib_iconv=no
35506     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35507 /* end confdefs.h.  */
35508
35509 #include <stdlib.h>
35510 #include <iconv.h>
35511
35512 int
35513 main ()
35514 {
35515 iconv_t cd = iconv_open("","");
35516            iconv(cd,NULL,NULL,NULL,NULL);
35517            iconv_close(cd);
35518   ;
35519   return 0;
35520 }
35521 _ACEOF
35522 if ac_fn_c_try_link "$LINENO"; then :
35523   am_cv_func_iconv=yes
35524 fi
35525 rm -f core conftest.err conftest.$ac_objext \
35526     conftest$ac_exeext conftest.$ac_ext
35527     if test "$am_cv_func_iconv" != yes; then
35528       am_save_LIBS="$LIBS"
35529       LIBS="$LIBS $LIBICONV"
35530       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35531 /* end confdefs.h.  */
35532
35533 #include <stdlib.h>
35534 #include <iconv.h>
35535
35536 int
35537 main ()
35538 {
35539 iconv_t cd = iconv_open("","");
35540              iconv(cd,NULL,NULL,NULL,NULL);
35541              iconv_close(cd);
35542   ;
35543   return 0;
35544 }
35545 _ACEOF
35546 if ac_fn_c_try_link "$LINENO"; then :
35547   am_cv_lib_iconv=yes
35548         am_cv_func_iconv=yes
35549 fi
35550 rm -f core conftest.err conftest.$ac_objext \
35551     conftest$ac_exeext conftest.$ac_ext
35552       LIBS="$am_save_LIBS"
35553     fi
35554
35555 fi
35556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
35557 $as_echo "$am_cv_func_iconv" >&6; }
35558   if test "$am_cv_func_iconv" = yes; then
35559     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
35560 $as_echo_n "checking for working iconv... " >&6; }
35561 if ${am_cv_func_iconv_works+:} false; then :
35562   $as_echo_n "(cached) " >&6
35563 else
35564
35565                   am_save_LIBS="$LIBS"
35566       if test $am_cv_lib_iconv = yes; then
35567         LIBS="$LIBS $LIBICONV"
35568       fi
35569       if test "$cross_compiling" = yes; then :
35570
35571          case "$host_os" in
35572            aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
35573            *)            am_cv_func_iconv_works="guessing yes" ;;
35574          esac
35575
35576 else
35577   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35578 /* end confdefs.h.  */
35579
35580 #include <iconv.h>
35581 #include <string.h>
35582 int main ()
35583 {
35584   int result = 0;
35585   /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
35586      returns.  */
35587   {
35588     iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
35589     if (cd_utf8_to_88591 != (iconv_t)(-1))
35590       {
35591         static const char input[] = "\342\202\254"; /* EURO SIGN */
35592         char buf[10];
35593         const char *inptr = input;
35594         size_t inbytesleft = strlen (input);
35595         char *outptr = buf;
35596         size_t outbytesleft = sizeof (buf);
35597         size_t res = iconv (cd_utf8_to_88591,
35598                             (char **) &inptr, &inbytesleft,
35599                             &outptr, &outbytesleft);
35600         if (res == 0)
35601           result |= 1;
35602         iconv_close (cd_utf8_to_88591);
35603       }
35604   }
35605   /* Test against Solaris 10 bug: Failures are not distinguishable from
35606      successful returns.  */
35607   {
35608     iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
35609     if (cd_ascii_to_88591 != (iconv_t)(-1))
35610       {
35611         static const char input[] = "\263";
35612         char buf[10];
35613         const char *inptr = input;
35614         size_t inbytesleft = strlen (input);
35615         char *outptr = buf;
35616         size_t outbytesleft = sizeof (buf);
35617         size_t res = iconv (cd_ascii_to_88591,
35618                             (char **) &inptr, &inbytesleft,
35619                             &outptr, &outbytesleft);
35620         if (res == 0)
35621           result |= 2;
35622         iconv_close (cd_ascii_to_88591);
35623       }
35624   }
35625   /* Test against AIX 6.1..7.1 bug: Buffer overrun.  */
35626   {
35627     iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
35628     if (cd_88591_to_utf8 != (iconv_t)(-1))
35629       {
35630         static const char input[] = "\304";
35631         static char buf[2] = { (char)0xDE, (char)0xAD };
35632         const char *inptr = input;
35633         size_t inbytesleft = 1;
35634         char *outptr = buf;
35635         size_t outbytesleft = 1;
35636         size_t res = iconv (cd_88591_to_utf8,
35637                             (char **) &inptr, &inbytesleft,
35638                             &outptr, &outbytesleft);
35639         if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
35640           result |= 4;
35641         iconv_close (cd_88591_to_utf8);
35642       }
35643   }
35644 #if 0 /* This bug could be worked around by the caller.  */
35645   /* Test against HP-UX 11.11 bug: Positive return value instead of 0.  */
35646   {
35647     iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
35648     if (cd_88591_to_utf8 != (iconv_t)(-1))
35649       {
35650         static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
35651         char buf[50];
35652         const char *inptr = input;
35653         size_t inbytesleft = strlen (input);
35654         char *outptr = buf;
35655         size_t outbytesleft = sizeof (buf);
35656         size_t res = iconv (cd_88591_to_utf8,
35657                             (char **) &inptr, &inbytesleft,
35658                             &outptr, &outbytesleft);
35659         if ((int)res > 0)
35660           result |= 8;
35661         iconv_close (cd_88591_to_utf8);
35662       }
35663   }
35664 #endif
35665   /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
35666      provided.  */
35667   if (/* Try standardized names.  */
35668       iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
35669       /* Try IRIX, OSF/1 names.  */
35670       && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
35671       /* Try AIX names.  */
35672       && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
35673       /* Try HP-UX names.  */
35674       && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
35675     result |= 16;
35676   return result;
35677 }
35678 _ACEOF
35679 if ac_fn_c_try_run "$LINENO"; then :
35680   am_cv_func_iconv_works=yes
35681 else
35682   am_cv_func_iconv_works=no
35683 fi
35684 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35685   conftest.$ac_objext conftest.beam conftest.$ac_ext
35686 fi
35687
35688       LIBS="$am_save_LIBS"
35689
35690 fi
35691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
35692 $as_echo "$am_cv_func_iconv_works" >&6; }
35693     case "$am_cv_func_iconv_works" in
35694       *no) am_func_iconv=no am_cv_lib_iconv=no ;;
35695       *)   am_func_iconv=yes ;;
35696     esac
35697   else
35698     am_func_iconv=no am_cv_lib_iconv=no
35699   fi
35700   if test "$am_func_iconv" = yes; then
35701
35702 $as_echo "#define HAVE_ICONV 1" >>confdefs.h
35703
35704   fi
35705   if test "$am_cv_lib_iconv" = yes; then
35706     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
35707 $as_echo_n "checking how to link with libiconv... " >&6; }
35708     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
35709 $as_echo "$LIBICONV" >&6; }
35710   else
35711             CPPFLAGS="$am_save_CPPFLAGS"
35712     LIBICONV=
35713     LTLIBICONV=
35714   fi
35715
35716
35717
35718
35719
35720
35721
35722
35723
35724
35725
35726     use_additional=yes
35727
35728   acl_save_prefix="$prefix"
35729   prefix="$acl_final_prefix"
35730   acl_save_exec_prefix="$exec_prefix"
35731   exec_prefix="$acl_final_exec_prefix"
35732
35733     eval additional_includedir=\"$includedir\"
35734     eval additional_libdir=\"$libdir\"
35735
35736   exec_prefix="$acl_save_exec_prefix"
35737   prefix="$acl_save_prefix"
35738
35739
35740 # Check whether --with-libintl-prefix was given.
35741 if test "${with_libintl_prefix+set}" = set; then :
35742   withval=$with_libintl_prefix;
35743     if test "X$withval" = "Xno"; then
35744       use_additional=no
35745     else
35746       if test "X$withval" = "X"; then
35747
35748   acl_save_prefix="$prefix"
35749   prefix="$acl_final_prefix"
35750   acl_save_exec_prefix="$exec_prefix"
35751   exec_prefix="$acl_final_exec_prefix"
35752
35753           eval additional_includedir=\"$includedir\"
35754           eval additional_libdir=\"$libdir\"
35755
35756   exec_prefix="$acl_save_exec_prefix"
35757   prefix="$acl_save_prefix"
35758
35759       else
35760         additional_includedir="$withval/include"
35761         additional_libdir="$withval/$acl_libdirstem"
35762         if test "$acl_libdirstem2" != "$acl_libdirstem" \
35763            && ! test -d "$withval/$acl_libdirstem"; then
35764           additional_libdir="$withval/$acl_libdirstem2"
35765         fi
35766       fi
35767     fi
35768
35769 fi
35770
35771       LIBINTL=
35772   LTLIBINTL=
35773   INCINTL=
35774   LIBINTL_PREFIX=
35775       HAVE_LIBINTL=
35776   rpathdirs=
35777   ltrpathdirs=
35778   names_already_handled=
35779   names_next_round='intl '
35780   while test -n "$names_next_round"; do
35781     names_this_round="$names_next_round"
35782     names_next_round=
35783     for name in $names_this_round; do
35784       already_handled=
35785       for n in $names_already_handled; do
35786         if test "$n" = "$name"; then
35787           already_handled=yes
35788           break
35789         fi
35790       done
35791       if test -z "$already_handled"; then
35792         names_already_handled="$names_already_handled $name"
35793                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
35794         eval value=\"\$HAVE_LIB$uppername\"
35795         if test -n "$value"; then
35796           if test "$value" = yes; then
35797             eval value=\"\$LIB$uppername\"
35798             test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value"
35799             eval value=\"\$LTLIB$uppername\"
35800             test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value"
35801           else
35802                                     :
35803           fi
35804         else
35805                               found_dir=
35806           found_la=
35807           found_so=
35808           found_a=
35809           eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
35810           if test -n "$acl_shlibext"; then
35811             shrext=".$acl_shlibext"             # typically: shrext=.so
35812           else
35813             shrext=
35814           fi
35815           if test $use_additional = yes; then
35816             dir="$additional_libdir"
35817                                     if test -n "$acl_shlibext"; then
35818               if test -f "$dir/$libname$shrext"; then
35819                 found_dir="$dir"
35820                 found_so="$dir/$libname$shrext"
35821               else
35822                 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
35823                   ver=`(cd "$dir" && \
35824                         for f in "$libname$shrext".*; do echo "$f"; done \
35825                         | sed -e "s,^$libname$shrext\\\\.,," \
35826                         | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
35827                         | sed 1q ) 2>/dev/null`
35828                   if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
35829                     found_dir="$dir"
35830                     found_so="$dir/$libname$shrext.$ver"
35831                   fi
35832                 else
35833                   eval library_names=\"$acl_library_names_spec\"
35834                   for f in $library_names; do
35835                     if test -f "$dir/$f"; then
35836                       found_dir="$dir"
35837                       found_so="$dir/$f"
35838                       break
35839                     fi
35840                   done
35841                 fi
35842               fi
35843             fi
35844                         if test "X$found_dir" = "X"; then
35845               if test -f "$dir/$libname.$acl_libext"; then
35846                 found_dir="$dir"
35847                 found_a="$dir/$libname.$acl_libext"
35848               fi
35849             fi
35850             if test "X$found_dir" != "X"; then
35851               if test -f "$dir/$libname.la"; then
35852                 found_la="$dir/$libname.la"
35853               fi
35854             fi
35855           fi
35856           if test "X$found_dir" = "X"; then
35857             for x in $LDFLAGS $LTLIBINTL; do
35858
35859   acl_save_prefix="$prefix"
35860   prefix="$acl_final_prefix"
35861   acl_save_exec_prefix="$exec_prefix"
35862   exec_prefix="$acl_final_exec_prefix"
35863   eval x=\"$x\"
35864   exec_prefix="$acl_save_exec_prefix"
35865   prefix="$acl_save_prefix"
35866
35867               case "$x" in
35868                 -L*)
35869                   dir=`echo "X$x" | sed -e 's/^X-L//'`
35870                                     if test -n "$acl_shlibext"; then
35871                     if test -f "$dir/$libname$shrext"; then
35872                       found_dir="$dir"
35873                       found_so="$dir/$libname$shrext"
35874                     else
35875                       if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
35876                         ver=`(cd "$dir" && \
35877                               for f in "$libname$shrext".*; do echo "$f"; done \
35878                               | sed -e "s,^$libname$shrext\\\\.,," \
35879                               | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
35880                               | sed 1q ) 2>/dev/null`
35881                         if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
35882                           found_dir="$dir"
35883                           found_so="$dir/$libname$shrext.$ver"
35884                         fi
35885                       else
35886                         eval library_names=\"$acl_library_names_spec\"
35887                         for f in $library_names; do
35888                           if test -f "$dir/$f"; then
35889                             found_dir="$dir"
35890                             found_so="$dir/$f"
35891                             break
35892                           fi
35893                         done
35894                       fi
35895                     fi
35896                   fi
35897                                     if test "X$found_dir" = "X"; then
35898                     if test -f "$dir/$libname.$acl_libext"; then
35899                       found_dir="$dir"
35900                       found_a="$dir/$libname.$acl_libext"
35901                     fi
35902                   fi
35903                   if test "X$found_dir" != "X"; then
35904                     if test -f "$dir/$libname.la"; then
35905                       found_la="$dir/$libname.la"
35906                     fi
35907                   fi
35908                   ;;
35909               esac
35910               if test "X$found_dir" != "X"; then
35911                 break
35912               fi
35913             done
35914           fi
35915           if test "X$found_dir" != "X"; then
35916                         LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name"
35917             if test "X$found_so" != "X"; then
35918                                                         if test "$enable_rpath" = no \
35919                  || test "X$found_dir" = "X/usr/$acl_libdirstem" \
35920                  || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
35921                                 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
35922               else
35923                                                                                 haveit=
35924                 for x in $ltrpathdirs; do
35925                   if test "X$x" = "X$found_dir"; then
35926                     haveit=yes
35927                     break
35928                   fi
35929                 done
35930                 if test -z "$haveit"; then
35931                   ltrpathdirs="$ltrpathdirs $found_dir"
35932                 fi
35933                                 if test "$acl_hardcode_direct" = yes; then
35934                                                       LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
35935                 else
35936                   if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
35937                                                             LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
35938                                                             haveit=
35939                     for x in $rpathdirs; do
35940                       if test "X$x" = "X$found_dir"; then
35941                         haveit=yes
35942                         break
35943                       fi
35944                     done
35945                     if test -z "$haveit"; then
35946                       rpathdirs="$rpathdirs $found_dir"
35947                     fi
35948                   else
35949                                                                                 haveit=
35950                     for x in $LDFLAGS $LIBINTL; do
35951
35952   acl_save_prefix="$prefix"
35953   prefix="$acl_final_prefix"
35954   acl_save_exec_prefix="$exec_prefix"
35955   exec_prefix="$acl_final_exec_prefix"
35956   eval x=\"$x\"
35957   exec_prefix="$acl_save_exec_prefix"
35958   prefix="$acl_save_prefix"
35959
35960                       if test "X$x" = "X-L$found_dir"; then
35961                         haveit=yes
35962                         break
35963                       fi
35964                     done
35965                     if test -z "$haveit"; then
35966                       LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir"
35967                     fi
35968                     if test "$acl_hardcode_minus_L" != no; then
35969                                                                                         LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
35970                     else
35971                                                                                                                                                                                 LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
35972                     fi
35973                   fi
35974                 fi
35975               fi
35976             else
35977               if test "X$found_a" != "X"; then
35978                                 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a"
35979               else
35980                                                 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name"
35981               fi
35982             fi
35983                         additional_includedir=
35984             case "$found_dir" in
35985               */$acl_libdirstem | */$acl_libdirstem/)
35986                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
35987                 if test "$name" = 'intl'; then
35988                   LIBINTL_PREFIX="$basedir"
35989                 fi
35990                 additional_includedir="$basedir/include"
35991                 ;;
35992               */$acl_libdirstem2 | */$acl_libdirstem2/)
35993                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
35994                 if test "$name" = 'intl'; then
35995                   LIBINTL_PREFIX="$basedir"
35996                 fi
35997                 additional_includedir="$basedir/include"
35998                 ;;
35999             esac
36000             if test "X$additional_includedir" != "X"; then
36001                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
36002                 haveit=
36003                 if test "X$additional_includedir" = "X/usr/local/include"; then
36004                   if test -n "$GCC"; then
36005                     case $host_os in
36006                       linux* | gnu* | k*bsd*-gnu) haveit=yes;;
36007                     esac
36008                   fi
36009                 fi
36010                 if test -z "$haveit"; then
36011                   for x in $CPPFLAGS $INCINTL; do
36012
36013   acl_save_prefix="$prefix"
36014   prefix="$acl_final_prefix"
36015   acl_save_exec_prefix="$exec_prefix"
36016   exec_prefix="$acl_final_exec_prefix"
36017   eval x=\"$x\"
36018   exec_prefix="$acl_save_exec_prefix"
36019   prefix="$acl_save_prefix"
36020
36021                     if test "X$x" = "X-I$additional_includedir"; then
36022                       haveit=yes
36023                       break
36024                     fi
36025                   done
36026                   if test -z "$haveit"; then
36027                     if test -d "$additional_includedir"; then
36028                                             INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir"
36029                     fi
36030                   fi
36031                 fi
36032               fi
36033             fi
36034                         if test -n "$found_la"; then
36035                                                         save_libdir="$libdir"
36036               case "$found_la" in
36037                 */* | *\\*) . "$found_la" ;;
36038                 *) . "./$found_la" ;;
36039               esac
36040               libdir="$save_libdir"
36041                             for dep in $dependency_libs; do
36042                 case "$dep" in
36043                   -L*)
36044                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
36045                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
36046                        && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
36047                       haveit=
36048                       if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
36049                          || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
36050                         if test -n "$GCC"; then
36051                           case $host_os in
36052                             linux* | gnu* | k*bsd*-gnu) haveit=yes;;
36053                           esac
36054                         fi
36055                       fi
36056                       if test -z "$haveit"; then
36057                         haveit=
36058                         for x in $LDFLAGS $LIBINTL; do
36059
36060   acl_save_prefix="$prefix"
36061   prefix="$acl_final_prefix"
36062   acl_save_exec_prefix="$exec_prefix"
36063   exec_prefix="$acl_final_exec_prefix"
36064   eval x=\"$x\"
36065   exec_prefix="$acl_save_exec_prefix"
36066   prefix="$acl_save_prefix"
36067
36068                           if test "X$x" = "X-L$additional_libdir"; then
36069                             haveit=yes
36070                             break
36071                           fi
36072                         done
36073                         if test -z "$haveit"; then
36074                           if test -d "$additional_libdir"; then
36075                                                         LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir"
36076                           fi
36077                         fi
36078                         haveit=
36079                         for x in $LDFLAGS $LTLIBINTL; do
36080
36081   acl_save_prefix="$prefix"
36082   prefix="$acl_final_prefix"
36083   acl_save_exec_prefix="$exec_prefix"
36084   exec_prefix="$acl_final_exec_prefix"
36085   eval x=\"$x\"
36086   exec_prefix="$acl_save_exec_prefix"
36087   prefix="$acl_save_prefix"
36088
36089                           if test "X$x" = "X-L$additional_libdir"; then
36090                             haveit=yes
36091                             break
36092                           fi
36093                         done
36094                         if test -z "$haveit"; then
36095                           if test -d "$additional_libdir"; then
36096                                                         LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir"
36097                           fi
36098                         fi
36099                       fi
36100                     fi
36101                     ;;
36102                   -R*)
36103                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
36104                     if test "$enable_rpath" != no; then
36105                                                                   haveit=
36106                       for x in $rpathdirs; do
36107                         if test "X$x" = "X$dir"; then
36108                           haveit=yes
36109                           break
36110                         fi
36111                       done
36112                       if test -z "$haveit"; then
36113                         rpathdirs="$rpathdirs $dir"
36114                       fi
36115                                                                   haveit=
36116                       for x in $ltrpathdirs; do
36117                         if test "X$x" = "X$dir"; then
36118                           haveit=yes
36119                           break
36120                         fi
36121                       done
36122                       if test -z "$haveit"; then
36123                         ltrpathdirs="$ltrpathdirs $dir"
36124                       fi
36125                     fi
36126                     ;;
36127                   -l*)
36128                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
36129                     ;;
36130                   *.la)
36131                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
36132                     ;;
36133                   *)
36134                                         LIBINTL="${LIBINTL}${LIBINTL:+ }$dep"
36135                     LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep"
36136                     ;;
36137                 esac
36138               done
36139             fi
36140           else
36141                                                             LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
36142             LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name"
36143           fi
36144         fi
36145       fi
36146     done
36147   done
36148   if test "X$rpathdirs" != "X"; then
36149     if test -n "$acl_hardcode_libdir_separator"; then
36150                         alldirs=
36151       for found_dir in $rpathdirs; do
36152         alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
36153       done
36154             acl_save_libdir="$libdir"
36155       libdir="$alldirs"
36156       eval flag=\"$acl_hardcode_libdir_flag_spec\"
36157       libdir="$acl_save_libdir"
36158       LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
36159     else
36160             for found_dir in $rpathdirs; do
36161         acl_save_libdir="$libdir"
36162         libdir="$found_dir"
36163         eval flag=\"$acl_hardcode_libdir_flag_spec\"
36164         libdir="$acl_save_libdir"
36165         LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
36166       done
36167     fi
36168   fi
36169   if test "X$ltrpathdirs" != "X"; then
36170             for found_dir in $ltrpathdirs; do
36171       LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir"
36172     done
36173   fi
36174
36175
36176
36177
36178
36179
36180           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5
36181 $as_echo_n "checking for GNU gettext in libintl... " >&6; }
36182 if eval \${$gt_func_gnugettext_libintl+:} false; then :
36183   $as_echo_n "(cached) " >&6
36184 else
36185   gt_save_CPPFLAGS="$CPPFLAGS"
36186             CPPFLAGS="$CPPFLAGS $INCINTL"
36187             gt_save_LIBS="$LIBS"
36188             LIBS="$LIBS $LIBINTL"
36189                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36190 /* end confdefs.h.  */
36191
36192 #include <libintl.h>
36193 $gt_revision_test_code
36194 extern int _nl_msg_cat_cntr;
36195 extern
36196 #ifdef __cplusplus
36197 "C"
36198 #endif
36199 const char *_nl_expand_alias (const char *);
36200
36201 int
36202 main ()
36203 {
36204
36205 bindtextdomain ("", "");
36206 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
36207
36208   ;
36209   return 0;
36210 }
36211 _ACEOF
36212 if ac_fn_c_try_link "$LINENO"; then :
36213   eval "$gt_func_gnugettext_libintl=yes"
36214 else
36215   eval "$gt_func_gnugettext_libintl=no"
36216 fi
36217 rm -f core conftest.err conftest.$ac_objext \
36218     conftest$ac_exeext conftest.$ac_ext
36219                         if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
36220               LIBS="$LIBS $LIBICONV"
36221               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36222 /* end confdefs.h.  */
36223
36224 #include <libintl.h>
36225 $gt_revision_test_code
36226 extern int _nl_msg_cat_cntr;
36227 extern
36228 #ifdef __cplusplus
36229 "C"
36230 #endif
36231 const char *_nl_expand_alias (const char *);
36232
36233 int
36234 main ()
36235 {
36236
36237 bindtextdomain ("", "");
36238 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
36239
36240   ;
36241   return 0;
36242 }
36243 _ACEOF
36244 if ac_fn_c_try_link "$LINENO"; then :
36245   LIBINTL="$LIBINTL $LIBICONV"
36246                  LTLIBINTL="$LTLIBINTL $LTLIBICONV"
36247                  eval "$gt_func_gnugettext_libintl=yes"
36248
36249 fi
36250 rm -f core conftest.err conftest.$ac_objext \
36251     conftest$ac_exeext conftest.$ac_ext
36252             fi
36253             CPPFLAGS="$gt_save_CPPFLAGS"
36254             LIBS="$gt_save_LIBS"
36255 fi
36256 eval ac_res=\$$gt_func_gnugettext_libintl
36257                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
36258 $as_echo "$ac_res" >&6; }
36259         fi
36260
36261                                         if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
36262            || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
36263                 && test "$PACKAGE" != gettext-runtime \
36264                 && test "$PACKAGE" != gettext-tools; }; then
36265           gt_use_preinstalled_gnugettext=yes
36266         else
36267                     LIBINTL=
36268           LTLIBINTL=
36269           INCINTL=
36270         fi
36271
36272
36273
36274     if test -n "$INTL_MACOSX_LIBS"; then
36275       if test "$gt_use_preinstalled_gnugettext" = "yes" \
36276          || test "$nls_cv_use_gnu_gettext" = "yes"; then
36277                 LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
36278         LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
36279       fi
36280     fi
36281
36282     if test "$gt_use_preinstalled_gnugettext" = "yes" \
36283        || test "$nls_cv_use_gnu_gettext" = "yes"; then
36284
36285 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
36286
36287     else
36288       USE_NLS=no
36289     fi
36290   fi
36291
36292   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5
36293 $as_echo_n "checking whether to use NLS... " >&6; }
36294   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
36295 $as_echo "$USE_NLS" >&6; }
36296   if test "$USE_NLS" = "yes"; then
36297     { $as_echo "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5
36298 $as_echo_n "checking where the gettext function comes from... " >&6; }
36299     if test "$gt_use_preinstalled_gnugettext" = "yes"; then
36300       if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
36301         gt_source="external libintl"
36302       else
36303         gt_source="libc"
36304       fi
36305     else
36306       gt_source="included intl directory"
36307     fi
36308     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5
36309 $as_echo "$gt_source" >&6; }
36310   fi
36311
36312   if test "$USE_NLS" = "yes"; then
36313
36314     if test "$gt_use_preinstalled_gnugettext" = "yes"; then
36315       if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
36316         { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5
36317 $as_echo_n "checking how to link with libintl... " >&6; }
36318         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5
36319 $as_echo "$LIBINTL" >&6; }
36320
36321   for element in $INCINTL; do
36322     haveit=
36323     for x in $CPPFLAGS; do
36324
36325   acl_save_prefix="$prefix"
36326   prefix="$acl_final_prefix"
36327   acl_save_exec_prefix="$exec_prefix"
36328   exec_prefix="$acl_final_exec_prefix"
36329   eval x=\"$x\"
36330   exec_prefix="$acl_save_exec_prefix"
36331   prefix="$acl_save_prefix"
36332
36333       if test "X$x" = "X$element"; then
36334         haveit=yes
36335         break
36336       fi
36337     done
36338     if test -z "$haveit"; then
36339       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
36340     fi
36341   done
36342
36343       fi
36344
36345
36346 $as_echo "#define HAVE_GETTEXT 1" >>confdefs.h
36347
36348
36349 $as_echo "#define HAVE_DCGETTEXT 1" >>confdefs.h
36350
36351     fi
36352
36353         POSUB=po
36354   fi
36355
36356
36357
36358     INTLLIBS="$LIBINTL"
36359
36360
36361
36362
36363
36364
36365
36366
36367 # Initialize the test suite.
36368 ac_config_commands="$ac_config_commands tests/atconfig"
36369
36370 ac_config_files="$ac_config_files tests/Makefile tests/atlocal"
36371  # FIXME: tests/preset?
36372
36373 AUTOM4TE=${AUTOM4TE-"${am_missing_run}autom4te"}
36374
36375
36376
36377
36378 # Check whether --enable-backup-scripts was given.
36379 if test "${enable_backup_scripts+set}" = set; then :
36380   enableval=$enable_backup_scripts; case $enableval in
36381                yes) BACKUP_LIBEXEC_SCRIPTS='$(BACKUP_LIBEXEC_SCRIPTS_LIST)'
36382                     BACKUP_SBIN_SCRIPTS='$(BACKUP_SBIN_SCRIPTS_LIST)'
36383                     ;;
36384                esac
36385 fi
36386
36387
36388
36389 if date +%Y-%m-%d 2>/dev/null >&2; then
36390         BACKUP_SED_COND='/^\#ELSE_DATE_FORMAT_OK/,/^\#ENDIF_DATE_FORMAT_OK/d;/^\#IF_DATE_FORMAT_OK/d'
36391 else
36392         BACKUP_SED_COND='/^\#IF_DATE_FORMAT_OK/,/^\#ELSE_DATE_FORMAT_OK/d;/^\#ENDIF_DATE_FORMAT_OK/d'
36393 fi
36394
36395 ac_config_files="$ac_config_files Makefile doc/Makefile gnu/Makefile lib/Makefile po/Makefile.in scripts/Makefile rmt/Makefile src/Makefile"
36396
36397 cat >confcache <<\_ACEOF
36398 # This file is a shell script that caches the results of configure
36399 # tests run on this system so they can be shared between configure
36400 # scripts and configure runs, see configure's option --config-cache.
36401 # It is not useful on other systems.  If it contains results you don't
36402 # want to keep, you may remove or edit it.
36403 #
36404 # config.status only pays attention to the cache file if you give it
36405 # the --recheck option to rerun configure.
36406 #
36407 # `ac_cv_env_foo' variables (set or unset) will be overridden when
36408 # loading this file, other *unset* `ac_cv_foo' will be assigned the
36409 # following values.
36410
36411 _ACEOF
36412
36413 # The following way of writing the cache mishandles newlines in values,
36414 # but we know of no workaround that is simple, portable, and efficient.
36415 # So, we kill variables containing newlines.
36416 # Ultrix sh set writes to stderr and can't be redirected directly,
36417 # and sets the high bit in the cache file unless we assign to the vars.
36418 (
36419   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
36420     eval ac_val=\$$ac_var
36421     case $ac_val in #(
36422     *${as_nl}*)
36423       case $ac_var in #(
36424       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
36425 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
36426       esac
36427       case $ac_var in #(
36428       _ | IFS | as_nl) ;; #(
36429       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
36430       *) { eval $ac_var=; unset $ac_var;} ;;
36431       esac ;;
36432     esac
36433   done
36434
36435   (set) 2>&1 |
36436     case $as_nl`(ac_space=' '; set) 2>&1` in #(
36437     *${as_nl}ac_space=\ *)
36438       # `set' does not quote correctly, so add quotes: double-quote
36439       # substitution turns \\\\ into \\, and sed turns \\ into \.
36440       sed -n \
36441         "s/'/'\\\\''/g;
36442           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
36443       ;; #(
36444     *)
36445       # `set' quotes correctly as required by POSIX, so do not add quotes.
36446       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
36447       ;;
36448     esac |
36449     sort
36450 ) |
36451   sed '
36452      /^ac_cv_env_/b end
36453      t clear
36454      :clear
36455      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
36456      t end
36457      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
36458      :end' >>confcache
36459 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
36460   if test -w "$cache_file"; then
36461     if test "x$cache_file" != "x/dev/null"; then
36462       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
36463 $as_echo "$as_me: updating cache $cache_file" >&6;}
36464       if test ! -f "$cache_file" || test -h "$cache_file"; then
36465         cat confcache >"$cache_file"
36466       else
36467         case $cache_file in #(
36468         */* | ?:*)
36469           mv -f confcache "$cache_file"$$ &&
36470           mv -f "$cache_file"$$ "$cache_file" ;; #(
36471         *)
36472           mv -f confcache "$cache_file" ;;
36473         esac
36474       fi
36475     fi
36476   else
36477     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
36478 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
36479   fi
36480 fi
36481 rm -f confcache
36482
36483 test "x$prefix" = xNONE && prefix=$ac_default_prefix
36484 # Let make expand exec_prefix.
36485 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
36486
36487 DEFS=-DHAVE_CONFIG_H
36488
36489 ac_libobjs=
36490 ac_ltlibobjs=
36491 U=
36492 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
36493   # 1. Remove the extension, and $U if already installed.
36494   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
36495   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
36496   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
36497   #    will be set to the directory where LIBOBJS objects are built.
36498   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
36499   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
36500 done
36501 LIBOBJS=$ac_libobjs
36502
36503 LTLIBOBJS=$ac_ltlibobjs
36504
36505
36506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
36507 $as_echo_n "checking that generated files are newer than configure... " >&6; }
36508    if test -n "$am_sleep_pid"; then
36509      # Hide warnings about reused PIDs.
36510      wait $am_sleep_pid 2>/dev/null
36511    fi
36512    { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
36513 $as_echo "done" >&6; }
36514  if test -n "$EXEEXT"; then
36515   am__EXEEXT_TRUE=
36516   am__EXEEXT_FALSE='#'
36517 else
36518   am__EXEEXT_TRUE='#'
36519   am__EXEEXT_FALSE=
36520 fi
36521
36522 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
36523   as_fn_error $? "conditional \"AMDEP\" was never defined.
36524 Usually this means the macro was only invoked conditionally." "$LINENO" 5
36525 fi
36526 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
36527   as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
36528 Usually this means the macro was only invoked conditionally." "$LINENO" 5
36529 fi
36530 if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
36531   as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined.
36532 Usually this means the macro was only invoked conditionally." "$LINENO" 5
36533 fi
36534 if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
36535   as_fn_error $? "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
36536 Usually this means the macro was only invoked conditionally." "$LINENO" 5
36537 fi
36538 if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
36539   as_fn_error $? "conditional \"GL_GENERATE_ERRNO_H\" was never defined.
36540 Usually this means the macro was only invoked conditionally." "$LINENO" 5
36541 fi
36542 if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then
36543   as_fn_error $? "conditional \"GL_GENERATE_FLOAT_H\" was never defined.
36544 Usually this means the macro was only invoked conditionally." "$LINENO" 5
36545 fi
36546 if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then
36547   as_fn_error $? "conditional \"GL_GENERATE_FNMATCH_H\" was never defined.
36548 Usually this means the macro was only invoked conditionally." "$LINENO" 5
36549 fi
36550 if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
36551   as_fn_error $? "conditional \"GL_GENERATE_STDINT_H\" was never defined.
36552 Usually this means the macro was only invoked conditionally." "$LINENO" 5
36553 fi
36554 if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
36555   as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
36556 Usually this means the macro was only invoked conditionally." "$LINENO" 5
36557 fi
36558 if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
36559   as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
36560 Usually this means the macro was only invoked conditionally." "$LINENO" 5
36561 fi
36562 if test -z "${GL_GENERATE_SELINUX_CONTEXT_H_TRUE}" && test -z "${GL_GENERATE_SELINUX_CONTEXT_H_FALSE}"; then
36563   as_fn_error $? "conditional \"GL_GENERATE_SELINUX_CONTEXT_H\" was never defined.
36564 Usually this means the macro was only invoked conditionally." "$LINENO" 5
36565 fi
36566 if test -z "${GL_GENERATE_STDALIGN_H_TRUE}" && test -z "${GL_GENERATE_STDALIGN_H_FALSE}"; then
36567   as_fn_error $? "conditional \"GL_GENERATE_STDALIGN_H\" was never defined.
36568 Usually this means the macro was only invoked conditionally." "$LINENO" 5
36569 fi
36570 if test -z "${GL_GENERATE_STDARG_H_TRUE}" && test -z "${GL_GENERATE_STDARG_H_FALSE}"; then
36571   as_fn_error $? "conditional \"GL_GENERATE_STDARG_H\" was never defined.
36572 Usually this means the macro was only invoked conditionally." "$LINENO" 5
36573 fi
36574 if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
36575   as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
36576 Usually this means the macro was only invoked conditionally." "$LINENO" 5
36577 fi
36578 if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
36579   as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
36580 Usually this means the macro was only invoked conditionally." "$LINENO" 5
36581 fi
36582 if test -z "${GL_GENERATE_SYSEXITS_H_TRUE}" && test -z "${GL_GENERATE_SYSEXITS_H_FALSE}"; then
36583   as_fn_error $? "conditional \"GL_GENERATE_SYSEXITS_H\" was never defined.
36584 Usually this means the macro was only invoked conditionally." "$LINENO" 5
36585 fi
36586 if test -z "${LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE}"; then
36587   as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH\" was never defined.
36588 Usually this means the macro was only invoked conditionally." "$LINENO" 5
36589 fi
36590
36591
36592     gl_libobjs=
36593     gl_ltlibobjs=
36594     if test -n "$gl_LIBOBJS"; then
36595       # Remove the extension.
36596       sed_drop_objext='s/\.o$//;s/\.obj$//'
36597       for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
36598         gl_libobjs="$gl_libobjs $i.$ac_objext"
36599         gl_ltlibobjs="$gl_ltlibobjs $i.lo"
36600       done
36601     fi
36602     gl_LIBOBJS=$gl_libobjs
36603
36604     gl_LTLIBOBJS=$gl_ltlibobjs
36605
36606
36607
36608     gltests_libobjs=
36609     gltests_ltlibobjs=
36610     if test -n "$gltests_LIBOBJS"; then
36611       # Remove the extension.
36612       sed_drop_objext='s/\.o$//;s/\.obj$//'
36613       for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
36614         gltests_libobjs="$gltests_libobjs $i.$ac_objext"
36615         gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
36616       done
36617     fi
36618     gltests_LIBOBJS=$gltests_libobjs
36619
36620     gltests_LTLIBOBJS=$gltests_ltlibobjs
36621
36622
36623 if test -z "${TAR_COND_XATTR_H_TRUE}" && test -z "${TAR_COND_XATTR_H_FALSE}"; then
36624   as_fn_error $? "conditional \"TAR_COND_XATTR_H\" was never defined.
36625 Usually this means the macro was only invoked conditionally." "$LINENO" 5
36626 fi
36627
36628 : "${CONFIG_STATUS=./config.status}"
36629 ac_write_fail=0
36630 ac_clean_files_save=$ac_clean_files
36631 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
36632 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
36633 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
36634 as_write_fail=0
36635 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
36636 #! $SHELL
36637 # Generated by $as_me.
36638 # Run this file to recreate the current configuration.
36639 # Compiler output produced by configure, useful for debugging
36640 # configure, is in config.log if it exists.
36641
36642 debug=false
36643 ac_cs_recheck=false
36644 ac_cs_silent=false
36645
36646 SHELL=\${CONFIG_SHELL-$SHELL}
36647 export SHELL
36648 _ASEOF
36649 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
36650 ## -------------------- ##
36651 ## M4sh Initialization. ##
36652 ## -------------------- ##
36653
36654 # Be more Bourne compatible
36655 DUALCASE=1; export DUALCASE # for MKS sh
36656 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
36657   emulate sh
36658   NULLCMD=:
36659   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
36660   # is contrary to our usage.  Disable this feature.
36661   alias -g '${1+"$@"}'='"$@"'
36662   setopt NO_GLOB_SUBST
36663 else
36664   case `(set -o) 2>/dev/null` in #(
36665   *posix*) :
36666     set -o posix ;; #(
36667   *) :
36668      ;;
36669 esac
36670 fi
36671
36672
36673 as_nl='
36674 '
36675 export as_nl
36676 # Printing a long string crashes Solaris 7 /usr/bin/printf.
36677 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
36678 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
36679 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
36680 # Prefer a ksh shell builtin over an external printf program on Solaris,
36681 # but without wasting forks for bash or zsh.
36682 if test -z "$BASH_VERSION$ZSH_VERSION" \
36683     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
36684   as_echo='print -r --'
36685   as_echo_n='print -rn --'
36686 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
36687   as_echo='printf %s\n'
36688   as_echo_n='printf %s'
36689 else
36690   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
36691     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
36692     as_echo_n='/usr/ucb/echo -n'
36693   else
36694     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
36695     as_echo_n_body='eval
36696       arg=$1;
36697       case $arg in #(
36698       *"$as_nl"*)
36699         expr "X$arg" : "X\\(.*\\)$as_nl";
36700         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
36701       esac;
36702       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
36703     '
36704     export as_echo_n_body
36705     as_echo_n='sh -c $as_echo_n_body as_echo'
36706   fi
36707   export as_echo_body
36708   as_echo='sh -c $as_echo_body as_echo'
36709 fi
36710
36711 # The user is always right.
36712 if test "${PATH_SEPARATOR+set}" != set; then
36713   PATH_SEPARATOR=:
36714   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
36715     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
36716       PATH_SEPARATOR=';'
36717   }
36718 fi
36719
36720
36721 # IFS
36722 # We need space, tab and new line, in precisely that order.  Quoting is
36723 # there to prevent editors from complaining about space-tab.
36724 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
36725 # splitting by setting IFS to empty value.)
36726 IFS=" ""        $as_nl"
36727
36728 # Find who we are.  Look in the path if we contain no directory separator.
36729 as_myself=
36730 case $0 in #((
36731   *[\\/]* ) as_myself=$0 ;;
36732   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36733 for as_dir in $PATH
36734 do
36735   IFS=$as_save_IFS
36736   test -z "$as_dir" && as_dir=.
36737     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
36738   done
36739 IFS=$as_save_IFS
36740
36741      ;;
36742 esac
36743 # We did not find ourselves, most probably we were run as `sh COMMAND'
36744 # in which case we are not to be found in the path.
36745 if test "x$as_myself" = x; then
36746   as_myself=$0
36747 fi
36748 if test ! -f "$as_myself"; then
36749   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
36750   exit 1
36751 fi
36752
36753 # Unset variables that we do not need and which cause bugs (e.g. in
36754 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
36755 # suppresses any "Segmentation fault" message there.  '((' could
36756 # trigger a bug in pdksh 5.2.14.
36757 for as_var in BASH_ENV ENV MAIL MAILPATH
36758 do eval test x\${$as_var+set} = xset \
36759   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
36760 done
36761 PS1='$ '
36762 PS2='> '
36763 PS4='+ '
36764
36765 # NLS nuisances.
36766 LC_ALL=C
36767 export LC_ALL
36768 LANGUAGE=C
36769 export LANGUAGE
36770
36771 # CDPATH.
36772 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
36773
36774
36775 # as_fn_error STATUS ERROR [LINENO LOG_FD]
36776 # ----------------------------------------
36777 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
36778 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
36779 # script with STATUS, using 1 if that was 0.
36780 as_fn_error ()
36781 {
36782   as_status=$1; test $as_status -eq 0 && as_status=1
36783   if test "$4"; then
36784     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
36785     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
36786   fi
36787   $as_echo "$as_me: error: $2" >&2
36788   as_fn_exit $as_status
36789 } # as_fn_error
36790
36791
36792 # as_fn_set_status STATUS
36793 # -----------------------
36794 # Set $? to STATUS, without forking.
36795 as_fn_set_status ()
36796 {
36797   return $1
36798 } # as_fn_set_status
36799
36800 # as_fn_exit STATUS
36801 # -----------------
36802 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
36803 as_fn_exit ()
36804 {
36805   set +e
36806   as_fn_set_status $1
36807   exit $1
36808 } # as_fn_exit
36809
36810 # as_fn_unset VAR
36811 # ---------------
36812 # Portably unset VAR.
36813 as_fn_unset ()
36814 {
36815   { eval $1=; unset $1;}
36816 }
36817 as_unset=as_fn_unset
36818 # as_fn_append VAR VALUE
36819 # ----------------------
36820 # Append the text in VALUE to the end of the definition contained in VAR. Take
36821 # advantage of any shell optimizations that allow amortized linear growth over
36822 # repeated appends, instead of the typical quadratic growth present in naive
36823 # implementations.
36824 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
36825   eval 'as_fn_append ()
36826   {
36827     eval $1+=\$2
36828   }'
36829 else
36830   as_fn_append ()
36831   {
36832     eval $1=\$$1\$2
36833   }
36834 fi # as_fn_append
36835
36836 # as_fn_arith ARG...
36837 # ------------------
36838 # Perform arithmetic evaluation on the ARGs, and store the result in the
36839 # global $as_val. Take advantage of shells that can avoid forks. The arguments
36840 # must be portable across $(()) and expr.
36841 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
36842   eval 'as_fn_arith ()
36843   {
36844     as_val=$(( $* ))
36845   }'
36846 else
36847   as_fn_arith ()
36848   {
36849     as_val=`expr "$@" || test $? -eq 1`
36850   }
36851 fi # as_fn_arith
36852
36853
36854 if expr a : '\(a\)' >/dev/null 2>&1 &&
36855    test "X`expr 00001 : '.*\(...\)'`" = X001; then
36856   as_expr=expr
36857 else
36858   as_expr=false
36859 fi
36860
36861 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
36862   as_basename=basename
36863 else
36864   as_basename=false
36865 fi
36866
36867 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
36868   as_dirname=dirname
36869 else
36870   as_dirname=false
36871 fi
36872
36873 as_me=`$as_basename -- "$0" ||
36874 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
36875          X"$0" : 'X\(//\)$' \| \
36876          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
36877 $as_echo X/"$0" |
36878     sed '/^.*\/\([^/][^/]*\)\/*$/{
36879             s//\1/
36880             q
36881           }
36882           /^X\/\(\/\/\)$/{
36883             s//\1/
36884             q
36885           }
36886           /^X\/\(\/\).*/{
36887             s//\1/
36888             q
36889           }
36890           s/.*/./; q'`
36891
36892 # Avoid depending upon Character Ranges.
36893 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
36894 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
36895 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
36896 as_cr_digits='0123456789'
36897 as_cr_alnum=$as_cr_Letters$as_cr_digits
36898
36899 ECHO_C= ECHO_N= ECHO_T=
36900 case `echo -n x` in #(((((
36901 -n*)
36902   case `echo 'xy\c'` in
36903   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
36904   xy)  ECHO_C='\c';;
36905   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
36906        ECHO_T=' ';;
36907   esac;;
36908 *)
36909   ECHO_N='-n';;
36910 esac
36911
36912 rm -f conf$$ conf$$.exe conf$$.file
36913 if test -d conf$$.dir; then
36914   rm -f conf$$.dir/conf$$.file
36915 else
36916   rm -f conf$$.dir
36917   mkdir conf$$.dir 2>/dev/null
36918 fi
36919 if (echo >conf$$.file) 2>/dev/null; then
36920   if ln -s conf$$.file conf$$ 2>/dev/null; then
36921     as_ln_s='ln -s'
36922     # ... but there are two gotchas:
36923     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
36924     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
36925     # In both cases, we have to default to `cp -pR'.
36926     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
36927       as_ln_s='cp -pR'
36928   elif ln conf$$.file conf$$ 2>/dev/null; then
36929     as_ln_s=ln
36930   else
36931     as_ln_s='cp -pR'
36932   fi
36933 else
36934   as_ln_s='cp -pR'
36935 fi
36936 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
36937 rmdir conf$$.dir 2>/dev/null
36938
36939
36940 # as_fn_mkdir_p
36941 # -------------
36942 # Create "$as_dir" as a directory, including parents if necessary.
36943 as_fn_mkdir_p ()
36944 {
36945
36946   case $as_dir in #(
36947   -*) as_dir=./$as_dir;;
36948   esac
36949   test -d "$as_dir" || eval $as_mkdir_p || {
36950     as_dirs=
36951     while :; do
36952       case $as_dir in #(
36953       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
36954       *) as_qdir=$as_dir;;
36955       esac
36956       as_dirs="'$as_qdir' $as_dirs"
36957       as_dir=`$as_dirname -- "$as_dir" ||
36958 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
36959          X"$as_dir" : 'X\(//\)[^/]' \| \
36960          X"$as_dir" : 'X\(//\)$' \| \
36961          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
36962 $as_echo X"$as_dir" |
36963     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
36964             s//\1/
36965             q
36966           }
36967           /^X\(\/\/\)[^/].*/{
36968             s//\1/
36969             q
36970           }
36971           /^X\(\/\/\)$/{
36972             s//\1/
36973             q
36974           }
36975           /^X\(\/\).*/{
36976             s//\1/
36977             q
36978           }
36979           s/.*/./; q'`
36980       test -d "$as_dir" && break
36981     done
36982     test -z "$as_dirs" || eval "mkdir $as_dirs"
36983   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
36984
36985
36986 } # as_fn_mkdir_p
36987 if mkdir -p . 2>/dev/null; then
36988   as_mkdir_p='mkdir -p "$as_dir"'
36989 else
36990   test -d ./-p && rmdir ./-p
36991   as_mkdir_p=false
36992 fi
36993
36994
36995 # as_fn_executable_p FILE
36996 # -----------------------
36997 # Test if FILE is an executable regular file.
36998 as_fn_executable_p ()
36999 {
37000   test -f "$1" && test -x "$1"
37001 } # as_fn_executable_p
37002 as_test_x='test -x'
37003 as_executable_p=as_fn_executable_p
37004
37005 # Sed expression to map a string onto a valid CPP name.
37006 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
37007
37008 # Sed expression to map a string onto a valid variable name.
37009 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
37010
37011
37012 exec 6>&1
37013 ## ----------------------------------- ##
37014 ## Main body of $CONFIG_STATUS script. ##
37015 ## ----------------------------------- ##
37016 _ASEOF
37017 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
37018
37019 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37020 # Save the log message, to keep $0 and so on meaningful, and to
37021 # report actual input values of CONFIG_FILES etc. instead of their
37022 # values after options handling.
37023 ac_log="
37024 This file was extended by GNU tar $as_me 1.27, which was
37025 generated by GNU Autoconf 2.69.  Invocation command line was
37026
37027   CONFIG_FILES    = $CONFIG_FILES
37028   CONFIG_HEADERS  = $CONFIG_HEADERS
37029   CONFIG_LINKS    = $CONFIG_LINKS
37030   CONFIG_COMMANDS = $CONFIG_COMMANDS
37031   $ $0 $@
37032
37033 on `(hostname || uname -n) 2>/dev/null | sed 1q`
37034 "
37035
37036 _ACEOF
37037
37038 case $ac_config_files in *"
37039 "*) set x $ac_config_files; shift; ac_config_files=$*;;
37040 esac
37041
37042 case $ac_config_headers in *"
37043 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
37044 esac
37045
37046
37047 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37048 # Files that config.status was made for.
37049 config_files="$ac_config_files"
37050 config_headers="$ac_config_headers"
37051 config_commands="$ac_config_commands"
37052
37053 _ACEOF
37054
37055 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37056 ac_cs_usage="\
37057 \`$as_me' instantiates files and other configuration actions
37058 from templates according to the current configuration.  Unless the files
37059 and actions are specified as TAGs, all are instantiated by default.
37060
37061 Usage: $0 [OPTION]... [TAG]...
37062
37063   -h, --help       print this help, then exit
37064   -V, --version    print version number and configuration settings, then exit
37065       --config     print configuration, then exit
37066   -q, --quiet, --silent
37067                    do not print progress messages
37068   -d, --debug      don't remove temporary files
37069       --recheck    update $as_me by reconfiguring in the same conditions
37070       --file=FILE[:TEMPLATE]
37071                    instantiate the configuration file FILE
37072       --header=FILE[:TEMPLATE]
37073                    instantiate the configuration header FILE
37074
37075 Configuration files:
37076 $config_files
37077
37078 Configuration headers:
37079 $config_headers
37080
37081 Configuration commands:
37082 $config_commands
37083
37084 Report bugs to <bug-tar@gnu.org>.
37085 GNU tar home page: <http://www.gnu.org/software/tar/>.
37086 General help using GNU software: <http://www.gnu.org/gethelp/>."
37087
37088 _ACEOF
37089 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37090 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
37091 ac_cs_version="\\
37092 GNU tar config.status 1.27
37093 configured by $0, generated by GNU Autoconf 2.69,
37094   with options \\"\$ac_cs_config\\"
37095
37096 Copyright (C) 2012 Free Software Foundation, Inc.
37097 This config.status script is free software; the Free Software Foundation
37098 gives unlimited permission to copy, distribute and modify it."
37099
37100 ac_pwd='$ac_pwd'
37101 srcdir='$srcdir'
37102 INSTALL='$INSTALL'
37103 MKDIR_P='$MKDIR_P'
37104 AWK='$AWK'
37105 test -n "\$AWK" || AWK=awk
37106 _ACEOF
37107
37108 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37109 # The default lists apply if the user does not specify any file.
37110 ac_need_defaults=:
37111 while test $# != 0
37112 do
37113   case $1 in
37114   --*=?*)
37115     ac_option=`expr "X$1" : 'X\([^=]*\)='`
37116     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
37117     ac_shift=:
37118     ;;
37119   --*=)
37120     ac_option=`expr "X$1" : 'X\([^=]*\)='`
37121     ac_optarg=
37122     ac_shift=:
37123     ;;
37124   *)
37125     ac_option=$1
37126     ac_optarg=$2
37127     ac_shift=shift
37128     ;;
37129   esac
37130
37131   case $ac_option in
37132   # Handling of the options.
37133   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
37134     ac_cs_recheck=: ;;
37135   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
37136     $as_echo "$ac_cs_version"; exit ;;
37137   --config | --confi | --conf | --con | --co | --c )
37138     $as_echo "$ac_cs_config"; exit ;;
37139   --debug | --debu | --deb | --de | --d | -d )
37140     debug=: ;;
37141   --file | --fil | --fi | --f )
37142     $ac_shift
37143     case $ac_optarg in
37144     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
37145     '') as_fn_error $? "missing file argument" ;;
37146     esac
37147     as_fn_append CONFIG_FILES " '$ac_optarg'"
37148     ac_need_defaults=false;;
37149   --header | --heade | --head | --hea )
37150     $ac_shift
37151     case $ac_optarg in
37152     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
37153     esac
37154     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
37155     ac_need_defaults=false;;
37156   --he | --h)
37157     # Conflict between --help and --header
37158     as_fn_error $? "ambiguous option: \`$1'
37159 Try \`$0 --help' for more information.";;
37160   --help | --hel | -h )
37161     $as_echo "$ac_cs_usage"; exit ;;
37162   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
37163   | -silent | --silent | --silen | --sile | --sil | --si | --s)
37164     ac_cs_silent=: ;;
37165
37166   # This is an error.
37167   -*) as_fn_error $? "unrecognized option: \`$1'
37168 Try \`$0 --help' for more information." ;;
37169
37170   *) as_fn_append ac_config_targets " $1"
37171      ac_need_defaults=false ;;
37172
37173   esac
37174   shift
37175 done
37176
37177 ac_configure_extra_args=
37178
37179 if $ac_cs_silent; then
37180   exec 6>/dev/null
37181   ac_configure_extra_args="$ac_configure_extra_args --silent"
37182 fi
37183
37184 _ACEOF
37185 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37186 if \$ac_cs_recheck; then
37187   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
37188   shift
37189   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
37190   CONFIG_SHELL='$SHELL'
37191   export CONFIG_SHELL
37192   exec "\$@"
37193 fi
37194
37195 _ACEOF
37196 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37197 exec 5>>config.log
37198 {
37199   echo
37200   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
37201 ## Running $as_me. ##
37202 _ASBOX
37203   $as_echo "$ac_log"
37204 } >&5
37205
37206 _ACEOF
37207 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37208 #
37209 # INIT-COMMANDS
37210 #
37211 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
37212 # Capture the value of obsolete ALL_LINGUAS because we need it to compute
37213     # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
37214     # from automake < 1.5.
37215     eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
37216     # Capture the value of LINGUAS because we need it to compute CATALOGS.
37217     LINGUAS="${LINGUAS-%UNSET%}"
37218
37219
37220
37221 _ACEOF
37222
37223 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37224
37225 # Handling of arguments.
37226 for ac_config_target in $ac_config_targets
37227 do
37228   case $ac_config_target in
37229     "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
37230     "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
37231     "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;;
37232     "tests/atconfig") CONFIG_COMMANDS="$CONFIG_COMMANDS tests/atconfig" ;;
37233     "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
37234     "tests/atlocal") CONFIG_FILES="$CONFIG_FILES tests/atlocal" ;;
37235     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
37236     "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
37237     "gnu/Makefile") CONFIG_FILES="$CONFIG_FILES gnu/Makefile" ;;
37238     "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
37239     "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
37240     "scripts/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/Makefile" ;;
37241     "rmt/Makefile") CONFIG_FILES="$CONFIG_FILES rmt/Makefile" ;;
37242     "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
37243
37244   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
37245   esac
37246 done
37247
37248
37249 # If the user did not use the arguments to specify the items to instantiate,
37250 # then the envvar interface is used.  Set only those that are not.
37251 # We use the long form for the default assignment because of an extremely
37252 # bizarre bug on SunOS 4.1.3.
37253 if $ac_need_defaults; then
37254   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
37255   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
37256   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
37257 fi
37258
37259 # Have a temporary directory for convenience.  Make it in the build tree
37260 # simply because there is no reason against having it here, and in addition,
37261 # creating and moving files from /tmp can sometimes cause problems.
37262 # Hook for its removal unless debugging.
37263 # Note that there is a small window in which the directory will not be cleaned:
37264 # after its creation but before its name has been assigned to `$tmp'.
37265 $debug ||
37266 {
37267   tmp= ac_tmp=
37268   trap 'exit_status=$?
37269   : "${ac_tmp:=$tmp}"
37270   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
37271 ' 0
37272   trap 'as_fn_exit 1' 1 2 13 15
37273 }
37274 # Create a (secure) tmp directory for tmp files.
37275
37276 {
37277   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
37278   test -d "$tmp"
37279 }  ||
37280 {
37281   tmp=./conf$$-$RANDOM
37282   (umask 077 && mkdir "$tmp")
37283 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
37284 ac_tmp=$tmp
37285
37286 # Set up the scripts for CONFIG_FILES section.
37287 # No need to generate them if there are no CONFIG_FILES.
37288 # This happens for instance with `./config.status config.h'.
37289 if test -n "$CONFIG_FILES"; then
37290
37291
37292 ac_cr=`echo X | tr X '\015'`
37293 # On cygwin, bash can eat \r inside `` if the user requested igncr.
37294 # But we know of no other shell where ac_cr would be empty at this
37295 # point, so we can use a bashism as a fallback.
37296 if test "x$ac_cr" = x; then
37297   eval ac_cr=\$\'\\r\'
37298 fi
37299 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
37300 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
37301   ac_cs_awk_cr='\\r'
37302 else
37303   ac_cs_awk_cr=$ac_cr
37304 fi
37305
37306 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
37307 _ACEOF
37308
37309
37310 {
37311   echo "cat >conf$$subs.awk <<_ACEOF" &&
37312   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
37313   echo "_ACEOF"
37314 } >conf$$subs.sh ||
37315   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
37316 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
37317 ac_delim='%!_!# '
37318 for ac_last_try in false false false false false :; do
37319   . ./conf$$subs.sh ||
37320     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
37321
37322   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
37323   if test $ac_delim_n = $ac_delim_num; then
37324     break
37325   elif $ac_last_try; then
37326     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
37327   else
37328     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
37329   fi
37330 done
37331 rm -f conf$$subs.sh
37332
37333 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37334 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
37335 _ACEOF
37336 sed -n '
37337 h
37338 s/^/S["/; s/!.*/"]=/
37339 p
37340 g
37341 s/^[^!]*!//
37342 :repl
37343 t repl
37344 s/'"$ac_delim"'$//
37345 t delim
37346 :nl
37347 h
37348 s/\(.\{148\}\)..*/\1/
37349 t more1
37350 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
37351 p
37352 n
37353 b repl
37354 :more1
37355 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
37356 p
37357 g
37358 s/.\{148\}//
37359 t nl
37360 :delim
37361 h
37362 s/\(.\{148\}\)..*/\1/
37363 t more2
37364 s/["\\]/\\&/g; s/^/"/; s/$/"/
37365 p
37366 b
37367 :more2
37368 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
37369 p
37370 g
37371 s/.\{148\}//
37372 t delim
37373 ' <conf$$subs.awk | sed '
37374 /^[^""]/{
37375   N
37376   s/\n//
37377 }
37378 ' >>$CONFIG_STATUS || ac_write_fail=1
37379 rm -f conf$$subs.awk
37380 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37381 _ACAWK
37382 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
37383   for (key in S) S_is_set[key] = 1
37384   FS = "\a"
37385
37386 }
37387 {
37388   line = $ 0
37389   nfields = split(line, field, "@")
37390   substed = 0
37391   len = length(field[1])
37392   for (i = 2; i < nfields; i++) {
37393     key = field[i]
37394     keylen = length(key)
37395     if (S_is_set[key]) {
37396       value = S[key]
37397       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
37398       len += length(value) + length(field[++i])
37399       substed = 1
37400     } else
37401       len += 1 + keylen
37402   }
37403
37404   print line
37405 }
37406
37407 _ACAWK
37408 _ACEOF
37409 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37410 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
37411   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
37412 else
37413   cat
37414 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
37415   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
37416 _ACEOF
37417
37418 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
37419 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
37420 # trailing colons and then remove the whole line if VPATH becomes empty
37421 # (actually we leave an empty line to preserve line numbers).
37422 if test "x$srcdir" = x.; then
37423   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
37424 h
37425 s///
37426 s/^/:/
37427 s/[      ]*$/:/
37428 s/:\$(srcdir):/:/g
37429 s/:\${srcdir}:/:/g
37430 s/:@srcdir@:/:/g
37431 s/^:*//
37432 s/:*$//
37433 x
37434 s/\(=[   ]*\).*/\1/
37435 G
37436 s/\n//
37437 s/^[^=]*=[       ]*$//
37438 }'
37439 fi
37440
37441 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37442 fi # test -n "$CONFIG_FILES"
37443
37444 # Set up the scripts for CONFIG_HEADERS section.
37445 # No need to generate them if there are no CONFIG_HEADERS.
37446 # This happens for instance with `./config.status Makefile'.
37447 if test -n "$CONFIG_HEADERS"; then
37448 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
37449 BEGIN {
37450 _ACEOF
37451
37452 # Transform confdefs.h into an awk script `defines.awk', embedded as
37453 # here-document in config.status, that substitutes the proper values into
37454 # config.h.in to produce config.h.
37455
37456 # Create a delimiter string that does not exist in confdefs.h, to ease
37457 # handling of long lines.
37458 ac_delim='%!_!# '
37459 for ac_last_try in false false :; do
37460   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
37461   if test -z "$ac_tt"; then
37462     break
37463   elif $ac_last_try; then
37464     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
37465   else
37466     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
37467   fi
37468 done
37469
37470 # For the awk script, D is an array of macro values keyed by name,
37471 # likewise P contains macro parameters if any.  Preserve backslash
37472 # newline sequences.
37473
37474 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
37475 sed -n '
37476 s/.\{148\}/&'"$ac_delim"'/g
37477 t rset
37478 :rset
37479 s/^[     ]*#[    ]*define[       ][      ]*/ /
37480 t def
37481 d
37482 :def
37483 s/\\$//
37484 t bsnl
37485 s/["\\]/\\&/g
37486 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
37487 D["\1"]=" \3"/p
37488 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
37489 d
37490 :bsnl
37491 s/["\\]/\\&/g
37492 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
37493 D["\1"]=" \3\\\\\\n"\\/p
37494 t cont
37495 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
37496 t cont
37497 d
37498 :cont
37499 n
37500 s/.\{148\}/&'"$ac_delim"'/g
37501 t clear
37502 :clear
37503 s/\\$//
37504 t bsnlc
37505 s/["\\]/\\&/g; s/^/"/; s/$/"/p
37506 d
37507 :bsnlc
37508 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
37509 b cont
37510 ' <confdefs.h | sed '
37511 s/'"$ac_delim"'/"\\\
37512 "/g' >>$CONFIG_STATUS || ac_write_fail=1
37513
37514 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37515   for (key in D) D_is_set[key] = 1
37516   FS = "\a"
37517 }
37518 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
37519   line = \$ 0
37520   split(line, arg, " ")
37521   if (arg[1] == "#") {
37522     defundef = arg[2]
37523     mac1 = arg[3]
37524   } else {
37525     defundef = substr(arg[1], 2)
37526     mac1 = arg[2]
37527   }
37528   split(mac1, mac2, "(") #)
37529   macro = mac2[1]
37530   prefix = substr(line, 1, index(line, defundef) - 1)
37531   if (D_is_set[macro]) {
37532     # Preserve the white space surrounding the "#".
37533     print prefix "define", macro P[macro] D[macro]
37534     next
37535   } else {
37536     # Replace #undef with comments.  This is necessary, for example,
37537     # in the case of _POSIX_SOURCE, which is predefined and required
37538     # on some systems where configure will not decide to define it.
37539     if (defundef == "undef") {
37540       print "/*", prefix defundef, macro, "*/"
37541       next
37542     }
37543   }
37544 }
37545 { print }
37546 _ACAWK
37547 _ACEOF
37548 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37549   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
37550 fi # test -n "$CONFIG_HEADERS"
37551
37552
37553 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
37554 shift
37555 for ac_tag
37556 do
37557   case $ac_tag in
37558   :[FHLC]) ac_mode=$ac_tag; continue;;
37559   esac
37560   case $ac_mode$ac_tag in
37561   :[FHL]*:*);;
37562   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
37563   :[FH]-) ac_tag=-:-;;
37564   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
37565   esac
37566   ac_save_IFS=$IFS
37567   IFS=:
37568   set x $ac_tag
37569   IFS=$ac_save_IFS
37570   shift
37571   ac_file=$1
37572   shift
37573
37574   case $ac_mode in
37575   :L) ac_source=$1;;
37576   :[FH])
37577     ac_file_inputs=
37578     for ac_f
37579     do
37580       case $ac_f in
37581       -) ac_f="$ac_tmp/stdin";;
37582       *) # Look for the file first in the build tree, then in the source tree
37583          # (if the path is not absolute).  The absolute path cannot be DOS-style,
37584          # because $ac_f cannot contain `:'.
37585          test -f "$ac_f" ||
37586            case $ac_f in
37587            [\\/$]*) false;;
37588            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
37589            esac ||
37590            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
37591       esac
37592       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
37593       as_fn_append ac_file_inputs " '$ac_f'"
37594     done
37595
37596     # Let's still pretend it is `configure' which instantiates (i.e., don't
37597     # use $as_me), people would be surprised to read:
37598     #    /* config.h.  Generated by config.status.  */
37599     configure_input='Generated from '`
37600           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
37601         `' by configure.'
37602     if test x"$ac_file" != x-; then
37603       configure_input="$ac_file.  $configure_input"
37604       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
37605 $as_echo "$as_me: creating $ac_file" >&6;}
37606     fi
37607     # Neutralize special characters interpreted by sed in replacement strings.
37608     case $configure_input in #(
37609     *\&* | *\|* | *\\* )
37610        ac_sed_conf_input=`$as_echo "$configure_input" |
37611        sed 's/[\\\\&|]/\\\\&/g'`;; #(
37612     *) ac_sed_conf_input=$configure_input;;
37613     esac
37614
37615     case $ac_tag in
37616     *:-:* | *:-) cat >"$ac_tmp/stdin" \
37617       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
37618     esac
37619     ;;
37620   esac
37621
37622   ac_dir=`$as_dirname -- "$ac_file" ||
37623 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
37624          X"$ac_file" : 'X\(//\)[^/]' \| \
37625          X"$ac_file" : 'X\(//\)$' \| \
37626          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
37627 $as_echo X"$ac_file" |
37628     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
37629             s//\1/
37630             q
37631           }
37632           /^X\(\/\/\)[^/].*/{
37633             s//\1/
37634             q
37635           }
37636           /^X\(\/\/\)$/{
37637             s//\1/
37638             q
37639           }
37640           /^X\(\/\).*/{
37641             s//\1/
37642             q
37643           }
37644           s/.*/./; q'`
37645   as_dir="$ac_dir"; as_fn_mkdir_p
37646   ac_builddir=.
37647
37648 case "$ac_dir" in
37649 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
37650 *)
37651   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
37652   # A ".." for each directory in $ac_dir_suffix.
37653   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
37654   case $ac_top_builddir_sub in
37655   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
37656   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
37657   esac ;;
37658 esac
37659 ac_abs_top_builddir=$ac_pwd
37660 ac_abs_builddir=$ac_pwd$ac_dir_suffix
37661 # for backward compatibility:
37662 ac_top_builddir=$ac_top_build_prefix
37663
37664 case $srcdir in
37665   .)  # We are building in place.
37666     ac_srcdir=.
37667     ac_top_srcdir=$ac_top_builddir_sub
37668     ac_abs_top_srcdir=$ac_pwd ;;
37669   [\\/]* | ?:[\\/]* )  # Absolute name.
37670     ac_srcdir=$srcdir$ac_dir_suffix;
37671     ac_top_srcdir=$srcdir
37672     ac_abs_top_srcdir=$srcdir ;;
37673   *) # Relative name.
37674     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
37675     ac_top_srcdir=$ac_top_build_prefix$srcdir
37676     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
37677 esac
37678 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
37679
37680
37681   case $ac_mode in
37682   :F)
37683   #
37684   # CONFIG_FILE
37685   #
37686
37687   case $INSTALL in
37688   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
37689   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
37690   esac
37691   ac_MKDIR_P=$MKDIR_P
37692   case $MKDIR_P in
37693   [\\/$]* | ?:[\\/]* ) ;;
37694   */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
37695   esac
37696 _ACEOF
37697
37698 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37699 # If the template does not know about datarootdir, expand it.
37700 # FIXME: This hack should be removed a few years after 2.60.
37701 ac_datarootdir_hack=; ac_datarootdir_seen=
37702 ac_sed_dataroot='
37703 /datarootdir/ {
37704   p
37705   q
37706 }
37707 /@datadir@/p
37708 /@docdir@/p
37709 /@infodir@/p
37710 /@localedir@/p
37711 /@mandir@/p'
37712 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
37713 *datarootdir*) ac_datarootdir_seen=yes;;
37714 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
37715   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
37716 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
37717 _ACEOF
37718 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37719   ac_datarootdir_hack='
37720   s&@datadir@&$datadir&g
37721   s&@docdir@&$docdir&g
37722   s&@infodir@&$infodir&g
37723   s&@localedir@&$localedir&g
37724   s&@mandir@&$mandir&g
37725   s&\\\${datarootdir}&$datarootdir&g' ;;
37726 esac
37727 _ACEOF
37728
37729 # Neutralize VPATH when `$srcdir' = `.'.
37730 # Shell code in configure.ac might set extrasub.
37731 # FIXME: do we really want to maintain this feature?
37732 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37733 ac_sed_extra="$ac_vpsub
37734 $extrasub
37735 _ACEOF
37736 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37737 :t
37738 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
37739 s|@configure_input@|$ac_sed_conf_input|;t t
37740 s&@top_builddir@&$ac_top_builddir_sub&;t t
37741 s&@top_build_prefix@&$ac_top_build_prefix&;t t
37742 s&@srcdir@&$ac_srcdir&;t t
37743 s&@abs_srcdir@&$ac_abs_srcdir&;t t
37744 s&@top_srcdir@&$ac_top_srcdir&;t t
37745 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
37746 s&@builddir@&$ac_builddir&;t t
37747 s&@abs_builddir@&$ac_abs_builddir&;t t
37748 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
37749 s&@INSTALL@&$ac_INSTALL&;t t
37750 s&@MKDIR_P@&$ac_MKDIR_P&;t t
37751 $ac_datarootdir_hack
37752 "
37753 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
37754   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
37755
37756 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
37757   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
37758   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
37759       "$ac_tmp/out"`; test -z "$ac_out"; } &&
37760   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
37761 which seems to be undefined.  Please make sure it is defined" >&5
37762 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
37763 which seems to be undefined.  Please make sure it is defined" >&2;}
37764
37765   rm -f "$ac_tmp/stdin"
37766   case $ac_file in
37767   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
37768   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
37769   esac \
37770   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
37771  ;;
37772   :H)
37773   #
37774   # CONFIG_HEADER
37775   #
37776   if test x"$ac_file" != x-; then
37777     {
37778       $as_echo "/* $configure_input  */" \
37779       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
37780     } >"$ac_tmp/config.h" \
37781       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
37782     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
37783       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
37784 $as_echo "$as_me: $ac_file is unchanged" >&6;}
37785     else
37786       rm -f "$ac_file"
37787       mv "$ac_tmp/config.h" "$ac_file" \
37788         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
37789     fi
37790   else
37791     $as_echo "/* $configure_input  */" \
37792       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
37793       || as_fn_error $? "could not create -" "$LINENO" 5
37794   fi
37795 # Compute "$ac_file"'s index in $config_headers.
37796 _am_arg="$ac_file"
37797 _am_stamp_count=1
37798 for _am_header in $config_headers :; do
37799   case $_am_header in
37800     $_am_arg | $_am_arg:* )
37801       break ;;
37802     * )
37803       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
37804   esac
37805 done
37806 echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
37807 $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
37808          X"$_am_arg" : 'X\(//\)[^/]' \| \
37809          X"$_am_arg" : 'X\(//\)$' \| \
37810          X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
37811 $as_echo X"$_am_arg" |
37812     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
37813             s//\1/
37814             q
37815           }
37816           /^X\(\/\/\)[^/].*/{
37817             s//\1/
37818             q
37819           }
37820           /^X\(\/\/\)$/{
37821             s//\1/
37822             q
37823           }
37824           /^X\(\/\).*/{
37825             s//\1/
37826             q
37827           }
37828           s/.*/./; q'`/stamp-h$_am_stamp_count
37829  ;;
37830
37831   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
37832 $as_echo "$as_me: executing $ac_file commands" >&6;}
37833  ;;
37834   esac
37835
37836
37837   case $ac_file$ac_mode in
37838     "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
37839   # Autoconf 2.62 quotes --file arguments for eval, but not when files
37840   # are listed without --file.  Let's play safe and only enable the eval
37841   # if we detect the quoting.
37842   case $CONFIG_FILES in
37843   *\'*) eval set x "$CONFIG_FILES" ;;
37844   *)   set x $CONFIG_FILES ;;
37845   esac
37846   shift
37847   for mf
37848   do
37849     # Strip MF so we end up with the name of the file.
37850     mf=`echo "$mf" | sed -e 's/:.*$//'`
37851     # Check whether this is an Automake generated Makefile or not.
37852     # We used to match only the files named 'Makefile.in', but
37853     # some people rename them; so instead we look at the file content.
37854     # Grep'ing the first line is not enough: some people post-process
37855     # each Makefile.in and add a new line on top of each file to say so.
37856     # Grep'ing the whole file is not good either: AIX grep has a line
37857     # limit of 2048, but all sed's we know have understand at least 4000.
37858     if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
37859       dirpart=`$as_dirname -- "$mf" ||
37860 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
37861          X"$mf" : 'X\(//\)[^/]' \| \
37862          X"$mf" : 'X\(//\)$' \| \
37863          X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
37864 $as_echo X"$mf" |
37865     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
37866             s//\1/
37867             q
37868           }
37869           /^X\(\/\/\)[^/].*/{
37870             s//\1/
37871             q
37872           }
37873           /^X\(\/\/\)$/{
37874             s//\1/
37875             q
37876           }
37877           /^X\(\/\).*/{
37878             s//\1/
37879             q
37880           }
37881           s/.*/./; q'`
37882     else
37883       continue
37884     fi
37885     # Extract the definition of DEPDIR, am__include, and am__quote
37886     # from the Makefile without running 'make'.
37887     DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
37888     test -z "$DEPDIR" && continue
37889     am__include=`sed -n 's/^am__include = //p' < "$mf"`
37890     test -z "am__include" && continue
37891     am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
37892     # Find all dependency output files, they are included files with
37893     # $(DEPDIR) in their names.  We invoke sed twice because it is the
37894     # simplest approach to changing $(DEPDIR) to its actual value in the
37895     # expansion.
37896     for file in `sed -n "
37897       s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
37898          sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
37899       # Make sure the directory exists.
37900       test -f "$dirpart/$file" && continue
37901       fdir=`$as_dirname -- "$file" ||
37902 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
37903          X"$file" : 'X\(//\)[^/]' \| \
37904          X"$file" : 'X\(//\)$' \| \
37905          X"$file" : 'X\(/\)' \| . 2>/dev/null ||
37906 $as_echo X"$file" |
37907     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
37908             s//\1/
37909             q
37910           }
37911           /^X\(\/\/\)[^/].*/{
37912             s//\1/
37913             q
37914           }
37915           /^X\(\/\/\)$/{
37916             s//\1/
37917             q
37918           }
37919           /^X\(\/\).*/{
37920             s//\1/
37921             q
37922           }
37923           s/.*/./; q'`
37924       as_dir=$dirpart/$fdir; as_fn_mkdir_p
37925       # echo "creating $dirpart/$file"
37926       echo '# dummy' > "$dirpart/$file"
37927     done
37928   done
37929 }
37930  ;;
37931     "po-directories":C)
37932     for ac_file in $CONFIG_FILES; do
37933       # Support "outfile[:infile[:infile...]]"
37934       case "$ac_file" in
37935         *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
37936       esac
37937       # PO directories have a Makefile.in generated from Makefile.in.in.
37938       case "$ac_file" in */Makefile.in)
37939         # Adjust a relative srcdir.
37940         ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
37941         ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
37942         ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
37943         # In autoconf-2.13 it is called $ac_given_srcdir.
37944         # In autoconf-2.50 it is called $srcdir.
37945         test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
37946         case "$ac_given_srcdir" in
37947           .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
37948           /*) top_srcdir="$ac_given_srcdir" ;;
37949           *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
37950         esac
37951         # Treat a directory as a PO directory if and only if it has a
37952         # POTFILES.in file. This allows packages to have multiple PO
37953         # directories under different names or in different locations.
37954         if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
37955           rm -f "$ac_dir/POTFILES"
37956           test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
37957           gt_tab=`printf '\t'`
37958           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"
37959           POMAKEFILEDEPS="POTFILES.in"
37960           # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
37961           # on $ac_dir but don't depend on user-specified configuration
37962           # parameters.
37963           if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
37964             # The LINGUAS file contains the set of available languages.
37965             if test -n "$OBSOLETE_ALL_LINGUAS"; then
37966               test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
37967             fi
37968             ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
37969             # Hide the ALL_LINGUAS assignment from automake < 1.5.
37970             eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
37971             POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
37972           else
37973             # The set of available languages was given in configure.in.
37974             # Hide the ALL_LINGUAS assignment from automake < 1.5.
37975             eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
37976           fi
37977           # Compute POFILES
37978           # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
37979           # Compute UPDATEPOFILES
37980           # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
37981           # Compute DUMMYPOFILES
37982           # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
37983           # Compute GMOFILES
37984           # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
37985           case "$ac_given_srcdir" in
37986             .) srcdirpre= ;;
37987             *) srcdirpre='$(srcdir)/' ;;
37988           esac
37989           POFILES=
37990           UPDATEPOFILES=
37991           DUMMYPOFILES=
37992           GMOFILES=
37993           for lang in $ALL_LINGUAS; do
37994             POFILES="$POFILES $srcdirpre$lang.po"
37995             UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
37996             DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
37997             GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
37998           done
37999           # CATALOGS depends on both $ac_dir and the user's LINGUAS
38000           # environment variable.
38001           INST_LINGUAS=
38002           if test -n "$ALL_LINGUAS"; then
38003             for presentlang in $ALL_LINGUAS; do
38004               useit=no
38005               if test "%UNSET%" != "$LINGUAS"; then
38006                 desiredlanguages="$LINGUAS"
38007               else
38008                 desiredlanguages="$ALL_LINGUAS"
38009               fi
38010               for desiredlang in $desiredlanguages; do
38011                 # Use the presentlang catalog if desiredlang is
38012                 #   a. equal to presentlang, or
38013                 #   b. a variant of presentlang (because in this case,
38014                 #      presentlang can be used as a fallback for messages
38015                 #      which are not translated in the desiredlang catalog).
38016                 case "$desiredlang" in
38017                   "$presentlang"*) useit=yes;;
38018                 esac
38019               done
38020               if test $useit = yes; then
38021                 INST_LINGUAS="$INST_LINGUAS $presentlang"
38022               fi
38023             done
38024           fi
38025           CATALOGS=
38026           if test -n "$INST_LINGUAS"; then
38027             for lang in $INST_LINGUAS; do
38028               CATALOGS="$CATALOGS $lang.gmo"
38029             done
38030           fi
38031           test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
38032           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"
38033           for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
38034             if test -f "$f"; then
38035               case "$f" in
38036                 *.orig | *.bak | *~) ;;
38037                 *) cat "$f" >> "$ac_dir/Makefile" ;;
38038               esac
38039             fi
38040           done
38041         fi
38042         ;;
38043       esac
38044     done ;;
38045     "tests/atconfig":C) cat >tests/atconfig <<ATEOF
38046 # Configurable variable values for building test suites.
38047 # Generated by $0.
38048 # Copyright (C) 2012 Free Software Foundation, Inc.
38049
38050 # The test suite will define top_srcdir=$at_top_srcdir/../.. etc.
38051 at_testdir='tests'
38052 abs_builddir='$ac_abs_builddir'
38053 at_srcdir='$ac_srcdir'
38054 abs_srcdir='$ac_abs_srcdir'
38055 at_top_srcdir='$ac_top_srcdir'
38056 abs_top_srcdir='$ac_abs_top_srcdir'
38057 at_top_build_prefix='$ac_top_build_prefix'
38058 abs_top_builddir='$ac_abs_top_builddir'
38059
38060 # Backward compatibility with Autotest <= 2.59b:
38061 at_top_builddir=\$at_top_build_prefix
38062
38063 AUTOTEST_PATH='tests'
38064
38065 SHELL=\${CONFIG_SHELL-'$SHELL'}
38066 ATEOF
38067  ;;
38068
38069   esac
38070 done # for ac_tag
38071
38072
38073 as_fn_exit 0
38074 _ACEOF
38075 ac_clean_files=$ac_clean_files_save
38076
38077 test $ac_write_fail = 0 ||
38078   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
38079
38080
38081 # configure is writing to config.log, and then calls config.status.
38082 # config.status does its own redirection, appending to config.log.
38083 # Unfortunately, on DOS this fails, as config.log is still kept open
38084 # by configure, so config.status won't be able to write to it; its
38085 # output is simply discarded.  So we exec the FD to /dev/null,
38086 # effectively closing config.log, so it can be properly (re)opened and
38087 # appended to by config.status.  When coming back to configure, we
38088 # need to make the FD available again.
38089 if test "$no_create" != yes; then
38090   ac_cs_success=:
38091   ac_config_status_args=
38092   test "$silent" = yes &&
38093     ac_config_status_args="$ac_config_status_args --quiet"
38094   exec 5>/dev/null
38095   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
38096   exec 5>>config.log
38097   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
38098   # would make configure fail if this is the last instruction.
38099   $ac_cs_success || as_fn_exit 1
38100 fi
38101 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
38102   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
38103 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
38104 fi
38105